@bit-sun/business-component 2.3.11-alpha.1 → 2.3.11-alpha.2

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.
@@ -18,4 +18,8 @@ declare const sharingType: {
18
18
  text: string;
19
19
  value: string;
20
20
  }[];
21
- export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status };
21
+ declare const employeeType: {
22
+ text: string;
23
+ value: string;
24
+ }[];
25
+ export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status, employeeType };
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { message as message$1, Popover, Card, Avatar, Tooltip, Image, Menu, Space, Dropdown, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col, Tabs, Affix, Cascader, DatePicker, TimePicker, Switch } from 'antd';
2
+ import { message as message$1, Image, Popover, Card, Avatar, Tooltip, Menu, Space, Dropdown, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col, Tabs, Affix, Cascader, DatePicker, TimePicker, Switch } from 'antd';
3
3
  import _, { omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
4
4
  import { history, formatMessage, useLocation, Link, useModel, useIntl } from 'umi';
5
5
  import isEqual$1 from 'lodash/isEqual';
@@ -2592,7 +2592,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
2592
2592
  needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
2593
2593
  _props$getPopupContai = props.getPopupContainer,
2594
2594
  _getPopupContainer = _props$getPopupContai === void 0 ? undefined : _props$getPopupContai,
2595
- fieldComponent = props.fieldComponent;
2595
+ fieldComponent = props.fieldComponent,
2596
+ selectBusinessType = props.selectBusinessType;
2596
2597
  var _ref = requestConfig || {},
2597
2598
  url = _ref.url,
2598
2599
  otherParams = _ref.otherParams,
@@ -3008,6 +3009,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
3008
3009
  useEffect(function () {
3009
3010
  makeUniqueValue();
3010
3011
  }, [resultSourceKey]);
3012
+ useEffect(function () {
3013
+ if (init) {
3014
+ setItems([]);
3015
+ setItemsTotal(0);
3016
+ run('init');
3017
+ }
3018
+ }, [selectBusinessType]);
3011
3019
  var showModal = function showModal() {
3012
3020
  getData({
3013
3021
  pageSize: tableInitPageSize,
@@ -4392,7 +4400,9 @@ var AddSelect = function AddSelect(props) {
4392
4400
  _props$businessType = props.businessType,
4393
4401
  businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
4394
4402
  _props$isAllowRepeate = props.isAllowRepeatedSelect,
4395
- isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
4403
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate,
4404
+ _props$noUseItemEanco = props.noUseItemEancode,
4405
+ noUseItemEancode = _props$noUseItemEanco === void 0 ? true : _props$noUseItemEanco;
4396
4406
  var _ref = requestConfig || {},
4397
4407
  url = _ref.url,
4398
4408
  otherParams = _ref.otherParams,
@@ -5069,8 +5079,10 @@ var AddSelect = function AddSelect(props) {
5069
5079
  pageSize: 5000,
5070
5080
  currentPage: 1
5071
5081
  })]).then(function (x) {
5072
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
5073
- formatTreeDataSource(x, 1, 3, tableSearchForm);
5082
+ var searchPosition1 = noUseItemEancode ? 3 : 2;
5083
+ var searchPosition2 = noUseItemEancode ? 4 : 3;
5084
+ formatSource(x, 0, searchPosition1, tableSearchForm, ['id', 'name']);
5085
+ formatTreeDataSource(x, 1, searchPosition2, tableSearchForm);
5074
5086
  });
5075
5087
  }
5076
5088
  if (businessType == 'skc') {
@@ -6636,6 +6648,13 @@ var sharingType = [{
6636
6648
  text: "私有",
6637
6649
  value: '20'
6638
6650
  }];
6651
+ var employeeType = [{
6652
+ text: "外部员工",
6653
+ value: '10'
6654
+ }, {
6655
+ text: "内部员工",
6656
+ value: '20'
6657
+ }];
6639
6658
 
6640
6659
  var getDicData = function getDicData(dicCode) {
6641
6660
  var dicData = {};
@@ -8389,12 +8408,14 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8389
8408
  mappingTextField: 'name',
8390
8409
  mappingTextShowKeyField: 'username',
8391
8410
  mappingValueField: 'id',
8392
- otherParams: {
8411
+ otherParams: _objectSpread2(_objectSpread2({
8393
8412
  'qp-enable-eq': 10,
8394
- 'qp-employmentType-eq': 20,
8395
- 'qp-orgViewIds-like': 'administrative-organization-view',
8413
+ 'qp-orgViewIds-like': 'administrative-organization-view'
8414
+ }, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needTypeSearch) ? {} : {
8415
+ 'qp-employmentType-eq': 20
8416
+ }), {}, {
8396
8417
  sorter: 'desc-id'
8397
- },
8418
+ }),
8398
8419
  sourceName: 'employeeNumber'
8399
8420
  }, requestConfigProp);
