liding
2026-04-10 c05b81c7f50df80ab247a05f9f92af2d799e77cd
src/views/productionManagement/productionOrder/index.vue
@@ -1,3 +1,4 @@
<!-- 生产订单 -->
<template>
  <div class="app-container">
    <div class="search_form">
@@ -57,11 +58,13 @@
                @selection-change="handleSelectionChange"
                @pagination="pagination">
        <template #completionStatus="{ row }">
          <el-progress
            :percentage="toProgressPercentage(row?.completionStatus)"
            :color="progressColor(toProgressPercentage(row?.completionStatus))"
            :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''"
          />
          <div class="progress-link" @click="goProductionDetail(row)">
            <el-progress
              :percentage="toProgressPercentage(row?.completionStatus)"
              :color="progressColor(toProgressPercentage(row?.completionStatus))"
              :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''"
            />
          </div>
        </template>
      </PIMTable>
    </div>
@@ -114,11 +117,31 @@
  const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
  const { proxy } = getCurrentInstance();
  const { priority_type } = proxy.useDict("priority_type");
  const router = useRouter();
  const isShowNewModal = ref(false);
  const tableColumn = ref([
    {
      label: "优先级",
      prop: "priority",
      width: '100px',
      dataType: "tag",
      formatData: val => proxy.selectDictLabel(priority_type.value, val),
      formatType: val => {
        const v = Number(val);
        if (v === 0) return "danger";   // 红色
        if (v === 1) return "warning";  // 黄色
        if (v === 2) return "success";  // 绿色
        return "";
      },
    },
    {
      label: "生产批号",
      prop: "batchNo",
      width: '120px',
    },
    {
      label: "生产订单号",
      prop: "npsNo",
@@ -142,6 +165,11 @@
    {
      label: "规格",
      prop: "specificationModel",
      width: '120px',
    },
    {
      label: "料号",
      prop: "materialCode",
      width: '120px',
    },
    {
@@ -183,6 +211,11 @@
      width: 120,
    },
    {
      label: "备注",
      prop: "remark",
      width: 120,
    },
    {
      dataType: "action",
      label: "操作",
      align: "center",
@@ -192,6 +225,7 @@
        {
          name: "工艺路线",
          type: "text",
          showHide: row => row.processRouteCode,
          clickFun: row => {
            showRouteItemModal(row);
          },
@@ -375,6 +409,7 @@
          processRouteCode: data.processRouteCode || "",
          productName: data.productName || "",
          model: data.model || "",
          materialCode: data.materialCode || "",
          bomNo: data.bomNo || "",
          description: data.description || "",
          orderId,
@@ -395,8 +430,24 @@
        bomNo: row.bomNo || "",
        productName: row.productCategory || "",
        productModelName: row.specificationModel || "",
        materialCode: row.materialCode || "",
        orderId: row.id,
        type: "order",
      },
    });
  };
  const goProductionDetail = (row) => {
    if (!row) return;
    router.push({
      path: "/productionManagement/productionOrder/detail",
      query: {
        orderId: row.id,
        npsNo: row.npsNo || "",
        batchNo: row.batchNo || "",
        productCategory: row.productCategory || "",
        specificationModel: row.specificationModel || "",
        materialCode: row.materialCode || "",
      },
    });
  };
@@ -470,4 +521,8 @@
::v-deep .purple{
  background-color: #F4DEFA;
}
.progress-link {
  cursor: pointer;
}
</style>