huminmin
4 天以前 52e11442179d464ff3b419954d1482bf7c81bb57
修改入库数量
已修改2个文件
38 ■■■■■ 文件已修改
src/views/inventoryManagement/receiptManagement/Record.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -129,6 +129,10 @@
        <el-table-column label="单位"
                         prop="unit"
                         show-overflow-tooltip />
        <el-table-column label="本次入库数量"
                         prop="theoryStockInNum"
                         width="120"
                         show-overflow-tooltip />
        <el-table-column label="实际入库数量"
                         prop="stockInNum"
                         width="120"
src/views/procurementManagement/procurementLedger/index.vue
@@ -786,7 +786,7 @@
                           prop="unit"
                           width="70" />
          <el-table-column label="待入库数量"
                           prop="availableQuality"
                           prop="pendingInboundQuantity"
                           width="100" />
          <el-table-column label="本次入库数量"
                           width="130">
@@ -794,7 +794,7 @@
              <el-input-number v-model="scope.row.inboundQuantity"
                               :step="0.01"
                               :min="0"
                               :max="scope.row.availableQuality"
                               :max="scope.row.pendingInboundQuantity"
                               @change="handleInboundChange(scope.row)"
                               controls-position="right"
                               style="width: 100%" />
@@ -877,6 +877,9 @@
    batchGeneratePurchaseInboundSteps,
    manualStockIn,
  } from "@/api/procurementManagement/procurementLedger.js";
  import { modelList, productTreeList } from "@/api/basicData/product.js";
  import dayjs from "dayjs";
  import FileUpload from "@/components/AttachmentUpload/file/index.vue";
  import useFormData from "@/hooks/useFormData.js";
  const FileList = defineAsyncComponent(() =>
    import("@/components/Dialog/FileList.vue")
@@ -910,9 +913,6 @@
  });
  const total = ref(0);
  const fileList = ref([]);
  import { modelList, productTreeList } from "@/api/basicData/product.js";
  import dayjs from "dayjs";
  import FileUpload from "@/components/AttachmentUpload/file/index.vue";
  // 订单审批状态显示文本
  const approvalStatusText = {
@@ -1416,16 +1416,22 @@
      proxy.$modal.loading("正在加载产品信息...");
      const res = await productList({ salesLedgerId: row.id, type: 2 });
      if (res.code === 200) {
        // 过滤掉已经完全入库的产品(如果有这个状态的话,或者直接显示所有可用数量大于0的产品)
        stockInForm.details = (res.data || [])
          .filter(item => (item.availableQuality || 0) > 0)
          .map(item => ({
        const productDetails = (res.data || []).map(item => {
          const pendingInboundQuantity = Number(item.pendingInboundQuantity || 0);
          return {
            ...item,
            inboundQuantity: item.availableQuality || 0, // 默认入库全部可用数量
            pendingInboundQuantity,
            inboundQuantity: pendingInboundQuantity, // 默认入库全部待入库数量
            isContainsWater: false,
            waterContent: 0,
            actualInboundQuantity: item.availableQuality || 0,
          }));
            actualInboundQuantity: pendingInboundQuantity,
          };
        });
        // 过滤掉已经完全入库的产品
        stockInForm.details = productDetails.filter(
          item => (item.pendingInboundQuantity || 0) > 0
        );
        if (stockInForm.details.length === 0) {
          proxy.$modal.msgWarning("该合同下没有可入库的产品记录");
@@ -1469,10 +1475,10 @@
    }
    const overLimit = stockInForm.details.some(
      item => item.inboundQuantity > item.availableQuality
      item => item.inboundQuantity > item.pendingInboundQuantity
    );
    if (overLimit) {
      proxy.$modal.msgWarning("入库数量不能超过可用数量");
      proxy.$modal.msgWarning("入库数量不能超过待入库数量");
      return;
    }