diff --git a/src/api/wms/unplannedreceiptRequestMain/index.ts b/src/api/wms/unplannedreceiptRequestMain/index.ts index 5c2982d11..30b024382 100644 --- a/src/api/wms/unplannedreceiptRequestMain/index.ts +++ b/src/api/wms/unplannedreceiptRequestMain/index.ts @@ -62,9 +62,37 @@ export const exportUnplannedreceiptRequestMain = async (params) => { } } - - // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/unplannedreceipt-request-main/get-import-template' }) -} \ No newline at end of file +} + +// 关闭-计划外入库申请 +export const closeUnplannedreceiptRequestMain = async (id) => { + return await request.put({ url: `/wms/unplannedreceipt-request-main/close?id=` + id }) +} + +// 重新添加-计划外入库申请 +export const reAddUnplannedreceiptRequestMain = async (id) => { + return await request.put({ url: `/wms/unplannedreceipt-request-main/reAdd?id=` + id }) +} + +// 提交审批-计划外入库申请 +export const submitUnplannedreceiptRequestMain = async (id) => { + return await request.put({ url: `/wms/unplannedreceipt-request-main/submit?id=` + id }) +} + +// 审批驳回-计划外入库申请 +export const refusedUnplannedreceiptRequestMain = async (id) => { + return await request.put({ url: `/wms/unplannedreceipt-request-main/refused?id=` + id }) +} + +// 审批通过-计划外入库申请 +export const agreeUnplannedreceiptRequestMain = async (id) => { + return await request.put({ url: `/wms/unplannedreceipt-request-main/agree?id=` + id }) +} + +// 处理-计划外入库申请 +export const handleUnplannedreceiptRequestMain = async (id) => { + return await request.put({ url: `/wms/unplannedreceipt-request-main/handle?id=` + id }) +} diff --git a/src/components/ImportForm/src/ImportForm.vue b/src/components/ImportForm/src/ImportForm.vue index 0f90df135..15369c6ea 100644 --- a/src/components/ImportForm/src/ImportForm.vue +++ b/src/components/ImportForm/src/ImportForm.vue @@ -13,7 +13,9 @@ '&updatePart=' + updatePart + '&outFile=' + - outFile + outFile + + '&fromInventoryStatus=' + fromInventoryStatus + + '&toInventoryStatus=' + toInventoryStatus " :auto-upload="false" :disabled="formLoading" @@ -168,6 +170,18 @@ const props = defineProps({ type: Boolean, required: false, default: false + }, + // 库存修改 扩展额外属性 + fromInventoryStatus: { + type: String, + required: false, + default: '' + }, + // 库存修改 扩展额外属性 + toInventoryStatus: { + type: String, + required: false, + default: '' } }) const importTemplateData = ref(props.importTemplateData) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue index 5af25be42..d6ff45ff7 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue @@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 - defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 - defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 + // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 + // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 + // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // 执行 ] } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index f92b205b4..a470839db 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -198,30 +198,37 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 - defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 - defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 - defaultButtons.mainListEditBtn({hasPermi:'wms:unplannedreceipt-request-main:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), // 删除 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:unplannedreceipt-request-main:close'}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:unplannedreceipt-request-main:reAdd'}), // 重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:submit'}), // 提交审批 + defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:refused'}), // 驳回 + defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:unplannedreceipt-request-main:agree'}), // 审批通过 + defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:unplannedreceipt-request-main:handle'}), // 处理 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:unplannedreceipt-request-main:update'}), // 编辑 + // defaultButtons.mainListDeleteBtn({hasPermi:'wms:unplannedreceipt-request-main:delete'}), // 删除 ] } - - // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 console.log('列表-操作按钮事件-关闭') + handleClose(row.id) } else if (val == 'mainReAdd') { // 重新添加 console.log('列表-操作按钮事件-重新添加') + handleReAdd(row.id) } else if (val == 'mainSubmit') { // 提交审批 console.log('列表-操作按钮事件-提交审批') + handleSubmit(row.id) } else if (val == 'mainTurnDown') { // 驳回 console.log('列表-操作按钮事件-驳回') + handleRefused(row.id) } else if (val == 'mainApprove') { // 审批通过 console.log('列表-操作按钮事件-审批通过') + handleAgree(row.id) + } else if (val == 'mainHandle') { // 处理 + console.log('列表-操作按钮事件-处理') + handleHandle(row.id) } else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 @@ -229,6 +236,66 @@ const buttonTableClick = async (val, row) => { } } +/** 关闭按钮操作 */ +const handleClose = async (id: number) => { + try { + await message.confirm(t('common.confirmColse')) + await UnplannedreceiptRequestMainApi.closeUnplannedreceiptRequestMain(id) + message.success(t('common.closeSuccess')) + await getList() + } catch {} +} + +/** 重新添加按钮操作 */ +const handleReAdd = async (id: number) => { + try { + await message.confirm(t('common.confirmReAdd')) + await UnplannedreceiptRequestMainApi.reAddUnplannedreceiptRequestMain(id) + message.success(t('common.reAddSuccess')) + await getList() + } catch {} +} + +/** 提交按钮操作 */ +const handleSubmit = async (id: number) => { + try { + await message.confirm(t('common.confirmSubmit')) + await UnplannedreceiptRequestMainApi.submitUnplannedreceiptRequestMain(id) + message.success(t('common.submitSuccess')) + await getList() + } catch {} +} + +/** 审批驳回按钮操作 */ +const handleRefused = async (id: number) => { + try { + await message.confirm(t('common.confirmRefused')) + await UnplannedreceiptRequestMainApi.refusedUnplannedreceiptRequestMain(id) + message.success(t('common.refusedSuccess')) + await getList() + } catch {} +} + +/** 审批通过按钮操作 */ +const handleAgree = async (id: number) => { + try { + await message.confirm(t('common.confirmAgree')) + await UnplannedreceiptRequestMainApi.agreeUnplannedreceiptRequestMain(id) + message.success(t('common.agreeSuccess')) + await getList() + } catch {} +} + +/** 处理按钮操作 */ +const handleHandle = async (id: number) => { + try { + await message.confirm(t('common.confirmHandle')) + await UnplannedreceiptRequestMainApi.handleUnplannedreceiptRequestMain(id) + message.success(t('common.handleSuccess')) + await getList() + } catch {} +} + /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 7ada0b923..02f7dacd5 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -67,13 +67,12 @@ :apiUpdate="InventorychangeRequestDetailApi.updateInventorychangeRequestDetail" :apiPage="InventorychangeRequestDetailApi.getInventorychangeRequestDetailPage" :apiDelete="InventorychangeRequestDetailApi.deleteInventorychangeRequestDetail" - :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" /> + @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />