@bit-sun/business-component 2.3.12 → 2.3.14
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/components/Business/SearchSelect/common.d.ts +5 -1
- package/dist/index.esm.js +87 -24
- package/dist/index.js +87 -24
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.ts +29 -5
- package/src/components/Business/SearchSelect/common.ts +12 -1
- package/src/components/Business/SearchSelect/index.md +9 -2
- package/src/components/Functional/SearchSelect/index.tsx +22 -6
|
@@ -6,6 +6,10 @@ declare const shopFile2Type: {
|
|
|
6
6
|
text: string;
|
|
7
7
|
value: string;
|
|
8
8
|
}[];
|
|
9
|
+
declare const shopFile2Status: {
|
|
10
|
+
text: string;
|
|
11
|
+
value: number;
|
|
12
|
+
}[];
|
|
9
13
|
declare const arrivalPaySupportList: {
|
|
10
14
|
text: string;
|
|
11
15
|
value: number;
|
|
@@ -14,4 +18,4 @@ declare const sharingType: {
|
|
|
14
18
|
text: string;
|
|
15
19
|
value: string;
|
|
16
20
|
}[];
|
|
17
|
-
export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type };
|
|
21
|
+
export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status };
|
package/dist/index.esm.js
CHANGED
|
@@ -2607,7 +2607,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2607
2607
|
_ref$init = _ref.init,
|
|
2608
2608
|
init = _ref$init === void 0 ? true : _ref$init,
|
|
2609
2609
|
_ref$extralHeaders = _ref.extralHeaders,
|
|
2610
|
-
extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders
|
|
2610
|
+
extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders,
|
|
2611
|
+
_ref$specialBracket = _ref.specialBracket,
|
|
2612
|
+
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket;
|
|
2611
2613
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
|
|
2612
2614
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
2613
2615
|
var initVal = value || (selectMode ? [] : null);
|
|
@@ -2914,7 +2916,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2914
2916
|
}
|
|
2915
2917
|
}
|
|
2916
2918
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
2917
|
-
text: item[mappingTextField],
|
|
2919
|
+
text: specialBracket ? "\u3010".concat(item[mappingValueField], "\u3011").concat(item[mappingTextField]) : item[mappingTextField],
|
|
2918
2920
|
textShowText: textShowText,
|
|
2919
2921
|
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
2920
2922
|
value: item[mappingValueField]
|
|
@@ -2932,7 +2934,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2932
2934
|
}
|
|
2933
2935
|
}
|
|
2934
2936
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
2935
|
-
text: item[mappingTextField],
|
|
2937
|
+
text: specialBracket ? "\u3010".concat(item[mappingValueField], "\u3011").concat(item[mappingTextField]) : item[mappingTextField],
|
|
2936
2938
|
textShowText: textShowText,
|
|
2937
2939
|
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
2938
2940
|
value: item[mappingValueField]
|
|
@@ -3166,13 +3168,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3166
3168
|
var LightHeightOption = function LightHeightOption(props) {
|
|
3167
3169
|
var filterTxt = props.filterTxt,
|
|
3168
3170
|
text = props.text;
|
|
3169
|
-
var heightLightTxt = function heightLightTxt(
|
|
3171
|
+
var heightLightTxt = function heightLightTxt(text, heightTxt) {
|
|
3170
3172
|
if (heightTxt === '') {
|
|
3171
|
-
return
|
|
3173
|
+
return text;
|
|
3172
3174
|
}
|
|
3173
3175
|
// 前面filterOption 不区分大小写,这里用i
|
|
3174
3176
|
var regexp = new RegExp(heightTxt, 'gi');
|
|
3175
|
-
return
|
|
3177
|
+
return text.replace(regexp, "<span style=\"color:red\">".concat(heightTxt, "</span>"));
|
|
3176
3178
|
};
|
|
3177
3179
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
3178
3180
|
title: text
|
|
@@ -3378,6 +3380,10 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3378
3380
|
})
|
|
3379
3381
|
}, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
|
|
3380
3382
|
};
|
|
3383
|
+
var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, item) {
|
|
3384
|
+
var showText = Array.isArray(item.textShowText) && item.textShowText.join(' ') || item.textShowText;
|
|
3385
|
+
return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
|
|
3386
|
+
};
|
|
3381
3387
|
return /*#__PURE__*/React.createElement("div", {
|
|
3382
3388
|
className: 'search_select'
|
|
3383
3389
|
}, fieldComponent ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -3447,7 +3453,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3447
3453
|
key: item.value,
|
|
3448
3454
|
label: item.text
|
|
3449
3455
|
}, LightHeightOption({
|
|
3450
|
-
text:
|
|
3456
|
+
text: handleSelectOptionsShowValue(specialBracket, item),
|
|
3451
3457
|
filterTxt: searchValue
|
|
3452
3458
|
}));
|
|
3453
3459
|
})), needModalTable && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -6599,6 +6605,13 @@ var shopFile2Type = [{
|
|
|
6599
6605
|
text: "自营B2C",
|
|
6600
6606
|
value: 'B2C'
|
|
6601
6607
|
}];
|
|
6608
|
+
var shopFile2Status = [{
|
|
6609
|
+
text: "启用",
|
|
6610
|
+
value: 10
|
|
6611
|
+
}, {
|
|
6612
|
+
text: "禁用",
|
|
6613
|
+
value: 20
|
|
6614
|
+
}];
|
|
6602
6615
|
var arrivalPaySupportList = [{
|
|
6603
6616
|
text: "支持",
|
|
6604
6617
|
value: 1
|
|
@@ -7554,10 +7567,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7554
7567
|
mappingTextField: 'physicalWarehouseName',
|
|
7555
7568
|
mappingTextShowKeyField: 'physicalWarehouseCode',
|
|
7556
7569
|
mappingValueField: 'id',
|
|
7557
|
-
otherParams: {
|
|
7558
|
-
'qp-isEnable-eq': 1
|
|
7570
|
+
otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
|
|
7571
|
+
'qp-isEnable-eq': 1
|
|
7572
|
+
}), {}, {
|
|
7559
7573
|
sorter: 'desc-id'
|
|
7560
|
-
},
|
|
7574
|
+
}),
|
|
7561
7575
|
sourceName: 'warehouseIds'
|
|
7562
7576
|
}, requestConfigProp);
|
|
7563
7577
|
tableSearchForm = [{
|
|
@@ -7590,7 +7604,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7590
7604
|
}
|
|
7591
7605
|
}
|
|
7592
7606
|
}
|
|
7593
|
-
}]
|
|
7607
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7608
|
+
name: 'qp-isEnable-eq',
|
|
7609
|
+
type: 'select',
|
|
7610
|
+
label: '物理仓状态',
|
|
7611
|
+
initialSource: getDictionarySource$1('SC00001')
|
|
7612
|
+
}] : []));
|
|
7594
7613
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
7595
7614
|
pageSize: 5000,
|
|
7596
7615
|
currentPage: 1,
|
|
@@ -7613,10 +7632,16 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7613
7632
|
render: function render(text) {
|
|
7614
7633
|
return getDictionaryTextByValue('SC00002', text);
|
|
7615
7634
|
}
|
|
7616
|
-
}
|
|
7635
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7636
|
+
title: '状态',
|
|
7637
|
+
dataIndex: 'isEnable',
|
|
7638
|
+
render: function render(text) {
|
|
7639
|
+
return getDictionaryTextByValue('SC00001', text);
|
|
7640
|
+
}
|
|
7641
|
+
}] : []), [{
|
|
7617
7642
|
title: '所属公司',
|
|
7618
7643
|
dataIndex: 'companyName'
|
|
7619
|
-
}]
|
|
7644
|
+
}])
|
|
7620
7645
|
}, modalTableBusProps);
|
|
7621
7646
|
}
|
|
7622
7647
|
if (type === 'realWarehouse') {
|
|
@@ -7626,10 +7651,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7626
7651
|
mappingTextField: 'realWarehouseName',
|
|
7627
7652
|
mappingTextShowKeyField: 'realWarehouseCode',
|
|
7628
7653
|
mappingValueField: 'id',
|
|
7629
|
-
otherParams: {
|
|
7630
|
-
'qp-isEnable-eq': 1
|
|
7654
|
+
otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
|
|
7655
|
+
'qp-isEnable-eq': 1
|
|
7656
|
+
}), {}, {
|
|
7631
7657
|
sorter: 'desc-id'
|
|
7632
|
-
},
|
|
7658
|
+
}),
|
|
7633
7659
|
sourceName: 'warehouseIds'
|
|
7634
7660
|
}, requestConfigProp);
|
|
7635
7661
|
tableSearchForm = [{
|
|
@@ -7643,7 +7669,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7643
7669
|
type: 'select',
|
|
7644
7670
|
label: '逻辑仓类型',
|
|
7645
7671
|
initialSource: getDictionarySource$1('SC00004')
|
|
7646
|
-
}]
|
|
7672
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7673
|
+
name: 'qp-isEnable-eq',
|
|
7674
|
+
type: 'select',
|
|
7675
|
+
label: '逻辑仓状态',
|
|
7676
|
+
initialSource: getDictionarySource$1('SC00001')
|
|
7677
|
+
}] : []));
|
|
7647
7678
|
modalTableProps = _objectSpread2({
|
|
7648
7679
|
modalTableTitle: '选择逻辑仓',
|
|
7649
7680
|
tableSearchForm: tableSearchForm,
|
|
@@ -7659,7 +7690,13 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7659
7690
|
render: function render(text) {
|
|
7660
7691
|
return getDictionaryTextByValue('SC00004', text);
|
|
7661
7692
|
}
|
|
7662
|
-
}]
|
|
7693
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7694
|
+
title: '状态',
|
|
7695
|
+
dataIndex: 'isEnable',
|
|
7696
|
+
render: function render(text) {
|
|
7697
|
+
return getDictionaryTextByValue('SC00001', text);
|
|
7698
|
+
}
|
|
7699
|
+
}] : []))
|
|
7663
7700
|
}, modalTableBusProps);
|
|
7664
7701
|
}
|
|
7665
7702
|
if (type === 'ownerWarehouse') {
|
|
@@ -7669,10 +7706,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7669
7706
|
mappingTextField: 'name',
|
|
7670
7707
|
mappingTextShowKeyField: 'operationWarehouseCode',
|
|
7671
7708
|
mappingValueField: 'operationWarehouseCode',
|
|
7672
|
-
otherParams: {
|
|
7673
|
-
'qp-status-eq': 1
|
|
7709
|
+
otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
|
|
7710
|
+
'qp-status-eq': 1
|
|
7711
|
+
}), {}, {
|
|
7674
7712
|
sorter: 'desc-id'
|
|
7675
|
-
},
|
|
7713
|
+
}),
|
|
7676
7714
|
sourceName: 'qp-operationWarehouseCode-in'
|
|
7677
7715
|
}, requestConfigProp);
|
|
7678
7716
|
tableSearchForm = [{
|
|
@@ -7700,7 +7738,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7700
7738
|
}
|
|
7701
7739
|
}
|
|
7702
7740
|
}
|
|
7703
|
-
}]
|
|
7741
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7742
|
+
name: 'qp-status-eq',
|
|
7743
|
+
type: 'select',
|
|
7744
|
+
label: '运营仓状态',
|
|
7745
|
+
initialSource: getDictionarySource$1('SC00001')
|
|
7746
|
+
}] : []));
|
|
7704
7747
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
|
|
7705
7748
|
'qp-status-eq': 1
|
|
7706
7749
|
})]).then(function (x) {
|
|
@@ -7718,7 +7761,13 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7718
7761
|
}, {
|
|
7719
7762
|
title: '运营组',
|
|
7720
7763
|
dataIndex: 'groupName'
|
|
7721
|
-
}]
|
|
7764
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7765
|
+
title: '状态',
|
|
7766
|
+
dataIndex: 'status',
|
|
7767
|
+
render: function render(text) {
|
|
7768
|
+
return getDictionaryTextByValue('SC00001', text);
|
|
7769
|
+
}
|
|
7770
|
+
}] : []))
|
|
7722
7771
|
}, modalTableBusProps);
|
|
7723
7772
|
}
|
|
7724
7773
|
// 仓库选择器(虚拟、渠道仓)(无弹窗)
|
|
@@ -8137,6 +8186,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
8137
8186
|
type: 'select',
|
|
8138
8187
|
label: '商店类型',
|
|
8139
8188
|
initialSource: shopFile2Type
|
|
8189
|
+
}, {
|
|
8190
|
+
name: 'qp-status-in',
|
|
8191
|
+
type: 'select',
|
|
8192
|
+
label: '商店状态',
|
|
8193
|
+
initialSource: shopFile2Status
|
|
8140
8194
|
}, {
|
|
8141
8195
|
name: 'qp-orgCode-in',
|
|
8142
8196
|
type: 'select',
|
|
@@ -8162,7 +8216,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
8162
8216
|
'qp-realOrg-eq': true,
|
|
8163
8217
|
'qp-status-eq': 10
|
|
8164
8218
|
})]).then(function (x) {
|
|
8165
|
-
formatSource(x, 0,
|
|
8219
|
+
formatSource(x, 0, 4, tableSearchForm);
|
|
8166
8220
|
});
|
|
8167
8221
|
modalTableProps = _objectSpread2({
|
|
8168
8222
|
modalTableTitle: '选择商店',
|
|
@@ -8182,6 +8236,15 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
8182
8236
|
return i.value === text;
|
|
8183
8237
|
})) === null || _shopFile2Type$find === void 0 ? void 0 : _shopFile2Type$find.text;
|
|
8184
8238
|
}
|
|
8239
|
+
}, {
|
|
8240
|
+
title: '启用状态',
|
|
8241
|
+
dataIndex: 'status',
|
|
8242
|
+
render: function render(text) {
|
|
8243
|
+
var _shopFile2Status$find;
|
|
8244
|
+
return (_shopFile2Status$find = shopFile2Status.find(function (i) {
|
|
8245
|
+
return i.value === text;
|
|
8246
|
+
})) === null || _shopFile2Status$find === void 0 ? void 0 : _shopFile2Status$find.text;
|
|
8247
|
+
}
|
|
8185
8248
|
}, {
|
|
8186
8249
|
title: '所属销售组织',
|
|
8187
8250
|
dataIndex: 'orgName'
|
package/dist/index.js
CHANGED
|
@@ -2626,7 +2626,9 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2626
2626
|
_ref$init = _ref.init,
|
|
2627
2627
|
init = _ref$init === void 0 ? true : _ref$init,
|
|
2628
2628
|
_ref$extralHeaders = _ref.extralHeaders,
|
|
2629
|
-
extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders
|
|
2629
|
+
extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders,
|
|
2630
|
+
_ref$specialBracket = _ref.specialBracket,
|
|
2631
|
+
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket;
|
|
2630
2632
|
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
|
|
2631
2633
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
2632
2634
|
var initVal = value || (selectMode ? [] : null);
|
|
@@ -2933,7 +2935,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2933
2935
|
}
|
|
2934
2936
|
}
|
|
2935
2937
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
2936
|
-
text: item[mappingTextField],
|
|
2938
|
+
text: specialBracket ? "\u3010".concat(item[mappingValueField], "\u3011").concat(item[mappingTextField]) : item[mappingTextField],
|
|
2937
2939
|
textShowText: textShowText,
|
|
2938
2940
|
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
2939
2941
|
value: item[mappingValueField]
|
|
@@ -2951,7 +2953,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2951
2953
|
}
|
|
2952
2954
|
}
|
|
2953
2955
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
2954
|
-
text: item[mappingTextField],
|
|
2956
|
+
text: specialBracket ? "\u3010".concat(item[mappingValueField], "\u3011").concat(item[mappingTextField]) : item[mappingTextField],
|
|
2955
2957
|
textShowText: textShowText,
|
|
2956
2958
|
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
2957
2959
|
value: item[mappingValueField]
|
|
@@ -3185,13 +3187,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3185
3187
|
var LightHeightOption = function LightHeightOption(props) {
|
|
3186
3188
|
var filterTxt = props.filterTxt,
|
|
3187
3189
|
text = props.text;
|
|
3188
|
-
var heightLightTxt = function heightLightTxt(
|
|
3190
|
+
var heightLightTxt = function heightLightTxt(text, heightTxt) {
|
|
3189
3191
|
if (heightTxt === '') {
|
|
3190
|
-
return
|
|
3192
|
+
return text;
|
|
3191
3193
|
}
|
|
3192
3194
|
// 前面filterOption 不区分大小写,这里用i
|
|
3193
3195
|
var regexp = new RegExp(heightTxt, 'gi');
|
|
3194
|
-
return
|
|
3196
|
+
return text.replace(regexp, "<span style=\"color:red\">".concat(heightTxt, "</span>"));
|
|
3195
3197
|
};
|
|
3196
3198
|
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
3197
3199
|
title: text
|
|
@@ -3397,6 +3399,10 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3397
3399
|
})
|
|
3398
3400
|
}, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
|
|
3399
3401
|
};
|
|
3402
|
+
var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, item) {
|
|
3403
|
+
var showText = Array.isArray(item.textShowText) && item.textShowText.join(' ') || item.textShowText;
|
|
3404
|
+
return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
|
|
3405
|
+
};
|
|
3400
3406
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
3401
3407
|
className: 'search_select'
|
|
3402
3408
|
}, fieldComponent ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -3466,7 +3472,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3466
3472
|
key: item.value,
|
|
3467
3473
|
label: item.text
|
|
3468
3474
|
}, LightHeightOption({
|
|
3469
|
-
text:
|
|
3475
|
+
text: handleSelectOptionsShowValue(specialBracket, item),
|
|
3470
3476
|
filterTxt: searchValue
|
|
3471
3477
|
}));
|
|
3472
3478
|
})), needModalTable && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
@@ -6618,6 +6624,13 @@ var shopFile2Type = [{
|
|
|
6618
6624
|
text: "自营B2C",
|
|
6619
6625
|
value: 'B2C'
|
|
6620
6626
|
}];
|
|
6627
|
+
var shopFile2Status = [{
|
|
6628
|
+
text: "启用",
|
|
6629
|
+
value: 10
|
|
6630
|
+
}, {
|
|
6631
|
+
text: "禁用",
|
|
6632
|
+
value: 20
|
|
6633
|
+
}];
|
|
6621
6634
|
var arrivalPaySupportList = [{
|
|
6622
6635
|
text: "支持",
|
|
6623
6636
|
value: 1
|
|
@@ -7573,10 +7586,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7573
7586
|
mappingTextField: 'physicalWarehouseName',
|
|
7574
7587
|
mappingTextShowKeyField: 'physicalWarehouseCode',
|
|
7575
7588
|
mappingValueField: 'id',
|
|
7576
|
-
otherParams: {
|
|
7577
|
-
'qp-isEnable-eq': 1
|
|
7589
|
+
otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
|
|
7590
|
+
'qp-isEnable-eq': 1
|
|
7591
|
+
}), {}, {
|
|
7578
7592
|
sorter: 'desc-id'
|
|
7579
|
-
},
|
|
7593
|
+
}),
|
|
7580
7594
|
sourceName: 'warehouseIds'
|
|
7581
7595
|
}, requestConfigProp);
|
|
7582
7596
|
tableSearchForm = [{
|
|
@@ -7609,7 +7623,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7609
7623
|
}
|
|
7610
7624
|
}
|
|
7611
7625
|
}
|
|
7612
|
-
}]
|
|
7626
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7627
|
+
name: 'qp-isEnable-eq',
|
|
7628
|
+
type: 'select',
|
|
7629
|
+
label: '物理仓状态',
|
|
7630
|
+
initialSource: getDictionarySource$1('SC00001')
|
|
7631
|
+
}] : []));
|
|
7613
7632
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/company"), {
|
|
7614
7633
|
pageSize: 5000,
|
|
7615
7634
|
currentPage: 1,
|
|
@@ -7632,10 +7651,16 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7632
7651
|
render: function render(text) {
|
|
7633
7652
|
return getDictionaryTextByValue('SC00002', text);
|
|
7634
7653
|
}
|
|
7635
|
-
}
|
|
7654
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7655
|
+
title: '状态',
|
|
7656
|
+
dataIndex: 'isEnable',
|
|
7657
|
+
render: function render(text) {
|
|
7658
|
+
return getDictionaryTextByValue('SC00001', text);
|
|
7659
|
+
}
|
|
7660
|
+
}] : []), [{
|
|
7636
7661
|
title: '所属公司',
|
|
7637
7662
|
dataIndex: 'companyName'
|
|
7638
|
-
}]
|
|
7663
|
+
}])
|
|
7639
7664
|
}, modalTableBusProps);
|
|
7640
7665
|
}
|
|
7641
7666
|
if (type === 'realWarehouse') {
|
|
@@ -7645,10 +7670,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7645
7670
|
mappingTextField: 'realWarehouseName',
|
|
7646
7671
|
mappingTextShowKeyField: 'realWarehouseCode',
|
|
7647
7672
|
mappingValueField: 'id',
|
|
7648
|
-
otherParams: {
|
|
7649
|
-
'qp-isEnable-eq': 1
|
|
7673
|
+
otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
|
|
7674
|
+
'qp-isEnable-eq': 1
|
|
7675
|
+
}), {}, {
|
|
7650
7676
|
sorter: 'desc-id'
|
|
7651
|
-
},
|
|
7677
|
+
}),
|
|
7652
7678
|
sourceName: 'warehouseIds'
|
|
7653
7679
|
}, requestConfigProp);
|
|
7654
7680
|
tableSearchForm = [{
|
|
@@ -7662,7 +7688,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7662
7688
|
type: 'select',
|
|
7663
7689
|
label: '逻辑仓类型',
|
|
7664
7690
|
initialSource: getDictionarySource$1('SC00004')
|
|
7665
|
-
}]
|
|
7691
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7692
|
+
name: 'qp-isEnable-eq',
|
|
7693
|
+
type: 'select',
|
|
7694
|
+
label: '逻辑仓状态',
|
|
7695
|
+
initialSource: getDictionarySource$1('SC00001')
|
|
7696
|
+
}] : []));
|
|
7666
7697
|
modalTableProps = _objectSpread2({
|
|
7667
7698
|
modalTableTitle: '选择逻辑仓',
|
|
7668
7699
|
tableSearchForm: tableSearchForm,
|
|
@@ -7678,7 +7709,13 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7678
7709
|
render: function render(text) {
|
|
7679
7710
|
return getDictionaryTextByValue('SC00004', text);
|
|
7680
7711
|
}
|
|
7681
|
-
}]
|
|
7712
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7713
|
+
title: '状态',
|
|
7714
|
+
dataIndex: 'isEnable',
|
|
7715
|
+
render: function render(text) {
|
|
7716
|
+
return getDictionaryTextByValue('SC00001', text);
|
|
7717
|
+
}
|
|
7718
|
+
}] : []))
|
|
7682
7719
|
}, modalTableBusProps);
|
|
7683
7720
|
}
|
|
7684
7721
|
if (type === 'ownerWarehouse') {
|
|
@@ -7688,10 +7725,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7688
7725
|
mappingTextField: 'name',
|
|
7689
7726
|
mappingTextShowKeyField: 'operationWarehouseCode',
|
|
7690
7727
|
mappingValueField: 'operationWarehouseCode',
|
|
7691
|
-
otherParams: {
|
|
7692
|
-
'qp-status-eq': 1
|
|
7728
|
+
otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
|
|
7729
|
+
'qp-status-eq': 1
|
|
7730
|
+
}), {}, {
|
|
7693
7731
|
sorter: 'desc-id'
|
|
7694
|
-
},
|
|
7732
|
+
}),
|
|
7695
7733
|
sourceName: 'qp-operationWarehouseCode-in'
|
|
7696
7734
|
}, requestConfigProp);
|
|
7697
7735
|
tableSearchForm = [{
|
|
@@ -7719,7 +7757,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7719
7757
|
}
|
|
7720
7758
|
}
|
|
7721
7759
|
}
|
|
7722
|
-
}]
|
|
7760
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7761
|
+
name: 'qp-status-eq',
|
|
7762
|
+
type: 'select',
|
|
7763
|
+
label: '运营仓状态',
|
|
7764
|
+
initialSource: getDictionarySource$1('SC00001')
|
|
7765
|
+
}] : []));
|
|
7723
7766
|
Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
|
|
7724
7767
|
'qp-status-eq': 1
|
|
7725
7768
|
})]).then(function (x) {
|
|
@@ -7737,7 +7780,13 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
7737
7780
|
}, {
|
|
7738
7781
|
title: '运营组',
|
|
7739
7782
|
dataIndex: 'groupName'
|
|
7740
|
-
}]
|
|
7783
|
+
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
7784
|
+
title: '状态',
|
|
7785
|
+
dataIndex: 'status',
|
|
7786
|
+
render: function render(text) {
|
|
7787
|
+
return getDictionaryTextByValue('SC00001', text);
|
|
7788
|
+
}
|
|
7789
|
+
}] : []))
|
|
7741
7790
|
}, modalTableBusProps);
|
|
7742
7791
|
}
|
|
7743
7792
|
// 仓库选择器(虚拟、渠道仓)(无弹窗)
|
|
@@ -8156,6 +8205,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
8156
8205
|
type: 'select',
|
|
8157
8206
|
label: '商店类型',
|
|
8158
8207
|
initialSource: shopFile2Type
|
|
8208
|
+
}, {
|
|
8209
|
+
name: 'qp-status-in',
|
|
8210
|
+
type: 'select',
|
|
8211
|
+
label: '商店状态',
|
|
8212
|
+
initialSource: shopFile2Status
|
|
8159
8213
|
}, {
|
|
8160
8214
|
name: 'qp-orgCode-in',
|
|
8161
8215
|
type: 'select',
|
|
@@ -8181,7 +8235,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
8181
8235
|
'qp-realOrg-eq': true,
|
|
8182
8236
|
'qp-status-eq': 10
|
|
8183
8237
|
})]).then(function (x) {
|
|
8184
|
-
formatSource(x, 0,
|
|
8238
|
+
formatSource(x, 0, 4, tableSearchForm);
|
|
8185
8239
|
});
|
|
8186
8240
|
modalTableProps = _objectSpread2({
|
|
8187
8241
|
modalTableTitle: '选择商店',
|
|
@@ -8201,6 +8255,15 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
8201
8255
|
return i.value === text;
|
|
8202
8256
|
})) === null || _shopFile2Type$find === void 0 ? void 0 : _shopFile2Type$find.text;
|
|
8203
8257
|
}
|
|
8258
|
+
}, {
|
|
8259
|
+
title: '启用状态',
|
|
8260
|
+
dataIndex: 'status',
|
|
8261
|
+
render: function render(text) {
|
|
8262
|
+
var _shopFile2Status$find;
|
|
8263
|
+
return (_shopFile2Status$find = shopFile2Status.find(function (i) {
|
|
8264
|
+
return i.value === text;
|
|
8265
|
+
})) === null || _shopFile2Status$find === void 0 ? void 0 : _shopFile2Status$find.text;
|
|
8266
|
+
}
|
|
8204
8267
|
}, {
|
|
8205
8268
|
title: '所属销售组织',
|
|
8206
8269
|
dataIndex: 'orgName'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 此文件用于 处理业务组件 所用到的公共方法
|
|
2
2
|
// @ts-nocheck
|
|
3
|
-
import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type } from './common';
|
|
3
|
+
import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status } from './common';
|
|
4
4
|
import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
|
|
5
5
|
import { handleTextOverflow, tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
|
|
6
6
|
import { getSkuImg } from '@/utils/TableUtils';
|
|
@@ -775,7 +775,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
775
775
|
mappingTextShowKeyField: 'physicalWarehouseCode',
|
|
776
776
|
mappingValueField: 'id',
|
|
777
777
|
otherParams: {
|
|
778
|
-
'qp-isEnable-eq': 1,
|
|
778
|
+
...(modalTableBusProps?.needStatusSearch?{}:{'qp-isEnable-eq': 1}),
|
|
779
779
|
sorter: 'desc-id'
|
|
780
780
|
}, // 默认参数
|
|
781
781
|
sourceName: 'warehouseIds',
|
|
@@ -799,6 +799,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
799
799
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
800
800
|
},
|
|
801
801
|
} },
|
|
802
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-isEnable-eq', type: 'select', label: '物理仓状态', initialSource: getDictionarySource('SC00001') }]:[])
|
|
802
803
|
]
|
|
803
804
|
Promise.all([
|
|
804
805
|
loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
|
|
@@ -826,6 +827,11 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
826
827
|
dataIndex: 'physicalWarehouseType',
|
|
827
828
|
render: (text: number) => getDictionaryTextByValue('SC00002', text),
|
|
828
829
|
},
|
|
830
|
+
...(modalTableBusProps?.needStatusSearch?[{
|
|
831
|
+
title: '状态',
|
|
832
|
+
dataIndex: 'isEnable',
|
|
833
|
+
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
834
|
+
}]:[]),
|
|
829
835
|
{
|
|
830
836
|
title: '所属公司',
|
|
831
837
|
dataIndex: 'companyName',
|
|
@@ -842,7 +848,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
842
848
|
mappingTextShowKeyField: 'realWarehouseCode',
|
|
843
849
|
mappingValueField: 'id',
|
|
844
850
|
otherParams: {
|
|
845
|
-
'qp-isEnable-eq': 1,
|
|
851
|
+
...(modalTableBusProps?.needStatusSearch?{}:{'qp-isEnable-eq': 1}),
|
|
846
852
|
sorter: 'desc-id'
|
|
847
853
|
}, // 默认参数
|
|
848
854
|
sourceName: 'warehouseIds',
|
|
@@ -852,6 +858,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
852
858
|
{ name: 'qp-realWarehouseName-like', label: '逻辑仓名称' },
|
|
853
859
|
{ name: 'qp-realWarehouseCode-like', label: '逻辑仓编码' },
|
|
854
860
|
{ name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
|
|
861
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-isEnable-eq', type: 'select', label: '逻辑仓状态', initialSource: getDictionarySource('SC00001') }]:[])
|
|
855
862
|
]
|
|
856
863
|
modalTableProps = {
|
|
857
864
|
modalTableTitle: '选择逻辑仓',
|
|
@@ -870,6 +877,11 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
870
877
|
dataIndex: 'realWarehouseType',
|
|
871
878
|
render: (text: number) => getDictionaryTextByValue('SC00004', text),
|
|
872
879
|
},
|
|
880
|
+
...(modalTableBusProps?.needStatusSearch?[{
|
|
881
|
+
title: '状态',
|
|
882
|
+
dataIndex: 'isEnable',
|
|
883
|
+
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
884
|
+
}]:[]),
|
|
873
885
|
],
|
|
874
886
|
...modalTableBusProps,
|
|
875
887
|
}
|
|
@@ -882,7 +894,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
882
894
|
mappingTextShowKeyField: 'operationWarehouseCode',
|
|
883
895
|
mappingValueField: 'operationWarehouseCode',
|
|
884
896
|
otherParams: {
|
|
885
|
-
'qp-status-eq': 1,
|
|
897
|
+
...(modalTableBusProps?.needStatusSearch?{}:{'qp-status-eq': 1}),
|
|
886
898
|
sorter: 'desc-id'
|
|
887
899
|
}, // 默认参数
|
|
888
900
|
sourceName: 'qp-operationWarehouseCode-in',
|
|
@@ -905,6 +917,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
905
917
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
906
918
|
},
|
|
907
919
|
} },
|
|
920
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[])
|
|
908
921
|
]
|
|
909
922
|
Promise.all([
|
|
910
923
|
loadSelectSource(`${prefixUrl.formSelectFix}/groupInfo/listNoPage`, { 'qp-status-eq': 1 }),
|
|
@@ -927,6 +940,11 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
927
940
|
title: '运营组',
|
|
928
941
|
dataIndex: 'groupName',
|
|
929
942
|
},
|
|
943
|
+
...(modalTableBusProps?.needStatusSearch?[{
|
|
944
|
+
title: '状态',
|
|
945
|
+
dataIndex: 'status',
|
|
946
|
+
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
947
|
+
}]:[]),
|
|
930
948
|
],
|
|
931
949
|
...modalTableBusProps,
|
|
932
950
|
}
|
|
@@ -1312,6 +1330,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1312
1330
|
{ name: 'qp-name-like', label: '商店名称' },
|
|
1313
1331
|
{ name: 'qp-code-like', label: '商店编码' },
|
|
1314
1332
|
{ name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
|
|
1333
|
+
{ name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
|
|
1315
1334
|
{ name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
|
|
1316
1335
|
type: 'select',
|
|
1317
1336
|
props: {
|
|
@@ -1334,7 +1353,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1334
1353
|
'qp-status-eq': 10
|
|
1335
1354
|
}),
|
|
1336
1355
|
]).then((x: any)=>{
|
|
1337
|
-
formatSource(x,0,
|
|
1356
|
+
formatSource(x,0, 4, tableSearchForm);
|
|
1338
1357
|
})
|
|
1339
1358
|
modalTableProps = {
|
|
1340
1359
|
modalTableTitle: '选择商店',
|
|
@@ -1353,6 +1372,11 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1353
1372
|
dataIndex: 'type',
|
|
1354
1373
|
render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
|
|
1355
1374
|
},
|
|
1375
|
+
{
|
|
1376
|
+
title: '启用状态',
|
|
1377
|
+
dataIndex: 'status',
|
|
1378
|
+
render: (text: number) => shopFile2Status.find((i: any) => i.value === text)?.text,
|
|
1379
|
+
},
|
|
1356
1380
|
{
|
|
1357
1381
|
title: '所属销售组织',
|
|
1358
1382
|
dataIndex: 'orgName',
|
|
@@ -28,6 +28,17 @@ const shopFile2Type = [
|
|
|
28
28
|
}
|
|
29
29
|
]
|
|
30
30
|
|
|
31
|
+
const shopFile2Status = [
|
|
32
|
+
{
|
|
33
|
+
text: "启用",
|
|
34
|
+
value: 10,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
text: "禁用",
|
|
38
|
+
value: 20,
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
|
|
31
42
|
const arrivalPaySupportList = [
|
|
32
43
|
{
|
|
33
44
|
text: "支持",
|
|
@@ -50,4 +61,4 @@ const sharingType = [
|
|
|
50
61
|
}
|
|
51
62
|
]
|
|
52
63
|
|
|
53
|
-
export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type }
|
|
64
|
+
export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status }
|
|
@@ -428,8 +428,9 @@ export default () => {
|
|
|
428
428
|
filterInit: 'qp-id-in'
|
|
429
429
|
},
|
|
430
430
|
// modalTableProps: {
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
// modalTableTitle: '选择物理仓-更改title测试',
|
|
432
|
+
// needModalTable: false
|
|
433
|
+
// needStatusSearch: true
|
|
433
434
|
// },
|
|
434
435
|
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
435
436
|
selectProps,
|
|
@@ -501,6 +502,9 @@ export default () => {
|
|
|
501
502
|
// sourceName: 'warehouseIds',
|
|
502
503
|
// },
|
|
503
504
|
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
505
|
+
// modalTableProps: {
|
|
506
|
+
// needStatusSearch: true
|
|
507
|
+
// },
|
|
504
508
|
selectProps,
|
|
505
509
|
selectBusinessType: 'realWarehouse',
|
|
506
510
|
};
|
|
@@ -559,6 +563,9 @@ export default () => {
|
|
|
559
563
|
setValue(value)
|
|
560
564
|
},
|
|
561
565
|
selectProps,
|
|
566
|
+
modalTableProps: {
|
|
567
|
+
needStatusSearch: true
|
|
568
|
+
},
|
|
562
569
|
selectBusinessType: 'ownerWarehouse',
|
|
563
570
|
};
|
|
564
571
|
|
|
@@ -39,6 +39,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
39
39
|
mappingTextShowTextField,
|
|
40
40
|
init = true,// 是否初始请求
|
|
41
41
|
extralHeaders = {},// 额外请求头参数
|
|
42
|
+
specialBracket = false,// 是否使用特殊括弧显示选项 【value】text
|
|
42
43
|
} = requestConfig || {};
|
|
43
44
|
const resultSourceKey = handleSourceName(sourceName || requestConfig?.sourceName || 'supplierCode')
|
|
44
45
|
|
|
@@ -311,7 +312,9 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
311
312
|
}
|
|
312
313
|
return {
|
|
313
314
|
...item,
|
|
314
|
-
text:
|
|
315
|
+
text: specialBracket
|
|
316
|
+
? `【${item[mappingValueField]}】${item[mappingTextField]}`
|
|
317
|
+
: item[mappingTextField],
|
|
315
318
|
textShowText,
|
|
316
319
|
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
317
320
|
value: item[mappingValueField],
|
|
@@ -332,7 +335,9 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
332
335
|
}
|
|
333
336
|
return {
|
|
334
337
|
...item,
|
|
335
|
-
text:
|
|
338
|
+
text: specialBracket
|
|
339
|
+
? `【${item[mappingValueField]}】${item[mappingTextField]}`
|
|
340
|
+
: item[mappingTextField],
|
|
336
341
|
textShowText,
|
|
337
342
|
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
338
343
|
value: item[mappingValueField],
|
|
@@ -538,13 +543,13 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
538
543
|
const {
|
|
539
544
|
filterTxt, text,
|
|
540
545
|
} = props
|
|
541
|
-
const heightLightTxt = (
|
|
546
|
+
const heightLightTxt = (text, heightTxt) => {
|
|
542
547
|
if (heightTxt === '') {
|
|
543
|
-
return
|
|
548
|
+
return text
|
|
544
549
|
}
|
|
545
550
|
// 前面filterOption 不区分大小写,这里用i
|
|
546
551
|
const regexp = new RegExp(heightTxt, 'gi')
|
|
547
|
-
return
|
|
552
|
+
return text.replace(regexp, `<span style="color:red">${heightTxt}</span>`)
|
|
548
553
|
}
|
|
549
554
|
return (
|
|
550
555
|
<Tooltip title={text}>
|
|
@@ -725,6 +730,14 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
725
730
|
)
|
|
726
731
|
}
|
|
727
732
|
|
|
733
|
+
const handleSelectOptionsShowValue = (specialBracket: boolean, item: object) => {
|
|
734
|
+
let showText = Array.isArray(item.textShowText) &&
|
|
735
|
+
item.textShowText.join(' ') || item.textShowText;
|
|
736
|
+
return specialBracket
|
|
737
|
+
? `【${item.textShowKey}】${showText}`
|
|
738
|
+
: `${item.textShowKey} ${showText}`
|
|
739
|
+
};
|
|
740
|
+
|
|
728
741
|
return (
|
|
729
742
|
<div className={'search_select'}>
|
|
730
743
|
{fieldComponent ?
|
|
@@ -774,7 +787,10 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
774
787
|
>
|
|
775
788
|
{items.map(item => (
|
|
776
789
|
<Option key={item.value} label={item.text}>
|
|
777
|
-
{LightHeightOption({
|
|
790
|
+
{LightHeightOption({
|
|
791
|
+
text: handleSelectOptionsShowValue(specialBracket, item),
|
|
792
|
+
filterTxt: searchValue
|
|
793
|
+
})}
|
|
778
794
|
</Option>
|
|
779
795
|
))}
|
|
780
796
|
</Select>
|