@bit-sun/business-component 4.2.0-alpha.6.8 → 4.2.5-per-alpha.1
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 +14 -10
- package/dist/components/Business/AddSelectBusiness/index.d.ts +3 -4
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -2
- package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +1 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +1 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +1 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +1 -2
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +1 -2
- package/dist/components/Business/BsLayouts/index.d.ts +1 -1
- package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +19 -8
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +1 -2
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +9 -17
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +14 -15
- package/dist/components/Business/CommodityEntry/index.d.ts +1 -2
- package/dist/components/Business/CommonAlert/index.d.ts +1 -2
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
- package/dist/components/Business/DetailPageWrapper/index.d.ts +11 -12
- package/dist/components/Business/HomePageWrapper/index.d.ts +1 -2
- package/dist/components/Business/ItemPropertySelector/index.d.ts +1 -2
- package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +1 -2
- package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +1 -2
- package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +1 -2
- package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +1 -2
- package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +1 -2
- package/dist/components/Business/PropertyModal/index.d.ts +1 -2
- package/dist/components/Business/PropertyModal/propertyGroup.d.ts +1 -1
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/StateFlow/index.d.ts +1 -2
- package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +6 -6
- package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +1 -2
- package/dist/components/Business/columnSettingTable/index.d.ts +3 -3
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +3 -3
- package/dist/components/Business/columnSettingTable/utils.d.ts +1 -2
- package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
- package/dist/components/Common/ParagraphCopier/index.d.ts +1 -1
- package/dist/components/Common/Section/index.d.ts +1 -1
- package/dist/components/Functional/AddSelect/index.d.ts +1 -2
- package/dist/components/Functional/AuthButton/index.d.ts +1 -2
- package/dist/components/Functional/DataImport/index.d.ts +4 -4
- package/dist/components/Functional/DataValidation/index.d.ts +5 -5
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -2
- package/dist/components/Functional/QueryMutipleInput/index.d.ts +1 -2
- package/dist/components/Functional/QueryMutipleSelect/index.d.ts +1 -2
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +2 -3
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +1 -2
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +1 -1
- package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +1 -2
- package/dist/components/Solution/RuleComponent/Formula.d.ts +1 -2
- package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +1 -2
- package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +1 -2
- package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +1 -2
- package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
- package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +2298 -1646
- package/dist/index.js +2290 -1640
- package/dist/plugin/TableColumnSetting/index.d.ts +5 -5
- package/dist/utils/TableUtils.d.ts +18 -19
- package/dist/utils/luckysheetLoader.d.ts +21 -0
- package/dist/utils/utils.d.ts +0 -41
- package/package.json +1 -1
- package/src/components/Business/BsLayouts/index.tsx +485 -129
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +144 -4
- package/src/components/Business/BsSulaQueryTable/index.md +120 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +236 -22
- package/src/components/Business/BsSulaQueryTable/setting.tsx +232 -17
- package/src/components/Business/DetailPageWrapper/index.tsx +30 -27
- package/src/components/Business/HomePageWrapper/index.tsx +10 -8
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +27 -214
- package/src/components/Business/columnSettingTable/index.tsx +6 -7
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +22 -23
- package/src/components/Functional/DataImport/index.tsx +76 -3
- package/src/components/Functional/DataValidation/index.tsx +81 -3
- package/src/index.ts +0 -2
- package/src/utils/luckysheetLoader.ts +164 -0
- package/src/utils/utils.ts +1 -41
- package/dist/components/Business/SystemLog/index.d.ts +0 -78
- package/src/components/Business/SystemLog/index.md +0 -37
- package/src/components/Business/SystemLog/index.tsx +0 -87
|
@@ -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编码查询'
|
|
@@ -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: {
|
|
@@ -1198,84 +1198,12 @@ 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
|
-
})
|
|
1217
1201
|
tableSearchForm = [
|
|
1218
1202
|
{ name: 'realWarehouseName*multiInput', label: '逻辑仓名称', type: 'multipleQueryInput' },
|
|
1219
1203
|
{ name: 'realWarehouseCode*multiInput', label: '逻辑仓编码', type: 'multipleQueryInput' },
|
|
1220
1204
|
{ name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
|
|
1221
1205
|
{ name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
|
|
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') }]:[]),
|
|
1206
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-isEnable-eq', type: 'select', label: '逻辑仓状态', initialSource: getDictionarySource('SC00001') }]:[])
|
|
1279
1207
|
]
|
|
1280
1208
|
modalTableProps = {
|
|
1281
1209
|
modalTableTitle: '选择逻辑仓',
|
|
@@ -1302,29 +1230,10 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1302
1230
|
defaultSort: 3,
|
|
1303
1231
|
render: (text: number) => getDictionaryTextByValue('SC00004', text),
|
|
1304
1232
|
},
|
|
1305
|
-
{
|
|
1306
|
-
title: '所属销售渠道',
|
|
1307
|
-
dataIndex: 'channelName',
|
|
1308
|
-
defaultSort: 4,
|
|
1309
|
-
width: 100,
|
|
1310
|
-
},
|
|
1311
|
-
{
|
|
1312
|
-
title: '营销区域',
|
|
1313
|
-
dataIndex: 'commonRelationAreaName',
|
|
1314
|
-
defaultSort: 5,
|
|
1315
|
-
width: 100,
|
|
1316
|
-
},
|
|
1317
|
-
{
|
|
1318
|
-
title: '店铺性质',
|
|
1319
|
-
dataIndex: 'type',
|
|
1320
|
-
defaultSort: 6,
|
|
1321
|
-
render: (text: any) => getDictionaryTextByValue('BUSINESS_StoreType', text),
|
|
1322
|
-
width: 80,
|
|
1323
|
-
},
|
|
1324
1233
|
...(modalTableBusProps?.needStatusSearch?[{
|
|
1325
1234
|
title: '状态',
|
|
1326
1235
|
dataIndex: 'isEnable',
|
|
1327
|
-
defaultSort:
|
|
1236
|
+
defaultSort: 4,
|
|
1328
1237
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
1329
1238
|
}]:[]),
|
|
1330
1239
|
],
|
|
@@ -1379,39 +1288,13 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1379
1288
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1380
1289
|
},
|
|
1381
1290
|
} },
|
|
1382
|
-
|
|
1383
|
-
name: 'qp-channelCode-in', type: 'treeSelect', label: '销售渠道', field: {
|
|
1384
|
-
type: 'treeSelect',
|
|
1385
|
-
props: {
|
|
1386
|
-
multiple: true,
|
|
1387
|
-
treeData: [],
|
|
1388
|
-
treeCheckable: false,
|
|
1389
|
-
notFoundContent: '暂无数据',
|
|
1390
|
-
allowClear: true,
|
|
1391
|
-
showSearch: true,
|
|
1392
|
-
showArrow: true,
|
|
1393
|
-
maxTagCount: 1,
|
|
1394
|
-
optionFilterProp: 'children',
|
|
1395
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1396
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1397
|
-
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1398
|
-
},
|
|
1399
|
-
}
|
|
1400
|
-
},
|
|
1401
|
-
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[]),
|
|
1291
|
+
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[])
|
|
1402
1292
|
]
|
|
1403
1293
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1404
1294
|
Promise.all([
|
|
1405
1295
|
loadSelectSource(`${prefixUrl.formSelectFix}/groupInfo/listNoPage`, { 'qp-status-eq': 1 },getQueryHeadersItem(queryHeaderParams,'qp-groupCode-in')),
|
|
1406
|
-
loadSelectSource(`/channel-manage/channelInfo/tree`, {
|
|
1407
|
-
'qp-status-eq': 10,
|
|
1408
|
-
'qp-isMain-eq': 1,
|
|
1409
|
-
'qp-type-in': '1,2',
|
|
1410
|
-
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1411
1296
|
]).then((x: any)=>{
|
|
1412
1297
|
formatSource(x,0, 2, tableSearchForm,['groupCode','groupName']);
|
|
1413
|
-
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1414
|
-
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1415
1298
|
})
|
|
1416
1299
|
modalTableProps = {
|
|
1417
1300
|
modalTableTitle: '选择运营仓',
|
|
@@ -1443,12 +1326,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1443
1326
|
defaultSort: 4,
|
|
1444
1327
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
1445
1328
|
}]:[]),
|
|
1446
|
-
{
|
|
1447
|
-
title: '所属销售渠道',
|
|
1448
|
-
dataIndex: 'channelName',
|
|
1449
|
-
defaultSort: 5,
|
|
1450
|
-
width: 100,
|
|
1451
|
-
},
|
|
1452
1329
|
],
|
|
1453
1330
|
...modalTableBusProps,
|
|
1454
1331
|
}
|
|
@@ -1722,66 +1599,15 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1722
1599
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1723
1600
|
},
|
|
1724
1601
|
} },
|
|
1725
|
-
|
|
1726
|
-
name: 'qp-saleChannel-in', type: 'treeSelect', label: '销售渠道', field: {
|
|
1727
|
-
type: 'treeSelect',
|
|
1728
|
-
props: {
|
|
1729
|
-
multiple: true,
|
|
1730
|
-
treeData: [],
|
|
1731
|
-
treeCheckable: false,
|
|
1732
|
-
notFoundContent: '暂无数据',
|
|
1733
|
-
allowClear: true,
|
|
1734
|
-
showSearch: true,
|
|
1735
|
-
showArrow: true,
|
|
1736
|
-
maxTagCount: 1,
|
|
1737
|
-
optionFilterProp: 'children',
|
|
1738
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1739
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1740
|
-
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1741
|
-
},
|
|
1742
|
-
}
|
|
1743
|
-
},
|
|
1744
|
-
{
|
|
1745
|
-
name: 'qp-refCode-in', type: 'treeSelect', label: '营销区域', field: {
|
|
1746
|
-
type: 'treeSelect',
|
|
1747
|
-
props: {
|
|
1748
|
-
multiple: true,
|
|
1749
|
-
treeData: [],
|
|
1750
|
-
treeCheckable: false,
|
|
1751
|
-
notFoundContent: '暂无数据',
|
|
1752
|
-
allowClear: true,
|
|
1753
|
-
showSearch: true,
|
|
1754
|
-
showArrow: true,
|
|
1755
|
-
maxTagCount: 1,
|
|
1756
|
-
optionFilterProp: 'children',
|
|
1757
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1758
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1759
|
-
|
|
1760
|
-
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1761
|
-
},
|
|
1762
|
-
}
|
|
1763
|
-
},
|
|
1764
|
-
];
|
|
1602
|
+
]
|
|
1765
1603
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
1766
1604
|
Promise.all([
|
|
1767
1605
|
loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {},getQueryHeadersItem(queryHeaderParams,'qp-createOrgCode-eq')),
|
|
1768
|
-
loadSelectSource(`/channel-manage/channelInfo/tree`, {
|
|
1769
|
-
'qp-status-eq': 10,
|
|
1770
|
-
'qp-isMain-eq': 1,
|
|
1771
|
-
'qp-type-in': '1,2',
|
|
1772
|
-
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1773
|
-
loadSelectSource(`/channel-manage/tagNode/getTree/10`, {
|
|
1774
|
-
'qp-status-eq': 1,
|
|
1775
|
-
},getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
|
|
1776
1606
|
]).then((x: any)=>{
|
|
1777
1607
|
const firstElement = x?.[0];
|
|
1778
1608
|
const allList = firstElement && [firstElement, firstElement];
|
|
1779
1609
|
formatSource(allList,0, 2, tableSearchForm);
|
|
1780
1610
|
formatSource(allList,1, 3, tableSearchForm);
|
|
1781
|
-
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1782
|
-
const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
|
|
1783
|
-
formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1784
|
-
formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
|
|
1785
1611
|
})
|
|
1786
1612
|
modalTableProps = {
|
|
1787
1613
|
modalTableTitle: '选择客户',
|
|
@@ -1811,19 +1637,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1811
1637
|
title: '使用组织',
|
|
1812
1638
|
dataIndex: 'salesOrgName',
|
|
1813
1639
|
defaultSort: 4,
|
|
1814
|
-
width: 100,
|
|
1815
|
-
},
|
|
1816
|
-
{
|
|
1817
|
-
title: '所属销售渠道',
|
|
1818
|
-
dataIndex: 'channelName',
|
|
1819
|
-
defaultSort: 5,
|
|
1820
|
-
width: 100,
|
|
1821
|
-
},
|
|
1822
|
-
{
|
|
1823
|
-
title: '营销区域',
|
|
1824
|
-
dataIndex: 'commonRelationAreaName',
|
|
1825
|
-
defaultSort: 6,
|
|
1826
|
-
width: 100,
|
|
1827
1640
|
},
|
|
1828
1641
|
],
|
|
1829
1642
|
...modalTableBusProps
|
|
@@ -2091,7 +1904,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2091
1904
|
optionFilterProp: 'children',
|
|
2092
1905
|
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2093
1906
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
2094
|
-
|
|
1907
|
+
|
|
2095
1908
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
2096
1909
|
},
|
|
2097
1910
|
} },
|
|
@@ -2109,7 +1922,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2109
1922
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
2110
1923
|
},
|
|
2111
1924
|
} ,
|
|
2112
|
-
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
1925
|
+
initialSource: getDictionarySource('BUSINESS_StoreType')
|
|
2113
1926
|
},
|
|
2114
1927
|
]
|
|
2115
1928
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import React, { useState } from 'react';
|
|
3
2
|
import { Table, Tooltip, Typography } from 'antd';
|
|
4
3
|
import { Resizable } from 'react-resizable';
|
|
@@ -82,9 +81,9 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
82
81
|
|
|
83
82
|
/**
|
|
84
83
|
* 新增函数,用于根据传入的小数位数进行四舍五入
|
|
85
|
-
* @param number
|
|
86
|
-
* @param decimalPlaces
|
|
87
|
-
* @returns
|
|
84
|
+
* @param number
|
|
85
|
+
* @param decimalPlaces
|
|
86
|
+
* @returns
|
|
88
87
|
*/
|
|
89
88
|
roundToDecimalPlaces = (number: any, decimalPlaces: number) => {
|
|
90
89
|
const factor = Math.pow(10, (decimalPlaces || 2));
|
|
@@ -93,7 +92,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
93
92
|
|
|
94
93
|
/**
|
|
95
94
|
* 合计行逻辑
|
|
96
|
-
* @returns
|
|
95
|
+
* @returns
|
|
97
96
|
*/
|
|
98
97
|
getTableSummaryInfo = () => {
|
|
99
98
|
const { summary = undefined, rowSelection, expandable, modeType, dataSource, isSpecial = false, }: any = this.props;
|
|
@@ -233,7 +232,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
233
232
|
|
|
234
233
|
/**
|
|
235
234
|
* 处理行点击事件
|
|
236
|
-
* @param record
|
|
235
|
+
* @param record
|
|
237
236
|
*/
|
|
238
237
|
handleRowClick = (record: any) => {
|
|
239
238
|
const { selectedRowKeys, selectedRows, } = this.state;
|
|
@@ -317,7 +316,7 @@ export default class ColumnSettingTable extends React.Component {
|
|
|
317
316
|
...propRowSelection,
|
|
318
317
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
319
318
|
onChange: (selectedRowKeys: any, selectedRows: any) => {
|
|
320
|
-
this.setState({
|
|
319
|
+
this.setState({
|
|
321
320
|
selectedRowKeys,
|
|
322
321
|
selectedRows
|
|
323
322
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
2
|
import { Table as SulaTable, request } from 'bssula';
|
|
4
3
|
import { Resizable } from 'react-resizable';
|
|
@@ -23,7 +22,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
23
22
|
showColumns: [],
|
|
24
23
|
selectedRowKeys: [], // 新增状态,用于跟踪选中的行的键
|
|
25
24
|
selectedRows: [],
|
|
26
|
-
showSummary: null
|
|
25
|
+
showSummary: null
|
|
27
26
|
}
|
|
28
27
|
this.sulaTableRef = React.createRef<any>();
|
|
29
28
|
}
|
|
@@ -80,9 +79,9 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
80
79
|
|
|
81
80
|
/**
|
|
82
81
|
* 新增函数,用于根据传入的小数位数进行四舍五入
|
|
83
|
-
* @param number
|
|
84
|
-
* @param decimalPlaces
|
|
85
|
-
* @returns
|
|
82
|
+
* @param number
|
|
83
|
+
* @param decimalPlaces
|
|
84
|
+
* @returns
|
|
86
85
|
*/
|
|
87
86
|
roundToDecimalPlaces = (number: any, decimalPlaces: number) => {
|
|
88
87
|
const factor = Math.pow(10, (decimalPlaces || 2));
|
|
@@ -91,7 +90,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
92
|
* 合计行逻辑
|
|
94
|
-
* @returns
|
|
93
|
+
* @returns
|
|
95
94
|
*/
|
|
96
95
|
getTableSummaryInfo = () => {
|
|
97
96
|
const { summary = undefined, rowSelection, expandable, isSpecial = false, modeType }: any = this.props;
|
|
@@ -168,10 +167,10 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
168
167
|
</Table.Summary.Row>
|
|
169
168
|
</Table.Summary>
|
|
170
169
|
);
|
|
171
|
-
|
|
170
|
+
|
|
172
171
|
return () => summaryDom;
|
|
173
|
-
};
|
|
174
|
-
|
|
172
|
+
};
|
|
173
|
+
|
|
175
174
|
handledynamicColumns = (col: any[]) => {
|
|
176
175
|
let { dynamicColumns, modeType }: any = this.props;
|
|
177
176
|
col = col.map((item: any) => {
|
|
@@ -206,7 +205,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
206
205
|
|
|
207
206
|
ResizeableTitle = (props: any) => {
|
|
208
207
|
const { onResize, width, ...restProps } = props;
|
|
209
|
-
|
|
208
|
+
|
|
210
209
|
const [innerWidth, setInnerWidth] = useState(width);
|
|
211
210
|
const [isResizing, setIsResizing] = useState(false); // 标记是否正在拖拽
|
|
212
211
|
const [isDragging, setIsDragging] = useState(false); // 标记拖拽句柄是否被拖拽
|
|
@@ -214,9 +213,9 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
214
213
|
const markerPosition = useRef({ left: 0, top: 0 });
|
|
215
214
|
const currentStart = useRef(0);
|
|
216
215
|
const uuidref = useRef(uuid());
|
|
217
|
-
|
|
216
|
+
|
|
218
217
|
const prevWidthRef = useRef(width);
|
|
219
|
-
|
|
218
|
+
|
|
220
219
|
const handleMouseDown = (e: any) => {
|
|
221
220
|
currentStart.current = e.clientX;
|
|
222
221
|
markerPosition.current = { left: e.clientX, top: e.clientY }
|
|
@@ -224,35 +223,35 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
224
223
|
document.addEventListener('mousemove', handleMouseMove);
|
|
225
224
|
document.addEventListener('mouseup', handleMouseUp);
|
|
226
225
|
};
|
|
227
|
-
|
|
226
|
+
|
|
228
227
|
const handleMouseMove = (e: any) => {
|
|
229
228
|
e.stopPropagation();
|
|
230
229
|
e.preventDefault();
|
|
231
230
|
// 更新标记位置
|
|
232
231
|
markerPosition.current = { left: e.clientX, top: e.clientY }
|
|
233
232
|
const dom: HTMLElement | null = document.getElementById('text1');
|
|
234
|
-
|
|
233
|
+
|
|
235
234
|
if (dom && dom.style) {
|
|
236
235
|
dom.style.left = `${e.clientX}px`;
|
|
237
236
|
dom.style.top = `${e.clientY - 20}px`;
|
|
238
237
|
}
|
|
239
238
|
};
|
|
240
|
-
|
|
239
|
+
|
|
241
240
|
const handleMouseUp = (e: any) => {
|
|
242
241
|
document.removeEventListener('mousemove', handleMouseMove);
|
|
243
242
|
document.removeEventListener('mouseup', handleMouseUp);
|
|
244
243
|
setIsResizing(false);
|
|
245
244
|
};
|
|
246
|
-
|
|
245
|
+
|
|
247
246
|
const handleresize = (e: any, data: any, title: string) => {
|
|
248
247
|
const newWidth = data?.size?.width || 0;
|
|
249
248
|
setInnerWidth(newWidth); // 更新内部分宽度
|
|
250
249
|
};
|
|
251
|
-
|
|
250
|
+
|
|
252
251
|
const handleResizeStart = () => {
|
|
253
252
|
setIsResizing(true);
|
|
254
253
|
};
|
|
255
|
-
|
|
254
|
+
|
|
256
255
|
const handleResizeStop = (e: any, data: any) => {
|
|
257
256
|
setIsResizing(false);
|
|
258
257
|
if (onResize) {
|
|
@@ -266,11 +265,11 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
266
265
|
setInnerWidth(width);
|
|
267
266
|
}
|
|
268
267
|
}, [width]);
|
|
269
|
-
|
|
268
|
+
|
|
270
269
|
const thStyle = {
|
|
271
270
|
boxShadow: isResizing ? '2px 2px 10px rgba(0, 0, 0, 0.3)' : 'none',
|
|
272
271
|
};
|
|
273
|
-
|
|
272
|
+
|
|
274
273
|
return (
|
|
275
274
|
<Resizable
|
|
276
275
|
width={innerWidth}
|
|
@@ -334,7 +333,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
334
333
|
|
|
335
334
|
/**
|
|
336
335
|
* 处理行点击事件
|
|
337
|
-
* @param record
|
|
336
|
+
* @param record
|
|
338
337
|
*/
|
|
339
338
|
handleRowClick = (record: any) => {
|
|
340
339
|
const { selectedRowKeys, selectedRows, } = this.state;
|
|
@@ -421,7 +420,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
421
420
|
...propRowSelection,
|
|
422
421
|
selectedRowKeys: this.state.selectedRowKeys,
|
|
423
422
|
onChange: (selectedRowKeys: any, selectedRows: any) => {
|
|
424
|
-
this.setState({
|
|
423
|
+
this.setState({
|
|
425
424
|
selectedRowKeys,
|
|
426
425
|
selectedRows
|
|
427
426
|
});
|
|
@@ -437,7 +436,7 @@ export default class ColumnSettingSulaTable extends React.Component {
|
|
|
437
436
|
};
|
|
438
437
|
},
|
|
439
438
|
}
|
|
440
|
-
|
|
439
|
+
|
|
441
440
|
return (
|
|
442
441
|
<div style={{ position: 'relative' }}>
|
|
443
442
|
<span style={{ position: 'absolute', zIndex: '10', right: '8px', top: '10px' }} className="ant-dropdown-link">
|
|
@@ -17,7 +17,8 @@ import {
|
|
|
17
17
|
Menu,
|
|
18
18
|
Tooltip,
|
|
19
19
|
message,
|
|
20
|
-
Upload
|
|
20
|
+
Upload,
|
|
21
|
+
Spin
|
|
21
22
|
} from 'antd';
|
|
22
23
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
23
24
|
import {
|
|
@@ -31,6 +32,7 @@ import './index.less';
|
|
|
31
32
|
import _ from "lodash"
|
|
32
33
|
import { judgeIsRequestError } from '@/utils/requestUtils';
|
|
33
34
|
import { readerXlsxToList } from '@/utils/xlsxUtil';
|
|
35
|
+
import { loadLuckysheet } from '@/utils/luckysheetLoader';
|
|
34
36
|
|
|
35
37
|
// const luckysheet = window.luckysheet;
|
|
36
38
|
|
|
@@ -154,6 +156,9 @@ class DataImport extends React.Component {
|
|
|
154
156
|
items: [...itemsTemp],
|
|
155
157
|
resultData: [],
|
|
156
158
|
errorListCheck: false,
|
|
159
|
+
luckysheetLoading: false,
|
|
160
|
+
luckysheetLoadError: null,
|
|
161
|
+
luckysheetReady: false,
|
|
157
162
|
};
|
|
158
163
|
}
|
|
159
164
|
|
|
@@ -376,8 +381,32 @@ class DataImport extends React.Component {
|
|
|
376
381
|
};
|
|
377
382
|
};
|
|
378
383
|
|
|
379
|
-
componentDidMount() {
|
|
380
|
-
|
|
384
|
+
async componentDidMount() {
|
|
385
|
+
this.setState({ luckysheetLoading: true });
|
|
386
|
+
|
|
387
|
+
try {
|
|
388
|
+
await loadLuckysheet();
|
|
389
|
+
|
|
390
|
+
// 重新获取luckysheet实例
|
|
391
|
+
luckysheet = window.luckysheet || window.top.luckysheet;
|
|
392
|
+
|
|
393
|
+
if (luckysheet) {
|
|
394
|
+
luckysheet.create(this.setConfig([]));
|
|
395
|
+
this.setState({
|
|
396
|
+
luckysheetReady: true,
|
|
397
|
+
luckysheetLoading: false,
|
|
398
|
+
luckysheetLoadError: null
|
|
399
|
+
});
|
|
400
|
+
} else {
|
|
401
|
+
throw new Error('Luckysheet 加载失败');
|
|
402
|
+
}
|
|
403
|
+
} catch (error) {
|
|
404
|
+
console.error('加载 Luckysheet 失败:', error);
|
|
405
|
+
this.setState({
|
|
406
|
+
luckysheetLoading: false,
|
|
407
|
+
luckysheetLoadError: error.message || '加载失败'
|
|
408
|
+
});
|
|
409
|
+
}
|
|
381
410
|
}
|
|
382
411
|
|
|
383
412
|
componentWillUnmount() {
|
|
@@ -760,6 +789,50 @@ class DataImport extends React.Component {
|
|
|
760
789
|
</div>
|
|
761
790
|
|
|
762
791
|
<div style={{ position: 'relative', height: '400px' }}>
|
|
792
|
+
{this.state.luckysheetLoading && (
|
|
793
|
+
<div style={{
|
|
794
|
+
position: 'absolute',
|
|
795
|
+
top: 0,
|
|
796
|
+
left: 0,
|
|
797
|
+
right: 0,
|
|
798
|
+
bottom: 0,
|
|
799
|
+
display: 'flex',
|
|
800
|
+
alignItems: 'center',
|
|
801
|
+
justifyContent: 'center',
|
|
802
|
+
backgroundColor: 'rgba(255, 255, 255, 0.8)',
|
|
803
|
+
zIndex: 1000
|
|
804
|
+
}}>
|
|
805
|
+
<Spin size="large" tip="正在加载 Luckysheet..." />
|
|
806
|
+
</div>
|
|
807
|
+
)}
|
|
808
|
+
{this.state.luckysheetLoadError && (
|
|
809
|
+
<div style={{
|
|
810
|
+
position: 'absolute',
|
|
811
|
+
top: 0,
|
|
812
|
+
left: 0,
|
|
813
|
+
right: 0,
|
|
814
|
+
bottom: 0,
|
|
815
|
+
display: 'flex',
|
|
816
|
+
flexDirection: 'column',
|
|
817
|
+
alignItems: 'center',
|
|
818
|
+
justifyContent: 'center',
|
|
819
|
+
backgroundColor: 'rgba(255, 255, 255, 0.9)',
|
|
820
|
+
zIndex: 1000
|
|
821
|
+
}}>
|
|
822
|
+
<div style={{ marginBottom: 16, color: '#ff4d4f' }}>
|
|
823
|
+
加载失败: {this.state.luckysheetLoadError}
|
|
824
|
+
</div>
|
|
825
|
+
<Button
|
|
826
|
+
type="primary"
|
|
827
|
+
onClick={() => {
|
|
828
|
+
this.setState({ luckysheetLoadError: null });
|
|
829
|
+
this.componentDidMount();
|
|
830
|
+
}}
|
|
831
|
+
>
|
|
832
|
+
重新加载
|
|
833
|
+
</Button>
|
|
834
|
+
</div>
|
|
835
|
+
)}
|
|
763
836
|
<div id="luckysheet" style={luckyCss}></div>
|
|
764
837
|
</div>
|
|
765
838
|
{!this.props.notValid && <div className="sheet_table_footer">
|