From 1a8296608e3c69d088947a5c007891b277f46590 Mon Sep 17 00:00:00 2001 From: liangzhou <594755172@qq.com> Date: Sun, 5 Jan 2025 16:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0=EF=BC=9A?= =?UTF-8?q?=201.=20=E5=A2=9E=E5=8A=A0=E7=9B=98=E7=82=B9=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inventory.js | 31 ++++ src/layout/callEmptyVehicle.vue | 64 +------- src/layout/goods.vue | 2 +- src/layout/inventory.vue | 251 ++++++++++++++++++++------------ 4 files changed, 191 insertions(+), 157 deletions(-) create mode 100644 src/api/inventory.js diff --git a/src/api/inventory.js b/src/api/inventory.js new file mode 100644 index 0000000..1f67ad9 --- /dev/null +++ b/src/api/inventory.js @@ -0,0 +1,31 @@ +import request from "@/http/request"; + +const inventoryOut = (params) => { + return request({ + url: '/task/inventoryOut', + method: 'post', + data: params + }) +} + +const getCurrentGoodsInventory = (params) => { + return request({ + url: '/task/getCurrentGoodsInventory', + method: 'post', + data: params + }) +} + +const inventoryConfirmBack = (params) => { + return request({ + url: '/task/inventoryConfirmBack', + method: 'post', + data: params + }) +} + +export { + inventoryOut, + getCurrentGoodsInventory, + inventoryConfirmBack +} \ No newline at end of file diff --git a/src/layout/callEmptyVehicle.vue b/src/layout/callEmptyVehicle.vue index f4d05bb..ce8887c 100644 --- a/src/layout/callEmptyVehicle.vue +++ b/src/layout/callEmptyVehicle.vue @@ -121,16 +121,8 @@ export default { // vehicleType1Options: [], vehicleType2Options: [ { - value: 'CLC一箱一料', - label: 'CLC一箱一料' - }, - { - value: 'CLC一箱两料', - label: 'CLC一箱两料' - }, - { - value: 'No-CLC', - label: 'No-CLC' + value: '直接物料', + label: '直接物料' }, { value: '间接物料', @@ -151,60 +143,8 @@ export default { vehicleType2ChangeHandle() { if (this.workFormEntity.vehicleType2 == '间接物料') { this.displayGoods = true - // this.displayVehicleType1Selection = false - // this.vehicleType1Options = [ - // { - // value: 'FB02', - // label: '分包1/2个料箱' - // }, - // { - // value: 'FB03', - // label: '分包1/3个料箱' - // }, - // { - // value: 'FB04', - // label: '分包1/4个料箱' - // }, - // { - // value: 'FB05', - // label: '分包1/5个料箱' - // }, - // { - // value: 'FB06', - // label: '分包1/6个料箱' - // } - // ] - } else if (this.workFormEntity.vehicleType2 == 'CLC一箱一料') { - this.displayGoods = false - // this.displayVehicleType1Selection = false - // this.vehicleType1Options = [ - // { - // value: 'FC01', - // label: '822整体1个' - // } - // ] - } else if (this.workFormEntity.vehicleType2 == 'CLC一箱两料') { - this.displayGoods = false - // this.displayVehicleType1Selection = false - // this.vehicleType1Options = [ - // { - // value: 'LR01', - // label: '810左右4个' - // }, - // { - // value: 'UD01', - // label: '911上下2个' - // } - // ] } else { this.displayGoods = false - // this.displayVehicleType1Selection = false - // this.vehicleType1Options = [ - // { - // value: 'FB01', - // label: '分包1个料箱' - // }, - // ] } }, resetForms() { diff --git a/src/layout/goods.vue b/src/layout/goods.vue index 02bd289..620ac40 100644 --- a/src/layout/goods.vue +++ b/src/layout/goods.vue @@ -7,7 +7,7 @@ :suffix-icon="Search" /> 搜索 重置 - 一键设置间接物料相关信息 + {{ standId }} +
+ + 物料信息列表 + + + + + + + + + + + +
物料盘点 @@ -24,15 +40,10 @@ label-width="150px" style="max-width: 100%" :rules="rules" status-icon>
- -
+ style="display: inline-flex; justify-content: center; height: 40px; width: 430px; margin: 5px; padding: 5px; background-color: #00AAE8;"> - {{ workFormEntity.tip }} + 输入完料号请按回车确认。
@@ -42,7 +53,7 @@
+ v-on:keyup.enter="getCurrentInvInfo()" clearable>
@@ -50,18 +61,57 @@ 箱号
- + +
+
+ + +
+
+ 请求盘点 +
+
+ + +
+
+ + 盘点确认 + + +
+
+
+
+
+ 箱号 +
+
+
- 实物数量 + 料号 +
+
+ +
+
+
+
+ 盘点数量
- +
PC @@ -71,9 +121,9 @@
-
+
完成确认 + style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">确认盘点
@@ -86,11 +136,11 @@ @@ -100,124 +150,110 @@ export default { data() { return { standId: store.getters.getStandId, - timer: '', labelPosition: 'top', workFormRef: ref(), workFormEntity: reactive({ goodsId: '', - planPickNum: 0, - remainNumOrigin: null, - remainNumReal: null, - remark: '', - finishedRows: 0, - totalRows: 0, - finishedCounts: 0, - totalCounts: 0, - tip: '' + vehicleId: '' }), rules: reactive({ goodsId: [ { required: true, message: '请输入料号' } ] }), + inventoryGoodsDetails: [], + confirmFormRef: ref(), + confirmFormEntity: reactive({ + goodsId: '', + vehicleId: '', + confirmNum: null + }), } }, mounted() { this.$refs.goodsId.focus() - this.timer = setInterval(() => { - this.queryFinish() - }, 2000) }, beforeUnmount() { - clearInterval(this.timer) }, methods: { - // 获取当前工作信息 - getCurrentWorkInfo() { - const request = { - standId: this.standId, - goodsId: this.workFormEntity.goodsId - } - getWorkByStandAndGoods(request).then(res => { - const response = res.data - if (response.code == 0) { - this.workFormEntity.goodsId = response.returnData.goodsId - this.workFormEntity.planPickNum = response.returnData.planPickNum - this.workFormEntity.remainNumOrigin = response.returnData.remainNumOrigin - this.workFormEntity.remainNumReal = response.returnData.remainNumReal - this.workFormEntity.remark = response.returnData.remark - this.workFormEntity.finishedRows = response.returnData.finishedRows - this.workFormEntity.totalRows = response.returnData.totalRows - this.workFormEntity.finishedCounts = response.returnData.finishedCounts - this.workFormEntity.totalCounts = response.returnData.totalCounts - this.workFormEntity.tip = response.returnData.tip - } else { - this.resetForms() - errorBox(response.message) - } - }).catch(err => { - console.log(err) - this.resetForms() - errorBox('查询工作信息错误') - }) - }, - // 查询是否完成 - queryFinish() { + // 获取当前盘点信息 + getCurrentInvInfo() { if (this.workFormEntity.goodsId == '') { return } const request = { - standId: this.standId, - goodsId: this.workFormEntity.goodsId + goodsId: this.workFormEntity.goodsId, + userName: store.getters.getUserName } - queryFinishByStandAndGoods(request).then(res => { + getCurrentGoodsInventory(request).then(res => { const response = res.data if (response.code == 0) { - if (response.returnData != null) { - this.workFormEntity.tip = response.returnData.tip - } - this.resetForms() - ElMessage.success(response.message) + this.inventoryGoodsDetails = response.returnData + } else { + this.inventoryGoodsDetails = [] + errorBox(response.message) } }).catch(err => { console.log(err) + this.inventoryGoodsDetails = [] + errorBox('查询盘点信息错误。') }) }, // 重置参数 - resetForms() { + resetWorkForms() { this.workFormEntity = reactive({ goodsId: '', - planPickNum: 0, - remainNumOrigin: null, - remainNumReal: null, - remark: '', - finishedRows: 0, - totalRows: 0, - finishedCounts: 0, - totalCounts: 0, - tip: '' + vehicleId: '' }) this.$refs.goodsId.focus() }, + resetConfirmForms() { + this.confirmFormEntity = reactive({ + vehicleId: '', + goodsId: '', + confirmNum: null + }) + this.$refs.confirmGoodsId.focus() + }, + invenOut() { + if (this.workFormEntity.goodsId == '') { + errorBox('料号不可缺少') + return + } + const request = { + goodsId: this.workFormEntity.goodsId, + vehicleId: this.confirmFormEntity.vehicleId, + userName: store.getters.getUserName + } + inventoryOut(request).then(res => { + const response = res.data + if (response.code == 0) { + this.resetWorkForms() + ElMessage.success(response.message) + } else { + errorBox(response.message) + } + }).catch(err => { + console.log(err) + errorBox('下发盘点时发生异常。') + }) + }, // 确认完成工作 - confirmTask() { - if (this.standId == '' || this.workFormEntity.goodsId == '') { - errorBox('站台号和料号不可缺少') + invenConfirm() { + if (this.confirmFormEntity.goodsId == '' || this.confirmFormEntity.vehicleId == '' || this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum == '') { + errorBox('料号、箱号、确认数量不可缺少。') return } const confirmParams = { - standId: this.standId, - goodsId: this.workFormEntity.goodsId, - remainNumOrigin: this.workFormEntity.remainNumOrigin, - remainNumReal: this.workFormEntity.remainNumReal + goodsId: this.confirmFormEntity.goodsId, + vehicleId: this.confirmFormEntity.vehicleId, + confirmNum: this.confirmFormEntity.confirmNum, + userName: store.getters.getUserName } - confirmFinishWork(confirmParams).then(res => { + inventoryConfirmBack(confirmParams).then(res => { const response = res.data if (response.code == 0) { - if (response.returnData != null) { - this.workFormEntity.tip = response.returnData.tip - } - this.resetForms() + this.resetConfirmForms() ElMessage.success(response.message) } else { errorBox(response.message) @@ -226,7 +262,22 @@ export default { console.log(err) errorBox('确认时发生异常') }) - } + }, + changeFocus() { + this.confirmFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.confirmFormEntity.vehicleId) + if (this.confirmFormEntity.vehicleId == '' || this.confirmFormEntity.vehicleId == null || this.confirmFormEntity.vehicleId == undefined) { + this.$refs.confirmVehicleId.focus() + return + } + if (this.confirmFormEntity.goodsId == '' || this.confirmFormEntity.goodsId == null || this.confirmFormEntity.goodsId == undefined) { + this.$refs.confirmGoodsId.focus() + return + } + if (this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum == undefined || this.confirmFormEntity.confirmNum == '') { + this.$refs.confirmNum.focus() + return + } + }, } } @@ -276,7 +327,7 @@ export default { #309330 50%, #309330 100%) bottom right; background-size: 100% 50%; - height: 400px; + /* height: 400px; */ width: 250px; background-repeat: no-repeat; display: inline-flex; @@ -398,4 +449,16 @@ export default { font-weight: bold; font-size: 25px; } + +.goods-list-area { + margin: auto; + min-height: fit-content; + max-height: 90%; + margin-bottom: 10px; + min-width: inherit; + border: solid 1px; + border-radius: 10px; + box-shadow: 0px 15px 10px -15px #000; + overflow: auto; +} \ No newline at end of file