@chenchaolong/plugin-trade-compliance-workbench 1.0.218 → 1.0.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,8 +41,8 @@ const pageMeta = {
|
|
|
41
41
|
home: { title: '首页', subtitle: '查看系统操作提醒与外贸合规业务流程。' },
|
|
42
42
|
'controlled-goods': { title: '管控商品目录', subtitle: '维护军民两用物资和海外制裁商品目录。' },
|
|
43
43
|
'sanctioned-companies': { title: '公司制裁目录', subtitle: '维护被制裁公司信息并支持供应商、客户风险校验。' },
|
|
44
|
-
procurement: { title: '
|
|
45
|
-
'customer-contract-review': { title: '
|
|
44
|
+
procurement: { title: '采购合同审核', subtitle: '管理供应商、采购订单及采购商品合规信息。' },
|
|
45
|
+
'customer-contract-review': { title: '销售合同审核', subtitle: '审核客户合同关键条款及 AI 风险建议。' },
|
|
46
46
|
sales: { title: '', subtitle: '' },
|
|
47
47
|
'sales-files': { title: '销售文件管理', subtitle: '校验并生成销售业务文件,管理历史工作簿。' },
|
|
48
48
|
analytics: { title: '', subtitle: '' },
|
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { readSidebarCollapsed, resolveSidebarCollapsed, writeSidebarCollapsed } from '../sidebar-state.js';
|
|
4
4
|
const navigation = [
|
|
5
5
|
{ page: 'home', label: '首页', icon: 'ri-home-5-line', route: { type: 'page', page: 'home' } },
|
|
6
|
-
{ page: 'procurement', label: '
|
|
7
|
-
{ page: 'customer-contract-review', label: '
|
|
8
|
-
{ page: 'sales', label: '
|
|
6
|
+
{ page: 'procurement', label: '采购合同审核', icon: 'ri-file-list-3-line', route: { type: 'procurement', level: 'suppliers' } },
|
|
7
|
+
{ page: 'customer-contract-review', label: '销售合同审核', icon: 'ri-file-search-line', route: { type: 'page', page: 'customer-contract-review' } },
|
|
8
|
+
{ page: 'sales', label: '销售数据管理', icon: 'ri-shopping-bag-3-line', route: { type: 'sales', level: 'customers' } },
|
|
9
9
|
{ page: 'sales-files', label: '销售文件管理', icon: 'ri-file-excel-2-line', route: { type: 'page', page: 'sales-files' } },
|
|
10
10
|
{ page: 'controlled-goods', label: '管控商品目录', icon: 'ri-shield-check-line', route: { type: 'page', page: 'controlled-goods' } },
|
|
11
11
|
{ page: 'sanctioned-companies', label: '公司制裁目录', icon: 'ri-building-2-line', route: { type: 'page', page: 'sanctioned-companies' } },
|
|
@@ -64,7 +64,7 @@ export function buildBreadcrumbs(route) {
|
|
|
64
64
|
if (route.type === 'procurement') {
|
|
65
65
|
const crumbs = [
|
|
66
66
|
{ label: '首页', route: { type: 'page', page: 'home' } },
|
|
67
|
-
route.level === 'suppliers' ? { label: '
|
|
67
|
+
route.level === 'suppliers' ? { label: '采购合同审核' } : { label: '采购合同审核', route: { type: 'procurement', level: 'suppliers' } }
|
|
68
68
|
];
|
|
69
69
|
if (route.level === 'orders')
|
|
70
70
|
crumbs.push({ label: '采购订单' });
|
|
@@ -74,7 +74,7 @@ export function buildBreadcrumbs(route) {
|
|
|
74
74
|
}
|
|
75
75
|
const crumbs = [
|
|
76
76
|
{ label: '首页', route: { type: 'page', page: 'home' } },
|
|
77
|
-
route.level === 'customers' ? { label: '
|
|
77
|
+
route.level === 'customers' ? { label: '销售数据管理' } : { label: '销售数据管理', route: { type: 'sales', level: 'customers' } }
|
|
78
78
|
];
|
|
79
79
|
if (route.level === 'orders')
|
|
80
80
|
crumbs.push({ label: '销售订单' });
|
|
@@ -400,7 +400,7 @@ export function CustomerContractsPage(props) {
|
|
|
400
400
|
{ type: 'custom', key: 'overallRiskLevel', header: '整体风险等级', width: 105, align: 'center', truncate: false, render: (_, item) => _jsx(ContractRiskSummary, { item: item }) },
|
|
401
401
|
{ type: 'ellipsis', key: 'sourceFileName', header: '来源文件', width: 160, maxWidth: 160 }
|
|
402
402
|
];
|
|
403
|
-
return _jsxs("section", { className: "tcw-contract-page tcw-contract-prototype-surface", "aria-label": "\
|
|
403
|
+
return _jsxs("section", { className: "tcw-contract-page tcw-contract-prototype-surface", "aria-label": "\u9500\u552E\u5408\u540C\u5BA1\u6838", children: [_jsx(FilterPanel, { definitions: customerContractFilters, values: filters, onChange: changeFilter, onQuery: () => scheduler.flush(filters, pagination.pageSize), onReset: () => { setFilters({}); scheduler.flush({}, pagination.pageSize); } }), _jsx(InfoNotice, { children: "\u652F\u6301 PDF\u3001DOC\u3001DOCX\u3001XLS\u3001XLSX\u3001PNG\u3001JPEG\u3001WEBP\u3002\u89E3\u6790\u5B8C\u6210\u540E\uFF0C\u8BF7\u5728\u4EFB\u52A1\u4E2D\u5FC3\u70B9\u51FB\u201C\u6253\u5F00\u5BA1\u6838\u201D\u3002" }), props.importReviewState.status === 'PROCESSING' && _jsxs("p", { className: "tcw-contract-import-status", role: "status", children: ["\u6B63\u5728\u89E3\u6790 ", props.importReviewState.sourceFileName, "..."] }), props.importReviewState.status === 'FAILED' && _jsxs("div", { className: "tcw-contract-page-error", role: "alert", children: [props.importReviewState.message, props.importReviewState.importTaskId && props.onRetryImport && _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", disabled: interactionBusy, onClick: () => { if (!interactionBusy)
|
|
404
404
|
void Promise.resolve(props.onRetryImport?.(props.importReviewState.status === 'FAILED' ? props.importReviewState.importTaskId : '')).catch(cause => props.onNotify?.({ message: cause instanceof Error ? cause.message : '重新解析失败', tone: 'error' })); }, children: [_jsx("i", { className: "ri-restart-line", "aria-hidden": "true" }), "\u91CD\u65B0\u89E3\u6790"] })] }), _jsx("div", { className: "tcw-contract-action-table", children: _jsx(DataGrid, { columns: columns, rows: props.collection.items, rowKey: "id", actionWidth: 130, selection: { selectedKeys: selectedIds, onToggle: id => { if (!interactionBusy)
|
|
405
405
|
setSelectedIds(current => toggleBulkKey(current, id)); }, onTogglePage: () => { if (!interactionBusy)
|
|
406
406
|
setSelectedIds(current => toggleBulkPage(current, props.collection.items.map(item => item.id))); }, onClear: () => { if (!interactionBusy)
|
|
@@ -281,7 +281,7 @@ let SalesFileService = class SalesFileService {
|
|
|
281
281
|
const missingFields = ['vatRate', 'refundRate'].filter(field => missingTaxLines.some(line => line.missingFields.includes(field)));
|
|
282
282
|
const labels = missingFields.map(field => field === 'vatRate' ? '增值税率' : '退税率');
|
|
283
283
|
const examples = missingTaxLines.slice(0, 3).map(line => `第${line.lineNumber}行「${line.productName}」`).join('、');
|
|
284
|
-
throw new DomainError(DomainErrorCodes.SALES_LINE_TAX_DATA_REQUIRED, `销售商品缺少${labels.join('、')}:${examples}${missingTaxLines.length > 3 ? `等${missingTaxLines.length}项` : ''}
|
|
284
|
+
throw new DomainError(DomainErrorCodes.SALES_LINE_TAX_DATA_REQUIRED, `销售商品缺少${labels.join('、')}:${examples}${missingTaxLines.length > 3 ? `等${missingTaxLines.length}项` : ''}。请到采购合同审核 → 对应订单商品详情,维护税率或使用「自动补全税率与海关编码」,核对后再生成。`, { missingFields, lines: missingTaxLines });
|
|
285
285
|
}
|
|
286
286
|
const derivedLines = new Map(orderEntries.flatMap(entry => entry.derived.lines).map(line => [line.purchaseOrderLineId, line]));
|
|
287
287
|
const unpricedLines = purchaseLines.map(line => {
|