@chenchaolong/plugin-trade-compliance-workbench 1.0.128 → 1.0.129

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.
@@ -1 +1 @@
1
- {"version":3,"file":"source-file-preview.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote-ui/components/source-file-preview.tsx"],"names":[],"mappings":"AACA,MAAM,MAAM,oBAAoB,GAAG;IAAE,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;KAAE,CAAC,CAAC,CAAC;IAAC,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAAA;AAE9Q,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC,QAA4B;AAEzH,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,CAAC,EAAE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AAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7C,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,sBAAsB,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CAW7E"}
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { createPortal } from 'react-dom';
3
4
  let runtimeLoader = null;
4
5
  export function configureSourceFilePreviewRuntime(loader) { runtimeLoader = loader; }
5
6
  export function SourceFilePreview({ source, fileName }) {
@@ -25,6 +26,7 @@ function PdfBrowserPreview({ url, fileName }) {
25
26
  const [pageNumbers, setPageNumbers] = React.useState([]);
26
27
  const [pageCount, setPageCount] = React.useState(0);
27
28
  const [zoom, setZoom] = React.useState(1.25);
29
+ const [fullscreen, setFullscreen] = React.useState(false);
28
30
  const [error, setError] = React.useState('');
29
31
  React.useEffect(() => {
30
32
  let cancelled = false;
@@ -54,13 +56,29 @@ function PdfBrowserPreview({ url, fileName }) {
54
56
  URL.revokeObjectURL(page);
55
57
  };
56
58
  }, [pages]);
59
+ React.useEffect(() => {
60
+ if (!fullscreen || typeof document === 'undefined')
61
+ return;
62
+ const { body } = document;
63
+ const previousOverflow = body.style.overflow;
64
+ body.style.overflow = 'hidden';
65
+ const onKeyDown = (event) => { if (event.key === 'Escape')
66
+ setFullscreen(false); };
67
+ document.addEventListener('keydown', onKeyDown);
68
+ return () => {
69
+ document.removeEventListener('keydown', onKeyDown);
70
+ body.style.overflow = previousOverflow;
71
+ };
72
+ }, [fullscreen]);
57
73
  const zoomLabel = `${Math.round(zoom * 100)}%`;
58
74
  const zoomStyle = { ['--tcw-source-pdf-zoom']: zoom };
59
75
  if (error)
60
76
  return _jsx(PreviewFailure, { fileName: fileName, message: error });
61
- return (_jsxs("section", { className: "tcw-source-pdf-viewer", style: zoomStyle, children: [_jsxs("header", { className: "tcw-source-preview-toolbar", "aria-label": "\u5408\u540C\u9884\u89C8", children: [_jsx("strong", { children: fileName }), _jsxs("div", { className: "tcw-source-preview-toolbar-actions", children: [_jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u7F29\u5C0F", onClick: () => setZoom((value) => Math.max(0.75, Math.round((value - 0.25) * 100) / 100)), children: _jsx("i", { className: "ri-zoom-out-line", "aria-hidden": "true" }) }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u91CD\u7F6E\u7F29\u653E", onClick: () => setZoom(1.25), children: [_jsx("i", { className: "ri-zoom-in-line", "aria-hidden": "true" }), zoomLabel] }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u653E\u5927", onClick: () => setZoom((value) => Math.min(2, Math.round((value + 0.25) * 100) / 100)), children: _jsx("i", { className: "ri-zoom-in-line", "aria-hidden": "true" }) })] })] }), !pages.length
62
- ? _jsx("div", { className: "tcw-source-preview-loading", role: "status", children: "\u6B63\u5728\u751F\u6210 PDF \u9884\u89C8..." })
63
- : _jsx("div", { className: "tcw-source-pdf-pages", children: pages.map((page, index) => _jsxs("figure", { children: [_jsx("img", { src: page, alt: `${fileName} 第 ${pageNumbers[index]} 页` }), _jsxs("figcaption", { children: ["\u7B2C ", pageNumbers[index], " \u9875", pageCount > pages.length && index === pages.length - 1 ? ` / 共 ${pageCount} 页` : ''] })] }, `${index}-${page.length}`)) })] }));
77
+ return (_jsxs(_Fragment, { children: [_jsxs("section", { className: `tcw-source-pdf-viewer${fullscreen ? ' is-fullscreen' : ''}`, style: zoomStyle, children: [_jsxs("header", { className: "tcw-source-preview-toolbar", "aria-label": "\u5408\u540C\u9884\u89C8", children: [_jsx("strong", { children: fileName }), _jsxs("div", { className: "tcw-source-preview-toolbar-actions", children: [_jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u7F29\u5C0F", onClick: () => setZoom((value) => Math.max(0.75, Math.round((value - 0.25) * 100) / 100)), children: _jsx("i", { className: "ri-zoom-out-line", "aria-hidden": "true" }) }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u91CD\u7F6E\u7F29\u653E", onClick: () => setZoom(1.25), children: [_jsx("i", { className: "ri-zoom-in-line", "aria-hidden": "true" }), zoomLabel] }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u653E\u5927", onClick: () => setZoom((value) => Math.min(2, Math.round((value + 0.25) * 100) / 100)), children: _jsx("i", { className: "ri-zoom-in-line", "aria-hidden": "true" }) }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": fullscreen ? '退出全屏' : '全屏预览', onClick: () => setFullscreen((value) => !value), children: _jsx("i", { className: fullscreen ? 'ri-fullscreen-exit-line' : 'ri-fullscreen-line', "aria-hidden": "true" }) })] })] }), !pages.length
78
+ ? _jsx("div", { className: "tcw-source-preview-loading", role: "status", children: "\u6B63\u5728\u751F\u6210 PDF \u9884\u89C8..." })
79
+ : _jsx("div", { className: "tcw-source-pdf-pages", children: pages.map((page, index) => _jsxs("figure", { children: [_jsx("img", { src: page, alt: `${fileName} 第 ${pageNumbers[index]} 页` }), _jsxs("figcaption", { children: ["\u7B2C ", pageNumbers[index], " \u9875", pageCount > pages.length && index === pages.length - 1 ? ` / 共 ${pageCount} 页` : ''] })] }, `${index}-${page.length}`)) })] }), fullscreen && typeof document !== 'undefined' ? createPortal(_jsx("div", { className: "tcw-source-pdf-fullscreen-backdrop", role: "presentation", onClick: () => setFullscreen(false), children: _jsxs("section", { className: "tcw-source-pdf-viewer tcw-source-pdf-viewer--fullscreen", style: zoomStyle, role: "dialog", "aria-modal": "true", "aria-label": "\u5408\u540C\u5168\u5C4F\u9884\u89C8", onClick: (event) => event.stopPropagation(), children: [_jsxs("header", { className: "tcw-source-preview-toolbar", "aria-label": "\u5408\u540C\u9884\u89C8", children: [_jsx("strong", { children: fileName }), _jsxs("div", { className: "tcw-source-preview-toolbar-actions", children: [_jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u7F29\u5C0F", onClick: () => setZoom((value) => Math.max(0.75, Math.round((value - 0.25) * 100) / 100)), children: _jsx("i", { className: "ri-zoom-out-line", "aria-hidden": "true" }) }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u91CD\u7F6E\u7F29\u653E", onClick: () => setZoom(1.25), children: [_jsx("i", { className: "ri-zoom-in-line", "aria-hidden": "true" }), zoomLabel] }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u653E\u5927", onClick: () => setZoom((value) => Math.min(2, Math.round((value + 0.25) * 100) / 100)), children: _jsx("i", { className: "ri-zoom-in-line", "aria-hidden": "true" }) }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary", "aria-label": "\u9000\u51FA\u5168\u5C4F", onClick: () => setFullscreen(false), children: _jsx("i", { className: "ri-fullscreen-exit-line", "aria-hidden": "true" }) })] })] }), !pages.length
80
+ ? _jsx("div", { className: "tcw-source-preview-loading", role: "status", children: "\u6B63\u5728\u751F\u6210 PDF \u9884\u89C8..." })
81
+ : _jsx("div", { className: "tcw-source-pdf-pages", children: pages.map((page, index) => _jsxs("figure", { children: [_jsx("img", { src: page, alt: `${fileName} 第 ${pageNumbers[index]} 页` }), _jsxs("figcaption", { children: ["\u7B2C ", pageNumbers[index], " \u9875", pageCount > pages.length && index === pages.length - 1 ? ` / 共 ${pageCount} 页` : ''] })] }, `${index}-${page.length}`)) })] }) }), document.body) : null] }));
64
82
  }
