@bit-sun/business-component 4.2.0-alpha.6.4 → 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({
|
|
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: '
|
|
10647
|
+
title: 'SPU编码',
|
|
10637
10648
|
dataIndex: 'itemCode'
|
|
10638
10649
|
}, {
|
|
10639
|
-
title: '
|
|
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: '
|
|
10667
|
+
label: 'SPU编码',
|
|
10657
10668
|
type: 'multipleQueryInput'
|
|
10658
10669
|
}, {
|
|
10659
10670
|
name: 'name*multiInput',
|
|
10660
|
-
label: '
|
|
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: '
|
|
10765
|
+
title: 'SPU编码',
|
|
10755
10766
|
dataIndex: 'itemCode',
|
|
10756
10767
|
defaultSort: 1
|
|
10757
10768
|
}, {
|
|
10758
|
-
title: '
|
|
10769
|
+
title: 'SPU名称',
|
|
10759
10770
|
dataIndex: 'name',
|
|
10760
10771
|
defaultSort: 2
|
|
10761
10772
|
}, {
|
|
@@ -11109,7 +11120,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11109
11120
|
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
|
|
11110
11121
|
}], ['colorName', 'categoryId', 'classId', 'brandId'], hiddenFields);
|
|
11111
11122
|
var fieldLoadSource = fieldsRequest.map(function (i) {
|
|
11112
|
-
return loadSelectSource$1(i.url, i.params, options);
|
|
11123
|
+
return loadSelectSource$1(i.url, i.params, i.options);
|
|
11113
11124
|
});
|
|
11114
11125
|
requestConfig = _objectSpread2({
|
|
11115
11126
|
url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
|
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({
|
|
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: '
|
|
10670
|
+
title: 'SPU编码',
|
|
10660
10671
|
dataIndex: 'itemCode'
|
|
10661
10672
|
}, {
|
|
10662
|
-
title: '
|
|
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: '
|
|
10690
|
+
label: 'SPU编码',
|
|
10680
10691
|
type: 'multipleQueryInput'
|
|
10681
10692
|
}, {
|
|
10682
10693
|
name: 'name*multiInput',
|
|
10683
|
-
label: '
|
|
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: '
|
|
10788
|
+
title: 'SPU编码',
|
|
10778
10789
|
dataIndex: 'itemCode',
|
|
10779
10790
|
defaultSort: 1
|
|
10780
10791
|
}, {
|
|
10781
|
-
title: '
|
|
10792
|
+
title: 'SPU名称',
|
|
10782
10793
|
dataIndex: 'name',
|
|
10783
10794
|
defaultSort: 2
|
|
10784
10795
|
}, {
|
|
@@ -11132,7 +11143,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11132
11143
|
options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
|
|
11133
11144
|
}], ['colorName', 'categoryId', 'classId', 'brandId'], hiddenFields);
|
|
11134
11145
|
var fieldLoadSource = fieldsRequest.map(function (i) {
|
|
11135
|
-
return loadSelectSource$1(i.url, i.params, options);
|
|
11146
|
+
return loadSelectSource$1(i.url, i.params, i.options);
|
|
11136
11147
|
});
|
|
11137
11148
|
requestConfig = _objectSpread2({
|
|
11138
11149
|
url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
|
package/package.json
CHANGED
|
@@ -523,11 +523,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
523
523
|
placeholder: '输入商品(SPU)编码或名称',
|
|
524
524
|
renderTableColumns: [
|
|
525
525
|
{
|
|
526
|
-
title: '
|
|
526
|
+
title: 'SPU编码',
|
|
527
527
|
dataIndex: 'itemCode',
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
|
-
title: '
|
|
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: '
|
|
551
|
-
{ name: 'name*multiInput', label: '
|
|
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: '
|
|
629
|
+
title: 'SPU编码',
|
|
630
630
|
dataIndex: 'itemCode',
|
|
631
631
|
defaultSort: 1,
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
|
-
title: '
|
|
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,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', // 过滤参数
|
|
@@ -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
|
|
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')
|