@bit-sun/business-component 4.2.0-alpha.12 → 4.2.0-alpha.14

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/.umirc.ts CHANGED
@@ -73,6 +73,10 @@ export default defineConfig({
73
73
  target: 'https://ocean-test.bitsun-inc.com/', // 开发环境
74
74
  changeOrigin: true,
75
75
  },
76
+ '/settle/': {
77
+ target: 'https://ocean-test.bitsun-inc.com/', // 开发环境
78
+ changeOrigin: true,
79
+ },
76
80
  '/basic/': {
77
81
  target: 'https://ocean-test.bitsun-inc.com/', // 开发环境
78
82
  changeOrigin: true,
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './PathDisplay.less';
3
+ interface PathDisplayProps {
4
+ recordType?: string;
5
+ businessType?: string;
6
+ sendOrgCode?: string;
7
+ receiverOrgCode?: string;
8
+ orderNo?: string;
9
+ autoCallApi?: boolean;
10
+ }
11
+ interface PathDisplayRef {
12
+ fetchData: () => Promise<void>;
13
+ }
14
+ declare const PathDisplay: React.ForwardRefExoticComponent<PathDisplayProps & React.RefAttributes<PathDisplayRef>>;
15
+ export default PathDisplay;
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export * from './components/Functional/BsAntdSula/index';
34
34
  export { default as RuleComponent } from './components/Solution/RuleComponent';
35
35
  export { default as RuleSetter } from './components/Solution/RuleSetter';
36
36
  export { default as RenderCompItem } from './components/Solution/RuleComponent/RenderCompItem';
37
+ export { default as TrialCalculation } from './components/Business/TrialCalculation';
37
38
  export { processDetailButtonsVisible as processDetailButtonsVisible } from './components/Business/DetailPageWrapper';
38
39
  export { default as ExtendedCollapse } from './components/Common/ExtendedCollapse';
39
40
  export { default as Section } from './components/Common/Section';
package/dist/index.esm.js CHANGED
@@ -10165,8 +10165,9 @@ function commonFun(type, prefixUrl, parentProps) {
10165
10165
  name: 'qp-name-like',
10166
10166
  label: '供应商名称'
10167
10167
  }, {
10168
- name: 'qp-code-like',
10169
- label: '供应商编码'
10168
+ name: 'qp-code-in',
10169
+ label: '供应商编码',
10170
+ type: 'multipleQueryInput'
10170
10171
  }, {
10171
10172
  name: 'qp-createOrgCode-eq',
10172
10173
  type: 'select',
@@ -40508,9 +40509,314 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
40508
40509
  })));
40509
40510
  });
40510
40511
 
40511
- var css_248z$y = ".bs-collapse-wrap {\n border-radius: 4px;\n overflow: hidden;\n}\n.bs-collapse-wrap .bs-collapse-header-wrap {\n background: #fff;\n}\n.bs-collapse-wrap .bs-collapse-icon {\n color: #b6b6b6;\n transition: transform 0.3s;\n}\n.bs-collapse-wrap .bs-guidewrap-icon-toogle {\n transform: rotate(180deg);\n}\n.bs-collapse-wrap .bs-collapse-header-title {\n font-weight: 500;\n font-size: 14px;\n color: #000000;\n}\n.bs-collapse-wrap .bs-collapse-header-divider {\n width: 3px;\n height: 20px;\n background: #005cff;\n}\n.bs-collapse-header-boder .ant-collapse .ant-collapse-item > .ant-collapse-header {\n border-bottom: 1px solid #f0f0f0;\n padding: 8px 16px;\n}\n";
40512
+ var css_248z$y = ".wrap_pathContentBox {\n padding: 30px;\n border: 1px solid #eee;\n overflow: auto;\n}\n.wrap_pathContentBoxTitle {\n height: 20px;\n margin-bottom: 20px;\n}\n.wrap_pathContentBox::-webkit-scrollbar {\n display: none;\n}\n.pathItem_content {\n display: flex;\n align-items: center;\n}\n.pathItem_block {\n width: 210px;\n height: 104px;\n padding: 10px 20px;\n background: rgba(24, 144, 255);\n color: #fff;\n font-weight: bolder;\n text-align: center;\n border-radius: 12px;\n box-shadow: 1px 1px 10px rgba(200, 201, 204, 0.4);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n line-height: 1.4;\n}\n.record_info {\n text-align: center;\n}\n.pathItem_line {\n margin: 0px 16px;\n}\n.pathItem_line_withRightArrow,\n.pathItem_line_withLeftArrow {\n position: relative;\n height: 10px;\n /* 根据需要调整高度 */\n display: flex;\n width: 130px;\n align-items: center;\n}\n.pathItem_line_withRightArrow {\n margin-top: 10px;\n}\n.pathItem_line_withLeftArrow {\n margin-bottom: 10px;\n}\n.pathItem_line_withRightArrow::before,\n.pathItem_line_withLeftArrow::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 100%;\n height: 4px;\n /* 直线的粗细 */\n background-color: rgba(24, 144, 255);\n z-index: 1;\n}\n.pathItem_line_rightArrow,\n.pathItem_line_leftArrow {\n position: relative;\n width: 0;\n height: 0;\n border-top: 10px solid transparent;\n border-bottom: 10px solid transparent;\n border-left: 10px solid rgba(24, 144, 255);\n /* 向右的蓝色箭头 */\n margin-left: 94%;\n /* 根据需要调整间距 */\n z-index: 2;\n}\n.pathItem_line_withLeftArrow {\n margin-top: 6px;\n}\n.pathItem_line_leftArrow {\n margin-left: -2px;\n transform: rotate(180deg);\n}\n";
40512
40513
  styleInject(css_248z$y);
40513
40514
 