8400
8421
  tableSearchForm = [{
@@ -8433,13 +8454,18 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8433
8454
  }
8434
8455
  }
8435
8456
  }
8436
- }, {
8457
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needTypeSearch) ? [{
8458
+ name: 'qp-employmentType-eq',
8459
+ type: 'select',
8460
+ label: '员工类型',
8461
+ initialSource: employeeType
8462
+ }] : []), [{
8437
8463
  name: 'qp-email-like',
8438
8464
  label: '邮箱'
8439
8465
  }, {
8440
8466
  name: 'qp-officeTelephone-like',
8441
8467
  label: '手机号'
8442
- }];
8468
+ }]);
8443
8469
  Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgViewNode/common/getTreeForOrgViewAndTenant"), {
8444
8470
  'orgViewCode': 'administrative-organization-view'
8445
8471
  })]).then(function (x) {
@@ -8469,13 +8495,22 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8469
8495
  render: function render(text) {
8470
8496
  return handleTextOverflow(text);
8471
8497
  }
8472
- }, {
8498
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needTypeSearch) ? [{
8499
+ title: '员工类型',
8500
+ dataIndex: 'employmentType',
8501
+ render: function render(text) {
8502
+ var _employeeType$find;
8503
+ return (_employeeType$find = employeeType.find(function (i) {
8504
+ return i.value === text;
8505
+ })) === null || _employeeType$find === void 0 ? void 0 : _employeeType$find.text;
8506
+ }
8507
+ }] : []), [{
8473
8508
  title: '邮箱',
8474
8509
  dataIndex: 'email'
8475
8510
  }, {
8476
8511
  title: '手机号',
8477
8512
  dataIndex: 'officeTelephone'
8478
- }]
8513
+ }])
8479
8514
  }, modalTableBusProps);
8480
8515
  }
8481
8516
  // 配送方式选择器
@@ -8679,7 +8714,7 @@ var BusinessSearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
8679
8714
  needModalTable: needModalTable,
8680
8715
  modalTableProps: modalTableProps
8681
8716
  });
