@bit-sun/business-component 2.2.47 → 2.2.49

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 (186) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  10. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  11. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  12. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  13. package/dist/index.esm.js +666 -635
  14. package/dist/index.js +673 -642
  15. package/dist/utils/utils.d.ts +1 -1
  16. package/docs/index.md +21 -21
  17. package/lib/assets/drag.svg +17 -17
  18. package/lib/assets/exportFail.svg +37 -37
  19. package/lib/assets/exportProcessing.svg +28 -28
  20. package/lib/assets/exportSuccess.svg +34 -34
  21. package/lib/assets/label_icon_bottom.svg +25 -25
  22. package/lib/assets/upExport.svg +22 -22
  23. package/package.json +77 -77
  24. package/src/assets/32.svg +27 -27
  25. package/src/assets/addIcon.svg +17 -17
  26. package/src/assets/allfunc.svg +27 -27
  27. package/src/assets/arrowRight.svg +24 -24
  28. package/src/assets/btn-delete.svg +29 -29
  29. package/src/assets/btn-edit.svg +19 -19
  30. package/src/assets/btn-more.svg +17 -17
  31. package/src/assets/btn-submit.svg +19 -19
  32. package/src/assets/caidan.svg +11 -11
  33. package/src/assets/close.svg +26 -26
  34. package/src/assets/drag.svg +17 -17
  35. package/src/assets/exportFail.svg +37 -37
  36. package/src/assets/exportProcessing.svg +28 -28
  37. package/src/assets/exportSuccess.svg +34 -34
  38. package/src/assets/fixed-left-active.svg +11 -11
  39. package/src/assets/fixed-left.svg +15 -15
  40. package/src/assets/fixed-right-active.svg +11 -11
  41. package/src/assets/fixed-right.svg +15 -15
  42. package/src/assets/guanbi.svg +15 -15
  43. package/src/assets/icon-quanping.svg +15 -15
  44. package/src/assets/icon-shezhi.svg +17 -17
  45. package/src/assets/label_icon_bottom.svg +25 -25
  46. package/src/assets/list-no-img.svg +21 -21
  47. package/src/assets/morentouxiang-32.svg +23 -23
  48. package/src/assets/scanning.svg +24 -24
  49. package/src/assets/upExport.svg +22 -22
  50. package/src/components/Business/AddSelectBusiness/index.md +161 -161
  51. package/src/components/Business/AddSelectBusiness/index.tsx +861 -861
  52. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  53. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  54. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  60. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  61. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  62. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  64. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  65. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  66. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  67. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  68. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  69. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  70. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  71. package/src/components/Business/BsLayouts/index.less +79 -79
  72. package/src/components/Business/BsLayouts/index.tsx +1484 -1484
  73. package/src/components/Business/BsLayouts/service.ts +10 -10
  74. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  75. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +564 -564
  76. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  77. package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
  78. package/src/components/Business/BsSulaQueryTable/setting.tsx +832 -832
  79. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  80. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  81. package/src/components/Business/CommodityEntry/index.md +70 -70
  82. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  83. package/src/components/Business/CommonAlert/index.tsx +23 -23
  84. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  85. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  86. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  87. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  88. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  89. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  90. package/src/components/Business/HomePageWrapper/index.less +33 -33
  91. package/src/components/Business/HomePageWrapper/index.md +45 -45
  92. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  93. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  94. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  95. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  96. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  97. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  98. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  99. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  100. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  101. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  102. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  103. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  104. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  105. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  106. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  107. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  108. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  109. package/src/components/Business/JsonQueryTable/index.less +16 -16
  110. package/src/components/Business/JsonQueryTable/index.md +328 -328
  111. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  112. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  113. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  114. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  115. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  116. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  117. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  118. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  119. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  120. package/src/components/Business/JsonQueryTable/static.ts +390 -390
  121. package/src/components/Business/SearchSelect/BusinessUtils.ts +1732 -1732
  122. package/src/components/Business/SearchSelect/common.ts +53 -53
  123. package/src/components/Business/SearchSelect/index.md +1319 -1319
  124. package/src/components/Business/SearchSelect/index.tsx +51 -51
  125. package/src/components/Business/SearchSelect/utils.ts +100 -100
  126. package/src/components/Business/StateFlow/index.less +130 -130
  127. package/src/components/Business/StateFlow/index.md +60 -60
  128. package/src/components/Business/StateFlow/index.tsx +29 -29
  129. package/src/components/Business/TreeSearchSelect/index.md +154 -154
  130. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  131. package/src/components/Business/TreeSearchSelect/utils.ts +69 -69
  132. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  133. package/src/components/Business/columnSettingTable/index.less +247 -247
  134. package/src/components/Business/columnSettingTable/index.md +357 -357
  135. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  136. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  137. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  138. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +86 -86
  139. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  140. package/src/components/Business/moreTreeTable/index.less +99 -99
  141. package/src/components/Business/moreTreeTable/index.md +448 -448
  142. package/src/components/Business/moreTreeTable/index.tsx +380 -380
  143. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  144. package/src/components/Functional/AddSelect/helps.ts +14 -14
  145. package/src/components/Functional/AddSelect/index.less +367 -367
  146. package/src/components/Functional/AddSelect/index.md +155 -155
  147. package/src/components/Functional/AddSelect/index.tsx +1279 -1279
  148. package/src/components/Functional/BillEntry/index.less +371 -371
  149. package/src/components/Functional/BillEntry/index.md +39 -39
  150. package/src/components/Functional/BillEntry/index.tsx +772 -772
  151. package/src/components/Functional/DataImport/index.less +63 -63
  152. package/src/components/Functional/DataImport/index.md +44 -44
  153. package/src/components/Functional/DataImport/index.tsx +695 -695
  154. package/src/components/Functional/DataValidation/index.less +63 -63
  155. package/src/components/Functional/DataValidation/index.md +39 -39
  156. package/src/components/Functional/DataValidation/index.tsx +687 -687
  157. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  158. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  159. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  160. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  161. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  162. package/src/components/Functional/SearchSelect/index.less +115 -115
  163. package/src/components/Functional/SearchSelect/index.md +141 -141
  164. package/src/components/Functional/SearchSelect/index.tsx +849 -849
  165. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  166. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  167. package/src/components/Functional/TreeSearchSelect/index.tsx +162 -162
  168. package/src/index.ts +34 -34
  169. package/src/plugin/TableColumnSetting/index.less +247 -247
  170. package/src/plugin/TableColumnSetting/index.md +50 -50
  171. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  172. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  173. package/src/styles/bsDefault.less +1912 -1912
  174. package/src/utils/CheckOneUser/index.md +39 -39
  175. package/src/utils/CheckOneUser/index.ts +51 -51
  176. package/src/utils/LocalstorageUtils.ts +90 -90
  177. package/src/utils/TableUtils.tsx +18 -18
  178. package/src/utils/checkUtils.ts +39 -39
  179. package/src/utils/enumConfig.ts +11 -11
  180. package/src/utils/getFormMode.js +12 -12
  181. package/src/utils/index.ts +3 -3
  182. package/src/utils/requestUtils.ts +34 -34
  183. package/src/utils/serialize.js +7 -7
  184. package/src/utils/utils.ts +183 -183
  185. package/tsconfig.json +29 -29
  186. package/typings.d.ts +4 -4
