@bit-sun/business-component 4.2.0-alpha.0 → 4.2.0-alpha.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.
Files changed (99) hide show
  1. package/.umirc.ts +9 -9
  2. package/dist/components/Business/AddSelectBusiness/index.d.ts +3 -4
  3. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -2
  4. package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +1 -2
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +1 -2
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +1 -2
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  11. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +1 -2
  12. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +1 -2
  13. package/dist/components/Business/BsLayouts/index.d.ts +1 -1
  14. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
  15. package/dist/components/Business/BsSulaQueryTable/index.d.ts +1 -2
  16. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +6 -6
  17. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +14 -15
  18. package/dist/components/Business/CommodityEntry/index.d.ts +1 -2
  19. package/dist/components/Business/CommonAlert/index.d.ts +1 -2
  20. package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
  21. package/dist/components/Business/DetailPageWrapper/index.d.ts +12 -12
  22. package/dist/components/Business/HomePageWrapper/index.d.ts +1 -2
  23. package/dist/components/Business/ItemPropertySelector/index.d.ts +1 -2
  24. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +1 -2
  25. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +1 -2
  26. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +1 -2
  27. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +1 -2
  28. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +1 -2
  29. package/dist/components/Business/PropertyModal/index.d.ts +1 -2
  30. package/dist/components/Business/PropertyModal/propertyGroup.d.ts +1 -1
  31. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  32. package/dist/components/Business/StateFlow/index.d.ts +1 -2
  33. package/dist/components/Business/SystemLog/index.d.ts +78 -0
  34. package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
  35. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +6 -6
  36. package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +1 -2
  37. package/dist/components/Business/columnSettingTable/index.d.ts +3 -3
  38. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +3 -3
  39. package/dist/components/Business/columnSettingTable/utils.d.ts +1 -2
  40. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  41. package/dist/components/Common/ParagraphCopier/index.d.ts +1 -1
  42. package/dist/components/Common/Section/index.d.ts +1 -1
  43. package/dist/components/Functional/AddSelect/index.d.ts +1 -2
  44. package/dist/components/Functional/AuthButton/index.d.ts +1 -2
  45. package/dist/components/Functional/DataImport/index.d.ts +3 -3
  46. package/dist/components/Functional/DataValidation/index.d.ts +5 -5
  47. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -2
  48. package/dist/components/Functional/QueryMutipleInput/index.d.ts +3 -3
  49. package/dist/components/Functional/QueryMutipleSelect/index.d.ts +1 -2
  50. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  51. package/dist/components/Functional/SearchSelect/utils.d.ts +2 -3
  52. package/dist/components/Functional/TreeSearchSelect/index.d.ts +1 -2
  53. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +1 -1
  54. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +1 -2
  55. package/dist/components/Solution/RuleComponent/Formula.d.ts +1 -2
  56. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +1 -2
  57. package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +1 -2
  58. package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +1 -2
  59. package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
  60. package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.esm.js +2072 -1246
  63. package/dist/index.js +2071 -1241
  64. package/dist/plugin/TableColumnSetting/index.d.ts +6 -5
  65. package/dist/utils/TableUtils.d.ts +18 -19
  66. package/dist/utils/utils.d.ts +41 -0
  67. package/docs/flow-control-readme.md +283 -0
  68. package/package.json +11 -11
  69. package/src/components/Business/AddSelectBusiness/index.md +8 -2
  70. package/src/components/Business/AddSelectBusiness/index.tsx +3 -0
  71. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +1 -1
  72. package/src/components/Business/BsLayouts/Components/RightContent/home.less +1 -1
  73. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +2 -2
  74. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +1 -1
  75. package/src/components/Business/BsSulaQueryTable/index.md +57 -4
  76. package/src/components/Business/BsSulaQueryTable/index.tsx +164 -7
  77. package/src/components/Business/BsSulaQueryTable/setting.tsx +6 -0
  78. package/src/components/Business/BsSulaQueryTable/utils.less +1 -1
  79. package/src/components/Business/DetailPageWrapper/index.tsx +81 -1
  80. package/src/components/Business/DetailPageWrapper/readme.md +89 -0
  81. package/src/components/Business/SearchSelect/BusinessUtils.tsx +363 -41
  82. package/src/components/Business/SystemLog/index.md +37 -0
  83. package/src/components/Business/SystemLog/index.tsx +87 -0
  84. package/src/components/Business/columnSettingTable/index.tsx +7 -6
  85. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +23 -22
  86. package/src/components/Functional/AddSelect/index.tsx +112 -3
  87. package/src/components/Functional/DataValidation/index.tsx +22 -3
  88. package/src/components/Functional/QueryMutipleInput/index.tsx +12 -3
  89. package/src/components/Functional/SearchSelect/index.tsx +68 -10
  90. package/src/components/Functional/SearchSelect/utils.tsx +4 -1
  91. package/src/components/Solution/RuleComponent/InnerSelect.tsx +1 -0
  92. package/src/components/Solution/RuleComponent/RenderCompItem.tsx +11 -2
  93. package/src/components/Solution/RuleComponent/RenderCompItem_README.md +189 -0
  94. package/src/components/Solution/RuleComponent/index.js +16 -3
  95. package/src/components/Solution/RuleComponent/ruleFiled.js +25 -1
  96. package/src/index.ts +7 -0
  97. package/src/plugin/TableColumnSetting/index.tsx +75 -9
  98. package/src/utils/TableUtils.less +1 -1
  99. package/src/utils/utils.ts +41 -1
