From 750ab410ce4e8d8db367250fb01795ab19b393b3 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 7 Nov 2024 11:49:37 +0800 Subject: [PATCH] =?UTF-8?q?11/7=20=E6=91=86=E8=B4=A7=E5=B1=82=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basic/workPlace/SysWorkplaceLayer.js | 8 +++++++ .../workplace/addWorkplaceFreightDialog.vue | 24 ++++++++++++++++++- .../basic/workplace/cargowWorkplaceManage.vue | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/api/basic/workPlace/SysWorkplaceLayer.js b/src/api/basic/workPlace/SysWorkplaceLayer.js index aae01aa6..2da9230a 100644 --- a/src/api/basic/workPlace/SysWorkplaceLayer.js +++ b/src/api/basic/workPlace/SysWorkplaceLayer.js @@ -25,3 +25,11 @@ export function getLayerList(query) { params: query }); } + +export function deleteLayer(query) { + return axios({ + url: "/udiwms/WorkplaceLayer/deleteLayer", + method: "post", + data: query + }); +} diff --git a/src/views/basic/workplace/addWorkplaceFreightDialog.vue b/src/views/basic/workplace/addWorkplaceFreightDialog.vue index 455ee029..b0a206b9 100644 --- a/src/views/basic/workplace/addWorkplaceFreightDialog.vue +++ b/src/views/basic/workplace/addWorkplaceFreightDialog.vue @@ -133,7 +133,7 @@ import { createFreightCode, updateWorkplaceFreight } from '@/api/basic/workPlace/SysWorkplaceFreight' -import { getLayerCode, getLayerList, saveLayer } from '@/api/basic/workPlace/SysWorkplaceLayer' +import { deleteLayer, getLayerCode, getLayerList, saveLayer } from '@/api/basic/workPlace/SysWorkplaceLayer' import { isBlank } from '@/utils/strUtil' export default { @@ -321,6 +321,28 @@ export default { this.layerList = [] } }) + }, + handleDel(row){ + let query = { + code : row.code + } + this.$confirm('此操作将永久删除该摆货层及出货槽, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteLayer(query).then(res => { + if (res.code == 20000){ + this.getLayers() + this.$message.success("删除成功") + }else { + this.$message.error("删除失败") + } + }) + }).catch(() => { + + }) + } }, created() { diff --git a/src/views/basic/workplace/cargowWorkplaceManage.vue b/src/views/basic/workplace/cargowWorkplaceManage.vue index 97b5f89a..02245230 100644 --- a/src/views/basic/workplace/cargowWorkplaceManage.vue +++ b/src/views/basic/workplace/cargowWorkplaceManage.vue @@ -338,7 +338,7 @@ - +