diff --git a/src/views/inventory/InvSpaceManage.vue b/src/views/inventory/InvSpaceManage.vue index 9baf232..c7c3e03 100644 --- a/src/views/inventory/InvSpaceManage.vue +++ b/src/views/inventory/InvSpaceManage.vue @@ -56,6 +56,7 @@ - + 货位编码: - + - + 货位名称: - + @@ -95,20 +96,20 @@ - + 货位分类: - + - + 启用状态: - + 禁用 启用 @@ -117,10 +118,10 @@ - + 备注: - + @@ -133,7 +134,7 @@ >提交 - 取消 @@ -175,7 +176,6 @@ export default { loading: true, index: null, dialogTableVisible: false, - invWarehouseDisabled: true, statusMap: { 0: "禁用", 1: "启用" @@ -220,7 +220,6 @@ export default { page: 1, limit: 20, }; - this.invChange(); this.getList(); }, onSubmit() { @@ -259,13 +258,17 @@ export default { this.$message.success("删除成功!"); this.getList(); } else { - this.$message.error(res.data); + this.$message.error(res.message); } }) }) .catch(() => { }); }, + cancelDialog() { + this.modifySpaceVisible = false + this.getList(); + }, getStorage() { this.storageList = []; filterUplLocInv() @@ -275,24 +278,6 @@ export default { .catch(() => { }); }, - invChange() { - this.filterQuery.invWarehouseCode = ""; - this.subInvList = []; - if (this.filterQuery.invStorageCode != null && this.filterQuery.invStorageCode != "") { - this.invWarehouseDisabled = false; - let query = { - pcode: this.filterQuery.invStorageCode - }; - filterSubByInv(query) - .then((response) => { - this.subInvList = response.data || []; - }) - .catch(() => { - }); - } else { - this.invWarehouseDisabled = true; - } - }, resetForm() { if (this.$refs["formData"]) { // 清空验证信息表单 @@ -334,7 +319,7 @@ export default { this.getList(); this.modifySpaceVisible = false; } else { - this.$message.error(res.data.message); + this.$message.error(res.message); } }) } diff --git a/src/views/inventory/addCountOrder.vue b/src/views/inventory/addCountOrder.vue index 93e7cda..399d9d0 100644 --- a/src/views/inventory/addCountOrder.vue +++ b/src/views/inventory/addCountOrder.vue @@ -320,15 +320,19 @@ export default { props: { closeDialog: { type: Function, - required: true, + required: true }, countOrder: { type: Object, - required: true, + required: true }, countType: { type: Number, required: true + }, + getCountOrderList: { + type: Function, + required: true } }, data() { @@ -396,20 +400,22 @@ export default { this.$message.success("保存成功"); if (type != null) { //保存当前单据详情 - let product = this.countProductList[0]; - let detailData = { - orderIdFk: this.formData.orderId, - productId: product.relIdFk, - nameCode: product.nameCode, - batchNo: product.batchNo, - produceDate: product.productionDate, - expireDate: product.expireDate - }; - addCountOrderDetail(detailData).then((result) => { - if (result.code === 20000) { - this.getCountOrderDetail(); - } - }); + this.countProductList.forEach(product => { + let detailData = { + orderIdFk: this.formData.orderId, + productId: product.relIdFk, + nameCode: product.nameCode, + batchNo: product.batchNo, + produceDate: product.productionDate, + expireDate: product.expireDate + }; + addCountOrderDetail(detailData).then((result) => { + if (result.code === 20000) { + this.getCountOrderDetail(); + this.getCountOrderList(); + } + }); + }) } else { this.closeDialog(); } diff --git a/src/views/inventory/invCountOrderNew.vue b/src/views/inventory/invCountOrderNew.vue index 44fec67..2a790ce 100644 --- a/src/views/inventory/invCountOrderNew.vue +++ b/src/views/inventory/invCountOrderNew.vue @@ -124,7 +124,7 @@ > @@ -178,10 +179,7 @@ export default { addCountOrderVisible: false, countOrder: null, formName: null, - formMap: { - add: "新增盘点单", - edit: "编辑盘点单" - }, + formType: null, countType: null }; }, @@ -297,7 +295,14 @@ export default { this.addCountOrderVisible = true; this.countOrder = {}; this.countType = type; - this.formName = 'add'; + this.formType = 'add'; + if (this.countType === 0) { + this.formName = "新增整库盘点单"; + } else if (this.countType === 1) { + this.formName = "新增货位盘点单"; + } else if (this.countType === 2) { + this.formName = "新增部分盘点单"; + } }, closeAddDialog() { this.addCountOrderVisible = false; @@ -306,7 +311,14 @@ export default { editOrder(row) { this.addCountOrderVisible = true; this.countOrder = row; - this.formName = 'edit'; + this.formType = 'edit'; + if (this.countOrder.countType === 0) { + this.formName = "编辑整库盘点单"; + } else if (this.countOrder.countType === 1) { + this.formName = "编辑货位盘点单"; + } else if (this.countOrder.countType === 2) { + this.formName = "编辑部分盘点单"; + } }, }, components: {