liyong
2026-05-14 210cc5e18506e265951c73052b2756940bd71f47
生产计划新增调整
已修改1个文件
90 ■■■■ 文件已修改
src/views/productionPlan/productionPlan/index.vue 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionPlan/productionPlan/index.vue
@@ -303,46 +303,49 @@
    {
      label: "主生产计划号",
      prop: "mpsNo",
      width: "150px",
      minWidth: "150px",
      align: "center",
    },
    {
      label: "来源",
      prop: "source",
      width: "150px",
      dataType: "tag",
      formatType: params => {
        return params == "销售" ? "primary" : "info";
      },
      formatData: params => {
        return params == "销售" ? "销售" : "内部";
      },
    },
    // {
    //   label: "来源",
    //   prop: "source",
    //   width: "150px",
    //   dataType: "tag",
    //   formatType: params => {
    //     return params == "销售" ? "primary" : "info";
    //   },
    //   formatData: params => {
    //     return params == "销售" ? "销售" : "内部";
    //   },
    // },
    {
      label: "产品名称",
      prop: "productName",
      width: "200px",
      minWidth: "200px",
      dataType: "tag",
      formatType: params => {
        return "primary";
      },
      align: "center",
    },
    {
      label: "产品规格",
      prop: "model",
      width: "150px",
      minWidth: "150px",
      className: "spec-cell",
      align: "center",
    },
    {
      label: "单位",
      prop: "unit",
      width: "100px",
      align: "center",
    },
    {
      label: "所需数量",
      prop: "qtyRequired",
      width: "150px",
      align: "right",
      minWidth: "150px",
      align: "center",
      dataType: "slot",
      slot: "qtyRequired",
      className: "volume-cell",
@@ -369,49 +372,54 @@
        };
        return statusMap[cell] || "";
      },
      align: "center",
    },
    {
      label: "已下发数量",
      prop: "quantityIssued",
      width: "120px",
      minWidth: "120px",
      className: "spec-cell",
      align: "center",
      // formatData: (cell, row) => (cell ? `${cell}${row.unit || "方"}` : 0),
    },
    {
      label: "需求日期",
      prop: "requiredDate",
      width: "160px",
      minWidth: "160px",
      className: "date-cell",
      formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : ""),
      align: "center",
    },
    {
      label: "承诺日期",
      prop: "promisedDeliveryDate",
      width: "160px",
      minWidth: "160px",
      className: "date-cell",
      formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : ""),
      align: "center",
    },
    {
      label: "销售合同号",
      prop: "salesContractNo",
      width: "200px",
      dataType: "slot",
      slot: "salesContractNo",
    },
    {
      label: "客户名称",
      prop: "customerName",
      width: "150px",
    },
    {
      label: "项目名称",
      prop: "projectName",
      width: "150px",
    },
    // {
    //   label: "销售合同号",
    //   prop: "salesContractNo",
    //   width: "200px",
    //   dataType: "slot",
    //   slot: "salesContractNo",
    // },
    // {
    //   label: "客户名称",
    //   prop: "customerName",
    //   width: "150px",
    // },
    // {
    //   label: "项目名称",
    //   prop: "projectName",
    //   width: "150px",
    // },
    {
      label: "备注",
      width: "150px",
      minWidth: "150px",
      prop: "remark",
      align: "center",
    },
    {
      dataType: "action",
@@ -441,13 +449,13 @@
            mergeForm.productName = row.productName || "";
            mergeForm.model = row.model || "";
            mergeForm.totalAssignedQuantity =
              Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
                Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
            mergeForm.planCompleteTime = row.requiredDate || "";
            mergeForm.productId = row.productId || "";
            mergeForm.ids = [row.id];
            mergeForm.workshopId = row.workshopId ?? undefined;
            sumAssignedQuantity.value =
              Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
                Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
            isShowNewModal.value = true;
          },
        },