diff --git a/src/views/inventory/addCountOrder.vue b/src/views/inventory/addCountOrder.vue index 929f2dc..4c7a7a3 100644 --- a/src/views/inventory/addCountOrder.vue +++ b/src/views/inventory/addCountOrder.vue @@ -156,8 +156,12 @@ - + + + +
盘点产品数量:{{ codeArray.length }} +
条码数量:{{ codesNum }} @@ -238,7 +242,7 @@ - 查询 @@ -355,6 +359,7 @@ export default { filterQuery: { invStorageCode: null, invWarehouseCode: null, + invSpaceCode: null, nameCode: null, cpmctymc: null, batchNo: null, @@ -365,9 +370,7 @@ export default { scanText: "扫码录入:", codesList: [], detailQuery: { - orderIdFk: null, - page: 1, - limit: 10 + orderIdFk: null }, detailTotal: 0, countProductList: [], @@ -442,6 +445,7 @@ export default { }, subStorageChange() { this.formData.invSpaceCode = null; + this.spaceList = []; //查询货位 this.getInvSpaceList(); }, @@ -458,13 +462,21 @@ export default { invSpaceChange() { this.$forceUpdate(); }, + queryInvProducts() { + this.filterQuery.page = 1; + this.getInvProducts(); + }, getInvProducts() { this.filterQuery.invStorageCode = this.formData.invStorageCode; this.filterQuery.invWarehouseCode = this.formData.invWarehouseCode; - filterProducts(this.filterQuery).then((res) => { + this.filterQuery.invSpaceCode = this.formData.invSpaceCode; + getCountInvProductProduct(this.filterQuery).then((res) => { if (res.code === 20000) { this.productList = res.data.list || []; this.total = res.data.total || 0; + } else { + this.productList = []; + this.total = 0; } }) }, @@ -601,7 +613,7 @@ export default { }; getCountInvProductProduct(params).then((res) => { if (res.data.length !== 0) { - let invProductList = res.data; + let invProductList = res.data.list; for (let product of invProductList) { this.countProductList.push(product); } @@ -618,10 +630,9 @@ export default { invWarehouseCode: this.formData.invWarehouseCode, invSpaceCode: this.formData.invSpaceCode }; - console.log(params) getCountInvProductProduct(params).then((res) => { if (res.data.length !== 0) { - let invProductList = res.data; + let invProductList = res.data.list; for (let product of invProductList) { this.countProductList.push(product); } @@ -634,6 +645,7 @@ export default { return; } this.selectInvProductVisible = true; + this.queryInvProducts(); } }, }, diff --git a/src/views/inventory/invCountOrderAudit.vue b/src/views/inventory/invCountOrderAudit.vue index cc9f0da..87996ef 100644 --- a/src/views/inventory/invCountOrderAudit.vue +++ b/src/views/inventory/invCountOrderAudit.vue @@ -222,7 +222,8 @@ export default { }, countStatusMap: { 0: '亏损', - 1: '盈利' + 1: '盈利', + 2: "平衡" }, codeQuery: { orderIdFk: null, @@ -394,7 +395,10 @@ export default { confirmButtonText: '通过', cancelButtonText: '驳回', type: 'warning', - center: true + center: true, + closeOnPressEscape:false,//按下 ESC 键关闭弹窗 + closeOnClickModal:false,//点击遮罩关闭弹窗 + distinguishCancelAndClose:true,//区分取消与关闭 }).then(() => { params.status = 2; //审核通过 updateCountOrderStatus(params).then((res) => { @@ -407,21 +411,26 @@ export default { } }).catch(() => { }); - }).catch(() => { - params.status = 0; //驳回到上一个状态 - updateCountOrderStatus(params).then((res) => { - if (res.code === 20000) { - this.$message.success("审核通过"); - this.$message.success("已驳回"); - this.getList(); - this.onRestDetail(); - } else { - this.$message.error(res.data.message); - } - }).catch(() => { - }); + }).catch((action) => { + if (action === 'cancel') { + //驳回 + params.status = 0; //驳回到上一个状态 + updateCountOrderStatus(params).then((res) => { + if (res.code === 20000) { + this.$message.success("审核通过"); + this.$message.success("已驳回"); + this.getList(); + this.onRestDetail(); + } else { + this.$message.error(res.message); + } + }).catch(() => { + }); + } else { + //关闭弹窗 + return; + } }); - }, }, components: { diff --git a/src/views/inventory/invCountOrderCompleted.vue b/src/views/inventory/invCountOrderCompleted.vue index ac83fb1..7d3db5e 100644 --- a/src/views/inventory/invCountOrderCompleted.vue +++ b/src/views/inventory/invCountOrderCompleted.vue @@ -195,7 +195,8 @@ export default { }, countStatusMap: { 0: '亏损', - 1: '盈利' + 1: '盈利', + 2: "平衡" }, codeQuery: { orderIdFk: null, diff --git a/src/views/inventory/invCountOrderNew.vue b/src/views/inventory/invCountOrderNew.vue index 2a790ce..0099d5e 100644 --- a/src/views/inventory/invCountOrderNew.vue +++ b/src/views/inventory/invCountOrderNew.vue @@ -18,6 +18,7 @@ { + this.spaceCodeList = res.data || []; + }); + }, submitAudit(row) { let params = {id: row.id}; submitAudit(params).then((res) => {