From f4274d2fb31f179e2707e10e8358aa266d76b1a3 Mon Sep 17 00:00:00 2001 From: yangchunlong <292345300@qq.com> Date: Tue, 18 Nov 2025 16:38:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/foundation/set/goods/add.vue | 22 ++++++- .../receiptOrder/constant/add/button.ts | 9 ++- .../receiptOrder/constant/details/button.ts | 7 ++ .../receiptOrder/constant/list/button.ts | 4 +- .../warehousing/receiptOrder/index.vue | 66 ++++++++----------- .../warehousingOrder/constant/list/button.ts | 4 +- 6 files changed, 67 insertions(+), 45 deletions(-) create mode 100644 src/views/receipt/warehousing/receiptOrder/constant/details/button.ts diff --git a/src/views/foundation/set/goods/add.vue b/src/views/foundation/set/goods/add.vue index df50b3a..03b532d 100644 --- a/src/views/foundation/set/goods/add.vue +++ b/src/views/foundation/set/goods/add.vue @@ -39,6 +39,7 @@ const dataStore = reactive({ labelWidth: "120px", formData: cloneDeep(DETAILS_FORM_DATA), ruleForm: cloneDeep(DETAILS_RULE_FORM), + compareRuleForm: {}, id: null, title: "" }); @@ -68,6 +69,8 @@ const getGoodsUp = async () => { if (result?.code === 0) { useMsg("success", "更新成功 !"); $Bus.emit("setGoodsResetList"); + //更新成功以后调用详情接口是为了刷新对比数据防止对比数据不一致 + getGoodsDetails(); } }; //详情 @@ -80,6 +83,7 @@ const getGoodsDetails = async () => { const result = await getGoodsDetailsApi(dataStore.id); if (result?.code === 0) { dataStore.ruleForm = result?.data; + dataStore.compareRuleForm = cloneDeep(result?.data); } }; getGoodsDetails(); @@ -110,10 +114,26 @@ const handleButtonClickCallback = (item: any) => { dataStore.title === "新增仓位找货优先级" ? handleAdd() : getGoodsUp(); } if (type === "preview") { - if (!dataStore.id) { + if (!dataStore.id && dataStore.title === "新增仓位找货优先级") { useMsg("warning", "请先保存数据 !"); return; } + // 编辑的话需要判断用户是否有修改 + if (dataStore.title === "编辑仓位找货优先级") { + if (dataStore.compareRuleForm.use_org_number !== dataStore.ruleForm.use_org_number) { + useMsg("warning", "请先保存数据 !"); + return; + } + if (dataStore.compareRuleForm.warehouse_number !== dataStore.ruleForm.warehouse_number) { + useMsg("warning", "请先保存数据 !"); + return; + } + if (dataStore.compareRuleForm.pos_picking_priority !== dataStore.ruleForm.pos_picking_priority) { + useMsg("warning", "请先保存数据 !"); + return; + } + } + $router.push({ path: "/foundation/set/goods/preview", query: { id: dataStore.id, name: dataStore.title } diff --git a/src/views/receipt/warehousing/receiptOrder/constant/add/button.ts b/src/views/receipt/warehousing/receiptOrder/constant/add/button.ts index a2c4372..279f90a 100644 --- a/src/views/receipt/warehousing/receiptOrder/constant/add/button.ts +++ b/src/views/receipt/warehousing/receiptOrder/constant/add/button.ts @@ -1,8 +1,13 @@ export const BUTTON = [ + { + text: "返回", + permission: "receiptWarehousingReceiptOrderAddBtnBack", + type: "back" + }, { text: "提交", - permission: "receiptWarehousingReceiptOrderAddBtnCommit", - type: "commit", + permission: "receiptWarehousingReceiptOrderAddBtnSubmit", + type: "submit", props: { type: "primary" } diff --git a/src/views/receipt/warehousing/receiptOrder/constant/details/button.ts b/src/views/receipt/warehousing/receiptOrder/constant/details/button.ts new file mode 100644 index 0000000..758e553 --- /dev/null +++ b/src/views/receipt/warehousing/receiptOrder/constant/details/button.ts @@ -0,0 +1,7 @@ +export const BUTTON = [ + { + text: "返回", + permission: "receiptWarehousingReceiptOrderDetailsBtnBack", + type: "back" + } +]; diff --git a/src/views/receipt/warehousing/receiptOrder/constant/list/button.ts b/src/views/receipt/warehousing/receiptOrder/constant/list/button.ts index 28561ac..b99b0b1 100644 --- a/src/views/receipt/warehousing/receiptOrder/constant/list/button.ts +++ b/src/views/receipt/warehousing/receiptOrder/constant/list/button.ts @@ -19,12 +19,12 @@ export const BUTTON = [ }, { text: "导出", - permission: "inspectionManagementReportBtnExport", + permission: "receiptWarehousingReceiptOrderBtnExport", type: "export" }, { text: "刷新", - permission: "inspectionManagementReportBtnRefresh", + permission: "receiptWarehousingReceiptOrderBtnRefresh", type: "refresh" } ]; diff --git a/src/views/receipt/warehousing/receiptOrder/index.vue b/src/views/receipt/warehousing/receiptOrder/index.vue index 838c9cf..fc7888f 100644 --- a/src/views/receipt/warehousing/receiptOrder/index.vue +++ b/src/views/receipt/warehousing/receiptOrder/index.vue @@ -9,14 +9,20 @@ +