diff --git a/src/views/inventory/InvGoodsPlacement.vue b/src/views/inventory/InvGoodsPlacement.vue index fa546f3..007ed73 100644 --- a/src/views/inventory/InvGoodsPlacement.vue +++ b/src/views/inventory/InvGoodsPlacement.vue @@ -292,6 +292,7 @@ export default { invWarehouseCode: null, invSpaceCode: null, code: null, + codeArray: [] }, formRules: [], codeArray: [], @@ -376,7 +377,8 @@ export default { this.spaceCodeList = []; let params = { invStorageCode: this.filterQuery.invStorageCode, - invWarehouseCode: this.filterQuery.invWarehouseCode + invWarehouseCode: this.filterQuery.invWarehouseCode, + status: true }; getSpaceCodeList(params).then((res) => { this.spaceCodeList = res.data || []; @@ -393,8 +395,8 @@ export default { this.codeArray = []; }, saveData() { - if (isBlank(this.filterQuery.invStorageCode) || isBlank(this.filterQuery.invWarehouseCode) - || isBlank(this.filterQuery.invSpaceCode)) { + if (isBlank(this.formData.invStorageCode) || isBlank(this.formData.invWarehouseCode) + || isBlank(this.formData.invSpaceCode)) { this.$message.warning("请选择仓库和货位信息"); return; } @@ -402,10 +404,14 @@ export default { this.$message.warning("请扫描需要摆放的货物"); return; } - this.formData.codeArray = this.codeArray; + this.formData.codeArray = []; + this.codeArray.forEach(item => { + this.formData.codeArray.push(item.code); + }) bindInvSpace(this.formData).then((res) => { if (res.code === 20000) { this.$message.success("绑定成功"); + this.placeDialogVisible = false; this.getList(); } else { this.$message.error("绑定失败"); @@ -459,8 +465,6 @@ export default { this.formData.code = this.formData.code.trim(); if (this.$isBlank(this.formData.code)) return; - this.loading = true; - let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData))); this.checkCode(tQuery); this.$refs.inputRef.select(); @@ -488,16 +492,21 @@ export default { }, checkCode(tQuery) { //检验是否重复添加 - this.codeArray.forEach(code => { - if (code === this.formData.code) { + let flag = false; + this.codeArray.forEach(item => { + if (item.code === this.formData.code) { this.$message.error("重复条码!"); + flag = true; return; } }) + if (flag) { + return; + } //校验此条码是否已经被绑定到其他货位,如已被绑定,则提示,点击确定之后,重置此库存数据的仓库和分库数据 checkCodeSpace(tQuery).then((res) => { if (res.code === 20000) { - this.codeArray.push(this.formData.code); + this.codeArray.push({code: this.formData.code}); } else if (res.code === 8) { this.loading = false; this.$message.error(res.message); @@ -516,7 +525,7 @@ export default { }); }); } - }) + }); }, }, created() { diff --git a/src/views/inventory/addCountOrder.vue b/src/views/inventory/addCountOrder.vue index d7a94b9..1c327bd 100644 --- a/src/views/inventory/addCountOrder.vue +++ b/src/views/inventory/addCountOrder.vue @@ -254,9 +254,12 @@ @@ -277,6 +280,7 @@ { + this.multiProduct.forEach(product => { this.countProductList.push(product); }) if (this.codeArray.length === 0) { @@ -537,6 +542,7 @@ export default { getCountOrderDetailList(detailParam).then((result) => { this.codeArray = result.data.list || []; }); + this.getCountOrderCodesNum(); } else { this.$message.error(res.data.message); } @@ -549,6 +555,7 @@ export default { this.codeQuery = { orderIdFk: row.orderIdFk, productId: row.productId, + batchNo: row.batchNo, edit: true } }, @@ -623,7 +630,7 @@ export default { invWarehouseCode: this.formData.invWarehouseCode }; getCountInvProductProduct(params).then((res) => { - if (res.data.length !== 0) { + if (res.data.total !== 0) { let invProductList = res.data.list; for (let product of invProductList) { this.countProductList.push(product); @@ -642,7 +649,7 @@ export default { invSpaceCode: this.formData.invSpaceCode }; getCountInvProductProduct(params).then((res) => { - if (res.data.length !== 0) { + if (res.data.total !== 0) { let invProductList = res.data.list; for (let product of invProductList) { this.countProductList.push(product); @@ -655,10 +662,21 @@ export default { this.$message.warning("请先选盘点仓库"); return; } + this.multiProduct = []; this.selectInvProductVisible = true; this.queryInvProducts(); } }, + getRowKeys(row) { + return row.id; + }, + handleSelectionChange(selectedRows) { + this.multiProduct = []; + selectedRows.forEach(item => { + this.multiProduct.push(item); + }); + }, + }, components: { countOrderCodes diff --git a/src/views/inventory/countOrderCodes.vue b/src/views/inventory/countOrderCodes.vue index af76579..658f453 100644 --- a/src/views/inventory/countOrderCodes.vue +++ b/src/views/inventory/countOrderCodes.vue @@ -74,6 +74,7 @@ export default { query: { productId: null, orderIdFk: null, + batchNo: null, page: 1, limit: 20 }, @@ -118,6 +119,7 @@ export default { this.loading = true; this.query.productId = this.codeQuery.productId; this.query.orderIdFk = this.codeQuery.orderIdFk; + this.query.batchNo = this.codeQuery.batchNo; getCountCodesList(this.query).then((res) => { this.loading = false; if (res.code === 20000) { diff --git a/src/views/inventory/invCountOrderAudit.vue b/src/views/inventory/invCountOrderAudit.vue index 87996ef..3c89e88 100644 --- a/src/views/inventory/invCountOrderAudit.vue +++ b/src/views/inventory/invCountOrderAudit.vue @@ -3,6 +3,9 @@ + + + - - + + @@ -191,6 +193,7 @@ export default { data() { return { filterQuery: { + orderId: null, invWarehouseCode: null, invStorageCode: null, invSpaceCode: null, @@ -239,6 +242,7 @@ export default { path: "", }); this.filterQuery = { + orderId: null, customerId: null, invWarehouseCode: null, invStorageCode: null, @@ -396,9 +400,9 @@ export default { cancelButtonText: '驳回', type: 'warning', center: true, - closeOnPressEscape:false,//按下 ESC 键关闭弹窗 - closeOnClickModal:false,//点击遮罩关闭弹窗 - distinguishCancelAndClose:true,//区分取消与关闭 + closeOnPressEscape: false,//按下 ESC 键关闭弹窗 + closeOnClickModal: false,//点击遮罩关闭弹窗 + distinguishCancelAndClose: true,//区分取消与关闭 }).then(() => { params.status = 2; //审核通过 updateCountOrderStatus(params).then((res) => { @@ -407,7 +411,7 @@ export default { this.getList(); this.onRestDetail(); } else { - this.$message.error(res.data.message); + this.$message.error(res.message); } }).catch(() => { }); diff --git a/src/views/inventory/invCountOrderCompleted.vue b/src/views/inventory/invCountOrderCompleted.vue index 7d3db5e..69e46f4 100644 --- a/src/views/inventory/invCountOrderCompleted.vue +++ b/src/views/inventory/invCountOrderCompleted.vue @@ -3,6 +3,9 @@ + + + - + @@ -164,6 +167,7 @@ export default { data() { return { filterQuery: { + orderId: null, invWarehouseCode: null, invStorageCode: null, invSpaceCode: null, @@ -212,11 +216,12 @@ export default { path: "", }); this.filterQuery = { + orderId: null, customerId: null, invWarehouseCode: null, invStorageCode: null, invSpaceCode: null, - status: 1, + status: 2, page: 1, limit: 20, }; diff --git a/src/views/inventory/invCountOrderNew.vue b/src/views/inventory/invCountOrderNew.vue index 6f0d4d7..fb05318 100644 --- a/src/views/inventory/invCountOrderNew.vue +++ b/src/views/inventory/invCountOrderNew.vue @@ -3,6 +3,9 @@ + + +