From a494d0545779419610ec462e53c65aeac0f164b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 15 Apr 2024 17:06:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/views/board/fifthFloor/index.vue | 92 +++++++++++++++++++++- 1 file changed, 89 insertions(+), 3 deletions(-) diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue index 34a26d17..2704068c 100644 --- a/hw-ui/src/views/board/fifthFloor/index.vue +++ b/hw-ui/src/views/board/fifthFloor/index.vue @@ -29,7 +29,7 @@ 扫描 - 退料 + 退料 领柜体 @@ -396,6 +396,44 @@ 取 消 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 退 库 + + + @@ -447,7 +485,7 @@ import { getWarehouses, bindBarcode, applyRawBack, - assignTask, scanMaterial2Confirm + assignTask, scanMaterial2Confirm, applyRawReturn } from "@/api/board"; const setState = (e) => { @@ -468,8 +506,12 @@ export default { Chart, PrintPage }, + dicts: ['wms_raw_return_task_type'], data() { return { + returnModelVisible: false, + returnModelForm:{}, + WarehousesList:[], input1:null, PrintData: {}, printModel: false, @@ -572,7 +614,12 @@ export default { warehouseId: [ {required: true, message: "仓库不能为空", trigger: "change"} ] - } + }, + returnModelFormRules: { + taskType: [ + { required: true, message: '请选择退库类型', trigger: 'change' } + ], + }, } }, async mounted() { @@ -1425,6 +1472,45 @@ export default { cancelMaterialConfirm(){ this.materialConfirmVisible = false; this.resetMaterialConfirm(); + }, + returnMaterial(e) { + this.returnModelVisible = true + this.returnModelForm = this.form + }, + setReturnModelForm(){ + getWarehouses({ + warehouseFloor:5, + materialBarcode:this.returnModelForm.materialBarcode + }).then(e=>{ + this.WarehousesList = e.data.map(v=>{ + return { + label:v.warehouseName, + value:v.warehouseId, + } + }) + }) + }, + returnModelConfirm(){ + this.$refs.returnModelForm.validate((valid) => { + if (valid) { + let data = {} + let keys = ['warehouseId','planCode','planDetailCode','productId','materialBarcode','planAmount','taskType','applyReason'] + keys.forEach(v=>{ + data[v] = this.returnModelForm[v] + }) + applyRawReturn(data).then(v=>{ + if(v.code === 200){ + this.$message({ + message: '退库成功', + type: 'success' + }); + } + this.returnModelVisible = false + }) + } else { + return false; + } + }); } }