40515
+ var formatPaths = function formatPaths(list) {
40516
+ var result = list.map(function (l, index) {
40517
+ var _l$nodes;
40518
+ var Item = l;
40519
+ if (l === null || l === void 0 ? void 0 : (_l$nodes = l.nodes) === null || _l$nodes === void 0 ? void 0 : _l$nodes.length) {
40520
+ Item.nodes = l === null || l === void 0 ? void 0 : l.nodes.map(function (s) {
40521
+ return _objectSpread2(_objectSpread2({}, s), {}, {
40522
+ kCode: "".concat(index, "_").concat(s.code)
40523
+ });
40524
+ });
40525
+ }
40526
+ return Item;
40527
+ });
40528
+ return result;
40529
+ };
40530
+ var getRecordBusinessType = function getRecordBusinessType(recordType) {
40531
+ var businessTypeDictCode = "";
40532
+ var list = [{
40533
+ recordType: "502",
40534
+ businessTypeDictCode: "SRM00001"
40535
+ }, {
40536
+ recordType: "503",
40537
+ businessTypeDictCode: "SRM00002"
40538
+ }, {
40539
+ recordType: "504",
40540
+ businessTypeDictCode: "TCbusinessType"
40541
+ }, {
40542
+ recordType: "505",
40543
+ businessTypeDictCode: "TCRbusinessType"
40544
+ }, {
40545
+ recordType: "1001",
40546
+ businessTypeDictCode: "ALLOCATE00002"
40547
+ }, {
40548
+ recordType: "1002",
40549
+ businessTypeDictCode: "ALLOCATE00002"
40550
+ }, {
40551
+ recordType: "50",
40552
+ businessTypeDictCode: "SC00022"
40553
+ }, {
40554
+ recordType: "30",
40555
+ businessTypeDictCode: "BUSINESS_Stock_Adjus"
40556
+ }, {
40557
+ recordType: "130",
40558
+ businessTypeDictCode: ""
40559
+ }, {
40560
+ recordType: "516",
40561
+ businessTypeDictCode: "BUSINESS_ticket_sale_type"
40562
+ }, {
40563
+ recordType: "1003",
40564
+ businessTypeDictCode: "BUSINESS_DBCK001"
40565
+ }, {
40566
+ recordType: "1004",
40567
+ businessTypeDictCode: "BUSINESS_DBCK001"
40568
+ }, {
40569
+ recordType: "1007",
40570
+ businessTypeDictCode: "BUSINESS_DBCK"
40571
+ }, {
40572
+ recordType: "517",
40573
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40574
+ }, {
40575
+ recordType: "518",
40576
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40577
+ } // 拆装箱入
40578
+ ];
40579
+ var match = list.find(function (item) {
40580
+ return item.recordType == recordType;
40581
+ });
40582
+ businessTypeDictCode = (match === null || match === void 0 ? void 0 : match.businessTypeDictCode) || '';
40583
+ return businessTypeDictCode;
40584
+ };
40585
+ var PathDisplay = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
40586
+ var recordType = _ref.recordType,
40587
+ businessType = _ref.businessType,
40588
+ sendOrgCode = _ref.sendOrgCode,
40589
+ receiverOrgCode = _ref.receiverOrgCode,
40590
+ orderNo = _ref.orderNo,
40591
+ _ref$autoCallApi = _ref.autoCallApi,
40592
+ autoCallApi = _ref$autoCallApi === void 0 ? true : _ref$autoCallApi;
40593
+ // 组件内部状态管理
40594
+ var _useState = useState([]),
40595
+ _useState2 = _slicedToArray(_useState, 2),
40596
+ pathList = _useState2[0],
40597
+ setPathList = _useState2[1];
40598
+ var _useState3 = useState(''),
40599
+ _useState4 = _slicedToArray(_useState3, 2),
40600
+ routeCode = _useState4[0],
40601
+ setRouteCode = _useState4[1];
40602
+ var _useState5 = useState(''),
40603
+ _useState6 = _slicedToArray(_useState5, 2),
40604
+ routeCodeName = _useState6[0],
40605
+ setRouteCodeName = _useState6[1];
40606
+ var _useState7 = useState(false),
40607
+ _useState8 = _slicedToArray(_useState7, 2),
40608
+ loading = _useState8[0],
40609
+ setLoading = _useState8[1];
40610
+ // 暴露方法给父组件
40611
+ React$1.useImperativeHandle(ref, function () {
40612
+ return {
40613
+ fetchData: fetchData
40614
+ };
40615
+ });
40616
+ var boock = function boock(nodeItem) {
40617
+ return /*#__PURE__*/React$1.createElement("div", {
40618
+ className: "pathItem_block"
40619
+ }, /*#__PURE__*/React$1.createElement("div", null, "\u3010", nodeItem.code, "\u3011", nodeItem.name), /*#__PURE__*/React$1.createElement("div", null, "\u7EC4\u7EC7\u5206\u7C7B\uFF1A", getDictionaryTextByValue('BUSINESS_ORG_CLASSIFICATION', nodeItem.orgClassification || '')));
40620
+ };
40621
+ // 调用接口获取数据
40622
+ var fetchData = /*#__PURE__*/function () {
40623
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
40624
+ var params, res, _res$data, _res, _res$data2, _res2, _res2$data, _res3, _res3$data, pList, formattedPaths, _t;
40625
+ return _regenerator().w(function (_context) {
40626
+ while (1) switch (_context.p = _context.n) {
40627
+ case 0:
40628
+ if (!(!recordType || !sendOrgCode || !receiverOrgCode)) {
40629
+ _context.n = 1;
40630
+ break;
40631
+ }
40632
+ return _context.a(2);
40633
+ case 1:
40634
+ setLoading(true);
40635
+ _context.p = 2;
40636
+ params = {
40637
+ recordType: recordType,
40638
+ businessType: businessType,
40639
+ sendOrgCode: sendOrgCode,
40640
+ receiverOrgCode: receiverOrgCode,
40641
+ orderNo: orderNo
40642
+ };
40643
+ console.log('params', params);
40644
+ _context.n = 3;
40645
+ return requestUtil({
40646
+ url: "/settle/crossOrgSettlementRoute/trialCalculation",
40647
+ method: 'POST',
40648
+ data: params
40649
+ });
40650
+ case 3:
40651
+ res = _context.v;
40652
+ debugger;
40653
+ if (handleError(res.data)) {
40654
+ res = res.data;
40655
+ if ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.match) {
40656
+ setRouteCodeName(((_res = res) === null || _res === void 0 ? void 0 : (_res$data2 = _res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.routeCodeName) || '');
40657
+ setRouteCode(((_res2 = res) === null || _res2 === void 0 ? void 0 : (_res2$data = _res2.data) === null || _res2$data === void 0 ? void 0 : _res2$data.routeCode) || '');
40658
+ pList = ((_res3 = res) === null || _res3 === void 0 ? void 0 : (_res3$data = _res3.data) === null || _res3$data === void 0 ? void 0 : _res3$data.fontDetails) || [];
40659
+ formattedPaths = formatPaths(pList);
40660
+ setPathList(formattedPaths);
40661
+ } else {
40662
+ // 清空历史结果
40663
+ setRouteCodeName('');
40664
+ setRouteCode('');
40665
+ setPathList([]);
40666
+ message$1.warning('匹配不到跨组织链路');
40667
+ }
40668
+ } else {
40669
+ // 清空历史结果
40670
+ setRouteCodeName('');
40671
+ setRouteCode('');
40672
+ setPathList([]);
40673
+ message$1.error('获取数据失败');
40674
+ }
40675
+ _context.n = 5;
40676
+ break;
40677
+ case 4:
40678
+ _context.p = 4;
40679
+ _t = _context.v;
40680
+ console.error('调用接口失败:', _t);
40681
+ setRouteCodeName('');
40682
+ setRouteCode('');
40683
+ setPathList([]);
40684
+ message$1.error('调用接口失败');
40685
+ case 5:
40686
+ _context.p = 5;
40687
+ setLoading(false);
40688
+ return _context.f(5);
40689
+ case 6:
40690
+ return _context.a(2);
40691
+ }
40692
+ }, _callee, null, [[2, 4, 5, 6]]);
40693
+ }));
40694
+ return function fetchData() {
40695
+ return _ref2.apply(this, arguments);
40696
+ };
40697
+ }();
40698
+ // 监听props变化,自动调用接口
40699
+ useEffect(function () {
40700
+ if (autoCallApi) {
40701
+ fetchData();
40702
+ }
40703
+ }, [recordType, businessType, sendOrgCode, receiverOrgCode, orderNo, autoCallApi]);
40704
+ var line = function line(nodeItem) {
40705
+ // 物资凭证跳转处理
40706
+ var handleMaterialAssetVoucherJump = function handleMaterialAssetVoucherJump(recordId, recordNo) {
40707
+ var _window$$wujie;
40708
+ if ((_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.props.jump) {
40709
+ window.$wujie.props.jump({
40710
+ pathname: "/settle/end-term-management/material_asset_voucher/view/".concat(recordId, "/").concat(recordNo)
40711
+ });
40712
+ }
40713
+ };
40714
+ // 取价单跳转处理
40715
+ var handleCreditSettleJump = function handleCreditSettleJump(creditSettleId) {
40716
+ var _window$$wujie2;
40717
+ if ((_window$$wujie2 = window.$wujie) === null || _window$$wujie2 === void 0 ? void 0 : _window$$wujie2.props.jump) {
40718
+ window.$wujie.props.jump({
40719
+ pathname: "/pay/pay-management/credit-management/credit-settle/view/".concat(creditSettleId)
40720
+ });
40721
+ }
40722
+ };
40723
+ return /*#__PURE__*/React$1.createElement("div", {
40724
+ className: "pathItem_line"
40725
+ }, nodeItem.targetOrgCode && (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(Tooltip, {
40726
+ title: /*#__PURE__*/React$1.createElement("div", {
40727
+ style: {
40728
+ fontSize: '12px',
40729
+ lineHeight: '1.5'
40730
+ }
40731
+ }, /*#__PURE__*/React$1.createElement("div", null, "\u7ED3\u7B97\u5355\u636E\uFF1A", nodeItem.targetRecordName), /*#__PURE__*/React$1.createElement("div", null, "\u4E1A\u52A1\u7C7B\u578B\uFF1A", getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')), /*#__PURE__*/React$1.createElement("div", null, "\u4EF7\u683C\u6765\u6E90\uFF1A", nodeItem.targetOtherLineInfo), /*#__PURE__*/React$1.createElement("div", null, "\u7269\u8D44\u51ED\u8BC1\uFF1A", nodeItem.targetRecordNo || ' '), /*#__PURE__*/React$1.createElement("div", null, nodeItem.targetOccupyType === 1 ? '信贷占用单' : '结算取价单', "\uFF1A", nodeItem.targetCreditSettleNo || ' ')),
40732
+ placement: "top"
40733
+ }, /*#__PURE__*/React$1.createElement("div", {
40734
+ className: "record_info"
40735
+ }, /*#__PURE__*/React$1.createElement("div", {
40736
+ style: {
40737
+ fontSize: '12px',
40738
+ lineHeight: '1.5'
40739
+ }
40740
+ }, /*#__PURE__*/React$1.createElement("div", null, nodeItem.targetRecordName), /*#__PURE__*/React$1.createElement("div", null, getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')), /*#__PURE__*/React$1.createElement("div", null, nodeItem.targetOtherLineInfo), /*#__PURE__*/React$1.createElement("div", null, nodeItem.targetRecordId && nodeItem.targetRecordNo ? (/*#__PURE__*/React$1.createElement("span", {
40741
+ style: {
40742
+ cursor: 'pointer',
40743
+ color: '#1890ff',
40744
+ textDecoration: 'underline'
40745
+ },
40746
+ onClick: function onClick() {
40747
+ return handleMaterialAssetVoucherJump(nodeItem.targetRecordId || '', nodeItem.targetRecordNo || '');
40748
+ }
40749
+ }, nodeItem.targetRecordNo)) : nodeItem.targetRecordNo), /*#__PURE__*/React$1.createElement("div", null, nodeItem.targetCreditSettleId ? (/*#__PURE__*/React$1.createElement("span", {
40750
+ style: {
40751
+ cursor: 'pointer',
40752
+ color: '#1890ff',
40753
+ textDecoration: 'underline'
40754
+ },
40755
+ onClick: function onClick() {
40756
+ return handleCreditSettleJump(nodeItem.targetCreditSettleId || '');
40757
+ }
40758
+ }, nodeItem.targetCreditSettleNo)) : nodeItem.targetCreditSettleNo)))), /*#__PURE__*/React$1.createElement("div", {
40759
+ className: "pathItem_line_withRightArrow"
40760
+ }, /*#__PURE__*/React$1.createElement("div", {
40761
+ className: "pathItem_line_rightArrow"
40762
+ })))) || null, nodeItem.sourceOrgCode && (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
40763
+ className: "pathItem_line_withLeftArrow"
40764
+ }, /*#__PURE__*/React$1.createElement("div", {
40765
+ className: "pathItem_line_leftArrow"
40766
+ })), /*#__PURE__*/React$1.createElement(Tooltip, {
40767
+ title: /*#__PURE__*/React$1.createElement("div", {
40768
+ style: {
40769
+ fontSize: '12px',
40770
+ lineHeight: '1.5'
40771
+ }
40772
+ }, /*#__PURE__*/React$1.createElement("div", null, "\u7ED3\u7B97\u5355\u636E\uFF1A", nodeItem.sourceRecordName), /*#__PURE__*/React$1.createElement("div", null, "\u4E1A\u52A1\u7C7B\u578B\uFF1A", getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')), /*#__PURE__*/React$1.createElement("div", null, "\u4EF7\u683C\u6765\u6E90\uFF1A", nodeItem.sourceOtherLineInfo), /*#__PURE__*/React$1.createElement("div", null, "\u7269\u8D44\u51ED\u8BC1\uFF1A", nodeItem.sourceRecordNo || ' '), /*#__PURE__*/React$1.createElement("div", null, nodeItem.sourceOccupyType === 1 ? '信贷占用单' : '结算取价单', "\uFF1A", nodeItem.sourceCreditSettleNo || ' ')),
40773
+ placement: "top"
40774
+ }, /*#__PURE__*/React$1.createElement("div", {
40775
+ className: "record_info"
40776
+ }, /*#__PURE__*/React$1.createElement("div", {
40777
+ style: {
40778
+ fontSize: '12px',
40779
+ lineHeight: '1.5'
40780
+ }
40781
+ }, /*#__PURE__*/React$1.createElement("div", null, nodeItem.sourceRecordName), /*#__PURE__*/React$1.createElement("div", null, getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')), /*#__PURE__*/React$1.createElement("div", null, nodeItem.sourceOtherLineInfo), /*#__PURE__*/React$1.createElement("div", null, nodeItem.sourceRecordId && nodeItem.sourceRecordNo ? (/*#__PURE__*/React$1.createElement("span", {
40782
+ style: {
40783
+ cursor: 'pointer',
40784
+ color: '#1890ff',
40785
+ textDecoration: 'underline'
40786
+ },
40787
+ onClick: function onClick() {
40788
+ return handleMaterialAssetVoucherJump(nodeItem.sourceRecordId || '', nodeItem.sourceRecordNo || '');
40789
+ }
40790
+ }, nodeItem.sourceRecordNo || ' ')) : nodeItem.sourceRecordNo || ' '), /*#__PURE__*/React$1.createElement("div", null, nodeItem.sourceCreditSettleId ? (/*#__PURE__*/React$1.createElement("span", {
40791
+ style: {
40792
+ cursor: 'pointer',
40793
+ color: '#1890ff',
40794
+ textDecoration: 'underline'
40795
+ },
40796
+ onClick: function onClick() {
40797
+ return handleCreditSettleJump(nodeItem.sourceCreditSettleId || '');
40798
+ }
40799
+ }, nodeItem.sourceCreditSettleNo || ' ')) : nodeItem.sourceCreditSettleNo || ' ')))))) || null);
40800
+ };
40801
+ return /*#__PURE__*/React$1.createElement("div", {
40802
+ className: "wrap_pathContentBox"
40803
+ }, /*#__PURE__*/React$1.createElement(Spin, {
40804
+ spinning: loading,
40805
+ tip: "\u52A0\u8F7D\u4E2D..."
40806
+ }, routeCode && /*#__PURE__*/React$1.createElement("div", {
40807
+ className: "wrap_pathContentBoxTitle"
40808
+ }, "\u8DE8\u7EC4\u7EC7\u94FE\u8DEF\u540D\u79F0\uFF1A\u3010", routeCode, "\u3011", routeCodeName), /*#__PURE__*/React$1.createElement("div", {
40809
+ className: "pathItem_content"
40810
+ }, pathList.map(function (nodeItem, index) {
40811
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, {
40812
+ key: "node_".concat(index)
40813
+ }, boock(nodeItem), line(nodeItem));
40814
+ }))));
40815
+ });
40816
+
40817
+ var css_248z$z = ".bs-collapse-wrap {\n border-radius: 4px;\n overflow: hidden;\n}\n.bs-collapse-wrap .bs-collapse-header-wrap {\n background: #fff;\n}\n.bs-collapse-wrap .bs-collapse-icon {\n color: #b6b6b6;\n transition: transform 0.3s;\n}\n.bs-collapse-wrap .bs-guidewrap-icon-toogle {\n transform: rotate(180deg);\n}\n.bs-collapse-wrap .bs-collapse-header-title {\n font-weight: 500;\n font-size: 14px;\n color: #000000;\n}\n.bs-collapse-wrap .bs-collapse-header-divider {\n width: 3px;\n height: 20px;\n background: #005cff;\n}\n.bs-collapse-header-boder .ant-collapse .ant-collapse-item > .ant-collapse-header {\n border-bottom: 1px solid #f0f0f0;\n padding: 8px 16px;\n}\n";
40818
+ styleInject(css_248z$z);
40819
+
40514
40820
  var _excluded$m = ["titleExtra", "header", "showArrow"];
