gaoluyang
7 天以前 a0111e18d44d0c78e5479f6dfba7b80c29fd0ebf
src/views/productionManagement/productionOrder/index.vue
@@ -71,6 +71,20 @@
            :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''"
          />
        </template>
        <template #salesContractNo="{ row }">
          <template v-if="row.salesContractNos && row.salesContractNos.length > 0">
            <el-tag v-for="(no, idx) in row.salesContractNos" :key="idx" size="small" style="margin: 2px;">{{ no }}</el-tag>
          </template>
          <span v-else-if="row.salesContractNo">{{ row.salesContractNo }}</span>
          <span v-else>-</span>
        </template>
        <template #customerName="{ row }">
          <template v-if="row.customerNames && row.customerNames.length > 0">
            <el-tag v-for="(name, idx) in row.customerNames" :key="idx" size="small" style="margin: 2px;">{{ name }}</el-tag>
          </template>
          <span v-else-if="row.customerName">{{ row.customerName }}</span>
          <span v-else>-</span>
        </template>
      </PIMTable>
    </div>
    <el-dialog v-model="bindRouteDialogVisible"
@@ -148,11 +162,15 @@
      label: "销售合同号",
      prop: "salesContractNo",
      width: '150px',
      dataType: "slot",
      slot: "salesContractNo",
    },
    {
      label: "客户名称",
      prop: "customerName",
      width: '200px',
      dataType: "slot",
      slot: "customerName",
    },
    {
      label: "产品名称",
@@ -196,12 +214,12 @@
      formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
      width: 120,
    },
    {
      label: "交付日期",
      prop: "deliveryDate",
      formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
      width: 120,
    },
    // {
    //   label: "交付日期",
    //   prop: "deliveryDate",
    //   formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
    //   width: 120,
    // },
    {
      dataType: "action",
      label: "操作",
@@ -224,27 +242,27 @@
            openBindRouteDialog(row);
          },
        },
        {
          name: "产品结构",
          type: "text",
          clickFun: row => {
            showProductStructure(row);
          },
        },
        {
          name: "领料",
          type: "text",
          clickFun: row => {
            openMaterialDialog(row);
          },
        },
        {
          name: "领料详情",
          type: "text",
          clickFun: row => {
            openMaterialDetailDialog(row);
          },
        },
        // {
        //   name: "产品结构",
        //   type: "text",
        //   clickFun: row => {
        //     showProductStructure(row);
        //   },
        // },
        // {
        //   name: "领料",
        //   type: "text",
        //   clickFun: row => {
        //     openMaterialDialog(row);
        //   },
        // },
        // {
        //   name: "领料详情",
        //   type: "text",
        //   clickFun: row => {
        //     openMaterialDetailDialog(row);
        //   },
        // },
      ],
    },
  ]);
@@ -400,7 +418,12 @@
    productOrderListPage(params)
      .then(res => {
        tableLoading.value = false;
        tableData.value = res.data.records;
        const records = res.data.records || [];
        records.forEach(row => {
          row.salesContractNos = row.salesContractNo ? row.salesContractNo.split(',').filter(Boolean) : [];
          row.customerNames = row.customerName ? row.customerName.split(',').filter(Boolean) : [];
        });
        tableData.value = records;
        page.total = res.data.total;
      })
      .catch(() => {