From 286bc185ed873dcb4407c6fdcd03d65ad946ae1c Mon Sep 17 00:00:00 2001 From: bb_pan Date: Mon, 31 Mar 2025 10:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E7=89=8C=E5=8F=B7=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../claimAndreturn/picking/outbound/index.vue | 80 ++++++++++--------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue b/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue index 68c28f42..bce46414 100644 --- a/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue +++ b/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue @@ -363,10 +363,10 @@ ref="codeOutForm" size="small" :inline="true" - label-width="100px" + label-width="110px" > 待出库数量:{{ outNum }} - + - + { - let obj = { - id: this.outObj.id, - maId: item, - manageType: 0, - carCode: this.codeOutForm.carCode, - typeId: this.outObj.typeId, - parentId: this.outObj.parentId, - outNum: 1, - taskId: this.outObj.taskId, - createBy: sessionStorage.getItem('userId'), - companyId: this.outObj.companyId, - } - return obj - }) - // console.log(params) - submitOut(params).then((res) => { - this.$modal.msgSuccess('出库成功') - this.openCode = false - this.handleDialogQuery() - this.handleQuery() - }) - } else { - this.$modal.msgError('所选机具编码已超出出库数量!') - } + this.$refs.codeOutForm.validate((valid) => { + if (!valid) return + if (this.maCodeList.length <= this.outObj.outNum) { + let params = this.maCodeList.map((item) => { + let obj = { + id: this.outObj.id, + maId: item, + manageType: 0, + carCode: this.codeOutForm.carCode, + typeId: this.outObj.typeId, + parentId: this.outObj.parentId, + outNum: 1, + taskId: this.outObj.taskId, + createBy: sessionStorage.getItem('userId'), + companyId: this.outObj.companyId, + } + return obj + }) + // console.log(params) + submitOut(params).then((res) => { + this.$modal.msgSuccess('出库成功') + this.openCode = false + this.handleDialogQuery() + this.handleQuery() + }) + } else { + this.$modal.msgError('所选机具编码已超出出库数量!') + } + }) }, //数量出库保存 saveNumOut() { - this.outNumList[0].carCode = this.numOutForm.carCode - let param = this.outNumList - submitNumOut(param).then((res) => { - this.$modal.msgSuccess('出库成功') - this.openNum = false - this.handleDialogQuery() - this.handleQuery() + this.$refs.numOutForm.validate((valid) => { + if (!valid) return + this.outNumList[0].carCode = this.numOutForm.carCode + let param = this.outNumList + submitNumOut(param).then((res) => { + this.$modal.msgSuccess('出库成功') + this.openNum = false + this.handleDialogQuery() + this.handleQuery() + }) }) },