From 26d0cf5280da60e22273b9580ad2788aacc569c2 Mon Sep 17 00:00:00 2001 From: Comair <1464848666@qq.com> Date: Mon, 26 Jun 2023 19:59:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B7=BB=E5=8A=A0=E8=B4=A7?= =?UTF-8?q?=E4=BD=8D=E7=AE=A1=E7=90=86=E4=B8=AD=E5=88=A0=E6=96=99=E6=98=AF?= =?UTF-8?q?=E7=9A=84=E7=A1=AE=E8=AE=A4=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wcs/location.js | 8 +++ src/views/wcs/configuration/index.vue | 30 ++++----- src/views/wcs/location/index.vue | 91 +++++++++++++++++++++------ 3 files changed, 94 insertions(+), 35 deletions(-) diff --git a/src/api/wcs/location.js b/src/api/wcs/location.js index 8d1cd9b..4f115b7 100644 --- a/src/api/wcs/location.js +++ b/src/api/wcs/location.js @@ -16,6 +16,14 @@ export function getLocation(id) { method: 'get' }) } +// 查询货位信息详细lo +export function handleDelOrAddBox(params) { + return request({ + url: '/wcs/location/handleDelOrAddBox', + params: params, + method: 'post' + }) +} // 新增货位信息 export function addLocation(data) { diff --git a/src/views/wcs/configuration/index.vue b/src/views/wcs/configuration/index.vue index c6f66d4..b075383 100644 --- a/src/views/wcs/configuration/index.vue +++ b/src/views/wcs/configuration/index.vue @@ -131,19 +131,19 @@ export default { } }, }, - { - label: "通信状态", - prop: "communicationStatus", - istrue: true, - filter(row, value) { - if(row.communicationStatus === "0"){ - return "未连接"; - }else if(row.communicationStatus === "1"){ - return "已连接"; - } - }, - - }, + // { + // label: "通信状态", + // prop: "communicationStatus", + // istrue: true, + // filter(row, value) { + // if(row.communicationStatus === "0"){ + // return "未连接"; + // }else if(row.communicationStatus === "1"){ + // return "已连接"; + // } + // }, + // + // }, { label: "创建时间", prop: "createTime", @@ -176,7 +176,7 @@ export default { name: "切离", event: "handleCutOff", hidden(value) { - if (value.equipmentStatus === '2') { + if (value.equipmentStatus === '2' && value.equipmentName != 'WCS') { return false; } else { return true; @@ -186,7 +186,7 @@ export default { name: "恢复", event: "handleCutIn", hidden(value) { - if (value.equipmentStatus === '1') { + if (value.equipmentStatus === '1' && value.equipmentName != 'WCS') { return false; } else { return true; diff --git a/src/views/wcs/location/index.vue b/src/views/wcs/location/index.vue index d71baf9..7376b70 100644 --- a/src/views/wcs/location/index.vue +++ b/src/views/wcs/location/index.vue @@ -166,13 +166,21 @@ v-hasPermi="['wcs:location:edit']" >修改 - 删除 + >删料 + + 建料 @@ -253,7 +261,7 @@ v-for="dict in dict.type.location_status" :key="dict.value" :label="dict.label" - :value="dict.value" + :value="Number(dict.value)" /> @@ -271,27 +279,36 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -299,6 +316,7 @@ import { listLocation, getLocation, + handleDelOrAddBox, delLocation, verifyLocation, addLocation, @@ -330,6 +348,7 @@ export default { title: '', // 是否显示弹出层 open: false, + addBoxType: false, // 查询参数 queryParams: { pageNum: 1, @@ -340,6 +359,8 @@ export default { locationType: null, locationStatus: null }, + addBoxId: null, + locationCode: '', // 表单参数 form: {}, // 表单校验 @@ -380,6 +401,10 @@ export default { this.open = false this.reset() }, + cancelAddBox() { + this.addBoxType = false + this.addBoxId = null; + }, // 表单重置 reset() { this.form = { @@ -431,6 +456,32 @@ export default { this.title = '修改货位信息' }) }, + /** 删料或者按钮操作 */ + handleDelBox(row) { + + this.$modal.confirm('是否确认删除boxID" ' + row.boxId + ' "吗?').then(function() { + return handleDelOrAddBox({locationCode: "",boxId: row.boxId}); + }).then(() => { + this.getList() + this.$modal.msgSuccess('删除成功') + }).catch(() => {}) + }, + // 建料 + handleAddBox(row) { + this.locationCode = row.locationCode; + this.addBoxType = true; + }, + submitAddBox() { + if(this.addBoxId.trim() === null || this.addBoxId.trim() === ""){ + this.$modal.msgError('boxID不能为空'); + } + handleDelOrAddBox({locationCode: this.locationCode,boxId: this.addBoxId}).then(response => { + this.locationCode = null; + this.addBoxId = null; + this.addBoxType = false; + this.getList(); + }) + }, /** 提交按钮 */ submitForm() { this.$refs['form'].validate(valid => {