@bit-sun/business-component 2.3.17 → 2.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 from 'lodash/isEqual';
@@ -2579,7 +2579,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
2579
2579
  needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
2580
2580
  _props$getPopupContai = props.getPopupContainer,
2581
2581
  _getPopupContainer = _props$getPopupContai === void 0 ? undefined : _props$getPopupContai,
2582
- fieldComponent = props.fieldComponent;
2582
+ fieldComponent = props.fieldComponent,
2583
+ selectBusinessType = props.selectBusinessType;
2583
2584
  var _ref = requestConfig || {},
2584
2585
  url = _ref.url,
2585
2586
  otherParams = _ref.otherParams,
@@ -2996,6 +2997,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
2996
2997
  useEffect(function () {
2997
2998
  makeUniqueValue();
2998
2999
  }, [resultSourceKey]);
3000
+ useEffect(function () {
3001
+ if (init) {
3002
+ setItems([]);
3003
+ setItemsTotal(0);
3004
+ run('init');
3005
+ }
3006
+ }, [selectBusinessType]);
2999
3007
  var showModal = function showModal() {
3000
3008
  getData({
3001
3009
  pageSize: tableInitPageSize,
@@ -4207,30 +4215,31 @@ var noEmptyArray = function noEmptyArray(arr) {
4207
4215
  };
4208
4216
  //设置queryTable默认列宽
4209
4217
  var getItemDefaultWidth$1 = function getItemDefaultWidth(item) {
4218
+ var _ref;
4210
4219
  var defaultWidth = 200;
4211
- var lowerCaseKey = (item.key || item.dataIndex).toLowerCase();
4220
+ var lowerCaseKey = (_ref = item.key || item.dataIndex) === null || _ref === void 0 ? void 0 : _ref.toLowerCase();
4212
4221
  switch (true) {
4213
4222
  case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
4214
4223
  defaultWidth = 60;
4215
4224
  break;
4216
- case lowerCaseKey.indexOf('number') > -1:
4217
- case lowerCaseKey.indexOf('quantity') > -1:
4218
- case lowerCaseKey.indexOf('amount') > -1:
4225
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('number')) > -1:
4226
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('quantity')) > -1:
4227
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('amount')) > -1:
4219
4228
  defaultWidth = 90;
4220
4229
  break;
4221
- case lowerCaseKey.indexOf('no') > -1:
4230
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('no')) > -1:
4222
4231
  defaultWidth = 200;
4223
4232
  break;
4224
- case lowerCaseKey.indexOf('code') > -1:
4233
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('code')) > -1:
4225
4234
  defaultWidth = 170;
4226
4235
  break;
4227
- case lowerCaseKey.indexOf('time') > -1:
4236
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('time')) > -1:
4228
4237
  defaultWidth = 130;
4229
4238
  break;
4230
- case lowerCaseKey.indexOf('status') > -1:
4239
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('status')) > -1:
4231
4240
  defaultWidth = 100;
4232
4241
  break;
4233
- case lowerCaseKey.indexOf('user') > -1:
4242
+ case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('user')) > -1:
4234
4243
  defaultWidth = 130;
4235
4244
  break;
4236
4245
  }
@@ -4377,7 +4386,9 @@ var AddSelect = function AddSelect(props) {
4377
4386
  _props$businessType = props.businessType,
4378
4387
  businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
4379
4388
  _props$isAllowRepeate = props.isAllowRepeatedSelect,
4380
- isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
4389
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate,
4390
+ _props$noUseItemEanco = props.noUseItemEancode,
4391
+ noUseItemEancode = _props$noUseItemEanco === void 0 ? true : _props$noUseItemEanco;
4381
4392
  var _ref = requestConfig || {},
4382
4393
  url = _ref.url,
4383
4394
  otherParams = _ref.otherParams,
@@ -5051,8 +5062,10 @@ var AddSelect = function AddSelect(props) {
5051
5062
  pageSize: 5000,
5052
5063
  currentPage: 1
5053
5064
  })]).then(function (x) {
5054
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
5055
- formatTreeDataSource(x, 1, 3, tableSearchForm);
5065
+ var searchPosition1 = noUseItemEancode ? 3 : 2;
5066
+ var searchPosition2 = noUseItemEancode ? 4 : 3;
5067
+ formatSource(x, 0, searchPosition1, tableSearchForm, ['id', 'name']);
5068
+ formatTreeDataSource(x, 1, searchPosition2, tableSearchForm);
5056
5069
  });
5057
5070
  }
