chengxiangling
2025-05-15 65f86f41dedbbbb7030e2f37ce3e001bbca4923a
src/views/mainPlan/platePlanList/index.vue
@@ -40,17 +40,18 @@
          icon="Download"
          @click="handleExport"
          v-hasPermi="['plateProcessShopStat:export']"
          >{{ $t(`page.common.export`) }}</el-button
          >{{ $t(`common.common.export`) }}</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="Edit"
          icon="Refresh"
          @click="handleUpdate"
          :disabled="loading"
          v-hasPermi="['plateProcessShopStat:update']"
          >{{ $t(`page.common.update`) }}</el-button
          >{{ $t(`common.common.update`) }}</el-button
        >
      </el-col>
@@ -107,7 +108,7 @@
  </div>
</template>
<script setup name="Aps_plate_process_stat">
<script setup name="ApsPlatePlanList">
import {
  listApsPlateProcessShopStat,
  listApsPlateProcessShopStatUpdate,
@@ -115,7 +116,7 @@
import HxlhTable from "@/components/HxlhTable/index.vue";
import { getToken } from "@/utils/auth";
import { nextTick, onMounted, ref } from "vue";
import { ElMessage } from "element-plus";
// import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n"; //要在js中使用国际化
// import i18n from "@/utils/i18n";
// const t = i18n.global.t
@@ -163,107 +164,127 @@
  columns.value = [
    /*  { type: 'seq', title: '序号', width: 60 },*/
    {
      title: t("page.table.mainPartNumber"),
      title: t("plan.table.mainPartCustomer"),
      field: "customer",
      width: "200",
      fixed: "left",
    },
    {
      title: t("plan.table.mainPartNumber"),
      field: "mainPartNumber",
      width: 150,
      width: "120",
      fixed: "left",
    },
    {
      title: t("page.table.businessType"),
      title: t("plan.table.businessType"),
      field: "businessType",
      width: 120,
      width: "auto",
      fixed: "left",
    },
    {
      title: t("page.table.documentNumber"),
      title: t("plan.table.documentNumber"),
      field: "documentNumber",
      width: 160,
      width: "180",
      fixed: "left",
    },
    {
      title: t("page.table.requirementType"),
      title: t("plan.table.requirementType"),
      field: "requirementType",
      width: 100,
      width: "auto",
      fixed: "left",
    },
    {
      title: t("page.table.documentStatus"),
      title: t("plan.table.documentStatus"),
      field: "documentStatus",
      width: 100,
      width: "auto",
      fixed: "left",
    },
    // {
    //   title: t("plan.table.updateBy"),
    //   field: "updateBy",
    //   width: "auto",
    // },
    {
      title: t("page.table.updateBy"),
      field: "updateBy",
      width: 100,
    },
    {
      title: t("page.table.workCenter"),
      title: t("plan.table.workCenter"),
      field: "workCenter",
      width: 200,
      width: "180",
    },
    {
      title: t("page.table.department"),
      title: t("plan.table.department"),
      field: "department",
      width: 200,
      width: "auto",
    },
    {
      title: t("page.table.opStatus"),
      title: t("plan.table.opStatus"),
      field: "opStatus",
      width: 200,
      width: "auto",
    },
    {
      title: t("page.table.nextOpName"),
      title: t("plan.table.nextOpName"),
      field: "nextOpName",
      width: 100,
      width: "auto",
    },
    {
      title: t("page.table.nextProcessDeparment"),
      title: t("plan.table.nextProcessDeparment"),
      field: "nextProcessDeparment",
      width: 200,
      width: "auto",
    },
    {
      title: t("page.table.itemNumber"),
      title: t("plan.table.itemNumber"),
      field: "itemNumber",
      width: 150,
      width: "auto",
      type: "html",
    },
    {
      title: t("page.table.drawingNo"),
      title: t("plan.table.drawingNo"),
      field: "drawingNo",
      width: 150,
      width: "auto",
      // format: 'YYYY-MM-DD'
    },
    {
      title: t("page.table.versionNumber"),
      title: t("plan.table.versionNumber"),
      field: "versionNumber",
      width: 100,
      width: "auto",
      type: "html",
    },
    {
      title: t("page.table.cheaperCode"),
      field: "cheaperCode",
      width: 100,
      title: t("plan.table.cheaperCode"),
      field: "lowOrderCode",
      width: "auto",
    },
    {
      title: t("page.table.productionQuantity"),
      title: t("plan.table.productionQuantity"),
      field: "productionQuantity",
      width: 100,
      width: "auto",
      type: "html",
    },
    {
      title: t("page.table.planworkOrderTime"),
      field: "planworkOrderTime",
      width: 200,
      title: t("plan.table.workorderCreationTime"),
      field: "orderCreateTime",
      width: "160",
    },
    {
      title: t("page.table.planEndDay"),
      title: t("plan.table.workOrderReviewTime"),
      field: "approveOn",
      width: "160",
    },
    {
      title: t("plan.table.workOrderStartTime"),
      field: "startWorkDate",
      width: "auto",
    },
    // {
    //   title: t("plan.table.planworkOrderTime"),
    //   field: "planworkOrderTime",
    //   width: 200,
    // },
    {
      title: t("plan.table.planEndDay"),
      field: "planEndDay",
      width: 150,
      width: "auto",
      format: "YYYY-MM-DD hh:mm:ss",
    },
  ]
  getList();
},{immediate:true, deep:true});
/** 查询钣金统计列表 */
async function getList() {
@@ -272,6 +293,7 @@
  let listValue = response.data;
  dynamicList.value = response.shopNames;
  aps_plate_process_statList.value = listValue;
  console.log(aps_plate_process_statList.value,"aps_plate_process_statList")
  total.value = response.total;
  loading.value = false;
  await nextTick();
@@ -335,17 +357,18 @@
      },
    },
  ]);
  newArray.splice(2, 0, {
    title: "焊接件齐套开始时间",
    field: "hanjie_startDate",
    width: 140,
  });
  // newArray.splice(2, 0, {
  //   title: "焊接件齐套开始时间",
  //   field: "hanjie_startDate",
  //   width: 140,
  // });
  columns.value = [
    ...columns.value,
    ...newArray.filter(
      (item) => !columns.value.some((col) => col.field === item.field)
    ),
  ];
  // columns.value = columns.value
}
@@ -410,7 +433,7 @@
  listApsPlateProcessShopStatUpdate().then((response) => {
    // form.value = response.data;
    ElMessage({
      message: "数据更新成功",
      message: t("plan.message.update"),
      type: "success",
    });
    loading.value = false;