| | |
| | | reason?: string; // 赔付原因 |
| | | auditStatus?: number; // 审批状态:0未提交 10审批中 20审核通过 30审核不通过 40已取消 |
| | | auditStatusName?: string; // 审批状态名称 |
| | | processInstanceId?: string; // 审批流程实例编号 |
| | | auditUserId?: number; // 审核人 |
| | | auditTime?: string; // 审核时间 |
| | | auditRemark?: string; // 审核备注 |
| | | reviewerId?: number; // 审核人用户编号 |
| | | reviewerName?: string; // 审核人姓名 |
| | | reviewTime?: string; // 审核时间 |
| | | reviewRemark?: string; // 审核意见(不通过时即不通过原因) |
| | | payStatus?: number; // 支付状态(账务联动预留) |
| | | remark?: string; // 备注 |
| | | createTime?: string; |
| | | } |
| | | |
| | | /** 审批参数 */ |
| | | export interface AuditReq { |
| | | id: number; |
| | | auditStatus: number; // 20通过 30驳回 |
| | | remark?: string; |
| | | } |
| | | } |
| | | |
| | |
| | | ); |
| | | } |
| | | |
| | | /** 提交赔付/服务补偿单审批 */ |
| | | export function submitCompensation(id: number, processDefinitionKey: string) { |
| | | /** |
| | | * 提交赔付/服务补偿单审批(未提交/审核不通过 → 审批中) |
| | | * 审批人由「系统管理 - 审批配置」统一配置,提交时无需指定。 |
| | | */ |
| | | export function submitCompensation(id: number) { |
| | | return requestClient.put<boolean>('/aftersales/compensation/submit', null, { |
| | | params: { id, processDefinitionKey }, |
| | | params: { id }, |
| | | }); |
| | | } |
| | | |
| | | /** 审批赔付/服务补偿单 */ |
| | | export function auditCompensation(data: AfterSaleCompensationApi.AuditReq) { |
| | | return requestClient.put<boolean>('/aftersales/compensation/audit', data); |
| | | /** 获得审批人编号集合,供列表页判断是否展示审核按钮 */ |
| | | export function getCompensationApproverIds() { |
| | | return requestClient.get<number[]>('/aftersales/compensation/approver-ids'); |
| | | } |
| | | |
| | | /** 获取赔付/服务补偿单审批流程定义列表 */ |
| | | export function getApproveProcessList() { |
| | | return requestClient.get<{ id: string; name: string; version: number; key: string }[]>( |
| | | '/aftersales/compensation/approve-process-list', |
| | | ); |
| | | /** |
| | | * 审核赔付/服务补偿单(审批中 → 审核通过 / 审核不通过) |
| | | * |
| | | * @param id 赔付单编号 |
| | | * @param pass true=审核通过 / false=审核不通过 |
| | | * @param reviewRemark 审核意见,pass=false 时必填 |
| | | */ |
| | | export function auditCompensation( |
| | | id: number, |
| | | pass: boolean, |
| | | reviewRemark?: string, |
| | | ) { |
| | | return requestClient.put<boolean>('/aftersales/compensation/audit', { |
| | | id, |
| | | pass, |
| | | reviewRemark, |
| | | }); |
| | | } |