@bit-sun/business-component 2.0.38 → 2.0.39-alpha.1

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