65
83
  function SpreadsheetBrowserPreview({ url, fileName }) {
66
84
  const [sheets, setSheets] = React.useState([]);
@@ -1 +1 @@
1
- {"version":3,"file":"source-file-preview.js","sourceRoot":"","sources":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E,EAAE,MAAM,EAAE,IAAI,EAAE,GAAI,CAAA;AAC3F,CAAC;AAED,SAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAyC;IAClF,OAAO,eAAK,SAAS,EAAC,4BAA4B,aAAC,6BAAS,QAAQ,iCAAe,EAAA,0BAAQ,OAAO,GAAS,EAAA,qIAAgC,IAAM,CAAA;AACnJ,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB,EAAE,QAAgB,IAAI,OAAO,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC,CAAC;AACvK,SAAS,MAAM,CAAC,QAAgB,EAAE,QAAgB,IAAI,OAAO,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC,CAAC;AACjI,SAAS,gBAAgB,CAAC,QAAgB,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IAAE,OAAO,iBAAiB,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;IAAE,OAAO,mEAAmE,CAAC,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IAAE,OAAO,0BAA0B,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;IAAE,OAAO,yEAAyE,CAAC,CAAC,OAAO,EAAE,CAAA,CAAC,CAAC"}
@@ -644,8 +644,8 @@ export function SupplierDialog({ state, busy, onClose, onSave }) {
644
644
  const fields = [
645
645
  ['code', '供应商代码'], ['name', '供应商名称', true], ['shortName', '简称'], ['countryOrRegion', '国别/地区'], ['contactName', '联系人'], ['phone', '联系电话'], ['wechat', '微信'], ['email', '邮箱'], ['address', '地址'], ['taxNumber', '税号'], ['paymentAccount', '收款账号'], ['bankName', '开户行'], ['taxpayerRating', '纳税等级'], ['website', '公司网站'], ['businessProducts', '经营产品']
646
646
  ];
647
- return _jsxs(_Fragment, { children: [_jsxs(Modal, { open: true, title: state.mode === 'detail' ? '供应商详情' : '供应商详情审核', size: "wide", onClose: onClose, footer: disabled ? _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u5173\u95ED"] }) : _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, onClick: submit, children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: [_jsxs("p", { className: "tcw-procurement-dialog-kicker", children: ["\u6765\u6E90\uFF1A\u91C7\u8D2D\u5408\u540C\u5F52\u5E76 ", _jsxs("span", { children: ["\u6700\u8FD1\u5236\u88C1\u68C0\u67E5\uFF1A", value.complianceCheckedAt ? formatBeijingDateTime(value.complianceCheckedAt) : '尚未检查'] })] }), _jsxs("div", { className: "tcw-procurement-supplier-review", children: [_jsx(FieldGrid, { columns: 1, children: fields.map(([key, label, required]) => _jsx(FormField, { label: label, required: required, error: key === 'name' ? fieldErrors.name : undefined, showErrorMessage: false, children: _jsx("input", { disabled: disabled, value: String(value[key] ?? ''), "aria-invalid": key === 'name' && fieldErrors.name ? true : undefined, onChange: (event) => { if (key === 'name')
648
- setFieldErrors({}); setValue({ ...value, [key]: event.target.value }); } }) }, key)) }), _jsxs("aside", { children: [_jsx(FormField, { label: "\u5907\u6CE8", children: _jsx("textarea", { rows: 6, disabled: disabled, value: value.remarks ?? '', onChange: (event) => setValue({ ...value, remarks: event.target.value }) }) }), _jsxs("dl", { children: [_jsxs("div", { children: [_jsx("dt", { children: "\u5236\u88C1\u98CE\u9669" }), _jsx("dd", { children: _jsx(StatusTag, { tone: value.sanctionStatus === 'HIT' ? 'danger' : 'success', children: sanctionLabels[value.sanctionStatus ?? 'UNCHECKED'] }) })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u521B\u5EFA\u4EBA" }), _jsx("dd", { children: value.createdByName || '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u521B\u5EFA\u65F6\u95F4" }), _jsx("dd", { children: formatBeijingDateTime(value.createdAt) })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u6700\u540E\u7F16\u8F91\u4EBA" }), _jsx("dd", { children: value.updatedByName || '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u6700\u540E\u7F16\u8F91\u65F6\u95F4" }), _jsx("dd", { children: formatBeijingDateTime(value.updatedAt) })] })] }), _jsx(InfoNotice, { children: "\u5236\u88C1\u98CE\u9669\u4E3A\u7CFB\u7EDF\u6700\u8FD1\u4E00\u6B21\u68C0\u67E5\u7ED3\u679C\uFF0C\u4FDD\u5B58\u540E\u5C06\u89E6\u53D1\u65B0\u7684\u5236\u88C1\u68C0\u67E5\u3002" })] })] })] }), _jsx(ValidationErrorDialog, { open: validationMessages.length > 0, messages: validationMessages, onClose: () => setValidationMessages([]) })] });
647
+ return _jsx(_Fragment, { children: _jsxs(Modal, { open: true, title: state.mode === 'detail' ? '供应商详情' : '供应商详情审核', size: "wide", onClose: onClose, footer: disabled ? _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u5173\u95ED"] }) : _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, onClick: submit, children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: [validationMessages.length > 0 && _jsxs("div", { className: "tcw-procurement-validation-inline", children: [_jsx(RiskNotice, { children: validationMessages.length > 1 ? `请先处理以下 ${validationMessages.length} 个问题` : '请先处理以下问题' }), _jsx("ul", { children: validationMessages.map((message) => _jsx("li", { children: message }, message)) })] }), _jsxs("p", { className: "tcw-procurement-dialog-kicker", children: ["\u6765\u6E90\uFF1A\u91C7\u8D2D\u5408\u540C\u5F52\u5E76 ", _jsxs("span", { children: ["\u6700\u8FD1\u5236\u88C1\u68C0\u67E5\uFF1A", value.complianceCheckedAt ? formatBeijingDateTime(value.complianceCheckedAt) : '尚未检查'] })] }), _jsxs("div", { className: "tcw-procurement-supplier-review", children: [_jsx(FieldGrid, { columns: 1, children: fields.map(([key, label, required]) => _jsx(FormField, { label: label, required: required, error: key === 'name' ? fieldErrors.name : undefined, showErrorMessage: false, children: _jsx("input", { disabled: disabled, value: String(value[key] ?? ''), "aria-invalid": key === 'name' && fieldErrors.name ? true : undefined, onChange: (event) => { if (key === 'name')
648
+ setFieldErrors({}); setValue({ ...value, [key]: event.target.value }); } }) }, key)) }), _jsxs("aside", { children: [_jsx(FormField, { label: "\u5907\u6CE8", children: _jsx("textarea", { rows: 6, disabled: disabled, value: value.remarks ?? '', onChange: (event) => setValue({ ...value, remarks: event.target.value }) }) }), _jsxs("dl", { children: [_jsxs("div", { children: [_jsx("dt", { children: "\u5236\u88C1\u98CE\u9669" }), _jsx("dd", { children: _jsx(StatusTag, { tone: value.sanctionStatus === 'HIT' ? 'danger' : 'success', children: sanctionLabels[value.sanctionStatus ?? 'UNCHECKED'] }) })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u521B\u5EFA\u4EBA" }), _jsx("dd", { children: value.createdByName || '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u521B\u5EFA\u65F6\u95F4" }), _jsx("dd", { children: formatBeijingDateTime(value.createdAt) })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u6700\u540E\u7F16\u8F91\u4EBA" }), _jsx("dd", { children: value.updatedByName || '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u6700\u540E\u7F16\u8F91\u65F6\u95F4" }), _jsx("dd", { children: formatBeijingDateTime(value.updatedAt) })] })] }), _jsx(InfoNotice, { children: "\u5236\u88C1\u98CE\u9669\u4E3A\u7CFB\u7EDF\u6700\u8FD1\u4E00\u6B21\u68C0\u67E5\u7ED3\u679C\uFF0C\u4FDD\u5B58\u540E\u5C06\u89E6\u53D1\u65B0\u7684\u5236\u88C1\u68C0\u67E5\u3002" })] })] })] }) });
649
649
  }
