@bit-sun/business-component 4.2.0-alpha.6 → 4.2.0-alpha.6.10
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/SystemLog/index.d.ts +78 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +566 -107
- package/dist/index.js +567 -106
- package/dist/utils/utils.d.ts +41 -0
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +234 -38
- package/src/components/Business/SystemLog/index.md +37 -0
- package/src/components/Business/SystemLog/index.tsx +87 -0
- package/src/components/Business/columnSettingTable/index.tsx +7 -6
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +23 -22
- package/src/components/Functional/AddSelect/index.tsx +92 -0
- package/src/components/Functional/SearchSelect/index.css +274 -0
- package/src/components/Functional/SearchSelect/index.less +5 -5
- package/src/components/Functional/SearchSelect/index.tsx +5 -2
- package/src/components/Solution/RuleComponent/index.js +1 -0
- package/src/index.ts +2 -0
- package/src/utils/utils.ts +41 -1
package/dist/utils/utils.d.ts
CHANGED
|
@@ -31,3 +31,44 @@ export declare const randomString: (len?: any) => string;
|
|
|
31
31
|
export declare const createUniqID: (length: any) => string;
|
|
32
32
|
export declare const handleConvertResponse: (items: any, total: number) => object;
|
|
33
33
|
export declare const noEmptyArray: (targetObj: any) => boolean;
|
|
34
|
+
export declare const formContainerAndItemLayout: (type: string, title: any, name: string) => {
|
|
35
|
+
container: {
|
|
36
|
+
type: string;
|
|
37
|
+
props: {
|
|
38
|
+
title: any;
|
|
39
|
+
id: number;
|
|
40
|
+
level: number;
|
|
41
|
+
name: string;
|
|
42
|
+
bordered?: undefined;
|
|
43
|
+
isWhiteCard?: undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
itemLayout: {
|
|
47
|
+
span: number;
|
|
48
|
+
labelCol: {
|
|
49
|
+
span: number;
|
|
50
|
+
};
|
|
51
|
+
wrapperCol: {
|
|
52
|
+
span: number;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
container: {
|
|
57
|
+
type: string;
|
|
58
|
+
props: {
|
|
59
|
+
title: any;
|
|
60
|
+
id: number;
|
|
61
|
+
level: number;
|
|
62
|
+
bordered: null;
|
|
63
|
+
isWhiteCard: boolean;
|
|
64
|
+
name: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
itemLayout: {
|
|
68
|
+
wrapperCol: {
|
|
69
|
+
span: number;
|
|
70
|
+
};
|
|
71
|
+
span?: undefined;
|
|
72
|
+
labelCol?: undefined;
|
|
73
|
+
};
|
|
74
|
+
};
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013'
|
|
|
13
13
|
|
|
14
14
|
export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
15
15
|
const { requestConfig:requestConfigProp={}, selectProps:selectConfigProps={}, modalTableProps:modalTableBusProps={}, hiddenFields=[]} = parentProps || {};
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
// 默认type === 'supplier' 供应商选择器
|
|
18
18
|
let requestConfig = {
|
|
19
19
|
init: true,
|
|
@@ -56,11 +56,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
const formatTreeDataSource = (
|
|
59
|
-
reData: any,
|
|
60
|
-
position: number,
|
|
59
|
+
reData: any,
|
|
60
|
+
position: number,
|
|
61
61
|
changePosition: number,
|
|
62
62
|
changeSearchForm: any,
|
|
63
|
-
resKeyValue=['id', 'name'],
|
|
63
|
+
resKeyValue=['id', 'name'],
|
|
64
64
|
childrenKey = 'children',
|
|
65
65
|
nodeDisabledJudge?: (data: any) => boolean, // 树节点能不能选 函数判断
|
|
66
66
|
) => {
|
|
@@ -344,7 +344,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
344
344
|
}
|
|
345
345
|
tableSearchForm = [
|
|
346
346
|
{ name: 'qp-skuCode-in', label: 'SKU编码', field: {
|
|
347
|
-
type:'multipleQuerySearchSelect',
|
|
347
|
+
type:'multipleQuerySearchSelect',
|
|
348
348
|
props: {
|
|
349
349
|
selectProps: {
|
|
350
350
|
mode: "multiple",
|
|
@@ -366,7 +366,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
366
366
|
} },
|
|
367
367
|
{ name: 'qp-skuName-like', label: 'SKU名称' },
|
|
368
368
|
{ name: 'qp-itemCode-in', label: 'SPU编码', field: {
|
|
369
|
-
type:'multipleQuerySearchSelect',
|
|
369
|
+
type:'multipleQuerySearchSelect',
|
|
370
370
|
props: {
|
|
371
371
|
selectProps: {
|
|
372
372
|
placeholder: '请输入SPU编码查询'
|
|
@@ -523,11 +523,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
523
523
|
placeholder: '输入商品(SPU)编码或名称',
|
|
524
524
|
renderTableColumns: [
|
|
525
525
|
{
|
|
526
|
-
title: '
|
|
526
|
+
title: 'SPU编码',
|
|
527
527
|
dataIndex: 'itemCode',
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
|
-
title: '
|
|
530
|
+
title: 'SPU名称',
|
|
531
531
|
dataIndex: 'name',
|
|
532
532
|
},
|
|
533
533
|
],
|
|
@@ -547,8 +547,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
547
547
|
...requestConfigProp,
|
|
548
548
|
}
|
|
549
549
|
tableSearchForm = [
|
|
550
|
-
{ name: 'itemCode*multiInput', label: '
|
|
551
|
-
{ name: 'name*multiInput', label: '
|
|
550
|
+
{ name: 'itemCode*multiInput', label: 'SPU编码', type: 'multipleQueryInput' },
|
|
551
|
+
{ name: 'name*multiInput', label: 'SPU名称', type: 'multipleQueryInput' },
|
|
552
552
|
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
553
553
|
type: 'select',
|
|
554
554
|
props: {
|
|
@@ -626,12 +626,12 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
626
626
|
defaultSort: 0,
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
|
-
title: '
|
|
629
|
+
title: 'SPU编码',
|
|
630
630
|
dataIndex: 'itemCode',
|
|
631
631
|
defaultSort: 1,
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
|
-
title: '
|
|
634
|
+
title: 'SPU名称',
|
|
635
635
|
dataIndex: 'name',
|
|
636
636
|
defaultSort: 2,
|
|
637
637
|
},
|
|
@@ -733,9 +733,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
733
733
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
734
734
|
},
|
|
735
735
|
} },
|
|
736
|
-
{
|
|
737
|
-
name: 'qp-year-in',
|
|
738
|
-
label: '年份',
|
|
736
|
+
{
|
|
737
|
+
name: 'qp-year-in',
|
|
738
|
+
label: '年份',
|
|
739
739
|
field: {
|
|
740
740
|
type: 'itemPropertySelector',
|
|
741
741
|
props: {
|
|
@@ -744,9 +744,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
},
|
|
747
|
-
{
|
|
748
|
-
name: 'qp-season-in',
|
|
749
|
-
label: '季节',
|
|
747
|
+
{
|
|
748
|
+
name: 'qp-season-in',
|
|
749
|
+
label: '季节',
|
|
750
750
|
field: {
|
|
751
751
|
type: 'itemPropertySelector',
|
|
752
752
|
props: {
|
|
@@ -755,9 +755,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
},
|
|
758
|
-
{
|
|
759
|
-
name: 'qp-zzdlbm-in',
|
|
760
|
-
label: '大类',
|
|
758
|
+
{
|
|
759
|
+
name: 'qp-zzdlbm-in',
|
|
760
|
+
label: '大类',
|
|
761
761
|
field: {
|
|
762
762
|
type: 'itemPropertySelector',
|
|
763
763
|
props: {
|
|
@@ -766,9 +766,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
},
|
|
769
|
-
{
|
|
770
|
-
name: 'qp-zzzlbm-in',
|
|
771
|
-
label: '中类',
|
|
769
|
+
{
|
|
770
|
+
name: 'qp-zzzlbm-in',
|
|
771
|
+
label: '中类',
|
|
772
772
|
field: {
|
|
773
773
|
type: 'itemPropertySelector',
|
|
774
774
|
props: {
|
|
@@ -777,9 +777,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
},
|
|
780
|
-
{
|
|
781
|
-
name: 'qp-zzxlbm-in',
|
|
782
|
-
label: '小类',
|
|
780
|
+
{
|
|
781
|
+
name: 'qp-zzxlbm-in',
|
|
782
|
+
label: '小类',
|
|
783
783
|
field: {
|
|
784
784
|
type: 'itemPropertySelector',
|
|
785
785
|
props: {
|
|
@@ -970,7 +970,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
970
970
|
['colorName', 'categoryId', 'classId', 'brandId'],
|
|
971
971
|
hiddenFields,
|
|
972
972
|
);
|
|
973
|
-
const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params,options));
|
|
973
|
+
const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params, i.options));
|
|
974
974
|
requestConfig = {
|
|
975
975
|
url: `${prefixUrl.selectPrefix}/skc/skcSelect`,
|
|
976
976
|
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
@@ -1198,12 +1198,84 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1198
1198
|
sourceName: 'warehouseIds',
|
|
1199
1199
|
...requestConfigProp,
|
|
1200
1200
|
}
|
|
1201
|
+
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1202
|
+
Promise.all([
|
|
1203
|
+
loadSelectSource(`/channel-manage/channelInfo/tree`, {
|
|
1204
|
+
'qp-status-eq': 10,
|
|
1205
|
+
'qp-isMain-eq': 1,
|
|
1206
|
+
'qp-type-in': '1,2',
|
|
1207
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1208
|
+
loadSelectSource(`/channel-manage/tagNode/getTree/10`, {
|
|
1209
|
+
'qp-status-eq': 1,
|
|
1210
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1211
|
+
]).then((x: any)=>{
|
|
1212
|
+
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1213
|
+
const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
|
|
1214
|
+
formatTreeDataSource(x, 0, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1215
|
+
formatTreeDataSource(x, 1, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
|
|
1216
|
+
})
|
|
1201
1217
|
tableSearchForm = [
|
|
1202
1218
|
{ name: 'realWarehouseName*multiInput', label: '逻辑仓名称', type: 'multipleQueryInput' },
|
|
1203
1219
|
{ name: 'realWarehouseCode*multiInput', label: '逻辑仓编码', type: 'multipleQueryInput' },
|
|
1204
1220
|
{ name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
|
|
1205
1221
|
{ name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
|
|
1206
|
-
|
|
1222
|
+
{
|
|
1223
|
+
name: 'qp-channelCode-in', type: 'treeSelect', label: '销售渠道', field: {
|
|
1224
|
+
type: 'treeSelect',
|
|
1225
|
+
props: {
|
|
1226
|
+
multiple: true,
|
|
1227
|
+
treeData: [],
|
|
1228
|
+
treeCheckable: false,
|
|
1229
|
+
notFoundContent: '暂无数据',
|
|
1230
|
+
allowClear: true,
|
|
1231
|
+
showSearch: true,
|
|
1232
|
+
showArrow: true,
|
|
1233
|
+
maxTagCount: 1,
|
|
1234
|
+
optionFilterProp: 'children',
|
|
1235
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1236
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1237
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1238
|
+
},
|
|
1239
|
+
}
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
name: 'qp-refCode-in', type: 'treeSelect', label: '营销区域', field: {
|
|
1243
|
+
type: 'treeSelect',
|
|
1244
|
+
props: {
|
|
1245
|
+
multiple: true,
|
|
1246
|
+
treeData: [],
|
|
1247
|
+
treeCheckable: false,
|
|
1248
|
+
notFoundContent: '暂无数据',
|
|
1249
|
+
allowClear: true,
|
|
1250
|
+
showSearch: true,
|
|
1251
|
+
showArrow: true,
|
|
1252
|
+
maxTagCount: 1,
|
|
1253
|
+
optionFilterProp: 'children',
|
|
1254
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1255
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1256
|
+
|
|
1257
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1258
|
+
},
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
name: 'qp-type-in', type: 'select', label: '店铺性质', field: {
|
|
1263
|
+
type: 'select',
|
|
1264
|
+
props: {
|
|
1265
|
+
mode: 'multiple',
|
|
1266
|
+
notFoundContent: '暂无数据',
|
|
1267
|
+
allowClear: true,
|
|
1268
|
+
showSearch: true,
|
|
1269
|
+
showArrow: true,
|
|
1270
|
+
maxTagCount: 1,
|
|
1271
|
+
optionFilterProp: 'children',
|
|
1272
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1273
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1274
|
+
},
|
|
1275
|
+
},
|
|
1276
|
+
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
1277
|
+
},
|
|
1278
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-isEnable-eq', type: 'select', label: '逻辑仓状态', initialSource: getDictionarySource('SC00001') }]:[]),
|
|
1207
1279
|
]
|
|
1208
1280
|
modalTableProps = {
|
|
1209
1281
|
modalTableTitle: '选择逻辑仓',
|
|
@@ -1230,10 +1302,36 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1230
1302
|
defaultSort: 3,
|
|
1231
1303
|
render: (text: number) => getDictionaryTextByValue('SC00004', text),
|
|
1232
1304
|
},
|
|
1305
|
+
{
|
|
1306
|
+
title: '运营组名称',
|
|
1307
|
+
dataIndex: 'groupCode',
|
|
1308
|
+
defaultSort: 7,
|
|
1309
|
+
render: (text: any, record) => record?.groupName ? `【${text}】${record?.groupName}` : "",
|
|
1310
|
+
width: 100,
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
title: '所属销售渠道',
|
|
1314
|
+
dataIndex: 'channelName',
|
|
1315
|
+
defaultSort: 4,
|
|
1316
|
+
width: 100,
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
title: '营销区域',
|
|
1320
|
+
dataIndex: 'commonRelationAreaName',
|
|
1321
|
+
defaultSort: 5,
|
|
1322
|
+
width: 100,
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
title: '店铺性质',
|
|
1326
|
+
dataIndex: 'type',
|
|
1327
|
+
defaultSort: 6,
|
|
1328
|
+
render: (text: any) => getDictionaryTextByValue('BUSINESS_StoreType', text),
|
|
1329
|
+
width: 80,
|
|
1330
|
+
},
|
|
1233
1331
|
...(modalTableBusProps?.needStatusSearch?[{
|
|
1234
1332
|
title: '状态',
|
|
1235
1333
|
dataIndex: 'isEnable',
|
|
1236
|
-
defaultSort:
|
|
1334
|
+
defaultSort: 8,
|
|
1237
1335
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
1238
1336
|
}]:[]),
|
|
1239
1337
|
],
|
|
@@ -1288,13 +1386,39 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1288
1386
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1289
1387
|
},
|
|
1290
1388
|
} },
|
|
1291
|
-
|
|
1389
|
+
{
|
|
1390
|
+
name: 'qp-channelCode-in', type: 'treeSelect', label: '销售渠道', field: {
|
|
1391
|
+
type: 'treeSelect',
|
|
1392
|
+
props: {
|
|
1393
|
+
multiple: true,
|
|
1394
|
+
treeData: [],
|
|
1395
|
+
treeCheckable: false,
|
|
1396
|
+
notFoundContent: '暂无数据',
|
|
1397
|
+
allowClear: true,
|
|
1398
|
+
showSearch: true,
|
|
1399
|
+
showArrow: true,
|
|
1400
|
+
maxTagCount: 1,
|
|
1401
|
+
optionFilterProp: 'children',
|
|
1402
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1403
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1404
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1405
|
+
},
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[]),
|
|
1292
1409
|
]
|
|
1293
1410
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1294
1411
|
Promise.all([
|
|
1295
1412
|
loadSelectSource(`${prefixUrl.formSelectFix}/groupInfo/listNoPage`, { 'qp-status-eq': 1 },getQueryHeadersItem(queryHeaderParams,'qp-groupCode-in')),
|
|
1413
|
+
loadSelectSource(`/channel-manage/channelInfo/tree`, {
|
|
1414
|
+
'qp-status-eq': 10,
|
|
1415
|
+
'qp-isMain-eq': 1,
|
|
1416
|
+
'qp-type-in': '1,2',
|
|
1417
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1296
1418
|
]).then((x: any)=>{
|
|
1297
1419
|
formatSource(x,0, 2, tableSearchForm,['groupCode','groupName']);
|
|
1420
|
+
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1421
|
+
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1298
1422
|
})
|
|
1299
1423
|
modalTableProps = {
|
|
1300
1424
|
modalTableTitle: '选择运营仓',
|
|
@@ -1326,6 +1450,12 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1326
1450
|
defaultSort: 4,
|
|
1327
1451
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
1328
1452
|
}]:[]),
|
|
1453
|
+
{
|
|
1454
|
+
title: '所属销售渠道',
|
|
1455
|
+
dataIndex: 'channelName',
|
|
1456
|
+
defaultSort: 5,
|
|
1457
|
+
width: 100,
|
|
1458
|
+
},
|
|
1329
1459
|
],
|
|
1330
1460
|
...modalTableBusProps,
|
|
1331
1461
|
}
|
|
@@ -1599,15 +1729,66 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1599
1729
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1600
1730
|
},
|
|
1601
1731
|
} },
|
|
1602
|
-
|
|
1732
|
+
{
|
|
1733
|
+
name: 'qp-saleChannel-in', type: 'treeSelect', label: '销售渠道', field: {
|
|
1734
|
+
type: 'treeSelect',
|
|
1735
|
+
props: {
|
|
1736
|
+
multiple: true,
|
|
1737
|
+
treeData: [],
|
|
1738
|
+
treeCheckable: false,
|
|
1739
|
+
notFoundContent: '暂无数据',
|
|
1740
|
+
allowClear: true,
|
|
1741
|
+
showSearch: true,
|
|
1742
|
+
showArrow: true,
|
|
1743
|
+
maxTagCount: 1,
|
|
1744
|
+
optionFilterProp: 'children',
|
|
1745
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1746
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1747
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1748
|
+
},
|
|
1749
|
+
}
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: 'qp-refCode-in', type: 'treeSelect', label: '营销区域', field: {
|
|
1753
|
+
type: 'treeSelect',
|
|
1754
|
+
props: {
|
|
1755
|
+
multiple: true,
|
|
1756
|
+
treeData: [],
|
|
1757
|
+
treeCheckable: false,
|
|
1758
|
+
notFoundContent: '暂无数据',
|
|
1759
|
+
allowClear: true,
|
|
1760
|
+
showSearch: true,
|
|
1761
|
+
showArrow: true,
|
|
1762
|
+
maxTagCount: 1,
|
|
1763
|
+
optionFilterProp: 'children',
|
|
1764
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1765
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1766
|
+
|
|
1767
|
+
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1768
|
+
},
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
];
|
|
1603
1772
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1604
1773
|
Promise.all([
|
|
1605
1774
|
loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {},getQueryHeadersItem(queryHeaderParams,'qp-createOrgCode-eq')),
|
|
1775
|
+
loadSelectSource(`/channel-manage/channelInfo/tree`, {
|
|
1776
|
+
'qp-status-eq': 10,
|
|
1777
|
+
'qp-isMain-eq': 1,
|
|
1778
|
+
'qp-type-in': '1,2',
|
|
1779
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1780
|
+
loadSelectSource(`/channel-manage/tagNode/getTree/10`, {
|
|
1781
|
+
'qp-status-eq': 1,
|
|
1782
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1606
1783
|
]).then((x: any)=>{
|
|
1607
1784
|
const firstElement = x?.[0];
|
|
1608
1785
|
const allList = firstElement && [firstElement, firstElement];
|
|
1609
1786
|
formatSource(allList,0, 2, tableSearchForm);
|
|
1610
1787
|
formatSource(allList,1, 3, tableSearchForm);
|
|
1788
|
+
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1789
|
+
const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
|
|
1790
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1791
|
+
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
|
|
1611
1792
|
})
|
|
1612
1793
|
modalTableProps = {
|
|
1613
1794
|
modalTableTitle: '选择客户',
|
|
@@ -1637,6 +1818,19 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1637
1818
|
title: '使用组织',
|
|
1638
1819
|
dataIndex: 'salesOrgName',
|
|
1639
1820
|
defaultSort: 4,
|
|
1821
|
+
width: 100,
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
title: '所属销售渠道',
|
|
1825
|
+
dataIndex: 'channelName',
|
|
1826
|
+
defaultSort: 5,
|
|
1827
|
+
width: 100,
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
title: '营销区域',
|
|
1831
|
+
dataIndex: 'commonRelationAreaName',
|
|
1832
|
+
defaultSort: 6,
|
|
1833
|
+
width: 100,
|
|
1640
1834
|
},
|
|
1641
1835
|
],
|
|
1642
1836
|
...modalTableBusProps
|
|
@@ -1673,8 +1867,10 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1673
1867
|
...requestConfigProp,
|
|
1674
1868
|
}
|
|
1675
1869
|
tableSearchForm = [
|
|
1676
|
-
{ name: '
|
|
1677
|
-
{ name: '
|
|
1870
|
+
{ name: 'name*multiInput', label: '店铺名称', type: 'multipleQueryInput' },
|
|
1871
|
+
{ name: 'code*multiInput', label: '店铺编码', type: 'multipleQueryInput' },
|
|
1872
|
+
// { name: 'qp-name-like', label: '店铺名称' },
|
|
1873
|
+
// { name: 'qp-code-like', label: '店铺编码' },
|
|
1678
1874
|
{ name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
|
|
1679
1875
|
type: 'select',
|
|
1680
1876
|
props: {
|
|
@@ -1904,7 +2100,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1904
2100
|
optionFilterProp: 'children',
|
|
1905
2101
|
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1906
2102
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1907
|
-
|
|
2103
|
+
|
|
1908
2104
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1909
2105
|
},
|
|
1910
2106
|
} },
|
|
@@ -1922,7 +2118,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1922
2118
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1923
2119
|
},
|
|
1924
2120
|
} ,
|
|
1925
|
-
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
2121
|
+
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
1926
2122
|
},
|
|
1927
2123
|
]
|
|
1928
2124
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
@@ -2193,7 +2389,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2193
2389
|
},
|
|
2194
2390
|
} },
|
|
2195
2391
|
{ name: 'qp-email-like', label: '邮箱' },
|
|
2196
|
-
{ name: 'qp-
|
|
2392
|
+
{ name: 'qp-phone-like', label: '手机号' },
|
|
2197
2393
|
]
|
|
2198
2394
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
2199
2395
|
Promise.all([
|
|
@@ -2301,7 +2497,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2301
2497
|
} },
|
|
2302
2498
|
...(modalTableBusProps?.needTypeSearch?[{ name: 'qp-employmentType-eq', type: 'select', label: '员工类型', initialSource: employeeType }]:[]),
|
|
2303
2499
|
{ name: 'qp-email-like', label: '邮箱' },
|
|
2304
|
-
{ name: 'qp-
|
|
2500
|
+
{ name: 'qp-phone-like', label: '手机号' },
|
|
2305
2501
|
]
|
|
2306
2502
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
2307
2503
|
Promise.all([
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: '组件'
|
|
4
|
+
order: 1
|
|
5
|
+
group:
|
|
6
|
+
title: 业务组件
|
|
7
|
+
order: 1
|
|
8
|
+
title: 日志组件
|
|
9
|
+
order: 1
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# SystemLog
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 日志业务组件
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React, { useState } from 'react';
|
|
19
|
+
import { SystemLog } from '../../../index.ts';
|
|
20
|
+
|
|
21
|
+
export default () => {
|
|
22
|
+
const [modeType, setModeType] = useState('view');
|
|
23
|
+
const renderLogRef = useRef<any>();
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
fields: [
|
|
27
|
+
SystemLog({
|
|
28
|
+
modeType,
|
|
29
|
+
code: '123',
|
|
30
|
+
containerName: 'Test_Log_Info',
|
|
31
|
+
renderLogRef,
|
|
32
|
+
extraParams: {},
|
|
33
|
+
})
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { handleCommonTimeRender } from '@/utils/TableUtils';
|
|
2
|
+
import { formContainerAndItemLayout, handleConvertResponse } from '@/utils/utils';
|
|
3
|
+
import { Table as BsTable } from 'bssula';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
//操作日志
|
|
7
|
+
const SystemLog = ({
|
|
8
|
+
modeType,
|
|
9
|
+
code,
|
|
10
|
+
containerName,
|
|
11
|
+
renderLogRef = {},
|
|
12
|
+
extraParams = {},
|
|
13
|
+
}: {
|
|
14
|
+
modeType: string,
|
|
15
|
+
code: any
|
|
16
|
+
containerName: string,
|
|
17
|
+
renderLogRef: object,
|
|
18
|
+
extraParams?: object,
|
|
19
|
+
}) => {
|
|
20
|
+
return {
|
|
21
|
+
...formContainerAndItemLayout('table', '操作日志', containerName),
|
|
22
|
+
initialVisible: modeType != 'create',
|
|
23
|
+
fields: [
|
|
24
|
+
{
|
|
25
|
+
name: 'table',
|
|
26
|
+
label: false,
|
|
27
|
+
itemLayout: {
|
|
28
|
+
span: 24,
|
|
29
|
+
labelCol: {
|
|
30
|
+
span: 0,
|
|
31
|
+
},
|
|
32
|
+
wrapperCol: {
|
|
33
|
+
span: 24,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
field: (ctx: any) => {
|
|
37
|
+
return code && <BsTable
|
|
38
|
+
remoteDataSource={{
|
|
39
|
+
url: `/oms-ops/logInfo?qp-businessCode-eq=${code}`,
|
|
40
|
+
convertParams: ({ params }: any) => {
|
|
41
|
+
return {
|
|
42
|
+
pageSize: params.pageSize,
|
|
43
|
+
currentPage: params.current,
|
|
44
|
+
...extraParams,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
converter: ({ data }: any) => {
|
|
48
|
+
return {
|
|
49
|
+
...handleConvertResponse(data.list, data.total || data.totalCount),
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
}}
|
|
53
|
+
columns={[
|
|
54
|
+
{
|
|
55
|
+
title: '操作人',
|
|
56
|
+
dataIndex: 'handlerName',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '操作名称',
|
|
60
|
+
dataIndex: 'handlerType',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: '操作时间',
|
|
64
|
+
dataIndex: 'handlerTime',
|
|
65
|
+
render: ({ text }: { text: any }) => handleCommonTimeRender(text)
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: '操作内容',
|
|
69
|
+
dataIndex: 'logcontent',
|
|
70
|
+
},
|
|
71
|
+
]}
|
|
72
|
+
style={{ width: '100%', marginTop: '-16px', padding: '0px' }}
|
|
73
|
+
rowKey="id"
|
|
74
|
+
scroll={{ x: 'max-content' }}
|
|
75
|
+
pagination={{
|
|
76
|
+
showTotal: (total: any) => `共 ${total} 条`,
|
|
77
|
+
showQuickJumper: true,
|
|
78
|
+
hideOnSinglePage: true,
|
|
79
|
+
}}
|
|
80
|
+
ref={renderLogRef}
|
|
81
|
+
/>
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export default SystemLog
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
3
|
import { Table, Tooltip, Typography } from 'antd';
|
|
3
4
|
import { Resizable } from 'react-resizable';
|
|
@@ -81,9 +82,9 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* 新增函数,用于根据传入的小数位数进行四舍五入
|
|
84
|
-
* @param number
|
|
85
|
-
* @param decimalPlaces
|
|
86
|
-
* @returns
|
|
85
|
+
* @param number
|
|
86
|
+
* @param decimalPlaces
|
|
87
|
+
* @returns
|
|
87
88
|
*/
|
|
88
89
|
roundToDecimalPlaces = (number: any, decimalPlaces: number) => {
|
|
89
90
|
const factor = Math.pow(10, (decimalPlaces || 2));
|
|
@@ -92,7 +93,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
95
|
* 合计行逻辑
|
|
95
|
-
* @returns
|
|
96
|
+
* @returns
|
|
96
97
|
*/
|
|
97
98
|
getTableSummaryInfo = () => {
|
|
98
99
|
const { summary = undefined, rowSelection, expandable, modeType, dataSource, isSpecial = false, }: any = this.props;
|
|
@@ -232,7 +233,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
232
233
|
|
|
233
234
|
/**
|
|
234
235
|
* 处理行点击事件
|
|
235
|
-
* @param record
|
|
236
|
+
* @param record
|
|
236
237
|
*/
|
|
237
238
|
handleRowClick = (record: any) => {
|
|
238
239
|
const { selectedRowKeys, selectedRows, } = this.state;
|
|
@@ -316,7 +317,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
316
317
|
...propRowSelection,
|
|
317
318
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
318
319
|
onChange: (selectedRowKeys: any, selectedRows: any) => {
|
|
319
|
-
this.setState({
|
|
320
|
+
this.setState({
|
|
320
321
|
selectedRowKeys,
|
|
321
322
|
selectedRows
|
|
322
323
|
});
|