40515
40821
  var Panel = Collapse.Panel;
40516
40822
  var ExtendedPanel = function ExtendedPanel(_ref) {
@@ -40560,9 +40866,9 @@ var index$8 = Object.assign(ExtendedCollapse, {
40560
40866
  Board: ExtendedPanel
40561
40867
  });
40562
40868
 
40563
- var css_248z$z = ".index-module_paragraphCopyWrapper__3rGOI {\n display: flex;\n margin-bottom: 4px;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopyLabel__1Qb8u {\n color: #8c8e91;\n font-size: 12px;\n white-space: nowrap;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopy__1y7Jo {\n min-width: 100px;\n margin-bottom: 0;\n font-size: 12px;\n flex: 1;\n}\n";
40869
+ var css_248z$A = ".index-module_paragraphCopyWrapper__3rGOI {\n display: flex;\n margin-bottom: 4px;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopyLabel__1Qb8u {\n color: #8c8e91;\n font-size: 12px;\n white-space: nowrap;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopy__1y7Jo {\n min-width: 100px;\n margin-bottom: 0;\n font-size: 12px;\n flex: 1;\n}\n";
40564
40870
  var styles = {"paragraphCopyWrapper":"index-module_paragraphCopyWrapper__3rGOI","paragraphCopyLabel":"index-module_paragraphCopyLabel__1Qb8u","paragraphCopy":"index-module_paragraphCopy__1y7Jo"};
40565
- styleInject(css_248z$z);
40871
+ styleInject(css_248z$A);
40566
40872
 
40567
40873
  var Paragraph = Typography.Paragraph;
40568
40874
  var Section = function Section(_ref) {
@@ -40735,4 +41041,4 @@ var SystemLog = function SystemLog(_ref) {
40735
41041
  });
40736
41042
  };
40737
41043
 
