|
|
@ -84,6 +84,11 @@ import * as TransferreceiptRequestMainApi from '@/api/wms/transferreceiptRequest |
|
|
|
import * as TransferreceiptRequestDetailApi from '@/api/wms/transferreceiptRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
|
|
|
|
import { |
|
|
|
closeTransferissueRequestMain, |
|
|
|
closeTransferreceiptRequestMain, submitTransferreceiptRequestMain |
|
|
|
} from "@/api/wms/transferreceiptRequestMain"; |
|
|
|
|
|
|
|
// 调拨入库申请 |
|
|
|
defineOptions({ name: 'TransferreceiptRequestMain' }) |
|
|
|
|
|
|
@ -148,8 +153,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:transferreceipt-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:transferreceipt-request-main:import'}), // 导入 |
|
|
|
// defaultButtons.defaultAddBtn({hasPermi:'wms:transferreceipt-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
|
// defaultButtons.defaultImportBtn({hasPermi:'wms:transferreceipt-request-main:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:transferreceipt-request-main:export'}), // 导出 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
@ -192,37 +197,105 @@ 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:transferreceipt-request-main:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferreceipt-request-main:delete'}), // 删除 |
|
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:transferreceipt-request-main:close'}), // 关闭 |
|
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:transferreceipt-request-main:reAdd'}), // 重新添加 |
|
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:transferreceipt-request-main:submit'}), // 提交审批 |
|
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferreceipt-request-main:refused'}), // 驳回 |
|
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:transferreceipt-request-main:agree'}), // 审批通过 |
|
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:transferreceipt-request-main:handle'}), // 处理 |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:transferreceipt-request-main:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:transferreceipt-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('列表-操作按钮事件-审批通过') |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
handleAgree(row.id) |
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
handleHandle(row.id) |
|
|
|
}else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
|
const handleHandle = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmHandle')) |
|
|
|
await TransferreceiptRequestMainApi.handleTransferreceiptRequestMain(id) |
|
|
|
message.success(t('common.handleSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmAgree')) |
|
|
|
await TransferreceiptRequestMainApi.agreeTransferreceiptRequestMain(id) |
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批驳回按钮操作 */ |
|
|
|
const handleRefused = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmRefused')) |
|
|
|
await TransferreceiptRequestMainApi.refusedTransferreceiptRequestMain(id) |
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 提交按钮操作 */ |
|
|
|
const handleSubmit = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
await TransferreceiptRequestMainApi.submitTransferreceiptRequestMain(id) |
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 重新添加按钮操作 */ |
|
|
|
const handleReAdd = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmReAdd')) |
|
|
|
await TransferreceiptRequestMainApi.reAddTransferreceiptRequestMain(id) |
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClose = async (id: number) => { |
|
|
|
try { |
|
|
|
await message.confirm(t('common.confirmColse')) |
|
|
|
await TransferreceiptRequestMainApi.closeTransferreceiptRequestMain(id) |
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|