gongchunyi
2 天以前 5b8460a455366ef69ecc93b35fa6426ec5795950
src/views/productionManagement/productionOrder/components/MaterialSupplementDialog.vue
@@ -20,23 +20,33 @@
                       prop="unit"
                       width="100" />
      <el-table-column label="需求数量"
                       prop="demandedQuantity"
                       width="100" />
                       min-width="100">
        <template #default="{ row }">
          {{ stripTrailingZeros(row.demandedQuantity) }}
        </template>
      </el-table-column>
      <el-table-column label="领用数量"
                       prop="pickQuantity"
                       width="100" />
                       min-width="100">
        <template #default="{ row }">
          {{ stripTrailingZeros(row.pickQuantity) }}
        </template>
      </el-table-column>
      <el-table-column label="已补数量"
                       prop="feedingQty"
                       width="100" />
                       min-width="100">
        <template #default="{ row }">
          {{ stripTrailingZeros(row.feedingQty) }}
        </template>
      </el-table-column>
      <el-table-column label="补料数量"
                       min-width="150">
        <template #default="{ row }">
          <el-input-number v-model="row.newSupplementQty"
                           :min="0"
                           :precision="3"
                           :step="1"
                           controls-position="right"
                           placeholder="输入补料数量"
                           :formatter="value => stripTrailingZeros(value)"
                           :parser="value => parseFloat(value) || 0"
                           style="width: 100%;" />
        </template>
      </el-table-column>
@@ -69,6 +79,14 @@
    updateMaterialPickingLedger,
  } from "@/api/productionManagement/productionOrder.js";
  const stripTrailingZeros = val => {
    const str = String(val ?? "");
    if (str.includes(".")) {
      return parseFloat(str).toString();
    }
    return str;
  };
  const props = defineProps({
    modelValue: { type: Boolean, default: false },
    orderRow: { type: Object, default: null },