This commit is contained in:
@@ -740,9 +740,10 @@
|
||||
refundList.value = res.data.items || []
|
||||
pagination.total = res.data.total || 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
} catch (error: any) {
|
||||
console.error(error)
|
||||
ElMessage.error(error?.message || '重新提交失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
@@ -999,17 +1000,9 @@
|
||||
const getActions = (row: Refund) => {
|
||||
const actions: any[] = []
|
||||
|
||||
// 待审批状态可以审批通过、拒绝或退回
|
||||
// 待审批状态可以打回重填、审批通过或审批拒绝
|
||||
if (row.status === 1) {
|
||||
// 退回按钮直接显示
|
||||
if (hasAuth('refund:return')) {
|
||||
actions.push({
|
||||
label: '退回',
|
||||
handler: () => handleShowReturn(row),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
// 审批通过和审批拒绝放到更多里
|
||||
// 审批通过
|
||||
if (hasAuth('refund:approve')) {
|
||||
actions.push({
|
||||
label: '审批通过',
|
||||
@@ -1017,6 +1010,7 @@
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
// 审批拒绝
|
||||
if (hasAuth('refund:reject')) {
|
||||
actions.push({
|
||||
label: '审批拒绝',
|
||||
@@ -1024,10 +1018,18 @@
|
||||
type: 'danger'
|
||||
})
|
||||
}
|
||||
// 打回重填
|
||||
if (hasAuth('refund:return')) {
|
||||
actions.push({
|
||||
label: '打回重填',
|
||||
handler: () => handleShowReturn(row),
|
||||
type: 'primary'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 已拒绝或已退回状态可以重新提交
|
||||
if (row.status === 3 || row.status === 4) {
|
||||
// 只有已退回状态可以重新提交
|
||||
if (row.status === 4 && hasAuth('refund:resubmit')) {
|
||||
actions.push({
|
||||
label: '重新提交',
|
||||
handler: () => handleShowResubmit(row),
|
||||
|
||||
Reference in New Issue
Block a user