8682
- }, [props === null || props === void 0 ? void 0 : props.value, props.disabled]);
8717
+ }, [props === null || props === void 0 ? void 0 : props.value, props.disabled, props.selectBusinessType]);
8683
8718
  useImperativeHandle(ref, function () {
8684
8719
  return {
8685
8720
  getRef: function getRef() {
@@ -8701,9 +8736,13 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React.memo(BusinessSearchSelect, funct
8701
8736
  if (props && props.disabled !== nextProps.disabled) {
8702
8737
  return false;
8703
8738
  }
8739
+ if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
8740
+ return false;
8741
+ }
8704
8742
  return true;
8705
8743
  });
8706
8744
 
8745
+ // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
8707
8746
  function handleSelectColumn(c, parentProps) {
8708
8747
  var result = c;
8709
8748
  var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
@@ -8715,7 +8754,7 @@ function handleSelectColumn(c, parentProps) {
8715
8754
  return !exceptColumns.includes(i.dataIndex);
8716
8755
  });
8717
8756
  }
8718
- // 追加
8757
+ // 追加(最好不用这个,当组件不固定时候会有影响)
8719
8758
  if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
8720
8759
  additionColumns.forEach(function (i) {
8721
8760
  result.splice(i.position, 0, i.column);
@@ -8728,6 +8767,7 @@ function handleSelectColumn(c, parentProps) {
8728
8767
  return result;
8729
8768
  }
8730
8769
  var AddSkuSelect = function AddSkuSelect(parProps) {
8770
+ var _parProps$requestConf, _parProps$requestConf2;
8731
8771
  var selectProps = {
8732
8772
  mode: 'multiple'
8733
8773
  };
@@ -8735,12 +8775,26 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8735
8775
  _useState2 = _slicedToArray(_useState, 2),
8736
8776
  value = _useState2[0],
8737
8777
  setValue = _useState2[1];
8778
+ var isNoUseItemBarcode = (parProps === null || parProps === void 0 ? void 0 : parProps.noUseItemEancode) !== undefined ? parProps === null || parProps === void 0 ? void 0 : parProps.noUseItemEancode : true; // 默认不加商品条码,兼容老项目
8738
8779
  //注⚠️:自定义过表头的请记得传tableCodeList参数
8739
8780
  var initialSelectColumn = [{
8740
8781
  title: 'SKU编码',
8741
8782
  width: 150,
8742
8783
  dataIndex: 'skuCode'
8743
- }, {
8784
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8785
+ title: '商品条码',
8786
+ width: 100,
8787
+ ellipsis: {
8788
+ showTitle: false
8789
+ },
8790
+ dataIndex: 'itemEancode',
8791
+ render: function render(text) {
8792
+ return /*#__PURE__*/React.createElement(Tooltip, {
8793
+ placement: "topLeft",
8794
+ title: text
8795
+ }, text);
8796
+ }
8797
+ }]), [{
8744
8798
  title: 'SKU名称',
8745
8799
  width: 200,
8746
8800
  ellipsis: {
@@ -8816,7 +8870,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8816
8870
  }, text);
8817
8871
  },
8818
8872
  dataIndex: 'propertyNameAndValue'
8819
- }];
8873
+ }]);
8820
8874
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
8821
8875
  var props = {
8822
8876
  buttonText: parProps.buttonText || '新增',
@@ -8827,11 +8881,11 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8827
8881
  requestConfig: _objectSpread2({
8828
8882
  url: "/items/sku/pager/v2",
8829
8883
  filter: 'qp-name-like',
8830
- otherParams: {
8884
+ otherParams: _objectSpread2({
8831
8885
  'qp-combination-eq': false,
8832
8886
  'qp-approveStatus-eq': 1,
8833
8887
  'qp-status-eq': 1
8834
- },
8888
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
8835
8889
  mappingTextField: 'name',
8836
8890
  mappingValueField: 'skuCode'
8837
8891
  }, parProps.requestConfig),
@@ -8843,7 +8897,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8843
8897
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
8844
8898
  onSaveCallback: parProps.onSaveCallback,
8845
8899
  businessType: 'sku',
8846
- isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
8900
+ isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect),
8901
+ noUseItemEancode: isNoUseItemBarcode
8847
8902
  };
8848
8903
  var modalTableProps = {
8849
8904
  modalTableTitle: '选择商品',
@@ -8853,7 +8908,14 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8853
8908
  }, {
8854
8909
  name: 'qp-skuName-like',
8855
8910
  label: 'SKU名称'
8856
- }, {
8911
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8912
+ name: 'qp-code-in',
8913
+ label: '商品条码',
8914
+ field: {
8915
+ type: 'multipleQueryInput',
8916
+ props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
8917
+ }
8918
+ }]), [{
8857
8919
  name: 'qp-brandId-in',
8858
8920
  type: 'select',
8859
8921
  label: '品牌',
@@ -8898,7 +8960,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8898
8960
  }
8899
8961
  }
8900
8962
  }
8901
- }],
8963
+ }]),
8902
8964
  tableColumns: [{
8903
8965
  title: 'SKU编码',
8904
8966
  width: 150,
@@ -8932,20 +8994,20 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8932
8994
  height: 20
8933
8995
  }));
8934
8996
  }
8935
- }, {
8936
- title: '国际条码',
8997
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8998
+ title: '商品条码',
8937
8999
  width: 100,
8938
9000
  ellipsis: {
8939
9001
  showTitle: false
8940
9002
  },
8941
- dataIndex: 'barCode',
9003
+ dataIndex: 'itemEancode',
8942
9004
  render: function render(text) {
8943
9005
  return /*#__PURE__*/React.createElement(Tooltip, {
8944
9006
  placement: "topLeft",
8945
9007
  title: text
8946
9008
  }, text);
8947
9009
  }
8948
- }, {
9010
+ }]), [{
8949
9011
  title: '所属SPU名称',
8950
9012
  width: 100,
8951
9013
  ellipsis: {
@@ -9036,7 +9098,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
9036
9098
  }, text);
9037
9099
  },
9038
9100
  dataIndex: 'brandName'
9039
- }],
9101
+ }]),
9040
9102
  selectColumn: mTpSelectColumn
9041
9103
  };
9042
9104
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -9044,6 +9106,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
9044
9106
  })));
9045
9107
  };
