From 439dbe1e439945567ef4957689ef3cb7672b468e Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Thu, 26 Sep 2024 11:36:58 +0800 Subject: [PATCH] =?UTF-8?q?WMS=20bug=20=EF=BC=9AHL-6059=20=E7=89=A9?= =?UTF-8?q?=E6=96=99=E9=9A=94=E7=A6=BB=E7=94=B3=E8=AF=B7=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E4=BE=9B=E5=BA=94=E5=95=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=88=96=E8=80=85=E5=90=8D=E7=A7=B0=20=20PDA=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E4=BB=BB=E5=8A=A1=E5=B8=A6=E5=87=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/productionscrapRecordMain/index.ts | 7 ++++++- .../productionscrapRecordMain/index.vue | 20 +++++++++++++++++-- .../productionscrapRecordMain.data.ts | 10 ++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/api/wms/productionscrapRecordMain/index.ts b/src/api/wms/productionscrapRecordMain/index.ts index 8cde1c0b8..a464277b7 100644 --- a/src/api/wms/productionscrapRecordMain/index.ts +++ b/src/api/wms/productionscrapRecordMain/index.ts @@ -69,4 +69,9 @@ export const exportProductionscrapRecordMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionscrap-record-main/get-import-template' }) -} \ No newline at end of file +} + +// 撤销 +export const revoke = async (id: number) => { + return await request.get({ url: `/wms/productionscrap-record-main/revoke?id=` + id }) +} diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue index 292b807ff..ad0813ccb 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue @@ -135,17 +135,33 @@ const buttonBaseClick = (val, item) => { } } +const isShowRevokeButton = (row,val) => { + if (val.indexOf(row.revokeFlag) > -1) { + return false + } else { + return true + } +} + // 列表-操作按钮 const butttondata = (row,$index) => { const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 if(findIndex>-1&&findIndex<$index){ - return [] + return [ + defaultButtons.backoutBtn({hide:isShowRevokeButton(row,['FALSE'])}) // 撤销 + ] } - return [] + return [ + defaultButtons.backoutBtn({hide:isShowRevokeButton(row,['FALSE'])}) // 撤销 + ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { + if (val == 'backout') { // 撤销 + await ProductionscrapRecordMainApi.revoke(row.masterId) + buttonBaseClick('refresh',null) + } } // 获取部门 用于详情 部门回显 const { wsCache } = useCache() diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts index beee18e09..0c3355821 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts @@ -521,6 +521,16 @@ export const ProductionscrapRecordMain = useCrudSchemas( activeValue: 'TRUE' } } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 120, + fixed: 'right' + }, } ]) )