@@ -6,13 +6,14 @@ import { handleTextOverflow, tableColumnsImage, handleTooltip } from '@/componen
6
6
  import { getSkuImg } from '@/utils/TableUtils';
7
7
  import { getEmployeeCode, getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
8
8
  import { Image } from 'antd';
9
+ import { isBoolean } from 'lodash';
9
10
 
10
11
  const hasDictSharingType = getDictionarySource('UC000013')?.length;
11
12
  const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
12
13
 
13
14
  export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
14
15
  const { requestConfig:requestConfigProp={}, selectProps:selectConfigProps={}, modalTableProps:modalTableBusProps={}, hiddenFields=[]} = parentProps || {};
15
-
16
+
16
17
  // 默认type === 'supplier' 供应商选择器
17
18
  let requestConfig = {
18
19
  init: true,
@@ -42,29 +43,40 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
42
43
  }
43
44
 
44
45
  // 格式化树选择器数据源
45
- const mapSearchTree = (treeDataItem: any, resKeyValue: any, disabledJudge?: any) => {
46
- const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
46
+ const mapSearchTree = (treeDataItem: any, resKeyValue: any, disabledJudge?: any, childrenKey?: any) => {
47
+ const haveChildren = Array.isArray(treeDataItem[childrenKey]) && treeDataItem[childrenKey].length > 0;
47
48
  return {
48
49
  title: treeDataItem[resKeyValue[1]],
49
50
  value: treeDataItem[resKeyValue[0]],
50
51
  parentId: treeDataItem.parent,
51
52
  data: { ...treeDataItem },
52
53
  isLeaf: !haveChildren,
53
- disabled: disabledJudge!==undefined? disabledJudge : haveChildren,
54
- children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue, disabledJudge)) : [],
54
+ disabled: disabledJudge !== undefined ? isBoolean(disabledJudge) ? disabledJudge : disabledJudge(treeDataItem) : haveChildren,
55
+ children: haveChildren ? treeDataItem[childrenKey].map((i: any) => mapSearchTree(i, resKeyValue, disabledJudge, childrenKey)) : [],
55
56
  };
56
57
  };
57
- const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
58
+ const formatTreeDataSource = (
59
+ reData: any,
60
+ position: number,
61
+ changePosition: number,
62
+ changeSearchForm: any,
63
+ resKeyValue=['id', 'name'],
64
+ childrenKey = 'children',
65
+ nodeDisabledJudge?: (data: any) => boolean, // 树节点能不能选 函数判断
66
+ ) => {
58
67
  let data = reData && reData[position]?.data;
59
68
  let disabledJudge;
60
69
  if(data && typeof data === 'object' && !Array.isArray(data) && Object.keys(data).length > 0) {
61
70
  data = [data];
62
71
  disabledJudge=false
63
72
  }
73
+ if(nodeDisabledJudge) {
74
+ disabledJudge = nodeDisabledJudge;
75
+ }
64
76
  const formatData = (data &&
65
77
  Array.isArray(data) &&
66
78
  data.length &&
67
- data.map((ites: any) => mapSearchTree(ites, resKeyValue, disabledJudge))) ||
79
+ data.map((ites: any) => mapSearchTree(ites, resKeyValue, disabledJudge, childrenKey))) ||
68
80
  []