9046
9108
  var AddSkcSelect = function AddSkcSelect(parProps) {
9109
+ var _parProps$requestConf3;
9047
9110
  var selectProps = {
9048
9111
  mode: 'multiple'
9049
9112
  };
@@ -9121,9 +9184,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9121
9184
  requestConfig: _objectSpread2({
9122
9185
  url: "/items/skc/skcSelect",
9123
9186
  filter: 'qp-name-like',
9124
- otherParams: {
9187
+ otherParams: _objectSpread2({
9125
9188
  'qp-skcStatus-eq': 1
9126
- },
9189
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf3 = parProps.requestConfig) === null || _parProps$requestConf3 === void 0 ? void 0 : _parProps$requestConf3.addOtherParams) || {}),
9127
9190
  mappingTextField: 'name',
9128
9191
  mappingValueField: 'code'
9129
9192
  }, parProps.requestConfig),
@@ -9323,6 +9386,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9323
9386
  })));
9324
9387
  };
9325
9388
  var AddSpuSelect = function AddSpuSelect(parProps) {
9389
+ var _parProps$requestConf4;
9326
9390
  var selectProps = {
9327
9391
  mode: 'multiple'
9328
9392
  };
@@ -9409,11 +9473,11 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
9409
9473
  requestConfig: _objectSpread2({
9410
9474
  url: "/items/item",
9411
9475
  filter: 'qp-itemCode,name-orGroup,like',
9412
- otherParams: {
9476
+ otherParams: _objectSpread2({
9413
9477
  'qp-approveStatus-eq': 1,
9414
9478
  'qp-status-eq': 1,
9415
9479
  sorter: 'desc-id'
9416
- },
9480
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf4 = parProps.requestConfig) === null || _parProps$requestConf4 === void 0 ? void 0 : _parProps$requestConf4.addOtherParams) || {}),
9417
9481
  mappingTextField: 'name',
9418
9482
  mappingValueField: 'itemCode'
9419
9483
  }, parProps.requestConfig),
@@ -9722,7 +9786,7 @@ function getStorageVale(storageKeyString) {
9722
9786
  return "";
9723
9787
  }
9724
9788
 
