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

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,14 @@
1
+ import React from 'react';
2
+ interface PathDisplayProps {
3
+ recordType?: string;
4
+ businessType?: string;
5
+ sendOrgCode?: string;
6
+ receiverOrgCode?: string;
7
+ orderNo?: string;
8
+ autoCallApi?: boolean;
9
+ }
10
+ interface PathDisplayRef {
11
+ fetchData: () => Promise<void>;
12
+ }
13
+ declare const PathDisplay: React.ForwardRefExoticComponent<PathDisplayProps & React.RefAttributes<PathDisplayRef>>;
14
+ 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
@@ -40508,9 +40508,314 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
40508
40508
  })));
40509
40509
  });
40510
40510
 
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";
40511
+ 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
40512
  styleInject(css_248z$y);
40513
40513
 
40514
+ var formatPaths = function formatPaths(list) {
40515
+ var result = list.map(function (l, index) {
40516
+ var _l$nodes;
40517
+ var Item = l;
40518
+ if (l === null || l === void 0 ? void 0 : (_l$nodes = l.nodes) === null || _l$nodes === void 0 ? void 0 : _l$nodes.length) {
40519
+ Item.nodes = l === null || l === void 0 ? void 0 : l.nodes.map(function (s) {
40520
+ return _objectSpread2(_objectSpread2({}, s), {}, {
40521
+ kCode: "".concat(index, "_").concat(s.code)
40522
+ });
40523
+ });
40524
+ }
40525
+ return Item;
40526
+ });
40527
+ return result;
40528
+ };
40529
+ var getRecordBusinessType = function getRecordBusinessType(recordType) {
40530
+ var businessTypeDictCode = "";
40531
+ var list = [{
40532
+ recordType: "502",
40533
+ businessTypeDictCode: "SRM00001"
40534
+ }, {
40535
+ recordType: "503",
40536
+ businessTypeDictCode: "SRM00002"
40537
+ }, {
40538
+ recordType: "504",
40539
+ businessTypeDictCode: "TCbusinessType"
40540
+ }, {
40541
+ recordType: "505",
40542
+ businessTypeDictCode: "TCRbusinessType"
40543
+ }, {
40544
+ recordType: "1001",
40545
+ businessTypeDictCode: "ALLOCATE00002"
40546
+ }, {
40547
+ recordType: "1002",
40548
+ businessTypeDictCode: "ALLOCATE00002"
40549
+ }, {
40550
+ recordType: "50",
40551
+ businessTypeDictCode: "SC00022"
40552
+ }, {
40553
+ recordType: "30",
40554
+ businessTypeDictCode: "BUSINESS_Stock_Adjus"
40555
+ }, {
40556
+ recordType: "130",
40557
+ businessTypeDictCode: ""
40558
+ }, {
40559
+ recordType: "516",
40560
+ businessTypeDictCode: "BUSINESS_ticket_sale_type"
40561
+ }, {
40562
+ recordType: "1003",
40563
+ businessTypeDictCode: "BUSINESS_DBCK001"
40564
+ }, {
40565
+ recordType: "1004",
40566
+ businessTypeDictCode: "BUSINESS_DBCK001"
40567
+ }, {
40568
+ recordType: "1007",
40569
+ businessTypeDictCode: "BUSINESS_DBCK"
40570
+ }, {
40571
+ recordType: "517",
40572
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40573
+ }, {
40574
+ recordType: "518",
40575
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40576
+ } // 拆装箱入
40577
+ ];
40578
+ var match = list.find(function (item) {
40579
+ return item.recordType == recordType;
40580
+ });
40581
+ businessTypeDictCode = (match === null || match === void 0 ? void 0 : match.businessTypeDictCode) || '';
40582
+ return businessTypeDictCode;
40583
+ };
40584
+ var PathDisplay = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
40585
+ var recordType = _ref.recordType,
40586
+ businessType = _ref.businessType,
40587
+ sendOrgCode = _ref.sendOrgCode,
40588
+ receiverOrgCode = _ref.receiverOrgCode,
40589
+ orderNo = _ref.orderNo,
40590
+ _ref$autoCallApi = _ref.autoCallApi,
40591
+ autoCallApi = _ref$autoCallApi === void 0 ? true : _ref$autoCallApi;
40592
+ // 组件内部状态管理
40593
+ var _useState = useState([]),
40594
+ _useState2 = _slicedToArray(_useState, 2),
40595
+ pathList = _useState2[0],
40596
+ setPathList = _useState2[1];
40597
+ var _useState3 = useState(''),
40598
+ _useState4 = _slicedToArray(_useState3, 2),
40599
+ routeCode = _useState4[0],
40600
+ setRouteCode = _useState4[1];
40601
+ var _useState5 = useState(''),
40602
+ _useState6 = _slicedToArray(_useState5, 2),
40603
+ routeCodeName = _useState6[0],
40604
+ setRouteCodeName = _useState6[1];
40605
+ var _useState7 = useState(false),
40606
+ _useState8 = _slicedToArray(_useState7, 2),
40607
+ loading = _useState8[0],
40608
+ setLoading = _useState8[1];
40609
+ // 暴露方法给父组件
40610
+ React$1.useImperativeHandle(ref, function () {
40611
+ return {
40612
+ fetchData: fetchData
40613
+ };
40614
+ });
40615
+ var boock = function boock(nodeItem) {
40616
+ return /*#__PURE__*/React$1.createElement("div", {
40617
+ className: css_248z$y.pathItem_block
40618
+ }, /*#__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 || '')));
40619
+ };
40620
+ // 调用接口获取数据
40621
+ var fetchData = /*#__PURE__*/function () {
40622
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
40623
+ var params, res, _res$data, _res, _res$data2, _res2, _res2$data, _res3, _res3$data, pList, formattedPaths, _t;
40624
+ return _regenerator().w(function (_context) {
40625
+ while (1) switch (_context.p = _context.n) {
40626
+ case 0:
40627
+ if (!(!recordType || !sendOrgCode || !receiverOrgCode)) {
40628
+ _context.n = 1;
40629
+ break;
40630
+ }
40631
+ return _context.a(2);
40632
+ case 1:
40633
+ setLoading(true);
40634
+ _context.p = 2;
40635
+ params = {
40636
+ recordType: recordType,
40637
+ businessType: businessType,
40638
+ sendOrgCode: sendOrgCode,
40639
+ receiverOrgCode: receiverOrgCode,
40640
+ orderNo: orderNo
40641
+ };
40642
+ console.log('params', params);
40643
+ _context.n = 3;
40644
+ return requestUtil({
40645
+ url: "/settle/crossOrgSettlementRoute/trialCalculation",
40646
+ method: 'POST',
40647
+ data: params
40648
+ });
40649
+ case 3:
40650
+ res = _context.v;
40651
+ debugger;
40652
+ if (handleError(res.data)) {
40653
+ res = res.data;
40654
+ if ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.match) {
40655
+ setRouteCodeName(((_res = res) === null || _res === void 0 ? void 0 : (_res$data2 = _res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.routeCodeName) || '');
40656
+ setRouteCode(((_res2 = res) === null || _res2 === void 0 ? void 0 : (_res2$data = _res2.data) === null || _res2$data === void 0 ? void 0 : _res2$data.routeCode) || '');
40657
+ pList = ((_res3 = res) === null || _res3 === void 0 ? void 0 : (_res3$data = _res3.data) === null || _res3$data === void 0 ? void 0 : _res3$data.fontDetails) || [];
40658
+ formattedPaths = formatPaths(pList);
40659
+ setPathList(formattedPaths);
40660
+ } else {
40661
+ // 清空历史结果
40662
+ setRouteCodeName('');
40663
+ setRouteCode('');
40664
+ setPathList([]);
40665
+ message$1.warning('匹配不到跨组织链路');
40666
+ }
40667
+ } else {
40668
+ // 清空历史结果
40669
+ setRouteCodeName('');
40670
+ setRouteCode('');
40671
+ setPathList([]);
40672
+ message$1.error('获取数据失败');
40673
+ }
40674
+ _context.n = 5;
40675
+ break;
40676
+ case 4:
40677
+ _context.p = 4;
40678
+ _t = _context.v;
40679
+ console.error('调用接口失败:', _t);
40680
+ setRouteCodeName('');
40681
+ setRouteCode('');
40682
+ setPathList([]);
40683
+ message$1.error('调用接口失败');
40684
+ case 5:
40685
+ _context.p = 5;
40686
+ setLoading(false);
40687
+ return _context.f(5);
40688
+ case 6:
40689
+ return _context.a(2);
40690
+ }
40691
+ }, _callee, null, [[2, 4, 5, 6]]);
40692
+ }));
40693
+ return function fetchData() {
40694
+ return _ref2.apply(this, arguments);
40695
+ };
40696
+ }();
40697
+ // 监听props变化,自动调用接口
40698
+ useEffect(function () {
40699
+ if (autoCallApi) {
40700
+ fetchData();
40701
+ }
40702
+ }, [recordType, businessType, sendOrgCode, receiverOrgCode, orderNo, autoCallApi]);
40703
+ var line = function line(nodeItem) {
40704
+ // 物资凭证跳转处理
40705
+ var handleMaterialAssetVoucherJump = function handleMaterialAssetVoucherJump(recordId, recordNo) {
40706
+ var _window$$wujie;
40707
+ if ((_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.props.jump) {
40708
+ window.$wujie.props.jump({
40709
+ pathname: "/settle/end-term-management/material_asset_voucher/view/".concat(recordId, "/").concat(recordNo)
40710
+ });
40711
+ }
40712
+ };
40713
+ // 取价单跳转处理
40714
+ var handleCreditSettleJump = function handleCreditSettleJump(creditSettleId) {
40715
+ var _window$$wujie2;
40716
+ if ((_window$$wujie2 = window.$wujie) === null || _window$$wujie2 === void 0 ? void 0 : _window$$wujie2.props.jump) {
40717
+ window.$wujie.props.jump({
40718
+ pathname: "/pay/pay-management/credit-management/credit-settle/view/".concat(creditSettleId)
40719
+ });
40720
+ }
40721
+ };
40722
+ return /*#__PURE__*/React$1.createElement("div", {
40723
+ className: css_248z$y.pathItem_line
40724
+ }, nodeItem.targetOrgCode && (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(Tooltip, {
40725
+ title: /*#__PURE__*/React$1.createElement("div", {
40726
+ style: {
40727
+ fontSize: '12px',
40728
+ lineHeight: '1.5'
40729
+ }
40730
+ }, /*#__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 || ' ')),
40731
+ placement: "top"
40732
+ }, /*#__PURE__*/React$1.createElement("div", {
40733
+ className: css_248z$y.record_info
40734
+ }, /*#__PURE__*/React$1.createElement("div", {
40735
+ style: {
40736
+ fontSize: '12px',
40737
+ lineHeight: '1.5'
40738
+ }
40739
+ }, /*#__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", {
40740
+ style: {
40741
+ cursor: 'pointer',
40742
+ color: '#1890ff',
40743
+ textDecoration: 'underline'
40744
+ },
40745
+ onClick: function onClick() {
40746
+ return handleMaterialAssetVoucherJump(nodeItem.targetRecordId || '', nodeItem.targetRecordNo || '');
40747
+ }
40748
+ }, nodeItem.targetRecordNo)) : nodeItem.targetRecordNo), /*#__PURE__*/React$1.createElement("div", null, nodeItem.targetCreditSettleId ? (/*#__PURE__*/React$1.createElement("span", {
40749
+ style: {
40750
+ cursor: 'pointer',
40751
+ color: '#1890ff',
40752
+ textDecoration: 'underline'
40753
+ },
40754
+ onClick: function onClick() {
40755
+ return handleCreditSettleJump(nodeItem.targetCreditSettleId || '');
40756
+ }
40757
+ }, nodeItem.targetCreditSettleNo)) : nodeItem.targetCreditSettleNo)))), /*#__PURE__*/React$1.createElement("div", {
40758
+ className: css_248z$y.pathItem_line_withRightArrow
40759
+ }, /*#__PURE__*/React$1.createElement("div", {
40760
+ className: css_248z$y.pathItem_line_rightArrow
40761
+ })))) || null, nodeItem.sourceOrgCode && (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
40762
+ className: css_248z$y.pathItem_line_withLeftArrow
40763
+ }, /*#__PURE__*/React$1.createElement("div", {
40764
+ className: css_248z$y.pathItem_line_leftArrow
40765
+ })), /*#__PURE__*/React$1.createElement(Tooltip, {
40766
+ title: /*#__PURE__*/React$1.createElement("div", {
40767
+ style: {
40768
+ fontSize: '12px',
40769
+ lineHeight: '1.5'
40770
+ }
40771
+ }, /*#__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 || ' ')),
40772
+ placement: "top"
40773
+ }, /*#__PURE__*/React$1.createElement("div", {
40774
+ className: css_248z$y.record_info
40775
+ }, /*#__PURE__*/React$1.createElement("div", {
40776
+ style: {
40777
+ fontSize: '12px',
40778
+ lineHeight: '1.5'
40779
+ }
40780
+ }, /*#__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", {
40781
+ style: {
40782
+ cursor: 'pointer',
40783
+ color: '#1890ff',
40784
+ textDecoration: 'underline'
40785
+ },
40786
+ onClick: function onClick() {
40787
+ return handleMaterialAssetVoucherJump(nodeItem.sourceRecordId || '', nodeItem.sourceRecordNo || '');
40788
+ }
40789
+ }, nodeItem.sourceRecordNo || ' ')) : nodeItem.sourceRecordNo || ' '), /*#__PURE__*/React$1.createElement("div", null, nodeItem.sourceCreditSettleId ? (/*#__PURE__*/React$1.createElement("span", {
40790
+ style: {
40791
+ cursor: 'pointer',
40792
+ color: '#1890ff',
40793
+ textDecoration: 'underline'
40794
+ },
40795
+ onClick: function onClick() {
40796
+ return handleCreditSettleJump(nodeItem.sourceCreditSettleId || '');
40797
+ }
40798
+ }, nodeItem.sourceCreditSettleNo || ' ')) : nodeItem.sourceCreditSettleNo || ' ')))))) || null);
40799
+ };
40800
+ return /*#__PURE__*/React$1.createElement("div", {
40801
+ className: css_248z$y.wrap_pathContentBox
40802
+ }, /*#__PURE__*/React$1.createElement(Spin, {
40803
+ spinning: loading,
40804
+ tip: "\u52A0\u8F7D\u4E2D..."
40805
+ }, routeCode && /*#__PURE__*/React$1.createElement("div", {
40806
+ className: css_248z$y.wrap_pathContentBoxTitle
40807
+ }, "\u8DE8\u7EC4\u7EC7\u94FE\u8DEF\u540D\u79F0\uFF1A\u3010", routeCode, "\u3011", routeCodeName), /*#__PURE__*/React$1.createElement("div", {
40808
+ className: css_248z$y.pathItem_content
40809
+ }, pathList.map(function (nodeItem, index) {
40810
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, {
40811
+ key: "node_".concat(index)
40812
+ }, boock(nodeItem), line(nodeItem));
40813
+ }))));
40814
+ });
40815
+
40816
+ 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";
40817
+ styleInject(css_248z$z);
40818
+
40514
40819
  var _excluded$m = ["titleExtra", "header", "showArrow"];