650
650
  export function OrderDialog({ state, lines, busy, onClose, onSave }) {
651
651
  const [value, setValue] = React.useState(state?.item ?? null);
@@ -685,7 +685,7 @@ export function OrderDialog({ state, lines, busy, onClose, onSave }) {
685
685
  setValidationMessages([]);
686
686
  void onSave(value);
687
687
  };
688
- return _jsxs(_Fragment, { children: [_jsx(Modal, { open: true, title: disabled ? '采购订单详情' : '采购订单审核', size: "wide", onClose: onClose, footer: disabled ? _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u5173\u95ED"] }) : _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, onClick: submit, children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs(FieldGrid, { columns: 2, children: [_jsx(FormField, { label: "\u91C7\u8D2D\u5408\u540C\u7F16\u53F7", required: true, children: _jsx("input", { disabled: true, value: value.contractNo }) }), _jsx(TextField, { label: "\u4E0B\u5355\u65E5\u671F", required: true, type: "date", disabled: disabled, value: value.orderDate, error: fieldErrors.orderDate, onChange: (next) => { setFieldErrors(current => ({ ...current, orderDate: undefined })); setValue({ ...value, orderDate: next }); } }), _jsx(MoneyField, { label: "\u91C7\u8D2D\u8BA2\u5355\u603B\u989D", disabled: disabled, value: value.contractAmountCny, onChange: (next) => setValue({ ...value, contractAmountCny: next }) }), _jsx(MoneyField, { label: "\u5DF2\u4ED8\u6B3E", disabled: disabled, value: value.paidAmountCny, error: fieldErrors.paidAmountCny, onChange: (next) => { setFieldErrors(current => ({ ...current, paidAmountCny: undefined })); setValue({ ...value, paidAmountCny: next }); } }), _jsx(MoneyField, { label: "\u672A\u4ED8\u6B3E", disabled: true, value: String(Math.max(amount(value.contractAmountCny) - amount(value.paidAmountCny), 0)) }), _jsx(MoneyField, { label: "\u5DF2\u9000\u7A0E", disabled: disabled, value: value.refundedAmountCny, error: fieldErrors.refundedAmountCny, onChange: (next) => { setFieldErrors(current => ({ ...current, refundedAmountCny: undefined })); setValue({ ...value, refundedAmountCny: next }); } }), _jsx(MoneyField, { label: "\u9884\u8BA1\u9000\u7A0E\u603B\u989D", disabled: true, value: estimated }), _jsx(MoneyField, { label: "\u672A\u9000\u7A0E", disabled: true, value: String(Math.max(amount(estimated) - amount(value.refundedAmountCny), 0)) }), _jsx(FormField, { label: "\u5339\u914D\u5BA2\u6237\u5408\u540C", children: _jsx("input", { disabled: true, value: value.customerContractNo || '未关联' }) }), _jsx(FormField, { label: "\u6765\u6E90\u6587\u4EF6", children: _jsx("input", { disabled: true, value: value.sourceFileName || '—' }) })] }) }), _jsx(ValidationErrorDialog, { open: validationMessages.length > 0, messages: validationMessages, onClose: () => setValidationMessages([]) })] });
688
+ return _jsx(_Fragment, { children: _jsxs(Modal, { open: true, title: disabled ? '采购订单详情' : '采购订单审核', size: "wide", onClose: onClose, footer: disabled ? _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: onClose, children: [_jsx("i", { className: "ri-close-line", "aria-hidden": "true" }), "\u5173\u95ED"] }) : _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, onClick: submit, children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: [validationMessages.length > 0 && _jsxs("div", { className: "tcw-procurement-validation-inline", children: [_jsx(RiskNotice, { children: validationMessages.length > 1 ? `请先处理以下 ${validationMessages.length} 个问题` : '请先处理以下问题' }), _jsx("ul", { children: validationMessages.map((message) => _jsx("li", { children: message }, message)) })] }), _jsxs(FieldGrid, { columns: 2, children: [_jsx(FormField, { label: "\u91C7\u8D2D\u5408\u540C\u7F16\u53F7", required: true, children: _jsx("input", { disabled: true, value: value.contractNo }) }), _jsx(TextField, { label: "\u4E0B\u5355\u65E5\u671F", required: true, type: "date", disabled: disabled, value: value.orderDate, error: fieldErrors.orderDate, onChange: (next) => { setFieldErrors(current => ({ ...current, orderDate: undefined })); setValue({ ...value, orderDate: next }); } }), _jsx(MoneyField, { label: "\u91C7\u8D2D\u8BA2\u5355\u603B\u989D", disabled: disabled, value: value.contractAmountCny, onChange: (next) => setValue({ ...value, contractAmountCny: next }) }), _jsx(MoneyField, { label: "\u5DF2\u4ED8\u6B3E", disabled: disabled, value: value.paidAmountCny, error: fieldErrors.paidAmountCny, onChange: (next) => { setFieldErrors(current => ({ ...current, paidAmountCny: undefined })); setValue({ ...value, paidAmountCny: next }); } }), _jsx(MoneyField, { label: "\u672A\u4ED8\u6B3E", disabled: true, value: String(Math.max(amount(value.contractAmountCny) - amount(value.paidAmountCny), 0)) }), _jsx(MoneyField, { label: "\u5DF2\u9000\u7A0E", disabled: disabled, value: value.refundedAmountCny, error: fieldErrors.refundedAmountCny, onChange: (next) => { setFieldErrors(current => ({ ...current, refundedAmountCny: undefined })); setValue({ ...value, refundedAmountCny: next }); } }), _jsx(MoneyField, { label: "\u9884\u8BA1\u9000\u7A0E\u603B\u989D", disabled: true, value: estimated }), _jsx(MoneyField, { label: "\u672A\u9000\u7A0E", disabled: true, value: String(Math.max(amount(estimated) - amount(value.refundedAmountCny), 0)) }), _jsx(FormField, { label: "\u5339\u914D\u5BA2\u6237\u5408\u540C", children: _jsx("input", { disabled: true, value: value.customerContractNo || '未关联' }) }), _jsx(FormField, { label: "\u6765\u6E90\u6587\u4EF6", children: _jsx("input", { disabled: true, value: value.sourceFileName || '—' }) })] })] }) });
689
689
  }
690
690
  export function LineDialog({ state, order, busy, onAction, onClose, onSave }) {
691
691
  const [value, setValue] = React.useState(state?.item ?? null);
@@ -724,7 +724,7 @@ export function LineDialog({ state, order, busy, onAction, onClose, onSave }) {
724
724
  setValue(next);
725
725
  setHsOpen(false);
726
726
  };
727
- return _jsxs(_Fragment, { children: [_jsx(Modal, { open: true, title: state.mode === 'create' ? '新增商品' : '采购商品审核', 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, onClick: submit, children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs("div", { className: "tcw-procurement-line-form", children: [_jsxs("div", { className: "tcw-procurement-source-label", children: ["\u6765\u6E90\u7C7B\u578B\uFF1A", sourceTypeLabels[value.sourceType]] }), _jsxs(FieldGrid, { columns: 2, children: [_jsx(TextField, { label: "\u5546\u54C1\u540D\u79F0", required: true, value: value.productName, error: fieldErrors.productName, onChange: (next) => { setFieldErrors(current => ({ ...current, productName: undefined })); setValue({ ...value, productName: next }); } }), _jsx(TextField, { label: "\u5546\u54C1\u63CF\u8FF0", value: value.productDescription, onChange: (next) => setValue({ ...value, productDescription: next }) }), _jsx(TextField, { label: "\u89C4\u683C\u578B\u53F7", value: value.modelSpecification, onChange: (next) => setValue({ ...value, modelSpecification: next }) }), _jsx(TextField, { label: "\u5355\u4F4D", required: true, value: value.unit, onChange: (next) => setValue({ ...value, unit: next }) }), _jsx(TextField, { label: "\u6570\u91CF", required: true, type: "number", value: value.quantity, error: fieldErrors.quantity, onChange: (next) => { setFieldErrors(current => ({ ...current, quantity: undefined })); setValue({ ...value, quantity: next, lineAmountTaxIncluded: String(amount(next) * amount(value.unitPriceTaxIncluded)) }); } }), _jsx(TextField, { label: "\u542B\u7A0E\u5355\u4EF7\uFF08\u4EBA\u6C11\u5E01\uFF09", required: true, type: "number", value: value.unitPriceTaxIncluded, error: fieldErrors.unitPriceTaxIncluded, onChange: (next) => { setFieldErrors(current => ({ ...current, unitPriceTaxIncluded: undefined })); setValue({ ...value, unitPriceTaxIncluded: next, lineAmountTaxIncluded: String(amount(value.quantity) * amount(next)) }); } }), _jsx(TextField, { label: "\u542B\u7A0E\u91D1\u989D\uFF08\u4EBA\u6C11\u5E01\uFF09", required: true, type: "number", value: value.lineAmountTaxIncluded || String(computedAmount), error: fieldErrors.lineAmountTaxIncluded, onChange: (next) => { setFieldErrors(current => ({ ...current, lineAmountTaxIncluded: undefined })); setValue({ ...value, lineAmountTaxIncluded: next }); } }), _jsx(TextField, { label: "\u589E\u503C\u7A0E\u7387", type: "number", min: 0, max: 1, step: "0.0001", value: value.vatRate, error: fieldErrors.vatRate, onChange: (next) => { setFieldErrors(current => ({ ...current, vatRate: undefined })); setValue({ ...value, vatRate: next }); } }), _jsx(FormField, { label: "\u6D77\u5173\u7F16\u7801", children: _jsxs("div", { className: "tcw-procurement-inline-field", children: [_jsx("input", { value: value.hsCode ?? '', onChange: (event) => setValue(applyManualHsCode(value, event.target.value)) }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: () => setHsOpen(true), children: [_jsx("i", { className: "ri-search-line", "aria-hidden": "true" }), "HS\u7F16\u7801\u67E5\u8BE2"] })] }) }), _jsx(TextField, { label: "\u9000\u7A0E\u7387", required: true, type: "number", min: 0, max: 1, step: "0.0001", value: value.refundRate, error: fieldErrors.refundRate, onChange: (next) => { setFieldErrors(current => ({ ...current, refundRate: undefined })); setValue({ ...value, refundRate: next }); } }), _jsx(TextField, { label: "\u82F1\u6587\u540D\u79F0", value: value.englishName, onChange: (next) => setValue({ ...value, englishName: next }) })] })] }) }), _jsx(ValidationErrorDialog, { open: validationMessages.length > 0, messages: validationMessages, onClose: () => setValidationMessages([]) }), _jsx(HsCodeLookupDialog, { open: hsOpen, initialQuery: value.hsCode || value.englishName || value.productName, onAction: hsAction, onClose: () => setHsOpen(false), onBind: bindHsCode })] });
727
+ return _jsxs(_Fragment, { children: [_jsx(Modal, { open: true, title: state.mode === 'create' ? '新增商品' : '采购商品审核', 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, onClick: submit, children: [_jsx("i", { className: "ri-save-line", "aria-hidden": "true" }), "\u4FDD\u5B58"] })] }), children: _jsxs("div", { className: "tcw-procurement-line-form", children: [_jsxs("div", { className: "tcw-procurement-source-label", children: ["\u6765\u6E90\u7C7B\u578B\uFF1A", sourceTypeLabels[value.sourceType]] }), validationMessages.length > 0 && _jsxs("div", { className: "tcw-procurement-validation-inline", children: [_jsx(RiskNotice, { children: validationMessages.length > 1 ? `请先处理以下 ${validationMessages.length} 个问题` : '请先处理以下问题' }), _jsx("ul", { children: validationMessages.map((message) => _jsx("li", { children: message }, message)) })] }), _jsxs(FieldGrid, { columns: 2, children: [_jsx(TextField, { label: "\u5546\u54C1\u540D\u79F0", required: true, value: value.productName, error: fieldErrors.productName, onChange: (next) => { setFieldErrors(current => ({ ...current, productName: undefined })); setValue({ ...value, productName: next }); } }), _jsx(TextField, { label: "\u5546\u54C1\u63CF\u8FF0", value: value.productDescription, onChange: (next) => setValue({ ...value, productDescription: next }) }), _jsx(TextField, { label: "\u89C4\u683C\u578B\u53F7", value: value.modelSpecification, onChange: (next) => setValue({ ...value, modelSpecification: next }) }), _jsx(TextField, { label: "\u5355\u4F4D", required: true, value: value.unit, onChange: (next) => setValue({ ...value, unit: next }) }), _jsx(TextField, { label: "\u6570\u91CF", required: true, type: "number", value: value.quantity, error: fieldErrors.quantity, onChange: (next) => { setFieldErrors(current => ({ ...current, quantity: undefined })); setValue({ ...value, quantity: next, lineAmountTaxIncluded: String(amount(next) * amount(value.unitPriceTaxIncluded)) }); } }), _jsx(TextField, { label: "\u542B\u7A0E\u5355\u4EF7\uFF08\u4EBA\u6C11\u5E01\uFF09", required: true, type: "number", value: value.unitPriceTaxIncluded, error: fieldErrors.unitPriceTaxIncluded, onChange: (next) => { setFieldErrors(current => ({ ...current, unitPriceTaxIncluded: undefined })); setValue({ ...value, unitPriceTaxIncluded: next, lineAmountTaxIncluded: String(amount(value.quantity) * amount(next)) }); } }), _jsx(TextField, { label: "\u542B\u7A0E\u91D1\u989D\uFF08\u4EBA\u6C11\u5E01\uFF09", required: true, type: "number", value: value.lineAmountTaxIncluded || String(computedAmount), error: fieldErrors.lineAmountTaxIncluded, onChange: (next) => { setFieldErrors(current => ({ ...current, lineAmountTaxIncluded: undefined })); setValue({ ...value, lineAmountTaxIncluded: next }); } }), _jsx(TextField, { label: "\u589E\u503C\u7A0E\u7387", type: "number", min: 0, max: 1, step: "0.0001", value: value.vatRate, error: fieldErrors.vatRate, onChange: (next) => { setFieldErrors(current => ({ ...current, vatRate: undefined })); setValue({ ...value, vatRate: next }); } }), _jsx(FormField, { label: "\u6D77\u5173\u7F16\u7801", children: _jsxs("div", { className: "tcw-procurement-inline-field", children: [_jsx("input", { value: value.hsCode ?? '', onChange: (event) => setValue(applyManualHsCode(value, event.target.value)) }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary tcw-procurement-hs-button", title: "HS\u7F16\u7801\u67E5\u8BE2", "aria-label": "HS\u7F16\u7801\u67E5\u8BE2", onClick: () => setHsOpen(true), children: _jsx("i", { className: "ri-search-line", "aria-hidden": "true" }) })] }) }), _jsx(TextField, { label: "\u9000\u7A0E\u7387", required: true, type: "number", min: 0, max: 1, step: "0.0001", value: value.refundRate, error: fieldErrors.refundRate, onChange: (next) => { setFieldErrors(current => ({ ...current, refundRate: undefined })); setValue({ ...value, refundRate: next }); } }), _jsx(TextField, { label: "\u82F1\u6587\u540D\u79F0", value: value.englishName, onChange: (next) => setValue({ ...value, englishName: next }) })] })] }) }), _jsx(HsCodeLookupDialog, { open: hsOpen, initialQuery: value.hsCode || value.englishName || value.productName, onAction: hsAction, onClose: () => setHsOpen(false), onBind: bindHsCode })] });
728
728
  }
729
729
  function applyManualHsCode(line, hsCode) {
730
730
  const nextHsCode = normalizeHsCodeValue(hsCode);
@@ -771,7 +771,7 @@ export function PurchaseContractReviewDialog({ open, task, draft, busy, onAction
771
771
  void onSave(draft);
772
772
  };
773
773
  const visibleErrors = showValidationErrors || fieldErrors.contractNo ? fieldErrors : emptyPurchaseContractReviewFieldErrors();
774
- return _jsxs(_Fragment, { children: [_jsx(Modal, { open: open, title: "\u91C7\u8D2D\u5408\u540C\u5BA1\u6838", 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 || !draft, onClick: submit, children: [_jsx("i", { className: "ri-check-double-line", "aria-hidden": "true" }), "\u5BA1\u6838\u5E76\u5165\u5E93"] })] }), children: !draft ? _jsx(RiskNotice, { children: task?.errorMessage || '采购合同解析结果不可用' }) : _jsxs("div", { className: "tcw-procurement-review-compact", children: [_jsxs("section", { className: "tcw-procurement-review-editor-pane", children: [_jsx("h3", { children: "\u8BC6\u522B\u5185\u5BB9" }), _jsxs("div", { className: "tcw-procurement-review-editor", children: [_jsx(ReviewSection, { title: "\u4F9B\u5E94\u5546\u4FE1\u606F", children: _jsx(SupplierDraftEditor, { supplier: draft.supplier, errors: visibleErrors, onChange: (supplier, path) => changeDraft({ ...draft, supplier }, path) }) }), _jsx(ReviewSection, { title: "\u8BA2\u5355\u4FE1\u606F", children: _jsxs(FieldGrid, { columns: 3, children: [_jsx(TextField, { label: "\u91C7\u8D2D\u5408\u540C\u7F16\u53F7", required: true, value: draft.order.contractNo, error: visibleErrors.contractNo, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, contractNo: value } }, { kind: 'root', field: 'contractNo' }) }), _jsx(TextField, { label: "\u4E0B\u5355\u65E5\u671F", type: "date", value: draft.order.orderDate, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, orderDate: value } }) }), _jsx(TextField, { label: "\u91C7\u8D2D\u603B\u989D\uFF08\u4EBA\u6C11\u5E01\uFF09", type: "number", value: draft.order.contractAmountCny, error: visibleErrors.contractAmountCny, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, contractAmountCny: value } }, { kind: 'root', field: 'contractAmountCny' }) }), _jsx(TextField, { label: "\u5DF2\u4ED8\u6B3E", type: "number", value: draft.order.paidAmountCny, error: visibleErrors.paidAmountCny, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, paidAmountCny: value } }, { kind: 'root', field: 'paidAmountCny' }) }), _jsx(TextField, { label: "\u5DF2\u9000\u7A0E", type: "number", value: draft.order.refundedAmountCny, error: visibleErrors.refundedAmountCny, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, refundedAmountCny: value } }, { kind: 'root', field: 'refundedAmountCny' }) })] }) }), _jsx(ReviewSection, { title: `全部商品(${draft.lines.length})`, children: _jsx("div", { className: "tcw-procurement-review-lines", children: draft.lines.map((line, index) => _jsx(ContractLineEditor, { index: index, line: line, errors: visibleErrors.lines[index] ?? {}, onAction: hsLookupAction, onChange: (next, path) => changeDraft({ ...draft, lines: draft.lines.map((item, lineIndex) => lineIndex === index ? next : item) }, path) }, line.id ?? index)) }) })] })] }), _jsxs("section", { className: "tcw-procurement-review-source-pane", children: [_jsx("h3", { children: "\u6E90\u6587\u4EF6\u5185\u5BB9" }), _jsx(SourcePreview, { draft: draft, task: task, onOpenSource: onOpenSource })] })] }) }), _jsx(ValidationErrorDialog, { open: validationMessages.length > 0, title: "\u91C7\u8D2D\u5408\u540C\u6821\u9A8C\u5931\u8D25", messages: validationMessages, onClose: () => setValidationMessages([]) })] });
774
+ return _jsx(_Fragment, { children: _jsx(Modal, { open: open, title: "\u91C7\u8D2D\u5408\u540C\u5BA1\u6838", 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 || !draft, onClick: submit, children: [_jsx("i", { className: "ri-check-double-line", "aria-hidden": "true" }), "\u5BA1\u6838\u5E76\u5165\u5E93"] })] }), children: !draft ? _jsx(RiskNotice, { children: task?.errorMessage || '采购合同解析结果不可用' }) : _jsxs("div", { className: "tcw-procurement-review-compact", children: [validationMessages.length > 0 && _jsxs("div", { className: "tcw-procurement-validation-inline", children: [_jsx(RiskNotice, { children: validationMessages.length > 1 ? `请先处理以下 ${validationMessages.length} 个问题` : '请先处理以下问题' }), _jsx("ul", { children: validationMessages.map((message) => _jsx("li", { children: message }, message)) })] }), _jsxs("section", { className: "tcw-procurement-review-editor-pane", children: [_jsx("h3", { children: "\u8BC6\u522B\u5185\u5BB9" }), _jsxs("div", { className: "tcw-procurement-review-editor", children: [_jsx(ReviewSection, { title: "\u4F9B\u5E94\u5546\u4FE1\u606F", children: _jsx(SupplierDraftEditor, { supplier: draft.supplier, errors: visibleErrors, onChange: (supplier, path) => changeDraft({ ...draft, supplier }, path) }) }), _jsx(ReviewSection, { title: "\u8BA2\u5355\u4FE1\u606F", children: _jsxs(FieldGrid, { columns: 3, children: [_jsx(TextField, { label: "\u91C7\u8D2D\u5408\u540C\u7F16\u53F7", required: true, value: draft.order.contractNo, error: visibleErrors.contractNo, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, contractNo: value } }, { kind: 'root', field: 'contractNo' }) }), _jsx(TextField, { label: "\u4E0B\u5355\u65E5\u671F", type: "date", value: draft.order.orderDate, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, orderDate: value } }) }), _jsx(TextField, { label: "\u91C7\u8D2D\u603B\u989D\uFF08\u4EBA\u6C11\u5E01\uFF09", type: "number", value: draft.order.contractAmountCny, error: visibleErrors.contractAmountCny, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, contractAmountCny: value } }, { kind: 'root', field: 'contractAmountCny' }) }), _jsx(TextField, { label: "\u5DF2\u4ED8\u6B3E", type: "number", value: draft.order.paidAmountCny, error: visibleErrors.paidAmountCny, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, paidAmountCny: value } }, { kind: 'root', field: 'paidAmountCny' }) }), _jsx(TextField, { label: "\u5DF2\u9000\u7A0E", type: "number", value: draft.order.refundedAmountCny, error: visibleErrors.refundedAmountCny, onChange: (value) => changeDraft({ ...draft, order: { ...draft.order, refundedAmountCny: value } }, { kind: 'root', field: 'refundedAmountCny' }) })] }) }), _jsx(ReviewSection, { title: `全部商品(${draft.lines.length})`, children: _jsx("div", { className: "tcw-procurement-review-lines", children: draft.lines.map((line, index) => _jsx(ContractLineEditor, { index: index, line: line, errors: visibleErrors.lines[index] ?? {}, onAction: hsLookupAction, onChange: (next, path) => changeDraft({ ...draft, lines: draft.lines.map((item, lineIndex) => lineIndex === index ? next : item) }, path) }, line.id ?? index)) }) })] })] }), _jsxs("section", { className: "tcw-procurement-review-source-pane", children: [_jsx("h3", { children: "\u6E90\u6587\u4EF6\u5185\u5BB9" }), _jsx(SourcePreview, { draft: draft, task: task, onOpenSource: onOpenSource })] })] }) }) });
775
775
  }
