yuan
2026-09-13 4d9ce4d87bcae1f27cffe03befaeb50eea69dde1
src/views/productionManagement/workOrderManagement/index.vue
@@ -336,16 +336,16 @@
      slot: "completionStatus",
      width: "140",
    },
    {
      label: "计划开始时间",
      prop: "planStartTime",
      width: "140",
    },
    {
      label: "计划结束时间",
      prop: "planEndTime",
      width: "140",
    },
    // {
    //   label: "计划开始时间",
    //   prop: "planStartTime",
    //   width: "140",
    // },
    // {
    //   label: "计划结束时间",
    //   prop: "planEndTime",
    //   width: "140",
    // },
    {
      label: "实际开始时间",
      prop: "actualStartTime",
@@ -533,6 +533,12 @@
    },
  });
  const { searchForm } = toRefs(data);
  // 数量运算保留6位小数,避免浮点减法出现 7.199999999999999 这类精度误差
  const toQuantity = val => {
    const n = Number(val);
    if (!Number.isFinite(n)) return 0;
    return parseFloat(n.toFixed(6));
  };
  const toProgressPercentage = val => {
    const n = Number(val);
    if (!Number.isFinite(n)) return 0;
@@ -664,7 +670,10 @@
    currentReportRowData.value = row;
    const planQuantity = Number(row.planQuantity || 0);
    const completeQuantity = Number(row.completeQuantity || 0);
    const remainingQuantity = Math.max(0, planQuantity - completeQuantity);
    const remainingQuantity = Math.max(
      0,
      toQuantity(planQuantity - completeQuantity)
    );
    reportForm.planQuantity = remainingQuantity;
    reportForm.quantity =
      row.quantity !== undefined && row.quantity !== null ? row.quantity : null;