40515
40820
  var Panel = Collapse.Panel;
40516
40821
  var ExtendedPanel = function ExtendedPanel(_ref) {
@@ -40560,9 +40865,9 @@ var index$8 = Object.assign(ExtendedCollapse, {
40560
40865
  Board: ExtendedPanel
40561
40866
  });
40562
40867
 
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";
40868
+ 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
40869
  var styles = {"paragraphCopyWrapper":"index-module_paragraphCopyWrapper__3rGOI","paragraphCopyLabel":"index-module_paragraphCopyLabel__1Qb8u","paragraphCopy":"index-module_paragraphCopy__1y7Jo"};
40565
- styleInject(css_248z$z);
40870
+ styleInject(css_248z$A);
40566
40871
 
40567
40872
  var Paragraph = Typography.Paragraph;
40568
40873
  var Section = function Section(_ref) {
@@ -40735,4 +41040,4 @@ var SystemLog = function SystemLog(_ref) {
40735
41040
  });
40736
41041
  };
40737
41042
 
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 };
41043
+ 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
@@ -40531,9 +40531,314 @@ var index$7 = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
40531
40531
  })));
40532
40532
  });
40533
40533
 
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";
40534
+ 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
40535
  styleInject(css_248z$y);
40536
40536
 
40537
+ var formatPaths = function formatPaths(list) {
40538
+ var result = list.map(function (l, index) {
40539
+ var _l$nodes;
40540
+ var Item = l;
40541
+ if (l === null || l === void 0 ? void 0 : (_l$nodes = l.nodes) === null || _l$nodes === void 0 ? void 0 : _l$nodes.length) {
40542
+ Item.nodes = l === null || l === void 0 ? void 0 : l.nodes.map(function (s) {
40543
+ return _objectSpread2(_objectSpread2({}, s), {}, {
40544
+ kCode: "".concat(index, "_").concat(s.code)
40545
+ });
40546
+ });
40547
+ }
40548
+ return Item;
40549
+ });
40550
+ return result;
40551
+ };
40552
+ var getRecordBusinessType = function getRecordBusinessType(recordType) {
40553
+ var businessTypeDictCode = "";
40554
+ var list = [{
40555
+ recordType: "502",
40556
+ businessTypeDictCode: "SRM00001"
40557
+ }, {
40558
+ recordType: "503",
40559
+ businessTypeDictCode: "SRM00002"
40560
+ }, {
40561
+ recordType: "504",
40562
+ businessTypeDictCode: "TCbusinessType"
40563
+ }, {
40564
+ recordType: "505",
40565
+ businessTypeDictCode: "TCRbusinessType"
40566
+ }, {
40567
+ recordType: "1001",
40568
+ businessTypeDictCode: "ALLOCATE00002"
40569
+ }, {
40570
+ recordType: "1002",
40571
+ businessTypeDictCode: "ALLOCATE00002"
40572
+ }, {
40573
+ recordType: "50",
40574
+ businessTypeDictCode: "SC00022"
40575
+ }, {
40576
+ recordType: "30",
40577
+ businessTypeDictCode: "BUSINESS_Stock_Adjus"
40578
+ }, {
40579
+ recordType: "130",
40580
+ businessTypeDictCode: ""
40581
+ }, {
40582
+ recordType: "516",
40583
+ businessTypeDictCode: "BUSINESS_ticket_sale_type"
40584
+ }, {
40585
+ recordType: "1003",
40586
+ businessTypeDictCode: "BUSINESS_DBCK001"
40587
+ }, {
40588
+ recordType: "1004",
40589
+ businessTypeDictCode: "BUSINESS_DBCK001"
40590
+ }, {
40591
+ recordType: "1007",
40592
+ businessTypeDictCode: "BUSINESS_DBCK"
40593
+ }, {
40594
+ recordType: "517",
40595
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40596
+ }, {
40597
+ recordType: "518",
40598
+ businessTypeDictCode: "BUSINESS_AssReceiptType"
40599
+ } // 拆装箱入
40600
+ ];
40601
+ var match = list.find(function (item) {
40602
+ return item.recordType == recordType;
40603
+ });
40604
+ businessTypeDictCode = (match === null || match === void 0 ? void 0 : match.businessTypeDictCode) || '';
40605
+ return businessTypeDictCode;
40606
+ };
40607
+ var PathDisplay = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, ref) {
40608
+ var recordType = _ref.recordType,
40609
+ businessType = _ref.businessType,
40610
+ sendOrgCode = _ref.sendOrgCode,
40611
+ receiverOrgCode = _ref.receiverOrgCode,
40612
+ orderNo = _ref.orderNo,
40613
+ _ref$autoCallApi = _ref.autoCallApi,
40614
+ autoCallApi = _ref$autoCallApi === void 0 ? true : _ref$autoCallApi;
40615
+ // 组件内部状态管理
40616
+ var _useState = React$1.useState([]),
40617
+ _useState2 = _slicedToArray(_useState, 2),
40618
+ pathList = _useState2[0],
40619
+ setPathList = _useState2[1];
40620
+ var _useState3 = React$1.useState(''),
40621
+ _useState4 = _slicedToArray(_useState3, 2),
40622
+ routeCode = _useState4[0],
40623
+ setRouteCode = _useState4[1];
40624
+ var _useState5 = React$1.useState(''),
40625
+ _useState6 = _slicedToArray(_useState5, 2),
40626
+ routeCodeName = _useState6[0],
40627
+ setRouteCodeName = _useState6[1];
40628
+ var _useState7 = React$1.useState(false),
40629
+ _useState8 = _slicedToArray(_useState7, 2),
40630
+ loading = _useState8[0],
40631
+ setLoading = _useState8[1];
40632
+ // 暴露方法给父组件
40633
+ React__default['default'].useImperativeHandle(ref, function () {
40634
+ return {
40635
+ fetchData: fetchData
40636
+ };
40637
+ });
40638
+ var boock = function boock(nodeItem) {
40639
+ return /*#__PURE__*/React__default['default'].createElement("div", {
40640
+ className: css_248z$y.pathItem_block
40641
+ }, /*#__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 || '')));
40642
+ };
40643
+ // 调用接口获取数据
40644
+ var fetchData = /*#__PURE__*/function () {
40645
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
40646
+ var params, res, _res$data, _res, _res$data2, _res2, _res2$data, _res3, _res3$data, pList, formattedPaths, _t;
40647
+ return _regenerator().w(function (_context) {
40648
+ while (1) switch (_context.p = _context.n) {
40649
+ case 0:
40650
+ if (!(!recordType || !sendOrgCode || !receiverOrgCode)) {
40651
+ _context.n = 1;
40652
+ break;
40653
+ }
40654
+ return _context.a(2);
40655
+ case 1:
40656
+ setLoading(true);
40657
+ _context.p = 2;
40658
+ params = {
40659
+ recordType: recordType,
40660
+ businessType: businessType,
40661
+ sendOrgCode: sendOrgCode,
40662
+ receiverOrgCode: receiverOrgCode,
40663
+ orderNo: orderNo
40664
+ };
40665
+ console.log('params', params);
40666
+ _context.n = 3;
40667
+ return requestUtil({
40668
+ url: "/settle/crossOrgSettlementRoute/trialCalculation",
40669
+ method: 'POST',
40670
+ data: params
40671
+ });
40672
+ case 3:
40673
+ res = _context.v;
40674
+ debugger;
40675
+ if (handleError(res.data)) {
40676
+ res = res.data;
40677
+ if ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.match) {
40678
+ setRouteCodeName(((_res = res) === null || _res === void 0 ? void 0 : (_res$data2 = _res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.routeCodeName) || '');
40679
+ setRouteCode(((_res2 = res) === null || _res2 === void 0 ? void 0 : (_res2$data = _res2.data) === null || _res2$data === void 0 ? void 0 : _res2$data.routeCode) || '');
40680
+ pList = ((_res3 = res) === null || _res3 === void 0 ? void 0 : (_res3$data = _res3.data) === null || _res3$data === void 0 ? void 0 : _res3$data.fontDetails) || [];
40681
+ formattedPaths = formatPaths(pList);
40682
+ setPathList(formattedPaths);
40683
+ } else {
40684
+ // 清空历史结果
40685
+ setRouteCodeName('');
40686
+ setRouteCode('');
40687
+ setPathList([]);
40688
+ antd.message.warning('匹配不到跨组织链路');
40689
+ }
40690
+ } else {
40691
+ // 清空历史结果
40692
+ setRouteCodeName('');
40693
+ setRouteCode('');
40694
+ setPathList([]);
40695
+ antd.message.error('获取数据失败');
40696
+ }
40697
+ _context.n = 5;
40698
+ break;
40699
+ case 4:
40700
+ _context.p = 4;
40701
+ _t = _context.v;
40702
+ console.error('调用接口失败:', _t);
40703
+ setRouteCodeName('');
40704
+ setRouteCode('');
40705
+ setPathList([]);
40706
+ antd.message.error('调用接口失败');
40707
+ case 5:
40708
+ _context.p = 5;
40709
+ setLoading(false);
40710
+ return _context.f(5);
40711
+ case 6:
40712
+ return _context.a(2);
40713
+ }
40714
+ }, _callee, null, [[2, 4, 5, 6]]);
40715
+ }));
40716
+ return function fetchData() {
40717
+ return _ref2.apply(this, arguments);
40718
+ };
40719
+ }();
40720
+ // 监听props变化,自动调用接口
40721
+ React$1.useEffect(function () {
40722
+ if (autoCallApi) {
40723
+ fetchData();
40724
+ }
40725
+ }, [recordType, businessType, sendOrgCode, receiverOrgCode, orderNo, autoCallApi]);
40726
+ var line = function line(nodeItem) {
40727
+ // 物资凭证跳转处理
40728
+ var handleMaterialAssetVoucherJump = function handleMaterialAssetVoucherJump(recordId, recordNo) {
40729
+ var _window$$wujie;
40730
+ if ((_window$$wujie = window.$wujie) === null || _window$$wujie === void 0 ? void 0 : _window$$wujie.props.jump) {
40731
+ window.$wujie.props.jump({
40732
+ pathname: "/settle/end-term-management/material_asset_voucher/view/".concat(recordId, "/").concat(recordNo)
40733
+ });
40734
+ }
40735
+ };
40736
+ // 取价单跳转处理
40737
+ var handleCreditSettleJump = function handleCreditSettleJump(creditSettleId) {
40738
+ var _window$$wujie2;
40739
+ if ((_window$$wujie2 = window.$wujie) === null || _window$$wujie2 === void 0 ? void 0 : _window$$wujie2.props.jump) {
40740
+ window.$wujie.props.jump({
40741
+ pathname: "/pay/pay-management/credit-management/credit-settle/view/".concat(creditSettleId)
40742
+ });
40743
+ }
40744
+ };
40745
+ return /*#__PURE__*/React__default['default'].createElement("div", {
40746
+ className: css_248z$y.pathItem_line
40747
+ }, nodeItem.targetOrgCode && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
40748
+ title: /*#__PURE__*/React__default['default'].createElement("div", {
40749
+ style: {
40750
+ fontSize: '12px',
40751
+ lineHeight: '1.5'
40752
+ }
40753
+ }, /*#__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 || ' ')),
40754
+ placement: "top"
40755
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40756
+ className: css_248z$y.record_info
40757
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40758
+ style: {
40759
+ fontSize: '12px',
40760
+ lineHeight: '1.5'
40761
+ }
40762
+ }, /*#__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", {
40763
+ style: {
40764
+ cursor: 'pointer',
40765
+ color: '#1890ff',
40766
+ textDecoration: 'underline'
40767
+ },
40768
+ onClick: function onClick() {
40769
+ return handleMaterialAssetVoucherJump(nodeItem.targetRecordId || '', nodeItem.targetRecordNo || '');
40770
+ }
40771
+ }, nodeItem.targetRecordNo)) : nodeItem.targetRecordNo), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.targetCreditSettleId ? (/*#__PURE__*/React__default['default'].createElement("span", {
40772
+ style: {
40773
+ cursor: 'pointer',
40774
+ color: '#1890ff',
40775
+ textDecoration: 'underline'
40776
+ },
40777
+ onClick: function onClick() {
40778
+ return handleCreditSettleJump(nodeItem.targetCreditSettleId || '');
40779
+ }
40780
+ }, nodeItem.targetCreditSettleNo)) : nodeItem.targetCreditSettleNo)))), /*#__PURE__*/React__default['default'].createElement("div", {
40781
+ className: css_248z$y.pathItem_line_withRightArrow
40782
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40783
+ className: css_248z$y.pathItem_line_rightArrow
40784
+ })))) || null, nodeItem.sourceOrgCode && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
40785
+ className: css_248z$y.pathItem_line_withLeftArrow
40786
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40787
+ className: css_248z$y.pathItem_line_leftArrow
40788
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
40789
+ title: /*#__PURE__*/React__default['default'].createElement("div", {
40790
+ style: {
40791
+ fontSize: '12px',
40792
+ lineHeight: '1.5'
40793
+ }
40794
+ }, /*#__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 || ' ')),
40795
+ placement: "top"
40796
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40797
+ className: css_248z$y.record_info
40798
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
40799
+ style: {
40800
+ fontSize: '12px',
40801
+ lineHeight: '1.5'
40802
+ }
40803
+ }, /*#__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", {
40804
+ style: {
40805
+ cursor: 'pointer',
40806
+ color: '#1890ff',
40807
+ textDecoration: 'underline'
40808
+ },
40809
+ onClick: function onClick() {
40810
+ return handleMaterialAssetVoucherJump(nodeItem.sourceRecordId || '', nodeItem.sourceRecordNo || '');
40811
+ }
40812
+ }, nodeItem.sourceRecordNo || ' ')) : nodeItem.sourceRecordNo || ' '), /*#__PURE__*/React__default['default'].createElement("div", null, nodeItem.sourceCreditSettleId ? (/*#__PURE__*/React__default['default'].createElement("span", {
40813
+ style: {
40814
+ cursor: 'pointer',
40815
+ color: '#1890ff',
40816
+ textDecoration: 'underline'
40817
+ },
40818
+ onClick: function onClick() {
40819
+ return handleCreditSettleJump(nodeItem.sourceCreditSettleId || '');
40820
+ }
40821
+ }, nodeItem.sourceCreditSettleNo || ' ')) : nodeItem.sourceCreditSettleNo || ' ')))))) || null);
40822
+ };
40823
+ return /*#__PURE__*/React__default['default'].createElement("div", {
40824
+ className: css_248z$y.wrap_pathContentBox
40825
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
40826
+ spinning: loading,
40827
+ tip: "\u52A0\u8F7D\u4E2D..."
40828
+ }, routeCode && /*#__PURE__*/React__default['default'].createElement("div", {
40829
+ className: css_248z$y.wrap_pathContentBoxTitle
40830
+ }, "\u8DE8\u7EC4\u7EC7\u94FE\u8DEF\u540D\u79F0\uFF1A\u3010", routeCode, "\u3011", routeCodeName), /*#__PURE__*/React__default['default'].createElement("div", {
40831
+ className: css_248z$y.pathItem_content
40832
+ }, pathList.map(function (nodeItem, index) {
40833
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, {
40834
+ key: "node_".concat(index)
40835
+ }, boock(nodeItem), line(nodeItem));
40836
+ }))));
40837
+ });
40838
+
40839
+ 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";
40840
+ styleInject(css_248z$z);
40841
+
40537
40842
  var _excluded$m = ["titleExtra", "header", "showArrow"];
