feat(报价单): 配送商销售价确认——展开「我方提交」待审记录可见商品明细
原来展开只显示摘要(提交人/时间/N 个商品),看不到具体哪些商品在待审。 · 后端新增只读 GET /api/workflow/quote/price-proposals/:id(权限同列表、开关关 503、 404/400 齐备、全程只 SELECT,不触发审批动作),返回 lines[](商品名/我方售价/建议售价/差额/状态); · 前端展开 A 方向时按 id 取明细并渲染表格:差额=建议−我方(4 位小数、涨红跌绿), max-h-72 内部滚动、显示「共 N 条」、加载中/加载失败三态,失败不白屏、摘要仍在; · 三语仅新增 5 个文案键(商品名/我方售价/建议售价/共 N 条/加载中…/加载失败); · 用例:前端 14 条(渲染/滚动/加载中/失败/B 方向不额外请求)+ 后端路由 7 条; tsc(根+server)0 错、后端 quotePriceProposal 相关 57 通过。 注:src/pages/customers 里 QuoteVersionManagement.priceProposal.contract.test.ts 有 1 条既有失败 (HEAD 上页面 view 白名单与测试就不一致),非本次引入,未动。
This commit is contained in:
@@ -2760,6 +2760,8 @@ export type QuotePriceProposalDto = {
|
||||
supplier_sku_code?: string | null;
|
||||
delivery_sku_code?: string | null;
|
||||
delivery_sku_name?: string | null;
|
||||
/** 行状态(详情接口给;沿用提议状态,前端用现有状态文案渲染) */
|
||||
status?: 'pending' | 'approved' | 'rejected' | 'cancelled' | 'superseded';
|
||||
}>;
|
||||
};
|
||||
|
||||
@@ -2874,6 +2876,15 @@ export async function listQuotePriceProposalsApi(options?: {
|
||||
);
|
||||
}
|
||||
|
||||
/** 单条提议 + 明细行(**只读**):列表只给 B 方向的 `lines`,展开 A 方向(我方提交)时按 id 取。 */
|
||||
export async function getQuotePriceProposalApi(id: string) {
|
||||
return workflowFetch<{ data: QuotePriceProposalDto }>(
|
||||
`/quote/price-proposals/${encodeURIComponent(id)}`,
|
||||
{},
|
||||
{ preserveErrorBody: true }
|
||||
);
|
||||
}
|
||||
|
||||
/** 方向 B 通过:按行写我方 sale_price + rearm 推配送 cost_price + D3 回执 */
|
||||
export async function approveQuotePriceProposalApi(id: string) {
|
||||
return workflowFetch<{
|
||||
|
||||
Reference in New Issue
Block a user