feat(frontend): 绩效台账与月度结算两页接入(新组绩效工资)
- 绩效台账页(order17):月/版本筛选 + 行展开计算快照 + 重算(原因 对话框,管理员/财务);核算入口在回款管理页(每笔回款行内触发) - 月结页(order18):生成快照(月份输入)+ 状态筛选 + 提交审批 + 详情抽屉(按人明细三口径/试用期说明/审批单号关联) - 均复用 usePagedList/AppPagination/--ys-* 惯例;金额 str 直出 - type-check 零错误;build 通过 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
e7e47d88bc
commit
a1217f4482
5 files changed
+609
No files matched your search
@@ -0,0 +1,70 @@
|
||||
import request from './request'
|
||||
import type { PageData } from './types'
|
||||
|
||||
/** 绩效台账行(金额/比例一律 str) */
|
||||
export interface LedgerRow {
|
||||
id: number
|
||||
receipt_id: number | null
|
||||
calc_version: number
|
||||
is_active: number
|
||||
calc_type: number
|
||||
business_id: number
|
||||
business_no: string
|
||||
personnel_id: number
|
||||
personnel_name: string
|
||||
role_code: string
|
||||
customer_type: string
|
||||
product_category: string
|
||||
ship_date: string | null
|
||||
receipt_date: string
|
||||
payment_days: number | null
|
||||
rate_text: string
|
||||
converted_profit: string | null
|
||||
performance_amount: string | null
|
||||
barter_applied: number
|
||||
weight_r: number | null
|
||||
payment_weight: string | null
|
||||
payable_amount: string | null
|
||||
settlement_month: string
|
||||
is_probation: number
|
||||
missing_cost: number
|
||||
snapshot_json: Record<string, unknown> | null
|
||||
calc_reason: string | null
|
||||
}
|
||||
|
||||
export interface LedgerQueryParams {
|
||||
pageNum?: number
|
||||
pageSize?: number
|
||||
settlement_month?: string
|
||||
personnel_id?: number
|
||||
business_id?: number
|
||||
is_active?: number
|
||||
calc_type?: number
|
||||
}
|
||||
|
||||
export function listLedger(params: LedgerQueryParams): Promise<PageData<LedgerRow>> {
|
||||
return request({ url: '/v1/calc/ledger', method: 'get', params })
|
||||
}
|
||||
|
||||
export function getLedger(id: number): Promise<LedgerRow> {
|
||||
return request({ url: `/v1/calc/ledger/${id}`, method: 'get' })
|
||||
}
|
||||
|
||||
/** 核算回款:返回台账行 + repeated(业务级一次性计提标记) */
|
||||
export function calcReceipt(receiptId: number): Promise<{ ledger: LedgerRow; repeated: boolean }> {
|
||||
return request({ url: `/v1/calc/receipts/${receiptId}/calc`, method: 'post' })
|
||||
}
|
||||
|
||||
export function recalcReceipt(receiptId: number, reason: string): Promise<LedgerRow> {
|
||||
return request({
|
||||
url: `/v1/calc/receipts/${receiptId}/recalc`,
|
||||
method: 'post',
|
||||
data: { reason },
|
||||
})
|
||||
}
|
||||
|
||||
export function batchCalc(receiptIds: number[]): Promise<
|
||||
{ receipt_id: number; ok: boolean; repeated?: boolean; error?: string }[]
|
||||
> {
|
||||
return request({ url: '/v1/calc/batch', method: 'post', data: { receipt_ids: receiptIds } })
|
||||
}
|
||||
Reference in new issue
Block a user