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' + }, } ]))