5058
5071
  if (businessType == 'skc') {
@@ -8682,7 +8695,7 @@ var BusinessSearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
8682
8695
  needModalTable: needModalTable,
8683
8696
  modalTableProps: modalTableProps
8684
8697
  });
8685
- }, [props === null || props === void 0 ? void 0 : props.value, props.disabled]);
8698
+ }, [props === null || props === void 0 ? void 0 : props.value, props.disabled, props.selectBusinessType]);
8686
8699
  useImperativeHandle(ref, function () {
8687
8700
  return {
8688
8701
  getRef: function getRef() {
@@ -8704,9 +8717,13 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React.memo(BusinessSearchSelect, funct
8704
8717
  if (props && props.disabled !== nextProps.disabled) {
8705
8718
  return false;
8706
8719
  }
8720
+ if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
8721
+ return false;
8722
+ }
8707
8723
  return true;
8708
8724
  });
8709
8725
 
8726
+ // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
8710
8727
  function handleSelectColumn(c, parentProps) {
8711
8728
  var result = c;
8712
8729
  var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
@@ -8718,7 +8735,7 @@ function handleSelectColumn(c, parentProps) {
8718
8735
  return !exceptColumns.includes(i.dataIndex);
8719
8736
  });
8720
8737
  }
8721
- // 追加
8738
+ // 追加(最好不用这个,当组件不固定时候会有影响)
8722
8739
  if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
8723
8740
  additionColumns.forEach(function (i) {
8724
8741
  result.splice(i.position, 0, i.column);
@@ -8731,6 +8748,7 @@ function handleSelectColumn(c, parentProps) {
8731
8748
  return result;
8732
8749
  }
8733
8750
  var AddSkuSelect = function AddSkuSelect(parProps) {
8751
+ var _parProps$requestConf, _parProps$requestConf2;
8734
8752
  var selectProps = {
8735
8753
  mode: 'multiple'
8736
8754
  };
@@ -8738,12 +8756,26 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8738
8756
  _useState2 = _slicedToArray(_useState, 2),
8739
8757
  value = _useState2[0],
8740
8758
  setValue = _useState2[1];
8759
+ var isNoUseItemBarcode = (parProps === null || parProps === void 0 ? void 0 : parProps.noUseItemEancode) !== undefined ? parProps === null || parProps === void 0 ? void 0 : parProps.noUseItemEancode : true; // 默认不加商品条码,兼容老项目
8741
8760
  //注⚠️:自定义过表头的请记得传tableCodeList参数
8742
8761
  var initialSelectColumn = [{
8743
8762
  title: 'SKU编码',
8744
8763
  width: 150,
8745
8764
  dataIndex: 'skuCode'
8746
- }, {
8765
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8766
+ title: '商品条码',
8767
+ width: 100,
8768
+ ellipsis: {
8769
+ showTitle: false
8770
+ },
8771
+ dataIndex: 'itemEancode',
8772
+ render: function render(text) {
8773
+ return /*#__PURE__*/React.createElement(Tooltip, {
8774
+ placement: "topLeft",
8775
+ title: text
8776
+ }, text);
8777
+ }
8778
+ }]), [{
8747
8779
  title: 'SKU名称',
8748
8780
  width: 200,
8749
8781
  ellipsis: {
@@ -8819,7 +8851,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8819
8851
  }, text);
8820
8852
  },
8821
8853
  dataIndex: 'propertyNameAndValue'
8822
- }];
8854
+ }]);
8823
8855
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
8824
8856
  var props = {
8825
8857
  buttonText: parProps.buttonText || '新增',
@@ -8830,11 +8862,11 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8830
8862
  requestConfig: _objectSpread2({
8831
8863
  url: "/items/sku/pager/v2",
8832
8864
  filter: 'qp-name-like',
8833
- otherParams: {
8865
+ otherParams: _objectSpread2({
8834
8866
  'qp-combination-eq': false,
8835
8867
  'qp-approveStatus-eq': 1,
8836
8868
  'qp-status-eq': 1
8837
- },
8869
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
8838
8870
  mappingTextField: 'name',
8839
8871
  mappingValueField: 'skuCode'
8840
8872
  }, parProps.requestConfig),
@@ -8846,7 +8878,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8846
8878
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
8847
8879
  onSaveCallback: parProps.onSaveCallback,
8848
8880
  businessType: 'sku',
8849
- isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
8881
+ isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect),
8882
+ noUseItemEancode: isNoUseItemBarcode
8850
8883
  };
8851
8884
  var modalTableProps = {
8852
8885
  modalTableTitle: '选择商品',
@@ -8856,7 +8889,14 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8856
8889
  }, {
8857
8890
  name: 'qp-skuName-like',
8858
8891
  label: 'SKU名称'
8859
- }, {
8892
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8893
+ name: 'qp-code-in',
8894
+ label: '商品条码',
8895
+ field: {
8896
+ type: 'multipleQueryInput',
8897
+ props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
8898
+ }
8899
+ }]), [{
8860
8900
  name: 'qp-brandId-in',
8861
8901
  type: 'select',
8862
8902
  label: '品牌',
@@ -8901,7 +8941,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8901
8941
  }
8902
8942
  }