40738
- export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, AuthButton, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, ColumnsEdit, CommodityEntry, CustomSelector, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, index$8 as ExtendedCollapse, GuideWrapper, HandleTotalCount, index$4 as HomePageWrapper, JsonQueryTable, ModalUtils, index$6 as MoreTreeTable, ParagraphCopier, PropertySelector, QueryMutipleInput, QueryMutipleSearchSelect, RenderCompItem, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, Section, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, SystemLog, TableColumnSetting, TreeSearchSelect, authFunc, calculateValidPeriod, checkQuantityAccuracy, _coverToParallel as coverToParallel, createUniqID, downloadExcel, ergodicMenuRoutes, formContainerAndItemLayout, _formatter as formatter, getAccountID, getAccountId, getBreadcrumbNameMap, getCommonInfoKey, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getDictionaryTextByValue, getEmployeeCode, getEmployeeId, getItemDefaultWidth$1 as getItemDefaultWidth, getJoinDictionaryText, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getSkuImg, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBaseUrlPre, handleBeforeUpload, handleBssulaColumnsSpecialParams, handleCommonTimeRender$1 as handleCommonTimeRender, handleConvertResponse, handleError, handleExport, handleExportBarCode, handleJudgeAuthButtons, handleOssUrl, handleRequestAuthHeader, handleRequestHeader, handleRequestUrl, handleStatusBadge, handleTextBreakSpaces, handleTextDouble$1 as handleTextDouble, handleTextDoubleOrId, handleTextLineFeed$1 as handleTextLineFeed, handleTextOverflow$1 as handleTextOverflow, handleTextTooltip, handleTextWarp, handleTextWarpCustom, handleTooltip$1 as handleTooltip, handleTooltipHours$1 as handleTooltipHours, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, keyToWord, memoizeOneFormatter, noEmptyArr, noEmptyArray, paramsControl, parseWidth, precisionQuantity, processDetailButtonsVisible, randomString, readerXlsxToList, removeCurrentTenantId, removeTenantList, renderFixed2, renderNumberText, saveCurrentTenantId, saveTenantList, setConfigTableColumns, shouldUseAuth, socketFunctions, sulaTableRenderTooltip, tableColumnsImage$1 as tableColumnsImage, textIcon, updateGuanDate, userColumns$1 as userColumns, userInfoCard$1 as userInfoCard, uuid, writeListToXlsx };
41044
+ export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, AuthButton, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, ColumnsEdit, CommodityEntry, CustomSelector, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, index$8 as ExtendedCollapse, GuideWrapper, HandleTotalCount, index$4 as HomePageWrapper, JsonQueryTable, ModalUtils, index$6 as MoreTreeTable, ParagraphCopier, PropertySelector, QueryMutipleInput, QueryMutipleSearchSelect, RenderCompItem, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, Section, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, SystemLog, TableColumnSetting, TreeSearchSelect, PathDisplay as TrialCalculation, authFunc, calculateValidPeriod, checkQuantityAccuracy, _coverToParallel as coverToParallel, createUniqID, downloadExcel, ergodicMenuRoutes, formContainerAndItemLayout, _formatter as formatter, getAccountID, getAccountId, getBreadcrumbNameMap, getCommonInfoKey, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getDictionaryTextByValue, getEmployeeCode, getEmployeeId, getItemDefaultWidth$1 as getItemDefaultWidth, getJoinDictionaryText, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getSkuImg, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBaseUrlPre, handleBeforeUpload, handleBssulaColumnsSpecialParams, handleCommonTimeRender$1 as handleCommonTimeRender, handleConvertResponse, handleError, handleExport, handleExportBarCode, handleJudgeAuthButtons, handleOssUrl, handleRequestAuthHeader, handleRequestHeader, handleRequestUrl, handleStatusBadge, handleTextBreakSpaces, handleTextDouble$1 as handleTextDouble, handleTextDoubleOrId, handleTextLineFeed$1 as handleTextLineFeed, handleTextOverflow$1 as handleTextOverflow, handleTextTooltip, handleTextWarp, handleTextWarpCustom, handleTooltip$1 as handleTooltip, handleTooltipHours$1 as handleTooltipHours, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, keyToWord, memoizeOneFormatter, noEmptyArr, noEmptyArray, paramsControl, parseWidth, precisionQuantity, processDetailButtonsVisible, randomString, readerXlsxToList, removeCurrentTenantId, removeTenantList, renderFixed2, renderNumberText, saveCurrentTenantId, saveTenantList, setConfigTableColumns, shouldUseAuth, socketFunctions, sulaTableRenderTooltip, tableColumnsImage$1 as tableColumnsImage, textIcon, updateGuanDate, userColumns$1 as userColumns, userInfoCard$1 as userInfoCard, uuid, writeListToXlsx };
package/dist/index.js CHANGED
@@ -10188,8 +10188,9 @@ function commonFun(type, prefixUrl, parentProps) {
10188
10188
  name: 'qp-name-like',
10189
10189
  label: '供应商名称'
10190
10190
  }, {
10191
- name: 'qp-code-like',
10192
- label: '供应商编码'
10191
+ name: 'qp-code-in',
10192
+ label: '供应商编码',
10193
+ type: 'multipleQueryInput'
10193
10194
  }, {
10194
10195
  name: 'qp-createOrgCode-eq',
10195
10196
  type: 'select',
@@ -40531,9 +40532,314 @@ var index$7 = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
40531
40532
  })));
40532
40533
  });
40533
40534
 
40534
- var css_248z$y = ".bs-collapse-wrap {\n border-radius: 4px;\n overflow: hidden;\n}\n.bs-collapse-wrap .bs-collapse-header-wrap {\n background: #fff;\n}\n.bs-collapse-wrap .bs-collapse-icon {\n color: #b6b6b6;\n transition: transform 0.3s;\n}\n.bs-collapse-wrap .bs-guidewrap-icon-toogle {\n transform: rotate(180deg);\n}\n.bs-collapse-wrap .bs-collapse-header-title {\n font-weight: 500;\n font-size: 14px;\n color: #000000;\n}\n.bs-collapse-wrap .bs-collapse-header-divider {\n width: 3px;\n height: 20px;\n background: #005cff;\n}\n.bs-collapse-header-boder .ant-collapse .ant-collapse-item > .ant-collapse-header {\n border-bottom: 1px solid #f0f0f0;\n padding: 8px 16px;\n}\n";
40535
+ var css_248z$y = ".wrap_pathContentBox {\n padding: 30px;\n border: 1px solid #eee;\n overflow: auto;\n}\n.wrap_pathContentBoxTitle {\n height: 20px;\n margin-bottom: 20px;\n}\n.wrap_pathContentBox::-webkit-scrollbar {\n display: none;\n}\n.pathItem_content {\n display: flex;\n align-items: center;\n}\n.pathItem_block {\n width: 210px;\n height: 104px;\n padding: 10px 20px;\n background: rgba(24, 144, 255);\n color: #fff;\n font-weight: bolder;\n text-align: center;\n border-radius: 12px;\n box-shadow: 1px 1px 10px rgba(200, 201, 204, 0.4);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n line-height: 1.4;\n}\n.record_info {\n text-align: center;\n}\n.pathItem_line {\n margin: 0px 16px;\n}\n.pathItem_line_withRightArrow,\n.pathItem_line_withLeftArrow {\n position: relative;\n height: 10px;\n /* 根据需要调整高度 */\n display: flex;\n width: 130px;\n align-items: center;\n}\n.pathItem_line_withRightArrow {\n margin-top: 10px;\n}\n.pathItem_line_withLeftArrow {\n margin-bottom: 10px;\n}\n.pathItem_line_withRightArrow::before,\n.pathItem_line_withLeftArrow::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 100%;\n height: 4px;\n /* 直线的粗细 */\n background-color: rgba(24, 144, 255);\n z-index: 1;\n}\n.pathItem_line_rightArrow,\n.pathItem_line_leftArrow {\n position: relative;\n width: 0;\n height: 0;\n border-top: 10px solid transparent;\n border-bottom: 10px solid transparent;\n border-left: 10px solid rgba(24, 144, 255);\n /* 向右的蓝色箭头 */\n margin-left: 94%;\n /* 根据需要调整间距 */\n z-index: 2;\n}\n.pathItem_line_withLeftArrow {\n margin-top: 6px;\n}\n.pathItem_line_leftArrow {\n margin-left: -2px;\n transform: rotate(180deg);\n}\n";
40535
40536
  styleInject(css_248z$y);
40536
40537
 