@@ -1,1732 +1,1732 @@
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/sizeBySkcConfig`, {
692
- pageSize: 10000,
693
- currentPage: 1,
694
- type: 2, // 类型:1尺码;2颜色
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
- 'qp-isMain-eq': 1, // 员工权限过滤,若不需要不要加
1092
- 'qp-status-eq': 1, // 1启用 0禁用
1093
- sorter: 'desc-id'
1094
- }, // 默认参数
1095
- sourceName: 'customCode',
1096
- ...requestConfigProp,
1097
- }
1098
- tableSearchForm = [
1099
- { name: 'qp-name-like', label: '客户名称' },
1100
- { name: 'qp-code-like', label: '客户编码' },
1101
- { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
1102
- type: 'select',
1103
- props: {
1104
- // mode: 'multiple',
1105
- notFoundContent: '暂无数据',
1106
- allowClear: true,
1107
- showSearch: true,
1108
- showArrow: true,
1109
- // maxTagCount: 1,
1110
- optionFilterProp: 'children',
1111
- filterOption: (input: string, option: { props: { children: string } }) =>
1112
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1113
- },
1114
- } },
1115
- { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
1116
- type: 'select',
1117
- props: {
1118
- // mode: 'multiple',
1119
- notFoundContent: '暂无数据',
1120
- allowClear: true,
1121
- showSearch: true,
1122
- showArrow: true,
1123
- // maxTagCount: 1,
1124
- optionFilterProp: 'children',
1125
- filterOption: (input: string, option: { props: { children: string } }) =>
1126
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1127
- },
1128
- } },
1129
- ]
1130
- Promise.all([
1131
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1132
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
1133
- ]).then((x: any)=>{
1134
- formatSource(x,0, 2, tableSearchForm);
1135
- formatSource(x,1, 3, tableSearchForm);
1136
- })
1137
- modalTableProps = {
1138
- modalTableTitle: '选择客户',
1139
- tableSearchForm,
1140
- tableColumns: [
1141
- {
1142
- title: '客户编码',
1143
- dataIndex: 'code',
1144
- },
1145
- {
1146
- title: '客户名称',
1147
- dataIndex: 'name',
1148
- },
1149
- {
1150
- title: '创建组织',
1151
- dataIndex: 'createOrgName',
1152
- },
1153
- {
1154
- title: '使用组织',
1155
- dataIndex: 'salesOrgName',
1156
- },
1157
- ],
1158
- ...modalTableBusProps
1159
- }
1160
- }
1161
-
1162
- // 店铺选择器
1163
- if(type === 'shopFile') {
1164
- requestConfig = {
1165
- url: `${prefixUrl.selectPrefix}/store`,
1166
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1167
- mappingTextField: 'name',
1168
- mappingValueField: 'code',
1169
- otherParams: {
1170
- sorter: 'desc-id'
1171
- }, // 默认参数
1172
- sourceName: 'code',
1173
- ...requestConfigProp,
1174
- }
1175
- tableSearchForm = [
1176
- { name: 'qp-name-like', label: '店铺名称' },
1177
- { name: 'qp-code-like', label: '店铺编码' },
1178
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1179
- type: 'select',
1180
- props: {
1181
- mode: 'multiple',
1182
- notFoundContent: '暂无数据',
1183
- allowClear: true,
1184
- showSearch: true,
1185
- showArrow: true,
1186
- maxTagCount: 1,
1187
- optionFilterProp: 'children',
1188
- filterOption: (input: string, option: { props: { children: string } }) =>
1189
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1190
- },
1191
- } },
1192
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
1193
- type: 'select',
1194
- props: {
1195
- mode: 'multiple',
1196
- notFoundContent: '暂无数据',
1197
- allowClear: true,
1198
- showSearch: true,
1199
- showArrow: true,
1200
- maxTagCount: 1,
1201
- optionFilterProp: 'children',
1202
- filterOption: (input: string, option: { props: { children: string } }) =>
1203
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1204
- },
1205
- } },
1206
- { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
1207
- { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
1208
- type: 'select',
1209
- props: {
1210
- mode: 'multiple',
1211
- notFoundContent: '暂无数据',
1212
- allowClear: true,
1213
- showSearch: true,
1214
- showArrow: true,
1215
- maxTagCount: 1,
1216
- optionFilterProp: 'children',
1217
- filterOption: (input: string, option: { props: { children: string } }) =>
1218
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1219
- },
1220
- } },
1221
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1222
- type: 'select',
1223
- props: {
1224
- mode: 'multiple',
1225
- notFoundContent: '暂无数据',
1226
- allowClear: true,
1227
- showSearch: true,
1228
- showArrow: true,
1229
- maxTagCount: 1,
1230
- optionFilterProp: 'children',
1231
- filterOption: (input: string, option: { props: { children: string } }) =>
1232
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1233
- },
1234
- } },
1235
- ]
1236
- Promise.all([
1237
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1238
- pageSize: 5000,
1239
- currentPage: 1,
1240
- 'qp-companyType-eq': '30',
1241
- }),
1242
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1243
- pageSize: 5000,
1244
- currentPage: 1,
1245
- 'qp-companyType-eq': '20',
1246
- }),
1247
- loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1248
- // pageSize: 5000,
1249
- // currentPage: 1,
1250
- 'qp-status-eq': '1',
1251
- }),
1252
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1253
- pageSize: 5000,
1254
- currentPage: 1,
1255
- }),
1256
- ]).then((x: any)=>{
1257
- formatSource(x,0, 2, tableSearchForm);
1258
- formatSource(x,1, 3, tableSearchForm);
1259
- formatSource(x,2, 5, tableSearchForm);
1260
- formatSource(x,3, 6, tableSearchForm);
1261
- })
1262
- modalTableProps = {
1263
- modalTableTitle: '选择店铺',
1264
- tableSearchForm,
1265
- tableColumns: [
1266
- {
1267
- title: '店铺编码',
1268
- dataIndex: 'code',
1269
- },
1270
- {
1271
- title: '店铺名称',
1272
- dataIndex: 'name',
1273
- },
1274
- {
1275
- title: '归属集团',
1276
- dataIndex: 'conglomerateName',
1277
- },
1278
- {
1279
- title: '归属法人公司',
1280
- dataIndex: 'companyName',
1281
- },
1282
- {
1283
- title: '店铺类型',
1284
- dataIndex: 'type',
1285
- render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1286
- },
1287
- {
1288
- title: '店铺来源',
1289
- dataIndex: 'platformName',
1290
- },
1291
- {
1292
- title: '归属核算主体',
1293
- dataIndex: 'accountingName',
1294
- },
1295
- ],
1296
- ...modalTableBusProps
1297
- }
1298
- }
1299
- if(type === 'shopFile2') {
1300
- requestConfig = {
1301
- url: `${prefixUrl.selectPrefix}/store/page`,
1302
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1303
- mappingTextField: 'name',
1304
- mappingValueField: 'code',
1305
- otherParams: {
1306
- sorter: 'desc-id'
1307
- }, // 默认参数
1308
- sourceName: 'code',
1309
- ...requestConfigProp,
1310
- }
1311
- tableSearchForm = [
1312
- { name: 'qp-name-like', label: '商店名称' },
1313
- { name: 'qp-code-like', label: '商店编码' },
1314
- { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1315
- { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1316
- type: 'select',
1317
- props: {
1318
- mode: 'multiple',
1319
- notFoundContent: '暂无数据',
1320
- allowClear: true,
1321
- showSearch: true,
1322
- showArrow: true,
1323
- maxTagCount: 1,
1324
- optionFilterProp: 'children',
1325
- filterOption: (input: string, option: { props: { children: string } }) =>
1326
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1327
- },
1328
- } },
1329
- ]
1330
- Promise.all([
1331
- loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1332
- 'qp-employeeCode-eq': getEmployeeCode(),
1333
- 'qp-realOrg-eq': true,
1334
- 'qp-status-eq': 10
1335
- }),
1336
- ]).then((x: any)=>{
1337
- formatSource(x,0, 3, tableSearchForm);
1338
- })
1339
- modalTableProps = {
1340
- modalTableTitle: '选择商店',
1341
- tableSearchForm,
1342
- tableColumns: [
1343
- {
1344
- title: '商店编码',
1345
- dataIndex: 'code',
1346
- },
1347
- {
1348
- title: '商店名称',
1349
- dataIndex: 'name',
1350
- },
1351
- {
1352
- title: '商店类型',
1353
- dataIndex: 'type',
1354
- render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1355
- },
1356
- {
1357
- title: '所属销售组织',
1358
- dataIndex: 'orgName',
1359
- },
1360
- ],
1361
- ...modalTableBusProps
1362
- }
1363
- }
1364
-
1365
- // 核算主体选择器(无弹窗)
1366
- if(type === 'accountingSubject') {
1367
- requestConfig = {
1368
- url: `${prefixUrl.selectPrefix}/accountingSubject`,
1369
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1370
- mappingTextField: 'name',
1371
- mappingTextShowKeyField: 'code',
1372
- mappingValueField: 'id',
1373
- otherParams: {
1374
- sorter: 'desc-id'
1375
- }, // 默认参数
1376
- sourceName: 'accountingSubjectCode',
1377
- ...requestConfigProp,
1378
- }
1379
- needModalTable = false
1380
- }
1381
- // 库存组织选择器(无弹窗)
1382
- if(type === 'inventoryOrg') {
1383
- requestConfig = {
1384
- url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1385
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1386
- mappingTextField: 'name',
1387
- mappingTextShowKeyField: 'code',
1388
- mappingValueField: 'id',
1389
- otherParams: {
1390
- sorter: 'desc-id'
1391
- }, // 默认参数
1392
- sourceName: 'inventoryOrgCode',
1393
- ...requestConfigProp,
1394
- }
1395
- needModalTable = false
1396
- }
1397
-
1398
- // 法人公司选择器(无弹窗)
1399
- if(type === 'corporationCompany') {
1400
- requestConfig = {
1401
- url: `${prefixUrl.selectPrefix}/company`,
1402
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1403
- mappingTextField: 'name',
1404
- mappingTextShowKeyField: 'code',
1405
- mappingValueField: 'id',
1406
- otherParams: {
1407
- sorter: 'desc-id'
1408
- }, // 默认参数
1409
- sourceName: 'corporationCompany',
1410
- ...requestConfigProp,
1411
- }
1412
- needModalTable = false
1413
- }
1414
-
1415
- // 员工选择器
1416
- if(type === 'employee') {
1417
- requestConfig = {
1418
- url: `${prefixUrl.selectPrefix}/employee/v2`,
1419
- filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1420
- mappingTextField: 'name',
1421
- mappingTextShowKeyField: 'employeeNumber',
1422
- mappingValueField: 'employeeNumber',
1423
- otherParams: {
1424
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1425
- 'qp-employmentType-eq': 20,
1426
- sorter: 'desc-id'
1427
- }, // 默认参数
1428
- sourceName: 'employeeNumber',
1429
- ...requestConfigProp,
1430
- }
1431
- tableSearchForm = [
1432
- { name: 'qp-name-like', label: '员工名称' },
1433
- { name: 'qp-employeeNumber-like', label: '员工编码' },
1434
- { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1435
- type: 'select',
1436
- props: {
1437
- mode: 'multiple',
1438
- notFoundContent: '暂无数据',
1439
- allowClear: true,
1440
- showSearch: true,
1441
- showArrow: true,
1442
- maxTagCount: 1,
1443
- optionFilterProp: 'children',
1444
- filterOption: (input: string, option: { props: { children: string } }) =>
1445
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1446
- },
1447
- } },
1448
- { name: 'qp-email-like', label: '邮箱' },
1449
- { name: 'qp-officeTelephone-like', label: '手机号' },
1450
- ]
1451
- Promise.all([
1452
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1453
- pageSize: 5000,
1454
- currentPage: 1,
1455
- 'qp-companyType-eq': 20,
1456
- }),
1457
- ]).then((x: any)=>{
1458
- formatSource(x,0, 2, tableSearchForm);
1459
- })
1460
- modalTableProps = {
1461
- modalTableTitle: '选择员工',
1462
- tableSearchForm,
1463
- tableColumns: [
1464
- {
1465
- title: '员工编码',
1466
- dataIndex: 'employeeNumber',
1467
- },
1468
- {
1469
- title: '员工名称',
1470
- dataIndex: 'name',
1471
- },
1472
- {
1473
- title: '所属公司',
1474
- dataIndex: 'companyName',
1475
- },
1476
- {
1477
- title: '邮箱',
1478
- dataIndex: 'email',
1479
- },
1480
- {
1481
- title: '手机号',
1482
- dataIndex: 'officeTelephone',
1483
- },
1484
- ],
1485
- ...modalTableBusProps
1486
- }
1487
- }
1488
- if(type === 'employee2') {
1489
- // 版本2
1490
- requestConfig = {
1491
- url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1492
- filter: 'qp-username,name-orGroup,like', // 过滤参数
1493
- mappingTextField: 'name',
1494
- mappingTextShowKeyField: 'username',
1495
- mappingValueField: 'id',
1496
- otherParams: {
1497
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1498
- 'qp-employmentType-eq': 20,
1499
- 'qp-orgViewIds-like': 'administrative-organization-view',
1500
- sorter: 'desc-id'
1501
- }, // 默认参数
1502
- sourceName: 'employeeNumber',
1503
- ...requestConfigProp,
1504
- }
1505
- tableSearchForm = [
1506
- { name: 'qp-username-like', label: '账户名称' },
1507
- { name: 'qp-name-like', label: '显示名称' },
1508
- // { name: 'qp-employeeNumber-like', label: '员工编码' },
1509
- { name: 'qp-code-in', type: 'treeSelect', label: '所属组织机构', field: {
1510
- type: 'treeSelect',
1511
- props: {
1512
- multiple: true,
1513
- treeData: [],
1514
- treeCheckable: false,
1515
- showSearch: true,
1516
- allowClear: true,
1517
- showArrow: true,
1518
- treeNodeFilterProp: 'title',
1519
- treeDefaultExpandAll: true,
1520
- maxTagCount: 1,
1521
- placeholder: '请选择',
1522
- style: {
1523
- width: '100%',
1524
- },
1525
- showCheckedStrategy: 'TreeSelect.SHOW_ALL',
1526
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
1527
- },
1528
- } },
1529
- { name: 'qp-email-like', label: '邮箱' },
1530
- { name: 'qp-officeTelephone-like', label: '手机号' },
1531
- ]
1532
- Promise.all([
1533
- loadSelectSource(`${prefixUrl.formSelectFix}/orgViewNode/common/getTreeForOrgViewAndTenant`, { 'orgViewCode': 'administrative-organization-view' }),
1534
- ]).then((x: any)=>{
1535
- formatTreeDataSource(x,0, 2, tableSearchForm,['code', 'name']);
1536
- })
1537
- modalTableProps = {
1538
- modalTableTitle: '添加员工',
1539
- tableSearchForm,
1540
- tableColumns: [
1541
- {
1542
- title: '账户名称',
1543
- dataIndex: 'username',
1544
- },
1545
- {
1546
- title: '显示名称',
1547
- dataIndex: 'name',
1548
- },
1549
- // {
1550
- // title: '员工编码',
1551
- // dataIndex: 'employeeNumber',
1552
- // },
1553
- // {
1554
- // title: '员工名称',
1555
- // dataIndex: 'name',
1556
- // },
1557
- {
1558
- title: '所属组织机构',
1559
- dataIndex: 'administrativeNames',
1560
- render: (text: any) => handleTextOverflow(text),
1561
- },
1562
- {
1563
- title: '邮箱',
1564
- dataIndex: 'email',
1565
- },
1566
- {
1567
- title: '手机号',
1568
- dataIndex: 'officeTelephone',
1569
- },
1570
- ],
1571
- ...modalTableBusProps
1572
- }
1573
- }
1574
-
1575
- // 配送方式选择器
1576
- if(type === 'deliveryMode') {
1577
- const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
1578
- const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
1579
- requestConfig = {
1580
- url: `${prefixUrl.selectPrefix}/deliveryMode`,
1581
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1582
- mappingTextField: 'name',
1583
- mappingTextShowKeyField: 'code',
1584
- mappingValueField: 'code',
1585
- otherParams: {
1586
- sorter: 'desc-id'
1587
- }, // 默认参数
1588
- sourceName: 'deliveryModeCode',
1589
- ...requestConfigProp
1590
- }
1591
- tableSearchForm = [
1592
- { name: 'qp-name-like', label: '配送方式名称' },
1593
- { name: 'qp-code-like', label: '配送方式编码' },
1594
- { name: logisCompanyCodeSingleSearchName, type: 'select', label: '所属物流商', field: {
1595
- type: 'select',
1596
- props: {
1597
- ...(isLogisCompanyCodeSingleSearch ? {} : {
1598
- mode: 'multiple',
1599
- maxTagCount: 1,
1600
- }),
1601
- notFoundContent: '暂无数据',
1602
- allowClear: true,
1603
- showSearch: true,
1604
- showArrow: true,
1605
- optionFilterProp: 'children',
1606
- filterOption: (input: string, option: { props: { children: string } }) =>
1607
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1608
- },
1609
- } },
1610
- { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1611
- { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1612
- { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1613
- type: 'select',
1614
- props: {
1615
- mode: 'multiple',
1616
- notFoundContent: '暂无数据',
1617
- allowClear: true,
1618
- showSearch: true,
1619
- showArrow: true,
1620
- maxTagCount: 1,
1621
- optionFilterProp: 'children',
1622
- filterOption: (input: string, option: { props: { children: string } }) =>
1623
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1624
- },
1625
- } },
1626
- { name: 'qp-remark-like', label: '备注' },
1627
- ]
1628
- Promise.all([
1629
- loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1630
- pageSize: 5000,
1631
- currentPage: 1,
1632
- }),
1633
- loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1634
- pageSize: 5000,
1635
- currentPage: 1,
1636
- })
1637
- ]).then((x: any)=>{
1638
- formatSource(x,0, 2, tableSearchForm);
1639
- formatSource(x,1, 5, tableSearchForm);
1640
- })
1641
- modalTableProps = {
1642
- modalTableTitle: '选择配送方式',
1643
- tableSearchForm,
1644
- tableColumns: [
1645
- {
1646
- title: '配送方式编码',
1647
- dataIndex: 'code',
1648
- },
1649
- {
1650
- title: '配送方式名称',
1651
- dataIndex: 'name',
1652
- },
1653
- {
1654
- title: '所属物流商',
1655
- dataIndex: 'logisCompanyName',
1656
- },
1657
- {
1658
- dataIndex: 'recordChannnelCode',
1659
- title: '单号获取通道',
1660
- render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1661
- },
1662
- {
1663
- dataIndex: 'arrivalPaySupport',
1664
- title: '是否支持到付',
1665
- render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1666
- },
1667
- {
1668
- dataIndex: 'sheetTemplateName',
1669
- title: '面单模板',
1670
- },
1671
- {
1672
- dataIndex: 'remark',
1673
- title: '备注',
1674
- },
1675
- ],
1676
- ...modalTableBusProps
1677
- }
1678
- }
1679
-
1680
- // 规则模板选择器
1681
- if(type === 'ruleTemplate') {
1682
- requestConfig = {
1683
- url: `${prefixUrl.selectPrefix}/ruleTemplate`,
1684
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1685
- mappingTextField: 'name',
1686
- mappingTextShowKeyField: 'code',
1687
- mappingValueField: 'code',
1688
- otherParams: {
1689
- sorter: 'desc-id'
1690
- }, // 默认参数
1691
- sourceName: 'ruleTemplateCode',
1692
- ...requestConfigProp
1693
- }
1694
- tableSearchForm = [
1695
- { name: 'qp-name-like', label: '规则模板名称' },
1696
- { name: 'qp-code-like', label: '规则模板编码' },
1697
- ]
1698
- modalTableProps = {
1699
- modalTableTitle: '选择规则模板',
1700
- tableSearchForm,
1701
- tableColumns: [
1702
- {
1703
- title: '规则模板编码',
1704
- dataIndex: 'code',
1705
- },
1706
- {
1707
- title: '规则模板名称',
1708
- dataIndex: 'name',
1709
- render: (text: any) => handleTextOverflow(text),
1710
- },
1711
- {
1712
- title: '条件对象',
1713
- dataIndex: 'objectName',
1714
- render: (text: any) => handleTextOverflow(text),
1715
- },
1716
- {
1717
- dataIndex: 'extName',
1718
- title: '条件扩展',
1719
- render: (text: any) => handleTextOverflow(text),
1720
- },
1721
- {
1722
- dataIndex: 'actionName',
1723
- title: '执行动作',
1724
- render: (text: any) => handleTextOverflow(text),
1725
- },
1726
- ],
1727
- ...modalTableBusProps
1728
- }
1729
- }
1730
-
1731
- return { modalTableProps, requestConfig, needModalTable };
1732
- }
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/sizeBySkcConfig`, {
692
+ pageSize: 10000,
693
+ currentPage: 1,
694
+ type: 2, // 类型:1尺码;2颜色
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
+ 'qp-isMain-eq': 1, // 员工权限过滤,若不需要不要加
1092
+ 'qp-status-eq': 1, // 1启用 0禁用
1093
+ sorter: 'desc-id'
1094
+ }, // 默认参数
1095
+ sourceName: 'customCode',
1096
+ ...requestConfigProp,
1097
+ }
1098
+ tableSearchForm = [
1099
+ { name: 'qp-name-like', label: '客户名称' },
1100
+ { name: 'qp-code-like', label: '客户编码' },
1101
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
1102
+ type: 'select',
1103
+ props: {
1104
+ // mode: 'multiple',
1105
+ notFoundContent: '暂无数据',
1106
+ allowClear: true,
1107
+ showSearch: true,
1108
+ showArrow: true,
1109
+ // maxTagCount: 1,
1110
+ optionFilterProp: 'children',
1111
+ filterOption: (input: string, option: { props: { children: string } }) =>
1112
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1113
+ },
1114
+ } },
1115
+ { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
1116
+ type: 'select',
1117
+ props: {
1118
+ // mode: 'multiple',
1119
+ notFoundContent: '暂无数据',
1120
+ allowClear: true,
1121
+ showSearch: true,
1122
+ showArrow: true,
1123
+ // maxTagCount: 1,
1124
+ optionFilterProp: 'children',
1125
+ filterOption: (input: string, option: { props: { children: string } }) =>
1126
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1127
+ },
1128
+ } },
1129
+ ]
1130
+ Promise.all([
1131
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1132
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
1133
+ ]).then((x: any)=>{
1134
+ formatSource(x,0, 2, tableSearchForm);
1135
+ formatSource(x,1, 3, tableSearchForm);
1136
+ })
1137
+ modalTableProps = {
1138
+ modalTableTitle: '选择客户',
1139
+ tableSearchForm,
1140
+ tableColumns: [
1141
+ {
1142
+ title: '客户编码',
1143
+ dataIndex: 'code',
1144
+ },
1145
+ {
1146
+ title: '客户名称',
1147
+ dataIndex: 'name',
1148
+ },
1149
+ {
1150
+ title: '创建组织',
1151
+ dataIndex: 'createOrgName',
1152
+ },
1153
+ {
1154
+ title: '使用组织',
1155
+ dataIndex: 'salesOrgName',
1156
+ },
1157
+ ],
1158
+ ...modalTableBusProps
1159
+ }
1160
+ }
1161
+
1162
+ // 店铺选择器
1163
+ if(type === 'shopFile') {
1164
+ requestConfig = {
1165
+ url: `${prefixUrl.selectPrefix}/store`,
1166
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1167
+ mappingTextField: 'name',
1168
+ mappingValueField: 'code',
1169
+ otherParams: {
1170
+ sorter: 'desc-id'
1171
+ }, // 默认参数
1172
+ sourceName: 'code',
1173
+ ...requestConfigProp,
1174
+ }
1175
+ tableSearchForm = [
1176
+ { name: 'qp-name-like', label: '店铺名称' },
1177
+ { name: 'qp-code-like', label: '店铺编码' },
1178
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1179
+ type: 'select',
1180
+ props: {
1181
+ mode: 'multiple',
1182
+ notFoundContent: '暂无数据',
1183
+ allowClear: true,
1184
+ showSearch: true,
1185
+ showArrow: true,
1186
+ maxTagCount: 1,
1187
+ optionFilterProp: 'children',
1188
+ filterOption: (input: string, option: { props: { children: string } }) =>
1189
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1190
+ },
1191
+ } },
1192
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
1193
+ type: 'select',
1194
+ props: {
1195
+ mode: 'multiple',
1196
+ notFoundContent: '暂无数据',
1197
+ allowClear: true,
1198
+ showSearch: true,
1199
+ showArrow: true,
1200
+ maxTagCount: 1,
1201
+ optionFilterProp: 'children',
1202
+ filterOption: (input: string, option: { props: { children: string } }) =>
1203
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1204
+ },
1205
+ } },
1206
+ { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
1207
+ { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
1208
+ type: 'select',
1209
+ props: {
1210
+ mode: 'multiple',
1211
+ notFoundContent: '暂无数据',
1212
+ allowClear: true,
1213
+ showSearch: true,
1214
+ showArrow: true,
1215
+ maxTagCount: 1,
1216
+ optionFilterProp: 'children',
1217
+ filterOption: (input: string, option: { props: { children: string } }) =>
1218
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1219
+ },
1220
+ } },
1221
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1222
+ type: 'select',
1223
+ props: {
1224
+ mode: 'multiple',
1225
+ notFoundContent: '暂无数据',
1226
+ allowClear: true,
1227
+ showSearch: true,
1228
+ showArrow: true,
1229
+ maxTagCount: 1,
1230
+ optionFilterProp: 'children',
1231
+ filterOption: (input: string, option: { props: { children: string } }) =>
1232
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1233
+ },
1234
+ } },
1235
+ ]
1236
+ Promise.all([
1237
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1238
+ pageSize: 5000,
1239
+ currentPage: 1,
1240
+ 'qp-companyType-eq': '30',
1241
+ }),
1242
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1243
+ pageSize: 5000,
1244
+ currentPage: 1,
1245
+ 'qp-companyType-eq': '20',
1246
+ }),
1247
+ loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1248
+ // pageSize: 5000,
1249
+ // currentPage: 1,
1250
+ 'qp-status-eq': '1',
1251
+ }),
1252
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1253
+ pageSize: 5000,
1254
+ currentPage: 1,
1255
+ }),
1256
+ ]).then((x: any)=>{
1257
+ formatSource(x,0, 2, tableSearchForm);
1258
+ formatSource(x,1, 3, tableSearchForm);
1259
+ formatSource(x,2, 5, tableSearchForm);
1260
+ formatSource(x,3, 6, tableSearchForm);
1261
+ })
1262
+ modalTableProps = {
1263
+ modalTableTitle: '选择店铺',
1264
+ tableSearchForm,
1265
+ tableColumns: [
1266
+ {
1267
+ title: '店铺编码',
1268
+ dataIndex: 'code',
1269
+ },
1270
+ {
1271
+ title: '店铺名称',
1272
+ dataIndex: 'name',
1273
+ },
1274
+ {
1275
+ title: '归属集团',
1276
+ dataIndex: 'conglomerateName',
1277
+ },
1278
+ {
1279
+ title: '归属法人公司',
1280
+ dataIndex: 'companyName',
1281
+ },
1282
+ {
1283
+ title: '店铺类型',
1284
+ dataIndex: 'type',
1285
+ render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1286
+ },
1287
+ {
1288
+ title: '店铺来源',
1289
+ dataIndex: 'platformName',
1290
+ },
1291
+ {
1292
+ title: '归属核算主体',
1293
+ dataIndex: 'accountingName',
1294
+ },
1295
+ ],
1296
+ ...modalTableBusProps
1297
+ }
1298
+ }
1299
+ if(type === 'shopFile2') {
1300
+ requestConfig = {
1301
+ url: `${prefixUrl.selectPrefix}/store/page`,
1302
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1303
+ mappingTextField: 'name',
1304
+ mappingValueField: 'code',
1305
+ otherParams: {
1306
+ sorter: 'desc-id'
1307
+ }, // 默认参数
1308
+ sourceName: 'code',
1309
+ ...requestConfigProp,
1310
+ }
1311
+ tableSearchForm = [
1312
+ { name: 'qp-name-like', label: '商店名称' },
1313
+ { name: 'qp-code-like', label: '商店编码' },
1314
+ { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1315
+ { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1316
+ type: 'select',
1317
+ props: {
1318
+ mode: 'multiple',
1319
+ notFoundContent: '暂无数据',
1320
+ allowClear: true,
1321
+ showSearch: true,
1322
+ showArrow: true,
1323
+ maxTagCount: 1,
1324
+ optionFilterProp: 'children',
1325
+ filterOption: (input: string, option: { props: { children: string } }) =>
1326
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1327
+ },
1328
+ } },
1329
+ ]
1330
+ Promise.all([
1331
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1332
+ 'qp-employeeCode-eq': getEmployeeCode(),
1333
+ 'qp-realOrg-eq': true,
1334
+ 'qp-status-eq': 10
1335
+ }),
1336
+ ]).then((x: any)=>{
1337
+ formatSource(x,0, 3, tableSearchForm);
1338
+ })
1339
+ modalTableProps = {
1340
+ modalTableTitle: '选择商店',
1341
+ tableSearchForm,
1342
+ tableColumns: [
1343
+ {
1344
+ title: '商店编码',
1345
+ dataIndex: 'code',
1346
+ },
1347
+ {
1348
+ title: '商店名称',
1349
+ dataIndex: 'name',
1350
+ },
1351
+ {
1352
+ title: '商店类型',
1353
+ dataIndex: 'type',
1354
+ render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1355
+ },
1356
+ {
1357
+ title: '所属销售组织',
1358
+ dataIndex: 'orgName',
1359
+ },
1360
+ ],
1361
+ ...modalTableBusProps
1362
+ }
1363
+ }
1364
+
1365
+ // 核算主体选择器(无弹窗)
1366
+ if(type === 'accountingSubject') {
1367
+ requestConfig = {
1368
+ url: `${prefixUrl.selectPrefix}/accountingSubject`,
1369
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1370
+ mappingTextField: 'name',
1371
+ mappingTextShowKeyField: 'code',
1372
+ mappingValueField: 'id',
1373
+ otherParams: {
1374
+ sorter: 'desc-id'
1375
+ }, // 默认参数
1376
+ sourceName: 'accountingSubjectCode',
1377
+ ...requestConfigProp,
1378
+ }
1379
+ needModalTable = false
1380
+ }
1381
+ // 库存组织选择器(无弹窗)
1382
+ if(type === 'inventoryOrg') {
1383
+ requestConfig = {
1384
+ url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1385
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1386
+ mappingTextField: 'name',
1387
+ mappingTextShowKeyField: 'code',
1388
+ mappingValueField: 'id',
1389
+ otherParams: {
1390
+ sorter: 'desc-id'
1391
+ }, // 默认参数
1392
+ sourceName: 'inventoryOrgCode',
1393
+ ...requestConfigProp,
1394
+ }
1395
+ needModalTable = false
1396
+ }
1397
+
1398
+ // 法人公司选择器(无弹窗)
1399
+ if(type === 'corporationCompany') {
1400
+ requestConfig = {
1401
+ url: `${prefixUrl.selectPrefix}/company`,
1402
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1403
+ mappingTextField: 'name',
1404
+ mappingTextShowKeyField: 'code',
1405
+ mappingValueField: 'id',
1406
+ otherParams: {
1407
+ sorter: 'desc-id'
1408
+ }, // 默认参数
1409
+ sourceName: 'corporationCompany',
1410
+ ...requestConfigProp,
1411
+ }
1412
+ needModalTable = false
1413
+ }
1414
+
1415
+ // 员工选择器
1416
+ if(type === 'employee') {
1417
+ requestConfig = {
1418
+ url: `${prefixUrl.selectPrefix}/employee/v2`,
1419
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1420
+ mappingTextField: 'name',
1421
+ mappingTextShowKeyField: 'employeeNumber',
1422
+ mappingValueField: 'employeeNumber',
1423
+ otherParams: {
1424
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1425
+ 'qp-employmentType-eq': 20,
1426
+ sorter: 'desc-id'
1427
+ }, // 默认参数
1428
+ sourceName: 'employeeNumber',
1429
+ ...requestConfigProp,
1430
+ }
1431
+ tableSearchForm = [
1432
+ { name: 'qp-name-like', label: '员工名称' },
1433
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
1434
+ { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1435
+ type: 'select',
1436
+ props: {
1437
+ mode: 'multiple',
1438
+ notFoundContent: '暂无数据',
1439
+ allowClear: true,
1440
+ showSearch: true,
1441
+ showArrow: true,
1442
+ maxTagCount: 1,
1443
+ optionFilterProp: 'children',
1444
+ filterOption: (input: string, option: { props: { children: string } }) =>
1445
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1446
+ },
1447
+ } },
1448
+ { name: 'qp-email-like', label: '邮箱' },
1449
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1450
+ ]
1451
+ Promise.all([
1452
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1453
+ pageSize: 5000,
1454
+ currentPage: 1,
1455
+ 'qp-companyType-eq': 20,
1456
+ }),
1457
+ ]).then((x: any)=>{
1458
+ formatSource(x,0, 2, tableSearchForm);
1459
+ })
1460
+ modalTableProps = {
1461
+ modalTableTitle: '选择员工',
1462
+ tableSearchForm,
1463
+ tableColumns: [
1464
+ {
1465
+ title: '员工编码',
1466
+ dataIndex: 'employeeNumber',
1467
+ },
1468
+ {
1469
+ title: '员工名称',
1470
+ dataIndex: 'name',
1471
+ },
1472
+ {
1473
+ title: '所属公司',
1474
+ dataIndex: 'companyName',
1475
+ },
1476
+ {
1477
+ title: '邮箱',
1478
+ dataIndex: 'email',
1479
+ },
1480
+ {
1481
+ title: '手机号',
1482
+ dataIndex: 'officeTelephone',
1483
+ },
1484
+ ],
1485
+ ...modalTableBusProps
1486
+ }
1487
+ }
1488
+ if(type === 'employee2') {
1489
+ // 版本2
1490
+ requestConfig = {
1491
+ url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1492
+ filter: 'qp-username,name-orGroup,like', // 过滤参数
1493
+ mappingTextField: 'name',
1494
+ mappingTextShowKeyField: 'username',
1495
+ mappingValueField: 'id',
1496
+ otherParams: {
1497
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1498
+ 'qp-employmentType-eq': 20,
1499
+ 'qp-orgViewIds-like': 'administrative-organization-view',
1500
+ sorter: 'desc-id'
1501
+ }, // 默认参数
1502
+ sourceName: 'employeeNumber',
1503
+ ...requestConfigProp,
1504
+ }
1505
+ tableSearchForm = [
1506
+ { name: 'qp-username-like', label: '账户名称' },
1507
+ { name: 'qp-name-like', label: '显示名称' },
1508
+ // { name: 'qp-employeeNumber-like', label: '员工编码' },
1509
+ { name: 'qp-code-in', type: 'treeSelect', label: '所属组织机构', field: {
1510
+ type: 'treeSelect',
1511
+ props: {
1512
+ multiple: true,
1513
+ treeData: [],
1514
+ treeCheckable: false,
1515
+ showSearch: true,
1516
+ allowClear: true,
1517
+ showArrow: true,
1518
+ treeNodeFilterProp: 'title',
1519
+ treeDefaultExpandAll: true,
1520
+ maxTagCount: 1,
1521
+ placeholder: '请选择',
1522
+ style: {
1523
+ width: '100%',
1524
+ },
1525
+ showCheckedStrategy: 'TreeSelect.SHOW_ALL',
1526
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
1527
+ },
1528
+ } },
1529
+ { name: 'qp-email-like', label: '邮箱' },
1530
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1531
+ ]
1532
+ Promise.all([
1533
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgViewNode/common/getTreeForOrgViewAndTenant`, { 'orgViewCode': 'administrative-organization-view' }),
1534
+ ]).then((x: any)=>{
1535
+ formatTreeDataSource(x,0, 2, tableSearchForm,['code', 'name']);
1536
+ })
1537
+ modalTableProps = {
1538
+ modalTableTitle: '添加员工',
1539
+ tableSearchForm,
1540
+ tableColumns: [
1541
+ {
1542
+ title: '账户名称',
1543
+ dataIndex: 'username',
1544
+ },
1545
+ {
1546
+ title: '显示名称',
1547
+ dataIndex: 'name',
1548
+ },
1549
+ // {
1550
+ // title: '员工编码',
1551
+ // dataIndex: 'employeeNumber',
1552
+ // },
1553
+ // {
1554
+ // title: '员工名称',
1555
+ // dataIndex: 'name',
1556
+ // },
1557
+ {
1558
+ title: '所属组织机构',
1559
+ dataIndex: 'administrativeNames',
1560
+ render: (text: any) => handleTextOverflow(text),
1561
+ },
1562
+ {
1563
+ title: '邮箱',
1564
+ dataIndex: 'email',
1565
+ },
1566
+ {
1567
+ title: '手机号',
1568
+ dataIndex: 'officeTelephone',
1569
+ },
1570
+ ],
1571
+ ...modalTableBusProps
1572
+ }
1573
+ }
1574
+
1575
+ // 配送方式选择器
1576
+ if(type === 'deliveryMode') {
1577
+ const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
1578
+ const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
1579
+ requestConfig = {
1580
+ url: `${prefixUrl.selectPrefix}/deliveryMode`,
1581
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1582
+ mappingTextField: 'name',
1583
+ mappingTextShowKeyField: 'code',
1584
+ mappingValueField: 'code',
1585
+ otherParams: {
1586
+ sorter: 'desc-id'
1587
+ }, // 默认参数
1588
+ sourceName: 'deliveryModeCode',
1589
+ ...requestConfigProp
1590
+ }
1591
+ tableSearchForm = [
1592
+ { name: 'qp-name-like', label: '配送方式名称' },
1593
+ { name: 'qp-code-like', label: '配送方式编码' },
1594
+ { name: logisCompanyCodeSingleSearchName, type: 'select', label: '所属物流商', field: {
1595
+ type: 'select',
1596
+ props: {
1597
+ ...(isLogisCompanyCodeSingleSearch ? {} : {
1598
+ mode: 'multiple',
1599
+ maxTagCount: 1,
1600
+ }),
1601
+ notFoundContent: '暂无数据',
1602
+ allowClear: true,
1603
+ showSearch: true,
1604
+ showArrow: true,
1605
+ optionFilterProp: 'children',
1606
+ filterOption: (input: string, option: { props: { children: string } }) =>
1607
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1608
+ },
1609
+ } },
1610
+ { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1611
+ { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1612
+ { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1613
+ type: 'select',
1614
+ props: {
1615
+ mode: 'multiple',
1616
+ notFoundContent: '暂无数据',
1617
+ allowClear: true,
1618
+ showSearch: true,
1619
+ showArrow: true,
1620
+ maxTagCount: 1,
1621
+ optionFilterProp: 'children',
1622
+ filterOption: (input: string, option: { props: { children: string } }) =>
1623
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1624
+ },
1625
+ } },
1626
+ { name: 'qp-remark-like', label: '备注' },
1627
+ ]
1628
+ Promise.all([
1629
+ loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1630
+ pageSize: 5000,
1631
+ currentPage: 1,
1632
+ }),
1633
+ loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1634
+ pageSize: 5000,
1635
+ currentPage: 1,
1636
+ })
1637
+ ]).then((x: any)=>{
1638
+ formatSource(x,0, 2, tableSearchForm);
1639
+ formatSource(x,1, 5, tableSearchForm);
1640
+ })
1641
+ modalTableProps = {
1642
+ modalTableTitle: '选择配送方式',
1643
+ tableSearchForm,
1644
+ tableColumns: [
1645
+ {
1646
+ title: '配送方式编码',
1647
+ dataIndex: 'code',
1648
+ },
1649
+ {
1650
+ title: '配送方式名称',
1651
+ dataIndex: 'name',
1652
+ },
1653
+ {
1654
+ title: '所属物流商',
1655
+ dataIndex: 'logisCompanyName',
1656
+ },
1657
+ {
1658
+ dataIndex: 'recordChannnelCode',
1659
+ title: '单号获取通道',
1660
+ render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1661
+ },
1662
+ {
1663
+ dataIndex: 'arrivalPaySupport',
1664
+ title: '是否支持到付',
1665
+ render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1666
+ },
1667
+ {
1668
+ dataIndex: 'sheetTemplateName',
1669
+ title: '面单模板',
1670
+ },
1671
+ {
1672
+ dataIndex: 'remark',
1673
+ title: '备注',
1674
+ },
1675
+ ],
1676
+ ...modalTableBusProps
1677
+ }
1678
+ }
1679
+
1680
+ // 规则模板选择器
1681
+ if(type === 'ruleTemplate') {
1682
+ requestConfig = {
1683
+ url: `${prefixUrl.selectPrefix}/ruleTemplate`,
1684
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1685
+ mappingTextField: 'name',
1686
+ mappingTextShowKeyField: 'code',
1687
+ mappingValueField: 'code',
1688
+ otherParams: {
1689
+ sorter: 'desc-id'
1690
+ }, // 默认参数
1691
+ sourceName: 'ruleTemplateCode',
1692
+ ...requestConfigProp
1693
+ }
1694
+ tableSearchForm = [
1695
+ { name: 'qp-name-like', label: '规则模板名称' },
1696
+ { name: 'qp-code-like', label: '规则模板编码' },
1697
+ ]
1698
+ modalTableProps = {
1699
+ modalTableTitle: '选择规则模板',
1700
+ tableSearchForm,
1701
+ tableColumns: [
1702
+ {
1703
+ title: '规则模板编码',
1704
+ dataIndex: 'code',
1705
+ },
1706
+ {
1707
+ title: '规则模板名称',
1708
+ dataIndex: 'name',
1709
+ render: (text: any) => handleTextOverflow(text),
1710
+ },
1711
+ {
1712
+ title: '条件对象',
1713
+ dataIndex: 'objectName',
1714
+ render: (text: any) => handleTextOverflow(text),
1715
+ },
1716
+ {
1717
+ dataIndex: 'extName',
1718
+ title: '条件扩展',
1719
+ render: (text: any) => handleTextOverflow(text),
1720
+ },
1721
+ {
1722
+ dataIndex: 'actionName',
1723
+ title: '执行动作',
1724
+ render: (text: any) => handleTextOverflow(text),
1725
+ },
1726
+ ],
1727
+ ...modalTableBusProps
1728
+ }
1729
+ }
1730
+
1731
+ return { modalTableProps, requestConfig, needModalTable };
1732
+ }