@bit-sun/business-component 2.0.40 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +174 -174
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +3 -4
  9. package/dist/index.js +3 -4
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +71 -71
  18. package/src/assets/32.svg +27 -27
  19. package/src/assets/addIcon.svg +17 -17
  20. package/src/assets/allfunc.svg +27 -27
  21. package/src/assets/arrowRight.svg +24 -24
  22. package/src/assets/btn-delete.svg +29 -29
  23. package/src/assets/btn-edit.svg +19 -19
  24. package/src/assets/btn-more.svg +17 -17
  25. package/src/assets/btn-submit.svg +19 -19
  26. package/src/assets/caidan.svg +11 -11
  27. package/src/assets/close.svg +26 -26
  28. package/src/assets/drag.svg +17 -17
  29. package/src/assets/exportFail.svg +37 -37
  30. package/src/assets/exportProcessing.svg +28 -28
  31. package/src/assets/exportSuccess.svg +34 -34
  32. package/src/assets/fixed-left-active.svg +11 -11
  33. package/src/assets/fixed-left.svg +15 -15
  34. package/src/assets/fixed-right-active.svg +11 -11
  35. package/src/assets/fixed-right.svg +15 -15
  36. package/src/assets/guanbi.svg +15 -15
  37. package/src/assets/icon-quanping.svg +15 -15
  38. package/src/assets/icon-shezhi.svg +17 -17
  39. package/src/assets/label_icon_bottom.svg +25 -25
  40. package/src/assets/list-no-img.svg +21 -21
  41. package/src/assets/morentouxiang-32.svg +23 -23
  42. package/src/assets/scanning.svg +24 -24
  43. package/src/assets/upExport.svg +22 -22
  44. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  45. package/src/components/Business/AddSelectBusiness/index.tsx +290 -290
  46. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  47. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  48. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  49. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  58. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  59. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  60. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  61. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  62. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  63. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  64. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  65. package/src/components/Business/BsLayouts/index.less +79 -79
  66. package/src/components/Business/BsLayouts/index.tsx +1465 -1465
  67. package/src/components/Business/BsLayouts/service.ts +10 -10
  68. package/src/components/Business/BsLayouts/utils.tsx +210 -210
  69. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  70. package/src/components/Business/BsSulaQueryTable/index.tsx +505 -505
  71. package/src/components/Business/BsSulaQueryTable/setting.tsx +799 -799
  72. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  73. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  74. package/src/components/Business/CommodityEntry/index.md +70 -70
  75. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  76. package/src/components/Business/CommonAlert/index.tsx +23 -23
  77. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  78. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  79. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  80. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  81. package/src/components/Business/DetailPageWrapper/index.tsx +334 -334
  82. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  83. package/src/components/Business/HomePageWrapper/index.less +33 -33
  84. package/src/components/Business/HomePageWrapper/index.md +45 -45
  85. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  86. package/src/components/Business/SearchSelect/BusinessUtils.ts +1458 -1458
  87. package/src/components/Business/SearchSelect/common.ts +53 -53
  88. package/src/components/Business/SearchSelect/index.md +1137 -1137
  89. package/src/components/Business/SearchSelect/index.tsx +51 -51
  90. package/src/components/Business/SearchSelect/utils.ts +100 -100
  91. package/src/components/Business/StateFlow/index.less +130 -130
  92. package/src/components/Business/StateFlow/index.md +60 -60
  93. package/src/components/Business/StateFlow/index.tsx +29 -29
  94. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  95. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  96. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  97. package/src/components/Business/columnSettingTable/columnSetting.tsx +763 -763
  98. package/src/components/Business/columnSettingTable/index.less +247 -247
  99. package/src/components/Business/columnSettingTable/index.md +357 -357
  100. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  101. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  102. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  103. package/src/components/Functional/AddSelect/index.less +367 -367
  104. package/src/components/Functional/AddSelect/index.md +122 -122
  105. package/src/components/Functional/AddSelect/index.tsx +962 -962
  106. package/src/components/Functional/BillEntry/index.less +371 -371
  107. package/src/components/Functional/BillEntry/index.md +39 -39
  108. package/src/components/Functional/BillEntry/index.tsx +613 -613
  109. package/src/components/Functional/DataImport/index.less +63 -63
  110. package/src/components/Functional/DataImport/index.md +44 -44
  111. package/src/components/Functional/DataImport/index.tsx +689 -695
  112. package/src/components/Functional/DataValidation/index.less +63 -63
  113. package/src/components/Functional/DataValidation/index.md +38 -39
  114. package/src/components/Functional/DataValidation/index.tsx +681 -687
  115. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  116. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  117. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  118. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  119. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  120. package/src/components/Functional/SearchSelect/index.less +115 -115
  121. package/src/components/Functional/SearchSelect/index.md +141 -141
  122. package/src/components/Functional/SearchSelect/index.tsx +812 -812
  123. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  124. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  125. package/src/index.ts +31 -31
  126. package/src/styles/bsDefault.less +1906 -1906
  127. package/src/utils/CheckOneUser/index.md +39 -39
  128. package/src/utils/CheckOneUser/index.ts +51 -51
  129. package/src/utils/enumConfig.ts +9 -9
  130. package/src/utils/requestUtils.ts +33 -33
  131. package/src/utils/utils.ts +51 -51
  132. package/tsconfig.json +29 -29
  133. package/typings.d.ts +4 -4