8903
8943
  }
8904
- }],
8944
+ }]),
8905
8945
  tableColumns: [{
8906
8946
  title: 'SKU编码',
8907
8947
  width: 150,
@@ -8935,20 +8975,20 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8935
8975
  height: 20
8936
8976
  }));
8937
8977
  }
8938
- }, {
8939
- title: '国际条码',
8978
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8979
+ title: '商品条码',
8940
8980
  width: 100,
8941
8981
  ellipsis: {
8942
8982
  showTitle: false
8943
8983
  },
8944
- dataIndex: 'barCode',
8984
+ dataIndex: 'itemEancode',
8945
8985
  render: function render(text) {
8946
8986
  return /*#__PURE__*/React.createElement(Tooltip, {
8947
8987
  placement: "topLeft",
8948
8988
  title: text
8949
8989
  }, text);
8950
8990
  }
8951
- }, {
8991
+ }]), [{
8952
8992
  title: '所属SPU名称',
8953
8993
  width: 100,
8954
8994
  ellipsis: {
@@ -9039,7 +9079,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
9039
9079
  }, text);
9040
9080
  },
9041
9081
  dataIndex: 'brandName'
9042
- }],
9082
+ }]),
9043
9083
  selectColumn: mTpSelectColumn
9044
9084
  };
9045
9085
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -9047,6 +9087,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
9047
9087
  })));
9048
9088
  };
9049
9089
  var AddSkcSelect = function AddSkcSelect(parProps) {
9090
+ var _parProps$requestConf3;
9050
9091
  var selectProps = {
9051
9092
  mode: 'multiple'
9052
9093
  };
@@ -9124,9 +9165,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9124
9165
  requestConfig: _objectSpread2({
9125
9166
  url: "/items/skc/skcSelect",
9126
9167
  filter: 'qp-name-like',
9127
- otherParams: {
9168
+ otherParams: _objectSpread2({
9128
9169
  'qp-skcStatus-eq': 1
9129
- },
9170
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf3 = parProps.requestConfig) === null || _parProps$requestConf3 === void 0 ? void 0 : _parProps$requestConf3.addOtherParams) || {}),
9130
9171
  mappingTextField: 'name',
9131
9172
  mappingValueField: 'code'
9132
9173
  }, parProps.requestConfig),
@@ -9326,6 +9367,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9326
9367
  })));
9327
9368
  };
9328
9369
  var AddSpuSelect = function AddSpuSelect(parProps) {
9370
+ var _parProps$requestConf4;
9329
9371
  var selectProps = {
9330
9372
  mode: 'multiple'
9331
9373
  };
@@ -9412,11 +9454,11 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
9412
9454
  requestConfig: _objectSpread2({
9413
9455
  url: "/items/item",
9414
9456
  filter: 'qp-itemCode,name-orGroup,like',
9415
- otherParams: {
9457
+ otherParams: _objectSpread2({
9416
9458
  'qp-approveStatus-eq': 1,
9417
9459
  'qp-status-eq': 1,
9418
9460
  sorter: 'desc-id'
9419
- },
9461
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf4 = parProps.requestConfig) === null || _parProps$requestConf4 === void 0 ? void 0 : _parProps$requestConf4.addOtherParams) || {}),
9420
9462
  mappingTextField: 'name',
9421
9463
  mappingValueField: 'itemCode'
9422
9464
  }, parProps.requestConfig),
@@ -9725,7 +9767,7 @@ function getStorageVale(storageKeyString) {
9725
9767
  return "";
9726
9768
  }
9727
9769
 
