@bit-sun/business-component 2.2.13 → 2.2.15

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