40538
+ var formatPaths = function formatPaths(list) {
40539
+ var result = list.map(function (l, index) {
40540
+ var _l$nodes;
40541
+ var Item = l;
40542
+ if (l === null || l === void 0 ? void 0 : (_l$nodes = l.nodes) === null || _l$nodes === void 0 ? void 0 : _l$nodes.length) {
40543
+ Item.nodes = l === null || l === void 0 ? void 0 : l.nodes.map(function (s) {
40544
+ return _objectSpread2(_objectSpread2({}, s), {}, {
40545
+ kCode: "".concat(index, "_").concat(s.code)
40546
+ });
40547
+ });
40548
+ }
40549
+ return Item;
40550
+ });
40551
+ return result;
40552
+ };
40553
+ var getRecordBusinessType = function getRecordBusinessType(recordType) {
40554
+ var businessTypeDictCode = "";
40555
+ var list = [{
40556
+ recordType: "502",
40557
+ businessTypeDictCode: "SRM00001"
40558
+ }, {
40559
+ recordType: "503",
40560
+ businessTypeDictCode: "SRM00002"
40561
+ }, {
40562
+ recordType: "504",
40563
+ businessTypeDictCode: "TCbusinessType"
40564
+ }, {
40565
+ recordType: "505",
40566
+ businessTypeDictCode: "TCRbusinessType"
40567
+ }, {
40568
+ recordType: "1001",
40569
+ businessTypeDictCode: "ALLOCATE00002"
40570
+ }, {
40571
+ recordType: "1002",
40572
+ businessTypeDictCode: "ALLOCATE00002"
40573
+ }, {
40574
+ recordType: "50",
40575
+ businessTypeDictCode: "SC00022"
40576
+ }, {
40577
+ recordType: "30",
40578
+ businessTypeDictCode: "BUSINESS_Stock_Adjus"
40579
+ }, {
40580
+ recordType: "130",
40581
+ businessTypeDictCode: ""
40582
+ }, {
40583
+ recordType: "516",
40584
+ businessTypeDictCode: "BUSINESS_ticket_sale_type"
40585
+ }, {
40586
+ recordType: "1003",
40587
+ businessTypeDictCode: "BUSINESS_DBCK001"
40588
+ }, {
40589
+ recordType: "1004",
40590
+ businessTypeDictCode: "BUSINESS_DBCK001"
40591
+ }, {
40592
+ recordType: "1007",
40593
+ businessTypeDictCode: "BUSINESS_DBCK"
40594
+ }, {
40595
+ recordType: "517",
40596
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40597
+ }, {
40598
+ recordType: "518",
40599
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40600
+ } // 拆装箱入
40601
+ ];
40602
+ var match = list.find(function (item) {
40603
+ return item.recordType == recordType;
40604
+ });
40605
+ businessTypeDictCode = (match === null || match === void 0 ? void 0 : match.businessTypeDictCode) || '';
40606
+ return businessTypeDictCode;
40607
+ };
40608
+ var PathDisplay = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, ref) {
40609
+ var recordType = _ref.recordType,
40610
+ businessType = _ref.businessType,
40611
+ sendOrgCode = _ref.sendOrgCode,
40612
+ receiverOrgCode = _ref.receiverOrgCode,
40613
+ orderNo = _ref.orderNo,
40614
+ _ref$autoCallApi = _ref.autoCallApi,
40615
+ autoCallApi = _ref$autoCallApi === void 0 ? true : _ref$autoCallApi;
40616
+ // 组件内部状态管理
40617
+ var _useState = React$1.useState([]),
40618
+ _useState2 = _slicedToArray(_useState, 2),
40619
+ pathList = _useState2[0],
40620
+ setPathList = _useState2[1];
40621
+ var _useState3 = React$1.useState(''),
40622
+ _useState4 = _slicedToArray(_useState3, 2),
40623
+ routeCode = _useState4[0],
40624
+ setRouteCode = _useState4[1];
40625
+ var _useState5 = React$1.useState(''),
40626
+ _useState6 = _slicedToArray(_useState5, 2),
40627
+ routeCodeName = _useState6[0],
40628
+ setRouteCodeName = _useState6[1];
40629
+ var _useState7 = React$1.useState(false),
40630
+ _useState8 = _slicedToArray(_useState7, 2),
40631
+ loading = _useState8[0],
40632
+ setLoading = _useState8[1];
40633
+ // 暴露方法给父组件
40634
+ React__default['default'].useImperativeHandle(ref, function () {
40635
+ return {
40636
+ fetchData: fetchData
40637
+ };
40638
+ });
40639
+ var boock = function boock(nodeItem) {
40640
+ return /*#__PURE__*/React__default['default'].createElement("div", {
40641
+ className: "pathItem_block"
40642
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, "\u3010", nodeItem.code, "\u3011", nodeItem.name), /*#__PURE__*/React__default['default'].createElement("div", null, "\u7EC4\u7EC7\u5206\u7C7B\uFF1A", getDictionaryTextByValue('BUSINESS_ORG_CLASSIFICATION', nodeItem.orgClassification || '')));
40643
+ };
40644
+ // 调用接口获取数据
40645
+ var fetchData = /*#__PURE__*/function () {
40646
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
40647
+ var params, res, _res$data, _res, _res$data2, _res2, _res2$data, _res3, _res3$data, pList, formattedPaths, _t;
40648
+ return _regenerator().w(function (_context) {
40649
+ while (1) switch (_context.p = _context.n) {
40650
+ case 0:
40651
+ if (!(!recordType || !sendOrgCode || !receiverOrgCode)) {
40652
+ _context.n = 1;
40653
+ break;
40654
+ }
40655
+ return _context.a(2);
40656
+ case 1:
40657
+ setLoading(true);
40658
+ _context.p = 2;
40659
+ params = {
40660
+ recordType: recordType,
40661
+ businessType: businessType,
40662
+ sendOrgCode: sendOrgCode,
40663
+ receiverOrgCode: receiverOrgCode,
40664
+ orderNo: orderNo
40665
+ };
40666
+ console.log('params', params);
40667
+ _context.n = 3;
40668
+ return requestUtil({
40669
+ url: "/settle/crossOrgSettlementRoute/trialCalculation",
40670
+ method: 'POST',
40671
+ data: params
40672
+ });
40673
+ case 3:
40674
+ res = _context.v;
40675
+ debugger;
40676
+ if (handleError(res.data)) {
40677
+ res = res.data;
40678
+ if ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.match) {
40679
+ setRouteCodeName(((_res = res) === null || _res === void 0 ? void 0 : (_res$data2 = _res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.routeCodeName) || '');
40680
+ setRouteCode(((_res2 = res) === null || _res2 === void 0 ? void 0 : (_res2$data = _res2.data) === null || _res2$data === void 0 ? void 0 : _res2$data.routeCode) || '');
40681
+ pList = ((_res3 = res) === null || _res3 === void 0 ? void 0 : (_res3$data = _res3.data) === null || _res3$data === void 0 ? void 0 : _res3$data.fontDetails) || [];
40682
+ formattedPaths = formatPaths(pList);
40683
+ setPathList(formattedPaths);
40684
+ } else {
40685
+ // 清空历史结果
40686
+ setRouteCodeName('');
40687
+ setRouteCode('');
40688
+ setPathList([]);
40689
+ antd.message.warning('匹配不到跨组织链路');
40690
+ }
40691
+ } else {
40692
+ // 清空历史结果
40693
+ setRouteCodeName('');
40694
+ setRouteCode('');
40695
+ setPathList([]);
40696
+ antd.message.error('获取数据失败');
40697
+ }
40698
+ _context.n = 5;
40699
+ break;
40700
+ case 4:
40701
+ _context.p = 4;
40702
+ _t = _context.v;
40703
+ console.error('调用接口失败:', _t);
40704
+ setRouteCodeName('');
40705
+ setRouteCode('');
40706
+ setPathList([]);
40707
+ antd.message.error('调用接口失败');
40708
+ case 5:
40709
+ _context.p = 5;
40710
+ setLoading(false);
40711
+ return _context.f(5);
40712
+ case 6:
40713
+ return _context.a(2);
40714
+ }
40715
+ }, _callee, null, [[2, 4, 5, 6]]);
40716
+ }));
40717
+ return function fetchData() {
40718
+ return _ref2.apply(this, arguments);
40719
+ };
40720
+ }();
40721
+ // 监听props变化,自动调用接口
40722
+ React$1.useEffect(function () {
40723
+ if (autoCallApi) {
40724
+ fetchData();
40725
+ }
40726
+ }, [recordType, businessType, sendOrgCode, receiverOrgCode, orderNo, autoCallApi]);
40727
+ var line = function line(nodeItem) {
40728
+ // 物资凭证跳转处理
40729
+ var handleMaterialAssetVoucherJump = function handleMaterialAssetVoucherJump(recordId, recordNo) {
40730
+ var _window$$wujie;
40731
+ if ((_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.props.jump) {
40732
+ window.$wujie.props.jump({
40733
+ pathname: "/settle/end-term-management/material_asset_voucher/view/".concat(recordId, "/").concat(recordNo)
40734
+ });
40735
+ }
40736
+ };
40737
+ // 取价单跳转处理
40738
+ var handleCreditSettleJump = function handleCreditSettleJump(creditSettleId) {
40739
+ var _window$$wujie2;
40740
+ if ((_window$$wujie2 = window.$wujie) === null || _window$$wujie2 === void 0 ? void 0 : _window$$wujie2.props.jump) {
40741
+ window.$wujie.props.jump({
40742
+ pathname: "/pay/pay-management/credit-management/credit-settle/view/".concat(creditSettleId)
40743
+ });
40744
+ }
40745
+ };
40746
+ return /*#__PURE__*/React__default['default'].createElement("div", {
40747
+ className: "pathItem_line"
40748
+ }, nodeItem.targetOrgCode && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
40749
+ title: /*#__PURE__*/React__default['default'].createElement("div", {
40750
+ style: {
40751
+ fontSize: '12px',
40752
+ lineHeight: '1.5'
40753
+ }
40754
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, "\u7ED3\u7B97\u5355\u636E\uFF1A", nodeItem.targetRecordName), /*#__PURE__*/React__default['default'].createElement("div", null, "\u4E1A\u52A1\u7C7B\u578B\uFF1A", getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')), /*#__PURE__*/React__default['default'].createElement("div", null, "\u4EF7\u683C\u6765\u6E90\uFF1A", nodeItem.targetOtherLineInfo), /*#__PURE__*/React__default['default'].createElement("div", null, "\u7269\u8D44\u51ED\u8BC1\uFF1A", nodeItem.targetRecordNo || ' '), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.targetOccupyType === 1 ? '信贷占用单' : '结算取价单', "\uFF1A", nodeItem.targetCreditSettleNo || ' ')),
40755
+ placement: "top"
40756
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40757
+ className: "record_info"
40758
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40759
+ style: {
40760
+ fontSize: '12px',
40761
+ lineHeight: '1.5'
40762
+ }
40763
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.targetRecordName), /*#__PURE__*/React__default['default'].createElement("div", null, getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.targetOtherLineInfo), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.targetRecordId && nodeItem.targetRecordNo ? (/*#__PURE__*/React__default['default'].createElement("span", {
40764
+ style: {
40765
+ cursor: 'pointer',
40766
+ color: '#1890ff',
40767
+ textDecoration: 'underline'
40768
+ },
40769
+ onClick: function onClick() {
40770
+ return handleMaterialAssetVoucherJump(nodeItem.targetRecordId || '', nodeItem.targetRecordNo || '');
40771
+ }
40772
+ }, nodeItem.targetRecordNo)) : nodeItem.targetRecordNo), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.targetCreditSettleId ? (/*#__PURE__*/React__default['default'].createElement("span", {
40773
+ style: {
40774
+ cursor: 'pointer',
40775
+ color: '#1890ff',
40776
+ textDecoration: 'underline'
40777
+ },
40778
+ onClick: function onClick() {
40779
+ return handleCreditSettleJump(nodeItem.targetCreditSettleId || '');
40780
+ }
40781
+ }, nodeItem.targetCreditSettleNo)) : nodeItem.targetCreditSettleNo)))), /*#__PURE__*/React__default['default'].createElement("div", {
40782
+ className: "pathItem_line_withRightArrow"
40783
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40784
+ className: "pathItem_line_rightArrow"
40785
+ })))) || null, nodeItem.sourceOrgCode && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
40786
+ className: "pathItem_line_withLeftArrow"
40787
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40788
+ className: "pathItem_line_leftArrow"
40789
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
40790
+ title: /*#__PURE__*/React__default['default'].createElement("div", {
40791
+ style: {
40792
+ fontSize: '12px',
40793
+ lineHeight: '1.5'
40794
+ }
40795
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, "\u7ED3\u7B97\u5355\u636E\uFF1A", nodeItem.sourceRecordName), /*#__PURE__*/React__default['default'].createElement("div", null, "\u4E1A\u52A1\u7C7B\u578B\uFF1A", getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')), /*#__PURE__*/React__default['default'].createElement("div", null, "\u4EF7\u683C\u6765\u6E90\uFF1A", nodeItem.sourceOtherLineInfo), /*#__PURE__*/React__default['default'].createElement("div", null, "\u7269\u8D44\u51ED\u8BC1\uFF1A", nodeItem.sourceRecordNo || ' '), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.sourceOccupyType === 1 ? '信贷占用单' : '结算取价单', "\uFF1A", nodeItem.sourceCreditSettleNo || ' ')),
40796
+ placement: "top"
40797
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40798
+ className: "record_info"
40799
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40800
+ style: {
40801
+ fontSize: '12px',
40802
+ lineHeight: '1.5'
40803
+ }
40804
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.sourceRecordName), /*#__PURE__*/React__default['default'].createElement("div", null, getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.sourceOtherLineInfo), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.sourceRecordId && nodeItem.sourceRecordNo ? (/*#__PURE__*/React__default['default'].createElement("span", {
40805
+ style: {
40806
+ cursor: 'pointer',
40807
+ color: '#1890ff',
40808
+ textDecoration: 'underline'
40809
+ },
40810
+ onClick: function onClick() {
40811
+ return handleMaterialAssetVoucherJump(nodeItem.sourceRecordId || '', nodeItem.sourceRecordNo || '');
40812
+ }
40813
+ }, nodeItem.sourceRecordNo || ' ')) : nodeItem.sourceRecordNo || ' '), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.sourceCreditSettleId ? (/*#__PURE__*/React__default['default'].createElement("span", {
40814
+ style: {
40815
+ cursor: 'pointer',
40816
+ color: '#1890ff',
40817
+ textDecoration: 'underline'
40818
+ },
40819
+ onClick: function onClick() {
40820
+ return handleCreditSettleJump(nodeItem.sourceCreditSettleId || '');
40821
+ }
40822
+ }, nodeItem.sourceCreditSettleNo || ' ')) : nodeItem.sourceCreditSettleNo || ' ')))))) || null);
40823
+ };
40824
+ return /*#__PURE__*/React__default['default'].createElement("div", {
40825
+ className: "wrap_pathContentBox"
40826
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
40827
+ spinning: loading,
40828
+ tip: "\u52A0\u8F7D\u4E2D..."
40829
+ }, routeCode && /*#__PURE__*/React__default['default'].createElement("div", {
40830
+ className: "wrap_pathContentBoxTitle"
40831
+ }, "\u8DE8\u7EC4\u7EC7\u94FE\u8DEF\u540D\u79F0\uFF1A\u3010", routeCode, "\u3011", routeCodeName), /*#__PURE__*/React__default['default'].createElement("div", {
40832
+ className: "pathItem_content"
40833
+ }, pathList.map(function (nodeItem, index) {
40834
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, {
40835
+ key: "node_".concat(index)
40836
+ }, boock(nodeItem), line(nodeItem));
40837
+ }))));
40838
+ });
40839
+
40840
+ var css_248z$z = ".bs-collapse-wrap {\n border-radius: 4px;\n overflow: hidden;\n}\n.bs-collapse-wrap .bs-collapse-header-wrap {\n background: #fff;\n}\n.bs-collapse-wrap .bs-collapse-icon {\n color: #b6b6b6;\n transition: transform 0.3s;\n}\n.bs-collapse-wrap .bs-guidewrap-icon-toogle {\n transform: rotate(180deg);\n}\n.bs-collapse-wrap .bs-collapse-header-title {\n font-weight: 500;\n font-size: 14px;\n color: #000000;\n}\n.bs-collapse-wrap .bs-collapse-header-divider {\n width: 3px;\n height: 20px;\n background: #005cff;\n}\n.bs-collapse-header-boder .ant-collapse .ant-collapse-item > .ant-collapse-header {\n border-bottom: 1px solid #f0f0f0;\n padding: 8px 16px;\n}\n";
40841
+ styleInject(css_248z$z);
40842
+
40537
40843
  var _excluded$m = ["titleExtra", "header", "showArrow"];
