From fecd4d4b9da09cabd07c68a521c01b960feedb2b Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 19 Feb 2024 16:49:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=B0=E5=BD=95=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/inspectRecordMain/index.ts | 7 +++++++ .../inspect/inspectRecordMain/index.vue | 19 ++++++++++++++++++- .../inspectRecordMain.data.ts | 18 ++++++++++-------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/api/wms/inspectRecordMain/index.ts b/src/api/wms/inspectRecordMain/index.ts index 6f3788867..2e8f09b9f 100644 --- a/src/api/wms/inspectRecordMain/index.ts +++ b/src/api/wms/inspectRecordMain/index.ts @@ -38,6 +38,7 @@ export interface InspectRecordMainVO { available: string sampleQty: number fromAreaTypes: string + putawayRequestFlag: boolean } // 查询检验记录主列表 @@ -85,3 +86,9 @@ export const exportInspectRecordMain = async (params) => { export const importTemplate = () => { return request.download({ url: '/wms/inspect-record-main/get-import-template' }) } + + +// 创建上架申请 +export const createPutAwayRequest = async (number:string) => { + return await request.post({ url: `/wms/inspect-record-main/createPutAwayRequest?number=`+number }) +} \ No newline at end of file diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue index 1c8b11411..facd5be89 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue @@ -131,14 +131,31 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:inspectRecordMain:putawayRequest'}), // 生成采购上架申请 + defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:inspectRecordMain:putawayRequest',hide:!row.putawayRequestFlag}), // 生成采购上架申请 ] } // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { + if (val == 'putawayRequest') { // 生成采购上架申请 + handlePutawayRequest(row.number) + } } + + /** 生成采购上架申请按钮操作 */ + const handlePutawayRequest = async (number:string) => { + try{ + await message.confirm(t('确认生成上架申请吗?')) + tableObject.loading = true + await InspectRecordMainApi.createPutAwayRequest(number) + message.success(t('上架申请生成成功')) + await getList() + }catch{}finally{ + tableObject.loading = false + } + } + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/inspectRecordMain.data.ts b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/inspectRecordMain.data.ts index 39fb07152..abe003386 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/inspectRecordMain.data.ts +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/inspectRecordMain.data.ts @@ -209,14 +209,6 @@ export const InspectRecordMain = useCrudSchemas(reactive([ width: 150 }, }, - // { - // label: '代码', - // field: 'code', - // sort: 'custom', - // table: { - // width: 150 - // }, - // }, { label: '订单号', field: 'poNumber', @@ -413,6 +405,16 @@ export const InspectRecordMain = useCrudSchemas(reactive([ activeValue: 'TRUE' } } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + }, } ]))