9725
- var _excluded$5 = ["ctx", "value", "valueName", "onChange", "onChangeName", "placeholder", "remoteSource", "initialValue", "treeCheckable", "showSearch", "maxTagCount", "multiple", "isChoose", "mode", "getPopupContainer", "labelInValue", "showArrow", "allowClear", "showCheckedStrategy", "style", "getTreeData", "disabled"];
9789
+ var _excluded$5 = ["ctx", "value", "valueName", "onChange", "onChangeName", "placeholder", "remoteSource", "initialValue", "treeCheckable", "showSearch", "maxTagCount", "multiple", "isChoose", "rootDisabled", "mode", "getPopupContainer", "labelInValue", "showArrow", "allowClear", "showCheckedStrategy", "style", "getTreeData", "disabled"];
9726
9790
  var TreeSearchSelect = function TreeSearchSelect(props) {
9727
9791
  var _useState = useState([]),
9728
9792
  _useState2 = _slicedToArray(_useState, 2),
@@ -9746,6 +9810,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9746
9810
  multiple = _props$multiple === void 0 ? false : _props$multiple,
9747
9811
  _props$isChoose = props.isChoose,
9748
9812
  isChoose = _props$isChoose === void 0 ? false : _props$isChoose,
9813
+ _props$rootDisabled = props.rootDisabled,
9814
+ rootDisabled = _props$rootDisabled === void 0 ? false : _props$rootDisabled,
9749
9815
  mode = props.mode,
9750
9816
  _getPopupContainer = props.getPopupContainer,
9751
9817
  _props$labelInValue = props.labelInValue,
@@ -9772,7 +9838,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9772
9838
  _remoteSource$initial = remoteSource.initialParams,
9773
9839
  initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial;
9774
9840
  var mapSearchTree = function mapSearchTree(treeDataItem) {
9775
- var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
9841
+ var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0; // 盘算是否为父节点
9842
+ var isRoot = (treeDataItem === null || treeDataItem === void 0 ? void 0 : treeDataItem.id) == '0'; // 判断是否为根节点
9776
9843
  return {
9777
9844
  title: treeDataItem[resKeyValue[1]],
9778
9845
  key: treeDataItem[resKeyValue[0]],
@@ -9780,17 +9847,20 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9780
9847
  parentId: treeDataItem.parent,
9781
9848
  data: _objectSpread2({}, treeDataItem),
9782
9849
  isLeaf: !haveChildren,
9783
- disabled: isDisabled(haveChildren),
9850
+ disabled: isDisabled(haveChildren, isRoot),
9784
9851
  children: haveChildren ? treeDataItem.children.map(function (i) {
9785
9852
  return mapSearchTree(i);
9786
9853
  }) : []
9787
9854
  };
9788
9855
  };
9789
- var isDisabled = function isDisabled(children) {
9856
+ var isDisabled = function isDisabled(isParent, isRoot) {
9790
9857
  if (isChoose) {
9858
+ if (rootDisabled && isRoot) {
9859
+ return rootDisabled;
9860
+ }
9791
9861
  return false;
9792
9862
  }
9793
- return children;
9863
+ return isParent;
9794
9864
  };
9795
9865
  /* 实时查询 但是目前用的直接是完整数据源, 所以没有使用 */
9796
9866
  var handleSearch = function handleSearch(q) {
@@ -9865,10 +9935,53 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9865
9935
  return _formatResult;
9866
9936
  }
9867
9937
  };
9938
+ var parallelData = function parallelData(data, result) {
9939
+ data.forEach(function (i) {
9940
+ result.push(i);
9941
+ if (i.children) {
9942
+ parallelData(i.children, result);
9943
+ }
9944
+ });
9945
+ return result;
9946
+ };
9947
+ var getSelectItem = function getSelectItem(tData, selectValue) {
9948
+ var handleList = tData || [];
9949
+ var result = [];
9950
+ if (labelInValue) {
9951
+ result = multiple || treeCheckable ? (selectValue === null || selectValue === void 0 ? void 0 : selectValue.map(function (i) {
9952
+ if (handleList.some(function (s) {
9953
+ return s.key == i.value;
9954
+ })) {
9955
+ return handleList.find(function (s) {
9956
+ return s.key == i.value;
9957
+ });
9958
+ }
9959
+ })) || [] : (handleList === null || handleList === void 0 ? void 0 : handleList.find(function (s) {
9960
+ return s.key == (selectValue === null || selectValue === void 0 ? void 0 : selectValue.value);
9961
+ })) || {};
9962
+ } else {
9963
+ var cValue = _.get(selectValue === null || selectValue === void 0 ? void 0 : selectValue[0], 'value', selectValue);
9964
+ result = multiple || treeCheckable ? (selectValue === null || selectValue === void 0 ? void 0 : selectValue.map(function (i) {
9965
+ if (handleList.some(function (s) {
9966
+ return s.key == i;
9967
+ })) {
9968
+ return handleList.find(function (s) {
9969
+ return s.key == i;
9970
+ });
9971
+ }
9972
+ })) || [] : (handleList === null || handleList === void 0 ? void 0 : handleList.find(function (s) {
9973
+ return s.key == cValue;
9974
+ })) || {};
9975
+ }
9976
+ return result;
9977
+ };
9868
9978
  var handleChange = function handleChange(data, dataName) {
9869
9979
  var _ctx$form2;
9870
9980
  var handleData = formatData(data);
9871
- onChange(handleData, data);
9981
+ // 获取选中树节点当条数据,并返回给调用业务
9982
+ var parallelTreeData = parallelData(treeData, []);
9983
+ var currentItem = getSelectItem(parallelTreeData, data);
9984
+ onChange(handleData, data, currentItem, parallelTreeData);
9872
9985
  onChangeName && onChangeName(dataName);
9873
9986
  getTreeData && getTreeData(treeData); // 把树节点暴露出去
9874
9987
  ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(ctx.name, handleData);
@@ -17011,6 +17124,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
17011
17124
  }
17012
17125
  };
17013
17126
  useEffect(function () {
17127
+ onContainerScroll();
17014
17128
  var onscroll = throttle(onContainerScroll, 50);
17015
17129
  container.addEventListener('scroll', onscroll);
17016
17130
  return function () {
@@ -29457,7 +29571,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29457
29571
  }
29458
29572
  var parallelTreeData = _this.coverToParallel(ruleTreeData, []) || [];
29459
29573
  var currentTreeItem = (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId) && parallelTreeData.find(function (i) {
29460
- return i.key === (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId);
29574
+ var _i$key;
29575
+ return ((i === null || i === void 0 ? void 0 : (_i$key = i.key) === null || _i$key === void 0 ? void 0 : _i$key.indexOf('.')) > -1 ? i.id : i.key) === (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId);
29461
29576
  });
29462
29577
  var dataChoiceBusinessType = currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.dataChoiceBusinessType;
29463
29578
  var dataInputBusinessType = currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.dataInputBusinessType;
@@ -29662,17 +29777,18 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29662
29777
  }
29663
29778
  }), "\u6DFB\u52A0\u6761\u4EF6"))));