9728
- 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"];
9770
+ 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"];
9729
9771
  var TreeSearchSelect = function TreeSearchSelect(props) {
9730
9772
  var _useState = useState([]),
9731
9773
  _useState2 = _slicedToArray(_useState, 2),
@@ -9749,6 +9791,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9749
9791
  multiple = _props$multiple === void 0 ? false : _props$multiple,
9750
9792
  _props$isChoose = props.isChoose,
9751
9793
  isChoose = _props$isChoose === void 0 ? false : _props$isChoose,
9794
+ _props$rootDisabled = props.rootDisabled,
9795
+ rootDisabled = _props$rootDisabled === void 0 ? false : _props$rootDisabled,
9752
9796
  mode = props.mode,
9753
9797
  _getPopupContainer = props.getPopupContainer,
9754
9798
  _props$labelInValue = props.labelInValue,
@@ -9775,7 +9819,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9775
9819
  _remoteSource$initial = remoteSource.initialParams,
9776
9820
  initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial;
9777
9821
  var mapSearchTree = function mapSearchTree(treeDataItem) {
9778
- var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
9822
+ var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0; // 盘算是否为父节点
9823
+ var isRoot = (treeDataItem === null || treeDataItem === void 0 ? void 0 : treeDataItem.id) == '0'; // 判断是否为根节点
9779
9824
  return {
9780
9825
  title: treeDataItem[resKeyValue[1]],
9781
9826
  key: treeDataItem[resKeyValue[0]],
@@ -9783,17 +9828,20 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9783
9828
  parentId: treeDataItem.parent,
9784
9829
  data: _objectSpread2({}, treeDataItem),
9785
9830
  isLeaf: !haveChildren,
9786
- disabled: isDisabled(haveChildren),
9831
+ disabled: isDisabled(haveChildren, isRoot),
9787
9832
  children: haveChildren ? treeDataItem.children.map(function (i) {
9788
9833
  return mapSearchTree(i);
9789
9834
  }) : []
9790
9835
  };
9791
9836
  };
9792
- var isDisabled = function isDisabled(children) {
9837
+ var isDisabled = function isDisabled(isParent, isRoot) {
9793
9838
  if (isChoose) {
9839
+ if (rootDisabled && isRoot) {
9840
+ return rootDisabled;
9841
+ }
9794
9842
  return false;
9795
9843
  }
9796
- return children;
9844
+ return isParent;
9797
9845
  };
9798
9846
  /* 实时查询 但是目前用的直接是完整数据源, 所以没有使用 */
9799
9847
  var handleSearch = function handleSearch(q) {
@@ -9866,10 +9914,53 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9866
9914
  return _formatResult;
9867
9915
  }
9868
9916
  };
9917
+ var parallelData = function parallelData(data, result) {
9918
+ data.forEach(function (i) {
9919
+ result.push(i);
9920
+ if (i.children) {
9921
+ parallelData(i.children, result);
9922
+ }
9923
+ });
9924
+ return result;
9925
+ };
9926
+ var getSelectItem = function getSelectItem(tData, selectValue) {
9927
+ var handleList = tData || [];
9928
+ var result = [];
9929
+ if (labelInValue) {
9930
+ result = multiple || treeCheckable ? (selectValue === null || selectValue === void 0 ? void 0 : selectValue.map(function (i) {
9931
+ if (handleList.some(function (s) {
9932
+ return s.key == i.value;
9933
+ })) {
9934
+ return handleList.find(function (s) {
9935
+ return s.key == i.value;
9936
+ });
9937
+ }
9938
+ })) || [] : (handleList === null || handleList === void 0 ? void 0 : handleList.find(function (s) {
9939
+ return s.key == (selectValue === null || selectValue === void 0 ? void 0 : selectValue.value);
9940
+ })) || {};
9941
+ } else {
9942
+ var cValue = _.get(selectValue === null || selectValue === void 0 ? void 0 : selectValue[0], 'value', selectValue);
9943
+ result = multiple || treeCheckable ? (selectValue === null || selectValue === void 0 ? void 0 : selectValue.map(function (i) {
9944
+ if (handleList.some(function (s) {
9945
+ return s.key == i;
9946
+ })) {
9947
+ return handleList.find(function (s) {
9948
+ return s.key == i;
9949
+ });
9950
+ }
9951
+ })) || [] : (handleList === null || handleList === void 0 ? void 0 : handleList.find(function (s) {
9952
+ return s.key == cValue;
9953
+ })) || {};
9954
+ }
9955
+ return result;
9956
+ };
9869
9957
  var handleChange = function handleChange(data, dataName) {
9870
9958
  var _ctx$form2;
9871
9959
  var handleData = formatData(data);
9872
- onChange(handleData, data);
9960
+ // 获取选中树节点当条数据,并返回给调用业务
9961
+ var parallelTreeData = parallelData(treeData, []);
9962
+ var currentItem = getSelectItem(parallelTreeData, data);
9963
+ onChange(handleData, data, currentItem, parallelTreeData);
9873
9964
  onChangeName && onChangeName(dataName);
9874
9965
  getTreeData && getTreeData(treeData); // 把树节点暴露出去
9875
9966
  ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(ctx.name, handleData);
@@ -29431,7 +29522,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29431
29522
  }
29432
29523
  var parallelTreeData = _this.coverToParallel(ruleTreeData, []) || [];
29433
29524
  var currentTreeItem = (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId) && parallelTreeData.find(function (i) {
29434
- return i.key === (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId);
29525
+ var _i$key;
29526
+ 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);
29435
29527
  });