776
776
  function ContractLineEditor({ line, index, errors, onAction, onChange }) {
777
777
  const [hsOpen, setHsOpen] = React.useState(false);
@@ -791,7 +791,7 @@ function ContractLineEditor({ line, index, errors, onAction, onChange }) {
791
791
  onChange(next);
792
792
  setHsOpen(false);
793
793
  };
794
- return _jsxs("section", { className: "tcw-procurement-review-line", children: [_jsxs("h4", { children: ["\u5546\u54C1 ", index + 1, " ", _jsx(StatusTag, { tone: "muted", children: sourceTypeLabels[line.sourceType] })] }), _jsxs(FieldGrid, { columns: 3, children: [_jsx(TextField, { label: "\u5546\u54C1\u540D\u79F0", required: true, value: line.productName, error: errors.productName, onChange: (value) => onChange({ ...line, productName: value }, linePath('productName')) }), _jsx(TextField, { label: "\u5546\u54C1\u63CF\u8FF0", value: line.productDescription, onChange: (value) => onChange({ ...line, productDescription: value }) }), _jsx(TextField, { label: "\u89C4\u683C\u578B\u53F7", value: line.modelSpecification, onChange: (value) => onChange({ ...line, modelSpecification: value }) }), _jsx(TextField, { label: "\u5355\u4F4D", value: line.unit, onChange: (value) => onChange({ ...line, unit: value }) }), _jsx(TextField, { label: "\u6570\u91CF", type: "number", value: line.quantity, error: errors.quantity, onChange: (value) => onChange({ ...line, quantity: value }, linePath('quantity')) }), _jsx(TextField, { label: "\u542B\u7A0E\u91D1\u989D", type: "number", value: line.lineAmountTaxIncluded, error: errors.lineAmountTaxIncluded, onChange: (value) => onChange({ ...line, lineAmountTaxIncluded: value }, linePath('lineAmountTaxIncluded')) }), _jsx(FormField, { label: "\u6D77\u5173\u7F16\u7801", children: _jsxs("div", { className: "tcw-procurement-inline-field", children: [_jsx("input", { value: line.hsCode ?? '', onChange: (event) => onChange(applyManualHsCode(line, event.target.value)) }), _jsxs("button", { type: "button", className: "tcw-button tcw-button--secondary", onClick: () => setHsOpen(true), children: [_jsx("i", { className: "ri-search-line", "aria-hidden": "true" }), "HS\u7F16\u7801\u67E5\u8BE2"] })] }) }), line.amountMismatch && _jsx(FormField, { label: "\u91D1\u989D\u5DEE\u5F02\u786E\u8BA4", required: true, children: _jsxs("label", { className: "tcw-procurement-checkbox", children: [_jsx("input", { type: "checkbox", checked: Boolean(line.amountMismatchConfirmed), onChange: (event) => onChange({ ...line, amountMismatchConfirmed: event.target.checked }, linePath('lineAmountTaxIncluded')) }), "\u786E\u8BA4\u4FDD\u7559\u5408\u540C\u539F\u59CB\u91D1\u989D"] }) })] }), _jsxs("details", { className: "tcw-procurement-review-more", children: [_jsx("summary", { children: "\u66F4\u591A\u5546\u54C1\u4FE1\u606F" }), _jsxs(FieldGrid, { columns: 3, children: [_jsx(TextField, { label: "\u82F1\u6587\u540D\u79F0", value: line.englishName, onChange: (value) => onChange({ ...line, englishName: value }) }), _jsx(TextField, { label: "\u542B\u7A0E\u5355\u4EF7", type: "number", value: line.unitPriceTaxIncluded, error: errors.unitPriceTaxIncluded, onChange: (value) => onChange({ ...line, unitPriceTaxIncluded: value }, linePath('unitPriceTaxIncluded')) }), _jsx(TextField, { label: "\u589E\u503C\u7A0E\u7387", type: "number", min: 0, max: 1, step: "0.0001", value: line.vatRate, error: errors.vatRate, onChange: (value) => onChange({ ...line, vatRate: value }, linePath('vatRate')) }), _jsx(TextField, { label: "\u9000\u7A0E\u7387", type: "number", min: 0, max: 1, step: "0.0001", value: line.refundRate, error: errors.refundRate, onChange: (value) => onChange({ ...line, refundRate: value }, linePath('refundRate')) })] })] }), _jsx(HsCodeLookupDialog, { open: hsOpen, initialQuery: line.hsCode || line.englishName || line.productName, onAction: hsAction, onClose: () => setHsOpen(false), onBind: bindHsCode })] });
794
+ return _jsxs("section", { className: "tcw-procurement-review-line", children: [_jsxs("h4", { children: ["\u5546\u54C1 ", index + 1, " ", _jsx(StatusTag, { tone: "muted", children: sourceTypeLabels[line.sourceType] })] }), _jsxs(FieldGrid, { columns: 3, children: [_jsx(TextField, { label: "\u5546\u54C1\u540D\u79F0", required: true, value: line.productName, error: errors.productName, onChange: (value) => onChange({ ...line, productName: value }, linePath('productName')) }), _jsx(TextField, { label: "\u5546\u54C1\u63CF\u8FF0", value: line.productDescription, onChange: (value) => onChange({ ...line, productDescription: value }) }), _jsx(TextField, { label: "\u89C4\u683C\u578B\u53F7", value: line.modelSpecification, onChange: (value) => onChange({ ...line, modelSpecification: value }) }), _jsx(TextField, { label: "\u5355\u4F4D", value: line.unit, onChange: (value) => onChange({ ...line, unit: value }) }), _jsx(TextField, { label: "\u6570\u91CF", type: "number", value: line.quantity, error: errors.quantity, onChange: (value) => onChange({ ...line, quantity: value }, linePath('quantity')) }), _jsx(TextField, { label: "\u542B\u7A0E\u91D1\u989D", type: "number", value: line.lineAmountTaxIncluded, error: errors.lineAmountTaxIncluded, onChange: (value) => onChange({ ...line, lineAmountTaxIncluded: value }, linePath('lineAmountTaxIncluded')) }), _jsx(FormField, { label: "\u6D77\u5173\u7F16\u7801", children: _jsxs("div", { className: "tcw-procurement-inline-field", children: [_jsx("input", { value: line.hsCode ?? '', onChange: (event) => onChange(applyManualHsCode(line, event.target.value)) }), _jsx("button", { type: "button", className: "tcw-button tcw-button--secondary tcw-procurement-hs-button", title: "HS\u7F16\u7801\u67E5\u8BE2", "aria-label": "HS\u7F16\u7801\u67E5\u8BE2", onClick: () => setHsOpen(true), children: _jsx("i", { className: "ri-search-line", "aria-hidden": "true" }) })] }) }), line.amountMismatch && _jsx(FormField, { label: "\u91D1\u989D\u5DEE\u5F02\u786E\u8BA4", required: true, children: _jsxs("label", { className: "tcw-procurement-checkbox", children: [_jsx("input", { type: "checkbox", checked: Boolean(line.amountMismatchConfirmed), onChange: (event) => onChange({ ...line, amountMismatchConfirmed: event.target.checked }, linePath('lineAmountTaxIncluded')) }), "\u786E\u8BA4\u4FDD\u7559\u5408\u540C\u539F\u59CB\u91D1\u989D"] }) })] }), _jsxs("details", { className: "tcw-procurement-review-more", children: [_jsx("summary", { children: "\u66F4\u591A\u5546\u54C1\u4FE1\u606F" }), _jsxs(FieldGrid, { columns: 3, children: [_jsx(TextField, { label: "\u82F1\u6587\u540D\u79F0", value: line.englishName, onChange: (value) => onChange({ ...line, englishName: value }) }), _jsx(TextField, { label: "\u542B\u7A0E\u5355\u4EF7", type: "number", value: line.unitPriceTaxIncluded, error: errors.unitPriceTaxIncluded, onChange: (value) => onChange({ ...line, unitPriceTaxIncluded: value }, linePath('unitPriceTaxIncluded')) }), _jsx(TextField, { label: "\u589E\u503C\u7A0E\u7387", type: "number", min: 0, max: 1, step: "0.0001", value: line.vatRate, error: errors.vatRate, onChange: (value) => onChange({ ...line, vatRate: value }, linePath('vatRate')) }), _jsx(TextField, { label: "\u9000\u7A0E\u7387", type: "number", min: 0, max: 1, step: "0.0001", value: line.refundRate, error: errors.refundRate, onChange: (value) => onChange({ ...line, refundRate: value }, linePath('refundRate')) })] })] }), _jsx(HsCodeLookupDialog, { open: hsOpen, initialQuery: line.hsCode || line.englishName || line.productName, onAction: hsAction, onClose: () => setHsOpen(false), onBind: bindHsCode })] });
795
795
  }
