From 52ce5c72e53c606a93dfa13273609b6bfe299071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Wed, 10 Jul 2024 17:12:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=93=81=E5=BA=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=A7=BB=E5=BA=93=EF=BC=8C=E6=AF=9B=E5=9D=AF=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=93=8D=E4=BD=9C=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wmsManagement/wmGoodsNowProduction.js | 13 ++++ src/views/wmsManagement/WmBlankInventory.vue | 2 +- .../wmsManagement/WmGoodsNowProduction.vue | 73 +++++++++++++++++- .../TheWmBlankInventoryRenew.vue | 7 +- .../TheWmBlankRecord/TheWmBlankRecord.vue | 76 +++++++++++++------ 5 files changed, 140 insertions(+), 31 deletions(-) diff --git a/src/api/wmsManagement/wmGoodsNowProduction.js b/src/api/wmsManagement/wmGoodsNowProduction.js index 92b8dd0..162e567 100644 --- a/src/api/wmsManagement/wmGoodsNowProduction.js +++ b/src/api/wmsManagement/wmGoodsNowProduction.js @@ -94,3 +94,16 @@ export function dictWmGoodsNowProduction(query) { params: query, }) } + + +/** +* 批量修改成品库仓库编码 +* @param data +*/ +export function BatchUpdateGoodsNowProductionLocationCode(data) { + return request({ + url: '/mes/wm/WmGoodsNowProduction/batchUpdateGoodsNowProductionLocationCode', + method: 'post', + data: data, + }) +} diff --git a/src/views/wmsManagement/WmBlankInventory.vue b/src/views/wmsManagement/WmBlankInventory.vue index da51c64..b4b87ca 100644 --- a/src/views/wmsManagement/WmBlankInventory.vue +++ b/src/views/wmsManagement/WmBlankInventory.vue @@ -380,7 +380,7 @@ this.loading = false; }) }, - // 毛坯数据详情 + // 毛坯数据详情-库存记录 handleDetail(row) { console.log(row); this.detailData = row; diff --git a/src/views/wmsManagement/WmGoodsNowProduction.vue b/src/views/wmsManagement/WmGoodsNowProduction.vue index 2a29f1d..c7110f0 100644 --- a/src/views/wmsManagement/WmGoodsNowProduction.vue +++ b/src/views/wmsManagement/WmGoodsNowProduction.vue @@ -44,6 +44,12 @@ 删除 + + 移入呆滞品仓库 + + + 批量移库 + @@ -117,6 +123,23 @@ 确 定 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/wmsManagement/components/TheWmBlankInventoryRenew/TheWmBlankInventoryRenew.vue b/src/views/wmsManagement/components/TheWmBlankInventoryRenew/TheWmBlankInventoryRenew.vue index 5c99121..1d0c7c9 100644 --- a/src/views/wmsManagement/components/TheWmBlankInventoryRenew/TheWmBlankInventoryRenew.vue +++ b/src/views/wmsManagement/components/TheWmBlankInventoryRenew/TheWmBlankInventoryRenew.vue @@ -22,10 +22,13 @@ {{scope.row.type === 1? scope.row.changeQuantity : scope.row.changeQuantity * -1}} + diff --git a/src/views/wmsManagement/components/TheWmBlankRecord/TheWmBlankRecord.vue b/src/views/wmsManagement/components/TheWmBlankRecord/TheWmBlankRecord.vue index f818ac5..e9435b2 100644 --- a/src/views/wmsManagement/components/TheWmBlankRecord/TheWmBlankRecord.vue +++ b/src/views/wmsManagement/components/TheWmBlankRecord/TheWmBlankRecord.vue @@ -24,23 +24,26 @@ 库存变动 - + + @@ -59,7 +62,7 @@ 确定 - + @@ -77,15 +80,17 @@ 毛坯 返工件 - 增加库存 - 减少库存 + 入库 + 出库 + 盘点 - - + + + @@ -94,12 +99,22 @@ - - + + + + + + + + + + + + @@ -155,6 +170,7 @@ type: 0, actionType: 1, changeQuantity: 0, + actionTime: null, remark: "" }, addDialogRules: { @@ -173,8 +189,9 @@ }, rules: {}, typeOptions: [ - { dictLabel: '增加', dictValue: 1 }, - { dictLabel: '减少', dictValue: 2 }, + { dictLabel: '入库', dictValue: 1 }, + { dictLabel: '出库', dictValue: 2 }, + { dictLabel: '盘点', dictValue: 4 }, ], } }, @@ -193,14 +210,9 @@ this.formAdd.blankNum = this.ItemData.blankNum ?? ""; this.formAdd.type = this.ItemData.type; this.formAdd.changeQuantity = 0; + this.formAdd.actionTime = new Date(); this.formAdd.remark = ""; - // 库存值更新 - getWmBlankInventory(this.ItemData.id).then((res) => { - const { code, data } = res; - if (code == 200) { - this.formAdd.quantity = data.quantity; - } - }); + // this.updateQuantity(); }, // 查询数据 getList() { @@ -219,9 +231,22 @@ this.loading = false; }) }, + updateQuantity(){ + // 库存值更新 + getWmBlankInventory(this.ItemData.id).then((res) => { + const { code, data } = res; + if (code === 200) { + this.$nextTick(() => { + this.formAdd.quantity = data.quantity; + console.log(this.formAdd.quantity); + }) + } + }); + }, onOpen() { this.dataList = []; this.getList(); + this.updateQuantity(); }, onClose() { this.$refs['elForm'].resetFields() @@ -238,10 +263,11 @@ }, handleAdd(type = 0) { // if (type === 1) { - // this.addDialogTitle = "增加库存"; + // this.addDialogTitle = "入库库存"; // } else { - // this.addDialogTitle = "减少库存"; + // this.addDialogTitle = "出库库存"; // } + this.addDialogTitle = "修改库存"; this.formAdd.actionType = type; this.initData(); @@ -260,7 +286,7 @@ submitForm() { const data = this.formAdd; if (this.formAdd.actionType === 1) { - // 增加 + // 入库 addInventoryNum(data).then(res => { if (res.code === 200) { this.$message.success("手动添加记录成功!"); @@ -271,7 +297,7 @@ } }) } else { - // 减少 + // 出库 reduceInventoryNum(data).then(res => { if (res.code === 200) { if (res.data != 1) {