From 22d90fa4c13c56847615b08a5a20d30754ad3c2a Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 16 Aug 2024 08:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E6=A0=87=E5=BA=93=E4=BD=8D=E5=92=8C?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=83=BD=E4=B8=80=E8=87=B4=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventoryMove/coms/comMoveRecord.vue | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue index 89863e59..690ddbff 100644 --- a/src/pages/inventoryMove/coms/comMoveRecord.vue +++ b/src/pages/inventoryMove/coms/comMoveRecord.vue @@ -372,20 +372,7 @@ getPrecisionStrategyList(precisionStrategParams, res => { if (res.success) { this.managementList = res.list; - var params = this.setParams() - console.log("提交" + JSON.stringify(params)) - inventoryMoveRecordSubmit(params).then(res => { - uni.hideLoading() - if (res.data) { - this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" + - res.data) - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") - } - }).catch(error => { - uni.hideLoading() - this.showErrorMessage(error) - }) + this.submit() } else { uni.hideLoading(); this.showErrorMessage(res.message); @@ -398,6 +385,39 @@ } }, + + submit(){ + //目标库位和状态都一致时不可以提交 + var params = this.setParams() + let hint="" + this.dataContent.subList.forEach(res=>{ + if(res.fromLocationCode==res.toLocationCode&& + res.fromInventoryStatus&&res.toInventoryStatus){ + hint +=`包装号【${res.fromPackingNumber}】来源库位与目标库位 来源状态与目标状态一致,不可以提交\n` + } + }) + if(hint){ + uni.hideLoading() + this.$refs.comMessage.showQuestionMessage1(hint, 'red', res => { + if (res) { + } + }); + return; + } + console.log("提交" + JSON.stringify(params)) + inventoryMoveRecordSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" + + res.data) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) + }, setPrecisionStrategParams() { var itemList = []