796
796
  function SupplierDraftEditor({ supplier, errors, onChange }) {
797
797
  const coreFields = [
@@ -824,9 +824,6 @@ export function DeleteDialog({ target, supplier, busy, onCancel, onConfirm }) {
824
824
  return _jsx(ConfirmDialog, { open: Boolean(target), title: isOrder ? '确认删除采购订单?' : `确认删除${target?.entityType === 'supplier' ? '供应商' : '采购商品'}?`, danger: true, confirmText: "\u786E\u8BA4\u5220\u9664", confirmDisabled: busy, onCancel: onCancel, onConfirm: onConfirm, message: isOrder ? _jsxs("div", { className: "tcw-procurement-delete-summary is-order", children: [_jsxs("strong", { className: "tcw-procurement-delete-warning", children: [_jsx("i", { className: "ri-error-warning-fill", "aria-hidden": "true" }), "\u5220\u9664\u540E\u5C06\u540C\u65F6\u903B\u8F91\u5220\u9664\u8BE5\u91C7\u8D2D\u8BA2\u5355\u53CA\u5176\u5168\u90E8\u5546\u54C1\u660E\u7EC6\uFF0C\u5F53\u524D\u524D\u7AEF\u4E0D\u63D0\u4F9B\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002"] }), _jsxs("dl", { className: "tcw-procurement-delete-details", children: [_jsxs("div", { children: [_jsx("dt", { children: "\u91C7\u8D2D\u5408\u540C\u7F16\u53F7" }), _jsx("dd", { children: name || '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u4F9B\u5E94\u5546" }), _jsx("dd", { children: supplier?.name || '—' })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5546\u54C1\u6761\u6570" }), _jsx("dd", { children: order?.lineCount ?? 0 })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u91C7\u8D2D\u91D1\u989D" }), _jsx("dd", { children: currencyCompact(order?.contractAmountCny) })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5DF2\u4ED8\u6B3E" }), _jsx("dd", { children: currencyCompact(order?.paidAmountCny) })] }), _jsxs("div", { children: [_jsx("dt", { children: "\u5DF2\u9000\u7A0E" }), _jsx("dd", { children: currencyCompact(order?.refundedAmountCny) })] })] }), _jsxs("p", { className: "tcw-procurement-delete-info", children: [_jsx("i", { className: "ri-information-line", "aria-hidden": "true" }), "\u5220\u9664\u65E7\u8BA2\u5355\u540E\uFF0C\u5982\u540E\u7EED\u91CD\u65B0\u5BFC\u5165\u540C\u7F16\u53F7\u5408\u540C\uFF0C\u5C06\u4F5C\u4E3A\u5168\u65B0\u8BB0\u5F55\u5165\u5E93\uFF0C\u4E0D\u8FC1\u79FB\u65E7\u8BA2\u5355\u4EBA\u5DE5\u91D1\u989D\u6570\u636E\u3002"] })] }) : _jsx("div", { className: "tcw-procurement-delete-summary", children: _jsx("strong", { children: name || '当前记录' }) }) });
825
825
  }
826
826
  function ReviewSection({ title, children }) { return _jsxs("section", { className: "tcw-procurement-review-section", children: [_jsx("h3", { children: title }), children] }); }
827
- function ValidationErrorDialog({ open, title = '校验失败', messages, onClose }) {
828
- return _jsx(Modal, { open: open, title: title, 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" }), "\u77E5\u9053\u4E86"] }), children: _jsxs("div", { className: "tcw-procurement-validation-dialog", children: [_jsx(RiskNotice, { children: messages.length > 1 ? `请先处理以下 ${messages.length} 个问题` : '请先处理以下问题' }), _jsx("ul", { children: messages.map((message) => _jsx("li", { children: message }, message)) })] }) });
829
- }
830
827
  function ContextValue({ label, value }) { return _jsxs("div", { children: [_jsx("span", { children: label }), _jsx("strong", { children: String(value || '—') })] }); }
831
828
  function LinkButton({ children, icon, title, onClick }) { return _jsxs("button", { type: "button", className: "tcw-procurement-link", title: title, onClick: onClick, children: [_jsx("i", { className: icon, "aria-hidden": "true" }), children] }); }
832
829
  function StatusTag({ children, tone }) { return _jsx("span", { className: `tcw-procurement-status tcw-procurement-status--${tone}`, children: children }); }