29436
29528
  var dataChoiceBusinessType = currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.dataChoiceBusinessType;
29437
29529
  var dataInputBusinessType = currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.dataInputBusinessType;
@@ -29636,10 +29728,11 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29636
29728
  }
29637
29729
  }), "\u6DFB\u52A0\u6761\u4EF6"))));
29638
29730
  };
29639
- _this.handleEditExtraInfoResponse = function (code, val, parentDetail) {
29731
+ _this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex) {
29640
29732
  var ruleClassData = _this.state.ruleClassData;
29641
29733
  var callBack = _this.props.callBack;
29642
29734
  parentDetail.extraInfo.response[code] = val;
29735
+ ruleClassData[classDataIndex].extraInfo.response[code] = val;
29643
29736
  _this.setState({
29644
29737
  ruleClassData: ruleClassData
29645
29738
  }, function () {
@@ -29647,7 +29740,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29647
29740
  });
29648
29741
  };
29649
29742
  // 场景需要返回值2022.11.15
29650
- _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, disabled, boxStyle) {
29743
+ _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, classDataIndex, disabled, boxStyle) {
29651
29744
  var _ruleReturnConfig$rig;
29652
29745
  var isShowResponse = itemDetail.response['enable'];
29653
29746
  var isRightText = ruleReturnConfig === null || ruleReturnConfig === void 0 ? void 0 : (_ruleReturnConfig$rig = ruleReturnConfig.rightText) === null || _ruleReturnConfig$rig === void 0 ? void 0 : _ruleReturnConfig$rig.length;
@@ -29663,7 +29756,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29663
29756
  var value = val;
29664
29757
  if (isObj(code)) {
29665
29758
  Object.keys(code).forEach(function (ite) {
29666
- _this.handleEditExtraInfoResponse(ite, code[ite], parentDetail);
29759
+ _this.handleEditExtraInfoResponse(ite, code[ite], parentDetail, classDataIndex);
29667
29760
  });
29668
29761
  return;
29669
29762
  }
@@ -29676,7 +29769,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29676
29769
  var _val$PCDCode;
29677
29770
  value = val.value || ((_val$PCDCode = val.PCDCode) === null || _val$PCDCode === void 0 ? void 0 : _val$PCDCode.join('/'));
29678
29771
  }
29679
- _this.handleEditExtraInfoResponse('value', value, parentDetail);
29772
+ _this.handleEditExtraInfoResponse('value', value, parentDetail, classDataIndex);
29680
29773
  };
29681
29774
  return isShowResponse && /*#__PURE__*/React.createElement("div", {
29682
29775
  style: {
@@ -29685,7 +29778,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29685
29778
  }, _this.renderFormCompItem(ruleReturnConfig, showValue, handleEdit, {}, boxStyle, disabled), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
29686
29779
  className: 'icon_btn_style',
29687
29780
  onClick: function onClick() {
29688
- _this.handleEditExtraInfoResponse('enable', false, parentDetail);
29781
+ _this.handleEditExtraInfoResponse('enable', false, parentDetail, classDataIndex);
29689
29782
  },
29690
29783
  style: {
29691
29784
  color: 'gray',
@@ -30294,12 +30387,12 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30294
30387
  type: "link",
30295
30388
  onClick: function onClick() {
30296
30389
  if (isHaveRuleReturnConfig) {
30297
- _this.handleEditExtraInfoResponse('enable', true, parentDetail);
30390
+ _this.handleEditExtraInfoResponse('enable', true, parentDetail, classDataIndex);
30298
30391
  } else {
30299
30392
  message$1.warn('未配置返回');
30300
30393
  }
30301
30394
  }
30302
- }, "\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);
30395
+ }, "\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);
30303
30396
  };
30304
30397
  //添加同一层级条件
30305
30398
  _this.addPeerRule = function (itemDetail) {