69
81
  changeSearchForm[changePosition].field.props.treeData = formatData;
70
82
  }
@@ -332,7 +344,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
332
344
  }
333
345
  tableSearchForm = [
334
346
  { name: 'qp-skuCode-in', label: 'SKU编码', field: {
335
- type:'multipleQuerySearchSelect',
347
+ type:'multipleQuerySearchSelect',
336
348
  props: {
337
349
  selectProps: {
338
350
  mode: "multiple",
@@ -354,7 +366,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
354
366
  } },
355
367
  { name: 'qp-skuName-like', label: 'SKU名称' },
356
368
  { name: 'qp-itemCode-in', label: 'SPU编码', field: {
357
- type:'multipleQuerySearchSelect',
369
+ type:'multipleQuerySearchSelect',
358
370
  props: {
359
371
  selectProps: {
360
372
  placeholder: '请输入SPU编码查询'
@@ -511,11 +523,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
511
523
  placeholder: '输入商品(SPU)编码或名称',
512
524
  renderTableColumns: [
513
525
  {
514
- title: '商品编码(SPU)',
526
+ title: 'SPU编码',
515
527
  dataIndex: 'itemCode',
516
528
  },
517
529
  {
518
- title: '商品名称(SPU)',
530
+ title: 'SPU名称',
519
531
  dataIndex: 'name',
520
532
  },
521
533
  ],
@@ -535,8 +547,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
535
547
  ...requestConfigProp,
536
548
  }
537
549
  tableSearchForm = [
538
- { name: 'itemCode*multiInput', label: '商品编码(SPU)', type: 'multipleQueryInput' },
539
- { name: 'name*multiInput', label: '商品名称(SPU)', type: 'multipleQueryInput' },
550
+ { name: 'itemCode*multiInput', label: 'SPU编码', type: 'multipleQueryInput' },
551
+ { name: 'name*multiInput', label: 'SPU名称', type: 'multipleQueryInput' },
540
552
  { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
541
553
  type: 'select',
542
554
  props: {
@@ -614,12 +626,12 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
614
626
  defaultSort: 0,
615
627
  },
616
628
  {
617
- title: '商品编码(SPU)',
629
+ title: 'SPU编码',
618
630
  dataIndex: 'itemCode',
619
631
  defaultSort: 1,
620
632
  },
621
633
  {
622
- title: '商品名称(SPU) ',
634
+ title: 'SPU名称',
623
635
  dataIndex: 'name',
624
636
  defaultSort: 2,
625
637
  },
@@ -721,9 +733,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
721
733
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
722
734
  },
723
735
  } },
724
- {
725
- name: 'qp-year-in',
726
- label: '年份',
736
+ {
737
+ name: 'qp-year-in',
738
+ label: '年份',
727
739
  field: {
728
740
  type: 'itemPropertySelector',
729
741
  props: {
@@ -732,9 +744,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
732
744
  }
733
745
  }
734
746
  },
735
- {
736
- name: 'qp-season-in',
737
- label: '季节',
747
+ {
748
+ name: 'qp-season-in',
749
+ label: '季节',
738
750
  field: {
739
751
  type: 'itemPropertySelector',
740
752
  props: {
@@ -743,9 +755,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
743
755
  }
744
756
  }
745
757
  },
746
- {
747
- name: 'qp-zzdlbm-in',
748
- label: '大类',
758
+ {
759
+ name: 'qp-zzdlbm-in',
760
+ label: '大类',
749
761
  field: {
750
762
  type: 'itemPropertySelector',
751
763
  props: {
@@ -754,9 +766,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
754
766
  }
755
767
  }
756
768
  },
757
- {
758
- name: 'qp-zzzlbm-in',
759
- label: '中类',
769
+ {
770
+ name: 'qp-zzzlbm-in',
771
+ label: '中类',
760
772
  field: {
761
773
  type: 'itemPropertySelector',
762
774
  props: {
@@ -765,9 +777,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
765
777
  }
766
778
  }
767
779
  },
768
- {
769
- name: 'qp-zzxlbm-in',
770
- label: '小类',
780
+ {
781
+ name: 'qp-zzxlbm-in',
782
+ label: '小类',
771
783
  field: {
772
784
  type: 'itemPropertySelector',
773
785
  props: {
@@ -958,7 +970,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
958
970
  ['colorName', 'categoryId', 'classId', 'brandId'],
959
971
  hiddenFields,
960
972
  );
961
- 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));
962
974
  requestConfig = {
963
975
  url: `${prefixUrl.selectPrefix}/skc/skcSelect`,
964
976
  filter: 'qp-code,name-orGroup,like', // 过滤参数
@@ -1186,12 +1198,84 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1186
1198
  sourceName: 'warehouseIds',
1187
1199
  ...requestConfigProp,
1188
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
+ })
1189
1217
  tableSearchForm = [
1190
1218
  { name: 'realWarehouseName*multiInput', label: '逻辑仓名称', type: 'multipleQueryInput' },
1191
1219
  { name: 'realWarehouseCode*multiInput', label: '逻辑仓编码', type: 'multipleQueryInput' },
1192
1220
  { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
1193
1221
  { name: 'belongArea', field: {type: 'select', props: {mode: 'multiple',}}, label: '管理大区', initialSource: getDictionarySource('BUSINESS_belongArea'), },
1194
- ...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-isEnable-eq', type: 'select', label: '逻辑仓状态', initialSource: getDictionarySource('SC00001') }]:[])
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') }]:[]),
1195
1279
  ]
1196
1280
  modalTableProps = {
1197
1281
  modalTableTitle: '选择逻辑仓',
@@ -1218,10 +1302,36 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1218
1302
  defaultSort: 3,
1219
1303
  render: (text: number) => getDictionaryTextByValue('SC00004', text),
1220
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
+ },
1221
1331
  ...(modalTableBusProps?.needStatusSearch?[{
1222
1332
  title: '状态',
1223
1333
  dataIndex: 'isEnable',
1224
- defaultSort: 4,
1334
+ defaultSort: 8,
1225
1335
  render: (text: number) => getDictionaryTextByValue('SC00001', text),
1226
1336
  }]:[]),
1227
1337
  ],
@@ -1276,13 +1386,39 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1276
1386
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1277
1387
  },
1278
1388
  } },
1279
- ...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[])
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') }]:[]),
1280
1409
  ]
1281
1410
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
1282
1411
  Promise.all([
1283
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')),
1284
1418
  ]).then((x: any)=>{
1285
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)
1286
1422
  })
1287
1423
  modalTableProps = {
1288
1424
  modalTableTitle: '选择运营仓',
@@ -1314,6 +1450,12 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1314
1450
  defaultSort: 4,
1315
1451
  render: (text: number) => getDictionaryTextByValue('SC00001', text),
1316
1452
  }]:[]),
1453
+ {
1454
+ title: '所属销售渠道',
1455
+ dataIndex: 'channelName',
1456
+ defaultSort: 5,
1457
+ width: 100,
1458
+ },
1317
1459
  ],
