| | |
| | | </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" |
| | |
| | | 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") |
| | |
| | | }); |
| | | 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 = { |
| | |
| | | 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; |
| | |
| | | proxy.$modal.msgWarning("请选择数据"); |
| | | return; |
| | | } |
| | | const ids = selectedRows.value.map((item) => item.id); |
| | | |
| | | const ids = selectedRows.value.map(item => item.id); |
| | | |
| | | ElMessageBox.confirm("确认批量生成数据?", "批量生成", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | |
| | | .then(() => { |
| | | proxy.$modal.loading("正在批量生成数据,请稍候..."); |
| | | batchGeneratePurchaseInboundSteps({ ids }) |
| | | .then((res) => { |
| | | .then(res => { |
| | | proxy.$modal.msgSuccess("批量生成成功"); |
| | | getList(); |
| | | }) |