diff --git a/fe/PC/src/api/wms-api.js b/fe/PC/src/api/wms-api.js index 554c7df50..04273149e 100644 --- a/fe/PC/src/api/wms-api.js +++ b/fe/PC/src/api/wms-api.js @@ -800,6 +800,15 @@ export function postImportNoteBlob(data, url,isSpecial) { }) } +// 成品发运申请-删除 +export function deliverRequestDelete(id) { + return request({ + url: baseURL + 'wms/store/deliver-request/delete-by-id', + method: 'post', + params:{id:id} + }) +} + // 客户退拆任务-完成 todo // export async function productionRecycleJobComplete(id) { // return request({ diff --git a/fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest.vue b/fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest.vue index dfdd1bea2..859ae8e47 100644 --- a/fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest.vue +++ b/fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest.vue @@ -79,7 +79,8 @@ import { processRequest, getDetailed, getPageListWip, - deliverRequestHandleList + deliverRequestHandleList, + deliverRequestDelete } from "@/api/wms-api"; import { tableMixins } from "@/mixins/TableMixins" import { LoadingMixins } from "@/mixins/LoadingMixins" @@ -111,15 +112,9 @@ export default { } }, // 按钮显示 - hideButton: function () { - return function (val) { - let data = true - val.forEach(key => { - if (this.propsData.requestStatus == key) { - data = false - } - }) - return data + hideDelButton: function () { + return function () { + return this.propsData.deliverRequestType != 1 } }, }, @@ -170,6 +165,13 @@ export default { this.defaultFilterBtn(),//筛选 ], DrawerButtonData: [ + { + type: "danger", + label: "删除", + name: "delete", + size: "mini", + hide: () => { return this.hideDelButton() }, + }, // ...requestData(this) ], showFilterSta_normal:false,//查看普通发货 @@ -284,28 +286,48 @@ export default { }, drawerbuttonHandle(val){ // 审批 - if (val == 'agreeRequest') { - this.Loading.appMainLoading = true - processRequest(this.propsData.id, this.URL + '/agree/').then(res => { - getDetailed(this.propsData.id, this.URL).then(res => { - this.propsData = res - }) - this.paging() - this.$confirm('审批成功,是否需要打印发货单', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - // 打印发货单 - this.printHandle() - }).catch(() => { + // if (val == 'agreeRequest') { + // this.Loading.appMainLoading = true + // processRequest(this.propsData.id, this.URL + '/agree/').then(res => { + // getDetailed(this.propsData.id, this.URL).then(res => { + // this.propsData = res + // }) + // this.paging() + // this.$confirm('审批成功,是否需要打印发货单', '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + // type: 'warning' + // }).then(() => { + // // 打印发货单 + // this.printHandle() + // }).catch(() => { - }); - this.Loading.appMainLoading = false - }).catch(err => { - this.Loading.appMainLoading = false - }) - }else{ + // }); + // this.Loading.appMainLoading = false + // }).catch(err => { + // this.Loading.appMainLoading = false + // }) + // } + if(val == 'delete'){ + this.$confirm('您确定删除吗, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.Loading.appMainLoading = true; + deliverRequestDelete(this.propsData.id) + .then(res=>{ + this.$successMsg("删除成功!") + this.paging() + this.displayDialog.detailsDialog = false + }).catch(() => { + this.Loading.appMainLoading = true; + }); + }).catch(() => { + + }); + } + else{ this.drawerbutton(val) } }, diff --git a/fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue b/fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue index ccac76a8a..b79ec2026 100644 --- a/fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue +++ b/fe/PC/src/views/rawMaterialManage/purchaseOnShelves/PutawayNote.vue @@ -109,6 +109,7 @@ export default { this.tableDataDetails.details.forEach(item => { _ids.push(item.handledPackingCode) }); + this.Loading.appMainLoading = true; getInventoryLabelByCodes(_ids).then(async res => { let _printData = JSON.parse(JSON.stringify(this.tableDataDetails)) if(res && res.length > 0){