zhangwencui
2026-06-08 0f8771cce3b42c6857f738256cec3e0728f88353
入库审批增加含水量
已修改3个文件
49 ■■■■■ 文件已修改
src/api/procurementManagement/procurementLedger.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/Record.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/procurementManagement/procurementLedger.js
@@ -132,3 +132,11 @@
    data: query,
  });
}
export function manualStockIn(data) {
  return request({
    url: "/purchase/ledger/manualStockIn",
    method: "post",
    data,
  });
}
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -129,9 +129,17 @@
        <el-table-column label="单位"
                         prop="unit"
                         show-overflow-tooltip />
        <el-table-column label="入库数量"
        <el-table-column label="实际入库数量"
                         prop="stockInNum"
                         width="120"
                         show-overflow-tooltip />
        <el-table-column label="含水差额"
                         prop="differenceNum"
                         show-overflow-tooltip>
          <template #default="scope">
            {{ scope.row.isContainsWater?scope.row.differenceNum || "--": "--" }}
          </template>
        </el-table-column>
        <el-table-column label="入库人"
                         prop="createBy"
                         show-overflow-tooltip />
@@ -510,8 +518,8 @@
      approvalStatus: approveForm.approvalStatus,
      items: approveForm.items.map(item => ({
        id: item.id,
        ...(approveForm.approvalStatus === 1 && { stockInNum: item.stockInNum })
      }))
        ...(approveForm.approvalStatus === 1 && { stockInNum: item.stockInNum }),
      })),
    };
    approveLoading.value = true;
src/views/procurementManagement/procurementLedger/index.vue
@@ -218,8 +218,8 @@
            </el-button>
            <el-button link
                       type="primary"
                       @click="handleStockIn(scope.row)"
                       :disabled="scope.row.approvalStatus !== 3 || scope.row.stockInStatus === '完全入库'">入库
                       :disabled="scope.row.approvalStatus !== 3 || scope.row.stockInStatus === '完全入库'"
                       @click="handleStockIn(scope.row)">入库
            </el-button>
            <el-button link
                       type="primary"
@@ -810,8 +810,8 @@
    getPurchaseTemplateList,
    delPurchaseTemplate,
    batchGeneratePurchaseInboundSteps,
    manualStockIn,
  } from "@/api/procurementManagement/procurementLedger.js";
  import { addSutockIn } from "@/api/inventoryManagement/stockIn.js";
  import useFormData from "@/hooks/useFormData.js";
  const FileList = defineAsyncComponent(() =>
    import("@/components/Dialog/FileList.vue")
@@ -845,12 +845,9 @@
  });
  const total = ref(0);
  const fileList = ref([]);
  import useUserStore from "@/store/modules/user";
  import { modelList, productTreeList } from "@/api/basicData/product.js";
  import dayjs from "dayjs";
  import FileUpload from "@/components/AttachmentUpload/file/index.vue";
  const userStore = useUserStore();
  // 订单审批状态显示文本
  const approvalStatusText = {
@@ -1407,18 +1404,16 @@
      stockInLoading.value = true;
      const params = {
        purchaseLedgerId: stockInForm.purchaseLedgerId,
        purchaseContractNumber: stockInForm.purchaseContractNumber,
        nickName: userStore.nickName,
        details: stockInForm.details.map(item => ({
          id: item.id,
          inboundQuantity: item.inboundQuantity,
          isContainsWater: item.isContainsWater,
          waterContent: item.isContainsWater ? item.waterContent : 0,
          actualInboundQuantity: item.actualInboundQuantity,
          inboundQuantity: Number(item.inboundQuantity),
          isContainsWater: !!item.isContainsWater,
          waterContent: item.isContainsWater ? Number(item.waterContent || 0) : 0,
          actualInboundQuantity: Number(item.actualInboundQuantity),
        })),
      };
      const res = await addSutockIn(params);
      const res = await manualStockIn(params);
      if (res.code === 200) {
        proxy.$modal.msgSuccess("入库成功");
        stockInDialogVisible.value = false;
@@ -1927,8 +1922,8 @@
      proxy.$modal.msgWarning("请选择数据");
      return;
    }
    const ids = selectedRows.value.map((item) => item.id);
    const ids = selectedRows.value.map(item => item.id);
    ElMessageBox.confirm("确认批量生成数据?", "批量生成", {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
@@ -1937,7 +1932,7 @@
      .then(() => {
        proxy.$modal.loading("正在批量生成数据,请稍候...");
        batchGeneratePurchaseInboundSteps({ ids })
          .then((res) => {
          .then(res => {
            proxy.$modal.msgSuccess("批量生成成功");
            getList();
          })