feat: add vehicle recharge approval workflow and pending UI
Wire configurable workflow config, approval todo with approve/reject/disburse, apply submit and history, and block disburse board for in-approval rows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a1fbbac370
commit
7b99040f9c
9 files changed
+1166
-9
No files matched your search
@@ -637,7 +637,10 @@ export function buildFuelRegisterCopyText(row: {
|
||||
|
||||
export function getPlRechargeApplyStatusLabel(status: string) {
|
||||
const map: Record<string, string> = {
|
||||
draft: '草稿',
|
||||
pending: '待发放',
|
||||
in_approval: '审批中',
|
||||
rejected: '已驳回',
|
||||
disbursed: '已发放',
|
||||
cancelled: '已作废'
|
||||
}
|
||||
@@ -646,13 +649,34 @@ export function getPlRechargeApplyStatusLabel(status: string) {
|
||||
|
||||
export function getPlRechargeApplyStatusTagType(status: string) {
|
||||
const map: Record<string, string> = {
|
||||
draft: 'info',
|
||||
pending: 'warning',
|
||||
in_approval: 'warning',
|
||||
rejected: 'danger',
|
||||
disbursed: 'success',
|
||||
cancelled: 'info'
|
||||
}
|
||||
return map[status] || 'info'
|
||||
}
|
||||
|
||||
export function getPlRechargeApprovalStatusLabel(status: string) {
|
||||
const map: Record<string, string> = {
|
||||
approved: '通过',
|
||||
rejected: '驳回',
|
||||
disbursed: '已发放'
|
||||
}
|
||||
return map[status] || status
|
||||
}
|
||||
|
||||
export function getPlRechargeApprovalStatusTagType(status: string) {
|
||||
const map: Record<string, string> = {
|
||||
approved: 'success',
|
||||
rejected: 'danger',
|
||||
disbursed: 'primary'
|
||||
}
|
||||
return map[status] || 'info'
|
||||
}
|
||||
|
||||
export const PL_GAS_STATION_PRESETS = ['中石化', '线上etc-app', '百链', '现金转账', '其他']
|
||||
|
||||
export const PL_MAINTENANCE_TYPE_PRESETS = ['保养', '维修', '年检']
|
||||
|
||||
@@ -145,7 +145,9 @@ export const SIDEBAR_MENU_ICON_BY_CODE: Record<string, string> = {
|
||||
'pl:freight-disburse:list': 'ri:bank-card-line',
|
||||
'pl:transport-address:list': 'ri:map-pin-line',
|
||||
'pl:vehicle-recharge-apply:list': 'ri:gas-station-line',
|
||||
'pl:vehicle-recharge-approval:list': 'ri:checkbox-circle-line',
|
||||
'pl:vehicle-recharge-record:list': 'ri:hand-coin-line',
|
||||
'pl:vehicle-recharge-workflow:list': 'ri:flow-chart',
|
||||
'pl:vehicle-maintenance-apply:list': 'ri:tools-line',
|
||||
'pl:vehicle-maintenance-process:list': 'ri:settings-3-line',
|
||||
'pl:vehicle-urea-apply:list': 'ri:drop-line',
|
||||
|
||||
Reference in new issue
Block a user