src/views/productionManagement/workOrder/index.vue
@@ -121,7 +121,7 @@
          </div>
          <div class="info-group">
            <div class="info-item">
              <span class="info-label">需求数量</span>
              <span class="info-label">预计生产数量</span>
              <span class="info-value">{{ transferCardRowData.planQuantity }}</span>
            </div>
            <div class="info-item">
@@ -206,6 +206,16 @@
                    placeholder="请输入报废数量"
                    @input="handleScrapQtyInput" />
        </el-form-item>
        <el-form-item label="检品数量"
                      prop="inspectedQuantity">
          <el-input v-model.number="reportForm.inspectedQuantity"
                    type="number"
                    min="0"
                    step="1"
                    style="width: 300px"
                    placeholder="请输入检品数量"
                    @input="handleInspectedQuantity"/>
        </el-form-item>
        <el-form-item label="班组信息">
          <el-select v-model="reportForm.userId"
                     style="width: 300px"
@@ -286,7 +296,7 @@
      prop: "totalInvestment",
    },
    {
      label: "需求数量",
      label: "预计生产数量",
      prop: "planQuantity",
      width: "140",
    },
@@ -375,6 +385,7 @@
    totalInvestment: 0,
    quantity: null,
    scrapQty: null,
    inspectedQuantity: null,
    userName: "",
    workOrderId: "",
    reportWork: "",
@@ -543,6 +554,26 @@
    }
    reportForm.scrapQty = num;
  };
  const handleInspectedQuantity = value => {
    if (value === "" || value === null || value === undefined) {
      reportForm.inspectedQuantity = null;
      return;
    }
    const num = Number(value);
    if (isNaN(num)) {
      return;
    }
    if (num < 0) {
      reportForm.inspectedQuantity = null;
      return;
    }
    if (!Number.isInteger(num)) {
      reportForm.inspectedQuantity = Math.floor(num);
      return;
    }
    reportForm.inspectedQuantity = num;
  };
  const currentReportRowData = ref(null);
  const page = reactive({
    current: 1,
@@ -690,6 +721,7 @@
    reportForm.workOrderId = row.id;
    reportForm.reportWork = row.reportWork;
    reportForm.productMainId = row.productMainId;
    reportForm.inspectedQuantity = row.inspectedQuantity;
    reportForm.scrapQty =
      row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : null;
    nextTick(() => {
@@ -763,12 +795,12 @@
        return;
      }
      if (quantity > reportForm.planQuantity) {
        ElMessageBox.alert("本次生产数量不能超过待生产数量", "提示", {
          confirmButtonText: "确定",
        });
        return;
      }
      // if (quantity > reportForm.planQuantity) {
      //   ElMessageBox.alert("本次生产数量不能超过待生产数量", "提示", {
      //     confirmButtonText: "确定",
      //   });
      //   return;
      // }
      const submitData = {
        ...reportForm,