40538
40844
  var Panel = antd.Collapse.Panel;
40539
40845
  var ExtendedPanel = function ExtendedPanel(_ref) {
@@ -40583,9 +40889,9 @@ var index$8 = Object.assign(ExtendedCollapse, {
40583
40889
  Board: ExtendedPanel
40584
40890
  });
40585
40891
 
40586
- var css_248z$z = ".index-module_paragraphCopyWrapper__3rGOI {\n display: flex;\n margin-bottom: 4px;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopyLabel__1Qb8u {\n color: #8c8e91;\n font-size: 12px;\n white-space: nowrap;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopy__1y7Jo {\n min-width: 100px;\n margin-bottom: 0;\n font-size: 12px;\n flex: 1;\n}\n";
40892
+ var css_248z$A = ".index-module_paragraphCopyWrapper__3rGOI {\n display: flex;\n margin-bottom: 4px;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopyLabel__1Qb8u {\n color: #8c8e91;\n font-size: 12px;\n white-space: nowrap;\n}\n.index-module_paragraphCopyWrapper__3rGOI .index-module_paragraphCopy__1y7Jo {\n min-width: 100px;\n margin-bottom: 0;\n font-size: 12px;\n flex: 1;\n}\n";
40587
40893
  var styles = {"paragraphCopyWrapper":"index-module_paragraphCopyWrapper__3rGOI","paragraphCopyLabel":"index-module_paragraphCopyLabel__1Qb8u","paragraphCopy":"index-module_paragraphCopy__1y7Jo"};
40588
- styleInject(css_248z$z);
40894
+ styleInject(css_248z$A);
40589
40895
 
40590
40896
  var Paragraph = antd.Typography.Paragraph;
40591
40897
  var Section = function Section(_ref) {
@@ -40800,6 +41106,7 @@ exports.SulaColumnSettingTable = ColumnSettingSulaTable;
40800
41106
  exports.SystemLog = SystemLog;
40801
41107
  exports.TableColumnSetting = TableColumnSetting;
40802
41108
  exports.TreeSearchSelect = TreeSearchSelect;
41109
+ exports.TrialCalculation = PathDisplay;
40803
41110
  exports.authFunc = authFunc;
40804
41111
  exports.calculateValidPeriod = calculateValidPeriod;
40805
41112
  exports.checkQuantityAccuracy = checkQuantityAccuracy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.0-alpha.12",
3
+ "version": "4.2.0-alpha.14",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -237,7 +237,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
237
237
  }
238
238
  tableSearchForm = [
239
239
  { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
240
- { name: 'qp-code-like', label: '供应商编码' },
240
+ { name: 'qp-code-in', label: '供应商编码', type: 'multipleQueryInput' },
241
241
  { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
242
242
  type: 'select',
243
243
  props: {
@@ -0,0 +1,93 @@
1
+ .wrap_pathContentBox {
2
+ padding: 30px;
3
+ border: 1px solid #eee;
4
+ overflow: auto;
5
+ }
6
+
7
+ .wrap_pathContentBoxTitle {
8
+ height: 20px;
9
+ margin-bottom: 20px
10
+ }
11
+
12
+ .wrap_pathContentBox::-webkit-scrollbar {
13
+ display: none;
14
+ }
15
+
16
+ .pathItem_content {
17
+ display: flex;
18
+ align-items: center;
19
+ }
20
+
21
+ .pathItem_block {
22
+ width: 210px;
23
+ height: 104px;
24
+ padding: 10px 20px;
25
+ background: rgba(24, 144, 255);
26
+ color: #fff;
27
+ font-weight: bolder;
28
+ text-align: center;
29
+ border-radius: 12px;
30
+ box-shadow: 1px 1px 10px rgba(200,201,204,.4);
31
+ cursor: pointer;
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: center;
35
+ align-items: center;
36
+ line-height: 1.4;
37
+ }
38
+
39
+ .record_info {
40
+ text-align: center;
41
+ }
42
+
43
+ .pathItem_line {
44
+ margin: 0px 16px;
45
+ }
46
+
47
+ .pathItem_line_withRightArrow, .pathItem_line_withLeftArrow {
48
+ position: relative;
49
+ height: 10px; /* 根据需要调整高度 */
50
+ display: flex;
51
+ width: 130px;
52
+ align-items: center;
53
+ }
54
+
55
+ .pathItem_line_withRightArrow {
56
+ margin-top: 10px;
57
+ }
58
+
59
+ .pathItem_line_withLeftArrow {
60
+ margin-bottom: 10px;
61
+ }
62
+
63
+ .pathItem_line_withRightArrow::before, .pathItem_line_withLeftArrow::before {
64
+ content: '';
65
+ position: absolute;
66
+ left: 0;
67
+ top: 50%;
68
+ transform: translateY(-50%);
69
+ width: 100%;
70
+ height: 4px; /* 直线的粗细 */
71
+ background-color: rgba(24, 144, 255);
72
+ z-index: 1;
73
+ }
74
+
75
+ .pathItem_line_rightArrow, .pathItem_line_leftArrow {
76
+ position: relative;
77
+ width: 0;
78
+ height: 0;
79
+ border-top: 10px solid transparent;
80
+ border-bottom: 10px solid transparent;
81
+ border-left: 10px solid rgba(24, 144, 255); /* 向右的蓝色箭头 */
82
+ margin-left: 94%; /* 根据需要调整间距 */
83
+ z-index: 2;
84
+ }
85
+
86
+ .pathItem_line_withLeftArrow {
87
+ margin-top: 6px;
88
+ }
89
+
90
+ .pathItem_line_leftArrow {
91
+ margin-left: -2px;
92
+ transform: rotate(180deg);
93
+ }
@@ -0,0 +1,77 @@
1
+ # PathDisplay 组件说明文档
2
+
3
+ `PathDisplay` 是一个用于展示跨组织结算链路的图形化组件。它主要用于“试算”场景,根据输入的单据信息,调用后端接口获取预测的结算路径,并以“节点(组织)+ 连线(单据/业务流)”的形式直观展示。
4
+
5
+ ## 1. 组件引入
6
+
7
+ ```typescript
8
+ import PathDisplay from '@/components/Business/TrialCalculation/PathDisplay';
9
+ ```
10
+
11
+ ## 2. Props 参数说明
12
+
13
+ | 参数名 | 类型 | 必填 | 默认值 | 说明 |
14
+ | --- | --- | --- | --- | --- |
15
+ | `recordType` | `string` | 否 | - | 单据类型(如:1007-跨组织调拨) |
16
+ | `businessType` | `string` | 否 | - | 业务类型 |
17
+ | `sendOrgCode` | `string` | 否 | - | 发货组织/调出组织编码 |
18
+ | `receiverOrgCode` | `string` | 否 | - | 收货组织/调入组织编码 |
19
+ | `orderNo` | `string` | 否 | - | 业务单号 |
20
+ | `autoCallApi` | `boolean` | 否 | `true` | 是否在参数变化时自动调用接口 |
21
+
22
+ ## 3. Ref 方法暴露
23
+
24
+ 组件通过 `forwardRef` 暴露了以下方法,可通过 `ref` 调用:
25
+
26
+ | 方法名 | 类型 | 说明 |
27
+ | --- | --- | --- |
28
+ | `fetchData` | `() => Promise<void>` | 手动触发接口调用,重新获取链路数据 |
29
+
30
+ ## 4. 使用示例
31
+
32
+ ### 4.1 基本使用(自动触发)
33
+
34
+ 只要传入必要的 props,组件会自动调用接口并展示结果。
35
+
36
+ ```tsx
37
+ import React from 'react';
38
+ import PathDisplay from '@/components/Business/TrialCalculation';
39
+
40
+ const Demo = () => {
41
+ return (
42
+ <PathDisplay
43
+ recordType="1007"
44
+ businessType="1"
45
+ sendOrgCode="KDX0001"
46
+ receiverOrgCode="KD0002"
47
+ orderNo="DBCK25121700000014"
48
+ />
49
+ );
50
+ };
51
+
52
+ export default Demo;
53
+ ```
54
+
55
+ ### 4.2 手动触发(配合表单查询)
56
+
57
+ 如果需要点击“查询”按钮后再触发试算,可以将 `autoCallApi` 设置为 `false`,并通过 `ref` 调用 `fetchData`。
58
+
59
+
60
+ ```
61
+
62
+ ## 5. 业务逻辑说明
63
+
64
+ ### 5.1 接口请求
65
+ 组件内部调用 `/settle/crossOrgSettlementRoute/trialCalculation` 接口。
66
+ * **Method**: POST
67
+ * **请求参数**: 取自 Props 中的 `recordType`, `businessType`, `sendOrgCode`, `receiverOrgCode`, `orderNo`。
68
+
69
+ ### 5.2 页面跳转
70
+ 组件中包含物资凭证号和结算取价单号的跳转逻辑,依赖微前端环境:
71
+ * **物资凭证跳转**: `/settle/end-term-management/material_asset_voucher/view/:id/:no`
72
+ * **取价单跳转**: `/pay/pay-management/credit-management/credit-settle/view/:id`
73
+
74
+ > 注意:跳转功能依赖 `window.$wujie.props.jump` 方法。如果在非微前端环境(无 wujie 注入)下使用,跳转点击将无效(但不会报错,有空值判断)。
75
+
76
+ ### 5.3 字典依赖
77
+ 组件展示业务类型名称时,依赖全局工具函数 `getDictionaryTextByValue` 和内置的 `getRecordBusinessType` 映射逻辑。确保项目中已加载相关数据字典(如 `BUSINESS_ORG_CLASSIFICATION` 等)。
@@ -0,0 +1,322 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import { Tooltip, message, Spin } from 'antd';
3
+ import request from '@/utils/request';
4
+ import { getDictionaryTextByValue, handleError } from '@/utils';
5
+ import './PathDisplay.less';
6
+
7
+ const formatPaths = (list: any) => {
8
+ const result = list.map((l: any, index: number) => {
9
+ const Item = l;
10
+ if (l?.nodes?.length) {
11
+ Item.nodes = l?.nodes.map((s: any) => ({
12
+ ...s,
13
+ kCode: `${index}_${s.code}`,
14
+ }));
15
+ }
16
+ return Item;
17
+ });
18
+ return result;
19
+ };
20
+
21
+ const getRecordBusinessType = (recordType: any) => {
22
+ let businessTypeDictCode = "";
23
+ const list = [
24
+ { recordType: "502", businessTypeDictCode: "SRM00001" }, // 采购单
25
+ { recordType: "503", businessTypeDictCode: "SRM00002" }, // 采购退单
26
+ { recordType: "504", businessTypeDictCode: "TCbusinessType" }, // 销售单
27
+ { recordType: "505", businessTypeDictCode: "TCRbusinessType" }, // 销售退单
28
+ { recordType: "1001", businessTypeDictCode: "ALLOCATE00002" }, // 调拨出
29
+ { recordType: "1002", businessTypeDictCode: "ALLOCATE00002" }, // 调拨入
30
+ { recordType: "50", businessTypeDictCode: "SC00022" }, // 其他出入库单
31
+ { recordType: "30", businessTypeDictCode: "BUSINESS_Stock_Adjus" }, // 库存调整
32
+ { recordType: "130", businessTypeDictCode: "" }, // 逻辑移位单
33
+ {
34
+ recordType: "516",
35
+ businessTypeDictCode: "BUSINESS_ticket_sale_type",
36
+ }, // pos订单
37
+ { recordType: "1003", businessTypeDictCode: "BUSINESS_DBCK001" }, // 跨组织调拨出库单
38
+ { recordType: "1004", businessTypeDictCode: "BUSINESS_DBCK001" }, // 跨组织调拨入库单
39
+ { recordType: "1007", businessTypeDictCode: "BUSINESS_DBCK" }, // 跨组织调拨
40
+ { recordType: "517", businessTypeDictCode: "BUSINESS_AssReceiptType" }, // 拆装箱出
41
+ { recordType: "518", businessTypeDictCode: "BUSINESS_AssReceiptType" }, // 拆装箱入
42
+ ];
43
+ const match = list.find((item) => item.recordType == recordType);
44
+ businessTypeDictCode = match?.businessTypeDictCode || '';
45
+ return businessTypeDictCode;
46
+ };
47
+
48
+ interface NodeItem {
49
+ name: string;
50
+ code?: string;
51
+ orgClassification?: string;
52
+ targetOrgCode?: string;
53
+ targetRecordName?: string;
54
+ targetRecordType?: string;
55
+ targetBusinessType?: string;
56
+ targetOtherLineInfo?: string;
57
+ targetRecordNo?: string;
58
+ targetOccupyType?: number;
59
+ targetCreditSettleNo?: string;
60
+ targetRecordId?: string;
61
+ targetCreditSettleId?: string;
62
+ sourceOrgCode?: string;
63
+ sourceRecordName?: string;
64
+ sourceRecordType?: string;
65
+ sourceBusinessType?: string;
66
+ sourceOtherLineInfo?: string;
67
+ sourceRecordNo?: string;
68
+ sourceOccupyType?: number;
69
+ sourceCreditSettleNo?: string;
70
+ sourceRecordId?: string;
71
+ sourceCreditSettleId?: string;
72
+ }
73
+
74
+ interface PathDisplayProps {
75
+ recordType?: string;
76
+ businessType?: string;
77
+ sendOrgCode?: string;
78
+ receiverOrgCode?: string;
79
+ orderNo?: string;
80
+ autoCallApi?: boolean;
81
+ }
82
+
83
+ interface PathDisplayRef {
84
+ fetchData: () => Promise<void>;
85
+ }
86
+
87
+ const PathDisplay = React.forwardRef<PathDisplayRef, PathDisplayProps>(({
88
+ recordType,
89
+ businessType,
90
+ sendOrgCode,
91
+ receiverOrgCode,
92
+ orderNo,
93
+ autoCallApi = true
94
+ }, ref) => {
95
+ // 组件内部状态管理
96
+ const [pathList, setPathList] = useState<NodeItem[]>([]);
97
+ const [routeCode, setRouteCode] = useState<string>('');
98
+ const [routeCodeName, setRouteCodeName] = useState<string>('');
99
+ const [loading, setLoading] = useState<boolean>(false);
100
+
101
+ // 暴露方法给父组件
102
+ React.useImperativeHandle(ref, () => ({
103
+ fetchData
104
+ }));
105
+
106
+ const boock = (nodeItem: NodeItem) => (
107
+ <div className="pathItem_block">
108
+ <div>【{nodeItem.code}】{nodeItem.name}</div>
109
+ <div>组织分类:{getDictionaryTextByValue('BUSINESS_ORG_CLASSIFICATION', nodeItem.orgClassification || '')}</div>
110
+ </div>
111
+ );
112
+
113
+ // 调用接口获取数据
114
+ const fetchData = async () => {
115
+ // 检查必要参数
116
+ if (!recordType || !sendOrgCode || !receiverOrgCode) {
117
+ return;
118
+ }
119
+
120
+ setLoading(true);
121
+ try {
122
+ const params = {
123
+ recordType,
124
+ businessType,
125
+ sendOrgCode,
126
+ receiverOrgCode,
127
+ orderNo,
128
+ };
129
+ console.log('params', params);
130
+ let res = await request({
131
+ url: `/settle/crossOrgSettlementRoute/trialCalculation`,
132
+ method: 'POST',
133
+ data: params,
134
+ });
135
+ debugger
136
+ if (handleError(res.data)) {
137
+ res = res.data;
138
+ if (res.data?.match) {
139
+ setRouteCodeName(res?.data?.routeCodeName || '');
140
+ setRouteCode(res?.data?.routeCode || '');
141
+
142
+ const pList = res?.data?.fontDetails || [];
143
+ const formattedPaths = formatPaths(pList);
144
+ setPathList(formattedPaths);
145
+ } else {
146
+ // 清空历史结果
147
+ setRouteCodeName('');
148
+ setRouteCode('');
149
+ setPathList([]);
150
+ message.warning('匹配不到跨组织链路');
151
+ }
152
+ } else {
153
+ // 清空历史结果
154
+ setRouteCodeName('');
155
+ setRouteCode('');
156
+ setPathList([]);
157
+ message.error('获取数据失败');
158
+ }
159
+ } catch (error) {
160
+ console.error('调用接口失败:', error);
161
+ setRouteCodeName('');
162
+ setRouteCode('');
163
+ setPathList([]);
164
+ message.error('调用接口失败');
165
+ } finally {
166
+ setLoading(false);
167
+ }
168
+ };
169
+
170
+ // 监听props变化,自动调用接口
171
+ useEffect(() => {
172
+ if (autoCallApi) {
173
+ fetchData();
174
+ }
175
+ }, [recordType, businessType, sendOrgCode, receiverOrgCode, orderNo, autoCallApi]);
176
+
177
+ const line = (nodeItem: NodeItem) => {
178
+ // 物资凭证跳转处理
179
+ const handleMaterialAssetVoucherJump = (recordId: string, recordNo: string) => {
180
+ if ((window as any).$wujie?.props.jump) {
181
+ (window as any).$wujie.props.jump({
182
+ pathname: `/settle/end-term-management/material_asset_voucher/view/${recordId}/${recordNo}`,
183
+ });
184
+ }
185
+ };
186
+
187
+ // 取价单跳转处理
188
+ const handleCreditSettleJump = (creditSettleId: string) => {
189
+ if ((window as any).$wujie?.props.jump) {
190
+ (window as any).$wujie.props.jump({
191
+ pathname: `/pay/pay-management/credit-management/credit-settle/view/${creditSettleId}`,
192
+ });
193
+ }
194
+ };
195
+
196
+ return (
197
+ <div className="pathItem_line">
198
+ {nodeItem.targetOrgCode && (
199
+ <>
200
+ <Tooltip
201
+ title={
202
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
203
+ <div>结算单据:{nodeItem.targetRecordName}</div>
204
+ <div>业务类型:{getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')}</div>
205
+ <div>价格来源:{nodeItem.targetOtherLineInfo}</div>
206
+ <div>物资凭证:{nodeItem.targetRecordNo || ' '}</div>
207
+ <div>{nodeItem.targetOccupyType === 1 ? '信贷占用单' : '结算取价单' }:{nodeItem.targetCreditSettleNo || ' '}</div>
208
+ </div>
209
+ }
210
+ placement="top"
211
+ >
212
+ <div className="record_info">
213
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
214
+ <div>{nodeItem.targetRecordName}</div>
215
+ <div>{getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')}</div>
216
+ <div>{nodeItem.targetOtherLineInfo}</div>
217
+ <div>
218
+ {nodeItem.targetRecordId && nodeItem.targetRecordNo ? (
219
+ <span
220
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
221
+ onClick={() => handleMaterialAssetVoucherJump(nodeItem.targetRecordId || '', nodeItem.targetRecordNo || '')}
222
+ >
223
+ {nodeItem.targetRecordNo}
224
+ </span>
225
+ ) : (
226
+ nodeItem.targetRecordNo
227
+ )}
228
+ </div>
229
+ <div>
230
+ {nodeItem.targetCreditSettleId ? (
231
+ <span
232
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
233
+ onClick={() => handleCreditSettleJump(nodeItem.targetCreditSettleId || '')}
234
+ >
235
+ {nodeItem.targetCreditSettleNo}
236
+ </span>
237
+ ) : (
238
+ nodeItem.targetCreditSettleNo
239
+ )}
240
+ </div>
241
+ </div>
242
+ </div>
243
+ </Tooltip>
244
+ <div className="pathItem_line_withRightArrow">
245
+ <div className="pathItem_line_rightArrow"></div>
246
+ </div>
247
+ </>
248
+ ) || null}
249
+ {nodeItem.sourceOrgCode && (
250
+ <>
251
+ <div className="pathItem_line_withLeftArrow">
252
+ <div className="pathItem_line_leftArrow"></div>
253
+ </div>
254
+ <Tooltip
255
+ title={
256
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
257
+ <div>结算单据:{nodeItem.sourceRecordName}</div>
258
+ <div>业务类型:{getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')}</div>
259
+ <div>价格来源:{nodeItem.sourceOtherLineInfo}</div>
260
+ <div>物资凭证:{nodeItem.sourceRecordNo || ' '}</div>
261
+ <div>{nodeItem.sourceOccupyType === 1 ? '信贷占用单' : '结算取价单' }:{nodeItem.sourceCreditSettleNo || ' '}</div>
262
+ </div>
263
+ }
264
+ placement="top"
265
+ >
266
+ <div className="record_info">
267
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
268
+ <div>{nodeItem.sourceRecordName}</div>
269
+ <div>{getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')}</div>
270
+ <div>{nodeItem.sourceOtherLineInfo}</div>
271
+ <div>
272
+ {nodeItem.sourceRecordId && nodeItem.sourceRecordNo ? (
273
+ <span
274
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
275
+ onClick={() => handleMaterialAssetVoucherJump(nodeItem.sourceRecordId || '', nodeItem.sourceRecordNo || '')}
276
+ >
277
+ {nodeItem.sourceRecordNo || ' '}
278
+ </span>
279
+ ) : (
280
+ nodeItem.sourceRecordNo || ' '
281
+ )}
282
+ </div>
283
+ <div>
284
+ {nodeItem.sourceCreditSettleId ? (
285
+ <span
286
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
287
+ onClick={() => handleCreditSettleJump(nodeItem.sourceCreditSettleId || '')}
288
+ >
289
+ {nodeItem.sourceCreditSettleNo || ' '}
290
+ </span>
291
+ ) : (
292
+ nodeItem.sourceCreditSettleNo || ' '
293
+ )}
294
+ </div>
295
+ </div>
296
+ </div>
297
+ </Tooltip>
298
+ </>
299
+ ) || null}
300
+ </div>
301
+ );
302
+ };
303
+
304
+ return (
305
+ <div className="wrap_pathContentBox">
306
+ <Spin spinning={loading} tip="加载中...">
307
+ {routeCode && <div className="wrap_pathContentBoxTitle">跨组织链路名称:【{routeCode}】{routeCodeName}</div> }
308
+
309
+ <div className="pathItem_content">
310
+ {pathList.map((nodeItem, index) => (
311
+ <React.Fragment key={`node_${index}`}>
312
+ {boock(nodeItem)}
313
+ {line(nodeItem)}
314
+ </React.Fragment>
315
+ ))}
316
+ </div>
317
+ </Spin>
318
+ </div>
319
+ );
320
+ });
321
+
322
+ export default PathDisplay;
package/src/index.ts CHANGED
@@ -44,6 +44,7 @@ export * from './components/Functional/BsAntdSula/index';
44
44
  export { default as RuleComponent} from './components/Solution/RuleComponent';
45
45
  export { default as RuleSetter} from './components/Solution/RuleSetter';
46
46
  export { default as RenderCompItem} from './components/Solution/RuleComponent/RenderCompItem';
47
+ export { default as TrialCalculation} from './components/Business/TrialCalculation';
47
48
 
48
49
  export { processDetailButtonsVisible as processDetailButtonsVisible } from './components/Business/DetailPageWrapper';
49
50