liu
2 天以前 749cb2f4ad815c5a68c19fe961d5ca2149a84dd4
src/api/erp/finance/payment/index.ts
@@ -18,6 +18,11 @@
    discountPrice: number; // 优惠金额
    paymentPrice: number; // 实际付款金额
    status: number; // 状态
    // ========== 审批信息(轻量级状态机审批) ==========
    reviewerId?: number; // 审核人编号
    reviewerName?: string; // 审核人姓名
    reviewTime?: Date | string; // 审核时间
    reviewRemark?: string; // 审核意见(不通过时为驳回原因)
    remark: string; // 备注
    attachmentList?: { id: number; name?: string; url?: string }[]; // 附件列表
    accountId?: number; // 付款账户
@@ -75,10 +80,36 @@
  return requestClient.put('/erp/finance-payment/update', data);
}
/** 更新付款单的状态 */
export function updateFinancePaymentStatus(id: number, status: number) {
  return requestClient.put('/erp/finance-payment/update-status', null, {
    params: { id, status },
/**
 * 提交审批(未审核 → 审批中)
 *
 * 审批人由「系统管理 - 审批配置」统一配置,提交时无需指定。
 */
export function submitFinancePayment(id: number) {
  return requestClient.put('/erp/finance-payment/submit', null, {
    params: { id },
  });
}
/** 获得审批人编号集合,供列表页判断是否展示审核按钮 */
export function getFinancePaymentApproverUserIds() {
  return requestClient.get<number[]>('/erp/finance-payment/approver-ids');
}
/**
 * 审核(审批中 → 审核通过/审核不通过)
 *
 * 仅审批配置中指定的审批人本人可调用;pass=false 时 reviewRemark(不通过原因)必填。
 */
export function auditFinancePayment(
  id: number,
  pass: boolean,
  reviewRemark?: string,
) {
  return requestClient.put('/erp/finance-payment/audit', {
    id,
    pass,
    reviewRemark,
  });
}