|
@ -134,8 +134,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
// defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), // 新增——需要手动修改下权限 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), // 导入 |
|
|
// defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), // 导入 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-main:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-main:export'}), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
@ -178,37 +178,73 @@ 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:countadjust-request-main:close'}), // 关闭 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // 重新添加 |
|
|
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //重新添加 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 |
|
|
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:submit'}), // 提交审批 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // 驳回 |
|
|
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:refused'}), // 驳回 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 |
|
|
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:agree'}), // 审批通过 |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:countadjust-request-main:update'}), // 编辑 |
|
|
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:countadjust-request-main:handle'}), // 处理 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:countadjust-request-main:delete'}), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:delete'}), // 删除 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
if (val == 'mainClose') { // 关闭 |
|
|
console.log('列表-操作按钮事件-关闭') |
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
|
|
CountadjustRequestMainApi.close(row.id).then(() => { |
|
|
|
|
|
message.success(t('关闭成功')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
} else if (val == 'mainReAdd') { // 重新添加 |
|
|
console.log('列表-操作按钮事件-重新添加') |
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
|
|
CountadjustRequestMainApi.reAdd(row.id).then(() => { |
|
|
|
|
|
message.success(t('添加成功')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
} else if (val == 'mainSubmit') { // 提交审批 |
|
|
console.log('列表-操作按钮事件-提交审批') |
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
|
|
CountadjustRequestMainApi.submit(row.id).then(() => { |
|
|
|
|
|
message.success(t('提交审批成功')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
} else if (val == 'mainTurnDown') { // 驳回 |
|
|
console.log('列表-操作按钮事件-驳回') |
|
|
await message.confirm('确认要驳回吗?') |
|
|
|
|
|
CountadjustRequestMainApi.refused(row.id).then(() => { |
|
|
|
|
|
message.success(t('驳回成功')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
} else if (val == 'mainApprove') { // 审批通过 |
|
|
console.log('列表-操作按钮事件-审批通过') |
|
|
await message.confirm('确认要审批通过吗?') |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
CountadjustRequestMainApi.agree(row.id).then(() => { |
|
|
|
|
|
message.success(t('审批已通过')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainHandle') { // 处理 |
|
|
|
|
|
await message.confirm('确认要处理吗?') |
|
|
|
|
|
CountadjustRequestMainApi.handle(row.id).then(() => { |
|
|
|
|
|
message.success(t('处理成功')) |
|
|
|
|
|
getList() |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
const openForm =async (type: string, row?: number) => { |
|
@ -317,6 +353,5 @@ const searchFormClick = (searchData) => { |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|
importTemplateData.templateUrl = await CountadjustRequestMainApi.importTemplate() |
|
|
|
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|