40538
40843
  var Panel = antd.Collapse.Panel;
40539
40844
  var ExtendedPanel = function ExtendedPanel(_ref) {
@@ -40583,9 +40888,9 @@ var index$8 = Object.assign(ExtendedCollapse, {
40583
40888
  Board: ExtendedPanel
40584
40889
  });
40585
40890
 
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";
40891
+ 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
40892
  var styles = {"paragraphCopyWrapper":"index-module_paragraphCopyWrapper__3rGOI","paragraphCopyLabel":"index-module_paragraphCopyLabel__1Qb8u","paragraphCopy":"index-module_paragraphCopy__1y7Jo"};
40588
- styleInject(css_248z$z);
40893
+ styleInject(css_248z$A);
40589
40894
 
40590
40895
  var Paragraph = antd.Typography.Paragraph;
40591
40896
  var Section = function Section(_ref) {
@@ -40800,6 +41105,7 @@ exports.SulaColumnSettingTable = ColumnSettingSulaTable;
40800
41105
  exports.SystemLog = SystemLog;
40801
41106
  exports.TableColumnSetting = TableColumnSetting;
40802
41107
  exports.TreeSearchSelect = TreeSearchSelect;
41108
+ exports.TrialCalculation = PathDisplay;
40803
41109
  exports.authFunc = authFunc;
40804
41110
  exports.calculateValidPeriod = calculateValidPeriod;
40805
41111
  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.13",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -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/PathDisplay';
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 styles from './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={styles.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={styles.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={styles.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={styles.pathItem_line_withRightArrow}>
245
+ <div className={styles.pathItem_line_rightArrow}></div>
246
+ </div>
247
+ </>
248
+ ) || null}
249
+ {nodeItem.sourceOrgCode && (
250
+ <>
251
+ <div className={styles.pathItem_line_withLeftArrow}>
252
+ <div className={styles.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={styles.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={styles.wrap_pathContentBox}>
306
+ <Spin spinning={loading} tip="加载中...">
307
+ {routeCode && <div className={styles.wrap_pathContentBoxTitle}>跨组织链路名称:【{routeCode}】{routeCodeName}</div> }
308
+
309
+ <div className={styles.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