@bit-sun/business-component 2.2.18 → 2.2.19

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 (177) 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/index.esm.js +70 -28
  9. package/dist/index.js +70 -28
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +77 -77
  18. package/src/assets/32.svg +27 -27
  19. package/src/assets/addIcon.svg +17 -17
  20. package/src/assets/allfunc.svg +27 -27
  21. package/src/assets/arrowRight.svg +24 -24
  22. package/src/assets/btn-delete.svg +29 -29
  23. package/src/assets/btn-edit.svg +19 -19
  24. package/src/assets/btn-more.svg +17 -17
  25. package/src/assets/btn-submit.svg +19 -19
  26. package/src/assets/caidan.svg +11 -11
  27. package/src/assets/close.svg +26 -26
  28. package/src/assets/drag.svg +17 -17
  29. package/src/assets/exportFail.svg +37 -37
  30. package/src/assets/exportProcessing.svg +28 -28
  31. package/src/assets/exportSuccess.svg +34 -34
  32. package/src/assets/fixed-left-active.svg +11 -11
  33. package/src/assets/fixed-left.svg +15 -15
  34. package/src/assets/fixed-right-active.svg +11 -11
  35. package/src/assets/fixed-right.svg +15 -15
  36. package/src/assets/guanbi.svg +15 -15
  37. package/src/assets/icon-quanping.svg +15 -15
  38. package/src/assets/icon-shezhi.svg +17 -17
  39. package/src/assets/label_icon_bottom.svg +25 -25
  40. package/src/assets/list-no-img.svg +21 -21
  41. package/src/assets/morentouxiang-32.svg +23 -23
  42. package/src/assets/scanning.svg +24 -24
  43. package/src/assets/upExport.svg +22 -22
  44. package/src/components/Business/AddSelectBusiness/index.md +129 -129
  45. package/src/components/Business/AddSelectBusiness/index.tsx +835 -835
  46. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  47. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  48. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  49. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  58. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  59. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  60. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  61. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  62. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  63. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  64. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  65. package/src/components/Business/BsLayouts/index.less +79 -79
  66. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  67. package/src/components/Business/BsLayouts/service.ts +10 -10
  68. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  69. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
  70. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  71. package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
  72. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  73. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  74. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  75. package/src/components/Business/CommodityEntry/index.md +70 -70
  76. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  77. package/src/components/Business/CommonAlert/index.tsx +23 -23
  78. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  79. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  80. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  81. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  82. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  83. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  84. package/src/components/Business/HomePageWrapper/index.less +33 -33
  85. package/src/components/Business/HomePageWrapper/index.md +45 -45
  86. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  87. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  88. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  89. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  90. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  91. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  92. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  93. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  94. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  95. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  96. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  97. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  98. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  99. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  100. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  101. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  102. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  103. package/src/components/Business/JsonQueryTable/index.less +16 -16
  104. package/src/components/Business/JsonQueryTable/index.md +328 -328
  105. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  106. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  107. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  108. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  109. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  110. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  111. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  112. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  113. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  114. package/src/components/Business/JsonQueryTable/static.ts +356 -356
  115. package/src/components/Business/SearchSelect/BusinessUtils.ts +1730 -1723
  116. package/src/components/Business/SearchSelect/common.ts +53 -53
  117. package/src/components/Business/SearchSelect/index.md +1310 -1310
  118. package/src/components/Business/SearchSelect/index.tsx +51 -51
  119. package/src/components/Business/SearchSelect/utils.ts +100 -100
  120. package/src/components/Business/StateFlow/index.less +130 -130
  121. package/src/components/Business/StateFlow/index.md +60 -60
  122. package/src/components/Business/StateFlow/index.tsx +29 -29
  123. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  124. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  125. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  126. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  127. package/src/components/Business/columnSettingTable/index.less +247 -247
  128. package/src/components/Business/columnSettingTable/index.md +357 -357
  129. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  130. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  131. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  132. package/src/components/Business/moreTreeTable/index.less +99 -99
  133. package/src/components/Business/moreTreeTable/index.md +448 -448
  134. package/src/components/Business/moreTreeTable/index.tsx +361 -361
  135. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  136. package/src/components/Functional/AddSelect/index.less +367 -367
  137. package/src/components/Functional/AddSelect/index.md +155 -155
  138. package/src/components/Functional/AddSelect/index.tsx +1203 -1203
  139. package/src/components/Functional/BillEntry/index.less +371 -371
  140. package/src/components/Functional/BillEntry/index.md +39 -39
  141. package/src/components/Functional/BillEntry/index.tsx +766 -766
  142. package/src/components/Functional/DataImport/index.less +63 -63
  143. package/src/components/Functional/DataImport/index.md +44 -44
  144. package/src/components/Functional/DataImport/index.tsx +695 -695
  145. package/src/components/Functional/DataValidation/index.less +63 -63
  146. package/src/components/Functional/DataValidation/index.md +39 -39
  147. package/src/components/Functional/DataValidation/index.tsx +687 -687
  148. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  149. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  150. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  151. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  152. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  153. package/src/components/Functional/SearchSelect/index.less +115 -115
  154. package/src/components/Functional/SearchSelect/index.md +141 -141
  155. package/src/components/Functional/SearchSelect/index.tsx +846 -813
  156. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  157. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  158. package/src/components/Functional/TreeSearchSelect/index.tsx +160 -160
  159. package/src/index.ts +34 -34
  160. package/src/plugin/TableColumnSetting/index.less +247 -247
  161. package/src/plugin/TableColumnSetting/index.md +50 -50
  162. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  163. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  164. package/src/styles/bsDefault.less +1912 -1912
  165. package/src/utils/CheckOneUser/index.md +39 -39
  166. package/src/utils/CheckOneUser/index.ts +51 -51
  167. package/src/utils/LocalstorageUtils.ts +90 -90
  168. package/src/utils/TableUtils.tsx +18 -18
  169. package/src/utils/checkUtils.ts +39 -39
  170. package/src/utils/enumConfig.ts +11 -11
  171. package/src/utils/getFormMode.js +12 -12
  172. package/src/utils/index.ts +3 -3
  173. package/src/utils/requestUtils.ts +34 -34
  174. package/src/utils/serialize.js +7 -7
  175. package/src/utils/utils.ts +183 -183
  176. package/tsconfig.json +29 -29
  177. package/typings.d.ts +4 -4