@@ -1,1458 +1,1458 @@
1
- // 此文件用于 处理业务组件 所用到的公共方法
2
- // @ts-nocheck
3
- import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type } from './common';
4
- import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
- import ENUM from '@/utils/enumConfig';
6
-
7
- const hasDictSharingType = getDictionarySource('UC000013')?.length;
8
- const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
9
-
10
- export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: any, modalTableBusProps?:any) {
11
- // 默认type === 'supplier' 供应商选择器
12
- let requestConfig = {
13
- url: `${prefixUrl.selectPrefix}/supplier`,
14
- filter: 'qp-name,code-orGroup,like', // 过滤参数
15
- otherParams: {
16
- sorter: 'desc-id'
17
- }, // 默认参数
18
- ...requestConfigProp
19
- }
20
-
21
- /*
22
- * 处理 格式化下拉框数据源
23
- * reData 必传 promise返回响应的数据 格式为[{},{},{},...] Promise.all第一个参数数组有多少个数组长度就是多少,其中每个对象为每次请求的结果数据
24
- * 每个结果数据格式为{ status: '0', msg: 'success', data: { items: [], total: 1, size: 1, page: 1 }, traceId: 'baba..'}
25
- * position 必传 为获取Promise.all请求结果的位置
26
- * changePosition 必传 为搜索表单Form中需要更改数据源的Item项的位置
27
- * changeSearchForm 必传 为搜索表单Form数据
28
- * */
29
- const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
30
- const data = reData && reData[position]?.data;
31
- const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
32
- const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
33
- changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
34
- }
35
-
36
- // 格式化树选择器数据源
37
- const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
38
- const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
39
- return {
40
- title: treeDataItem[resKeyValue[1]],
41
- value: treeDataItem[resKeyValue[0]],
42
- parentId: treeDataItem.parent,
43
- data: { ...treeDataItem },
44
- isLeaf: !haveChildren,
45
- disabled: haveChildren,
46
- children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
47
- };
48
- };
49
- const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
50
- const data = reData && reData[position]?.data;
51
- const formatData = (data &&
52
- Array.isArray(data) &&
53
- data.length &&
54
- data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
55
- []
56
- changeSearchForm[changePosition].field.props.treeData = formatData;
57
- }
58
-
59
-
60
- let tableSearchForm: any [] = [];
61
- let modalTableProps = {
62
- modalTableTitle: '',
63
- tableSearchForm,
64
- tableColumns: [],
65
- ...modalTableBusProps,
66
- }
67
- let needModalTable = modalTableBusProps?.needModalTable !== undefined ? modalTableBusProps?.needModalTable : true;
68
-
69
- // 供应商选择器
70
- if(type === 'supplier') {
71
- tableSearchForm = [
72
- { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
73
- { name: 'qp-code-like', label: '供应商编码' },
74
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
75
- type: 'select',
76
- props: {
77
- mode: 'multiple',
78
- notFoundContent: '暂无数据',
79
- allowClear: true,
80
- showSearch: true,
81
- showArrow: true,
82
- maxTagCount: 1,
83
- optionFilterProp: 'children',
84
- filterOption: (input: string, option: { props: { children: string } }) =>
85
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
86
- },
87
- } },
88
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
89
- type: 'select',
90
- props: {
91
- mode: 'multiple',
92
- notFoundContent: '暂无数据',
93
- allowClear: true,
94
- showSearch: true,
95
- showArrow: true,
96
- maxTagCount: 1,
97
- optionFilterProp: 'children',
98
- filterOption: (input: string, option: { props: { children: string } }) =>
99
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
100
- },
101
- } },
102
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
103
- type: 'select',
104
- props: {
105
- mode: 'multiple',
106
- notFoundContent: '暂无数据',
107
- allowClear: true,
108
- showSearch: true,
109
- showArrow: true,
110
- maxTagCount: 1,
111
- optionFilterProp: 'children',
112
- filterOption: (input: string, option: { props: { children: string } }) =>
113
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
114
- },
115
- } },
116
- { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
117
- ]
118
- Promise.all([
119
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
120
- pageSize: 5000,
121
- currentPage: 1,
122
- 'qp-companyType-eq': '30',
123
- }),
124
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
125
- pageSize: 5000,
126
- currentPage: 1,
127
- }),
128
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
129
- pageSize: 5000,
130
- currentPage: 1,
131
- 'qp-companyType-eq': '20',
132
- })
133
- ]).then((x: any)=>{
134
- formatSource(x,0, 2, tableSearchForm);
135
- formatSource(x,1, 3, tableSearchForm);
136
- formatSource(x,2, 4, tableSearchForm);
137
- })
138
- modalTableProps = {
139
- modalTableTitle: '选择供应商',
140
- tableSearchForm,
141
- tableColumns: [
142
- {
143
- title: '供应商编码',
144
- dataIndex: 'code',
145
- },
146
- {
147
- title: '供应商名称',
148
- dataIndex: 'name',
149
- },
150
- {
151
- title: '归属集团',
152
- dataIndex: 'conglomerateName',
153
- },
154
- {
155
- title: '归属法人公司',
156
- dataIndex: 'legalCompanyName',
157
- },
158
- {
159
- title: '归属核算主体',
160
- dataIndex: 'accountingName',
161
- },
162
- {
163
- title: '共享类型',
164
- dataIndex: 'sharingType',
165
- render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
166
- },
167
- ],
168
- ...modalTableBusProps,
169
- }
170
- }
171
- if(type === 'supplier2') {
172
- // 版本2
173
- tableSearchForm = [
174
- { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
175
- { name: 'qp-code-like', label: '供应商编码' },
176
- { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
177
- type: 'select',
178
- props: {
179
- // mode: 'multiple',
180
- notFoundContent: '暂无数据',
181
- allowClear: true,
182
- showSearch: true,
183
- showArrow: true,
184
- // maxTagCount: 1,
185
- optionFilterProp: 'children',
186
- filterOption: (input: string, option: { props: { children: string } }) =>
187
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
188
- },
189
- } },
190
- { name: 'qp-supplierOrgCode-eq', type: 'select', label: '使用组织', field: {
191
- type: 'select',
192
- props: {
193
- // mode: 'multiple',
194
- notFoundContent: '暂无数据',
195
- allowClear: true,
196
- showSearch: true,
197
- showArrow: true,
198
- // maxTagCount: 1,
199
- optionFilterProp: 'children',
200
- filterOption: (input: string, option: { props: { children: string } }) =>
201
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
202
- },
203
- } },
204
- ]
205
- Promise.all([
206
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
207
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
208
- ]).then((x: any)=>{
209
- formatSource(x,0, 2, tableSearchForm);
210
- formatSource(x,1, 3, tableSearchForm);
211
- })
212
- modalTableProps = {
213
- modalTableTitle: '选择供应商',
214
- tableSearchForm,
215
- tableColumns: [
216
- {
217
- title: '供应商编码',
218
- dataIndex: 'code',
219
- },
220
- {
221
- title: '供应商名称',
222
- dataIndex: 'name',
223
- },
224
- {
225
- title: '创建组织',
226
- dataIndex: 'createOrgName',
227
- },
228
- {
229
- title: '使用组织',
230
- dataIndex: 'salesOrgName',
231
- },
232
- ],
233
- ...modalTableBusProps
234
- }
235
- }
236
-
237
- // 商品选择器sku
238
- if(type === 'skuCommodity') {
239
- requestConfig = {
240
- url: `${prefixUrl.selectPrefix}/sku/pager/v2`,
241
- filter: 'skuCodeAndSkuName', // 过滤参数
242
- mappingTextField: 'name',
243
- mappingValueField: 'skuCode',
244
- mappingTextShowTextField: ['name', 'propertyNameAndValue'],
245
- otherParams: {
246
- 'qp-combination-eq': false,
247
- 'qp-approveStatus-eq': 1,
248
- 'qp-status-eq': 1,
249
- // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
250
- sorter: 'desc-id'
251
- }, // 默认参数
252
- sourceName: 'skuCode',
253
- ...requestConfigProp,
254
- }
255
- tableSearchForm = requestConfig.url.includes('v2') ? [
256
- requestConfig.url.includes('v2') ? { name: 'qp-skuName-like', label: 'SKU名称' } : { name: 'qp-name-like', label: 'SKU名称' },
257
- { name: 'qp-skuCode-in', label: 'SKU编码', field: {
258
- type: 'multipleQueryInput',
259
- props: {
260
- ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
261
- },
262
- }},
263
- requestConfig.url.includes('v2') ? { name: 'qp-code-like', label: '国际条码' } : { name: 'qp-barCode-like', label: '国际条码'},
264
- { name: 'qp-itemName-like', label: '所属SPU名称' },
265
- { name: 'qp-itemCode-like', label: '所属SPU编码' },
266
- requestConfig.url.includes('v2') ?{ name: 'qp-externalCode-like', label: '外部编码' } : null,
267
- requestConfig.url.includes('v2') ? { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
268
- type: 'businessSearchSelect',
269
- props: {
270
- selectBusinessType: 'skuPropertyValue',
271
- selectProps: {
272
- mode: 'multiple',
273
- maxTagCount: 1,
274
- },
275
- ...(requestConfigProp?.skuPropertyValueRequestConfig || { prefixUrl }), // 可自定义此处规格请求接口相关参数,默认前缀取自sku选择器
276
- },
277
- }
278
- } : null,
279
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
280
- type: 'select',
281
- props: {
282
- mode: 'multiple',
283
- notFoundContent: '暂无数据',
284
- allowClear: true,
285
- showSearch: true,
286
- showArrow: true,
287
- maxTagCount: 1,
288
- optionFilterProp: 'children',
289
- filterOption: (input: string, option: { props: { children: string } }) =>
290
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
291
- },
292
- } },
293
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
294
- type: 'treeSelect',
295
- props: {
296
- treeData: [],
297
- treeCheckable: true,
298
- showSearch: true,
299
- allowClear: true,
300
- showArrow: true,
301
- treeNodeFilterProp: 'title',
302
- treeDefaultExpandAll: true,
303
- maxTagCount: 1,
304
- placeholder: '请选择',
305
- style: {
306
- width: '100%',
307
- },
308
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
309
- },
310
- } },
311
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
312
- type: 'select',
313
- props: {
314
- mode: 'multiple',
315
- notFoundContent: '暂无数据',
316
- allowClear: true,
317
- showSearch: true,
318
- showArrow: true,
319
- maxTagCount: 1,
320
- optionFilterProp: 'children',
321
- filterOption: (input: string, option: { props: { children: string } }) =>
322
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
323
- },
324
- } },
325
- ] : [
326
- { name: 'qp-name-like', label: 'SKU名称' },
327
- { name: 'qp-skuCode-in', label: 'SKU编码', field: {
328
- type: 'multipleQueryInput',
329
- props: {
330
- ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
331
- },
332
- }},
333
- { name: 'qp-barCode-like', label: '国际条码'},
334
- { name: 'qp-itemName-like', label: '所属SPU名称' },
335
- { name: 'qp-itemCode-like', label: '所属SPU编码' },
336
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
337
- type: 'select',
338
- props: {
339
- mode: 'multiple',
340
- notFoundContent: '暂无数据',
341
- allowClear: true,
342
- showSearch: true,
343
- showArrow: true,
344
- maxTagCount: 1,
345
- optionFilterProp: 'children',
346
- filterOption: (input: string, option: { props: { children: string } }) =>
347
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
348
- },
349
- } },
350
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
351
- type: 'treeSelect',
352
- props: {
353
- treeData: [],
354
- treeCheckable: true,
355
- showSearch: true,
356
- allowClear: true,
357
- showArrow: true,
358
- treeNodeFilterProp: 'title',
359
- treeDefaultExpandAll: true,
360
- maxTagCount: 1,
361
- placeholder: '请选择',
362
- style: {
363
- width: '100%',
364
- },
365
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
366
- },
367
- } },
368
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
369
- type: 'select',
370
- props: {
371
- mode: 'multiple',
372
- notFoundContent: '暂无数据',
373
- allowClear: true,
374
- showSearch: true,
375
- showArrow: true,
376
- maxTagCount: 1,
377
- optionFilterProp: 'children',
378
- filterOption: (input: string, option: { props: { children: string } }) =>
379
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
380
- },
381
- } },
382
- ]
383
- Promise.all([
384
- loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
385
- pageSize: 5000,
386
- currentPage: 1,
387
- 'ctl-withAuth': true
388
- }),
389
- loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
390
- pageSize: 5000,
391
- currentPage: 1,
392
- }),
393
- loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
394
- pageSize: 5000,
395
- currentPage: 1,
396
- }),
397
- ]).then((x: any)=>{
398
- requestConfig.url.includes('v2') ? formatSource(x,0, 7, tableSearchForm,['id','name']) : formatSource(x,0, 5, tableSearchForm,['id','name'])
399
- requestConfig.url.includes('v2') ? formatTreeDataSource(x,1, 8, tableSearchForm) : formatTreeDataSource(x,1, 6, tableSearchForm)
400
- requestConfig.url.includes('v2') ? formatSource(x,2, 9, tableSearchForm,['id','name']) : formatSource(x,2, 7, tableSearchForm,['id','name'])
401
- })
402
- modalTableProps = {
403
- modalTableTitle: '选择SKU',
404
- tableSearchForm,
405
- tableColumns: requestConfig.url.includes('v2') ? [
406
- {
407
- title: 'SKU编码',
408
- dataIndex: 'skuCode',
409
- },
410
- {
411
- title: 'SKU名称',
412
- dataIndex: 'name',
413
- },
414
- {
415
- title: '国际条码',
416
- dataIndex: 'barCode',
417
- },
418
- {
419
- title: '所属SPU名称',
420
- dataIndex: 'itemName',
421
- },
422
- {
423
- title: '所属SPU编码',
424
- dataIndex: 'itemCode',
425
- },
426
- requestConfig.url.includes('v2') ? {
427
- title: '外部编码',
428
- dataIndex: 'externalCode',
429
- } : false,
430
- {
431
- title: '规格',
432
- dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec',
433
- },
434
- {
435
- title: '类目',
436
- dataIndex: 'categoryName',
437
- },
438
- {
439
- title: '品类',
440
- dataIndex: 'className',
441
- },
442
- {
443
- title: '品牌',
444
- dataIndex: 'brandName',
445
- },
446
- ] : [
447
- {
448
- title: 'SKU编码',
449
- dataIndex: 'skuCode',
450
- },
451
- {
452
- title: 'SKU名称',
453
- dataIndex: 'name',
454
- },
455
- {
456
- title: '国际条码',
457
- dataIndex: 'barCode',
458
- },
459
- {
460
- title: '所属SPU名称',
461
- dataIndex: 'itemName',
462
- },
463
- {
464
- title: '所属SPU编码',
465
- dataIndex: 'itemCode',
466
- },
467
- {
468
- title: '规格',
469
- dataIndex: 'skuSpec',
470
- },
471
- {
472
- title: '类目',
473
- dataIndex: 'categoryName',
474
- },
475
- {
476
- title: '品类',
477
- dataIndex: 'className',
478
- },
479
- {
480
- title: '品牌',
481
- dataIndex: 'brandName',
482
- },
483
- ],
484
- ...modalTableBusProps
485
- }
486
- }
487
-
488
- // 商品选择器spu
489
- if(type === 'spuCommodity') {
490
- requestConfig = {
491
- url: `${prefixUrl.selectPrefix}/item`,
492
- filter: 'qp-itemCode,name-orGroup,like', // 过滤参数
493
- mappingTextField: 'name',
494
- mappingValueField: 'itemCode',
495
- otherParams: {
496
- 'qp-approveStatus-eq': 1, // 审核状态(0.待审批;1.审批通过;2.驳回;3.审批未通过)
497
- sorter: 'desc-id'
498
- }, // 默认参数
499
- sourceName: 'itemCode',
500
- ...requestConfigProp,
501
- }
502
- tableSearchForm = [
503
- { name: 'qp-name-like', label: 'SPU名称' },
504
- { name: 'qp-itemCode-like', label: 'SPU编码' },
505
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
506
- type: 'select',
507
- props: {
508
- mode: 'multiple',
509
- notFoundContent: '暂无数据',
510
- allowClear: true,
511
- showSearch: true,
512
- showArrow: true,
513
- maxTagCount: 1,
514
- optionFilterProp: 'children',
515
- filterOption: (input: string, option: { props: { children: string } }) =>
516
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
517
- },
518
- } },
519
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
520
- type: 'treeSelect',
521
- props: {
522
- treeData: [],
523
- treeCheckable: true,
524
- showSearch: true,
525
- allowClear: true,
526
- showArrow: true,
527
- treeNodeFilterProp: 'title',
528
- treeDefaultExpandAll: true,
529
- maxTagCount: 1,
530
- placeholder: '请选择',
531
- style: {
532
- width: '100%',
533
- },
534
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
535
- },
536
- } },
537
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
538
- type: 'select',
539
- props: {
540
- mode: 'multiple',
541
- notFoundContent: '暂无数据',
542
- allowClear: true,
543
- showSearch: true,
544
- showArrow: true,
545
- maxTagCount: 1,
546
- optionFilterProp: 'children',
547
- filterOption: (input: string, option: { props: { children: string } }) =>
548
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
549
- },
550
- } },
551
- ]
552
- Promise.all([
553
- loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
554
- pageSize: 5000,
555
- currentPage: 1,
556
- 'ctl-withAuth': true
557
- }),
558
- loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
559
- pageSize: 5000,
560
- currentPage: 1,
561
- }),
562
- loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
563
- pageSize: 5000,
564
- currentPage: 1,
565
- }),
566
- ]).then((x: any)=>{
567
- formatSource(x,0, 2, tableSearchForm,['id','name']);
568
- formatTreeDataSource(x,1, 3, tableSearchForm);
569
- formatSource(x,2, 4, tableSearchForm,['id','name']);
570
- })
571
- modalTableProps = {
572
- modalTableTitle: '选择SPU',
573
- tableSearchForm,
574
- tableColumns: [
575
- {
576
- title: 'SPU编码',
577
- dataIndex: 'itemCode',
578
- },
579
- {
580
- title: 'SPU名称',
581
- dataIndex: 'name',
582
- },
583
- {
584
- title: '品牌',
585
- dataIndex: 'brandName',
586
- },
587
- {
588
- title: '类目',
589
- dataIndex: 'categoryText',
590
- },
591
- {
592
- title: '品类',
593
- dataIndex: 'className',
594
- },
595
- ],
596
- ...modalTableBusProps
597
- }
598
- }
599
-
600
- // 商品规格选择器(无弹窗)
601
- if(type === 'skuPropertyValue') {
602
- requestConfig = {
603
- url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
604
- filter: 'qp-value-like', // 过滤参数
605
- mappingTextField: 'value',
606
- mappingTextShowKeyField: 'propertyValueCode',
607
- mappingValueField: 'propertyValueCode',
608
- otherParams: {
609
- sorter: 'desc-id'
610
- }, // 默认参数
611
- sourceName: 'qp-propertyValueCode-in',
612
- ...requestConfigProp,
613
- }
614
- needModalTable = false
615
- }
616
-
617
- // 仓库选择器(物理、逻辑仓)
618
- if(type === 'physicalWarehouse') {
619
- requestConfig = {
620
- url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
621
- filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like', // 过滤参数
622
- mappingTextField: 'physicalWarehouseName',
623
- mappingTextShowKeyField: 'physicalWarehouseCode',
624
- mappingValueField: 'id',
625
- otherParams: {
626
- 'qp-isEnable-eq': 1,
627
- sorter: 'desc-id'
628
- }, // 默认参数
629
- sourceName: 'warehouseIds',
630
- ...requestConfigProp,
631
- }
632
- tableSearchForm = [
633
- { name: 'qp-physicalWarehouseName-like', label: '物理仓名称' },
634
- { name: 'qp-physicalWarehouseCode-like', label: '物理仓编码' },
635
- { name: 'qp-physicalWarehouseType-eq', type: 'select', label: '物理仓类型', initialSource: getDictionarySource('SC00002') },
636
- { name: 'qp-companyCode-eq', type: 'select', label: '所属公司', field: {
637
- type: 'select',
638
- props: {
639
- mode: 'multiple',
640
- notFoundContent: '暂无数据',
641
- allowClear: true,
642
- showSearch: true,
643
- showArrow: true,
644
- maxTagCount: 1,
645
- optionFilterProp: 'children',
646
- filterOption: (input: string, option: { props: { children: string } }) =>
647
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
648
- },
649
- } },
650
- ]
651
- Promise.all([
652
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
653
- pageSize: 5000,
654
- currentPage: 1,
655
- 'qp-companyType-eq': 20,
656
- }),
657
- ]).then((x: any)=>{
658
- formatSource(x,0, 3, tableSearchForm);
659
- })
660
- modalTableProps = {
661
- modalTableTitle: '选择物理仓',
662
- tableSearchForm,
663
- tableColumns: [
664
- {
665
- title: '物理仓编码',
666
- dataIndex: 'physicalWarehouseCode',
667
- },
668
- {
669
- title: '物理仓名称',
670
- dataIndex: 'physicalWarehouseName',
671
- },
672
- {
673
- title: '物理仓类型',
674
- dataIndex: 'physicalWarehouseType',
675
- render: (text: number) => getDictionaryTextByValue('SC00002', text),
676
- },
677
- {
678
- title: '所属公司',
679
- dataIndex: 'companyName',
680
- },
681
- ],
682
- ...modalTableBusProps
683
- }
684
- }
685
- if(type === 'realWarehouse') {
686
- requestConfig = {
687
- url: `${prefixUrl.selectPrefix}/realWarehouse`,
688
- filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like', // 过滤参数
689
- mappingTextField: 'realWarehouseName',
690
- mappingTextShowKeyField: 'realWarehouseCode',
691
- mappingValueField: 'id',
692
- otherParams: {
693
- 'qp-isEnable-eq': 1,
694
- sorter: 'desc-id'
695
- }, // 默认参数
696
- sourceName: 'warehouseIds',
697
- ...requestConfigProp,
698
- }
699
- tableSearchForm = [
700
- { name: 'qp-realWarehouseName-like', label: '逻辑仓名称' },
701
- { name: 'qp-realWarehouseCode-like', label: '逻辑仓编码' },
702
- { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
703
- ]
704
- modalTableProps = {
705
- modalTableTitle: '选择逻辑仓',
706
- tableSearchForm,
707
- tableColumns: [
708
- {
709
- title: '逻辑仓编码',
710
- dataIndex: 'realWarehouseCode',
711
- },
712
- {
713
- title: '逻辑仓名称',
714
- dataIndex: 'realWarehouseName',
715
- },
716
- {
717
- title: '逻辑仓类型',
718
- dataIndex: 'realWarehouseType',
719
- render: (text: number) => getDictionaryTextByValue('SC00004', text),
720
- },
721
- ],
722
- ...modalTableBusProps,
723
- }
724
- }
725
-
726
- // 仓库选择器(虚拟、渠道仓)(无弹窗)
727
- if(type === 'virtualWarehouse') {
728
- requestConfig = {
729
- url: `${prefixUrl.selectPrefix}/virtualWarehouse`,
730
- filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like', // 过滤参数
731
- mappingTextField: 'virtualWarehouseName',
732
- mappingTextShowKeyField: 'virtualWarehouseCode',
733
- mappingValueField: 'id',
734
- otherParams: {
735
- 'qp-isEnable-eq': 1,
736
- sorter: 'desc-id'
737
- }, // 默认参数
738
- sourceName: 'warehouseIds',
739
- ...requestConfigProp,
740
- }
741
- needModalTable = false
742
- }
743
- if(type === 'channelWarehouse') {
744
- requestConfig = {
745
- url: `${prefixUrl.selectPrefix}/channelWarehouse`,
746
- filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like', // 过滤参数
747
- mappingTextField: 'channelWarehouseName',
748
- mappingTextShowKeyField: 'channelWarehouseCode',
749
- mappingValueField: 'id',
750
- otherParams: {
751
- 'qp-isEnable-eq': 1,
752
- sorter: 'desc-id'
753
- }, // 默认参数
754
- sourceName: 'warehouseIds',
755
- ...requestConfigProp,
756
- }
757
- needModalTable = false
758
- }
759
-
760
- // 客户选择器
761
- if(type === 'customer') {
762
- requestConfig = {
763
- url: `${prefixUrl.selectPrefix}/uc/customer/v2`,
764
- filter: 'qp-name,code-orGroup,like', // 过滤参数
765
- mappingTextField: 'name',
766
- mappingValueField: 'code',
767
- otherParams: {
768
- 'qp-status-eq': 10,
769
- sorter: 'desc-id'
770
- }, // 默认参数
771
- sourceName: 'customCode',
772
- ...requestConfigProp,
773
- }
774
- tableSearchForm = [
775
- { name: 'qp-name-like', label: '客户名称' },
776
- { name: 'qp-code-like', label: '客户编码' },
777
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
778
- type: 'select',
779
- props: {
780
- mode: 'multiple',
781
- notFoundContent: '暂无数据',
782
- allowClear: true,
783
- showSearch: true,
784
- showArrow: true,
785
- maxTagCount: 1,
786
- optionFilterProp: 'children',
787
- filterOption: (input: string, option: { props: { children: string } }) =>
788
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
789
- },
790
- } },
791
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
792
- type: 'select',
793
- props: {
794
- mode: 'multiple',
795
- notFoundContent: '暂无数据',
796
- allowClear: true,
797
- showSearch: true,
798
- showArrow: true,
799
- maxTagCount: 1,
800
- optionFilterProp: 'children',
801
- filterOption: (input: string, option: { props: { children: string } }) =>
802
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
803
- },
804
- } },
805
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
806
- type: 'select',
807
- props: {
808
- mode: 'multiple',
809
- notFoundContent: '暂无数据',
810
- allowClear: true,
811
- showSearch: true,
812
- showArrow: true,
813
- maxTagCount: 1,
814
- optionFilterProp: 'children',
815
- filterOption: (input: string, option: { props: { children: string } }) =>
816
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
817
- },
818
- } },
819
- { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
820
- ]
821
- Promise.all([
822
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
823
- pageSize: 5000,
824
- currentPage: 1,
825
- 'qp-companyType-eq': '30',
826
- }),
827
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
828
- pageSize: 5000,
829
- currentPage: 1,
830
- }),
831
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
832
- pageSize: 5000,
833
- currentPage: 1,
834
- 'qp-companyType-eq': '20',
835
- })
836
- ]).then((x: any)=>{
837
- formatSource(x,0, 2, tableSearchForm);
838
- formatSource(x,1, 3, tableSearchForm);
839
- formatSource(x,2, 4, tableSearchForm);
840
- })
841
- modalTableProps = {
842
- modalTableTitle: '选择客户',
843
- tableSearchForm,
844
- tableColumns: [
845
- {
846
- title: '客户编码',
847
- dataIndex: 'code',
848
- },
849
- {
850
- title: '客户名称',
851
- dataIndex: 'name',
852
- },
853
- {
854
- title: '归属集团',
855
- dataIndex: 'conglomerateName',
856
- },
857
- {
858
- title: '归属法人公司',
859
- dataIndex: 'legalCompanyName',
860
- },
861
- {
862
- title: '归属核算主体',
863
- dataIndex: 'accountingName',
864
- },
865
- {
866
- title: '共享类型',
867
- dataIndex: 'sharingType',
868
- render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text,
869
- },
870
- ],
871
- ...modalTableBusProps
872
- }
873
- }
874
- if(type === 'customer2') {
875
- // 版本2
876
- requestConfig = {
877
- url: `${prefixUrl.selectPrefix}/customer`,
878
- filter: 'qp-name,code-orGroup,like', // 过滤参数
879
- mappingTextField: 'name',
880
- mappingValueField: 'code',
881
- otherParams: {
882
- sorter: 'desc-id'
883
- }, // 默认参数
884
- sourceName: 'customCode',
885
- ...requestConfigProp,
886
- }
887
- tableSearchForm = [
888
- { name: 'qp-name-like', label: '客户名称' },
889
- { name: 'qp-code-like', label: '客户编码' },
890
- { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
891
- type: 'select',
892
- props: {
893
- // mode: 'multiple',
894
- notFoundContent: '暂无数据',
895
- allowClear: true,
896
- showSearch: true,
897
- showArrow: true,
898
- // maxTagCount: 1,
899
- optionFilterProp: 'children',
900
- filterOption: (input: string, option: { props: { children: string } }) =>
901
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
902
- },
903
- } },
904
- { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
905
- type: 'select',
906
- props: {
907
- // mode: 'multiple',
908
- notFoundContent: '暂无数据',
909
- allowClear: true,
910
- showSearch: true,
911
- showArrow: true,
912
- // maxTagCount: 1,
913
- optionFilterProp: 'children',
914
- filterOption: (input: string, option: { props: { children: string } }) =>
915
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
916
- },
917
- } },
918
- ]
919
- Promise.all([
920
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
921
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
922
- ]).then((x: any)=>{
923
- formatSource(x,0, 2, tableSearchForm);
924
- formatSource(x,1, 3, tableSearchForm);
925
- })
926
- modalTableProps = {
927
- modalTableTitle: '选择客户',
928
- tableSearchForm,
929
- tableColumns: [
930
- {
931
- title: '客户编码',
932
- dataIndex: 'code',
933
- },
934
- {
935
- title: '客户名称',
936
- dataIndex: 'name',
937
- },
938
- {
939
- title: '创建组织',
940
- dataIndex: 'createOrgName',
941
- },
942
- {
943
- title: '使用组织',
944
- dataIndex: 'salesOrgName',
945
- },
946
- ],
947
- ...modalTableBusProps
948
- }
949
- }
950
-
951
- // 店铺选择器
952
- if(type === 'shopFile') {
953
- requestConfig = {
954
- url: `${prefixUrl.selectPrefix}/store`,
955
- filter: 'qp-name,code-orGroup,like', // 过滤参数
956
- mappingTextField: 'name',
957
- mappingValueField: 'code',
958
- otherParams: {
959
- sorter: 'desc-id'
960
- }, // 默认参数
961
- sourceName: 'code',
962
- ...requestConfigProp,
963
- }
964
- tableSearchForm = [
965
- { name: 'qp-name-like', label: '店铺名称' },
966
- { name: 'qp-code-like', label: '店铺编码' },
967
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
968
- type: 'select',
969
- props: {
970
- mode: 'multiple',
971
- notFoundContent: '暂无数据',
972
- allowClear: true,
973
- showSearch: true,
974
- showArrow: true,
975
- maxTagCount: 1,
976
- optionFilterProp: 'children',
977
- filterOption: (input: string, option: { props: { children: string } }) =>
978
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
979
- },
980
- } },
981
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
982
- type: 'select',
983
- props: {
984
- mode: 'multiple',
985
- notFoundContent: '暂无数据',
986
- allowClear: true,
987
- showSearch: true,
988
- showArrow: true,
989
- maxTagCount: 1,
990
- optionFilterProp: 'children',
991
- filterOption: (input: string, option: { props: { children: string } }) =>
992
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
993
- },
994
- } },
995
- { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
996
- { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
997
- type: 'select',
998
- props: {
999
- mode: 'multiple',
1000
- notFoundContent: '暂无数据',
1001
- allowClear: true,
1002
- showSearch: true,
1003
- showArrow: true,
1004
- maxTagCount: 1,
1005
- optionFilterProp: 'children',
1006
- filterOption: (input: string, option: { props: { children: string } }) =>
1007
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1008
- },
1009
- } },
1010
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1011
- type: 'select',
1012
- props: {
1013
- mode: 'multiple',
1014
- notFoundContent: '暂无数据',
1015
- allowClear: true,
1016
- showSearch: true,
1017
- showArrow: true,
1018
- maxTagCount: 1,
1019
- optionFilterProp: 'children',
1020
- filterOption: (input: string, option: { props: { children: string } }) =>
1021
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1022
- },
1023
- } },
1024
- ]
1025
- Promise.all([
1026
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1027
- pageSize: 5000,
1028
- currentPage: 1,
1029
- 'qp-companyType-eq': '30',
1030
- }),
1031
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1032
- pageSize: 5000,
1033
- currentPage: 1,
1034
- 'qp-companyType-eq': '20',
1035
- }),
1036
- loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1037
- // pageSize: 5000,
1038
- // currentPage: 1,
1039
- 'qp-status-eq': '1',
1040
- }),
1041
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1042
- pageSize: 5000,
1043
- currentPage: 1,
1044
- }),
1045
- ]).then((x: any)=>{
1046
- formatSource(x,0, 2, tableSearchForm);
1047
- formatSource(x,1, 3, tableSearchForm);
1048
- formatSource(x,2, 5, tableSearchForm);
1049
- formatSource(x,3, 6, tableSearchForm);
1050
- })
1051
- modalTableProps = {
1052
- modalTableTitle: '选择店铺',
1053
- tableSearchForm,
1054
- tableColumns: [
1055
- {
1056
- title: '店铺编码',
1057
- dataIndex: 'code',
1058
- },
1059
- {
1060
- title: '店铺名称',
1061
- dataIndex: 'name',
1062
- },
1063
- {
1064
- title: '归属集团',
1065
- dataIndex: 'conglomerateName',
1066
- },
1067
- {
1068
- title: '归属法人公司',
1069
- dataIndex: 'companyName',
1070
- },
1071
- {
1072
- title: '店铺类型',
1073
- dataIndex: 'type',
1074
- render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1075
- },
1076
- {
1077
- title: '店铺来源',
1078
- dataIndex: 'platformName',
1079
- },
1080
- {
1081
- title: '归属核算主体',
1082
- dataIndex: 'accountingName',
1083
- },
1084
- ],
1085
- ...modalTableBusProps
1086
- }
1087
- }
1088
- if(type === 'shopFile2') {
1089
- requestConfig = {
1090
- url: `${prefixUrl.selectPrefix}/store/page`,
1091
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1092
- mappingTextField: 'name',
1093
- mappingValueField: 'code',
1094
- otherParams: {
1095
- sorter: 'desc-id'
1096
- }, // 默认参数
1097
- sourceName: 'code',
1098
- ...requestConfigProp,
1099
- }
1100
- tableSearchForm = [
1101
- { name: 'qp-name-like', label: '商店名称' },
1102
- { name: 'qp-code-like', label: '商店编码' },
1103
- { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1104
- { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1105
- type: 'select',
1106
- props: {
1107
- mode: 'multiple',
1108
- notFoundContent: '暂无数据',
1109
- allowClear: true,
1110
- showSearch: true,
1111
- showArrow: true,
1112
- maxTagCount: 1,
1113
- optionFilterProp: 'children',
1114
- filterOption: (input: string, option: { props: { children: string } }) =>
1115
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1116
- },
1117
- } },
1118
- ]
1119
- Promise.all([
1120
- loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1121
- 'qp-employeeCode-eq': JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')?.employeeResVo?.employeeNumber,
1122
- 'qp-realOrg-eq': true,
1123
- 'qp-status-eq': 10
1124
- }),
1125
- ]).then((x: any)=>{
1126
- formatSource(x,0, 3, tableSearchForm);
1127
- })
1128
- modalTableProps = {
1129
- modalTableTitle: '选择商店',
1130
- tableSearchForm,
1131
- tableColumns: [
1132
- {
1133
- title: '商店编码',
1134
- dataIndex: 'code',
1135
- },
1136
- {
1137
- title: '商店名称',
1138
- dataIndex: 'name',
1139
- },
1140
- {
1141
- title: '商店类型',
1142
- dataIndex: 'type',
1143
- render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1144
- },
1145
- {
1146
- title: '所属销售组织',
1147
- dataIndex: 'orgName',
1148
- },
1149
- ],
1150
- ...modalTableBusProps
1151
- }
1152
- }
1153
-
1154
- // 核算主体选择器(无弹窗)
1155
- if(type === 'accountingSubject') {
1156
- requestConfig = {
1157
- url: `${prefixUrl.selectPrefix}/accountingSubject`,
1158
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1159
- mappingTextField: 'name',
1160
- mappingTextShowKeyField: 'code',
1161
- mappingValueField: 'id',
1162
- otherParams: {
1163
- sorter: 'desc-id'
1164
- }, // 默认参数
1165
- sourceName: 'accountingSubjectCode',
1166
- ...requestConfigProp,
1167
- }
1168
- needModalTable = false
1169
- }
1170
- // 库存组织选择器(无弹窗)
1171
- if(type === 'inventoryOrg') {
1172
- requestConfig = {
1173
- url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1174
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1175
- mappingTextField: 'name',
1176
- mappingTextShowKeyField: 'code',
1177
- mappingValueField: 'id',
1178
- otherParams: {
1179
- sorter: 'desc-id'
1180
- }, // 默认参数
1181
- sourceName: 'inventoryOrgCode',
1182
- ...requestConfigProp,
1183
- }
1184
- needModalTable = false
1185
- }
1186
-
1187
- // 法人公司选择器(无弹窗)
1188
- if(type === 'corporationCompany') {
1189
- requestConfig = {
1190
- url: `${prefixUrl.selectPrefix}/company`,
1191
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1192
- mappingTextField: 'name',
1193
- mappingTextShowKeyField: 'code',
1194
- mappingValueField: 'id',
1195
- otherParams: {
1196
- sorter: 'desc-id'
1197
- }, // 默认参数
1198
- sourceName: 'corporationCompany',
1199
- ...requestConfigProp,
1200
- }
1201
- needModalTable = false
1202
- }
1203
-
1204
- // 员工选择器
1205
- if(type === 'employee') {
1206
- requestConfig = {
1207
- url: `${prefixUrl.selectPrefix}/employee/v2`,
1208
- filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1209
- mappingTextField: 'name',
1210
- mappingTextShowKeyField: 'employeeNumber',
1211
- mappingValueField: 'employeeNumber',
1212
- otherParams: {
1213
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1214
- 'qp-employmentType-eq': 20,
1215
- sorter: 'desc-id'
1216
- }, // 默认参数
1217
- sourceName: 'employeeNumber',
1218
- ...requestConfigProp,
1219
- }
1220
- tableSearchForm = [
1221
- { name: 'qp-name-like', label: '员工名称' },
1222
- { name: 'qp-employeeNumber-like', label: '员工编码' },
1223
- { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1224
- type: 'select',
1225
- props: {
1226
- mode: 'multiple',
1227
- notFoundContent: '暂无数据',
1228
- allowClear: true,
1229
- showSearch: true,
1230
- showArrow: true,
1231
- maxTagCount: 1,
1232
- optionFilterProp: 'children',
1233
- filterOption: (input: string, option: { props: { children: string } }) =>
1234
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1235
- },
1236
- } },
1237
- { name: 'qp-email-like', label: '邮箱' },
1238
- { name: 'qp-officeTelephone-like', label: '手机号' },
1239
- ]
1240
- Promise.all([
1241
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1242
- pageSize: 5000,
1243
- currentPage: 1,
1244
- 'qp-companyType-eq': 20,
1245
- }),
1246
- ]).then((x: any)=>{
1247
- formatSource(x,0, 2, tableSearchForm);
1248
- })
1249
- modalTableProps = {
1250
- modalTableTitle: '选择员工',
1251
- tableSearchForm,
1252
- tableColumns: [
1253
- {
1254
- title: '员工编码',
1255
- dataIndex: 'employeeNumber',
1256
- },
1257
- {
1258
- title: '员工名称',
1259
- dataIndex: 'name',
1260
- },
1261
- {
1262
- title: '所属公司',
1263
- dataIndex: 'companyName',
1264
- },
1265
- {
1266
- title: '邮箱',
1267
- dataIndex: 'email',
1268
- },
1269
- {
1270
- title: '手机号',
1271
- dataIndex: 'officeTelephone',
1272
- },
1273
- ],
1274
- ...modalTableBusProps
1275
- }
1276
- }
1277
- if(type === 'employee2') {
1278
- // 版本2
1279
- requestConfig = {
1280
- url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1281
- filter: 'qp-username,name-orGroup,like', // 过滤参数
1282
- mappingTextField: 'name',
1283
- mappingTextShowKeyField: 'username',
1284
- mappingValueField: 'id',
1285
- otherParams: {
1286
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1287
- 'qp-employmentType-eq': 20,
1288
- sorter: 'desc-id'
1289
- }, // 默认参数
1290
- sourceName: 'employeeNumber',
1291
- ...requestConfigProp,
1292
- }
1293
- tableSearchForm = [
1294
- { name: 'qp-username-like', label: '账户名称' },
1295
- { name: 'qp-name-like', label: '显示名称' },
1296
- // { name: 'qp-employeeNumber-like', label: '员工编码' },
1297
- { name: 'qp-directOrgCode-in', type: 'select', label: '所属组织机构', field: {
1298
- type: 'select',
1299
- props: {
1300
- mode: 'multiple',
1301
- notFoundContent: '暂无数据',
1302
- allowClear: true,
1303
- showSearch: true,
1304
- showArrow: true,
1305
- maxTagCount: 1,
1306
- optionFilterProp: 'children',
1307
- filterOption: (input: string, option: { props: { children: string } }) =>
1308
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1309
- },
1310
- } },
1311
- { name: 'qp-email-like', label: '邮箱' },
1312
- { name: 'qp-officeTelephone-like', label: '手机号' },
1313
- ]
1314
- Promise.all([
1315
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1316
- ]).then((x: any)=>{
1317
- formatSource(x,0, 2, tableSearchForm);
1318
- })
1319
- modalTableProps = {
1320
- modalTableTitle: '添加员工',
1321
- tableSearchForm,
1322
- tableColumns: [
1323
- {
1324
- title: '账户名称',
1325
- dataIndex: 'username',
1326
- },
1327
- {
1328
- title: '显示名称',
1329
- dataIndex: 'name',
1330
- },
1331
- // {
1332
- // title: '员工编码',
1333
- // dataIndex: 'employeeNumber',
1334
- // },
1335
- // {
1336
- // title: '员工名称',
1337
- // dataIndex: 'name',
1338
- // },
1339
- {
1340
- title: '所属组织机构',
1341
- dataIndex: 'directOrgName',
1342
- },
1343
- {
1344
- title: '邮箱',
1345
- dataIndex: 'email',
1346
- },
1347
- {
1348
- title: '手机号',
1349
- dataIndex: 'officeTelephone',
1350
- },
1351
- ],
1352
- ...modalTableBusProps
1353
- }
1354
- }
1355
-
1356
- // 配送方式选择器
1357
- if(type === 'deliveryMode') {
1358
- requestConfig = {
1359
- url: `${prefixUrl.selectPrefix}/deliveryMode`,
1360
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1361
- mappingTextField: 'name',
1362
- mappingTextShowKeyField: 'code',
1363
- mappingValueField: 'code',
1364
- otherParams: {
1365
- sorter: 'desc-id'
1366
- }, // 默认参数
1367
- sourceName: 'deliveryModeCode',
1368
- ...requestConfigProp
1369
- }
1370
- tableSearchForm = [
1371
- { name: 'qp-name-like', label: '配送方式名称' },
1372
- { name: 'qp-code-like', label: '配送方式编码' },
1373
- { name: 'qp-logisCompanyCode-in', type: 'select', label: '所属物流商', field: {
1374
- type: 'select',
1375
- props: {
1376
- mode: 'multiple',
1377
- notFoundContent: '暂无数据',
1378
- allowClear: true,
1379
- showSearch: true,
1380
- showArrow: true,
1381
- maxTagCount: 1,
1382
- optionFilterProp: 'children',
1383
- filterOption: (input: string, option: { props: { children: string } }) =>
1384
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1385
- },
1386
- } },
1387
- { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1388
- { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1389
- { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1390
- type: 'select',
1391
- props: {
1392
- mode: 'multiple',
1393
- notFoundContent: '暂无数据',
1394
- allowClear: true,
1395
- showSearch: true,
1396
- showArrow: true,
1397
- maxTagCount: 1,
1398
- optionFilterProp: 'children',
1399
- filterOption: (input: string, option: { props: { children: string } }) =>
1400
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1401
- },
1402
- } },
1403
- { name: 'qp-remark-like', label: '备注' },
1404
- ]
1405
- Promise.all([
1406
- loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1407
- pageSize: 5000,
1408
- currentPage: 1,
1409
- }),
1410
- loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1411
- pageSize: 5000,
1412
- currentPage: 1,
1413
- })
1414
- ]).then((x: any)=>{
1415
- formatSource(x,0, 2, tableSearchForm);
1416
- formatSource(x,1, 5, tableSearchForm);
1417
- })
1418
- modalTableProps = {
1419
- modalTableTitle: '选择配送方式',
1420
- tableSearchForm,
1421
- tableColumns: [
1422
- {
1423
- title: '配送方式编码',
1424
- dataIndex: 'code',
1425
- },
1426
- {
1427
- title: '配送方式名称',
1428
- dataIndex: 'name',
1429
- },
1430
- {
1431
- title: '所属物流商',
1432
- dataIndex: 'logisCompanyName',
1433
- },
1434
- {
1435
- dataIndex: 'recordChannnelCode',
1436
- title: '单号获取通道',
1437
- render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1438
- },
1439
- {
1440
- dataIndex: 'arrivalPaySupport',
1441
- title: '是否支持到付',
1442
- render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1443
- },
1444
- {
1445
- dataIndex: 'sheetTemplateName',
1446
- title: '面单模板',
1447
- },
1448
- {
1449
- dataIndex: 'remark',
1450
- title: '备注',
1451
- },
1452
- ],
1453
- ...modalTableBusProps
1454
- }
1455
- }
1456
-
1457
- return { modalTableProps, requestConfig, needModalTable };
1458
- }
1
+ // 此文件用于 处理业务组件 所用到的公共方法
2
+ // @ts-nocheck
3
+ import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type } from './common';
4
+ import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
+ import ENUM from '@/utils/enumConfig';
6
+
7
+ const hasDictSharingType = getDictionarySource('UC000013')?.length;
8
+ const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
9
+
10
+ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: any, modalTableBusProps?:any) {
11
+ // 默认type === 'supplier' 供应商选择器
12
+ let requestConfig = {
13
+ url: `${prefixUrl.selectPrefix}/supplier`,
14
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
15
+ otherParams: {
16
+ sorter: 'desc-id'
17
+ }, // 默认参数
18
+ ...requestConfigProp
19
+ }
20
+
21
+ /*
22
+ * 处理 格式化下拉框数据源
23
+ * reData 必传 promise返回响应的数据 格式为[{},{},{},...] Promise.all第一个参数数组有多少个数组长度就是多少,其中每个对象为每次请求的结果数据
24
+ * 每个结果数据格式为{ status: '0', msg: 'success', data: { items: [], total: 1, size: 1, page: 1 }, traceId: 'baba..'}
25
+ * position 必传 为获取Promise.all请求结果的位置
26
+ * changePosition 必传 为搜索表单Form中需要更改数据源的Item项的位置
27
+ * changeSearchForm 必传 为搜索表单Form数据
28
+ * */
29
+ const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
30
+ const data = reData && reData[position]?.data;
31
+ const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
32
+ const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
33
+ changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
34
+ }
35
+
36
+ // 格式化树选择器数据源
37
+ const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
38
+ const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
39
+ return {
40
+ title: treeDataItem[resKeyValue[1]],
41
+ value: treeDataItem[resKeyValue[0]],
42
+ parentId: treeDataItem.parent,
43
+ data: { ...treeDataItem },
44
+ isLeaf: !haveChildren,
45
+ disabled: haveChildren,
46
+ children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
47
+ };
48
+ };
49
+ const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
50
+ const data = reData && reData[position]?.data;
51
+ const formatData = (data &&
52
+ Array.isArray(data) &&
53
+ data.length &&
54
+ data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
55
+ []
56
+ changeSearchForm[changePosition].field.props.treeData = formatData;
57
+ }
58
+
59
+
60
+ let tableSearchForm: any [] = [];
61
+ let modalTableProps = {
62
+ modalTableTitle: '',
63
+ tableSearchForm,
64
+ tableColumns: [],
65
+ ...modalTableBusProps,
66
+ }
67
+ let needModalTable = modalTableBusProps?.needModalTable !== undefined ? modalTableBusProps?.needModalTable : true;
68
+
69
+ // 供应商选择器
70
+ if(type === 'supplier') {
71
+ tableSearchForm = [
72
+ { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
73
+ { name: 'qp-code-like', label: '供应商编码' },
74
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
75
+ type: 'select',
76
+ props: {
77
+ mode: 'multiple',
78
+ notFoundContent: '暂无数据',
79
+ allowClear: true,
80
+ showSearch: true,
81
+ showArrow: true,
82
+ maxTagCount: 1,
83
+ optionFilterProp: 'children',
84
+ filterOption: (input: string, option: { props: { children: string } }) =>
85
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
86
+ },
87
+ } },
88
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
89
+ type: 'select',
90
+ props: {
91
+ mode: 'multiple',
92
+ notFoundContent: '暂无数据',
93
+ allowClear: true,
94
+ showSearch: true,
95
+ showArrow: true,
96
+ maxTagCount: 1,
97
+ optionFilterProp: 'children',
98
+ filterOption: (input: string, option: { props: { children: string } }) =>
99
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
100
+ },
101
+ } },
102
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
103
+ type: 'select',
104
+ props: {
105
+ mode: 'multiple',
106
+ notFoundContent: '暂无数据',
107
+ allowClear: true,
108
+ showSearch: true,
109
+ showArrow: true,
110
+ maxTagCount: 1,
111
+ optionFilterProp: 'children',
112
+ filterOption: (input: string, option: { props: { children: string } }) =>
113
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
114
+ },
115
+ } },
116
+ { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
117
+ ]
118
+ Promise.all([
119
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
120
+ pageSize: 5000,
121
+ currentPage: 1,
122
+ 'qp-companyType-eq': '30',
123
+ }),
124
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
125
+ pageSize: 5000,
126
+ currentPage: 1,
127
+ }),
128
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
129
+ pageSize: 5000,
130
+ currentPage: 1,
131
+ 'qp-companyType-eq': '20',
132
+ })
133
+ ]).then((x: any)=>{
134
+ formatSource(x,0, 2, tableSearchForm);
135
+ formatSource(x,1, 3, tableSearchForm);
136
+ formatSource(x,2, 4, tableSearchForm);
137
+ })
138
+ modalTableProps = {
139
+ modalTableTitle: '选择供应商',
140
+ tableSearchForm,
141
+ tableColumns: [
142
+ {
143
+ title: '供应商编码',
144
+ dataIndex: 'code',
145
+ },
146
+ {
147
+ title: '供应商名称',
148
+ dataIndex: 'name',
149
+ },
150
+ {
151
+ title: '归属集团',
152
+ dataIndex: 'conglomerateName',
153
+ },
154
+ {
155
+ title: '归属法人公司',
156
+ dataIndex: 'legalCompanyName',
157
+ },
158
+ {
159
+ title: '归属核算主体',
160
+ dataIndex: 'accountingName',
161
+ },
162
+ {
163
+ title: '共享类型',
164
+ dataIndex: 'sharingType',
165
+ render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
166
+ },
167
+ ],
168
+ ...modalTableBusProps,
169
+ }
170
+ }
171
+ if(type === 'supplier2') {
172
+ // 版本2
173
+ tableSearchForm = [
174
+ { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
175
+ { name: 'qp-code-like', label: '供应商编码' },
176
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
177
+ type: 'select',
178
+ props: {
179
+ // mode: 'multiple',
180
+ notFoundContent: '暂无数据',
181
+ allowClear: true,
182
+ showSearch: true,
183
+ showArrow: true,
184
+ // maxTagCount: 1,
185
+ optionFilterProp: 'children',
186
+ filterOption: (input: string, option: { props: { children: string } }) =>
187
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
188
+ },
189
+ } },
190
+ { name: 'qp-supplierOrgCode-eq', type: 'select', label: '使用组织', field: {
191
+ type: 'select',
192
+ props: {
193
+ // mode: 'multiple',
194
+ notFoundContent: '暂无数据',
195
+ allowClear: true,
196
+ showSearch: true,
197
+ showArrow: true,
198
+ // maxTagCount: 1,
199
+ optionFilterProp: 'children',
200
+ filterOption: (input: string, option: { props: { children: string } }) =>
201
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
202
+ },
203
+ } },
204
+ ]
205
+ Promise.all([
206
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
207
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
208
+ ]).then((x: any)=>{
209
+ formatSource(x,0, 2, tableSearchForm);
210
+ formatSource(x,1, 3, tableSearchForm);
211
+ })
212
+ modalTableProps = {
213
+ modalTableTitle: '选择供应商',
214
+ tableSearchForm,
215
+ tableColumns: [
216
+ {
217
+ title: '供应商编码',
218
+ dataIndex: 'code',
219
+ },
220
+ {
221
+ title: '供应商名称',
222
+ dataIndex: 'name',
223
+ },
224
+ {
225
+ title: '创建组织',
226
+ dataIndex: 'createOrgName',
227
+ },
228
+ {
229
+ title: '使用组织',
230
+ dataIndex: 'salesOrgName',
231
+ },
232
+ ],
233
+ ...modalTableBusProps
234
+ }
235
+ }
236
+
237
+ // 商品选择器sku
238
+ if(type === 'skuCommodity') {
239
+ requestConfig = {
240
+ url: `${prefixUrl.selectPrefix}/sku/pager/v2`,
241
+ filter: 'skuCodeAndSkuName', // 过滤参数
242
+ mappingTextField: 'name',
243
+ mappingValueField: 'skuCode',
244
+ mappingTextShowTextField: ['name', 'propertyNameAndValue'],
245
+ otherParams: {
246
+ 'qp-combination-eq': false,
247
+ 'qp-approveStatus-eq': 1,
248
+ 'qp-status-eq': 1,
249
+ // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
250
+ sorter: 'desc-id'
251
+ }, // 默认参数
252
+ sourceName: 'skuCode',
253
+ ...requestConfigProp,
254
+ }
255
+ tableSearchForm = requestConfig.url.includes('v2') ? [
256
+ requestConfig.url.includes('v2') ? { name: 'qp-skuName-like', label: 'SKU名称' } : { name: 'qp-name-like', label: 'SKU名称' },
257
+ { name: 'qp-skuCode-in', label: 'SKU编码', field: {
258
+ type: 'multipleQueryInput',
259
+ props: {
260
+ ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
261
+ },
262
+ }},
263
+ requestConfig.url.includes('v2') ? { name: 'qp-code-like', label: '国际条码' } : { name: 'qp-barCode-like', label: '国际条码'},
264
+ { name: 'qp-itemName-like', label: '所属SPU名称' },
265
+ { name: 'qp-itemCode-like', label: '所属SPU编码' },
266
+ requestConfig.url.includes('v2') ?{ name: 'qp-externalCode-like', label: '外部编码' } : null,
267
+ requestConfig.url.includes('v2') ? { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
268
+ type: 'businessSearchSelect',
269
+ props: {
270
+ selectBusinessType: 'skuPropertyValue',
271
+ selectProps: {
272
+ mode: 'multiple',
273
+ maxTagCount: 1,
274
+ },
275
+ ...(requestConfigProp?.skuPropertyValueRequestConfig || { prefixUrl }), // 可自定义此处规格请求接口相关参数,默认前缀取自sku选择器
276
+ },
277
+ }
278
+ } : null,
279
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
280
+ type: 'select',
281
+ props: {
282
+ mode: 'multiple',
283
+ notFoundContent: '暂无数据',
284
+ allowClear: true,
285
+ showSearch: true,
286
+ showArrow: true,
287
+ maxTagCount: 1,
288
+ optionFilterProp: 'children',
289
+ filterOption: (input: string, option: { props: { children: string } }) =>
290
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
291
+ },
292
+ } },
293
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
294
+ type: 'treeSelect',
295
+ props: {
296
+ treeData: [],
297
+ treeCheckable: true,
298
+ showSearch: true,
299
+ allowClear: true,
300
+ showArrow: true,
301
+ treeNodeFilterProp: 'title',
302
+ treeDefaultExpandAll: true,
303
+ maxTagCount: 1,
304
+ placeholder: '请选择',
305
+ style: {
306
+ width: '100%',
307
+ },
308
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
309
+ },
310
+ } },
311
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
312
+ type: 'select',
313
+ props: {
314
+ mode: 'multiple',
315
+ notFoundContent: '暂无数据',
316
+ allowClear: true,
317
+ showSearch: true,
318
+ showArrow: true,
319
+ maxTagCount: 1,
320
+ optionFilterProp: 'children',
321
+ filterOption: (input: string, option: { props: { children: string } }) =>
322
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
323
+ },
324
+ } },
325
+ ] : [
326
+ { name: 'qp-name-like', label: 'SKU名称' },
327
+ { name: 'qp-skuCode-in', label: 'SKU编码', field: {
328
+ type: 'multipleQueryInput',
329
+ props: {
330
+ ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
331
+ },
332
+ }},
333
+ { name: 'qp-barCode-like', label: '国际条码'},
334
+ { name: 'qp-itemName-like', label: '所属SPU名称' },
335
+ { name: 'qp-itemCode-like', label: '所属SPU编码' },
336
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
337
+ type: 'select',
338
+ props: {
339
+ mode: 'multiple',
340
+ notFoundContent: '暂无数据',
341
+ allowClear: true,
342
+ showSearch: true,
343
+ showArrow: true,
344
+ maxTagCount: 1,
345
+ optionFilterProp: 'children',
346
+ filterOption: (input: string, option: { props: { children: string } }) =>
347
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
348
+ },
349
+ } },
350
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
351
+ type: 'treeSelect',
352
+ props: {
353
+ treeData: [],
354
+ treeCheckable: true,
355
+ showSearch: true,
356
+ allowClear: true,
357
+ showArrow: true,
358
+ treeNodeFilterProp: 'title',
359
+ treeDefaultExpandAll: true,
360
+ maxTagCount: 1,
361
+ placeholder: '请选择',
362
+ style: {
363
+ width: '100%',
364
+ },
365
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
366
+ },
367
+ } },
368
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
369
+ type: 'select',
370
+ props: {
371
+ mode: 'multiple',
372
+ notFoundContent: '暂无数据',
373
+ allowClear: true,
374
+ showSearch: true,
375
+ showArrow: true,
376
+ maxTagCount: 1,
377
+ optionFilterProp: 'children',
378
+ filterOption: (input: string, option: { props: { children: string } }) =>
379
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
380
+ },
381
+ } },
382
+ ]
383
+ Promise.all([
384
+ loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
385
+ pageSize: 5000,
386
+ currentPage: 1,
387
+ 'ctl-withAuth': true
388
+ }),
389
+ loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
390
+ pageSize: 5000,
391
+ currentPage: 1,
392
+ }),
393
+ loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
394
+ pageSize: 5000,
395
+ currentPage: 1,
396
+ }),
397
+ ]).then((x: any)=>{
398
+ requestConfig.url.includes('v2') ? formatSource(x,0, 7, tableSearchForm,['id','name']) : formatSource(x,0, 5, tableSearchForm,['id','name'])
399
+ requestConfig.url.includes('v2') ? formatTreeDataSource(x,1, 8, tableSearchForm) : formatTreeDataSource(x,1, 6, tableSearchForm)
400
+ requestConfig.url.includes('v2') ? formatSource(x,2, 9, tableSearchForm,['id','name']) : formatSource(x,2, 7, tableSearchForm,['id','name'])
401
+ })
402
+ modalTableProps = {
403
+ modalTableTitle: '选择SKU',
404
+ tableSearchForm,
405
+ tableColumns: requestConfig.url.includes('v2') ? [
406
+ {
407
+ title: 'SKU编码',
408
+ dataIndex: 'skuCode',
409
+ },
410
+ {
411
+ title: 'SKU名称',
412
+ dataIndex: 'name',
413
+ },
414
+ {
415
+ title: '国际条码',
416
+ dataIndex: 'barCode',
417
+ },
418
+ {
419
+ title: '所属SPU名称',
420
+ dataIndex: 'itemName',
421
+ },
422
+ {
423
+ title: '所属SPU编码',
424
+ dataIndex: 'itemCode',
425
+ },
426
+ requestConfig.url.includes('v2') ? {
427
+ title: '外部编码',
428
+ dataIndex: 'externalCode',
429
+ } : false,
430
+ {
431
+ title: '规格',
432
+ dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec',
433
+ },
434
+ {
435
+ title: '类目',
436
+ dataIndex: 'categoryName',
437
+ },
438
+ {
439
+ title: '品类',
440
+ dataIndex: 'className',
441
+ },
442
+ {
443
+ title: '品牌',
444
+ dataIndex: 'brandName',
445
+ },
446
+ ] : [
447
+ {
448
+ title: 'SKU编码',
449
+ dataIndex: 'skuCode',
450
+ },
451
+ {
452
+ title: 'SKU名称',
453
+ dataIndex: 'name',
454
+ },
455
+ {
456
+ title: '国际条码',
457
+ dataIndex: 'barCode',
458
+ },
459
+ {
460
+ title: '所属SPU名称',
461
+ dataIndex: 'itemName',
462
+ },
463
+ {
464
+ title: '所属SPU编码',
465
+ dataIndex: 'itemCode',
466
+ },
467
+ {
468
+ title: '规格',
469
+ dataIndex: 'skuSpec',
470
+ },
471
+ {
472
+ title: '类目',
473
+ dataIndex: 'categoryName',
474
+ },
475
+ {
476
+ title: '品类',
477
+ dataIndex: 'className',
478
+ },
479
+ {
480
+ title: '品牌',
481
+ dataIndex: 'brandName',
482
+ },
483
+ ],
484
+ ...modalTableBusProps
485
+ }
486
+ }
487
+
488
+ // 商品选择器spu
489
+ if(type === 'spuCommodity') {
490
+ requestConfig = {
491
+ url: `${prefixUrl.selectPrefix}/item`,
492
+ filter: 'qp-itemCode,name-orGroup,like', // 过滤参数
493
+ mappingTextField: 'name',
494
+ mappingValueField: 'itemCode',
495
+ otherParams: {
496
+ 'qp-approveStatus-eq': 1, // 审核状态(0.待审批;1.审批通过;2.驳回;3.审批未通过)
497
+ sorter: 'desc-id'
498
+ }, // 默认参数
499
+ sourceName: 'itemCode',
500
+ ...requestConfigProp,
501
+ }
502
+ tableSearchForm = [
503
+ { name: 'qp-name-like', label: 'SPU名称' },
504
+ { name: 'qp-itemCode-like', label: 'SPU编码' },
505
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
506
+ type: 'select',
507
+ props: {
508
+ mode: 'multiple',
509
+ notFoundContent: '暂无数据',
510
+ allowClear: true,
511
+ showSearch: true,
512
+ showArrow: true,
513
+ maxTagCount: 1,
514
+ optionFilterProp: 'children',
515
+ filterOption: (input: string, option: { props: { children: string } }) =>
516
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
517
+ },
518
+ } },
519
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
520
+ type: 'treeSelect',
521
+ props: {
522
+ treeData: [],
523
+ treeCheckable: true,
524
+ showSearch: true,
525
+ allowClear: true,
526
+ showArrow: true,
527
+ treeNodeFilterProp: 'title',
528
+ treeDefaultExpandAll: true,
529
+ maxTagCount: 1,
530
+ placeholder: '请选择',
531
+ style: {
532
+ width: '100%',
533
+ },
534
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
535
+ },
536
+ } },
537
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
538
+ type: 'select',
539
+ props: {
540
+ mode: 'multiple',
541
+ notFoundContent: '暂无数据',
542
+ allowClear: true,
543
+ showSearch: true,
544
+ showArrow: true,
545
+ maxTagCount: 1,
546
+ optionFilterProp: 'children',
547
+ filterOption: (input: string, option: { props: { children: string } }) =>
548
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
549
+ },
550
+ } },
551
+ ]
552
+ Promise.all([
553
+ loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
554
+ pageSize: 5000,
555
+ currentPage: 1,
556
+ 'ctl-withAuth': true
557
+ }),
558
+ loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
559
+ pageSize: 5000,
560
+ currentPage: 1,
561
+ }),
562
+ loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
563
+ pageSize: 5000,
564
+ currentPage: 1,
565
+ }),
566
+ ]).then((x: any)=>{
567
+ formatSource(x,0, 2, tableSearchForm,['id','name']);
568
+ formatTreeDataSource(x,1, 3, tableSearchForm);
569
+ formatSource(x,2, 4, tableSearchForm,['id','name']);
570
+ })
571
+ modalTableProps = {
572
+ modalTableTitle: '选择SPU',
573
+ tableSearchForm,
574
+ tableColumns: [
575
+ {
576
+ title: 'SPU编码',
577
+ dataIndex: 'itemCode',
578
+ },
579
+ {
580
+ title: 'SPU名称',
581
+ dataIndex: 'name',
582
+ },
583
+ {
584
+ title: '品牌',
585
+ dataIndex: 'brandName',
586
+ },
587
+ {
588
+ title: '类目',
589
+ dataIndex: 'categoryText',
590
+ },
591
+ {
592
+ title: '品类',
593
+ dataIndex: 'className',
594
+ },
595
+ ],
596
+ ...modalTableBusProps
597
+ }
598
+ }
599
+
600
+ // 商品规格选择器(无弹窗)
601
+ if(type === 'skuPropertyValue') {
602
+ requestConfig = {
603
+ url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
604
+ filter: 'qp-value-like', // 过滤参数
605
+ mappingTextField: 'value',
606
+ mappingTextShowKeyField: 'propertyValueCode',
607
+ mappingValueField: 'propertyValueCode',
608
+ otherParams: {
609
+ sorter: 'desc-id'
610
+ }, // 默认参数
611
+ sourceName: 'qp-propertyValueCode-in',
612
+ ...requestConfigProp,
613
+ }
614
+ needModalTable = false
615
+ }
616
+
617
+ // 仓库选择器(物理、逻辑仓)
618
+ if(type === 'physicalWarehouse') {
619
+ requestConfig = {
620
+ url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
621
+ filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like', // 过滤参数
622
+ mappingTextField: 'physicalWarehouseName',
623
+ mappingTextShowKeyField: 'physicalWarehouseCode',
624
+ mappingValueField: 'id',
625
+ otherParams: {
626
+ 'qp-isEnable-eq': 1,
627
+ sorter: 'desc-id'
628
+ }, // 默认参数
629
+ sourceName: 'warehouseIds',
630
+ ...requestConfigProp,
631
+ }
632
+ tableSearchForm = [
633
+ { name: 'qp-physicalWarehouseName-like', label: '物理仓名称' },
634
+ { name: 'qp-physicalWarehouseCode-like', label: '物理仓编码' },
635
+ { name: 'qp-physicalWarehouseType-eq', type: 'select', label: '物理仓类型', initialSource: getDictionarySource('SC00002') },
636
+ { name: 'qp-companyCode-eq', type: 'select', label: '所属公司', field: {
637
+ type: 'select',
638
+ props: {
639
+ mode: 'multiple',
640
+ notFoundContent: '暂无数据',
641
+ allowClear: true,
642
+ showSearch: true,
643
+ showArrow: true,
644
+ maxTagCount: 1,
645
+ optionFilterProp: 'children',
646
+ filterOption: (input: string, option: { props: { children: string } }) =>
647
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
648
+ },
649
+ } },
650
+ ]
651
+ Promise.all([
652
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
653
+ pageSize: 5000,
654
+ currentPage: 1,
655
+ 'qp-companyType-eq': 20,
656
+ }),
657
+ ]).then((x: any)=>{
658
+ formatSource(x,0, 3, tableSearchForm);
659
+ })
660
+ modalTableProps = {
661
+ modalTableTitle: '选择物理仓',
662
+ tableSearchForm,
663
+ tableColumns: [
664
+ {
665
+ title: '物理仓编码',
666
+ dataIndex: 'physicalWarehouseCode',
667
+ },
668
+ {
669
+ title: '物理仓名称',
670
+ dataIndex: 'physicalWarehouseName',
671
+ },
672
+ {
673
+ title: '物理仓类型',
674
+ dataIndex: 'physicalWarehouseType',
675
+ render: (text: number) => getDictionaryTextByValue('SC00002', text),
676
+ },
677
+ {
678
+ title: '所属公司',
679
+ dataIndex: 'companyName',
680
+ },
681
+ ],
682
+ ...modalTableBusProps
683
+ }
684
+ }
685
+ if(type === 'realWarehouse') {
686
+ requestConfig = {
687
+ url: `${prefixUrl.selectPrefix}/realWarehouse`,
688
+ filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like', // 过滤参数
689
+ mappingTextField: 'realWarehouseName',
690
+ mappingTextShowKeyField: 'realWarehouseCode',
691
+ mappingValueField: 'id',
692
+ otherParams: {
693
+ 'qp-isEnable-eq': 1,
694
+ sorter: 'desc-id'
695
+ }, // 默认参数
696
+ sourceName: 'warehouseIds',
697
+ ...requestConfigProp,
698
+ }
699
+ tableSearchForm = [
700
+ { name: 'qp-realWarehouseName-like', label: '逻辑仓名称' },
701
+ { name: 'qp-realWarehouseCode-like', label: '逻辑仓编码' },
702
+ { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
703
+ ]
704
+ modalTableProps = {
705
+ modalTableTitle: '选择逻辑仓',
706
+ tableSearchForm,
707
+ tableColumns: [
708
+ {
709
+ title: '逻辑仓编码',
710
+ dataIndex: 'realWarehouseCode',
711
+ },
712
+ {
713
+ title: '逻辑仓名称',
714
+ dataIndex: 'realWarehouseName',
715
+ },
716
+ {
717
+ title: '逻辑仓类型',
718
+ dataIndex: 'realWarehouseType',
719
+ render: (text: number) => getDictionaryTextByValue('SC00004', text),
720
+ },
721
+ ],
722
+ ...modalTableBusProps,
723
+ }
724
+ }
725
+
726
+ // 仓库选择器(虚拟、渠道仓)(无弹窗)
727
+ if(type === 'virtualWarehouse') {
728
+ requestConfig = {
729
+ url: `${prefixUrl.selectPrefix}/virtualWarehouse`,
730
+ filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like', // 过滤参数
731
+ mappingTextField: 'virtualWarehouseName',
732
+ mappingTextShowKeyField: 'virtualWarehouseCode',
733
+ mappingValueField: 'id',
734
+ otherParams: {
735
+ 'qp-isEnable-eq': 1,
736
+ sorter: 'desc-id'
737
+ }, // 默认参数
738
+ sourceName: 'warehouseIds',
739
+ ...requestConfigProp,
740
+ }
741
+ needModalTable = false
742
+ }
743
+ if(type === 'channelWarehouse') {
744
+ requestConfig = {
745
+ url: `${prefixUrl.selectPrefix}/channelWarehouse`,
746
+ filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like', // 过滤参数
747
+ mappingTextField: 'channelWarehouseName',
748
+ mappingTextShowKeyField: 'channelWarehouseCode',
749
+ mappingValueField: 'id',
750
+ otherParams: {
751
+ 'qp-isEnable-eq': 1,
752
+ sorter: 'desc-id'
753
+ }, // 默认参数
754
+ sourceName: 'warehouseIds',
755
+ ...requestConfigProp,
756
+ }
757
+ needModalTable = false
758
+ }
759
+
760
+ // 客户选择器
761
+ if(type === 'customer') {
762
+ requestConfig = {
763
+ url: `${prefixUrl.selectPrefix}/uc/customer/v2`,
764
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
765
+ mappingTextField: 'name',
766
+ mappingValueField: 'code',
767
+ otherParams: {
768
+ 'qp-status-eq': 10,
769
+ sorter: 'desc-id'
770
+ }, // 默认参数
771
+ sourceName: 'customCode',
772
+ ...requestConfigProp,
773
+ }
774
+ tableSearchForm = [
775
+ { name: 'qp-name-like', label: '客户名称' },
776
+ { name: 'qp-code-like', label: '客户编码' },
777
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
778
+ type: 'select',
779
+ props: {
780
+ mode: 'multiple',
781
+ notFoundContent: '暂无数据',
782
+ allowClear: true,
783
+ showSearch: true,
784
+ showArrow: true,
785
+ maxTagCount: 1,
786
+ optionFilterProp: 'children',
787
+ filterOption: (input: string, option: { props: { children: string } }) =>
788
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
789
+ },
790
+ } },
791
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
792
+ type: 'select',
793
+ props: {
794
+ mode: 'multiple',
795
+ notFoundContent: '暂无数据',
796
+ allowClear: true,
797
+ showSearch: true,
798
+ showArrow: true,
799
+ maxTagCount: 1,
800
+ optionFilterProp: 'children',
801
+ filterOption: (input: string, option: { props: { children: string } }) =>
802
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
803
+ },
804
+ } },
805
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
806
+ type: 'select',
807
+ props: {
808
+ mode: 'multiple',
809
+ notFoundContent: '暂无数据',
810
+ allowClear: true,
811
+ showSearch: true,
812
+ showArrow: true,
813
+ maxTagCount: 1,
814
+ optionFilterProp: 'children',
815
+ filterOption: (input: string, option: { props: { children: string } }) =>
816
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
817
+ },
818
+ } },
819
+ { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
820
+ ]
821
+ Promise.all([
822
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
823
+ pageSize: 5000,
824
+ currentPage: 1,
825
+ 'qp-companyType-eq': '30',
826
+ }),
827
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
828
+ pageSize: 5000,
829
+ currentPage: 1,
830
+ }),
831
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
832
+ pageSize: 5000,
833
+ currentPage: 1,
834
+ 'qp-companyType-eq': '20',
835
+ })
836
+ ]).then((x: any)=>{
837
+ formatSource(x,0, 2, tableSearchForm);
838
+ formatSource(x,1, 3, tableSearchForm);
839
+ formatSource(x,2, 4, tableSearchForm);
840
+ })
841
+ modalTableProps = {
842
+ modalTableTitle: '选择客户',
843
+ tableSearchForm,
844
+ tableColumns: [
845
+ {
846
+ title: '客户编码',
847
+ dataIndex: 'code',
848
+ },
849
+ {
850
+ title: '客户名称',
851
+ dataIndex: 'name',
852
+ },
853
+ {
854
+ title: '归属集团',
855
+ dataIndex: 'conglomerateName',
856
+ },
857
+ {
858
+ title: '归属法人公司',
859
+ dataIndex: 'legalCompanyName',
860
+ },
861
+ {
862
+ title: '归属核算主体',
863
+ dataIndex: 'accountingName',
864
+ },
865
+ {
866
+ title: '共享类型',
867
+ dataIndex: 'sharingType',
868
+ render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text,
869
+ },
870
+ ],
871
+ ...modalTableBusProps
872
+ }
873
+ }
874
+ if(type === 'customer2') {
875
+ // 版本2
876
+ requestConfig = {
877
+ url: `${prefixUrl.selectPrefix}/customer`,
878
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
879
+ mappingTextField: 'name',
880
+ mappingValueField: 'code',
881
+ otherParams: {
882
+ sorter: 'desc-id'
883
+ }, // 默认参数
884
+ sourceName: 'customCode',
885
+ ...requestConfigProp,
886
+ }
887
+ tableSearchForm = [
888
+ { name: 'qp-name-like', label: '客户名称' },
889
+ { name: 'qp-code-like', label: '客户编码' },
890
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
891
+ type: 'select',
892
+ props: {
893
+ // mode: 'multiple',
894
+ notFoundContent: '暂无数据',
895
+ allowClear: true,
896
+ showSearch: true,
897
+ showArrow: true,
898
+ // maxTagCount: 1,
899
+ optionFilterProp: 'children',
900
+ filterOption: (input: string, option: { props: { children: string } }) =>
901
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
902
+ },
903
+ } },
904
+ { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
905
+ type: 'select',
906
+ props: {
907
+ // mode: 'multiple',
908
+ notFoundContent: '暂无数据',
909
+ allowClear: true,
910
+ showSearch: true,
911
+ showArrow: true,
912
+ // maxTagCount: 1,
913
+ optionFilterProp: 'children',
914
+ filterOption: (input: string, option: { props: { children: string } }) =>
915
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
916
+ },
917
+ } },
918
+ ]
919
+ Promise.all([
920
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
921
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
922
+ ]).then((x: any)=>{
923
+ formatSource(x,0, 2, tableSearchForm);
924
+ formatSource(x,1, 3, tableSearchForm);
925
+ })
926
+ modalTableProps = {
927
+ modalTableTitle: '选择客户',
928
+ tableSearchForm,
929
+ tableColumns: [
930
+ {
931
+ title: '客户编码',
932
+ dataIndex: 'code',
933
+ },
934
+ {
935
+ title: '客户名称',
936
+ dataIndex: 'name',
937
+ },
938
+ {
939
+ title: '创建组织',
940
+ dataIndex: 'createOrgName',
941
+ },
942
+ {
943
+ title: '使用组织',
944
+ dataIndex: 'salesOrgName',
945
+ },
946
+ ],
947
+ ...modalTableBusProps
948
+ }
949
+ }
950
+
951
+ // 店铺选择器
952
+ if(type === 'shopFile') {
953
+ requestConfig = {
954
+ url: `${prefixUrl.selectPrefix}/store`,
955
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
956
+ mappingTextField: 'name',
957
+ mappingValueField: 'code',
958
+ otherParams: {
959
+ sorter: 'desc-id'
960
+ }, // 默认参数
961
+ sourceName: 'code',
962
+ ...requestConfigProp,
963
+ }
964
+ tableSearchForm = [
965
+ { name: 'qp-name-like', label: '店铺名称' },
966
+ { name: 'qp-code-like', label: '店铺编码' },
967
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
968
+ type: 'select',
969
+ props: {
970
+ mode: 'multiple',
971
+ notFoundContent: '暂无数据',
972
+ allowClear: true,
973
+ showSearch: true,
974
+ showArrow: true,
975
+ maxTagCount: 1,
976
+ optionFilterProp: 'children',
977
+ filterOption: (input: string, option: { props: { children: string } }) =>
978
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
979
+ },
980
+ } },
981
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
982
+ type: 'select',
983
+ props: {
984
+ mode: 'multiple',
985
+ notFoundContent: '暂无数据',
986
+ allowClear: true,
987
+ showSearch: true,
988
+ showArrow: true,
989
+ maxTagCount: 1,
990
+ optionFilterProp: 'children',
991
+ filterOption: (input: string, option: { props: { children: string } }) =>
992
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
993
+ },
994
+ } },
995
+ { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
996
+ { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
997
+ type: 'select',
998
+ props: {
999
+ mode: 'multiple',
1000
+ notFoundContent: '暂无数据',
1001
+ allowClear: true,
1002
+ showSearch: true,
1003
+ showArrow: true,
1004
+ maxTagCount: 1,
1005
+ optionFilterProp: 'children',
1006
+ filterOption: (input: string, option: { props: { children: string } }) =>
1007
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1008
+ },
1009
+ } },
1010
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1011
+ type: 'select',
1012
+ props: {
1013
+ mode: 'multiple',
1014
+ notFoundContent: '暂无数据',
1015
+ allowClear: true,
1016
+ showSearch: true,
1017
+ showArrow: true,
1018
+ maxTagCount: 1,
1019
+ optionFilterProp: 'children',
1020
+ filterOption: (input: string, option: { props: { children: string } }) =>
1021
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1022
+ },
1023
+ } },
1024
+ ]
1025
+ Promise.all([
1026
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1027
+ pageSize: 5000,
1028
+ currentPage: 1,
1029
+ 'qp-companyType-eq': '30',
1030
+ }),
1031
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1032
+ pageSize: 5000,
1033
+ currentPage: 1,
1034
+ 'qp-companyType-eq': '20',
1035
+ }),
1036
+ loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1037
+ // pageSize: 5000,
1038
+ // currentPage: 1,
1039
+ 'qp-status-eq': '1',
1040
+ }),
1041
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1042
+ pageSize: 5000,
1043
+ currentPage: 1,
1044
+ }),
1045
+ ]).then((x: any)=>{
1046
+ formatSource(x,0, 2, tableSearchForm);
1047
+ formatSource(x,1, 3, tableSearchForm);
1048
+ formatSource(x,2, 5, tableSearchForm);
1049
+ formatSource(x,3, 6, tableSearchForm);
1050
+ })
1051
+ modalTableProps = {
1052
+ modalTableTitle: '选择店铺',
1053
+ tableSearchForm,
1054
+ tableColumns: [
1055
+ {
1056
+ title: '店铺编码',
1057
+ dataIndex: 'code',
1058
+ },
1059
+ {
1060
+ title: '店铺名称',
1061
+ dataIndex: 'name',
1062
+ },
1063
+ {
1064
+ title: '归属集团',
1065
+ dataIndex: 'conglomerateName',
1066
+ },
1067
+ {
1068
+ title: '归属法人公司',
1069
+ dataIndex: 'companyName',
1070
+ },
1071
+ {
1072
+ title: '店铺类型',
1073
+ dataIndex: 'type',
1074
+ render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1075
+ },
1076
+ {
1077
+ title: '店铺来源',
1078
+ dataIndex: 'platformName',
1079
+ },
1080
+ {
1081
+ title: '归属核算主体',
1082
+ dataIndex: 'accountingName',
1083
+ },
1084
+ ],
1085
+ ...modalTableBusProps
1086
+ }
1087
+ }
1088
+ if(type === 'shopFile2') {
1089
+ requestConfig = {
1090
+ url: `${prefixUrl.selectPrefix}/store/page`,
1091
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1092
+ mappingTextField: 'name',
1093
+ mappingValueField: 'code',
1094
+ otherParams: {
1095
+ sorter: 'desc-id'
1096
+ }, // 默认参数
1097
+ sourceName: 'code',
1098
+ ...requestConfigProp,
1099
+ }
1100
+ tableSearchForm = [
1101
+ { name: 'qp-name-like', label: '商店名称' },
1102
+ { name: 'qp-code-like', label: '商店编码' },
1103
+ { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1104
+ { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1105
+ type: 'select',
1106
+ props: {
1107
+ mode: 'multiple',
1108
+ notFoundContent: '暂无数据',
1109
+ allowClear: true,
1110
+ showSearch: true,
1111
+ showArrow: true,
1112
+ maxTagCount: 1,
1113
+ optionFilterProp: 'children',
1114
+ filterOption: (input: string, option: { props: { children: string } }) =>
1115
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1116
+ },
1117
+ } },
1118
+ ]
1119
+ Promise.all([
1120
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1121
+ 'qp-employeeCode-eq': JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.USER_INFO) || '{}')?.employeeResVo?.employeeNumber,
1122
+ 'qp-realOrg-eq': true,
1123
+ 'qp-status-eq': 10
1124
+ }),
1125
+ ]).then((x: any)=>{
1126
+ formatSource(x,0, 3, tableSearchForm);
1127
+ })
1128
+ modalTableProps = {
1129
+ modalTableTitle: '选择商店',
1130
+ tableSearchForm,
1131
+ tableColumns: [
1132
+ {
1133
+ title: '商店编码',
1134
+ dataIndex: 'code',
1135
+ },
1136
+ {
1137
+ title: '商店名称',
1138
+ dataIndex: 'name',
1139
+ },
1140
+ {
1141
+ title: '商店类型',
1142
+ dataIndex: 'type',
1143
+ render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1144
+ },
1145
+ {
1146
+ title: '所属销售组织',
1147
+ dataIndex: 'orgName',
1148
+ },
1149
+ ],
1150
+ ...modalTableBusProps
1151
+ }
1152
+ }
1153
+
1154
+ // 核算主体选择器(无弹窗)
1155
+ if(type === 'accountingSubject') {
1156
+ requestConfig = {
1157
+ url: `${prefixUrl.selectPrefix}/accountingSubject`,
1158
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1159
+ mappingTextField: 'name',
1160
+ mappingTextShowKeyField: 'code',
1161
+ mappingValueField: 'id',
1162
+ otherParams: {
1163
+ sorter: 'desc-id'
1164
+ }, // 默认参数
1165
+ sourceName: 'accountingSubjectCode',
1166
+ ...requestConfigProp,
1167
+ }
1168
+ needModalTable = false
1169
+ }
1170
+ // 库存组织选择器(无弹窗)
1171
+ if(type === 'inventoryOrg') {
1172
+ requestConfig = {
1173
+ url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1174
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1175
+ mappingTextField: 'name',
1176
+ mappingTextShowKeyField: 'code',
1177
+ mappingValueField: 'id',
1178
+ otherParams: {
1179
+ sorter: 'desc-id'
1180
+ }, // 默认参数
1181
+ sourceName: 'inventoryOrgCode',
1182
+ ...requestConfigProp,
1183
+ }
1184
+ needModalTable = false
1185
+ }
1186
+
1187
+ // 法人公司选择器(无弹窗)
1188
+ if(type === 'corporationCompany') {
1189
+ requestConfig = {
1190
+ url: `${prefixUrl.selectPrefix}/company`,
1191
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1192
+ mappingTextField: 'name',
1193
+ mappingTextShowKeyField: 'code',
1194
+ mappingValueField: 'id',
1195
+ otherParams: {
1196
+ sorter: 'desc-id'
1197
+ }, // 默认参数
1198
+ sourceName: 'corporationCompany',
1199
+ ...requestConfigProp,
1200
+ }
1201
+ needModalTable = false
1202
+ }
1203
+
1204
+ // 员工选择器
1205
+ if(type === 'employee') {
1206
+ requestConfig = {
1207
+ url: `${prefixUrl.selectPrefix}/employee/v2`,
1208
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1209
+ mappingTextField: 'name',
1210
+ mappingTextShowKeyField: 'employeeNumber',
1211
+ mappingValueField: 'employeeNumber',
1212
+ otherParams: {
1213
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1214
+ 'qp-employmentType-eq': 20,
1215
+ sorter: 'desc-id'
1216
+ }, // 默认参数
1217
+ sourceName: 'employeeNumber',
1218
+ ...requestConfigProp,
1219
+ }
1220
+ tableSearchForm = [
1221
+ { name: 'qp-name-like', label: '员工名称' },
1222
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
1223
+ { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1224
+ type: 'select',
1225
+ props: {
1226
+ mode: 'multiple',
1227
+ notFoundContent: '暂无数据',
1228
+ allowClear: true,
1229
+ showSearch: true,
1230
+ showArrow: true,
1231
+ maxTagCount: 1,
1232
+ optionFilterProp: 'children',
1233
+ filterOption: (input: string, option: { props: { children: string } }) =>
1234
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1235
+ },
1236
+ } },
1237
+ { name: 'qp-email-like', label: '邮箱' },
1238
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1239
+ ]
1240
+ Promise.all([
1241
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1242
+ pageSize: 5000,
1243
+ currentPage: 1,
1244
+ 'qp-companyType-eq': 20,
1245
+ }),
1246
+ ]).then((x: any)=>{
1247
+ formatSource(x,0, 2, tableSearchForm);
1248
+ })
1249
+ modalTableProps = {
1250
+ modalTableTitle: '选择员工',
1251
+ tableSearchForm,
1252
+ tableColumns: [
1253
+ {
1254
+ title: '员工编码',
1255
+ dataIndex: 'employeeNumber',
1256
+ },
1257
+ {
1258
+ title: '员工名称',
1259
+ dataIndex: 'name',
1260
+ },
1261
+ {
1262
+ title: '所属公司',
1263
+ dataIndex: 'companyName',
1264
+ },
1265
+ {
1266
+ title: '邮箱',
1267
+ dataIndex: 'email',
1268
+ },
1269
+ {
1270
+ title: '手机号',
1271
+ dataIndex: 'officeTelephone',
1272
+ },
1273
+ ],
1274
+ ...modalTableBusProps
1275
+ }
1276
+ }
1277
+ if(type === 'employee2') {
1278
+ // 版本2
1279
+ requestConfig = {
1280
+ url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1281
+ filter: 'qp-username,name-orGroup,like', // 过滤参数
1282
+ mappingTextField: 'name',
1283
+ mappingTextShowKeyField: 'username',
1284
+ mappingValueField: 'id',
1285
+ otherParams: {
1286
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1287
+ 'qp-employmentType-eq': 20,
1288
+ sorter: 'desc-id'
1289
+ }, // 默认参数
1290
+ sourceName: 'employeeNumber',
1291
+ ...requestConfigProp,
1292
+ }
1293
+ tableSearchForm = [
1294
+ { name: 'qp-username-like', label: '账户名称' },
1295
+ { name: 'qp-name-like', label: '显示名称' },
1296
+ // { name: 'qp-employeeNumber-like', label: '员工编码' },
1297
+ { name: 'qp-directOrgCode-in', type: 'select', label: '所属组织机构', field: {
1298
+ type: 'select',
1299
+ props: {
1300
+ mode: 'multiple',
1301
+ notFoundContent: '暂无数据',
1302
+ allowClear: true,
1303
+ showSearch: true,
1304
+ showArrow: true,
1305
+ maxTagCount: 1,
1306
+ optionFilterProp: 'children',
1307
+ filterOption: (input: string, option: { props: { children: string } }) =>
1308
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1309
+ },
1310
+ } },
1311
+ { name: 'qp-email-like', label: '邮箱' },
1312
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1313
+ ]
1314
+ Promise.all([
1315
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1316
+ ]).then((x: any)=>{
1317
+ formatSource(x,0, 2, tableSearchForm);
1318
+ })
1319
+ modalTableProps = {
1320
+ modalTableTitle: '添加员工',
1321
+ tableSearchForm,
1322
+ tableColumns: [
1323
+ {
1324
+ title: '账户名称',
1325
+ dataIndex: 'username',
1326
+ },
1327
+ {
1328
+ title: '显示名称',
1329
+ dataIndex: 'name',
1330
+ },
1331
+ // {
1332
+ // title: '员工编码',
1333
+ // dataIndex: 'employeeNumber',
1334
+ // },
1335
+ // {
1336
+ // title: '员工名称',
1337
+ // dataIndex: 'name',
1338
+ // },
1339
+ {
1340
+ title: '所属组织机构',
1341
+ dataIndex: 'directOrgName',
1342
+ },
1343
+ {
1344
+ title: '邮箱',
1345
+ dataIndex: 'email',
1346
+ },
1347
+ {
1348
+ title: '手机号',
1349
+ dataIndex: 'officeTelephone',
1350
+ },
1351
+ ],
1352
+ ...modalTableBusProps
1353
+ }
1354
+ }
1355
+
1356
+ // 配送方式选择器
1357
+ if(type === 'deliveryMode') {
1358
+ requestConfig = {
1359
+ url: `${prefixUrl.selectPrefix}/deliveryMode`,
1360
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1361
+ mappingTextField: 'name',
1362
+ mappingTextShowKeyField: 'code',
1363
+ mappingValueField: 'code',
1364
+ otherParams: {
1365
+ sorter: 'desc-id'
1366
+ }, // 默认参数
1367
+ sourceName: 'deliveryModeCode',
1368
+ ...requestConfigProp
1369
+ }
1370
+ tableSearchForm = [
1371
+ { name: 'qp-name-like', label: '配送方式名称' },
1372
+ { name: 'qp-code-like', label: '配送方式编码' },
1373
+ { name: 'qp-logisCompanyCode-in', type: 'select', label: '所属物流商', field: {
1374
+ type: 'select',
1375
+ props: {
1376
+ mode: 'multiple',
1377
+ notFoundContent: '暂无数据',
1378
+ allowClear: true,
1379
+ showSearch: true,
1380
+ showArrow: true,
1381
+ maxTagCount: 1,
1382
+ optionFilterProp: 'children',
1383
+ filterOption: (input: string, option: { props: { children: string } }) =>
1384
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1385
+ },
1386
+ } },
1387
+ { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1388
+ { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1389
+ { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1390
+ type: 'select',
1391
+ props: {
1392
+ mode: 'multiple',
1393
+ notFoundContent: '暂无数据',
1394
+ allowClear: true,
1395
+ showSearch: true,
1396
+ showArrow: true,
1397
+ maxTagCount: 1,
1398
+ optionFilterProp: 'children',
1399
+ filterOption: (input: string, option: { props: { children: string } }) =>
1400
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1401
+ },
1402
+ } },
1403
+ { name: 'qp-remark-like', label: '备注' },
1404
+ ]
1405
+ Promise.all([
1406
+ loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1407
+ pageSize: 5000,
1408
+ currentPage: 1,
1409
+ }),
1410
+ loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1411
+ pageSize: 5000,
1412
+ currentPage: 1,
1413
+ })
1414
+ ]).then((x: any)=>{
1415
+ formatSource(x,0, 2, tableSearchForm);
1416
+ formatSource(x,1, 5, tableSearchForm);
1417
+ })
1418
+ modalTableProps = {
1419
+ modalTableTitle: '选择配送方式',
1420
+ tableSearchForm,
1421
+ tableColumns: [
1422
+ {
1423
+ title: '配送方式编码',
1424
+ dataIndex: 'code',
1425
+ },
1426
+ {
1427
+ title: '配送方式名称',
1428
+ dataIndex: 'name',
1429
+ },
1430
+ {
1431
+ title: '所属物流商',
1432
+ dataIndex: 'logisCompanyName',
1433
+ },
1434
+ {
1435
+ dataIndex: 'recordChannnelCode',
1436
+ title: '单号获取通道',
1437
+ render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1438
+ },
1439
+ {
1440
+ dataIndex: 'arrivalPaySupport',
1441
+ title: '是否支持到付',
1442
+ render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1443
+ },
1444
+ {
1445
+ dataIndex: 'sheetTemplateName',
1446
+ title: '面单模板',
1447
+ },
1448
+ {
1449
+ dataIndex: 'remark',
1450
+ title: '备注',
1451
+ },
1452
+ ],
1453
+ ...modalTableBusProps
1454
+ }
1455
+ }
1456
+
1457
+ return { modalTableProps, requestConfig, needModalTable };
1458
+ }