|
@ -192,34 +192,32 @@ const isShowMainButton = (row,val) => { |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // 关闭 |
|
|
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:count-request-main:close'}), // 关闭 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-request-main:reAdd'}), //重新添加 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:submit'}), // 提交审批 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-request-main:refused'}), // 驳回 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-request-main:agree'}), // 审批通过 |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:count-request-main:update'}), // 编辑 |
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-request-main:handle'}), // 处理 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:count-request-main:delete'}), // 删除 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:update'}), // 编辑 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
handleClose(row.id) |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
handleReAdd(row.id) |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
handleSubmit(row.id) |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
handleRefused(row.id) |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
handleAgree(row.id) |
|
|
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
|
|
handleHandle(row.id) |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
|
|
handleDelete(row.id) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -230,6 +228,66 @@ const openForm =async (type: string, row?: number) => { |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
|
|
const handleClose = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmColse')) |
|
|
|
|
|
await CountRequestMainApi.closeCountRequestMain(id) |
|
|
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 重新添加按钮操作 */ |
|
|
|
|
|
const handleReAdd = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmReAdd')) |
|
|
|
|
|
await CountRequestMainApi.reAddCountRequestMain(id) |
|
|
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
|
|
const handleAgree = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmAgree')) |
|
|
|
|
|
await CountRequestMainApi.agreeCountRequestMain(id) |
|
|
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 审批驳回按钮操作 */ |
|
|
|
|
|
const handleRefused = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmRefused')) |
|
|
|
|
|
await CountRequestMainApi.refusedCountRequestMain(id) |
|
|
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 处理按钮操作 */ |
|
|
|
|
|
const handleHandle = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmHandle')) |
|
|
|
|
|
await CountRequestMainApi.handleCountRequestMain(id) |
|
|
|
|
|
message.success(t('common.handleSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮操作 */ |
|
|
|
|
|
const handleSubmit = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
|
|
await CountRequestMainApi.submitCountRequestMain(id) |
|
|
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|