@bit-sun/business-component 1.2.3 → 2.0.0
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/.umirc.ts +31 -16
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
- package/dist/components/Business/SearchSelect/common.d.ts +5 -1
- package/dist/components/Business/SearchSelect/utils.d.ts +2 -1
- package/dist/index.esm.js +183 -21
- package/dist/index.js +183 -21
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.ts +83 -6
- package/src/components/Business/SearchSelect/common.ts +20 -1
- package/src/components/Business/SearchSelect/index.md +60 -30
- package/src/components/Business/SearchSelect/index.tsx +2 -1
- package/src/components/Business/SearchSelect/utils.ts +27 -2
- package/src/components/Functional/SearchSelect/index.tsx +24 -7
- package/src/index.ts +1 -0
package/.umirc.ts
CHANGED
|
@@ -26,33 +26,48 @@ export default defineConfig({
|
|
|
26
26
|
],
|
|
27
27
|
proxy: {
|
|
28
28
|
'/bop/api/': {
|
|
29
|
-
//
|
|
30
|
-
target: '
|
|
31
|
-
//
|
|
32
|
-
// target: 'http://
|
|
33
|
-
// target: 'http://test.i-baby.net/', // 测试环境
|
|
29
|
+
// target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
|
|
30
|
+
target: 'https://test.i-baby.net/', // 测试环境
|
|
31
|
+
// target: 'http://yxzttest.yangzijiang.com/', // 扬子江测试环境
|
|
32
|
+
// target: 'http://yxzt.yangzijiang.com/', // 扬子江测试环境
|
|
34
33
|
changeOrigin: true,
|
|
35
|
-
pathRewrite: { '^/bop/api/': '/bop/' },
|
|
34
|
+
// pathRewrite: { '^/bop/api/': '/bop/' }, // 开发环境
|
|
36
35
|
},
|
|
37
36
|
'/wms-ops/': {
|
|
37
|
+
// target: 'http://yxzttest.yangzijiang.com/', // 测试环境
|
|
38
|
+
// target: 'http://yxzt.yangzijiang.com/', // 测试环境
|
|
38
39
|
// bop
|
|
39
|
-
target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
|
|
40
|
+
// target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
|
|
40
41
|
// 英伦
|
|
41
42
|
// target: 'http://47.100.87.54:9102/', // 开发环境
|
|
42
|
-
|
|
43
|
+
target: 'http://test.i-baby.net/', // 测试环境
|
|
44
|
+
// target: 'http://www.i-baby.net/', // 生产
|
|
45
|
+
changeOrigin: true,
|
|
46
|
+
// pathRewrite: { '^/wms-ops/': '/wms-ops/' }, // 开发环境
|
|
47
|
+
},
|
|
48
|
+
'/user/': {
|
|
49
|
+
target: 'http://omni.bitsun-inc.com/', // 开发环境
|
|
50
|
+
changeOrigin: true,
|
|
51
|
+
},
|
|
52
|
+
'/channel-manage/': {
|
|
53
|
+
target: 'http://omni.bitsun-inc.com/', // 开发环境
|
|
54
|
+
changeOrigin: true,
|
|
55
|
+
},
|
|
56
|
+
'/items/': {
|
|
57
|
+
target: 'http://omni.bitsun-inc.com/', // 开发环境
|
|
58
|
+
changeOrigin: true,
|
|
59
|
+
},
|
|
60
|
+
'/stock/': {
|
|
61
|
+
target: 'http://omni.bitsun-inc.com/', // 开发环境
|
|
43
62
|
changeOrigin: true,
|
|
44
|
-
pathRewrite: { '^/bop/api/': '/bop/' },
|
|
45
63
|
},
|
|
46
|
-
'/
|
|
47
|
-
target: 'http://bitsun
|
|
64
|
+
'/basic/': {
|
|
65
|
+
target: 'http://omni.bitsun-inc.com/', // 开发环境
|
|
48
66
|
changeOrigin: true,
|
|
49
|
-
pathRewrite: { '^/user/api/': '/' }, // 开发环境
|
|
50
67
|
},
|
|
51
|
-
'/
|
|
52
|
-
target: 'http://bitsun
|
|
53
|
-
// target: 'http://172.16.0.26:8033/channel-manage/',
|
|
68
|
+
'/srm-ops/': {
|
|
69
|
+
target: 'http://omni.bitsun-inc.com/', // 开发环境
|
|
54
70
|
changeOrigin: true,
|
|
55
|
-
pathRewrite: { '^/channel/api/': '/' }, // 开发环境
|
|
56
71
|
},
|
|
57
72
|
},
|
|
58
73
|
// more config: https://d.umijs.org/config
|
|
@@ -2,6 +2,10 @@ declare const shopFileType: {
|
|
|
2
2
|
text: string;
|
|
3
3
|
value: string;
|
|
4
4
|
}[];
|
|
5
|
+
declare const shopFile2Type: {
|
|
6
|
+
text: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
5
9
|
declare const arrivalPaySupportList: {
|
|
6
10
|
text: string;
|
|
7
11
|
value: number;
|
|
@@ -10,4 +14,4 @@ declare const sharingType: {
|
|
|
10
14
|
text: string;
|
|
11
15
|
value: string;
|
|
12
16
|
}[];
|
|
13
|
-
export { shopFileType, arrivalPaySupportList, sharingType };
|
|
17
|
+
export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const getDictionarySource: (dicCode: string, needConvertInterger?: boolean) => {};
|
|
2
2
|
declare const getDictionaryTextByValue: (dicCode: string, value: string | number) => any;
|
|
3
3
|
declare const loadSelectSource: (url: string, params?: any) => Promise<unknown>;
|
|
4
|
-
|
|
4
|
+
declare const handleDefaultPrefixUrl: (type: string) => string;
|
|
5
|
+
export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl };
|
package/dist/index.esm.js
CHANGED
|
@@ -3072,6 +3072,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3072
3072
|
|
|
3073
3073
|
var currentPage = 1;
|
|
3074
3074
|
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
3075
|
+
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
3075
3076
|
|
|
3076
3077
|
var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
|
|
3077
3078
|
// 以下属性不可更改----设计配置项
|
|
@@ -3128,7 +3129,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3128
3129
|
var searchParams = {};
|
|
3129
3130
|
|
|
3130
3131
|
if (typeof selectParamsKey === 'string') {
|
|
3131
|
-
searchParams = _defineProperty({},
|
|
3132
|
+
searchParams = v ? _defineProperty({}, selectParamsInitKey, initVal) : _defineProperty({}, selectParamsKey, searchValue);
|
|
3132
3133
|
}
|
|
3133
3134
|
|
|
3134
3135
|
if (Array.isArray(selectParamsKey)) {
|
|
@@ -3323,10 +3324,12 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3323
3324
|
}, otherParams), fixedParam), params);
|
|
3324
3325
|
|
|
3325
3326
|
axios.get("".concat(url, "?").concat(stringify(queryParams))).then(function (result) {
|
|
3327
|
+
var _result, _result2;
|
|
3328
|
+
|
|
3326
3329
|
setFetching(false);
|
|
3327
3330
|
result = result.data;
|
|
3328
3331
|
|
|
3329
|
-
if (result.status !== '0') {
|
|
3332
|
+
if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
|
|
3330
3333
|
message.error(result.msg);
|
|
3331
3334
|
return;
|
|
3332
3335
|
}
|
|
@@ -3448,7 +3451,6 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3448
3451
|
useEffect(function () {
|
|
3449
3452
|
if (value) {
|
|
3450
3453
|
setPopValue(value);
|
|
3451
|
-
onChange(value);
|
|
3452
3454
|
}
|
|
3453
3455
|
}, [value]);
|
|
3454
3456
|
useEffect(function () {
|
|
@@ -3517,9 +3519,9 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3517
3519
|
if (labelInValue) {
|
|
3518
3520
|
var formatResult = value.map(function (i) {
|
|
3519
3521
|
return {
|
|
3520
|
-
key: i
|
|
3521
|
-
label: i
|
|
3522
|
-
value: i
|
|
3522
|
+
key: i[mappingValueField],
|
|
3523
|
+
label: i[mappingTextField],
|
|
3524
|
+
value: i[mappingValueField]
|
|
3523
3525
|
};
|
|
3524
3526
|
});
|
|
3525
3527
|
onChange(selectMode ? formatResult : formatResult[0]);
|
|
@@ -3698,6 +3700,11 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3698
3700
|
selectedRowKeys: selectedRowKeys,
|
|
3699
3701
|
onChange: function onChange(sks, srs) {
|
|
3700
3702
|
onChangeSelectedKeys(sks, srs);
|
|
3703
|
+
},
|
|
3704
|
+
getCheckboxProps: function getCheckboxProps() {
|
|
3705
|
+
return {
|
|
3706
|
+
disabled: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled)
|
|
3707
|
+
};
|
|
3701
3708
|
}
|
|
3702
3709
|
};
|
|
3703
3710
|
|
|
@@ -3718,7 +3725,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3718
3725
|
var formItem = function formItem(list) {
|
|
3719
3726
|
if (isModalVisible && (list === null || list === void 0 ? void 0 : list.length)) {
|
|
3720
3727
|
return list.map(function (i) {
|
|
3721
|
-
var _i$field, _i$field3, _i$field5;
|
|
3728
|
+
var _i$field, _i$field3, _i$field5, _i$field6, _i$field7;
|
|
3722
3729
|
|
|
3723
3730
|
if ((i === null || i === void 0 ? void 0 : i.type) === 'select' || (i === null || i === void 0 ? void 0 : (_i$field = i.field) === null || _i$field === void 0 ? void 0 : _i$field.type) === 'select') {
|
|
3724
3731
|
var _i$field2, _i$initialSource;
|
|
@@ -3755,12 +3762,24 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3755
3762
|
}, i === null || i === void 0 ? void 0 : (_i$field4 = i.field) === null || _i$field4 === void 0 ? void 0 : _i$field4.props)));
|
|
3756
3763
|
}
|
|
3757
3764
|
|
|
3758
|
-
if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect') {
|
|
3765
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'businessSearchSelect' || (i === null || i === void 0 ? void 0 : (_i$field5 = i.field) === null || _i$field5 === void 0 ? void 0 : _i$field5.type) === 'businessSearchSelect') {
|
|
3759
3766
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
3760
3767
|
name: i.name,
|
|
3761
3768
|
label: i.label,
|
|
3762
3769
|
key: i.name
|
|
3763
3770
|
}, /*#__PURE__*/React.createElement(BusinessSearchSelect$1, _objectSpread2({}, i.field.props))));
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
if ((i === null || i === void 0 ? void 0 : i.type) === 'multipleQueryInput' || (i === null || i === void 0 ? void 0 : (_i$field6 = i.field) === null || _i$field6 === void 0 ? void 0 : _i$field6.type) === 'multipleQueryInput') {
|
|
3774
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
3775
|
+
name: i.name,
|
|
3776
|
+
label: i.label,
|
|
3777
|
+
key: i.name
|
|
3778
|
+
}, /*#__PURE__*/React.createElement(QueryMutipleInput, {
|
|
3779
|
+
onValueChange: function onValueChange(value) {
|
|
3780
|
+
form.setFieldsValue(_defineProperty({}, i.name, value));
|
|
3781
|
+
}
|
|
3782
|
+
})));
|
|
3764
3783
|
} // 默认type是input
|
|
3765
3784
|
|
|
3766
3785
|
|
|
@@ -3775,7 +3794,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3775
3794
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
3776
3795
|
allowClear: true,
|
|
3777
3796
|
maxLength: 100
|
|
3778
|
-
}, i === null || i === void 0 ? void 0 : (_i$
|
|
3797
|
+
}, i === null || i === void 0 ? void 0 : (_i$field7 = i.field) === null || _i$field7 === void 0 ? void 0 : _i$field7.props)));
|
|
3779
3798
|
});
|
|
3780
3799
|
} else {
|
|
3781
3800
|
return null;
|
|
@@ -3970,7 +3989,8 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3970
3989
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
3971
3990
|
indeterminate: indeterminate,
|
|
3972
3991
|
checked: checkedAll,
|
|
3973
|
-
onChange: onChangeCheckAll
|
|
3992
|
+
onChange: onChangeCheckAll,
|
|
3993
|
+
disabled: (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled)
|
|
3974
3994
|
}), " \u5168\u9009\u6240\u6709\u9875\u9762") : '')))));
|
|
3975
3995
|
};
|
|
3976
3996
|
|
|
@@ -3981,6 +4001,19 @@ var shopFileType = [{
|
|
|
3981
4001
|
text: "线下",
|
|
3982
4002
|
value: 'offline'
|
|
3983
4003
|
}];
|
|
4004
|
+
var shopFile2Type = [{
|
|
4005
|
+
text: "第三方线上",
|
|
4006
|
+
value: 'online'
|
|
4007
|
+
}, {
|
|
4008
|
+
text: "线下",
|
|
4009
|
+
value: 'offline'
|
|
4010
|
+
}, {
|
|
4011
|
+
text: "自营B2B",
|
|
4012
|
+
value: 'B2B'
|
|
4013
|
+
}, {
|
|
4014
|
+
text: "自营B2C",
|
|
4015
|
+
value: 'B2C'
|
|
4016
|
+
}];
|
|
3984
4017
|
var arrivalPaySupportList = [{
|
|
3985
4018
|
text: "支持",
|
|
3986
4019
|
value: 1
|
|
@@ -4047,11 +4080,11 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
|
|
|
4047
4080
|
var loadSelectSource = function loadSelectSource(url, params) {
|
|
4048
4081
|
return new Promise(function (resolve, reject) {
|
|
4049
4082
|
axios.get("".concat(url, "?").concat(stringify(params))).then(function (result) {
|
|
4050
|
-
var _result;
|
|
4083
|
+
var _result, _result2;
|
|
4051
4084
|
|
|
4052
4085
|
result = result.data;
|
|
4053
4086
|
|
|
4054
|
-
if (result.status && result.status !== '0' || ((
|
|
4087
|
+
if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
|
|
4055
4088
|
message.error(result.msg);
|
|
4056
4089
|
return;
|
|
4057
4090
|
}
|
|
@@ -4063,6 +4096,48 @@ var loadSelectSource = function loadSelectSource(url, params) {
|
|
|
4063
4096
|
});
|
|
4064
4097
|
};
|
|
4065
4098
|
|
|
4099
|
+
var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
|
|
4100
|
+
var result;
|
|
4101
|
+
|
|
4102
|
+
switch (type) {
|
|
4103
|
+
case 'supplier2':
|
|
4104
|
+
case 'customer2':
|
|
4105
|
+
case 'shopFile2':
|
|
4106
|
+
result = '/channel-manage';
|
|
4107
|
+
break;
|
|
4108
|
+
|
|
4109
|
+
case 'skuCommodity':
|
|
4110
|
+
case 'skuPropertyValue':
|
|
4111
|
+
case 'spuCommodity':
|
|
4112
|
+
result = '/items';
|
|
4113
|
+
break;
|
|
4114
|
+
|
|
4115
|
+
case 'physicalWarehouse':
|
|
4116
|
+
case 'realWarehouse':
|
|
4117
|
+
case 'virtualWarehouse':
|
|
4118
|
+
case 'channelWarehouse':
|
|
4119
|
+
result = '/stock';
|
|
4120
|
+
break;
|
|
4121
|
+
|
|
4122
|
+
case 'inventoryOrg2':
|
|
4123
|
+
case 'purchaseOrg':
|
|
4124
|
+
case 'salesOrg':
|
|
4125
|
+
case 'employee2':
|
|
4126
|
+
result = '/user';
|
|
4127
|
+
break;
|
|
4128
|
+
|
|
4129
|
+
case 'deliveryMode':
|
|
4130
|
+
result = '/basic';
|
|
4131
|
+
break;
|
|
4132
|
+
|
|
4133
|
+
default:
|
|
4134
|
+
result = '/bop/api';
|
|
4135
|
+
break;
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
return result;
|
|
4139
|
+
};
|
|
4140
|
+
|
|
4066
4141
|
var _getDictionarySource;
|
|
4067
4142
|
var hasDictSharingType = (_getDictionarySource = getDictionarySource('UC000013')) === null || _getDictionarySource === void 0 ? void 0 : _getDictionarySource.length;
|
|
4068
4143
|
var sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType;
|
|
@@ -4090,7 +4165,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
4090
4165
|
|
|
4091
4166
|
var resKeyValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ['code', 'name'];
|
|
4092
4167
|
var data = reData && ((_reData$position = reData[position]) === null || _reData$position === void 0 ? void 0 : _reData$position.data);
|
|
4093
|
-
var list = Array.isArray(data) ? data : (data === null || data === void 0 ? void 0 : data.items) || (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
4168
|
+
var list = Array.isArray(data) ? data : (data === null || data === void 0 ? void 0 : data.items) || (data === null || data === void 0 ? void 0 : data.list) || (data === null || data === void 0 ? void 0 : data.children) || [];
|
|
4094
4169
|
var formatData = (list === null || list === void 0 ? void 0 : list.length) ? list.map(function (v) {
|
|
4095
4170
|
return {
|
|
4096
4171
|
text: v[resKeyValue[1]],
|
|
@@ -4137,7 +4212,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
4137
4212
|
tableColumns: []
|
|
4138
4213
|
}, modalTableBusProps);
|
|
4139
4214
|
|
|
4140
|
-
var needModalTable = true; // 供应商选择器
|
|
4215
|
+
var needModalTable = (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needModalTable) !== undefined ? modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needModalTable : true; // 供应商选择器
|
|
4141
4216
|
|
|
4142
4217
|
if (type === 'supplier') {
|
|
4143
4218
|
tableSearchForm = [{
|
|
@@ -4337,7 +4412,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
4337
4412
|
mappingTextShowTextField: ['name', 'propertyNameAndValue'],
|
|
4338
4413
|
otherParams: {
|
|
4339
4414
|
'qp-approveStatus-eq': 1,
|
|
4340
|
-
'qp-type-eq': 10,
|
|
4415
|
+
// 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
|
|
4341
4416
|
sorter: 'desc-id'
|
|
4342
4417
|
},
|
|
4343
4418
|
sourceName: 'skuCode'
|
|
@@ -4349,8 +4424,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
4349
4424
|
name: 'qp-name-like',
|
|
4350
4425
|
label: 'SKU名称'
|
|
4351
4426
|
}, {
|
|
4352
|
-
name: 'qp-skuCode-
|
|
4353
|
-
label: 'SKU编码'
|
|
4427
|
+
name: 'qp-skuCode-in',
|
|
4428
|
+
label: 'SKU编码',
|
|
4429
|
+
field: {
|
|
4430
|
+
type: 'multipleQueryInput',
|
|
4431
|
+
props: _objectSpread2({}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuCodeValueRequestConfig) || {})
|
|
4432
|
+
}
|
|
4354
4433
|
}, requestConfig.url.includes('v2') ? {
|
|
4355
4434
|
name: 'qp-code-like',
|
|
4356
4435
|
label: '国际条码'
|
|
@@ -4450,8 +4529,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
4450
4529
|
name: 'qp-name-like',
|
|
4451
4530
|
label: 'SKU名称'
|
|
4452
4531
|
}, {
|
|
4453
|
-
name: 'qp-skuCode-
|
|
4454
|
-
label: 'SKU编码'
|
|
4532
|
+
name: 'qp-skuCode-in',
|
|
4533
|
+
label: 'SKU编码',
|
|
4534
|
+
field: {
|
|
4535
|
+
type: 'multipleQueryInput',
|
|
4536
|
+
props: _objectSpread2({}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuCodeValueRequestConfig) || {})
|
|
4537
|
+
}
|
|
4455
4538
|
}, {
|
|
4456
4539
|
name: 'qp-barCode-like',
|
|
4457
4540
|
label: '国际条码'
|
|
@@ -4899,6 +4982,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
4899
4982
|
mappingTextField: 'name',
|
|
4900
4983
|
mappingValueField: 'code',
|
|
4901
4984
|
otherParams: {
|
|
4985
|
+
'qp-status-eq': 10,
|
|
4902
4986
|
sorter: 'desc-id'
|
|
4903
4987
|
},
|
|
4904
4988
|
sourceName: 'customCode'
|
|
@@ -5254,6 +5338,83 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
5254
5338
|
dataIndex: 'accountingName'
|
|
5255
5339
|
}]
|
|
5256
5340
|
}, modalTableBusProps);
|
|
5341
|
+
}
|
|
5342
|
+
|
|
5343
|
+
if (type === 'shopFile2') {
|
|
5344
|
+
var _JSON$parse, _JSON$parse$employeeR;
|
|
5345
|
+
|
|
5346
|
+
requestConfig = _objectSpread2({
|
|
5347
|
+
url: "".concat(prefixUrl.selectPrefix, "/store/page"),
|
|
5348
|
+
filter: 'qp-name,code-orGroup,like',
|
|
5349
|
+
mappingTextField: 'name',
|
|
5350
|
+
mappingValueField: 'code',
|
|
5351
|
+
otherParams: {
|
|
5352
|
+
sorter: 'desc-id'
|
|
5353
|
+
},
|
|
5354
|
+
sourceName: 'code'
|
|
5355
|
+
}, requestConfigProp);
|
|
5356
|
+
tableSearchForm = [{
|
|
5357
|
+
name: 'qp-name-like',
|
|
5358
|
+
label: '商店名称'
|
|
5359
|
+
}, {
|
|
5360
|
+
name: 'qp-code-like',
|
|
5361
|
+
label: '商店编码'
|
|
5362
|
+
}, {
|
|
5363
|
+
name: 'qp-type-in',
|
|
5364
|
+
type: 'select',
|
|
5365
|
+
label: '商店类型',
|
|
5366
|
+
initialSource: shopFile2Type
|
|
5367
|
+
}, {
|
|
5368
|
+
name: 'qp-orgCode-in',
|
|
5369
|
+
type: 'select',
|
|
5370
|
+
label: '所属销售组织',
|
|
5371
|
+
field: {
|
|
5372
|
+
type: 'select',
|
|
5373
|
+
props: {
|
|
5374
|
+
mode: 'multiple',
|
|
5375
|
+
notFoundContent: '暂无数据',
|
|
5376
|
+
allowClear: true,
|
|
5377
|
+
showSearch: true,
|
|
5378
|
+
showArrow: true,
|
|
5379
|
+
maxTagCount: 1,
|
|
5380
|
+
optionFilterProp: 'children',
|
|
5381
|
+
filterOption: function filterOption(input, option) {
|
|
5382
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
5383
|
+
}
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
}];
|
|
5387
|
+
Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/orgView/getTree/sales-organizational-view"), {
|
|
5388
|
+
'qp-employeeCode-eq': (_JSON$parse = JSON.parse(localStorage.getItem('userInfo') || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$employeeR = _JSON$parse.employeeResVo) === null || _JSON$parse$employeeR === void 0 ? void 0 : _JSON$parse$employeeR.employeeNumber,
|
|
5389
|
+
'qp-realOrg-eq': true,
|
|
5390
|
+
'qp-status-eq': 10
|
|
5391
|
+
})]).then(function (x) {
|
|
5392
|
+
formatSource(x, 0, 3, tableSearchForm);
|
|
5393
|
+
});
|
|
5394
|
+
modalTableProps = _objectSpread2({
|
|
5395
|
+
modalTableTitle: '选择商店',
|
|
5396
|
+
tableSearchForm: tableSearchForm,
|
|
5397
|
+
tableColumns: [{
|
|
5398
|
+
title: '商店编码',
|
|
5399
|
+
dataIndex: 'code'
|
|
5400
|
+
}, {
|
|
5401
|
+
title: '商店名称',
|
|
5402
|
+
dataIndex: 'name'
|
|
5403
|
+
}, {
|
|
5404
|
+
title: '商店类型',
|
|
5405
|
+
dataIndex: 'type',
|
|
5406
|
+
render: function render(text) {
|
|
5407
|
+
var _shopFile2Type$find;
|
|
5408
|
+
|
|
5409
|
+
return (_shopFile2Type$find = shopFile2Type.find(function (i) {
|
|
5410
|
+
return i.value === text;
|
|
5411
|
+
})) === null || _shopFile2Type$find === void 0 ? void 0 : _shopFile2Type$find.text;
|
|
5412
|
+
}
|
|
5413
|
+
}, {
|
|
5414
|
+
title: '所属销售组织',
|
|
5415
|
+
dataIndex: 'orgName'
|
|
5416
|
+
}]
|
|
5417
|
+
}, modalTableBusProps);
|
|
5257
5418
|
} // 核算主体选择器(无弹窗)
|
|
5258
5419
|
|
|
5259
5420
|
|
|
@@ -5581,8 +5742,8 @@ var MemoSearchSelect = /*#__PURE__*/React.memo(SearchSelect);
|
|
|
5581
5742
|
var BusinessSearchSelect = function BusinessSearchSelect(props) {
|
|
5582
5743
|
var businessType = (props === null || props === void 0 ? void 0 : props.selectBusinessType) || 'supplier';
|
|
5583
5744
|
var prefixUrl = (props === null || props === void 0 ? void 0 : props.prefixUrl) || {
|
|
5584
|
-
selectPrefix:
|
|
5585
|
-
formSelectFix:
|
|
5745
|
+
selectPrefix: handleDefaultPrefixUrl(businessType),
|
|
5746
|
+
formSelectFix: handleDefaultPrefixUrl(businessType)
|
|
5586
5747
|
};
|
|
5587
5748
|
|
|
5588
5749
|
var _commonFun = commonFun(businessType, prefixUrl, (props === null || props === void 0 ? void 0 : props.requestConfig) || {}, (props === null || props === void 0 ? void 0 : props.modalTableProps) || {}),
|
|
@@ -5756,5 +5917,6 @@ function getStorageVale(storageKeyString) {
|
|
|
5756
5917
|
|
|
5757
5918
|
var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
|
|
5758
5919
|
axios.defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
5920
|
+
axios.defaults.headers.common['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
|
|
5759
5921
|
|
|
5760
5922
|
export { BusinessSearchSelect$1 as BusinessSearchSelect, index as CheckOneUser, CommodityEntry, DataImport, DataValidation, QueryMutipleInput, SearchSelect };
|