29664
29779
  };
29665
- _this.handleEditExtraInfoResponse = function (code, val, parentDetail) {
29780
+ _this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex) {
29666
29781
  var ruleClassData = _this.state.ruleClassData;
29667
29782
  var callBack = _this.props.callBack;
29668
29783
  parentDetail.extraInfo.response[code] = val;
29784
+ ruleClassData[classDataIndex].extraInfo.response[code] = val;
29669
29785
  _this.setState({
29670
29786
  ruleClassData: ruleClassData
29671
29787
  }, function () {
29672
29788
  callBack(ruleClassData);
29673
29789
  });
29674
29790
  };
29675
- _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, disabled, boxStyle) {
29791
+ _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, classDataIndex, disabled, boxStyle) {
29676
29792
  var _ruleReturnConfig$rig;
29677
29793
  var isShowResponse = itemDetail.response['enable'];
29678
29794
  var isRightText = ruleReturnConfig === null || ruleReturnConfig === void 0 ? void 0 : (_ruleReturnConfig$rig = ruleReturnConfig.rightText) === null || _ruleReturnConfig$rig === void 0 ? void 0 : _ruleReturnConfig$rig.length;
@@ -29688,7 +29804,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29688
29804
  var value = val;
29689
29805
  if (isObj(code)) {
29690
29806
  Object.keys(code).forEach(function (ite) {
29691
- _this.handleEditExtraInfoResponse(ite, code[ite], parentDetail);
29807
+ _this.handleEditExtraInfoResponse(ite, code[ite], parentDetail, classDataIndex);
29692
29808
  });
29693
29809
  return;
29694
29810
  }
@@ -29701,7 +29817,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29701
29817
  var _val$PCDCode;
29702
29818
  value = val.value || ((_val$PCDCode = val.PCDCode) === null || _val$PCDCode === void 0 ? void 0 : _val$PCDCode.join('/'));
29703
29819
  }
29704
- _this.handleEditExtraInfoResponse('value', value, parentDetail);
29820
+ _this.handleEditExtraInfoResponse('value', value, parentDetail, classDataIndex);
29705
29821
  };
29706
29822
  return isShowResponse && /*#__PURE__*/React.createElement("div", {
29707
29823
  style: {
@@ -29710,7 +29826,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29710
29826
  }, _this.renderFormCompItem(ruleReturnConfig, showValue, handleEdit, {}, boxStyle, disabled), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
29711
29827
  className: 'icon_btn_style',
29712
29828
  onClick: function onClick() {
29713
- _this.handleEditExtraInfoResponse('enable', false, parentDetail);
29829
+ _this.handleEditExtraInfoResponse('enable', false, parentDetail, classDataIndex);
29714
29830
  },
29715
29831
  style: {
29716
29832
  color: 'gray',
@@ -30321,12 +30437,12 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30321
30437
  type: "link",
30322
30438
  onClick: function onClick() {
30323
30439
  if (isHaveRuleReturnConfig) {
30324
- _this.handleEditExtraInfoResponse('enable', true, parentDetail);
30440
+ _this.handleEditExtraInfoResponse('enable', true, parentDetail, classDataIndex);
30325
30441
  } else {
30326
30442
  message$1.warn('未配置返回');
30327
30443
  }
30328
30444
  }
30329
- }, "\u65B0\u589E\u8FD4\u56DE\u503C")), isHaveRuleReturnConfig && _this.renderResItem(itemDetail, parentDetail, ruleReturnConfig, disabled, RuleActionItemStyle) || null, isHaveRuleTypeData && _this.renderActionList(itemDetail, parentDetail, handleRuleTypeData, selectRuleActionData, classDataIndex, disabled, RuleActionItemStyle) || null);
30445
+ }, "\u65B0\u589E\u8FD4\u56DE\u503C")), isHaveRuleReturnConfig && _this.renderResItem(itemDetail, parentDetail, ruleReturnConfig, classDataIndex, disabled, RuleActionItemStyle) || null, isHaveRuleTypeData && _this.renderActionList(itemDetail, parentDetail, handleRuleTypeData, selectRuleActionData, classDataIndex, disabled, RuleActionItemStyle) || null);
30330
30446
  };
30331
30447
  _this.addPeerRule = function (itemDetail) {
30332
30448
  var ruleClassData = _this.state.ruleClassData;