1318
1460
  ...modalTableBusProps,
1319
1461
  }
@@ -1587,15 +1729,66 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1587
1729
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1588
1730
  },
1589
1731
  } },
1590
- ]
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
+ ];
1591
1772
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
1592
1773
  Promise.all([
1593
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')),
1594
1783
  ]).then((x: any)=>{
1595
1784
  const firstElement = x?.[0];
1596
1785
  const allList = firstElement && [firstElement, firstElement];
1597
1786
  formatSource(allList,0, 2, tableSearchForm);
1598
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)
1599
1792
  })
1600
1793
  modalTableProps = {
1601
1794
  modalTableTitle: '选择客户',
@@ -1625,6 +1818,19 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1625
1818
  title: '使用组织',
1626
1819
  dataIndex: 'salesOrgName',
1627
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,
1628
1834
  },
1629
1835
  ],
1630
1836
  ...modalTableBusProps
@@ -1661,8 +1867,10 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1661
1867
  ...requestConfigProp,
1662
1868
  }
1663
1869
  tableSearchForm = [
1664
- { name: 'qp-name-like', label: '店铺名称' },
1665
- { name: 'qp-code-like', label: '店铺编码' },
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: '店铺编码' },
1666
1874
  { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1667
1875
  type: 'select',
1668
1876
  props: {
@@ -1836,6 +2044,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1836
2044
  mappingValueField: 'code',
1837
2045
  otherParams: {
1838
2046
  sorter: 'desc-id',
2047
+ 'qp-status-in': 10,
1839
2048
  ...(requestConfigProp?.addOtherParams || {}),
1840
2049
  }, // 默认参数
1841
2050
  sourceName: 'code',
@@ -1845,7 +2054,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1845
2054
  { name: 'name*multiInput', label: '商店名称', type: 'multipleQueryInput' },
1846
2055
  { name: 'code*multiInput', label: '商店编码', type: 'multipleQueryInput' },
1847
2056
  { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1848
- { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
2057
+ // { name: 'qp-status-in', type: 'select', label: '商店状态', initialSource: shopFile2Status },
1849
2058
  { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1850
2059
  type: 'select',
1851
2060
  props: {
@@ -1860,6 +2069,75 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1860
2069
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1861
2070
  },
1862
2071
  } },
2072
+ { name: 'qp-channelCode-in', type: 'treeSelect', label: '所属销售渠道', field: {
2073
+ type: 'treeSelect',
2074
+ props: {
2075
+ multiple: true,
2076
+ treeData: [],
2077
+ treeCheckable: false,
2078
+ notFoundContent: '暂无数据',
2079
+ allowClear: true,
2080
+ showSearch: true,
2081
+ showArrow: true,
2082
+ maxTagCount: 1,
2083
+ optionFilterProp: 'children',
2084
+ filterOption: (input: string, option: { props: { children: string } }) =>
2085
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
2086
+ showCheckedStrategy: 'TreeSelect.SHOW_ALL',
2087
+ },
2088
+ } },
2089
+ { name: 'qp-commonRelationAreaCode-in', type: 'treeSelect', label: '营销区域', field: {
2090
+ type: 'treeSelect',
2091
+ props: {
2092
+ multiple: true,
2093
+ treeData: [],
2094
+ treeCheckable: false,
2095
+ notFoundContent: '暂无数据',
2096
+ allowClear: true,
2097
+ showSearch: true,
2098
+ showArrow: true,
2099
+ maxTagCount: 1,
2100
+ optionFilterProp: 'children',
2101
+ filterOption: (input: string, option: { props: { children: string } }) =>
2102
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
2103
+
2104
+ showCheckedStrategy: 'TreeSelect.SHOW_ALL',
2105
+ },
2106
+ } },
2107
+ { name: 'qp-businessType-in', type: 'select', label: '店铺性质', field: {
2108
+ type: 'select',
2109
+ props: {
2110
+ mode: 'multiple',
2111
+ notFoundContent: '暂无数据',
2112
+ allowClear: true,
2113
+ showSearch: true,
2114
+ showArrow: true,
2115
+ maxTagCount: 1,
2116
+ optionFilterProp: 'children',
2117
+ filterOption: (input: string, option: { props: { children: string } }) =>
2118
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
2119
+ },
2120
+ } ,
2121
+ initialSource: getDictionarySource('BUSINESS_StoreType')
2122
+ },
2123
+ {
2124
+ name: "qp-brandCode-in",
2125
+ label: "品牌",
2126
+ field: {
2127
+ type:'select',
2128
+ props: {
2129
+ mode: 'multiple',
2130
+ notFoundContent: '暂无数据',
2131
+ allowClear: true,
2132
+ showSearch: true,
2133
+ showArrow: true,
2134
+ maxTagCount: 1,
2135
+ optionFilterProp: 'children',
2136
+ filterOption: (input: string, option: { props: { children: string } }) =>
2137
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
2138
+ },
2139
+ },
2140
+ },
1863
2141
  ]
1864
2142
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
1865
2143
  Promise.all([
@@ -1868,8 +2146,26 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1868
2146
  'qp-realOrg-eq': true,
1869
2147
  'qp-status-eq': 10
1870
2148
  },getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
2149
+ loadSelectSource(`${prefixUrl.formSelectFix}/channelInfo/tree`, {
2150
+ 'qp-status-eq': 10,
2151
+ 'qp-isMain-eq': 1,
2152
+ 'qp-type-in': '1,2',
2153
+ },getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
2154
+ loadSelectSource(`${prefixUrl.formSelectFix}/tagNode/getTree/10`, {
2155
+ 'qp-status-eq': 1,
2156
+ },getQueryHeadersItem(queryHeaderParams,'qp-orgCode-in')),
2157
+ loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
2158
+ pageSize: 5000,
2159
+ currentPage: 1,
2160
+ 'ctl-withAuth': true,
2161
+ },getQueryHeadersItem(queryHeaderParams,'ctl-withAuth'))
1871
2162
  ]).then((x: any)=>{
1872
- formatSource(x,0, 4, tableSearchForm);
2163
+ const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
2164
+ const areaDisabledJude = (data: any) => data['parent'] === '0'; // 所属营销区域 树节点不能点判断
2165
+ formatSource(x,0, 3, tableSearchForm);
2166
+ formatTreeDataSource(x, 1, 4, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
2167
+ formatTreeDataSource(x, 2, 5, tableSearchForm, ['code', 'name'], 'children', areaDisabledJude)
2168
+ formatSource(x,3, 7, tableSearchForm, ['brandCode', 'name']);
1873
2169
  })
1874
2170
  modalTableProps = {
1875
2171
  modalTableTitle: '选择商店',
@@ -1879,34 +2175,60 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1879
2175
  title: '序号',
1880
2176
  dataIndex: 'keyIndex',
1881
2177
  defaultSort: 0,
2178
+ width: 60,
1882
2179
  },
1883
2180
  {
1884
2181
  title: '商店编码',
1885
2182
  dataIndex: 'code',
1886
2183
  defaultSort: 1,
2184
+ width: 100,
1887
2185
  },
1888
2186
  {
1889
2187
  title: '商店名称',
1890
2188
  dataIndex: 'name',
1891
2189
  defaultSort: 2,
2190
+ width: 120,
1892
2191
  },
1893
2192
  {
1894
2193
  title: '商店类型',
1895
2194
  dataIndex: 'type',
1896
2195
  defaultSort: 3,
2196
+ width: 100,
1897
2197
  render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1898
2198
  },
1899
2199
  {
1900
2200
  title: '启用状态',
1901
2201
  dataIndex: 'status',
2202
+ width: 80,
1902
2203
  render: (text: number) => shopFile2Status.find((i: any) => i.value === text)?.text,
1903
2204
  },
1904
2205
  {
1905
2206
  title: '所属销售组织',
1906
2207
  dataIndex: 'orgName',
1907
2208
  defaultSort: 4,
2209
+ width: 95,
2210
+ },
2211
+ {
2212
+ title: '所属销售渠道',
2213
+ dataIndex: 'channelName',
2214
+ defaultSort: 5,
2215
+ width: 100,
2216
+ },
2217
+ {
2218
+ title: '营销区域',
2219
+ dataIndex: 'commonRelationAreaName',
2220
+ defaultSort: 6,
2221
+ width: 100,
2222
+ },
2223
+ {
2224
+ title: '店铺性质',
2225
+ dataIndex: 'businessType',
2226
+ defaultSort: 7,
2227
+ render: (text: any) => getDictionaryTextByValue('BUSINESS_StoreType', text),
2228
+ width: 80,
1908
2229
  },
1909
2230
  ],
2231
+ noEmptySearchField: true,
1910
2232
  ...modalTableBusProps
1911
2233
  }
1912
2234
  }
@@ -2199,7 +2521,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2199
2521
  } },
2200
2522
  ...(modalTableBusProps?.needTypeSearch?[{ name: 'qp-employmentType-eq', type: 'select', label: '员工类型', initialSource: employeeType }]:[]),
2201
2523
  { name: 'qp-email-like', label: '邮箱' },
2202
- { name: 'qp-officeTelephone-like', label: '手机号' },
2524
+ { name: 'qp-phone-like', label: '手机号' },
2203
2525
  ]
2204
2526
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
2205
2527
  Promise.all([
@@ -2252,7 +2574,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2252
2574
  },
2253
2575
  {
2254
2576
  title: '手机号',
2255
- dataIndex: 'officeTelephone',
2577
+ dataIndex: 'phone',
2256
2578
  defaultSort: 4,
2257
2579
  render: (text: any, record: any) => handleTextOverflow(text||record?.phone),
2258
2580
  },