@bit-sun/business-component 4.2.0-alpha.6.5 → 4.2.0-alpha.6.6

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
@@ -5472,6 +5472,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
5472
5472
  highestPopContainer = _props$highestPopCont === void 0 ? undefined : _props$highestPopCont,
5473
5473
  fieldComponent = props.fieldComponent,
5474
5474
  onSaveCallback = props.onSaveCallback,
5475
+ _props$returnFormat = props.returnFormat,
5476
+ returnFormat = _props$returnFormat === void 0 ? [] : _props$returnFormat,
5475
5477
  selectBusinessType = props.selectBusinessType;
5476
5478
  var _ref = rCTemp || {},
5477
5479
  url = _ref.url,
@@ -5530,14 +5532,16 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
5530
5532
  var currentPage = 1;
5531
5533
  var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
5532
5534
  var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
5533
- var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
5535
+ var currentSelectProps = _objectSpread2(_objectSpread2({
5536
+ // 回显字段可自定义
5537
+ optionLabelProp: "label"
5538
+ }, selectProps), {}, {
5534
5539
  // 以下属性不可更改----设计配置项
5535
5540
  showArrow: true,
5536
5541
  showSearch: true,
5537
5542
  filterOption: false,
5538
5543
  allowClear: true,
5539
5544
  listHeight: 160,
5540
- optionLabelProp: "label",
5541
5545
  autoClearSearchValue: false,
5542
5546
  placement: 'bottomRight'
5543
5547
  });
@@ -6006,12 +6010,19 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
6006
6010
  };