@@ -1,1723 +1,1730 @@
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
- }
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
+ otherParams: {
620
+ 'qp-skcStatus-eq': 1, // 状态:0禁用 1启用
621
+ }, // 默认参数
622
+ sourceName: 'qp-skcCode-eq',
623
+ ...requestConfigProp,
624
+ }
625
+ tableSearchForm = [
626
+ { name: 'qp-code-like', label: 'SKC编码' },
627
+ { name: 'qp-skcName-like', label: 'SKC名称' },
628
+ { name: 'qp-itemName-like', label: '商品名称' },
629
+ { name: 'qp-colorName-in', type: 'select', label: '颜色', field: {
630
+ type: 'select',
631
+ props: {
632
+ mode: 'multiple',
633
+ notFoundContent: '暂无数据',
634
+ allowClear: true,
635
+ showSearch: true,
636
+ showArrow: true,
637
+ maxTagCount: 1,
638
+ optionFilterProp: 'children',
639
+ filterOption: (input: string, option: { props: { children: string } }) =>
640
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
641
+ },
642
+ } },
643
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
644
+ type: 'treeSelect',
645
+ props: {
646
+ treeData: [],
647
+ treeCheckable: true,
648
+ showSearch: true,
649
+ allowClear: true,
650
+ showArrow: true,
651
+ treeNodeFilterProp: 'title',
652
+ treeDefaultExpandAll: true,
653
+ maxTagCount: 1,
654
+ placeholder: '请选择',
655
+ style: {
656
+ width: '100%',
657
+ },
658
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
659
+ },
660
+ } },
661
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
662
+ type: 'select',
663
+ props: {
664
+ mode: 'multiple',
665
+ notFoundContent: '暂无数据',
666
+ allowClear: true,
667
+ showSearch: true,
668
+ showArrow: true,
669
+ maxTagCount: 1,
670
+ optionFilterProp: 'children',
671
+ filterOption: (input: string, option: { props: { children: string } }) =>
672
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
673
+ },
674
+ } },
675
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
676
+ type: 'select',
677
+ props: {
678
+ mode: 'multiple',
679
+ notFoundContent: '暂无数据',
680
+ allowClear: true,
681
+ showSearch: true,
682
+ showArrow: true,
683
+ maxTagCount: 1,
684
+ optionFilterProp: 'children',
685
+ filterOption: (input: string, option: { props: { children: string } }) =>
686
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
687
+ },
688
+ } },
689
+ ]
690
+ Promise.all([
691
+ loadSelectSource(`${prefixUrl.formSelectFix}/item/propertyValue`, {
692
+ pageSize: 5000,
693
+ currentPage: 1,
694
+ 'qp-propertyId-eq': '1467042217951883265'
695
+ }),
696
+ loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
697
+ pageSize: 5000,
698
+ currentPage: 1,
699
+ }),
700
+ loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
701
+ pageSize: 5000,
702
+ currentPage: 1,
703
+ }),
704
+ loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
705
+ pageSize: 5000,
706
+ currentPage: 1,
707
+ 'ctl-withAuth': true
708
+ }),
709
+ ]).then((x: any)=>{
710
+ formatSource(x,0, 3, tableSearchForm,['value','value']);
711
+ formatTreeDataSource(x,1, 4, tableSearchForm);
712
+ formatSource(x,2, 5, tableSearchForm,['id','name']);
713
+ formatSource(x,3, 6, tableSearchForm,['id','name']);
714
+ })
715
+ modalTableProps = {
716
+ modalTableTitle: '选择SKC',
717
+ tableSearchForm,
718
+ tableColumns: [
719
+ {
720
+ title: 'SKC编码',
721
+ dataIndex: 'code',
722
+ },
723
+ {
724
+ title: 'SKC名称',
725
+ dataIndex: 'name',
726
+ },
727
+ {
728
+ title: '商品名称',
729
+ dataIndex: 'itemName',
730
+ },
731
+ {
732
+ title: '颜色',
733
+ dataIndex: 'colorName',
734
+ },
735
+ {
736
+ title: '类目',
737
+ dataIndex: 'categoryText',
738
+ },
739
+ {
740
+ title: '品类',
741
+ dataIndex: 'className',
742
+ },
743
+ {
744
+ title: '品牌',
745
+ dataIndex: 'brandName',
746
+ },
747
+ ],
748
+ ...modalTableBusProps
749
+ }
750
+ }
751
+
752
+ // 商品规格选择器(无弹窗)
753
+ if(type === 'skuPropertyValue') {
754
+ requestConfig = {
755
+ url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
756
+ filter: 'qp-value-like', // 过滤参数
757
+ mappingTextField: 'value',
758
+ mappingTextShowKeyField: 'propertyValueCode',
759
+ mappingValueField: 'propertyValueCode',
760
+ otherParams: {
761
+ sorter: 'desc-id'
762
+ }, // 默认参数
763
+ sourceName: 'qp-propertyValueCode-in',
764
+ ...requestConfigProp,
765
+ }
766
+ needModalTable = false
767
+ }
768
+
769
+ // 仓库选择器(物理、逻辑仓、运营仓)
770
+ if(type === 'physicalWarehouse') {
771
+ requestConfig = {
772
+ url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
773
+ filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like', // 过滤参数
774
+ mappingTextField: 'physicalWarehouseName',
775
+ mappingTextShowKeyField: 'physicalWarehouseCode',
776
+ mappingValueField: 'id',
777
+ otherParams: {
778
+ 'qp-isEnable-eq': 1,
779
+ sorter: 'desc-id'
780
+ }, // 默认参数
781
+ sourceName: 'warehouseIds',
782
+ ...requestConfigProp,
783
+ }
784
+ tableSearchForm = [
785
+ { name: 'qp-physicalWarehouseName-like', label: '物理仓名称' },
786
+ { name: 'qp-physicalWarehouseCode-like', label: '物理仓编码' },
787
+ { name: 'qp-physicalWarehouseType-eq', type: 'select', label: '物理仓类型', initialSource: getDictionarySource('SC00002') },
788
+ { name: 'qp-companyCode-eq', type: 'select', label: '所属公司', field: {
789
+ type: 'select',
790
+ props: {
791
+ mode: 'multiple',
792
+ notFoundContent: '暂无数据',
793
+ allowClear: true,
794
+ showSearch: true,
795
+ showArrow: true,
796
+ maxTagCount: 1,
797
+ optionFilterProp: 'children',
798
+ filterOption: (input: string, option: { props: { children: string } }) =>
799
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
800
+ },
801
+ } },
802
+ ]
803
+ Promise.all([
804
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
805
+ pageSize: 5000,
806
+ currentPage: 1,
807
+ 'qp-companyType-eq': 20,
808
+ }),
809
+ ]).then((x: any)=>{
810
+ formatSource(x,0, 3, tableSearchForm);
811
+ })
812
+ modalTableProps = {
813
+ modalTableTitle: '选择物理仓',
814
+ tableSearchForm,
815
+ tableColumns: [
816
+ {
817
+ title: '物理仓编码',
818
+ dataIndex: 'physicalWarehouseCode',
819
+ },
820
+ {
821
+ title: '物理仓名称',
822
+ dataIndex: 'physicalWarehouseName',
823
+ },
824
+ {
825
+ title: '物理仓类型',
826
+ dataIndex: 'physicalWarehouseType',
827
+ render: (text: number) => getDictionaryTextByValue('SC00002', text),
828
+ },
829
+ {
830
+ title: '所属公司',
831
+ dataIndex: 'companyName',
832
+ },
833
+ ],
834
+ ...modalTableBusProps
835
+ }
836
+ }
837
+ if(type === 'realWarehouse') {
838
+ requestConfig = {
839
+ url: `${prefixUrl.selectPrefix}/realWarehouse`,
840
+ filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like', // 过滤参数
841
+ mappingTextField: 'realWarehouseName',
842
+ mappingTextShowKeyField: 'realWarehouseCode',
843
+ mappingValueField: 'id',
844
+ otherParams: {
845
+ 'qp-isEnable-eq': 1,
846
+ sorter: 'desc-id'
847
+ }, // 默认参数
848
+ sourceName: 'warehouseIds',
849
+ ...requestConfigProp,
850
+ }
851
+ tableSearchForm = [
852
+ { name: 'qp-realWarehouseName-like', label: '逻辑仓名称' },
853
+ { name: 'qp-realWarehouseCode-like', label: '逻辑仓编码' },
854
+ { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
855
+ ]
856
+ modalTableProps = {
857
+ modalTableTitle: '选择逻辑仓',
858
+ tableSearchForm,
859
+ tableColumns: [
860
+ {
861
+ title: '逻辑仓编码',
862
+ dataIndex: 'realWarehouseCode',
863
+ },
864
+ {
865
+ title: '逻辑仓名称',
866
+ dataIndex: 'realWarehouseName',
867
+ },
868
+ {
869
+ title: '逻辑仓类型',
870
+ dataIndex: 'realWarehouseType',
871
+ render: (text: number) => getDictionaryTextByValue('SC00004', text),
872
+ },
873
+ ],
874
+ ...modalTableBusProps,
875
+ }
876
+ }
877
+ if(type === 'ownerWarehouse') {
878
+ requestConfig = {
879
+ url: `${prefixUrl.selectPrefix}/ownerWarehouse`,
880
+ filter: 'qp-name,operationWarehouseCode-orGroup,like', // 过滤参数
881
+ mappingTextField: 'name',
882
+ mappingTextShowKeyField: 'operationWarehouseCode',
883
+ mappingValueField: 'operationWarehouseCode',
884
+ otherParams: {
885
+ 'qp-status-eq': 1,
886
+ sorter: 'desc-id'
887
+ }, // 默认参数
888
+ sourceName: 'qp-operationWarehouseCode-in',
889
+ ...requestConfigProp,
890
+ }
891
+ tableSearchForm = [
892
+ { name: 'qp-name-like', label: '运营仓名称' },
893
+ { name: 'qp-operationWarehouseCode-like', label: '运营仓编码' },
894
+ { name: 'qp-groupCode-in', type: 'select', label: '运营组', field: {
895
+ type: 'select',
896
+ props: {
897
+ mode: 'multiple',
898
+ notFoundContent: '暂无数据',
899
+ allowClear: true,
900
+ showSearch: true,
901
+ showArrow: true,
902
+ maxTagCount: 1,
903
+ optionFilterProp: 'children',
904
+ filterOption: (input: string, option: { props: { children: string } }) =>
905
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
906
+ },
907
+ } },
908
+ ]
909
+ Promise.all([
910
+ loadSelectSource(`${prefixUrl.formSelectFix}/groupInfo/listNoPage`, { 'qp-status-eq': 1 }),
911
+ ]).then((x: any)=>{
912
+ formatSource(x,0, 2, tableSearchForm,['groupCode','groupName']);
913
+ })
914
+ modalTableProps = {
915
+ modalTableTitle: '选择运营仓',
916
+ tableSearchForm,
917
+ tableColumns: [
918
+ {
919
+ title: '运营仓编码',
920
+ dataIndex: 'operationWarehouseCode',
921
+ },
922
+ {
923
+ title: '运营仓名称',
924
+ dataIndex: 'name',
925
+ },
926
+ {
927
+ title: '运营组',
928
+ dataIndex: 'groupName',
929
+ },
930
+ ],
931
+ ...modalTableBusProps,
932
+ }
933
+ }
934
+
935
+ // 仓库选择器(虚拟、渠道仓)(无弹窗)
936
+ if(type === 'virtualWarehouse') {
937
+ requestConfig = {
938
+ url: `${prefixUrl.selectPrefix}/virtualWarehouse`,
939
+ filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like', // 过滤参数
940
+ mappingTextField: 'virtualWarehouseName',
941
+ mappingTextShowKeyField: 'virtualWarehouseCode',
942
+ mappingValueField: 'id',
943
+ otherParams: {
944
+ 'qp-isEnable-eq': 1,
945
+ sorter: 'desc-id'
946
+ }, // 默认参数
947
+ sourceName: 'warehouseIds',
948
+ ...requestConfigProp,
949
+ }
950
+ needModalTable = false
951
+ }
952
+ if(type === 'channelWarehouse') {
953
+ requestConfig = {
954
+ url: `${prefixUrl.selectPrefix}/channelWarehouse`,
955
+ filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like', // 过滤参数
956
+ mappingTextField: 'channelWarehouseName',
957
+ mappingTextShowKeyField: 'channelWarehouseCode',
958
+ mappingValueField: 'id',
959
+ otherParams: {
960
+ 'qp-isEnable-eq': 1,
961
+ sorter: 'desc-id'
962
+ }, // 默认参数
963
+ sourceName: 'warehouseIds',
964
+ ...requestConfigProp,
965
+ }
966
+ needModalTable = false
967
+ }
968
+
969
+ // 客户选择器
970
+ if(type === 'customer') {
971
+ requestConfig = {
972
+ url: `${prefixUrl.selectPrefix}/uc/customer/v2`,
973
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
974
+ mappingTextField: 'name',
975
+ mappingValueField: 'code',
976
+ otherParams: {
977
+ 'qp-status-eq': 10,
978
+ sorter: 'desc-id'
979
+ }, // 默认参数
980
+ sourceName: 'customCode',
981
+ ...requestConfigProp,
982
+ }
983
+ tableSearchForm = [
984
+ { name: 'qp-name-like', label: '客户名称' },
985
+ { name: 'qp-code-like', label: '客户编码' },
986
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
987
+ type: 'select',
988
+ props: {
989
+ mode: 'multiple',
990
+ notFoundContent: '暂无数据',
991
+ allowClear: true,
992
+ showSearch: true,
993
+ showArrow: true,
994
+ maxTagCount: 1,
995
+ optionFilterProp: 'children',
996
+ filterOption: (input: string, option: { props: { children: string } }) =>
997
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
998
+ },
999
+ } },
1000
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1001
+ type: 'select',
1002
+ props: {
1003
+ mode: 'multiple',
1004
+ notFoundContent: '暂无数据',
1005
+ allowClear: true,
1006
+ showSearch: true,
1007
+ showArrow: true,
1008
+ maxTagCount: 1,
1009
+ optionFilterProp: 'children',
1010
+ filterOption: (input: string, option: { props: { children: string } }) =>
1011
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1012
+ },
1013
+ } },
1014
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
1015
+ type: 'select',
1016
+ props: {
1017
+ mode: 'multiple',
1018
+ notFoundContent: '暂无数据',
1019
+ allowClear: true,
1020
+ showSearch: true,
1021
+ showArrow: true,
1022
+ maxTagCount: 1,
1023
+ optionFilterProp: 'children',
1024
+ filterOption: (input: string, option: { props: { children: string } }) =>
1025
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1026
+ },
1027
+ } },
1028
+ { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
1029
+ ]
1030
+ Promise.all([
1031
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1032
+ pageSize: 5000,
1033
+ currentPage: 1,
1034
+ 'qp-companyType-eq': '30',
1035
+ }),
1036
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1037
+ pageSize: 5000,
1038
+ currentPage: 1,
1039
+ }),
1040
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1041
+ pageSize: 5000,
1042
+ currentPage: 1,
1043
+ 'qp-companyType-eq': '20',
1044
+ })
1045
+ ]).then((x: any)=>{
1046
+ formatSource(x,0, 2, tableSearchForm);
1047
+ formatSource(x,1, 3, tableSearchForm);
1048
+ formatSource(x,2, 4, tableSearchForm);
1049
+ })
1050
+ modalTableProps = {
1051
+ modalTableTitle: '选择客户',
1052
+ tableSearchForm,
1053
+ tableColumns: [
1054
+ {
1055
+ title: '客户编码',
1056
+ dataIndex: 'code',
1057
+ },
1058
+ {
1059
+ title: '客户名称',
1060
+ dataIndex: 'name',
1061
+ },
1062
+ {
1063
+ title: '归属集团',
1064
+ dataIndex: 'conglomerateName',
1065
+ },
1066
+ {
1067
+ title: '归属法人公司',
1068
+ dataIndex: 'legalCompanyName',
1069
+ },
1070
+ {
1071
+ title: '归属核算主体',
1072
+ dataIndex: 'accountingName',
1073
+ },
1074
+ {
1075
+ title: '共享类型',
1076
+ dataIndex: 'sharingType',
1077
+ render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text,
1078
+ },
1079
+ ],
1080
+ ...modalTableBusProps
1081
+ }
1082
+ }
1083
+ if(type === 'customer2') {
1084
+ // 版本2
1085
+ requestConfig = {
1086
+ url: `${prefixUrl.selectPrefix}/customer`,
1087
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1088
+ mappingTextField: 'name',
1089
+ mappingValueField: 'code',
1090
+ otherParams: {
1091
+ sorter: 'desc-id'
1092
+ }, // 默认参数
1093
+ sourceName: 'customCode',
1094
+ ...requestConfigProp,
1095
+ }
1096
+ tableSearchForm = [
1097
+ { name: 'qp-name-like', label: '客户名称' },
1098
+ { name: 'qp-code-like', label: '客户编码' },
1099
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
1100
+ type: 'select',
1101
+ props: {
1102
+ // mode: 'multiple',
1103
+ notFoundContent: '暂无数据',
1104
+ allowClear: true,
1105
+ showSearch: true,
1106
+ showArrow: true,
1107
+ // maxTagCount: 1,
1108
+ optionFilterProp: 'children',
1109
+ filterOption: (input: string, option: { props: { children: string } }) =>
1110
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1111
+ },
1112
+ } },
1113
+ { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
1114
+ type: 'select',
1115
+ props: {
1116
+ // mode: 'multiple',
1117
+ notFoundContent: '暂无数据',
1118
+ allowClear: true,
1119
+ showSearch: true,
1120
+ showArrow: true,
1121
+ // maxTagCount: 1,
1122
+ optionFilterProp: 'children',
1123
+ filterOption: (input: string, option: { props: { children: string } }) =>
1124
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1125
+ },
1126
+ } },
1127
+ ]
1128
+ Promise.all([
1129
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1130
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
1131
+ ]).then((x: any)=>{
1132
+ formatSource(x,0, 2, tableSearchForm);
1133
+ formatSource(x,1, 3, tableSearchForm);
1134
+ })
1135
+ modalTableProps = {
1136
+ modalTableTitle: '选择客户',
1137
+ tableSearchForm,
1138
+ tableColumns: [
1139
+ {
1140
+ title: '客户编码',
1141
+ dataIndex: 'code',
1142
+ },
1143
+ {
1144
+ title: '客户名称',
1145
+ dataIndex: 'name',
1146
+ },
1147
+ {
1148
+ title: '创建组织',
1149
+ dataIndex: 'createOrgName',
1150
+ },
1151
+ {
1152
+ title: '使用组织',
1153
+ dataIndex: 'salesOrgName',
1154
+ },
1155
+ ],
1156
+ ...modalTableBusProps
1157
+ }
1158
+ }
1159
+
1160
+ // 店铺选择器
1161
+ if(type === 'shopFile') {
1162
+ requestConfig = {
1163
+ url: `${prefixUrl.selectPrefix}/store`,
1164
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1165
+ mappingTextField: 'name',
1166
+ mappingValueField: 'code',
1167
+ otherParams: {
1168
+ sorter: 'desc-id'
1169
+ }, // 默认参数
1170
+ sourceName: 'code',
1171
+ ...requestConfigProp,
1172
+ }
1173
+ tableSearchForm = [
1174
+ { name: 'qp-name-like', label: '店铺名称' },
1175
+ { name: 'qp-code-like', label: '店铺编码' },
1176
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1177
+ type: 'select',
1178
+ props: {
1179
+ mode: 'multiple',
1180
+ notFoundContent: '暂无数据',
1181
+ allowClear: true,
1182
+ showSearch: true,
1183
+ showArrow: true,
1184
+ maxTagCount: 1,
1185
+ optionFilterProp: 'children',
1186
+ filterOption: (input: string, option: { props: { children: string } }) =>
1187
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1188
+ },
1189
+ } },
1190
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
1191
+ type: 'select',
1192
+ props: {
1193
+ mode: 'multiple',
1194
+ notFoundContent: '暂无数据',
1195
+ allowClear: true,
1196
+ showSearch: true,
1197
+ showArrow: true,
1198
+ maxTagCount: 1,
1199
+ optionFilterProp: 'children',
1200
+ filterOption: (input: string, option: { props: { children: string } }) =>
1201
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1202
+ },
1203
+ } },
1204
+ { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
1205
+ { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
1206
+ type: 'select',
1207
+ props: {
1208
+ mode: 'multiple',
1209
+ notFoundContent: '暂无数据',
1210
+ allowClear: true,
1211
+ showSearch: true,
1212
+ showArrow: true,
1213
+ maxTagCount: 1,
1214
+ optionFilterProp: 'children',
1215
+ filterOption: (input: string, option: { props: { children: string } }) =>
1216
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1217
+ },
1218
+ } },
1219
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1220
+ type: 'select',
1221
+ props: {
1222
+ mode: 'multiple',
1223
+ notFoundContent: '暂无数据',
1224
+ allowClear: true,
1225
+ showSearch: true,
1226
+ showArrow: true,
1227
+ maxTagCount: 1,
1228
+ optionFilterProp: 'children',
1229
+ filterOption: (input: string, option: { props: { children: string } }) =>
1230
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1231
+ },
1232
+ } },
1233
+ ]
1234
+ Promise.all([
1235
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1236
+ pageSize: 5000,
1237
+ currentPage: 1,
1238
+ 'qp-companyType-eq': '30',
1239
+ }),
1240
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1241
+ pageSize: 5000,
1242
+ currentPage: 1,
1243
+ 'qp-companyType-eq': '20',
1244
+ }),
1245
+ loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1246
+ // pageSize: 5000,
1247
+ // currentPage: 1,
1248
+ 'qp-status-eq': '1',
1249
+ }),
1250
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1251
+ pageSize: 5000,
1252
+ currentPage: 1,
1253
+ }),
1254
+ ]).then((x: any)=>{
1255
+ formatSource(x,0, 2, tableSearchForm);
1256
+ formatSource(x,1, 3, tableSearchForm);
1257
+ formatSource(x,2, 5, tableSearchForm);
1258
+ formatSource(x,3, 6, tableSearchForm);
1259
+ })
1260
+ modalTableProps = {
1261
+ modalTableTitle: '选择店铺',
1262
+ tableSearchForm,
1263
+ tableColumns: [
1264
+ {
1265
+ title: '店铺编码',
1266
+ dataIndex: 'code',
1267
+ },
1268
+ {
1269
+ title: '店铺名称',
1270
+ dataIndex: 'name',
1271
+ },
1272
+ {
1273
+ title: '归属集团',
1274
+ dataIndex: 'conglomerateName',
1275
+ },
1276
+ {
1277
+ title: '归属法人公司',
1278
+ dataIndex: 'companyName',
1279
+ },
1280
+ {
1281
+ title: '店铺类型',
1282
+ dataIndex: 'type',
1283
+ render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1284
+ },
1285
+ {
1286
+ title: '店铺来源',
1287
+ dataIndex: 'platformName',
1288
+ },
1289
+ {
1290
+ title: '归属核算主体',
1291
+ dataIndex: 'accountingName',
1292
+ },
1293
+ ],
1294
+ ...modalTableBusProps
1295
+ }
1296
+ }
1297
+ if(type === 'shopFile2') {
1298
+ requestConfig = {
1299
+ url: `${prefixUrl.selectPrefix}/store/page`,
1300
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1301
+ mappingTextField: 'name',
1302
+ mappingValueField: 'code',
1303
+ otherParams: {
1304
+ sorter: 'desc-id'
1305
+ }, // 默认参数
1306
+ sourceName: 'code',
1307
+ ...requestConfigProp,
1308
+ }
1309
+ tableSearchForm = [
1310
+ { name: 'qp-name-like', label: '商店名称' },
1311
+ { name: 'qp-code-like', label: '商店编码' },
1312
+ { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1313
+ { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1314
+ type: 'select',
1315
+ props: {
1316
+ mode: 'multiple',
1317
+ notFoundContent: '暂无数据',
1318
+ allowClear: true,
1319
+ showSearch: true,
1320
+ showArrow: true,
1321
+ maxTagCount: 1,
1322
+ optionFilterProp: 'children',
1323
+ filterOption: (input: string, option: { props: { children: string } }) =>
1324
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1325
+ },
1326
+ } },
1327
+ ]
1328
+ Promise.all([
1329
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1330
+ 'qp-employeeCode-eq': getEmployeeCode(),
1331
+ 'qp-realOrg-eq': true,
1332
+ 'qp-status-eq': 10
1333
+ }),
1334
+ ]).then((x: any)=>{
1335
+ formatSource(x,0, 3, tableSearchForm);
1336
+ })
1337
+ modalTableProps = {
1338
+ modalTableTitle: '选择商店',
1339
+ tableSearchForm,
1340
+ tableColumns: [
1341
+ {
1342
+ title: '商店编码',
1343
+ dataIndex: 'code',
1344
+ },
1345
+ {
1346
+ title: '商店名称',
1347
+ dataIndex: 'name',
1348
+ },
1349
+ {
1350
+ title: '商店类型',
1351
+ dataIndex: 'type',
1352
+ render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1353
+ },
1354
+ {
1355
+ title: '所属销售组织',
1356
+ dataIndex: 'orgName',
1357
+ },
1358
+ ],
1359
+ ...modalTableBusProps
1360
+ }
1361
+ }
1362
+
1363
+ // 核算主体选择器(无弹窗)
1364
+ if(type === 'accountingSubject') {
1365
+ requestConfig = {
1366
+ url: `${prefixUrl.selectPrefix}/accountingSubject`,
1367
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1368
+ mappingTextField: 'name',
1369
+ mappingTextShowKeyField: 'code',
1370
+ mappingValueField: 'id',
1371
+ otherParams: {
1372
+ sorter: 'desc-id'
1373
+ }, // 默认参数
1374
+ sourceName: 'accountingSubjectCode',
1375
+ ...requestConfigProp,
1376
+ }
1377
+ needModalTable = false
1378
+ }
1379
+ // 库存组织选择器(无弹窗)
1380
+ if(type === 'inventoryOrg') {
1381
+ requestConfig = {
1382
+ url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1383
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1384
+ mappingTextField: 'name',
1385
+ mappingTextShowKeyField: 'code',
1386
+ mappingValueField: 'id',
1387
+ otherParams: {
1388
+ sorter: 'desc-id'
1389
+ }, // 默认参数
1390
+ sourceName: 'inventoryOrgCode',
1391
+ ...requestConfigProp,
1392
+ }
1393
+ needModalTable = false
1394
+ }
1395
+
1396
+ // 法人公司选择器(无弹窗)
1397
+ if(type === 'corporationCompany') {
1398
+ requestConfig = {
1399
+ url: `${prefixUrl.selectPrefix}/company`,
1400
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1401
+ mappingTextField: 'name',
1402
+ mappingTextShowKeyField: 'code',
1403
+ mappingValueField: 'id',
1404
+ otherParams: {
1405
+ sorter: 'desc-id'
1406
+ }, // 默认参数
1407
+ sourceName: 'corporationCompany',
1408
+ ...requestConfigProp,
1409
+ }
1410
+ needModalTable = false
1411
+ }
1412
+
1413
+ // 员工选择器
1414
+ if(type === 'employee') {
1415
+ requestConfig = {
1416
+ url: `${prefixUrl.selectPrefix}/employee/v2`,
1417
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1418
+ mappingTextField: 'name',
1419
+ mappingTextShowKeyField: 'employeeNumber',
1420
+ mappingValueField: 'employeeNumber',
1421
+ otherParams: {
1422
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1423
+ 'qp-employmentType-eq': 20,
1424
+ sorter: 'desc-id'
1425
+ }, // 默认参数
1426
+ sourceName: 'employeeNumber',
1427
+ ...requestConfigProp,
1428
+ }
1429
+ tableSearchForm = [
1430
+ { name: 'qp-name-like', label: '员工名称' },
1431
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
1432
+ { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1433
+ type: 'select',
1434
+ props: {
1435
+ mode: 'multiple',
1436
+ notFoundContent: '暂无数据',
1437
+ allowClear: true,
1438
+ showSearch: true,
1439
+ showArrow: true,
1440
+ maxTagCount: 1,
1441
+ optionFilterProp: 'children',
1442
+ filterOption: (input: string, option: { props: { children: string } }) =>
1443
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1444
+ },
1445
+ } },
1446
+ { name: 'qp-email-like', label: '邮箱' },
1447
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1448
+ ]
1449
+ Promise.all([
1450
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1451
+ pageSize: 5000,
1452
+ currentPage: 1,
1453
+ 'qp-companyType-eq': 20,
1454
+ }),
1455
+ ]).then((x: any)=>{
1456
+ formatSource(x,0, 2, tableSearchForm);
1457
+ })
1458
+ modalTableProps = {
1459
+ modalTableTitle: '选择员工',
1460
+ tableSearchForm,
1461
+ tableColumns: [
1462
+ {
1463
+ title: '员工编码',
1464
+ dataIndex: 'employeeNumber',
1465
+ },
1466
+ {
1467
+ title: '员工名称',
1468
+ dataIndex: 'name',
1469
+ },
1470
+ {
1471
+ title: '所属公司',
1472
+ dataIndex: 'companyName',
1473
+ },
1474
+ {
1475
+ title: '邮箱',
1476
+ dataIndex: 'email',
1477
+ },
1478
+ {
1479
+ title: '手机号',
1480
+ dataIndex: 'officeTelephone',
1481
+ },
1482
+ ],
1483
+ ...modalTableBusProps
1484
+ }
1485
+ }
1486
+ if(type === 'employee2') {
1487
+ // 版本2
1488
+ requestConfig = {
1489
+ url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1490
+ filter: 'qp-username,name-orGroup,like', // 过滤参数
1491
+ mappingTextField: 'name',
1492
+ mappingTextShowKeyField: 'username',
1493
+ mappingValueField: 'id',
1494
+ otherParams: {
1495
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1496
+ 'qp-employmentType-eq': 20,
1497
+ 'qp-orgViewIds-like': 'administrative-organization-view',
1498
+ sorter: 'desc-id'
1499
+ }, // 默认参数
1500
+ sourceName: 'employeeNumber',
1501
+ ...requestConfigProp,
1502
+ }
1503
+ tableSearchForm = [
1504
+ { name: 'qp-username-like', label: '账户名称' },
1505
+ { name: 'qp-name-like', label: '显示名称' },
1506
+ // { name: 'qp-employeeNumber-like', label: '员工编码' },
1507
+ { name: 'qp-code-in', type: 'treeSelect', label: '所属组织机构', field: {
1508
+ type: 'treeSelect',
1509
+ props: {
1510
+ multiple: true,
1511
+ treeData: [],
1512
+ treeCheckable: false,
1513
+ showSearch: true,
1514
+ allowClear: true,
1515
+ showArrow: true,
1516
+ treeNodeFilterProp: 'title',
1517
+ treeDefaultExpandAll: true,
1518
+ maxTagCount: 1,
1519
+ placeholder: '请选择',
1520
+ style: {
1521
+ width: '100%',
1522
+ },
1523
+ showCheckedStrategy: 'TreeSelect.SHOW_ALL',
1524
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
1525
+ },
1526
+ } },
1527
+ { name: 'qp-email-like', label: '邮箱' },
1528
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1529
+ ]
1530
+ Promise.all([
1531
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgViewNode/common/getTreeForOrgViewAndTenant`, { 'orgViewCode': 'administrative-organization-view' }),
1532
+ ]).then((x: any)=>{
1533
+ formatTreeDataSource(x,0, 2, tableSearchForm,['code', 'name']);
1534
+ })
1535
+ modalTableProps = {
1536
+ modalTableTitle: '添加员工',
1537
+ tableSearchForm,
1538
+ tableColumns: [
1539
+ {
1540
+ title: '账户名称',
1541
+ dataIndex: 'username',
1542
+ },
1543
+ {
1544
+ title: '显示名称',
1545
+ dataIndex: 'name',
1546
+ },
1547
+ // {
1548
+ // title: '员工编码',
1549
+ // dataIndex: 'employeeNumber',
1550
+ // },
1551
+ // {
1552
+ // title: '员工名称',
1553
+ // dataIndex: 'name',
1554
+ // },
1555
+ {
1556
+ title: '所属组织机构',
1557
+ dataIndex: 'administrativeNames',
1558
+ render: (text: any) => handleTextOverflow(text),
1559
+ },
1560
+ {
1561
+ title: '邮箱',
1562
+ dataIndex: 'email',
1563
+ },
1564
+ {
1565
+ title: '手机号',
1566
+ dataIndex: 'officeTelephone',
1567
+ },
1568
+ ],
1569
+ ...modalTableBusProps
1570
+ }
1571
+ }
1572
+
1573
+ // 配送方式选择器
1574
+ if(type === 'deliveryMode') {
1575
+ const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
1576
+ const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
1577
+ requestConfig = {
1578
+ url: `${prefixUrl.selectPrefix}/deliveryMode`,
1579
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1580
+ mappingTextField: 'name',
1581
+ mappingTextShowKeyField: 'code',
1582
+ mappingValueField: 'code',
1583
+ otherParams: {
1584
+ sorter: 'desc-id'
1585
+ }, // 默认参数
1586
+ sourceName: 'deliveryModeCode',
1587
+ ...requestConfigProp
1588
+ }
1589
+ tableSearchForm = [
1590
+ { name: 'qp-name-like', label: '配送方式名称' },
1591
+ { name: 'qp-code-like', label: '配送方式编码' },
1592
+ { name: logisCompanyCodeSingleSearchName, type: 'select', label: '所属物流商', field: {
1593
+ type: 'select',
1594
+ props: {
1595
+ ...(isLogisCompanyCodeSingleSearch ? {} : {
1596
+ mode: 'multiple',
1597
+ maxTagCount: 1,
1598
+ }),
1599
+ notFoundContent: '暂无数据',
1600
+ allowClear: true,
1601
+ showSearch: true,
1602
+ showArrow: true,
1603
+ optionFilterProp: 'children',
1604
+ filterOption: (input: string, option: { props: { children: string } }) =>
1605
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1606
+ },
1607
+ } },
1608
+ { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1609
+ { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1610
+ { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1611
+ type: 'select',
1612
+ props: {
1613
+ mode: 'multiple',
1614
+ notFoundContent: '暂无数据',
1615
+ allowClear: true,
1616
+ showSearch: true,
1617
+ showArrow: true,
1618
+ maxTagCount: 1,
1619
+ optionFilterProp: 'children',
1620
+ filterOption: (input: string, option: { props: { children: string } }) =>
1621
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1622
+ },
1623
+ } },
1624
+ { name: 'qp-remark-like', label: '备注' },
1625
+ ]
1626
+ Promise.all([
1627
+ loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1628
+ pageSize: 5000,
1629
+ currentPage: 1,
1630
+ }),
1631
+ loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1632
+ pageSize: 5000,
1633
+ currentPage: 1,
1634
+ })
1635
+ ]).then((x: any)=>{
1636
+ formatSource(x,0, 2, tableSearchForm);
1637
+ formatSource(x,1, 5, tableSearchForm);
1638
+ })
1639
+ modalTableProps = {
1640
+ modalTableTitle: '选择配送方式',
1641
+ tableSearchForm,
1642
+ tableColumns: [
1643
+ {
1644
+ title: '配送方式编码',
1645
+ dataIndex: 'code',
1646
+ },
1647
+ {
1648
+ title: '配送方式名称',
1649
+ dataIndex: 'name',
1650
+ },
1651
+ {
1652
+ title: '所属物流商',
1653
+ dataIndex: 'logisCompanyName',
1654
+ },
1655
+ {
1656
+ dataIndex: 'recordChannnelCode',
1657
+ title: '单号获取通道',
1658
+ render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1659
+ },
1660
+ {
1661
+ dataIndex: 'arrivalPaySupport',
1662
+ title: '是否支持到付',
1663
+ render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1664
+ },
1665
+ {
1666
+ dataIndex: 'sheetTemplateName',
1667
+ title: '面单模板',
1668
+ },
1669
+ {
1670
+ dataIndex: 'remark',
1671
+ title: '备注',
1672
+ },
1673
+ ],
1674
+ ...modalTableBusProps
1675
+ }
1676
+ }
1677
+
1678
+ // 规则场景选择器
1679
+ if(type === 'ruleTemplate') {
1680
+ requestConfig = {
1681
+ url: `${prefixUrl.selectPrefix}/ruleTemplate`,
1682
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1683
+ mappingTextField: 'name',
1684
+ mappingTextShowKeyField: 'code',
1685
+ mappingValueField: 'code',
1686
+ otherParams: {
1687
+ sorter: 'desc-id'
1688
+ }, // 默认参数
1689
+ sourceName: 'ruleTemplateCode',
1690
+ ...requestConfigProp
1691
+ }
1692
+ tableSearchForm = [
1693
+ { name: 'qp-name-like', label: '规则场景名称' },
1694
+ { name: 'qp-code-like', label: '规则场景编码' },
1695
+ ]
1696
+ modalTableProps = {
1697
+ modalTableTitle: '选择规则场景',
1698
+ tableSearchForm,
1699
+ tableColumns: [
1700
+ {
1701
+ title: '规则场景编码',
1702
+ dataIndex: 'code',
1703
+ },
1704
+ {
1705
+ title: '规则场景名称',
1706
+ dataIndex: 'name',
1707
+ render: (text: any) => handleTextOverflow(text),
1708
+ },
1709
+ {
1710
+ title: '条件对象',
1711
+ dataIndex: 'objectName',
1712
+ render: (text: any) => handleTextOverflow(text),
1713
+ },
1714
+ {
1715
+ dataIndex: 'extName',
1716
+ title: '条件扩展',
1717
+ render: (text: any) => handleTextOverflow(text),
1718
+ },
1719
+ {
1720
+ dataIndex: 'actionName',
1721
+ title: '执行动作',
1722
+ render: (text: any) => handleTextOverflow(text),
1723
+ },
1724
+ ],
1725
+ ...modalTableBusProps
1726
+ }
1727
+ }
1728
+
1729
+ return { modalTableProps, requestConfig, needModalTable };
1730
+ }