@chenchaolong/plugin-trade-compliance-workbench 1.0.219 → 1.0.221
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.
- package/dist/lib/remote-components/trade-compliance-workbench/app.css +1 -1
- package/dist/lib/remote-components/trade-compliance-workbench/app.js +5 -5
- package/dist/lib/remote-ui/app-source.d.ts +3 -0
- package/dist/lib/remote-ui/app-source.d.ts.map +1 -1
- package/dist/lib/remote-ui/app-source.js +23 -8
- package/dist/lib/remote-ui/app-source.js.map +1 -1
- package/dist/lib/remote-ui/components/action-menu.d.ts +8 -0
- package/dist/lib/remote-ui/components/action-menu.d.ts.map +1 -0
- package/dist/lib/remote-ui/components/action-menu.js +44 -0
- package/dist/lib/remote-ui/components/action-menu.js.map +1 -0
- package/dist/lib/remote-ui/components/data-grid.d.ts +4 -2
- package/dist/lib/remote-ui/components/data-grid.d.ts.map +1 -1
- package/dist/lib/remote-ui/components/data-grid.js +44 -8
- package/dist/lib/remote-ui/components/data-grid.js.map +1 -1
- package/dist/lib/remote-ui/components/decimal-input.d.ts +10 -0
- package/dist/lib/remote-ui/components/decimal-input.d.ts.map +1 -0
- package/dist/lib/remote-ui/components/decimal-input.js +10 -0
- package/dist/lib/remote-ui/components/decimal-input.js.map +1 -0
- package/dist/lib/remote-ui/components/generation-navigation.d.ts +6 -0
- package/dist/lib/remote-ui/components/generation-navigation.d.ts.map +1 -0
- package/dist/lib/remote-ui/components/generation-navigation.js +47 -0
- package/dist/lib/remote-ui/components/generation-navigation.js.map +1 -0
- package/dist/lib/remote-ui/components/generation-progress.d.ts +1 -1
- package/dist/lib/remote-ui/components/generation-progress.d.ts.map +1 -1
- package/dist/lib/remote-ui/components/generation-progress.js +9 -2
- package/dist/lib/remote-ui/components/generation-progress.js.map +1 -1
- package/dist/lib/remote-ui/components/layout.d.ts +5 -2
- package/dist/lib/remote-ui/components/layout.d.ts.map +1 -1
- package/dist/lib/remote-ui/components/layout.js +28 -4
- package/dist/lib/remote-ui/components/layout.js.map +1 -1
- package/dist/lib/remote-ui/components/packing-batches.css +16 -0
- package/dist/lib/remote-ui/components/packing-batches.d.ts.map +1 -1
- package/dist/lib/remote-ui/components/packing-batches.js +4 -1
- package/dist/lib/remote-ui/components/packing-batches.js.map +1 -1
- package/dist/lib/remote-ui/components/supplier-materials.css +15 -0
- package/dist/lib/remote-ui/components/supplier-materials.d.ts.map +1 -1
- package/dist/lib/remote-ui/components/supplier-materials.js +3 -3
- package/dist/lib/remote-ui/components/supplier-materials.js.map +1 -1
- package/dist/lib/remote-ui/components/task-status.d.ts +1 -0
- package/dist/lib/remote-ui/components/task-status.d.ts.map +1 -1
- package/dist/lib/remote-ui/components/task-status.js +4 -3
- package/dist/lib/remote-ui/components/task-status.js.map +1 -1
- package/dist/lib/remote-ui/display-number.d.ts +5 -0
- package/dist/lib/remote-ui/display-number.d.ts.map +1 -0
- package/dist/lib/remote-ui/display-number.js +31 -0
- package/dist/lib/remote-ui/display-number.js.map +1 -0
- package/dist/lib/remote-ui/pages/analytics-dashboard.d.ts +1 -0
- package/dist/lib/remote-ui/pages/analytics-dashboard.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/analytics-dashboard.js +8 -3
- package/dist/lib/remote-ui/pages/analytics-dashboard.js.map +1 -1
- package/dist/lib/remote-ui/pages/analytics-followup.css +62 -0
- package/dist/lib/remote-ui/pages/catalogs.css +16 -8
- package/dist/lib/remote-ui/pages/catalogs.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/catalogs.js +8 -5
- package/dist/lib/remote-ui/pages/catalogs.js.map +1 -1
- package/dist/lib/remote-ui/pages/contracts.css +19 -2
- package/dist/lib/remote-ui/pages/contracts.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/contracts.js +9 -9
- package/dist/lib/remote-ui/pages/contracts.js.map +1 -1
- package/dist/lib/remote-ui/pages/files.d.ts +2 -0
- package/dist/lib/remote-ui/pages/files.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/files.js +10 -10
- package/dist/lib/remote-ui/pages/files.js.map +1 -1
- package/dist/lib/remote-ui/pages/home-guide.css +47 -0
- package/dist/lib/remote-ui/pages/home.d.ts +0 -13
- package/dist/lib/remote-ui/pages/home.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/home.js +32 -22
- package/dist/lib/remote-ui/pages/home.js.map +1 -1
- package/dist/lib/remote-ui/pages/procurement-contracts.css +10 -10
- package/dist/lib/remote-ui/pages/procurement.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/procurement.js +15 -10
- package/dist/lib/remote-ui/pages/procurement.js.map +1 -1
- package/dist/lib/remote-ui/pages/sales-files.css +3 -3
- package/dist/lib/remote-ui/pages/sales.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/sales.js +17 -12
- package/dist/lib/remote-ui/pages/sales.js.map +1 -1
- package/dist/lib/remote-ui/pages/settings.css +16 -0
- package/dist/lib/remote-ui/pages/settings.d.ts.map +1 -1
- package/dist/lib/remote-ui/pages/settings.js +22 -20
- package/dist/lib/remote-ui/pages/settings.js.map +1 -1
- package/dist/lib/remote-ui/styles.css +1 -1
- package/dist/lib/remote-ui/ui-consistency.css +327 -0
- package/dist/lib/remote-ui/ui-followup.css +42 -0
- package/package.json +1 -1
|
@@ -125,9 +125,9 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.tcw-sales-files-page--orders .tcw-data-table :is(th, td):not(.action-column) {
|
|
128
|
-
width: auto
|
|
129
|
-
min-width: 0
|
|
130
|
-
max-width: none
|
|
128
|
+
width: auto ;
|
|
129
|
+
min-width: 0 ;
|
|
130
|
+
max-width: none ;
|
|
131
131
|
overflow: hidden;
|
|
132
132
|
text-overflow: ellipsis;
|
|
133
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sales.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote-ui/pages/sales.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sales.d.ts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AAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,2CA6Ep1B;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAC;;;;;;;;;;;;KAQrF;AAGD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AACtE;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,gBAAgB,EAAE,aAAa,GAAG,oBAAoB,CAAC,GAAG,eAAe,CAQlH;AACD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,6DAG5D;AAoBD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,UAA0K"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { DecimalInput } from '../components/decimal-input.js';
|
|
3
|
+
import { GenerationNavigation } from '../components/generation-navigation.js';
|
|
4
|
+
import { ActionMenu } from '../components/action-menu.js';
|
|
5
|
+
import { compactDecimal } from '../display-number.js';
|
|
2
6
|
import { generationData } from '../generation-tasks.js';
|
|
3
7
|
import { CustomsCoverageSummary, SupplierMaterialsPanel } from '../components/supplier-materials.js';
|
|
4
8
|
import { PackingGenerationActions, initialPackingWorkflow, MaterialReviewWarnings } from '../components/packing-generation-actions.js';
|
|
@@ -21,7 +25,7 @@ const customerFilters = [
|
|
|
21
25
|
{ type: 'select', key: 'sanctionStatus', label: '合作方制裁风险', options: [{ value: 'UNCHECKED', label: '待核验' }, { value: 'CLEAR', label: '未命中' }, { value: 'HIT', label: '命中制裁名单' }] }
|
|
22
26
|
];
|
|
23
27
|
const orderFilters = [
|
|
24
|
-
{ type: 'text', key: 'salesOrderNo', label: '
|
|
28
|
+
{ type: 'text', key: 'salesOrderNo', label: '销售订单编号' }, { type: 'text', key: 'customerContractNo', label: '客户合同编号' }, { type: 'text', key: 'purchaseContractNo', label: '采购合同编号' },
|
|
25
29
|
{ type: 'date-range', key: 'orderDate', label: '生成日期' }, { type: 'select', key: 'paymentStatus', label: '收款状态', options: [{ value: 'UNPAID', label: '未收款' }, { value: 'PARTIAL', label: '部分收款' }, { value: 'PAID', label: '已收款' }] }
|
|
26
30
|
];
|
|
27
31
|
const lineFilters = [
|
|
@@ -177,7 +181,7 @@ export function SalesPage(props) {
|
|
|
177
181
|
{ type: 'custom', key: 'sanctionStatus', header: '合作方制裁风险', width: 170, align: 'center', truncate: false, render: (_, row) => _jsx(Status, { value: row.sanctionStatus, count: row.sanctionMatchCount }) }, { type: 'custom', key: 'relatedProductRiskStatus', header: '关联商品合规风险', width: 260, align: 'center', truncate: false, render: (_, row) => _jsx(RelatedProductRiskStatus, { status: row.relatedProductRiskStatus, dualUseLineCount: row.relatedDualUseLineCount, overseasSanctionLineCount: row.relatedOverseasSanctionLineCount }) }, { type: 'text', key: 'complianceCheckedAt', header: '最近检查时间', width: 170, truncate: false, format: formatBeijingDateTime }
|
|
178
182
|
];
|
|
179
183
|
const openOrders = (row) => props.onRouteChange({ type: 'sales', level: 'orders', customerId: row.id });
|
|
180
|
-
return _jsxs("main", { className: "tcw-sales-files-page tcw-sales-page tcw-sales-page--customers", children: [_jsx(PageHeading, { title: "\u5BA2\u6237\u4FE1\u606F\u5217\u8868", description: "\u7EF4\u62A4\u9500\u552E\u5BA2\u6237\u4E3B\u4F53\uFF0C\u70B9\u51FB\u8BA2\u5355\u8BE6\u60C5\u8FDB\u5165\u8BE5\u5BA2\u6237\u7684\u9500\u552E\u8BA2\u5355\u5217\u8868\u3002" }), _jsx(FilterPanel, { definitions: customerFilters, values: filters, onChange: (key, value) => setFilters(current => ({ ...current, [key]: value })), onQuery: () => void query('salesCustomers'), onReset: () => reset('salesCustomers') }), _jsx(InfoNotice, { children: "\u5BA2\u6237\u9ED8\u8BA4\u5B9A\u4EF7\u5229\u6DA6\u7387\u4E3A\u53EF\u9009\u9ED8\u8BA4\u503C\uFF1B\u7EF4\u62A4\u4FE1\u7528\u989D\u5EA6\u540E\uFF0C\u5269\u4F59\u989D\u5EA6\u4E3A\u8D1F\uFF08\u672A\u6536\u6B3E\u8D85\u51FA\u989D\u5EA6\uFF09\u7684\u5BA2\u6237\u6574\u884C\u6807\u7EA2\uFF0C\u4E14\u65E0\u6CD5\u751F\u6210\u9500\u552E\u6587\u4EF6\u3002" }), _jsx(DataGrid, { columns: columns, rows: props.customers.items, rowKey: "id", rowClassName: salesCreditRowClassName, pagination: pagination(props.customers), onPageChange: page => void query('salesCustomers', page), onPageSizeChange: pageSize => void queryDispatcher.pageSize('salesCustomers', pageSize, filters), emptyText: "\u6682\u65E0\u5BA2\u6237\u6570\u636E", actionWidth: 190, actions: row => _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", onClick: () => openOrders(row), children: [_jsx("i", { className: "ri-file-list-3-line", "aria-hidden": "true" }), "\u8BA2\u5355"] }), _jsxs("button", { type: "button", "aria-label": "\u7EF4\u62A4\u5BA2\u6237\u4FE1\u606F", onClick: () => setRateDialog({ customer: row, enterOrders: false }), children: [_jsx("i", { className: "ri-user-settings-line", "aria-hidden": "true" }), "\u5BA2\u6237\u7EF4\u62A4"] })] }) }), _jsx(ConfirmDialog, { open: Boolean(confirmCustomer), title: "\u9ED8\u8BA4\u5229\u6DA6\u7387\u672A\u7EF4\u62A4", message: "\u8BE5\u5BA2\u6237\u5C1A\u672A\u7EF4\u62A4\u9ED8\u8BA4\u5B9A\u4EF7\u5229\u6DA6\u7387\u3002\u662F\u5426\u5148\u7EF4\u62A4\u5229\u6DA6\u7387\u540E\u8FDB\u5165\u8BA2\u5355\u5217\u8868\uFF1F", onCancel: () => setConfirmCustomer(null), onConfirm: () => { if (confirmCustomer)
|
|
184
|
+
return _jsxs("main", { className: "tcw-sales-files-page tcw-sales-page tcw-sales-page--customers", children: [_jsx(PageHeading, { title: "\u5BA2\u6237\u4FE1\u606F\u5217\u8868", description: "\u7EF4\u62A4\u9500\u552E\u5BA2\u6237\u4E3B\u4F53\uFF0C\u70B9\u51FB\u8BA2\u5355\u8BE6\u60C5\u8FDB\u5165\u8BE5\u5BA2\u6237\u7684\u9500\u552E\u8BA2\u5355\u5217\u8868\u3002" }), _jsx(FilterPanel, { definitions: customerFilters, values: filters, onChange: (key, value) => setFilters(current => ({ ...current, [key]: value })), onQuery: () => void query('salesCustomers'), onReset: () => reset('salesCustomers') }), _jsx(InfoNotice, { subtle: true, children: "\u5BA2\u6237\u9ED8\u8BA4\u5B9A\u4EF7\u5229\u6DA6\u7387\u4E3A\u53EF\u9009\u9ED8\u8BA4\u503C\uFF1B\u7EF4\u62A4\u4FE1\u7528\u989D\u5EA6\u540E\uFF0C\u5269\u4F59\u989D\u5EA6\u4E3A\u8D1F\uFF08\u672A\u6536\u6B3E\u8D85\u51FA\u989D\u5EA6\uFF09\u7684\u5BA2\u6237\u6574\u884C\u6807\u7EA2\uFF0C\u4E14\u65E0\u6CD5\u751F\u6210\u9500\u552E\u6587\u4EF6\u3002" }), _jsx(DataGrid, { columns: columns, rows: props.customers.items, rowKey: "id", rowClassName: salesCreditRowClassName, pagination: pagination(props.customers), onPageChange: page => void query('salesCustomers', page), onPageSizeChange: pageSize => void queryDispatcher.pageSize('salesCustomers', pageSize, filters), emptyText: "\u6682\u65E0\u5BA2\u6237\u6570\u636E", actionWidth: 190, actions: row => _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", onClick: () => openOrders(row), children: [_jsx("i", { className: "ri-file-list-3-line", "aria-hidden": "true" }), "\u8BA2\u5355"] }), _jsxs("button", { type: "button", "aria-label": "\u7EF4\u62A4\u5BA2\u6237\u4FE1\u606F", onClick: () => setRateDialog({ customer: row, enterOrders: false }), children: [_jsx("i", { className: "ri-user-settings-line", "aria-hidden": "true" }), "\u5BA2\u6237\u7EF4\u62A4"] })] }) }), _jsx(ConfirmDialog, { open: Boolean(confirmCustomer), title: "\u9ED8\u8BA4\u5229\u6DA6\u7387\u672A\u7EF4\u62A4", message: "\u8BE5\u5BA2\u6237\u5C1A\u672A\u7EF4\u62A4\u9ED8\u8BA4\u5B9A\u4EF7\u5229\u6DA6\u7387\u3002\u662F\u5426\u5148\u7EF4\u62A4\u5229\u6DA6\u7387\u540E\u8FDB\u5165\u8BA2\u5355\u5217\u8868\uFF1F", onCancel: () => setConfirmCustomer(null), onConfirm: () => { if (confirmCustomer)
|
|
181
185
|
setRateDialog({ customer: confirmCustomer, enterOrders: true }); setConfirmCustomer(null); } }), rateDialog && _jsx(CustomerMaintenanceDialog, { state: rateDialog, busy: props.busy, onClose: () => setRateDialog(null), onSave: async ({ rate, creditLimit }) => { for (const action of customerMaintenanceSaveActions(rateDialog.customer, { rate, creditLimit }))
|
|
182
186
|
await props.onAction(action.actionKey, action.input); const next = rateDialog.enterOrders; const id = rateDialog.customer.id; setRateDialog(null); if (next)
|
|
183
187
|
props.onRouteChange({ type: 'sales', level: 'orders', customerId: id });
|
|
@@ -213,11 +217,11 @@ export function SalesPage(props) {
|
|
|
213
217
|
disabled: props.busy
|
|
214
218
|
};
|
|
215
219
|
const columns = [
|
|
216
|
-
{ type: 'ellipsis', key: 'salesOrderNo', header: '
|
|
220
|
+
{ type: 'ellipsis', key: 'salesOrderNo', header: '销售订单编号', width: 170 }, { type: 'ellipsis', key: 'customerContractNo', header: '客户合同编号', width: 170 }, { type: 'ellipsis', key: 'purchaseContractNo', header: '采购合同编号', width: 170, accessor: purchaseContractNosLabel }, { type: 'text', key: 'orderDate', header: '生成日期', width: 120, truncate: false, format: formatBusinessDate },
|
|
217
221
|
{ type: 'text', key: 'orderAmountCny', header: '销售总额 CNY', width: 140, align: 'right', truncate: false, format: (_, row) => salesOrderAmountLabel(row) }, { type: 'text', key: 'receivedAmountCny', header: '已收款 CNY', width: 140, align: 'right', truncate: false, format: money }, { type: 'text', key: 'unreceivedAmountCny', header: '未收款 CNY', width: 140, align: 'right', truncate: false, format: money },
|
|
218
222
|
{ type: 'custom', key: 'paymentStatus', header: '收款状态', width: 110, align: 'center', truncate: false, render: (_, row) => paymentLabel(row.paymentStatus) }, { type: 'text', key: 'effectivePricingProfitRate', header: '订单利润率', width: 120, align: 'right', truncate: false, format: (value, row) => salesOrderAmountLabel(row) === '待定价' ? '待定价' : salesPercent(value) }, { type: 'text', key: 'pricingProfitRateSource', header: '利润率来源', width: 150, truncate: false, format: sourceLabel }
|
|
219
223
|
];
|
|
220
|
-
return _jsxs("main", { className: "tcw-sales-files-page tcw-sales-page tcw-sales-page--orders", children: [_jsxs("section", { className: "tcw-context-bar", children: [_jsx("strong", { children: "\u5BA2\u6237\u6458\u8981" }), _jsxs("span", { children: [props.orders.customer?.code || '—', " \u00B7 ", props.orders.customer?.name || '—'] }), _jsx("span", { children: props.orders.customer?.country || '—' })] }), _jsx(PageHeading, { title: "\u9500\u552E\u8BA2\u5355\u5217\u8868", description: "\u67E5\u770B\u5F53\u524D\u5BA2\u6237\u7684\u6D3E\u751F\u9500\u552E\u8BA2\u5355\uFF0C\u70B9\u51FB\u5546\u54C1\u8BE6\u60C5\u8FDB\u5165\u5546\u54C1\u5217\u8868\uFF1B\u53EF\u7EF4\u62A4\u8BA2\u5355\u5B9A\u4EF7\u3001\u9500\u552E\u603B\u989D\u548C\u5DF2\u6536\u6B3E\u3002", action: _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: () => props.onRouteChange({ type: 'sales', level: 'customers' }), children: [_jsx("i", { className: "ri-arrow-left-line", "aria-hidden": "true" }), "\u8FD4\u56DE\u5BA2\u6237\u4FE1\u606F\u5217\u8868"] }) }), _jsx("section", { className: "tcw-metric-grid", children: [['订单总数', String(metrics.orderCount)], ['销售总额', money(metrics.salesAmountCny)], ['已收款', money(metrics.receivedAmountCny)], ['未收款', money(metrics.unreceivedAmountCny)]].map(([label, value]) => _jsxs("article", { children: [_jsx("span", { children: label }), _jsx("strong", { children: value }), _jsx("small", { children: label === '订单总数' ? '笔' : 'CNY' })] }, label)) }), _jsx(FilterPanel, { definitions: orderFilters, values: filters, onChange: (key, value) => setFilters(current => ({ ...current, [key]: value })), onQuery: () => void query('salesOrders'), onReset: () => reset('salesOrders') }), _jsxs("div", { className: "tcw-merged-generation-bar", children: [_jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: !canMergeGenerate, onClick: openMergedGeneration, children: [_jsx("i", { className: "ri-stack-line", "aria-hidden": "true" }), "\u751F\u6210\u51FA\u8D27\u6587\u4EF6"] }), _jsx("span", { children: mergedOrders.length === 0 ? '勾选同一客户的多个销售订单可合并生成一份销售文件' : !mergedSameCustomer ? '所选订单不属于同一客户,无法合并生成' : `已选 ${mergedOrders.length} 单,将合并生成一份销售文件` })] }), _jsx(DataGrid, { columns: columns, rows: props.orders.items, rowKey: row => `${row.customerContractId}:${row.purchaseOrderId}`, selection: mergedOrdersSelection, pagination: pagination(props.orders), onPageChange: page => void query('salesOrders', page), onPageSizeChange: pageSize => void queryDispatcher.pageSize('salesOrders', pageSize, filters), emptyText: "\u6682\u65E0\u9500\u552E\u8BA2\u5355", actionWidth:
|
|
224
|
+
return _jsxs("main", { className: "tcw-sales-files-page tcw-sales-page tcw-sales-page--orders", children: [_jsxs("section", { className: "tcw-context-bar", children: [_jsx("strong", { children: "\u5BA2\u6237\u6458\u8981" }), _jsxs("span", { children: [props.orders.customer?.code || '—', " \u00B7 ", props.orders.customer?.name || '—'] }), _jsx("span", { children: props.orders.customer?.country || '—' })] }), _jsx(PageHeading, { title: "\u9500\u552E\u8BA2\u5355\u5217\u8868", description: "\u67E5\u770B\u5F53\u524D\u5BA2\u6237\u7684\u6D3E\u751F\u9500\u552E\u8BA2\u5355\uFF0C\u70B9\u51FB\u5546\u54C1\u8BE6\u60C5\u8FDB\u5165\u5546\u54C1\u5217\u8868\uFF1B\u53EF\u7EF4\u62A4\u8BA2\u5355\u5B9A\u4EF7\u3001\u9500\u552E\u603B\u989D\u548C\u5DF2\u6536\u6B3E\u3002", action: _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: () => props.onRouteChange({ type: 'sales', level: 'customers' }), children: [_jsx("i", { className: "ri-arrow-left-line", "aria-hidden": "true" }), "\u8FD4\u56DE\u5BA2\u6237\u4FE1\u606F\u5217\u8868"] }) }), _jsx("section", { className: "tcw-metric-grid", children: [['订单总数', String(metrics.orderCount)], ['销售总额', money(metrics.salesAmountCny)], ['已收款', money(metrics.receivedAmountCny)], ['未收款', money(metrics.unreceivedAmountCny)]].map(([label, value]) => _jsxs("article", { children: [_jsx("span", { children: label }), _jsx("strong", { children: value }), _jsx("small", { children: label === '订单总数' ? '笔' : 'CNY' })] }, label)) }), _jsx(FilterPanel, { definitions: orderFilters, values: filters, onChange: (key, value) => setFilters(current => ({ ...current, [key]: value })), onQuery: () => void query('salesOrders'), onReset: () => reset('salesOrders') }), _jsxs("div", { className: "tcw-merged-generation-bar", children: [_jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: !canMergeGenerate, onClick: openMergedGeneration, children: [_jsx("i", { className: "ri-stack-line", "aria-hidden": "true" }), "\u751F\u6210\u51FA\u8D27\u6587\u4EF6"] }), _jsx("span", { children: mergedOrders.length === 0 ? '勾选同一客户的多个销售订单可合并生成一份销售文件' : !mergedSameCustomer ? '所选订单不属于同一客户,无法合并生成' : `已选 ${mergedOrders.length} 单,将合并生成一份销售文件` })] }), _jsx(DataGrid, { columns: columns, rows: props.orders.items, rowKey: row => `${row.customerContractId}:${row.purchaseOrderId}`, selection: mergedOrdersSelection, pagination: pagination(props.orders), onPageChange: page => void query('salesOrders', page), onPageSizeChange: pageSize => void queryDispatcher.pageSize('salesOrders', pageSize, filters), emptyText: "\u6682\u65E0\u9500\u552E\u8BA2\u5355", actionWidth: 240, actions: row => _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", onClick: () => props.onRouteChange({ type: 'sales', level: 'lines', customerId: row.customerId, orderKey: `${row.customerContractId}:${row.purchaseOrderId}` }), children: [_jsx("i", { className: "ri-list-check-2", "aria-hidden": "true" }), "\u5546\u54C1\u8BE6\u60C5"] }), _jsxs("button", { type: "button", "aria-label": "\u751F\u6210\u9500\u552E\u6587\u4EF6", onClick: event => { resetSalesPageScroll(event.currentTarget); setGenerationDialog(row); }, children: [_jsx("i", { className: "ri-file-excel-2-line", "aria-hidden": "true" }), "\u751F\u6210\u6587\u4EF6"] }), _jsxs(ActionMenu, { label: "\u9500\u552E\u8BA2\u5355\u66F4\u591A\u64CD\u4F5C", disabled: props.busy, children: [_jsxs("button", { type: "button", "aria-label": "\u7EF4\u62A4\u9500\u552E\u8BA2\u5355\u5229\u6DA6\u7387", onClick: event => { resetSalesPageScroll(event.currentTarget); setManualDialog({ order: row, field: 'pricingProfitRateOverride' }); }, children: [_jsx("i", { className: "ri-percent-line", "aria-hidden": "true" }), "\u5229\u6DA6\u7387"] }), _jsxs("button", { type: "button", "aria-label": "\u7EF4\u62A4\u9500\u552E\u8BA2\u5355\u603B\u989D", onClick: event => { resetSalesPageScroll(event.currentTarget); setManualDialog({ order: row, field: 'orderAmountCnyOverride' }); }, children: [_jsx("i", { className: "ri-price-tag-3-line", "aria-hidden": "true" }), "\u603B\u989D"] }), _jsxs("button", { type: "button", onClick: event => { resetSalesPageScroll(event.currentTarget); setManualDialog({ order: row, field: 'receivedAmountCny' }); }, children: [_jsx("i", { className: "ri-money-cny-circle-line", "aria-hidden": "true" }), "\u6536\u6B3E"] }), _jsxs("details", { className: "tcw-order-money-details", children: [_jsx("summary", { children: "\u91D1\u989D\u4E0E\u6536\u6B3E" }), _jsxs("dl", { children: [_jsx(SummaryValue, { label: "\u9500\u552E\u603B\u989D CNY", value: salesOrderAmountLabel(row) }), _jsx(SummaryValue, { label: "\u5DF2\u6536\u6B3E CNY", value: money(row.receivedAmountCny) }), _jsx(SummaryValue, { label: "\u672A\u6536\u6B3E CNY", value: salesOrderAmountLabel(row) === '待定价' ? '待定价' : money(row.unreceivedAmountCny) }), _jsx(SummaryValue, { label: "\u6536\u6B3E\u72B6\u6001", value: paymentLabel(row.paymentStatus) }), _jsx(SummaryValue, { label: "\u5229\u6DA6\u7387", value: salesOrderAmountLabel(row) === '待定价' ? '待定价' : salesPercent(row.effectivePricingProfitRate) })] })] })] })] }) }), manualDialog && _jsx(SalesOrderMaintenanceDialog, { state: manualDialog, busy: props.busy, onClose: () => setManualDialog(null), onSave: async (value) => { const { order, field } = manualDialog; await props.onAction('save_derived_manual_data', createSalesOrderMaintenancePayload(order, field, value)); setManualDialog(null); void query('salesOrders'); } }), mergedDialog && _jsx(SalesGenerateFileDialog, { order: mergedDialog.orders[0], orders: mergedDialog.orders, onPreflight: draft => preflightSalesGeneration(mergedDialog.orders[0], draft, props.onAction, mergedDialog.orders), onPackingAction: props.onAction, onImportSupplierPacking: props.onImportSupplierPacking, onImportSupplierMaterial: props.onImportSupplierMaterial, onSupplierMaterialAction: props.onAction, busy: props.busy, onClose: () => setMergedDialog(null), onConfirm: async (draft) => {
|
|
221
225
|
try {
|
|
222
226
|
await enqueueSalesGeneration(mergedDialog.orders[0], draft, props.onAction, props.onOpenFiles, () => setMergedDialog(null), mergedDialog.orders);
|
|
223
227
|
props.onNotify?.({ message: '文件生成任务已提交,可在历史文件中查看进度和下载结果', tone: 'info' });
|
|
@@ -244,9 +248,9 @@ export function SalesPage(props) {
|
|
|
244
248
|
{ type: 'custom', key: 'productName', header: '商品名称', width: 190, title: (_, row) => row.productName || undefined, render: (_, row) => _jsxs("button", { type: "button", className: "tcw-table-link", title: row.productName, "aria-label": `按商品名称查询海关编码:${row.productName}`, onClick: () => openHsLookup(row, 'PRODUCT_NAME'), children: [_jsx("i", { className: "ri-search-line", "aria-hidden": "true" }), row.productName] }) }, { type: 'ellipsis', key: 'productDescription', header: '商品描述', width: 190, maxWidth: 190 }, { type: 'ellipsis', key: 'modelSpecification', header: '规格型号', width: 150 }, { type: 'custom', key: 'hsCode', header: 'HS编码', width: 130, title: (_, row) => row.hsCode || undefined, render: (_, row) => row.hsCode ? _jsxs("button", { type: "button", className: "tcw-table-link", title: row.hsCode, "aria-label": `查询海关编码:${row.hsCode}`, onClick: () => openHsLookup(row, 'HS_CODE'), children: [_jsx("i", { className: "ri-search-line", "aria-hidden": "true" }), row.hsCode] }) : '—' },
|
|
245
249
|
{ type: 'text', key: 'vatRate', header: '增值税率', width: 100, align: 'right', truncate: false, format: salesPercent }, { type: 'text', key: 'refundRate', header: '退税率', width: 90, align: 'right', truncate: false, format: salesPercent },
|
|
246
250
|
{ type: 'custom', key: 'complianceCategories', header: '合规分类', width: 170, title: (_, row) => complianceCategoryTitle(row.complianceCategories), render: (_, row) => _jsx(Tags, { values: row.complianceCategories ?? [] }) }, { type: 'custom', key: 'complianceMatches', header: '管控风险结果', width: 160, align: 'center', truncate: false, render: (_, row) => row.complianceMatches.length ? _jsxs("button", { type: "button", className: "tcw-sales-risk-status tcw-sales-risk-status--hit", title: `查看商品风险明细:${row.productName}`, "aria-label": `查看商品风险明细:${row.productName}`, onClick: event => { resetSalesPageScroll(event.currentTarget); setRiskLine(row); }, children: [_jsx("i", { className: "ri-error-warning-line", "aria-hidden": "true" }), "\u547D\u4E2D ", row.complianceMatches.length] }) : _jsx("span", { className: "tcw-sales-risk-status tcw-sales-risk-status--clear", children: "\u65E0\u547D\u4E2D" }) },
|
|
247
|
-
{ type: 'text', key: 'quantity', header: '数量', width: 100, align: 'right', truncate: false }, { type: 'text', key: 'salesUnitPriceCny', header: '销售单价 CNY', width: 140, align: 'right', truncate: false, format: money }, { type: 'text', key: 'salesLineAmountCny', header: '销售金额 CNY', width: 140, align: 'right', truncate: false, format: money }
|
|
251
|
+
{ type: 'text', key: 'quantity', header: '数量', width: 100, align: 'right', truncate: false, format: compactDecimal }, { type: 'text', key: 'salesUnitPriceCny', header: '销售单价 CNY', width: 140, align: 'right', truncate: false, format: money }, { type: 'text', key: 'salesLineAmountCny', header: '销售金额 CNY', width: 140, align: 'right', truncate: false, format: money }
|
|
248
252
|
];
|
|
249
|
-
return _jsxs("main", { className: "tcw-sales-files-page tcw-sales-page tcw-sales-page--lines", children: [_jsx(PageHeading, { className: "tcw-sales-heading--lines", title: "\u9500\u552E\u5546\u54C1\u5217\u8868", description: "\u7EF4\u62A4\u5546\u54C1\u4EF7\u683C\u548C\u987A\u5E8F\uFF0C\u4FDD\u5B58\u7684\u5546\u54C1\u987A\u5E8F\u5C06\u7528\u4E8E\u751F\u6210\u9500\u552E\u6587\u4EF6\u3002", action: _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", disabled: props.busy || !order?.lines.length, onClick: () => order && setLineOrderDialog(order), children: [_jsx("i", { className: "ri-drag-move-2-line", "aria-hidden": "true" }), "\u8C03\u6574\u987A\u5E8F"] }) }), _jsxs("section", { className: "tcw-context-bar tcw-order-summary", children: [_jsx("strong", { children: order?.salesOrderNo ?? '销售商品' }), _jsx("span", { children: order?.customerContractNo }), _jsx("span", { title: order ? purchaseContractNosLabel(order) : undefined, children: order ? purchaseContractNosLabel(order) : '—' })] }), order && _jsxs(InfoNotice, { children: [sourceLabel(order.pricingProfitRateSource), "\uFF1A", order.pricingStatus === 'COMPLETE' ? `当前订单已完成定价,销售总额 ${money(order.orderAmountCny)} CNY。` : `当前订单定价状态为 ${pricingStatusLabel(order.pricingStatus)}。`] }), _jsx(FilterPanel, { definitions: lineFilters, values: filters, onChange: (key, value) => setFilters(current => ({ ...current, [key]: value })), onQuery: () => void query('salesLines'), onReset: () => reset('salesLines') }), _jsx(DataGrid, { columns: columns, rows: props.lines.items, rowKey: "purchaseOrderLineId", pagination: pagination(props.lines), onPageChange: page => void query('salesLines', page), onPageSizeChange: pageSize => void queryDispatcher.pageSize('salesLines', pageSize, filters), emptyText: "\u6682\u65E0\u6D3E\u751F\u9500\u552E\u5546\u54C1", actionWidth: 180, actions: row => _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", "aria-label": `维护定价:${row.productName}`, onClick: event => { resetSalesPageScroll(event.currentTarget); order && setLinePricingDialog({ order, line: row }); }, children: [_jsx("i", { className: "ri-price-tag-3-line", "aria-hidden": "true" }), "\u5B9A\u4EF7"] }), _jsxs("button", { type: "button", "aria-label": `查看风险:${row.productName}`, onClick: event => { resetSalesPageScroll(event.currentTarget); setRiskLine(row); }, children: [_jsx("i", { className: "ri-shield-check-line", "aria-hidden": "true" }), "\u67E5\u770B\u98CE\u9669"] })] }) }), linePricingDialog && _jsx(SalesLinePricingDialog, { state: linePricingDialog, busy: props.busy, onClose: () => setLinePricingDialog(null), onSave: async (draft) => { await props.onAction('save_derived_manual_data', createSalesLinePricingPayload(linePricingDialog.order, linePricingDialog.line, draft)); setLinePricingDialog(null); void query('salesLines'); } }), lineOrderDialog && _jsx(SalesLineOrderDialog, { order: lineOrderDialog, busy: props.busy, onClose: () => setLineOrderDialog(null), onAction: props.onAction, onSaved: () => { setLineOrderDialog(null); void query('salesLines'); } }), riskLine && _jsx(SalesProductRiskDialog, { line: riskLine, onClose: () => setRiskLine(null) }), _jsx(HsCodeLookupDialog, { open: hsQuery !== null, initialQuery: hsQuery ?? '', onAction: hsAction, onClose: () => setHsQuery(null) })] });
|
|
253
|
+
return _jsxs("main", { className: "tcw-sales-files-page tcw-sales-page tcw-sales-page--lines", children: [_jsx(PageHeading, { className: "tcw-sales-heading--lines", title: "\u9500\u552E\u5546\u54C1\u5217\u8868", description: "\u7EF4\u62A4\u5546\u54C1\u4EF7\u683C\u548C\u987A\u5E8F\uFF0C\u4FDD\u5B58\u7684\u5546\u54C1\u987A\u5E8F\u5C06\u7528\u4E8E\u751F\u6210\u9500\u552E\u6587\u4EF6\u3002", action: _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", disabled: props.busy || !order?.lines.length, onClick: () => order && setLineOrderDialog(order), children: [_jsx("i", { className: "ri-drag-move-2-line", "aria-hidden": "true" }), "\u8C03\u6574\u987A\u5E8F"] }) }), _jsxs("section", { className: "tcw-context-bar tcw-order-summary", children: [_jsx("strong", { children: order?.salesOrderNo ?? '销售商品' }), _jsx("span", { children: order?.customerContractNo }), _jsx("span", { title: order ? purchaseContractNosLabel(order) : undefined, children: order ? purchaseContractNosLabel(order) : '—' }), _jsxs("span", { className: "tcw-sales-context-supplier", children: ["\u4F9B\u5E94\u5546\uFF1A", order?.supplierName || '—'] })] }), order && _jsxs(InfoNotice, { children: [sourceLabel(order.pricingProfitRateSource), "\uFF1A", order.pricingStatus === 'COMPLETE' ? `当前订单已完成定价,销售总额 ${money(order.orderAmountCny)} CNY。` : `当前订单定价状态为 ${pricingStatusLabel(order.pricingStatus)}。`] }), _jsx(FilterPanel, { definitions: lineFilters, values: filters, onChange: (key, value) => setFilters(current => ({ ...current, [key]: value })), onQuery: () => void query('salesLines'), onReset: () => reset('salesLines') }), _jsx(DataGrid, { columns: columns, defaultHiddenKeys: ['supplierName', 'productDescription', 'vatRate', 'refundRate', 'complianceCategories'], rows: props.lines.items, rowKey: "purchaseOrderLineId", pagination: pagination(props.lines), onPageChange: page => void query('salesLines', page), onPageSizeChange: pageSize => void queryDispatcher.pageSize('salesLines', pageSize, filters), emptyText: "\u6682\u65E0\u6D3E\u751F\u9500\u552E\u5546\u54C1", actionWidth: 180, actions: row => _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", "aria-label": `维护定价:${row.productName}`, onClick: event => { resetSalesPageScroll(event.currentTarget); order && setLinePricingDialog({ order, line: row }); }, children: [_jsx("i", { className: "ri-price-tag-3-line", "aria-hidden": "true" }), "\u5B9A\u4EF7"] }), _jsxs("button", { type: "button", "aria-label": `查看风险:${row.productName}`, onClick: event => { resetSalesPageScroll(event.currentTarget); setRiskLine(row); }, children: [_jsx("i", { className: "ri-shield-check-line", "aria-hidden": "true" }), "\u67E5\u770B\u98CE\u9669"] })] }) }), linePricingDialog && _jsx(SalesLinePricingDialog, { state: linePricingDialog, busy: props.busy, onClose: () => setLinePricingDialog(null), onSave: async (draft) => { await props.onAction('save_derived_manual_data', createSalesLinePricingPayload(linePricingDialog.order, linePricingDialog.line, draft)); setLinePricingDialog(null); void query('salesLines'); } }), lineOrderDialog && _jsx(SalesLineOrderDialog, { order: lineOrderDialog, busy: props.busy, onClose: () => setLineOrderDialog(null), onAction: props.onAction, onSaved: () => { setLineOrderDialog(null); void query('salesLines'); } }), riskLine && _jsx(SalesProductRiskDialog, { line: riskLine, onClose: () => setRiskLine(null) }), _jsx(HsCodeLookupDialog, { open: hsQuery !== null, initialQuery: hsQuery ?? '', onAction: hsAction, onClose: () => setHsQuery(null) })] });
|
|
250
254
|
}
|
|
251
255
|
export function salesLineLookupQuery(line, field) { return field === 'productName' ? line.productName : line.hsCode ?? ''; }
|
|
252
256
|
export function resetSalesPageScroll(target) {
|
|
@@ -280,7 +284,7 @@ export function SalesProductRiskDialog({ line, onClose }) {
|
|
|
280
284
|
{ type: 'text', key: 'matchMethod', header: '匹配方式', width: 150, truncate: false, format: value => matchMethodLabel(value) },
|
|
281
285
|
{ type: 'text', key: 'similarityScore', header: '相似度', width: 100, align: 'right', truncate: false, format: value => similarityLabel(value) }
|
|
282
286
|
];
|
|
283
|
-
return _jsx(Modal, { open: true, title: "\u5546\u54C1\u98CE\u9669\u8BE6\u60C5", size: "wide", onClose: onClose, footer: _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", onClick: onClose, children: [_jsx("i", { className: "ri-check-line", "aria-hidden": "true" }), "\u6807\u8BB0\u5DF2\u9605"] }), children: _jsxs("div", { className: "tcw-sales-risk-dialog", children: [_jsxs("section", { "aria-labelledby": "sales-product-summary-title", children: [_jsx("h3", { id: "sales-product-summary-title", children: "\u5546\u54C1\u4E0E\u4EF7\u683C" }), _jsxs("dl", { className: "tcw-preflight-summary", children: [_jsxs("div", { children: [_jsx("dt", { children: "\u5546\u54C1\u540D\u79F0" }), _jsx("dd", { children: line.productName })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u82F1\u6587\u540D\u79F0" }), _jsx("dd", { children: line.englishName || '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "HS\u7F16\u7801" }), _jsx("dd", { children: line.hsCode || '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u6570\u91CF" }), _jsxs("dd", { children: [line.quantity, line.unit ? ` ${line.unit}` : ''] })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u9500\u552E\u5355\u4EF7" }), _jsxs("dd", { children: [money(line.salesUnitPriceCny), " CNY"] })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u9500\u552E\u91D1\u989D" }), _jsxs("dd", { children: [money(line.salesLineAmountCny), " CNY"] })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5546\u54C1\u63CF\u8FF0" }), _jsx("dd", { children: line.productDescription || '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u89C4\u683C\u578B\u53F7" }), _jsx("dd", { children: line.modelSpecification || '暂无' })] })] })] }), _jsxs("section", { "aria-labelledby": "sales-product-risk-title", children: [_jsx("h3", { id: "sales-product-risk-title", children: "\u98CE\u9669\u8BF4\u660E" }), _jsxs("dl", { className: "tcw-preflight-summary", children: [_jsxs("div", { children: [_jsx("dt", { children: "\u98CE\u9669\u7C7B\u578B" }), _jsx("dd", { children: riskTypes.length ? riskTypes.map(complianceCategoryLabel).join('、') : '无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u547D\u4E2D\u5408\u89C4\u5206\u7C7B" }), _jsx("dd", { children: riskTypes.length ? riskTypes.map(complianceCategoryLabel).join('、') : '无' })] }), _jsxs("div", { className: "tcw-sales-risk-result", children: [_jsx("dt", { children: "\u7BA1\u63A7\u98CE\u9669\u7ED3\u679C" }), _jsx("dd", { children: line.complianceMatches.length ? `命中 ${line.complianceMatches.length} 项` : '无命中' })] }), _jsxs("div", { className: "tcw-sales-match-result", children: [_jsx("dt", { children: "\u5339\u914D\u7ED3\u679C" }), _jsx("dd", { children: matchedItems.length ? matchedItems.join('、') : '无匹配' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u547D\u4E2D\u7ED3\u679C" }), _jsx("dd", { children: line.complianceMatches.length ? `命中 ${line.complianceMatches.length} 项` : '无命中' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u98CE\u9669\u8BF4\u660E" }), _jsx("dd", { children: riskDescriptions.length ? riskDescriptions.join(';') : '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5904\u7406\u5EFA\u8BAE" }), _jsx("dd", { children: recommendations.length ? recommendations.join(';') : '暂无' })] })] })] }), _jsxs("section", { "aria-labelledby": "sales-product-match-title", children: [_jsx("h3", { id: "sales-product-match-title", children: "\u7BA1\u63A7/\u5236\u88C1\u5339\u914D\u660E\u7EC6" }), matches.length ? _jsx(DataGrid, { columns: matchColumns, rows: matches, rowKey: "rowKey" }) : _jsx("p", { children: "\u6682\u65E0" })] })] }) });
|
|
287
|
+
return _jsx(Modal, { open: true, title: "\u5546\u54C1\u98CE\u9669\u8BE6\u60C5", size: "wide", onClose: onClose, footer: _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", onClick: onClose, children: [_jsx("i", { className: "ri-check-line", "aria-hidden": "true" }), "\u6807\u8BB0\u5DF2\u9605"] }), children: _jsxs("div", { className: "tcw-sales-risk-dialog", children: [_jsxs("section", { "aria-labelledby": "sales-product-summary-title", children: [_jsx("h3", { id: "sales-product-summary-title", children: "\u5546\u54C1\u4E0E\u4EF7\u683C" }), _jsxs("dl", { className: "tcw-preflight-summary", children: [_jsxs("div", { children: [_jsx("dt", { children: "\u5546\u54C1\u540D\u79F0" }), _jsx("dd", { children: line.productName })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u82F1\u6587\u540D\u79F0" }), _jsx("dd", { children: line.englishName || '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "HS\u7F16\u7801" }), _jsx("dd", { children: line.hsCode || '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u6570\u91CF" }), _jsxs("dd", { children: [compactDecimal(line.quantity), line.unit ? ` ${line.unit}` : ''] })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u9500\u552E\u5355\u4EF7" }), _jsxs("dd", { children: [money(line.salesUnitPriceCny), " CNY"] })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u9500\u552E\u91D1\u989D" }), _jsxs("dd", { children: [money(line.salesLineAmountCny), " CNY"] })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5546\u54C1\u63CF\u8FF0" }), _jsx("dd", { children: line.productDescription || '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u89C4\u683C\u578B\u53F7" }), _jsx("dd", { children: line.modelSpecification || '暂无' })] })] })] }), _jsxs("section", { "aria-labelledby": "sales-product-risk-title", children: [_jsx("h3", { id: "sales-product-risk-title", children: "\u98CE\u9669\u8BF4\u660E" }), _jsxs("dl", { className: "tcw-preflight-summary", children: [_jsxs("div", { children: [_jsx("dt", { children: "\u98CE\u9669\u7C7B\u578B" }), _jsx("dd", { children: riskTypes.length ? riskTypes.map(complianceCategoryLabel).join('、') : '无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u547D\u4E2D\u5408\u89C4\u5206\u7C7B" }), _jsx("dd", { children: riskTypes.length ? riskTypes.map(complianceCategoryLabel).join('、') : '无' })] }), _jsxs("div", { className: "tcw-sales-risk-result", children: [_jsx("dt", { children: "\u7BA1\u63A7\u98CE\u9669\u7ED3\u679C" }), _jsx("dd", { children: line.complianceMatches.length ? `命中 ${line.complianceMatches.length} 项` : '无命中' })] }), _jsxs("div", { className: "tcw-sales-match-result", children: [_jsx("dt", { children: "\u5339\u914D\u7ED3\u679C" }), _jsx("dd", { children: matchedItems.length ? matchedItems.join('、') : '无匹配' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u547D\u4E2D\u7ED3\u679C" }), _jsx("dd", { children: line.complianceMatches.length ? `命中 ${line.complianceMatches.length} 项` : '无命中' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u98CE\u9669\u8BF4\u660E" }), _jsx("dd", { children: riskDescriptions.length ? riskDescriptions.join(';') : '暂无' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5904\u7406\u5EFA\u8BAE" }), _jsx("dd", { children: recommendations.length ? recommendations.join(';') : '暂无' })] })] })] }), _jsxs("section", { "aria-labelledby": "sales-product-match-title", children: [_jsx("h3", { id: "sales-product-match-title", children: "\u7BA1\u63A7/\u5236\u88C1\u5339\u914D\u660E\u7EC6" }), matches.length ? _jsx(DataGrid, { columns: matchColumns, rows: matches, rowKey: "rowKey" }) : _jsx("p", { children: "\u6682\u65E0" })] })] }) });
|
|
284
288
|
}
|
|
285
289
|
function PageHeading({ title, description, action, className = '' }) { return _jsxs("header", { className: `tcw-sales-heading ${className}`.trim(), children: [_jsxs("div", { children: [_jsx("h2", { className: "tcw-list-heading", children: title }), _jsx("p", { children: description })] }), action] }); }
|
|
286
290
|
export function CustomerMaintenanceDialog({ state, busy, onClose, onSave }) {
|
|
@@ -297,7 +301,7 @@ export function CustomerMaintenanceDialog({ state, busy, onClose, onSave }) {
|
|
|
297
301
|
['客户地址', customer.address], ['税号', customer.taxNumber], ['收款账号', customer.paymentAccount], ['开户行', customer.bankName],
|
|
298
302
|
['纳税等级', customer.taxpayerRating], ['网站', customer.website], ['经营产品', customer.businessProducts]
|
|
299
303
|
];
|
|
300
|
-
return _jsx(Modal, { open: true, title: "\u7EF4\u62A4\u5BA2\u6237\u4FE1\u606F", size: "wide", onClose: onClose, footer: _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u53D6\u6D88"] }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: busy || invalid, onClick: () => void onSave({ rate: percentageToRate(rate), creditLimit }), children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs("div", { className: "tcw-sales-customer-dialog", children: [
|
|
304
|
+
return _jsx(Modal, { open: true, title: "\u7EF4\u62A4\u5BA2\u6237\u4FE1\u606F", size: "wide", onClose: onClose, footer: _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u53D6\u6D88"] }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: busy || invalid, onClick: () => void onSave({ rate: percentageToRate(rate), creditLimit }), children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs("div", { className: "tcw-sales-customer-dialog", children: [_jsxs("section", { className: "tcw-customer-finance", children: [_jsx("h3", { children: customer.name }), _jsxs(FieldGrid, { columns: 2, children: [_jsx(FormField, { label: "\u9ED8\u8BA4\u5B9A\u4EF7\u5229\u6DA6\u7387\uFF08%\uFF09", hint: "\u4F8B\u5982 20 \u8868\u793A 20%", manual: true, children: _jsx("input", { type: "number", min: "0", step: "0.01", value: rate, onChange: event => { setRate(event.target.value); setHighRateConfirmed(false); } }) }), _jsx(FormField, { label: "\u4FE1\u7528\u989D\u5EA6\uFF08\u4EBA\u6C11\u5E01\uFF09", manual: true, children: _jsx(DecimalInput, { min: "0", step: "0.01", value: creditLimit, onValueChange: setCreditLimit }) })] }), _jsxs("details", { className: "tcw-customer-master", children: [_jsx("summary", { children: "\u4E3B\u4F53\u8D44\u6599\uFF08\u53EA\u8BFB\uFF09" }), _jsx("dl", { className: "tcw-readonly-values", children: readonlyFields.map(([label, value]) => _jsx(SummaryValue, { label: label, value: displayText(value) }, label)) }), _jsxs("dl", { className: "tcw-readonly-values", children: [_jsx(SummaryValue, { label: "\u521B\u5EFA\u4EBA", value: customer.createdByName || '人员信息未提供' }), _jsx(SummaryValue, { label: "\u521B\u5EFA\u65F6\u95F4", value: dateTimeText(customer.createdAt) }), _jsx(SummaryValue, { label: "\u6700\u540E\u7F16\u8F91\u4EBA", value: customer.updatedByName || '人员信息未提供' }), _jsx(SummaryValue, { label: "\u6700\u540E\u7F16\u8F91\u65F6\u95F4", value: dateTimeText(customer.updatedAt) }), _jsx(SummaryValue, { label: "\u5907\u6CE8", value: displayText(customer.remarks) })] })] })] }), _jsx("aside", { children: _jsxs("dl", { children: [_jsx(SummaryValue, { label: "\u4FE1\u7528\u989D\u5EA6", value: hasDraftLimit ? `${money(creditLimit)} CNY` : '未维护' }), _jsx(SummaryValue, { label: "\u672A\u6536\u6B3E\u603B\u989D", value: `${money(customer.unreceivedAmountCny ?? 0)} CNY` }), _jsx(SummaryValue, { label: "\u5269\u4F59\u4FE1\u7528\u989D\u5EA6\uFF08\u6309\u5F53\u524D\u5F55\u5165\u503C\uFF09", value: draftRemaining == null ? '—' : `${money(draftRemaining)} CNY` }), _jsx(SummaryValue, { label: "\u5236\u88C1\u98CE\u9669", value: _jsx(Status, { value: customer.sanctionStatus, count: customer.sanctionMatchCount }) }), _jsx(SummaryValue, { label: "\u6700\u8FD1\u68C0\u67E5\u65F6\u95F4", value: dateTimeText(customer.complianceCheckedAt) })] }) }), draftRemaining != null && draftRemaining < 0 && _jsxs(RiskNotice, { children: ["\u6309\u5F53\u524D\u5F55\u5165\u7684\u4FE1\u7528\u989D\u5EA6\uFF0C\u672A\u6536\u6B3E\u5DF2\u8D85\u51FA ", money(Math.abs(draftRemaining)), " CNY\uFF1B\u8D85\u989D\u671F\u95F4\u8BE5\u5BA2\u6237\u5C06\u65E0\u6CD5\u751F\u6210\u9500\u552E\u6587\u4EF6\u3002"] }), _jsx(HighRateConfirmation, { value: rate, checked: highRateConfirmed, onChange: setHighRateConfirmed }), _jsx(InfoNotice, { subtle: true, children: "\u91D1\u989D\u9884\u89C8\uFF1A\u9ED8\u8BA4\u5229\u6DA6\u7387\u5C06\u5E94\u7528\u4E8E\u672A\u5355\u72EC\u5B9A\u4EF7\u7684\u8BA2\u5355\uFF0C\u5177\u4F53\u91D1\u989D\u4EE5\u5404\u8BA2\u5355\u91CD\u65B0\u8BA1\u7B97\u7ED3\u679C\u4E3A\u51C6\u3002" }), _jsx(InfoNotice, { subtle: true, children: "\u5229\u6DA6\u7387\u7559\u7A7A\u4E0D\u8BBE\u7F6E\u5BA2\u6237\u9ED8\u8BA4\u503C\uFF1B\u4FE1\u7528\u989D\u5EA6\u7559\u7A7A\u4E0D\u9650\u5236\u3002\u8D85\u989D\u5C06\u963B\u6B62\u751F\u6210\u6587\u4EF6\uFF0C\u5236\u88C1\u547D\u4E2D\u9700\u4EBA\u5DE5\u6838\u5BF9\u3002" })] }) });
|
|
301
305
|
}
|
|
302
306
|
const SalesAmountDecimal = Decimal.clone({ precision: 28, rounding: Decimal.ROUND_HALF_UP });
|
|
303
307
|
export function salesOrderTotalValidation(order, value) {
|
|
@@ -335,7 +339,7 @@ export function SalesLinePricingDialog({ state, busy, onClose, onSave }) {
|
|
|
335
339
|
const [highRateConfirmed, setHighRateConfirmed] = React.useState(false);
|
|
336
340
|
const hasPricingInput = [value.salesLineAmountCny, value.salesUnitPriceCny, value.pricingProfitRate].some(item => item.trim() !== '');
|
|
337
341
|
const invalid = (Number(value.pricingProfitRate) > 100 && !highRateConfirmed) || !hasPricingInput || !validOptionalAmount(value.salesLineAmountCny) || !validOptionalAmount(value.salesUnitPriceCny) || !validOptionalRate(value.pricingProfitRate);
|
|
338
|
-
return _jsx(Modal, { open: true, title: "\u7EF4\u62A4\u5546\u54C1\u9500\u552E\u5B9A\u4EF7", size: "wide", onClose: onClose, footer: _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u53D6\u6D88"] }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: busy || invalid, onClick: () => void onSave({ ...value, pricingProfitRate: percentageToRate(value.pricingProfitRate) }), children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs("div", { className: "tcw-sales-order-dialog", children: [_jsxs("section", { children: [_jsxs(FieldGrid, { columns: 1, children: [_jsx(FormField, { label: "\u5546\u54C1\u540D\u79F0", children: _jsx("input", { disabled: true, value: line.productName }) }), _jsx(FormField, { label: "\u6570\u91CF", children: _jsx("input", { disabled: true, value: `${line.quantity}${line.unit ? ` ${line.unit}` : ''}` }) }), _jsx(FormField, { label: "\u5F53\u524D\u5B9A\u4EF7\u72B6\u6001", children: _jsx("input", { disabled: true, value: pricingStatusLabel(line.pricingStatus) }) }), _jsx(FormField, { label: "\u8BA1\u7B97\u65B9\u5F0F", manual: true, children: _jsxs("select", { value: value.pricingMethod, onChange: event => update('pricingMethod', event.target.value), children: [_jsx("option", { value: "TAX_INCLUDED_MARKUP", children: "\u91C7\u8D2D\u542B\u7A0E\u5355\u4EF7
|
|
342
|
+
return _jsx(Modal, { open: true, title: "\u7EF4\u62A4\u5546\u54C1\u9500\u552E\u5B9A\u4EF7", size: "wide", onClose: onClose, footer: _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u53D6\u6D88"] }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: busy || invalid, onClick: () => void onSave({ ...value, pricingProfitRate: percentageToRate(value.pricingProfitRate) }), children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs("div", { className: "tcw-sales-order-dialog", children: [_jsxs("section", { children: [_jsxs(FieldGrid, { columns: 1, children: [_jsx(FormField, { label: "\u5546\u54C1\u540D\u79F0", children: _jsx("input", { disabled: true, value: line.productName }) }), _jsx(FormField, { label: "\u6570\u91CF", children: _jsx("input", { disabled: true, value: `${compactDecimal(line.quantity)}${line.unit ? ` ${line.unit}` : ''}` }) }), _jsx(FormField, { label: "\u5F53\u524D\u5B9A\u4EF7\u72B6\u6001", children: _jsx("input", { disabled: true, value: pricingStatusLabel(line.pricingStatus) }) }), _jsx(FormField, { label: "\u8BA1\u7B97\u65B9\u5F0F", manual: true, children: _jsxs("select", { value: value.pricingMethod, onChange: event => update('pricingMethod', event.target.value), children: [_jsx("option", { value: "TAX_INCLUDED_MARKUP", children: "\u91C7\u8D2D\u542B\u7A0E\u5355\u4EF7 \u00D7 (1 + \u5229\u6DA6\u7387)" }), _jsx("option", { value: "TAX_EXCLUDED_MARKUP", children: "\u91C7\u8D2D\u4E0D\u542B\u7A0E\u5355\u4EF7 \u00D7 (1 + \u5229\u6DA6\u7387)" })] }) }), _jsx(FormField, { label: "\u5546\u54C1\u5229\u6DA6\u7387\uFF08%\uFF09", hint: "\u4F8B\u5982 20 \u8868\u793A 20%", manual: true, children: _jsx("input", { type: "number", min: "0", step: "0.01", value: value.pricingProfitRate, onChange: event => { update('pricingProfitRate', event.target.value); setHighRateConfirmed(false); } }) }), _jsx(FormField, { label: "\u624B\u52A8\u9500\u552E\u5355\u4EF7 CNY", manual: true, children: _jsx("input", { type: "number", min: "0", step: "0.01", value: value.salesUnitPriceCny, onChange: event => update('salesUnitPriceCny', event.target.value) }) }), _jsx(FormField, { label: "\u624B\u52A8\u9500\u552E\u91D1\u989D CNY", manual: true, children: _jsx("input", { type: "number", min: "0", step: "0.01", value: value.salesLineAmountCny, onChange: event => update('salesLineAmountCny', event.target.value) }) })] }), _jsx(HighRateConfirmation, { value: value.pricingProfitRate, checked: highRateConfirmed, onChange: setHighRateConfirmed }), _jsx(InfoNotice, { subtle: true, children: value.salesLineAmountCny.trim() !== '' || value.salesUnitPriceCny.trim() !== '' ? _jsxs(_Fragment, { children: ["\u9884\u8BA1\u624B\u52A8\u91D1\u989D\uFF1A", money(value.salesLineAmountCny.trim() !== '' ? value.salesLineAmountCny : new SalesAmountDecimal(value.salesUnitPriceCny || 0).times(line.quantity || 0).toString()), " CNY\uFF1B\u5F53\u524D\u91D1\u989D\uFF1A", money(line.salesLineAmountCny), " CNY\u3002"] }) : _jsxs(_Fragment, { children: ["\u6309\u91C7\u8D2D\u6210\u672C\u4E0E\u5229\u6DA6\u7387\u8BA1\u7B97\uFF0C\u4FDD\u5B58\u540E\u66F4\u65B0\u91D1\u989D\u3002\u5F53\u524D\u91D1\u989D\uFF1A", money(line.salesLineAmountCny), " CNY\u3002"] }) })] }), _jsxs("aside", { children: [_jsxs("dl", { children: [_jsx(SummaryValue, { label: "\u9500\u552E\u8BA2\u5355", value: order.salesOrderNo }), _jsx(SummaryValue, { label: "\u5F53\u524D\u9500\u552E\u5355\u4EF7", value: `${money(line.salesUnitPriceCny)} CNY` }), _jsx(SummaryValue, { label: "\u5F53\u524D\u9500\u552E\u91D1\u989D", value: `${money(line.salesLineAmountCny)} CNY` }), _jsx(SummaryValue, { label: "\u5F53\u524D\u5B9A\u4EF7\u6765\u6E90", value: sourceLabel(line.pricingSource) }), _jsx(SummaryValue, { label: "\u7F3A\u5C11\u5B57\u6BB5", value: line.missingPricingFields?.length ? line.missingPricingFields.map(field => ({ vatRate: '增值税率', refundRate: '退税率', pricingProfitRate: '定价利润率', effectivePricingProfitRate: '有效利润率', unitPriceTaxIncluded: '采购含税单价', quantity: '数量', englishName: '英文名称', hsCode: '海关编码' }[field] ?? field)).join('、') : '无' })] }), _jsx(InfoNotice, { children: "\u624B\u52A8\u9500\u552E\u91D1\u989D\u4F18\u5148\uFF0C\u5176\u6B21\u624B\u52A8\u9500\u552E\u5355\u4EF7\uFF0C\u6700\u540E\u4F7F\u7528\u5546\u54C1\u5229\u6DA6\u7387\u548C\u8BA1\u7B97\u65B9\u5F0F\u81EA\u52A8\u8BA1\u7B97\u3002" })] })] }) });
|
|
339
343
|
}
|
|
340
344
|
export function salesGenerationPricingPreview(response) {
|
|
341
345
|
if (isFailedActionResult(response))
|
|
@@ -359,6 +363,7 @@ export function SalesGenerateFileDialog({ order, orders, packingStatus, onReload
|
|
|
359
363
|
const [draft, setDraft] = React.useState({ currencyCode: 'CNY', fileType: initialFileType, bankType: 'OVERSEAS_CNY', templateVersion: 'DEFAULT_V1_3', fileNumber: `SF-${order.salesOrderNo}`, remarks: '', packingIds: [], packingMode: 'DRAFT' });
|
|
360
364
|
const [pricingPreview, setPricingPreview] = React.useState(null);
|
|
361
365
|
const pricingPreviewKey = salesGenerationPricingPreviewKey(order, draft, orders);
|
|
366
|
+
const workspaceRef = React.useRef(null);
|
|
362
367
|
const workflowRef = React.useRef(null);
|
|
363
368
|
const [workflow, setWorkflow] = React.useState(initialPackingWorkflow);
|
|
364
369
|
const needsPacking = draft.fileType !== 'PI';
|
|
@@ -420,7 +425,7 @@ export function SalesGenerateFileDialog({ order, orders, packingStatus, onReload
|
|
|
420
425
|
setSubmitting(false);
|
|
421
426
|
}
|
|
422
427
|
};
|
|
423
|
-
return _jsx(Modal, { open: true, title: "\u751F\u6210\u51FA\u8D27\u6587\u4EF6", size: "wide", closeDisabled: false, busy: false, onClose: onClose, footer: _jsxs(_Fragment, { children: [submitError && _jsxs("div", { className: "tcw-generation-error", role: "alert", children: [_jsx("i", { className: "ri-error-warning-line", "aria-hidden": "true" }), _jsxs("span", { children: [_jsx("strong", { children: "\u672A\u751F\u6210\u6587\u4EF6\uFF1A" }), submitError] })] }), _jsxs("span", { className: "tcw-generation-footer-context", children: [previewTypes.length, " \u4EFD\u6587\u4EF6", _jsx("span", { children: "\u00B7" }), draft.currencyCode] }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u53D6\u6D88"] }), needsPacking ? _jsx(PackingGenerationActions, { state: workflow, busy: busy || submitting, disabled: !draft.fileNumber.trim(), onPreflight: preflight, reviewWarnings: materialReview, onError: setSubmitError, onReview: () => void workflowRef.current?.openReview(), onGenerate: formal => submit(formal) }) : _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: busy || submitting || !draft.fileNumber.trim(), onClick: () => void submit(), children: [_jsx("i", { className: "ri-file-add-line", "aria-hidden": "true" }), submitting ? '生成中…' : '确认生成'] })] }), children: _jsxs("div", { className: "tcw-sales-generate-dialog tcw-generation-workspace", children: [_jsxs("div", { className: "tcw-generation-context", children: [_jsxs("div", { children: [_jsx("span", { className: "tcw-generation-context-label", children: "\u672C\u6B21\u51FA\u8D27" }), _jsx("strong", { children: order.customerName })] }), _jsxs("div", { className: "tcw-generation-context-meta", children: [_jsxs("span", { children: [summaryOrders.length, " \u4E2A\u9500\u552E\u8BA2\u5355"] }), _jsxs("span", { children: [summaryPurchaseNos.length, " \u4E2A\u91C7\u8D2D\u5408\u540C"] }), _jsxs("strong", { children: ["\u00A5", money(mergedOrders.length > 1 ? String(mergedAmount) : order.orderAmountCny)] })] }), _jsxs("details", { children: [_jsx("summary", { children: "\u67E5\u770B\u8BA2\u5355\u4E0E\u91D1\u989D" }), _jsxs("dl", { className: "tcw-sales-generate-summary", children: [_jsx(SummaryValue, { label: "\u5BA2\u6237\u540D\u79F0", value: order.customerName }), _jsx(SummaryValue, { label: mergedOrders.length > 1 ? '销售订单编号(合并)' : '销售订单编号', value: mergedOrders.length > 1 ? mergedOrders.map(item => item.salesOrderNo).join('、') : order.salesOrderNo }), _jsx(SummaryValue, { label: "\u5BA2\u6237\u5408\u540C\u7F16\u53F7", value: summaryCustomerNos.join('、') }), _jsx(SummaryValue, { label: "\u91C7\u8D2D\u5408\u540C\u53F7", value: summaryPurchaseNos.join('、') || '—' }), _jsx(SummaryValue, { label: "\u91C7\u8D2D\u5355\u6570", value: String(summaryPurchaseNos.length) }), _jsx(SummaryValue, { label: "\u9500\u552E\u8BA2\u5355\u603B\u989D\uFF08\u4EBA\u6C11\u5E01\uFF09", value: money(mergedOrders.length > 1 ? String(mergedAmount) : order.orderAmountCny) }), _jsx(SummaryValue, { label: "\u6709\u6548\u5B9A\u4EF7\u5229\u6DA6\u7387", value: salesPercent(order.effectivePricingProfitRate) })] })] })] }), _jsxs("section", { className: "tcw-generation-section", "aria-label": "\u751F\u6210\u8BBE\u7F6E", children: [_jsxs("header", { className: "tcw-generation-section-heading", children: [_jsx("span", { children: "1" }), _jsxs("div", { children: [_jsx("h3", { children: "\u751F\u6210\u8BBE\u7F6E" }), _jsx("p", { children: "\u9009\u62E9\u6587\u4EF6\u3001\u5E01\u79CD\u548C\u6536\u6B3E\u8D26\u6237\u3002" })] })] }), _jsxs("div", { className: "tcw-sales-generate-content", children: [_jsxs("section", { children: [_jsx(FormField, { label: "\u6587\u4EF6\u5E01\u79CD", required: true, hint: "\u72EC\u7ACB\u4E8E\u6536\u6B3E\u94F6\u884C", children: _jsxs("select", { value: draft.currencyCode, onChange: event => update('currencyCode', event.target.value), children: [_jsx("option", { value: "CNY", children: "CNY\uFF08\u4EBA\u6C11\u5E01\uFF09" }), _jsx("option", { value: "USD", children: "USD\uFF08\u7F8E\u5143\uFF09" })] }) }), _jsx(FormField, { label: "\u6587\u4EF6\u7C7B\u578B", required: true, children: _jsxs("select", { value: draft.fileType, onChange: event => update('fileType', event.target.value), children: [_jsx("option", { value: "ALL", children: "PI/CI/PL/\u62A5\u5173\u5355\uFF08\u672C\u6B21\u51FA\u8D27\uFF09" }), _jsx("option", { value: "PI_CI_PL", children: "PI/CI/PL" }), _jsx("option", { value: "PI", children: "PI" }), _jsx("option", { value: "CI", children: "CI" }), _jsx("option", { value: "PL", children: "PL" }), _jsx("option", { value: "CUSTOMS_DECLARATION", children: "\u62A5\u5173\u5355" })] }) }), requiresBank && _jsx(FormField, { label: "\u94F6\u884C\u4FE1\u606F", required: true, children: _jsxs("select", { value: draft.bankType, onChange: event => update('bankType', event.target.value), children: [_jsx("option", { value: "OVERSEAS_CNY", children: "\u5883\u5916\u4EBA\u6C11\u5E01\u8D26\u6237" }), _jsx("option", { value: "OVERSEAS_CNY_LANGFANG", children: "\u5883\u5916\u4EBA\u6C11\u5E01\u8D26\u6237-\u5ECA\u574A\u901A\u9053" }), _jsx("option", { value: "OVERSEAS_CNY_KUNLUN", children: "\u5883\u5916\u4EBA\u6C11\u5E01\u8D26\u6237-\u6606\u4ED1\u901A\u9053" }), _jsx("option", { value: "OVERSEAS_USD", children: "\u5883\u5916\u7F8E\u5143\u8D26\u6237" }), _jsx("option", { value: "OVERSEAS_USD_NINGBO", children: "\u5883\u5916\u7F8E\u5143\u8D26\u6237-\u5B81\u6CE2\u94F6\u884C" })] }) }), _jsx(FormField, { label: "\u6587\u4EF6\u7F16\u53F7", required: true, children: _jsx("input", { value: draft.fileNumber, onChange: event => update('fileNumber', event.target.value) }) }), _jsxs("details", { className: "tcw-generation-advanced", children: [_jsx("summary", { children: "\u66F4\u591A\u8BBE\u7F6E \u00B7 \u6A21\u677F\u4E0E\u5907\u6CE8" }), _jsxs("div", { children: [_jsx(FormField, { label: "\u6A21\u677F\u7248\u672C", required: true, children: _jsx("select", { value: draft.templateVersion, onChange: event => update('templateVersion', event.target.value), children: _jsx("option", { value: "DEFAULT_V1_3", children: "\u9ED8\u8BA4\u6A21\u677F v1.3" }) }) }), _jsx(FormField, { label: "\u5907\u6CE8", children: _jsx("textarea", { rows: 3, maxLength: 200, placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8\uFF08\u53EF\u9009\uFF0C\u81EA\u5B9A\u4E49\u8BF4\u660E\uFF09", value: draft.remarks, onChange: event => update('remarks', event.target.value) }) })] })] })] }), _jsxs("aside", { children: [_jsx("h3", { children: "\u751F\u6210\u9884\u89C8" }), _jsx("p", { children: "\u7CFB\u7EDF\u5C06\u57FA\u4E8E\u6240\u9009\u4FE1\u606F\u751F\u6210\u4EE5\u4E0B\u6587\u4EF6\uFF1A" }), _jsx("ul", { children: previewTypes.map(item => _jsxs("li", { children: [_jsx("i", { className: "ri-file-text-line", "aria-hidden": "true" }), item.label] }, item.type)) })] })] }), _jsxs("details", { className: "tcw-generation-help", children: [_jsx("summary", { children: "\u4EF7\u683C\u4E0E\u6C47\u7387\u8BF4\u660E" }), _jsx("p", { children: "\u6587\u4EF6\u4EF7\u683C\u6309\u91C7\u8D2D\u91D1\u989D CNY \u00D7 (1 + \u5229\u6DA6\u7387)\u8BA1\u7B97\uFF0C\u518D\u6309\u91C7\u8D2D\u8BA2\u5355\u6708\u4EFD\u7684\u6708\u5EA6\u6C47\u7387\u6362\u7B97\uFF1B\u7F3A\u5C11\u6C47\u7387\u8BF7\u5230\u7CFB\u7EDF\u8BBE\u7F6E\u7EF4\u62A4\u3002\u5185\u90E8\u9500\u552E\u8BA2\u5355\u4E0E\u6570\u636E\u5206\u6790\u4ECD\u4F7F\u7528 CNY\u3002" })] })] }), _jsxs("section", { className: "tcw-generation-section", "aria-label": "\u51C6\u5907\u8D44\u6599", children: [_jsxs("header", { className: "tcw-generation-section-heading", children: [_jsx("span", { children: "2" }), _jsxs("div", { children: [_jsx("h3", { children: "\u51C6\u5907\u8D44\u6599" }), _jsx("p", { children: "\u6309\u8D44\u6599\u7C7B\u578B\u4E0A\u4F20\u5E76\u6838\u5BF9\uFF0C\u5DF2\u5BA1\u6838\u8D44\u6599\u4F1A\u81EA\u52A8\u7528\u4E8E\u751F\u6210\u3002" })] })] }), _jsx(SupplierMaterialsPanel, { purchaseOrderIds: packingTargets(summaryOrders).map(row => row.purchaseOrderId), goods: [...new Map(summaryOrders.flatMap(item => item.lines).map(line => [line.purchaseOrderLineId, line])).values()], busy: busy || submitting, onAction: onSupplierMaterialAction, onImport: onImportSupplierMaterial }), (draft.fileType !== 'PI') && _jsx(PackingBatchPanel, { purchaseOrders: packingTargets(orders?.length ? orders : [order]).map(row => ({ id: row.purchaseOrderId, contractNo: row.salesOrderNo })), value: { packingIds: draft.packingIds ?? [], packingMode: draft.packingMode ?? 'DRAFT' }, onChange: value => setDraft(current => ({ ...current, ...value })), workflowRef: workflowRef, onWorkflowChange: setWorkflow, busy: busy || submitting, onImport: onImportSupplierPacking, onAction: onPackingAction })] }), _jsxs("section", { className: "tcw-generation-section tcw-generation-review-section", "aria-label": "\u751F\u6210\u524D\u6838\u5BF9", children: [_jsxs("header", { className: "tcw-generation-section-heading", children: [_jsx("span", { children: "3" }), _jsxs("div", { children: [_jsx("h3", { children: "\u751F\u6210\u524D\u6838\u5BF9" }), _jsx("p", { children: "\u751F\u6210\u65F6\u81EA\u52A8\u6821\u9A8C\u5546\u54C1\u6570\u91CF\u3001\u8D44\u6599\u4E0E\u6C47\u7387\uFF1B\u5DEE\u5F02\u53EF\u6838\u5BF9\u540E\u7EE7\u7EED\u751F\u6210\u3002" })] })] }), onPreflight && draft.fileType !== 'PL' && _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", disabled: busy || submitting, onClick: () => void preflight().catch(() => undefined), children: [_jsx("i", { className: "ri-exchange-dollar-line", "aria-hidden": "true" }), "\u67E5\u770B\u6587\u4EF6\u91D1\u989D\u4E0E\u6C47\u7387"] }), pricingPreview?.key === pricingPreviewKey && draft.fileType !== 'PL' && _jsx(SalesGenerationPricingPreview, { pricing: pricingPreview.pricing }), customsReview && ['ALL', 'CUSTOMS_DECLARATION'].includes(draft.fileType) && _jsx(CustomsCoverageSummary, { coverage: customsReview }), materialReview.length > 0 && _jsx(MaterialReviewWarnings, { warnings: materialReview }), _jsxs("details", { className: "tcw-generation-help", children: [_jsx("summary", { children: "\u751F\u6210\u89C4\u5219\u4E0E\u4EBA\u5DE5\u6838\u5BF9\u8BF4\u660E" }), _jsx("p", { children: "\u6587\u4EF6\u751F\u6210\u540E\u53EF\u4E0B\u8F7D\u5E76\u4EBA\u5DE5\u4FEE\u6539\uFF1B\u5DEE\u5F02\u6E05\u5355\u4F1A\u968F\u6587\u4EF6\u4FDD\u7559\u3002PI\u3001CI\u3001PL \u548C\u62A5\u5173\u8D44\u6599\u7684\u5546\u54C1\u6570\u91CF\u6309\u6240\u9009\u8BA2\u5355\u5168\u91CF\u751F\u6210\uFF1B\u4F9B\u5E94\u5546\u5305\u88C5\u539F\u59CB\u6570\u636E\u4FDD\u7559\u5728 PL \u5305\u88C5\u660E\u7EC6\u9875\uFF0C\u9EC4\u8272\u5355\u5143\u683C\u8BF7\u4EBA\u5DE5\u6838\u5BF9\u3002" })] })] })] }) });
|
|
428
|
+
return _jsxs(Modal, { open: true, title: "\u751F\u6210\u51FA\u8D27\u6587\u4EF6", size: "wide", closeDisabled: false, busy: false, onClose: onClose, footer: _jsxs(_Fragment, { children: [submitError && _jsxs("div", { className: "tcw-generation-error", role: "alert", children: [_jsx("i", { className: "ri-error-warning-line", "aria-hidden": "true" }), _jsxs("span", { children: [_jsx("strong", { children: "\u672A\u751F\u6210\u6587\u4EF6\uFF1A" }), submitError] })] }), _jsxs("span", { className: "tcw-generation-footer-context", children: [_jsx("strong", { title: draft.fileNumber, children: draft.fileNumber }), _jsxs("span", { children: [previewTypes.length, " \u4EFD\u6587\u4EF6 \u00B7 ", draft.currencyCode, " \u00B7 ", summaryOrders.length, " \u5355"] }), requiresBank && _jsx("small", { children: draft.bankType.includes('USD') ? '美元收款账户' : '人民币收款账户' })] }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u53D6\u6D88"] }), needsPacking ? _jsx(PackingGenerationActions, { state: workflow, busy: busy || submitting, disabled: !draft.fileNumber.trim(), onPreflight: preflight, reviewWarnings: materialReview, onError: setSubmitError, onReview: () => void workflowRef.current?.openReview(), onGenerate: formal => submit(formal) }) : _jsxs("button", { type: "button", className: "tcw-button tcw-button--primary", disabled: busy || submitting || !draft.fileNumber.trim(), onClick: () => void submit(), children: [_jsx("i", { className: "ri-file-add-line", "aria-hidden": "true" }), submitting ? '生成中…' : '确认生成'] })] }), children: [_jsx(GenerationNavigation, { workspaceRef: workspaceRef }), _jsxs("div", { ref: workspaceRef, className: "tcw-sales-generate-dialog tcw-generation-workspace", children: [_jsxs("div", { className: "tcw-generation-context", children: [_jsxs("div", { children: [_jsx("span", { className: "tcw-generation-context-label", children: "\u672C\u6B21\u51FA\u8D27" }), _jsx("strong", { children: order.customerName })] }), _jsxs("div", { className: "tcw-generation-context-meta", children: [_jsxs("span", { children: [summaryOrders.length, " \u4E2A\u9500\u552E\u8BA2\u5355"] }), _jsxs("span", { children: [summaryPurchaseNos.length, " \u4E2A\u91C7\u8D2D\u5408\u540C"] }), _jsxs("strong", { children: ["\u00A5", money(mergedOrders.length > 1 ? String(mergedAmount) : order.orderAmountCny)] })] }), _jsxs("details", { children: [_jsx("summary", { children: "\u67E5\u770B\u8BA2\u5355\u4E0E\u91D1\u989D" }), _jsxs("dl", { className: "tcw-sales-generate-summary", children: [_jsx(SummaryValue, { label: "\u5BA2\u6237\u540D\u79F0", value: order.customerName }), _jsx(SummaryValue, { label: mergedOrders.length > 1 ? '销售订单编号(合并)' : '销售订单编号', value: mergedOrders.length > 1 ? mergedOrders.map(item => item.salesOrderNo).join('、') : order.salesOrderNo }), _jsx(SummaryValue, { label: "\u5BA2\u6237\u5408\u540C\u7F16\u53F7", value: summaryCustomerNos.join('、') }), _jsx(SummaryValue, { label: "\u91C7\u8D2D\u5408\u540C\u7F16\u53F7", value: summaryPurchaseNos.join('、') || '—' }), _jsx(SummaryValue, { label: "\u91C7\u8D2D\u5355\u6570", value: String(summaryPurchaseNos.length) }), _jsx(SummaryValue, { label: "\u9500\u552E\u8BA2\u5355\u603B\u989D\uFF08\u4EBA\u6C11\u5E01\uFF09", value: money(mergedOrders.length > 1 ? String(mergedAmount) : order.orderAmountCny) }), _jsx(SummaryValue, { label: "\u6709\u6548\u5B9A\u4EF7\u5229\u6DA6\u7387", value: salesPercent(order.effectivePricingProfitRate) })] })] })] }), _jsxs("section", { className: "tcw-generation-section", "aria-label": "\u751F\u6210\u8BBE\u7F6E", "data-generation-stage": "settings", tabIndex: -1, children: [_jsxs("header", { className: "tcw-generation-section-heading", children: [_jsx("span", { children: "1" }), _jsxs("div", { children: [_jsx("h3", { children: "\u751F\u6210\u8BBE\u7F6E" }), _jsx("p", { children: "\u9009\u62E9\u6587\u4EF6\u3001\u5E01\u79CD\u548C\u6536\u6B3E\u8D26\u6237\u3002" })] })] }), _jsxs("div", { className: "tcw-sales-generate-content", children: [_jsxs("section", { children: [_jsx(FormField, { label: "\u6587\u4EF6\u5E01\u79CD", required: true, hint: "\u72EC\u7ACB\u4E8E\u6536\u6B3E\u94F6\u884C", children: _jsxs("select", { value: draft.currencyCode, onChange: event => update('currencyCode', event.target.value), children: [_jsx("option", { value: "CNY", children: "CNY\uFF08\u4EBA\u6C11\u5E01\uFF09" }), _jsx("option", { value: "USD", children: "USD\uFF08\u7F8E\u5143\uFF09" })] }) }), _jsx(FormField, { label: "\u6587\u4EF6\u7C7B\u578B", required: true, children: _jsxs("select", { value: draft.fileType, onChange: event => update('fileType', event.target.value), children: [_jsx("option", { value: "ALL", children: "PI/CI/PL/\u62A5\u5173\u5355\uFF08\u672C\u6B21\u51FA\u8D27\uFF09" }), _jsx("option", { value: "PI_CI_PL", children: "PI/CI/PL" }), _jsx("option", { value: "PI", children: "PI" }), _jsx("option", { value: "CI", children: "CI" }), _jsx("option", { value: "PL", children: "PL" }), _jsx("option", { value: "CUSTOMS_DECLARATION", children: "\u62A5\u5173\u5355" })] }) }), requiresBank && _jsx(FormField, { label: "\u94F6\u884C\u4FE1\u606F", required: true, children: _jsxs("select", { value: draft.bankType, onChange: event => update('bankType', event.target.value), children: [_jsx("option", { value: "OVERSEAS_CNY", children: "\u5883\u5916\u4EBA\u6C11\u5E01\u8D26\u6237" }), _jsx("option", { value: "OVERSEAS_CNY_LANGFANG", children: "\u5883\u5916\u4EBA\u6C11\u5E01\u8D26\u6237-\u5ECA\u574A\u901A\u9053" }), _jsx("option", { value: "OVERSEAS_CNY_KUNLUN", children: "\u5883\u5916\u4EBA\u6C11\u5E01\u8D26\u6237-\u6606\u4ED1\u901A\u9053" }), _jsx("option", { value: "OVERSEAS_USD", children: "\u5883\u5916\u7F8E\u5143\u8D26\u6237" }), _jsx("option", { value: "OVERSEAS_USD_NINGBO", children: "\u5883\u5916\u7F8E\u5143\u8D26\u6237-\u5B81\u6CE2\u94F6\u884C" })] }) }), _jsx(FormField, { label: "\u6587\u4EF6\u7F16\u53F7", required: true, children: _jsx("input", { value: draft.fileNumber, onChange: event => update('fileNumber', event.target.value) }) }), _jsxs("details", { className: "tcw-generation-advanced", children: [_jsx("summary", { children: "\u66F4\u591A\u8BBE\u7F6E \u00B7 \u6A21\u677F\u4E0E\u5907\u6CE8" }), _jsxs("div", { children: [_jsx(FormField, { label: "\u6A21\u677F\u7248\u672C", required: true, children: _jsx("select", { value: draft.templateVersion, onChange: event => update('templateVersion', event.target.value), children: _jsx("option", { value: "DEFAULT_V1_3", children: "\u9ED8\u8BA4\u6A21\u677F v1.3" }) }) }), _jsx(FormField, { label: "\u5907\u6CE8", children: _jsx("textarea", { rows: 3, maxLength: 200, placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8\uFF08\u53EF\u9009\uFF0C\u81EA\u5B9A\u4E49\u8BF4\u660E\uFF09", value: draft.remarks, onChange: event => update('remarks', event.target.value) }) })] })] })] }), _jsxs("aside", { children: [_jsx("h3", { children: "\u751F\u6210\u9884\u89C8" }), _jsx("p", { children: "\u7CFB\u7EDF\u5C06\u57FA\u4E8E\u6240\u9009\u4FE1\u606F\u751F\u6210\u4EE5\u4E0B\u6587\u4EF6\uFF1A" }), _jsx("ul", { children: previewTypes.map(item => _jsxs("li", { children: [_jsx("i", { className: "ri-file-text-line", "aria-hidden": "true" }), item.label] }, item.type)) })] })] }), _jsxs("details", { className: "tcw-generation-help", children: [_jsx("summary", { children: "\u4EF7\u683C\u4E0E\u6C47\u7387\u8BF4\u660E" }), _jsx("p", { children: "\u6587\u4EF6\u4EF7\u683C\u6309\u91C7\u8D2D\u91D1\u989D CNY \u00D7 (1 + \u5229\u6DA6\u7387)\u8BA1\u7B97\uFF0C\u518D\u6309\u91C7\u8D2D\u8BA2\u5355\u6708\u4EFD\u7684\u6708\u5EA6\u6C47\u7387\u6362\u7B97\uFF1B\u7F3A\u5C11\u6C47\u7387\u8BF7\u5230\u7CFB\u7EDF\u8BBE\u7F6E\u7EF4\u62A4\u3002\u5185\u90E8\u9500\u552E\u8BA2\u5355\u4E0E\u6570\u636E\u5206\u6790\u4ECD\u4F7F\u7528 CNY\u3002" })] })] }), _jsxs("section", { className: "tcw-generation-section", "aria-label": "\u51C6\u5907\u8D44\u6599", "data-generation-stage": "materials", tabIndex: -1, children: [_jsxs("header", { className: "tcw-generation-section-heading", children: [_jsx("span", { children: "2" }), _jsxs("div", { children: [_jsx("h3", { children: "\u51C6\u5907\u8D44\u6599" }), _jsx("p", { children: "\u6309\u8D44\u6599\u7C7B\u578B\u4E0A\u4F20\u5E76\u6838\u5BF9\uFF0C\u5DF2\u5BA1\u6838\u8D44\u6599\u4F1A\u81EA\u52A8\u7528\u4E8E\u751F\u6210\u3002" })] })] }), _jsx(SupplierMaterialsPanel, { purchaseOrderIds: packingTargets(summaryOrders).map(row => row.purchaseOrderId), goods: [...new Map(summaryOrders.flatMap(item => item.lines).map(line => [line.purchaseOrderLineId, line])).values()], busy: busy || submitting, onAction: onSupplierMaterialAction, onImport: onImportSupplierMaterial }), (draft.fileType !== 'PI') && _jsx(PackingBatchPanel, { purchaseOrders: packingTargets(orders?.length ? orders : [order]).map(row => ({ id: row.purchaseOrderId, contractNo: row.salesOrderNo })), value: { packingIds: draft.packingIds ?? [], packingMode: draft.packingMode ?? 'DRAFT' }, onChange: value => setDraft(current => ({ ...current, ...value })), workflowRef: workflowRef, onWorkflowChange: setWorkflow, busy: busy || submitting, onImport: onImportSupplierPacking, onAction: onPackingAction })] }), _jsxs("section", { className: "tcw-generation-section tcw-generation-review-section", "aria-label": "\u751F\u6210\u524D\u6838\u5BF9", "data-generation-stage": "review", tabIndex: -1, children: [_jsxs("header", { className: "tcw-generation-section-heading", children: [_jsx("span", { children: "3" }), _jsxs("div", { children: [_jsx("h3", { children: "\u751F\u6210\u524D\u6838\u5BF9" }), _jsx("p", { children: "\u751F\u6210\u65F6\u81EA\u52A8\u6821\u9A8C\u5546\u54C1\u6570\u91CF\u3001\u8D44\u6599\u4E0E\u6C47\u7387\uFF1B\u5DEE\u5F02\u53EF\u6838\u5BF9\u540E\u7EE7\u7EED\u751F\u6210\u3002" })] })] }), onPreflight && draft.fileType !== 'PL' && _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", disabled: busy || submitting, onClick: () => void preflight().catch(() => undefined), children: [_jsx("i", { className: "ri-exchange-dollar-line", "aria-hidden": "true" }), "\u67E5\u770B\u6587\u4EF6\u91D1\u989D\u4E0E\u6C47\u7387"] }), pricingPreview?.key === pricingPreviewKey && draft.fileType !== 'PL' && _jsx(SalesGenerationPricingPreview, { pricing: pricingPreview.pricing }), customsReview && ['ALL', 'CUSTOMS_DECLARATION'].includes(draft.fileType) && _jsx(CustomsCoverageSummary, { coverage: customsReview }), materialReview.length > 0 && _jsx(MaterialReviewWarnings, { warnings: materialReview }), _jsxs("details", { className: "tcw-generation-help", children: [_jsx("summary", { children: "\u751F\u6210\u89C4\u5219\u4E0E\u4EBA\u5DE5\u6838\u5BF9\u8BF4\u660E" }), _jsx("p", { children: "\u6587\u4EF6\u751F\u6210\u540E\u53EF\u4E0B\u8F7D\u5E76\u4EBA\u5DE5\u4FEE\u6539\uFF1B\u5DEE\u5F02\u6E05\u5355\u4F1A\u968F\u6587\u4EF6\u4FDD\u7559\u3002PI\u3001CI\u3001PL \u548C\u62A5\u5173\u8D44\u6599\u7684\u5546\u54C1\u6570\u91CF\u6309\u6240\u9009\u8BA2\u5355\u5168\u91CF\u751F\u6210\uFF1B\u4F9B\u5E94\u5546\u5305\u88C5\u539F\u59CB\u6570\u636E\u4FDD\u7559\u5728 PL \u5305\u88C5\u660E\u7EC6\u9875\uFF0C\u9EC4\u8272\u5355\u5143\u683C\u8BF7\u4EBA\u5DE5\u6838\u5BF9\u3002" })] })] })] })] });
|
|
424
429
|
}
|
|
425
430
|
export function salesGenerationPreviewTypes(fileType) {
|
|
426
431
|
const all = [
|
|
@@ -462,8 +467,8 @@ function creditRemainingView(row) {
|
|
|
462
467
|
return _jsx("span", { className: className, title: tier === 'danger' ? '未收款已超出信用额度' : tier === 'warning' ? '剩余信用额度不足 20%' : undefined, children: money(row.remainingCreditCny) });
|
|
463
468
|
}
|
|
464
469
|
function displayText(value) { return value == null || value === '' ? '—' : String(value); }
|
|
465
|
-
function dateTimeText(value) {
|
|
466
|
-
function Status({ value, count }) { return _jsx("span", { className: `tcw-tag${value === 'HIT' ? ' tcw-tag--danger' : value === 'CLEAR' ? ' tcw-tag--success' : ''}`, children: value === 'HIT' ? `命中制裁名单 · ${count
|
|
470
|
+
function dateTimeText(value) { const timestamp = formatBeijingDateTime(value); return timestamp === '—' ? formatBusinessDate(value) : timestamp; }
|
|
471
|
+
function Status({ value, count }) { return _jsx("span", { className: `tcw-tag${value === 'HIT' ? ' tcw-tag--danger' : value === 'CLEAR' ? ' tcw-tag--success' : ''}`, children: value === 'HIT' ? (count != null && count > 0 ? `命中制裁名单 · ${count} 项` : '命中制裁名单') : value === 'CLEAR' ? '未命中' : '待核验' }); }
|
|
467
472
|
function RelatedProductRiskStatus({ status, dualUseLineCount, overseasSanctionLineCount }) {
|
|
468
473
|
if (status !== 'HIT')
|
|
469
474
|
return _jsx("span", { className: `tcw-tag${status === 'CLEAR' ? ' tcw-tag--success' : ''}`, children: status === 'CLEAR' ? '未命中' : '待核验' });
|