6007
6011
  var formaData = function formaData(value, source) {
6008
6012
  if (labelInValue) {
6013
+ var getFromat = function getFromat(format, val) {
6014
+ return format.map(function (_ref8) {
6015
+ var key = _ref8.key,
6016
+ value = _ref8.value;
6017
+ return _defineProperty({}, key, val[value]);
6018
+ });
6019
+ };
6009
6020
  var formatResult = value.map(function (i) {
6010
- return {
6021
+ return Object.assign.apply(Object, [{
6011
6022
  key: i[mappingValueField] || i.key,
6012
6023
  label: i[mappingTextField] || i.label,
6013
6024
  value: i[mappingValueField] || i.value
6014
- };
6025
+ }].concat(_toConsumableArray(getFromat(returnFormat, i))));
6015
6026
  });
6016
6027
  onChange(selectMode ? formatResult : formatResult[0], value, source);
6017
6028
  } else {
@@ -10633,10 +10644,10 @@ function commonFun(type, prefixUrl, parentProps) {
10633
10644
  selectProps = _objectSpread2({
10634
10645
  placeholder: '输入商品(SPU)编码或名称',
10635
10646
  renderTableColumns: [{
10636
- title: '商品编码(SPU)',
10647
+ title: 'SPU编码',
10637
10648
  dataIndex: 'itemCode'
10638
10649
  }, {
10639
- title: '商品名称(SPU)',
10650
+ title: 'SPU名称',
10640
10651
  dataIndex: 'name'
10641
10652
  }]
10642
10653
  }, selectConfigProps);
@@ -10653,11 +10664,11 @@ function commonFun(type, prefixUrl, parentProps) {
10653
10664
  }, requestConfigProp);
10654
10665
  tableSearchForm = [{
10655
10666
  name: 'itemCode*multiInput',
10656
- label: '商品编码(SPU)',
10667
+ label: 'SPU编码',
10657
10668
  type: 'multipleQueryInput'
10658
10669
  }, {
10659
10670
  name: 'name*multiInput',
10660
- label: '商品名称(SPU)',
10671
+ label: 'SPU名称',
10661
10672
  type: 'multipleQueryInput'
10662
10673
  }, {
10663
10674
  name: 'qp-brandId-in',
@@ -10751,11 +10762,11 @@ function commonFun(type, prefixUrl, parentProps) {
10751
10762
  dataIndex: 'keyIndex',
10752
10763
  defaultSort: 0
10753
10764
  }, {
10754
- title: '商品编码(SPU)',
10765
+ title: 'SPU编码',
10755
10766
  dataIndex: 'itemCode',
10756
10767
  defaultSort: 1
10757
10768
  }, {
10758
- title: '商品名称(SPU) ',
10769
+ title: 'SPU名称',
10759
10770
  dataIndex: 'name',
10760
10771
  defaultSort: 2
10761
10772
  }, {
@@ -12021,17 +12032,12 @@ function commonFun(type, prefixUrl, parentProps) {
12021
12032
  sourceName: 'code'
12022
12033
  }, requestConfigProp);
12023
12034
  tableSearchForm = [{
12024
- name: 'name*multiInput',
12025
- label: '店铺名称',
12026
- type: 'multipleQueryInput'
12035
+ name: 'qp-name-like',
12036
+ label: '店铺名称'
12037
+ }, {
12038
+ name: 'qp-code-like',
12039
+ label: '店铺编码'
12027
12040
  }, {
12028
- name: 'code*multiInput',
12029
- label: '店铺编码',
12030
- type: 'multipleQueryInput'
12031
- },
12032
- // { name: 'qp-name-like', label: '店铺名称' },
12033
- // { name: 'qp-code-like', label: '店铺编码' },
12034
- {
12035
12041
  name: 'qp-conglomerateCode-in',
12036
12042
  type: 'select',
12037
12043
  label: '归属集团',
@@ -38594,8 +38600,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38594
38600
  display: 'flex',
38595
38601
  marginBottom: '0px',
38596
38602
  padding: '10px 0px'
38597
- },
38598
- key: itemDetail.elementId
38603
+ }
38599
38604
  }, /*#__PURE__*/React$1.createElement("div", {
38600
38605
  className: 'logical_operate_content',
38601
38606
  style: {
package/dist/index.js CHANGED
@@ -5495,6 +5495,8 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
5495
5495
  highestPopContainer = _props$highestPopCont === void 0 ? undefined : _props$highestPopCont,
5496
5496
  fieldComponent = props.fieldComponent,
5497
5497
  onSaveCallback = props.onSaveCallback,
5498
+ _props$returnFormat = props.returnFormat,
5499
+ returnFormat = _props$returnFormat === void 0 ? [] : _props$returnFormat,
5498
5500
  selectBusinessType = props.selectBusinessType;
5499
5501
  var _ref = rCTemp || {},
5500
5502
  url = _ref.url,
@@ -5553,14 +5555,16 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
5553
5555
  var currentPage = 1;
5554
5556
  var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
5555
5557
  var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
5556
- var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
5558
+ var currentSelectProps = _objectSpread2(_objectSpread2({
5559
+ // 回显字段可自定义
5560
+ optionLabelProp: "label"
5561
+ }, selectProps), {}, {
5557
5562
  // 以下属性不可更改----设计配置项
5558
5563
  showArrow: true,
5559
5564
  showSearch: true,
5560
5565
  filterOption: false,
5561
5566
  allowClear: true,
5562
5567
  listHeight: 160,
5563
- optionLabelProp: "label",
5564
5568
  autoClearSearchValue: false,
5565
5569
  placement: 'bottomRight'
5566
5570
  });
@@ -6029,12 +6033,19 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
6029
6033
  };
6030
6034
  var formaData = function formaData(value, source) {
6031
6035
  if (labelInValue) {
6036
+ var getFromat = function getFromat(format, val) {
6037
+ return format.map(function (_ref8) {
6038
+ var key = _ref8.key,
6039
+ value = _ref8.value;
6040
+ return _defineProperty({}, key, val[value]);
6041
+ });
6042
+ };
6032
6043
  var formatResult = value.map(function (i) {
6033
- return {
6044
+ return Object.assign.apply(Object, [{
6034
6045
  key: i[mappingValueField] || i.key,
6035
6046
  label: i[mappingTextField] || i.label,
6036
6047
  value: i[mappingValueField] || i.value
6037
- };
6048
+ }].concat(_toConsumableArray(getFromat(returnFormat, i))));
6038
6049
  });
6039
6050
  onChange(selectMode ? formatResult : formatResult[0], value, source);
6040
6051
  } else {
@@ -10656,10 +10667,10 @@ function commonFun(type, prefixUrl, parentProps) {
10656
10667
  selectProps = _objectSpread2({
10657
10668
  placeholder: '输入商品(SPU)编码或名称',
10658
10669
  renderTableColumns: [{
10659
- title: '商品编码(SPU)',
10670
+ title: 'SPU编码',
10660
10671
  dataIndex: 'itemCode'
10661
10672
  }, {
10662
- title: '商品名称(SPU)',
10673
+ title: 'SPU名称',
10663
10674
  dataIndex: 'name'
10664
10675
  }]
10665
10676
  }, selectConfigProps);
@@ -10676,11 +10687,11 @@ function commonFun(type, prefixUrl, parentProps) {
10676
10687
  }, requestConfigProp);
10677
10688
  tableSearchForm = [{
10678
10689
  name: 'itemCode*multiInput',
10679
- label: '商品编码(SPU)',
10690
+ label: 'SPU编码',
10680
10691
  type: 'multipleQueryInput'
10681
10692
  }, {
10682
10693
  name: 'name*multiInput',
10683
- label: '商品名称(SPU)',
10694
+ label: 'SPU名称',
10684
10695
  type: 'multipleQueryInput'
10685
10696
  }, {
10686
10697
  name: 'qp-brandId-in',
@@ -10774,11 +10785,11 @@ function commonFun(type, prefixUrl, parentProps) {
10774
10785
  dataIndex: 'keyIndex',
10775
10786
  defaultSort: 0
10776
10787
  }, {
10777
- title: '商品编码(SPU)',
10788
+ title: 'SPU编码',
10778
10789
  dataIndex: 'itemCode',
10779
10790
  defaultSort: 1
10780
10791
  }, {
10781
- title: '商品名称(SPU) ',
10792
+ title: 'SPU名称',
10782
10793
  dataIndex: 'name',
10783
10794
  defaultSort: 2
10784
10795
  }, {
@@ -12044,17 +12055,12 @@ function commonFun(type, prefixUrl, parentProps) {
12044
12055
  sourceName: 'code'
12045
12056
  }, requestConfigProp);
12046
12057
  tableSearchForm = [{
12047
- name: 'name*multiInput',
12048
- label: '店铺名称',
12049
- type: 'multipleQueryInput'
12058
+ name: 'qp-name-like',
12059
+ label: '店铺名称'
12060
+ }, {
12061
+ name: 'qp-code-like',
12062
+ label: '店铺编码'
12050
12063
  }, {
12051
- name: 'code*multiInput',
12052
- label: '店铺编码',
12053
- type: 'multipleQueryInput'
12054
- },
12055
- // { name: 'qp-name-like', label: '店铺名称' },
12056
- // { name: 'qp-code-like', label: '店铺编码' },
12057
- {
12058
12064
  name: 'qp-conglomerateCode-in',
12059
12065
  type: 'select',
12060
12066
  label: '归属集团',
@@ -38617,8 +38623,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38617
38623
  display: 'flex',
38618
38624
  marginBottom: '0px',
38619
38625
  padding: '10px 0px'
38620
- },
38621
- key: itemDetail.elementId
38626
+ }
38622
38627
  }, /*#__PURE__*/React__default['default'].createElement("div", {
38623
38628
  className: 'logical_operate_content',
38624
38629
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.0-alpha.6.5",
3
+ "version": "4.2.0-alpha.6.6",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -523,11 +523,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
523
523
  placeholder: '输入商品(SPU)编码或名称',
524
524
  renderTableColumns: [
525
525
  {
526
- title: '商品编码(SPU)',
526
+ title: 'SPU编码',
527
527
  dataIndex: 'itemCode',
528
528
  },
529
529
  {
530
- title: '商品名称(SPU)',
530
+ title: 'SPU名称',
531
531
  dataIndex: 'name',
532
532
  },
533
533
  ],
@@ -547,8 +547,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
547
547
  ...requestConfigProp,
548
548
  }
549
549
  tableSearchForm = [
550
- { name: 'itemCode*multiInput', label: '商品编码(SPU)', type: 'multipleQueryInput' },
551
- { name: 'name*multiInput', label: '商品名称(SPU)', type: 'multipleQueryInput' },
550
+ { name: 'itemCode*multiInput', label: 'SPU编码', type: 'multipleQueryInput' },
551
+ { name: 'name*multiInput', label: 'SPU名称', type: 'multipleQueryInput' },
552
552
  { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
553
553
  type: 'select',
554
554
  props: {
@@ -626,12 +626,12 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
626
626
  defaultSort: 0,
627
627
  },
628
628
  {
629
- title: '商品编码(SPU)',
629
+ title: 'SPU编码',
630
630
  dataIndex: 'itemCode',
631
631
  defaultSort: 1,
632
632
  },
633
633
  {
634
- title: '商品名称(SPU) ',
634
+ title: 'SPU名称',
635
635
  dataIndex: 'name',
636
636
  defaultSort: 2,
637
637
  },
@@ -970,7 +970,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
970
970
  ['colorName', 'categoryId', 'classId', 'brandId'],
971
971
  hiddenFields,
972
972
  );
973
- const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params,i.options));
973
+ const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params, i.options));
974
974
  requestConfig = {
975
975
  url: `${prefixUrl.selectPrefix}/skc/skcSelect`,
976
976
  filter: 'qp-code,name-orGroup,like', // 过滤参数
@@ -1860,10 +1860,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1860
1860
  ...requestConfigProp,
1861
1861
  }
1862
1862
  tableSearchForm = [
1863
- { name: 'name*multiInput', label: '店铺名称', type: 'multipleQueryInput' },
1864
- { name: 'code*multiInput', label: '店铺编码', type: 'multipleQueryInput' },
1865
- // { name: 'qp-name-like', label: '店铺名称' },
1866
- // { name: 'qp-code-like', label: '店铺编码' },
1863
+ { name: 'qp-name-like', label: '店铺名称' },
1864
+ { name: 'qp-code-like', label: '店铺编码' },
1867
1865
  { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1868
1866
  type: 'select',
1869
1867
  props: {
@@ -32,6 +32,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
32
32
  highestPopContainer = undefined,
33
33
  fieldComponent,
34
34
  onSaveCallback,
35
+ returnFormat = [],
35
36
  selectBusinessType,
36
37
  } = props;
37
38
  const {
@@ -66,6 +67,8 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
66
67
  const selectParamsKey = requestConfig?.filter || 'qp-codeAndName-like'
67
68
  const selectParamsInitKey = requestConfig?.filterInit || selectParamsKey
68
69
  const currentSelectProps = {
70
+ // 回显字段可自定义
71
+ optionLabelProp: "label",
69
72
  ...selectProps,
70
73
  // 以下属性不可更改----设计配置项
71
74
  showArrow: true,
@@ -73,7 +76,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
73
76
  filterOption: false,
74
77
  allowClear: true,
75
78
  listHeight: 160,
76
- optionLabelProp: "label",
77
79
  autoClearSearchValue: false,
78
80
  placement: 'bottomRight'
79
81
  }
@@ -431,7 +433,8 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
431
433
 
432
434
  const formaData = (value: any, source: any) => {
433
435
  if (labelInValue) {
434
- const formatResult = value.map((i: any) => ({ key: i[mappingValueField] || i.key, label: i[mappingTextField] || i.label, value: i[mappingValueField] || i.value }))
436
+ const getFromat = (format, val) => format.map(({key,value})=> ({[key]:val[value]}))
437
+ const formatResult = value.map((i: any) => (Object.assign({ key: i[mappingValueField] || i.key, label: i[mappingTextField] || i.label, value: i[mappingValueField] || i.value }, ...getFromat(returnFormat, i))))
435
438
  onChange(selectMode ? formatResult : formatResult[0], value,source)
436
439
  } else {
437
440
  const formatResult = selectMode ? value.map((i: any) => i.value) : _.get(value[0], 'value')
@@ -748,7 +748,6 @@ class RuleObjectComponent extends Component {
748
748
  <div
749
749
  className={'rule_line_content'}
750
750
  style={{ display: 'flex', marginBottom: '0px', padding: '10px 0px' }}
751
- key={itemDetail.elementId}
752
751
  >
753
752
  <div
754
753
  className={'logical_operate_content'}