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 @@ - +