@bit-sun/business-component 4.2.0-alpha.3 → 4.2.0-alpha.4
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
|
@@ -188,8 +188,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
188
188
|
r,
|
|
189
189
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
190
190
|
if (Object.getOwnPropertySymbols) {
|
|
191
|
-
var
|
|
192
|
-
for (r = 0; r <
|
|
191
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
192
|
+
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
193
193
|
}
|
|
194
194
|
return i;
|
|
195
195
|
}
|
|
@@ -197,7 +197,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
197
197
|
if (null == r) return {};
|
|
198
198
|
var t = {};
|
|
199
199
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
200
|
-
if (
|
|
200
|
+
if (e.includes(n)) continue;
|
|
201
201
|
t[n] = r[n];
|
|
202
202
|
}
|
|
203
203
|
return t;
|
|
@@ -5515,7 +5515,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5515
5515
|
};
|
|
5516
5516
|
var tableInitPagination = _objectSpread2(_objectSpread2({}, initPagination), {}, {
|
|
5517
5517
|
total: 0,
|
|
5518
|
-
current: 1
|
|
5518
|
+
current: 1,
|
|
5519
|
+
pageSizeOptions: [10, 20, 50, 100, 500, 1000]
|
|
5519
5520
|
});
|
|
5520
5521
|
var disabled = !!noOperate || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled);
|
|
5521
5522
|
var isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
@@ -9993,8 +9994,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
9993
9994
|
});
|
|
9994
9995
|
};
|
|
9995
9996
|
// 格式化树选择器数据源
|
|
9996
|
-
var _mapSearchTree = function mapSearchTree(treeDataItem, resKeyValue, disabledJudge) {
|
|
9997
|
-
var haveChildren = Array.isArray(treeDataItem
|
|
9997
|
+
var _mapSearchTree = function mapSearchTree(treeDataItem, resKeyValue, disabledJudge, childrenKey) {
|
|
9998
|
+
var haveChildren = Array.isArray(treeDataItem[childrenKey]) && treeDataItem[childrenKey].length > 0;
|
|
9998
9999
|
return {
|
|
9999
10000
|
title: treeDataItem[resKeyValue[1]],
|
|
10000
10001
|
value: treeDataItem[resKeyValue[0]],
|
|
@@ -10002,14 +10003,15 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10002
10003
|
data: _objectSpread2({}, treeDataItem),
|
|
10003
10004
|
isLeaf: !haveChildren,
|
|
10004
10005
|
disabled: disabledJudge !== undefined ? disabledJudge : haveChildren,
|
|
10005
|
-
children: haveChildren ? treeDataItem.
|
|
10006
|
-
return _mapSearchTree(i, resKeyValue, disabledJudge);
|
|
10006
|
+
children: haveChildren ? treeDataItem[childrenKey].map(function (i) {
|
|
10007
|
+
return _mapSearchTree(i, resKeyValue, disabledJudge, childrenKey);
|
|
10007
10008
|
}) : []
|
|
10008
10009
|
};
|
|
10009
10010
|
};
|
|
10010
10011
|
var formatTreeDataSource = function formatTreeDataSource(reData, position, changePosition, changeSearchForm) {
|
|
10011
10012
|
var _reData$position2;
|
|
10012
10013
|
var resKeyValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ['id', 'name'];
|
|
10014
|
+
var childrenKey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'children';
|
|
10013
10015
|
var data = reData && ((_reData$position2 = reData[position]) === null || _reData$position2 === void 0 ? void 0 : _reData$position2.data);
|
|
10014
10016
|
var disabledJudge;
|
|
10015
10017
|
if (data && _typeof(data) === 'object' && !Array.isArray(data) && Object.keys(data).length > 0) {
|
|
@@ -10017,7 +10019,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10017
10019
|
disabledJudge = false;
|
|
10018
10020
|
}
|
|
10019
10021
|
var formatData = data && Array.isArray(data) && data.length && data.map(function (ites) {
|
|
10020
|
-
return _mapSearchTree(ites, resKeyValue, disabledJudge);
|
|
10022
|
+
return _mapSearchTree(ites, resKeyValue, disabledJudge, childrenKey);
|
|
10021
10023
|
}) || [];
|
|
10022
10024
|
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
10023
10025
|
};
|
|
@@ -11854,7 +11856,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11854
11856
|
mappingTextField: 'name',
|
|
11855
11857
|
mappingValueField: 'code',
|
|
11856
11858
|
otherParams: _objectSpread2({
|
|
11857
|
-
sorter: 'desc-id'
|
|
11859
|
+
sorter: 'desc-id',
|
|
11860
|
+
'qp-status-in': 10
|
|
11858
11861
|
}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.addOtherParams) || {}),
|
|
11859
11862
|
sourceName: 'code'
|
|
11860
11863
|
}, requestConfigProp);
|
|
@@ -11871,12 +11874,9 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11871
11874
|
type: 'select',
|
|
11872
11875
|
label: '商店类型',
|
|
11873
11876
|
initialSource: shopFile2Type
|
|
11874
|
-
},
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
label: '商店状态',
|
|
11878
|
-
initialSource: shopFile2Status
|
|
11879
|
-
}, {
|
|
11877
|
+
},
|
|
11878
|
+
// { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
|
|
11879
|
+
{
|
|
11880
11880
|
name: 'qp-orgCode-in',
|
|
11881
11881
|
type: 'select',
|
|
11882
11882
|
label: '所属销售组织',
|
|
@@ -11895,6 +11895,76 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11895
11895
|
}
|
|
11896
11896
|
}
|
|
11897
11897
|
}
|
|
11898
|
+
}, {
|
|
11899
|
+
name: 'qp-channelCode-in',
|
|
11900
|
+
type: 'treeSelect',
|
|
11901
|
+
label: '所属销售渠道',
|
|
11902
|
+
field: {
|
|
11903
|
+
type: 'treeSelect',
|
|
11904
|
+
props: {
|
|
11905
|
+
multiple: true,
|
|
11906
|
+
treeData: [],
|
|
11907
|
+
treeCheckable: false,
|
|
11908
|
+
notFoundContent: '暂无数据',
|
|
11909
|
+
allowClear: true,
|
|
11910
|
+
showSearch: true,
|
|
11911
|
+
showArrow: true,
|
|
11912
|
+
maxTagCount: 1,
|
|
11913
|
+
optionFilterProp: 'children',
|
|
11914
|
+
filterOption: function filterOption(input, option) {
|
|
11915
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11916
|
+
},
|
|
11917
|
+
disabledJude: function disabledJude(data) {
|
|
11918
|
+
return data['parentCode'] === '0';
|
|
11919
|
+
},
|
|
11920
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11921
|
+
}
|
|
11922
|
+
}
|
|
11923
|
+
}, {
|
|
11924
|
+
name: 'qp-commonRelationAreaCode-in',
|
|
11925
|
+
type: 'treeSelect',
|
|
11926
|
+
label: '营销区域',
|
|
11927
|
+
field: {
|
|
11928
|
+
type: 'treeSelect',
|
|
11929
|
+
props: {
|
|
11930
|
+
multiple: true,
|
|
11931
|
+
treeData: [],
|
|
11932
|
+
treeCheckable: false,
|
|
11933
|
+
notFoundContent: '暂无数据',
|
|
11934
|
+
allowClear: true,
|
|
11935
|
+
showSearch: true,
|
|
11936
|
+
showArrow: true,
|
|
11937
|
+
maxTagCount: 1,
|
|
11938
|
+
optionFilterProp: 'children',
|
|
11939
|
+
filterOption: function filterOption(input, option) {
|
|
11940
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11941
|
+
},
|
|
11942
|
+
disabledJude: function disabledJude(data) {
|
|
11943
|
+
return data['parent'] === '0';
|
|
11944
|
+
},
|
|
11945
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11946
|
+
}
|
|
11947
|
+
}
|
|
11948
|
+
}, {
|
|
11949
|
+
name: 'qp-businessType-in',
|
|
11950
|
+
type: 'select',
|
|
11951
|
+
label: '店铺性质',
|
|
11952
|
+
field: {
|
|
11953
|
+
type: 'select',
|
|
11954
|
+
props: {
|
|
11955
|
+
mode: 'multiple',
|
|
11956
|
+
notFoundContent: '暂无数据',
|
|
11957
|
+
allowClear: true,
|
|
11958
|
+
showSearch: true,
|
|
11959
|
+
showArrow: true,
|
|
11960
|
+
maxTagCount: 1,
|
|
11961
|
+
optionFilterProp: 'children',
|
|
11962
|
+
filterOption: function filterOption(input, option) {
|
|
11963
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11964
|
+
}
|
|
11965
|
+
}
|
|
11966
|
+
},
|
|
11967
|
+
initialSource: getDictionarySource$1('BUSINESS_StoreType')
|
|
11898
11968
|
}];
|
|
11899
11969
|
var _queryHeaderParams11 = getQueryHeadersList({
|
|
11900
11970
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -11904,8 +11974,16 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11904
11974
|
'qp-employeeCode-eq': getEmployeeCode(),
|
|
11905
11975
|
'qp-realOrg-eq': true,
|
|
11906
11976
|
'qp-status-eq': 10
|
|
11977
|
+
}, getQueryHeadersItem(_queryHeaderParams11, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/channelInfo/tree"), {
|
|
11978
|
+
'qp-status-eq': 10,
|
|
11979
|
+
'qp-isMain-eq': 1,
|
|
11980
|
+
'qp-type-in': '1,2'
|
|
11981
|
+
}, getQueryHeadersItem(_queryHeaderParams11, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/tagNode/getTree/10"), {
|
|
11982
|
+
'qp-status-eq': 1
|
|
11907
11983
|
}, getQueryHeadersItem(_queryHeaderParams11, 'qp-orgCode-in'))]).then(function (x) {
|
|
11908
|
-
formatSource(x, 0,
|
|
11984
|
+
formatSource(x, 0, 3, tableSearchForm);
|
|
11985
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm, ['id', 'name'], 'channelInfoSon');
|
|
11986
|
+
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children');
|
|
11909
11987
|
});
|
|
11910
11988
|
modalTableProps = _objectSpread2({
|
|
11911
11989
|
modalTableTitle: '选择商店',
|
|
@@ -11913,19 +11991,23 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11913
11991
|
tableColumns: [{
|
|
11914
11992
|
title: '序号',
|
|
11915
11993
|
dataIndex: 'keyIndex',
|
|
11916
|
-
defaultSort: 0
|
|
11994
|
+
defaultSort: 0,
|
|
11995
|
+
width: 60
|
|
11917
11996
|
}, {
|
|
11918
11997
|
title: '商店编码',
|
|
11919
11998
|
dataIndex: 'code',
|
|
11920
|
-
defaultSort: 1
|
|
11999
|
+
defaultSort: 1,
|
|
12000
|
+
width: 100
|
|
11921
12001
|
}, {
|
|
11922
12002
|
title: '商店名称',
|
|
11923
12003
|
dataIndex: 'name',
|
|
11924
|
-
defaultSort: 2
|
|
12004
|
+
defaultSort: 2,
|
|
12005
|
+
width: 120
|
|
11925
12006
|
}, {
|
|
11926
12007
|
title: '商店类型',
|
|
11927
12008
|
dataIndex: 'type',
|
|
11928
12009
|
defaultSort: 3,
|
|
12010
|
+
width: 100,
|
|
11929
12011
|
render: function render(text) {
|
|
11930
12012
|
var _shopFile2Type$find;
|
|
11931
12013
|
return (_shopFile2Type$find = shopFile2Type.find(function (i) {
|
|
@@ -11935,6 +12017,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11935
12017
|
}, {
|
|
11936
12018
|
title: '启用状态',
|
|
11937
12019
|
dataIndex: 'status',
|
|
12020
|
+
width: 80,
|
|
11938
12021
|
render: function render(text) {
|
|
11939
12022
|
var _shopFile2Status$find;
|
|
11940
12023
|
return (_shopFile2Status$find = shopFile2Status.find(function (i) {
|
|
@@ -11944,8 +12027,28 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11944
12027
|
}, {
|
|
11945
12028
|
title: '所属销售组织',
|
|
11946
12029
|
dataIndex: 'orgName',
|
|
11947
|
-
defaultSort: 4
|
|
11948
|
-
|
|
12030
|
+
defaultSort: 4,
|
|
12031
|
+
width: 95
|
|
12032
|
+
}, {
|
|
12033
|
+
title: '所属销售渠道',
|
|
12034
|
+
dataIndex: 'channelName',
|
|
12035
|
+
defaultSort: 5,
|
|
12036
|
+
width: 100
|
|
12037
|
+
}, {
|
|
12038
|
+
title: '营销区域',
|
|
12039
|
+
dataIndex: 'commonRelationAreaName',
|
|
12040
|
+
defaultSort: 6,
|
|
12041
|
+
width: 100
|
|
12042
|
+
}, {
|
|
12043
|
+
title: '店铺性质',
|
|
12044
|
+
dataIndex: 'businessType',
|
|
12045
|
+
defaultSort: 7,
|
|
12046
|
+
render: function render(text) {
|
|
12047
|
+
return getDictionaryTextByValue$1('BUSINESS_StoreType', text);
|
|
12048
|
+
},
|
|
12049
|
+
width: 80
|
|
12050
|
+
}],
|
|
12051
|
+
noEmptySearchField: true
|
|
11949
12052
|
}, modalTableBusProps);
|
|
11950
12053
|
}
|
|
11951
12054
|
// 核算主体选择器(无弹窗)
|
package/dist/index.js
CHANGED
|
@@ -211,8 +211,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
211
211
|
r,
|
|
212
212
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
213
213
|
if (Object.getOwnPropertySymbols) {
|
|
214
|
-
var
|
|
215
|
-
for (r = 0; r <
|
|
214
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
215
|
+
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
216
216
|
}
|
|
217
217
|
return i;
|
|
218
218
|
}
|
|
@@ -220,7 +220,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
220
220
|
if (null == r) return {};
|
|
221
221
|
var t = {};
|
|
222
222
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
223
|
-
if (
|
|
223
|
+
if (e.includes(n)) continue;
|
|
224
224
|
t[n] = r[n];
|
|
225
225
|
}
|
|
226
226
|
return t;
|
|
@@ -5538,7 +5538,8 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5538
5538
|
};
|
|
5539
5539
|
var tableInitPagination = _objectSpread2(_objectSpread2({}, initPagination), {}, {
|
|
5540
5540
|
total: 0,
|
|
5541
|
-
current: 1
|
|
5541
|
+
current: 1,
|
|
5542
|
+
pageSizeOptions: [10, 20, 50, 100, 500, 1000]
|
|
5542
5543
|
});
|
|
5543
5544
|
var disabled = !!noOperate || (selectProps === null || selectProps === void 0 ? void 0 : selectProps.disabled) || (props === null || props === void 0 ? void 0 : props.disabled);
|
|
5544
5545
|
var isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
@@ -10016,8 +10017,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10016
10017
|
});
|
|
10017
10018
|
};
|
|
10018
10019
|
// 格式化树选择器数据源
|
|
10019
|
-
var _mapSearchTree = function mapSearchTree(treeDataItem, resKeyValue, disabledJudge) {
|
|
10020
|
-
var haveChildren = Array.isArray(treeDataItem
|
|
10020
|
+
var _mapSearchTree = function mapSearchTree(treeDataItem, resKeyValue, disabledJudge, childrenKey) {
|
|
10021
|
+
var haveChildren = Array.isArray(treeDataItem[childrenKey]) && treeDataItem[childrenKey].length > 0;
|
|
10021
10022
|
return {
|
|
10022
10023
|
title: treeDataItem[resKeyValue[1]],
|
|
10023
10024
|
value: treeDataItem[resKeyValue[0]],
|
|
@@ -10025,14 +10026,15 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10025
10026
|
data: _objectSpread2({}, treeDataItem),
|
|
10026
10027
|
isLeaf: !haveChildren,
|
|
10027
10028
|
disabled: disabledJudge !== undefined ? disabledJudge : haveChildren,
|
|
10028
|
-
children: haveChildren ? treeDataItem.
|
|
10029
|
-
return _mapSearchTree(i, resKeyValue, disabledJudge);
|
|
10029
|
+
children: haveChildren ? treeDataItem[childrenKey].map(function (i) {
|
|
10030
|
+
return _mapSearchTree(i, resKeyValue, disabledJudge, childrenKey);
|
|
10030
10031
|
}) : []
|
|
10031
10032
|
};
|
|
10032
10033
|
};
|
|
10033
10034
|
var formatTreeDataSource = function formatTreeDataSource(reData, position, changePosition, changeSearchForm) {
|
|
10034
10035
|
var _reData$position2;
|
|
10035
10036
|
var resKeyValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ['id', 'name'];
|
|
10037
|
+
var childrenKey = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'children';
|
|
10036
10038
|
var data = reData && ((_reData$position2 = reData[position]) === null || _reData$position2 === void 0 ? void 0 : _reData$position2.data);
|
|
10037
10039
|
var disabledJudge;
|
|
10038
10040
|
if (data && _typeof(data) === 'object' && !Array.isArray(data) && Object.keys(data).length > 0) {
|
|
@@ -10040,7 +10042,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10040
10042
|
disabledJudge = false;
|
|
10041
10043
|
}
|
|
10042
10044
|
var formatData = data && Array.isArray(data) && data.length && data.map(function (ites) {
|
|
10043
|
-
return _mapSearchTree(ites, resKeyValue, disabledJudge);
|
|
10045
|
+
return _mapSearchTree(ites, resKeyValue, disabledJudge, childrenKey);
|
|
10044
10046
|
}) || [];
|
|
10045
10047
|
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
10046
10048
|
};
|
|
@@ -11877,7 +11879,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11877
11879
|
mappingTextField: 'name',
|
|
11878
11880
|
mappingValueField: 'code',
|
|
11879
11881
|
otherParams: _objectSpread2({
|
|
11880
|
-
sorter: 'desc-id'
|
|
11882
|
+
sorter: 'desc-id',
|
|
11883
|
+
'qp-status-in': 10
|
|
11881
11884
|
}, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.addOtherParams) || {}),
|
|
11882
11885
|
sourceName: 'code'
|
|
11883
11886
|
}, requestConfigProp);
|
|
@@ -11894,12 +11897,9 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11894
11897
|
type: 'select',
|
|
11895
11898
|
label: '商店类型',
|
|
11896
11899
|
initialSource: shopFile2Type
|
|
11897
|
-
},
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
label: '商店状态',
|
|
11901
|
-
initialSource: shopFile2Status
|
|
11902
|
-
}, {
|
|
11900
|
+
},
|
|
11901
|
+
// { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
|
|
11902
|
+
{
|
|
11903
11903
|
name: 'qp-orgCode-in',
|
|
11904
11904
|
type: 'select',
|
|
11905
11905
|
label: '所属销售组织',
|
|
@@ -11918,6 +11918,76 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11918
11918
|
}
|
|
11919
11919
|
}
|
|
11920
11920
|
}
|
|
11921
|
+
}, {
|
|
11922
|
+
name: 'qp-channelCode-in',
|
|
11923
|
+
type: 'treeSelect',
|
|
11924
|
+
label: '所属销售渠道',
|
|
11925
|
+
field: {
|
|
11926
|
+
type: 'treeSelect',
|
|
11927
|
+
props: {
|
|
11928
|
+
multiple: true,
|
|
11929
|
+
treeData: [],
|
|
11930
|
+
treeCheckable: false,
|
|
11931
|
+
notFoundContent: '暂无数据',
|
|
11932
|
+
allowClear: true,
|
|
11933
|
+
showSearch: true,
|
|
11934
|
+
showArrow: true,
|
|
11935
|
+
maxTagCount: 1,
|
|
11936
|
+
optionFilterProp: 'children',
|
|
11937
|
+
filterOption: function filterOption(input, option) {
|
|
11938
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11939
|
+
},
|
|
11940
|
+
disabledJude: function disabledJude(data) {
|
|
11941
|
+
return data['parentCode'] === '0';
|
|
11942
|
+
},
|
|
11943
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11944
|
+
}
|
|
11945
|
+
}
|
|
11946
|
+
}, {
|
|
11947
|
+
name: 'qp-commonRelationAreaCode-in',
|
|
11948
|
+
type: 'treeSelect',
|
|
11949
|
+
label: '营销区域',
|
|
11950
|
+
field: {
|
|
11951
|
+
type: 'treeSelect',
|
|
11952
|
+
props: {
|
|
11953
|
+
multiple: true,
|
|
11954
|
+
treeData: [],
|
|
11955
|
+
treeCheckable: false,
|
|
11956
|
+
notFoundContent: '暂无数据',
|
|
11957
|
+
allowClear: true,
|
|
11958
|
+
showSearch: true,
|
|
11959
|
+
showArrow: true,
|
|
11960
|
+
maxTagCount: 1,
|
|
11961
|
+
optionFilterProp: 'children',
|
|
11962
|
+
filterOption: function filterOption(input, option) {
|
|
11963
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11964
|
+
},
|
|
11965
|
+
disabledJude: function disabledJude(data) {
|
|
11966
|
+
return data['parent'] === '0';
|
|
11967
|
+
},
|
|
11968
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11969
|
+
}
|
|
11970
|
+
}
|
|
11971
|
+
}, {
|
|
11972
|
+
name: 'qp-businessType-in',
|
|
11973
|
+
type: 'select',
|
|
11974
|
+
label: '店铺性质',
|
|
11975
|
+
field: {
|
|
11976
|
+
type: 'select',
|
|
11977
|
+
props: {
|
|
11978
|
+
mode: 'multiple',
|
|
11979
|
+
notFoundContent: '暂无数据',
|
|
11980
|
+
allowClear: true,
|
|
11981
|
+
showSearch: true,
|
|
11982
|
+
showArrow: true,
|
|
11983
|
+
maxTagCount: 1,
|
|
11984
|
+
optionFilterProp: 'children',
|
|
11985
|
+
filterOption: function filterOption(input, option) {
|
|
11986
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
11987
|
+
}
|
|
11988
|
+
}
|
|
11989
|
+
},
|
|
11990
|
+
initialSource: getDictionarySource$1('BUSINESS_StoreType')
|
|
11921
11991
|
}];
|
|
11922
11992
|
var _queryHeaderParams11 = getQueryHeadersList({
|
|
11923
11993
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -11927,8 +11997,16 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11927
11997
|
'qp-employeeCode-eq': getEmployeeCode(),
|
|
11928
11998
|
'qp-realOrg-eq': true,
|
|
11929
11999
|
'qp-status-eq': 10
|
|
12000
|
+
}, getQueryHeadersItem(_queryHeaderParams11, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/channelInfo/tree"), {
|
|
12001
|
+
'qp-status-eq': 10,
|
|
12002
|
+
'qp-isMain-eq': 1,
|
|
12003
|
+
'qp-type-in': '1,2'
|
|
12004
|
+
}, getQueryHeadersItem(_queryHeaderParams11, 'qp-orgCode-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/tagNode/getTree/10"), {
|
|
12005
|
+
'qp-status-eq': 1
|
|
11930
12006
|
}, getQueryHeadersItem(_queryHeaderParams11, 'qp-orgCode-in'))]).then(function (x) {
|
|
11931
|
-
formatSource(x, 0,
|
|
12007
|
+
formatSource(x, 0, 3, tableSearchForm);
|
|
12008
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm, ['id', 'name'], 'channelInfoSon');
|
|
12009
|
+
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children');
|
|
11932
12010
|
});
|
|
11933
12011
|
modalTableProps = _objectSpread2({
|
|
11934
12012
|
modalTableTitle: '选择商店',
|
|
@@ -11936,19 +12014,23 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11936
12014
|
tableColumns: [{
|
|
11937
12015
|
title: '序号',
|
|
11938
12016
|
dataIndex: 'keyIndex',
|
|
11939
|
-
defaultSort: 0
|
|
12017
|
+
defaultSort: 0,
|
|
12018
|
+
width: 60
|
|
11940
12019
|
}, {
|
|
11941
12020
|
title: '商店编码',
|
|
11942
12021
|
dataIndex: 'code',
|
|
11943
|
-
defaultSort: 1
|
|
12022
|
+
defaultSort: 1,
|
|
12023
|
+
width: 100
|
|
11944
12024
|
}, {
|
|
11945
12025
|
title: '商店名称',
|
|
11946
12026
|
dataIndex: 'name',
|
|
11947
|
-
defaultSort: 2
|
|
12027
|
+
defaultSort: 2,
|
|
12028
|
+
width: 120
|
|
11948
12029
|
}, {
|
|
11949
12030
|
title: '商店类型',
|
|
11950
12031
|
dataIndex: 'type',
|
|
11951
12032
|
defaultSort: 3,
|
|
12033
|
+
width: 100,
|
|
11952
12034
|
render: function render(text) {
|
|
11953
12035
|
var _shopFile2Type$find;
|
|
11954
12036
|
return (_shopFile2Type$find = shopFile2Type.find(function (i) {
|
|
@@ -11958,6 +12040,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11958
12040
|
}, {
|
|
11959
12041
|
title: '启用状态',
|
|
11960
12042
|
dataIndex: 'status',
|
|
12043
|
+
width: 80,
|
|
11961
12044
|
render: function render(text) {
|
|
11962
12045
|
var _shopFile2Status$find;
|
|
11963
12046
|
return (_shopFile2Status$find = shopFile2Status.find(function (i) {
|
|
@@ -11967,8 +12050,28 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11967
12050
|
}, {
|
|
11968
12051
|
title: '所属销售组织',
|
|
11969
12052
|
dataIndex: 'orgName',
|
|
11970
|
-
defaultSort: 4
|
|
11971
|
-
|
|
12053
|
+
defaultSort: 4,
|
|
12054
|
+
width: 95
|
|
12055
|
+
}, {
|
|
12056
|
+
title: '所属销售渠道',
|
|
12057
|
+
dataIndex: 'channelName',
|
|
12058
|
+
defaultSort: 5,
|
|
12059
|
+
width: 100
|
|
12060
|
+
}, {
|
|
12061
|
+
title: '营销区域',
|
|
12062
|
+
dataIndex: 'commonRelationAreaName',
|
|
12063
|
+
defaultSort: 6,
|
|
12064
|
+
width: 100
|
|
12065
|
+
}, {
|
|
12066
|
+
title: '店铺性质',
|
|
12067
|
+
dataIndex: 'businessType',
|
|
12068
|
+
defaultSort: 7,
|
|
12069
|
+
render: function render(text) {
|
|
12070
|
+
return getDictionaryTextByValue$1('BUSINESS_StoreType', text);
|
|
12071
|
+
},
|
|
12072
|
+
width: 80
|
|
12073
|
+
}],
|
|
12074
|
+
noEmptySearchField: true
|
|
11972
12075
|
}, modalTableBusProps);
|
|
11973
12076
|
}
|
|
11974
12077
|
// 核算主体选择器(无弹窗)
|
package/package.json
CHANGED
|
@@ -42,8 +42,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// 格式化树选择器数据源
|
|
45
|
-
const mapSearchTree = (treeDataItem: any, resKeyValue: any, disabledJudge?: any) => {
|
|
46
|
-
const haveChildren = Array.isArray(treeDataItem
|
|
45
|
+
const mapSearchTree = (treeDataItem: any, resKeyValue: any, disabledJudge?: any, childrenKey?: any) => {
|
|
46
|
+
const haveChildren = Array.isArray(treeDataItem[childrenKey]) && treeDataItem[childrenKey].length > 0;
|
|
47
47
|
return {
|
|
48
48
|
title: treeDataItem[resKeyValue[1]],
|
|
49
49
|
value: treeDataItem[resKeyValue[0]],
|
|
@@ -51,10 +51,10 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
51
51
|
data: { ...treeDataItem },
|
|
52
52
|
isLeaf: !haveChildren,
|
|
53
53
|
disabled: disabledJudge!==undefined? disabledJudge : haveChildren,
|
|
54
|
-
children: haveChildren ? treeDataItem.
|
|
54
|
+
children: haveChildren ? treeDataItem[childrenKey].map((i: any) => mapSearchTree(i, resKeyValue, disabledJudge, childrenKey)) : [],
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
|
|
57
|
+
const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name'], childrenKey = 'children') => {
|
|
58
58
|
let data = reData && reData[position]?.data;
|
|
59
59
|
let disabledJudge;
|
|
60
60
|
if(data && typeof data === 'object' && !Array.isArray(data) && Object.keys(data).length > 0) {
|
|
@@ -64,7 +64,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
64
64
|
const formatData = (data &&
|
|
65
65
|
Array.isArray(data) &&
|
|
66
66
|
data.length &&
|
|
67
|
-
data.map((ites: any) => mapSearchTree(ites, resKeyValue, disabledJudge))) ||
|
|
67
|
+
data.map((ites: any) => mapSearchTree(ites, resKeyValue, disabledJudge, childrenKey))) ||
|
|
68
68
|
[]
|
|
69
69
|
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
70
70
|
}
|
|
@@ -1836,6 +1836,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1836
1836
|
mappingValueField: 'code',
|
|
1837
1837
|
otherParams: {
|
|
1838
1838
|
sorter: 'desc-id',
|
|
1839
|
+
'qp-status-in': 10,
|
|
1839
1840
|
...(requestConfigProp?.addOtherParams || {}),
|
|
1840
1841
|
}, // 默认参数
|
|
1841
1842
|
sourceName: 'code',
|
|
@@ -1845,7 +1846,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1845
1846
|
{ name: 'name*multiInput', label: '商店名称', type: 'multipleQueryInput' },
|
|
1846
1847
|
{ name: 'code*multiInput', label: '商店编码', type: 'multipleQueryInput' },
|
|
1847
1848
|
{ name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
|
|
1848
|
-
{ name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
|
|
1849
|
+
// { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
|
|
1849
1850
|
{ name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
|
|
1850
1851
|
type: 'select',
|
|
1851
1852
|
props: {
|
|
@@ -1860,6 +1861,58 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1860
1861
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1861
1862
|
},
|
|
1862
1863
|
} },
|
|
1864
|
+
{ name: 'qp-channelCode-in', type: 'treeSelect', label: '所属销售渠道', field: {
|
|
1865
|
+
type: 'treeSelect',
|
|
1866
|
+
props: {
|
|
1867
|
+
multiple: true,
|
|
1868
|
+
treeData: [],
|
|
1869
|
+
treeCheckable: false,
|
|
1870
|
+
notFoundContent: '暂无数据',
|
|
1871
|
+
allowClear: true,
|
|
1872
|
+
showSearch: true,
|
|
1873
|
+
showArrow: true,
|
|
1874
|
+
maxTagCount: 1,
|
|
1875
|
+
optionFilterProp: 'children',
|
|
1876
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1877
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1878
|
+
disabledJude: (data: any) => data['parentCode'] === '0',
|
|
1879
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1880
|
+
},
|
|
1881
|
+
} },
|
|
1882
|
+
{ name: 'qp-commonRelationAreaCode-in', type: 'treeSelect', label: '营销区域', field: {
|
|
1883
|
+
type: 'treeSelect',
|
|
1884
|
+
props: {
|
|
1885
|
+
multiple: true,
|
|
1886
|
+
treeData: [],
|
|
1887
|
+
treeCheckable: false,
|
|
1888
|
+
notFoundContent: '暂无数据',
|
|
1889
|
+
allowClear: true,
|
|
1890
|
+
showSearch: true,
|
|
1891
|
+
showArrow: true,
|
|
1892
|
+
maxTagCount: 1,
|
|
1893
|
+
optionFilterProp: 'children',
|
|
1894
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1895
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1896
|
+
disabledJude: (data: any) => data['parent'] === '0',
|
|
1897
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1898
|
+
},
|
|
1899
|
+
} },
|
|
1900
|
+
{ name: 'qp-businessType-in', type: 'select', label: '店铺性质', field: {
|
|
1901
|
+
type: 'select',
|
|
1902
|
+
props: {
|
|
1903
|
+
mode: 'multiple',
|
|
1904
|
+
notFoundContent: '暂无数据',
|
|
1905
|
+
allowClear: true,
|
|
1906
|
+
showSearch: true,
|
|
1907
|
+
showArrow: true,
|
|
1908
|
+
maxTagCount: 1,
|
|
1909
|
+
optionFilterProp: 'children',
|
|
1910
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1911
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1912
|
+
},
|
|
1913
|
+
} ,
|
|
1914
|
+
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
1915
|
+
},
|
|
1863
1916
|
]
|
|
1864
1917
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1865
1918
|
Promise.all([
|
|
@@ -1868,8 +1921,18 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1868
1921
|
'qp-realOrg-eq': true,
|
|
1869
1922
|
'qp-status-eq': 10
|
|
1870
1923
|
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1924
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/channelInfo/tree`, {
|
|
1925
|
+
'qp-status-eq': 10,
|
|
1926
|
+
'qp-isMain-eq': 1,
|
|
1927
|
+
'qp-type-in': '1,2',
|
|
1928
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1929
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/tagNode/getTree/10`, {
|
|
1930
|
+
'qp-status-eq': 1,
|
|
1931
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1871
1932
|
]).then((x: any)=>{
|
|
1872
|
-
formatSource(x,0,
|
|
1933
|
+
formatSource(x,0, 3, tableSearchForm);
|
|
1934
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm, ['id','name'], 'channelInfoSon')
|
|
1935
|
+
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children')
|
|
1873
1936
|
})
|
|
1874
1937
|
modalTableProps = {
|
|
1875
1938
|
modalTableTitle: '选择商店',
|
|
@@ -1879,34 +1942,60 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1879
1942
|
title: '序号',
|
|
1880
1943
|
dataIndex: 'keyIndex',
|
|
1881
1944
|
defaultSort: 0,
|
|
1945
|
+
width: 60,
|
|
1882
1946
|
},
|
|
1883
1947
|
{
|
|
1884
1948
|
title: '商店编码',
|
|
1885
1949
|
dataIndex: 'code',
|
|
1886
1950
|
defaultSort: 1,
|
|
1951
|
+
width: 100,
|
|
1887
1952
|
},
|
|
1888
1953
|
{
|
|
1889
1954
|
title: '商店名称',
|
|
1890
1955
|
dataIndex: 'name',
|
|
1891
1956
|
defaultSort: 2,
|
|
1957
|
+
width: 120,
|
|
1892
1958
|
},
|
|
1893
1959
|
{
|
|
1894
1960
|
title: '商店类型',
|
|
1895
1961
|
dataIndex: 'type',
|
|
1896
1962
|
defaultSort: 3,
|
|
1963
|
+
width: 100,
|
|
1897
1964
|
render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
|
|
1898
1965
|
},
|
|
1899
1966
|
{
|
|
1900
1967
|
title: '启用状态',
|
|
1901
1968
|
dataIndex: 'status',
|
|
1969
|
+
width: 80,
|
|
1902
1970
|
render: (text: number) => shopFile2Status.find((i: any) => i.value === text)?.text,
|
|
1903
1971
|
},
|
|
1904
1972
|
{
|
|
1905
1973
|
title: '所属销售组织',
|
|
1906
1974
|
dataIndex: 'orgName',
|
|
1907
1975
|
defaultSort: 4,
|
|
1976
|
+
width: 95,
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
title: '所属销售渠道',
|
|
1980
|
+
dataIndex: 'channelName',
|
|
1981
|
+
defaultSort: 5,
|
|
1982
|
+
width: 100,
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
title: '营销区域',
|
|
1986
|
+
dataIndex: 'commonRelationAreaName',
|
|
1987
|
+
defaultSort: 6,
|
|
1988
|
+
width: 100,
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
title: '店铺性质',
|
|
1992
|
+
dataIndex: 'businessType',
|
|
1993
|
+
defaultSort: 7,
|
|
1994
|
+
render: (text: any) => getDictionaryTextByValue('BUSINESS_StoreType', text),
|
|
1995
|
+
width: 80,
|
|
1908
1996
|
},
|
|
1909
1997
|
],
|
|
1998
|
+
noEmptySearchField: true,
|
|
1910
1999
|
...modalTableBusProps
|
|
1911
2000
|
}
|
|
1912
2001
|
}
|
|
@@ -83,7 +83,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
83
83
|
const isFormPage = pathname.match(pattern)?.length > 0;
|
|
84
84
|
|
|
85
85
|
const initPagination = { showQuickJumper: true, showSizeChanger: true, showTotal: (total: any) => `共 ${total} 条`, pageSize: tableInitPageSize }
|
|
86
|
-
const tableInitPagination = { ...initPagination, total: 0, current: 1 }
|
|
86
|
+
const tableInitPagination = { ...initPagination, total: 0, current: 1, pageSizeOptions: [10, 20, 50, 100, 500, 1000] }
|
|
87
87
|
const disabled = !!noOperate || selectProps?.disabled || props?.disabled;
|
|
88
88
|
const isHaveDependency = fixedparameter && fieldValToParam && ctx;
|
|
89
89
|
const isHaveDValue = () => {
|