@bit-sun/business-component 2.2.21 → 2.2.23

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 (178) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +34 -31
  9. package/dist/index.js +34 -31
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +77 -77
  18. package/src/assets/32.svg +27 -27
  19. package/src/assets/addIcon.svg +17 -17
  20. package/src/assets/allfunc.svg +27 -27
  21. package/src/assets/arrowRight.svg +24 -24
  22. package/src/assets/arrow_top.svg +17 -17
  23. package/src/assets/btn-delete.svg +29 -29
  24. package/src/assets/btn-edit.svg +19 -19
  25. package/src/assets/btn-more.svg +17 -17
  26. package/src/assets/btn-submit.svg +19 -19
  27. package/src/assets/caidan.svg +11 -11
  28. package/src/assets/close.svg +26 -26
  29. package/src/assets/drag.svg +17 -17
  30. package/src/assets/exportFail.svg +37 -37
  31. package/src/assets/exportProcessing.svg +28 -28
  32. package/src/assets/exportSuccess.svg +34 -34
  33. package/src/assets/fixed-left-active.svg +11 -11
  34. package/src/assets/fixed-left.svg +15 -15
  35. package/src/assets/fixed-right-active.svg +11 -11
  36. package/src/assets/fixed-right.svg +15 -15
  37. package/src/assets/guanbi.svg +15 -15
  38. package/src/assets/icon-quanping.svg +15 -15
  39. package/src/assets/icon-shezhi.svg +17 -17
  40. package/src/assets/label_icon_bottom.svg +25 -25
  41. package/src/assets/list-no-img.svg +21 -21
  42. package/src/assets/morentouxiang-32.svg +23 -23
  43. package/src/assets/scanning.svg +24 -24
  44. package/src/assets/upExport.svg +22 -22
  45. package/src/components/Business/AddSelectBusiness/index.md +129 -129
  46. package/src/components/Business/AddSelectBusiness/index.tsx +835 -835
  47. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  48. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  49. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  59. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  60. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  61. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  62. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  63. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  64. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  65. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  66. package/src/components/Business/BsLayouts/index.less +79 -79
  67. package/src/components/Business/BsLayouts/index.tsx +1480 -1479
  68. package/src/components/Business/BsLayouts/service.ts +10 -10
  69. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  70. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
  71. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  72. package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
  73. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  74. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  75. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  76. package/src/components/Business/CommodityEntry/index.md +70 -70
  77. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  78. package/src/components/Business/CommonAlert/index.tsx +23 -23
  79. package/src/components/Business/CommonGuideWrapper/index.less +113 -113
  80. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  81. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  82. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  83. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  84. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  85. package/src/components/Business/HomePageWrapper/index.less +33 -33
  86. package/src/components/Business/HomePageWrapper/index.md +45 -45
  87. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  88. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  89. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  90. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  91. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  92. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  93. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  94. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  95. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  96. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  97. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  98. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  99. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  100. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  101. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  102. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  103. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  104. package/src/components/Business/JsonQueryTable/index.less +16 -16
  105. package/src/components/Business/JsonQueryTable/index.md +328 -328
  106. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  107. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  108. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  109. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  110. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  111. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  112. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  113. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  114. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  115. package/src/components/Business/JsonQueryTable/static.ts +390 -390
  116. package/src/components/Business/SearchSelect/BusinessUtils.ts +1730 -1730
  117. package/src/components/Business/SearchSelect/common.ts +53 -53
  118. package/src/components/Business/SearchSelect/index.md +1310 -1310
  119. package/src/components/Business/SearchSelect/index.tsx +51 -51
  120. package/src/components/Business/SearchSelect/utils.ts +100 -100
  121. package/src/components/Business/StateFlow/index.less +151 -151
  122. package/src/components/Business/StateFlow/index.md +60 -60
  123. package/src/components/Business/StateFlow/index.tsx +32 -32
  124. package/src/components/Business/TreeSearchSelect/index.md +154 -154
  125. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  126. package/src/components/Business/TreeSearchSelect/utils.ts +69 -69
  127. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  128. package/src/components/Business/columnSettingTable/index.less +247 -247
  129. package/src/components/Business/columnSettingTable/index.md +357 -357
  130. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  131. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  132. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  133. package/src/components/Business/moreTreeTable/index.less +99 -99
  134. package/src/components/Business/moreTreeTable/index.md +448 -448
  135. package/src/components/Business/moreTreeTable/index.tsx +361 -361
  136. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  137. package/src/components/Functional/AddSelect/index.less +367 -367
  138. package/src/components/Functional/AddSelect/index.md +155 -155
  139. package/src/components/Functional/AddSelect/index.tsx +1203 -1203
  140. package/src/components/Functional/BillEntry/index.less +371 -371
  141. package/src/components/Functional/BillEntry/index.md +39 -39
  142. package/src/components/Functional/BillEntry/index.tsx +766 -766
  143. package/src/components/Functional/DataImport/index.less +63 -63
  144. package/src/components/Functional/DataImport/index.md +44 -44
  145. package/src/components/Functional/DataImport/index.tsx +695 -695
  146. package/src/components/Functional/DataValidation/index.less +63 -63
  147. package/src/components/Functional/DataValidation/index.md +39 -39
  148. package/src/components/Functional/DataValidation/index.tsx +687 -687
  149. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  150. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  151. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  152. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  153. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  154. package/src/components/Functional/SearchSelect/index.less +115 -115
  155. package/src/components/Functional/SearchSelect/index.md +141 -141
  156. package/src/components/Functional/SearchSelect/index.tsx +846 -846
  157. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  158. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  159. package/src/components/Functional/TreeSearchSelect/index.tsx +162 -160
  160. package/src/index.ts +34 -34
  161. package/src/plugin/TableColumnSetting/index.less +247 -247
  162. package/src/plugin/TableColumnSetting/index.md +50 -50
  163. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  164. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  165. package/src/styles/bsDefault.less +1912 -1912
  166. package/src/utils/CheckOneUser/index.md +39 -39
  167. package/src/utils/CheckOneUser/index.ts +51 -51
  168. package/src/utils/LocalstorageUtils.ts +90 -90
  169. package/src/utils/TableUtils.tsx +18 -18
  170. package/src/utils/checkUtils.ts +39 -39
  171. package/src/utils/enumConfig.ts +11 -11
  172. package/src/utils/getFormMode.js +12 -12
  173. package/src/utils/index.ts +3 -3
  174. package/src/utils/requestUtils.ts +34 -34
  175. package/src/utils/serialize.js +7 -7
  176. package/src/utils/utils.ts +183 -183
  177. package/tsconfig.json +29 -29
  178. package/typings.d.ts +4 -4
@@ -1,1730 +1,1730 @@
1
- // 此文件用于 处理业务组件 所用到的公共方法
2
- // @ts-nocheck
3
- import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type } from './common';
4
- import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
- import { handleTextOverflow, tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
6
- import { getSkuImg } from '@/utils/TableUtils';
7
- import { getEmployeeCode } from '@/utils/LocalstorageUtils';
8
-
9
- const hasDictSharingType = getDictionarySource('UC000013')?.length;
10
- const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
11
-
12
- export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: any, modalTableBusProps?:any) {
13
- // 默认type === 'supplier' 供应商选择器
14
- let requestConfig = {
15
- url: `${prefixUrl.selectPrefix}/supplier`,
16
- filter: 'qp-name,code-orGroup,like', // 过滤参数
17
- otherParams: {
18
- sorter: 'desc-id'
19
- }, // 默认参数
20
- ...requestConfigProp
21
- }
22
-
23
- /*
24
- * 处理 格式化下拉框数据源
25
- * reData 必传 promise返回响应的数据 格式为[{},{},{},...] Promise.all第一个参数数组有多少个数组长度就是多少,其中每个对象为每次请求的结果数据
26
- * 每个结果数据格式为{ status: '0', msg: 'success', data: { items: [], total: 1, size: 1, page: 1 }, traceId: 'baba..'}
27
- * position 必传 为获取Promise.all请求结果的位置
28
- * changePosition 必传 为搜索表单Form中需要更改数据源的Item项的位置
29
- * changeSearchForm 必传 为搜索表单Form数据
30
- * */
31
- const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
32
- const data = reData && reData[position]?.data;
33
- const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
34
- const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
35
- changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
36
- }
37
-
38
- // 格式化树选择器数据源
39
- const mapSearchTree = (treeDataItem: any, resKeyValue: any, disabledJudge?: any) => {
40
- const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
41
- return {
42
- title: treeDataItem[resKeyValue[1]],
43
- value: treeDataItem[resKeyValue[0]],
44
- parentId: treeDataItem.parent,
45
- data: { ...treeDataItem },
46
- isLeaf: !haveChildren,
47
- disabled: disabledJudge!==undefined? disabledJudge : haveChildren,
48
- children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue, disabledJudge)) : [],
49
- };
50
- };
51
- const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
52
- let data = reData && reData[position]?.data;
53
- let disabledJudge;
54
- if(Object.keys(data).length) {
55
- data = [data];
56
- disabledJudge=false
57
- }
58
- const formatData = (data &&
59
- Array.isArray(data) &&
60
- data.length &&
61
- data.map((ites: any) => mapSearchTree(ites, resKeyValue, disabledJudge))) ||
62
- []
63
- changeSearchForm[changePosition].field.props.treeData = formatData;
64
- }
65
-
66
-
67
- let tableSearchForm: any [] = [];
68
- let modalTableProps = {
69
- modalTableTitle: '',
70
- tableSearchForm,
71
- tableColumns: [],
72
- ...modalTableBusProps,
73
- }
74
- let needModalTable = modalTableBusProps?.needModalTable !== undefined ? modalTableBusProps?.needModalTable : true;
75
-
76
- // 供应商选择器
77
- if(type === 'supplier') {
78
- tableSearchForm = [
79
- { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
80
- { name: 'qp-code-like', label: '供应商编码' },
81
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
82
- type: 'select',
83
- props: {
84
- mode: 'multiple',
85
- notFoundContent: '暂无数据',
86
- allowClear: true,
87
- showSearch: true,
88
- showArrow: true,
89
- maxTagCount: 1,
90
- optionFilterProp: 'children',
91
- filterOption: (input: string, option: { props: { children: string } }) =>
92
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
93
- },
94
- } },
95
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
96
- type: 'select',
97
- props: {
98
- mode: 'multiple',
99
- notFoundContent: '暂无数据',
100
- allowClear: true,
101
- showSearch: true,
102
- showArrow: true,
103
- maxTagCount: 1,
104
- optionFilterProp: 'children',
105
- filterOption: (input: string, option: { props: { children: string } }) =>
106
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
107
- },
108
- } },
109
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
110
- type: 'select',
111
- props: {
112
- mode: 'multiple',
113
- notFoundContent: '暂无数据',
114
- allowClear: true,
115
- showSearch: true,
116
- showArrow: true,
117
- maxTagCount: 1,
118
- optionFilterProp: 'children',
119
- filterOption: (input: string, option: { props: { children: string } }) =>
120
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
121
- },
122
- } },
123
- { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
124
- ]
125
- Promise.all([
126
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
127
- pageSize: 5000,
128
- currentPage: 1,
129
- 'qp-companyType-eq': '30',
130
- }),
131
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
132
- pageSize: 5000,
133
- currentPage: 1,
134
- }),
135
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
136
- pageSize: 5000,
137
- currentPage: 1,
138
- 'qp-companyType-eq': '20',
139
- })
140
- ]).then((x: any)=>{
141
- formatSource(x,0, 2, tableSearchForm);
142
- formatSource(x,1, 3, tableSearchForm);
143
- formatSource(x,2, 4, tableSearchForm);
144
- })
145
- modalTableProps = {
146
- modalTableTitle: '选择供应商',
147
- tableSearchForm,
148
- tableColumns: [
149
- {
150
- title: '供应商编码',
151
- dataIndex: 'code',
152
- },
153
- {
154
- title: '供应商名称',
155
- dataIndex: 'name',
156
- },
157
- {
158
- title: '归属集团',
159
- dataIndex: 'conglomerateName',
160
- },
161
- {
162
- title: '归属法人公司',
163
- dataIndex: 'legalCompanyName',
164
- },
165
- {
166
- title: '归属核算主体',
167
- dataIndex: 'accountingName',
168
- },
169
- {
170
- title: '共享类型',
171
- dataIndex: 'sharingType',
172
- render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
173
- },
174
- ],
175
- ...modalTableBusProps,
176
- }
177
- }
178
- if(type === 'supplier2') {
179
- // 版本2
180
- tableSearchForm = [
181
- { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
182
- { name: 'qp-code-like', label: '供应商编码' },
183
- { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
184
- type: 'select',
185
- props: {
186
- // mode: 'multiple',
187
- notFoundContent: '暂无数据',
188
- allowClear: true,
189
- showSearch: true,
190
- showArrow: true,
191
- // maxTagCount: 1,
192
- optionFilterProp: 'children',
193
- filterOption: (input: string, option: { props: { children: string } }) =>
194
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
195
- },
196
- } },
197
- { name: 'qp-supplierOrgCode-eq', type: 'select', label: '使用组织', field: {
198
- type: 'select',
199
- props: {
200
- // mode: 'multiple',
201
- notFoundContent: '暂无数据',
202
- allowClear: true,
203
- showSearch: true,
204
- showArrow: true,
205
- // maxTagCount: 1,
206
- optionFilterProp: 'children',
207
- filterOption: (input: string, option: { props: { children: string } }) =>
208
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
209
- },
210
- } },
211
- ]
212
- Promise.all([
213
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
214
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
215
- ]).then((x: any)=>{
216
- formatSource(x,0, 2, tableSearchForm);
217
- formatSource(x,1, 3, tableSearchForm);
218
- })
219
- modalTableProps = {
220
- modalTableTitle: '选择供应商',
221
- tableSearchForm,
222
- tableColumns: [
223
- {
224
- title: '供应商编码',
225
- dataIndex: 'code',
226
- },
227
- {
228
- title: '供应商名称',
229
- dataIndex: 'name',
230
- },
231
- {
232
- title: '创建组织',
233
- dataIndex: 'createOrgName',
234
- },
235
- {
236
- title: '使用组织',
237
- dataIndex: 'salesOrgName',
238
- },
239
- ],
240
- ...modalTableBusProps
241
- }
242
- }
243
-
244
- // 商品选择器sku
245
- if(type === 'skuCommodity') {
246
- requestConfig = {
247
- url: `${prefixUrl.selectPrefix}/sku/pager/v2`,
248
- filter: 'skuCodeAndSkuName', // 过滤参数
249
- mappingTextField: 'name',
250
- mappingValueField: 'skuCode',
251
- mappingTextShowTextField: ['name', 'propertyNameAndValue'],
252
- otherParams: {
253
- 'qp-combination-eq': false,
254
- 'qp-approveStatus-eq': 1,
255
- 'qp-status-eq': 1,
256
- // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
257
- sorter: 'desc-id'
258
- }, // 默认参数
259
- sourceName: 'skuCode',
260
- ...requestConfigProp,
261
- }
262
- tableSearchForm = requestConfig.url.includes('v2') ? [
263
- requestConfig.url.includes('v2') ? { name: 'qp-skuName-like', label: 'SKU名称' } : { name: 'qp-name-like', label: 'SKU名称' },
264
- { name: 'qp-skuCode-in', label: 'SKU编码', field: {
265
- type: 'multipleQueryInput',
266
- props: {
267
- ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
268
- },
269
- }},
270
- requestConfig.url.includes('v2') ? { name: 'qp-code-like', label: '国际条码' } : { name: 'qp-barCode-like', label: '国际条码'},
271
- { name: 'qp-itemName-like', label: '所属SPU名称' },
272
- { name: 'qp-itemCode-like', label: '所属SPU编码' },
273
- requestConfig.url.includes('v2') ?{ name: 'qp-externalCode-like', label: '外部编码' } : null,
274
- requestConfig.url.includes('v2') ? { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
275
- type: 'businessSearchSelect',
276
- props: {
277
- selectBusinessType: 'skuPropertyValue',
278
- selectProps: {
279
- mode: 'multiple',
280
- maxTagCount: 1,
281
- },
282
- ...(requestConfigProp?.skuPropertyValueRequestConfig || { prefixUrl }), // 可自定义此处规格请求接口相关参数,默认前缀取自sku选择器
283
- },
284
- }
285
- } : null,
286
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
287
- type: 'select',
288
- props: {
289
- mode: 'multiple',
290
- notFoundContent: '暂无数据',
291
- allowClear: true,
292
- showSearch: true,
293
- showArrow: true,
294
- maxTagCount: 1,
295
- optionFilterProp: 'children',
296
- filterOption: (input: string, option: { props: { children: string } }) =>
297
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
298
- },
299
- } },
300
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
301
- type: 'treeSelect',
302
- props: {
303
- treeData: [],
304
- treeCheckable: true,
305
- showSearch: true,
306
- allowClear: true,
307
- showArrow: true,
308
- treeNodeFilterProp: 'title',
309
- treeDefaultExpandAll: true,
310
- maxTagCount: 1,
311
- placeholder: '请选择',
312
- style: {
313
- width: '100%',
314
- },
315
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
316
- },
317
- } },
318
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
319
- type: 'select',
320
- props: {
321
- mode: 'multiple',
322
- notFoundContent: '暂无数据',
323
- allowClear: true,
324
- showSearch: true,
325
- showArrow: true,
326
- maxTagCount: 1,
327
- optionFilterProp: 'children',
328
- filterOption: (input: string, option: { props: { children: string } }) =>
329
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
330
- },
331
- } },
332
- ] : [
333
- { name: 'qp-name-like', label: 'SKU名称' },
334
- { name: 'qp-skuCode-in', label: 'SKU编码', field: {
335
- type: 'multipleQueryInput',
336
- props: {
337
- ...(requestConfigProp?.skuCodeValueRequestConfig || {}),
338
- },
339
- }},
340
- { name: 'qp-barCode-like', label: '国际条码'},
341
- { name: 'qp-itemName-like', label: '所属SPU名称' },
342
- { name: 'qp-itemCode-like', label: '所属SPU编码' },
343
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
344
- type: 'select',
345
- props: {
346
- mode: 'multiple',
347
- notFoundContent: '暂无数据',
348
- allowClear: true,
349
- showSearch: true,
350
- showArrow: true,
351
- maxTagCount: 1,
352
- optionFilterProp: 'children',
353
- filterOption: (input: string, option: { props: { children: string } }) =>
354
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
355
- },
356
- } },
357
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
358
- type: 'treeSelect',
359
- props: {
360
- treeData: [],
361
- treeCheckable: true,
362
- showSearch: true,
363
- allowClear: true,
364
- showArrow: true,
365
- treeNodeFilterProp: 'title',
366
- treeDefaultExpandAll: true,
367
- maxTagCount: 1,
368
- placeholder: '请选择',
369
- style: {
370
- width: '100%',
371
- },
372
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
373
- },
374
- } },
375
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
376
- type: 'select',
377
- props: {
378
- mode: 'multiple',
379
- notFoundContent: '暂无数据',
380
- allowClear: true,
381
- showSearch: true,
382
- showArrow: true,
383
- maxTagCount: 1,
384
- optionFilterProp: 'children',
385
- filterOption: (input: string, option: { props: { children: string } }) =>
386
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
387
- },
388
- } },
389
- ]
390
- Promise.all([
391
- loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
392
- pageSize: 5000,
393
- currentPage: 1,
394
- 'ctl-withAuth': true
395
- }),
396
- loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
397
- pageSize: 5000,
398
- currentPage: 1,
399
- }),
400
- loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
401
- pageSize: 5000,
402
- currentPage: 1,
403
- }),
404
- ]).then((x: any)=>{
405
- requestConfig.url.includes('v2') ? formatSource(x,0, 7, tableSearchForm,['id','name']) : formatSource(x,0, 5, tableSearchForm,['id','name'])
406
- requestConfig.url.includes('v2') ? formatTreeDataSource(x,1, 8, tableSearchForm) : formatTreeDataSource(x,1, 6, tableSearchForm)
407
- requestConfig.url.includes('v2') ? formatSource(x,2, 9, tableSearchForm,['id','name']) : formatSource(x,2, 7, tableSearchForm,['id','name'])
408
- })
409
- modalTableProps = {
410
- modalTableTitle: '选择SKU',
411
- tableSearchForm,
412
- tableColumns: requestConfig.url.includes('v2') ? [
413
- {
414
- title: 'SKU编码',
415
- dataIndex: 'skuCode',
416
- },
417
- {
418
- title: 'SKU名称',
419
- dataIndex: 'name',
420
- },
421
- {
422
- title: '图片',
423
- dataIndex: 'itemUrl',
424
- render: (text: any,record: any) => tableColumnsImage(getSkuImg(record), { width: 28, height: 28 }),
425
- },
426
- {
427
- title: '国际条码',
428
- dataIndex: 'barCode',
429
- },
430
- {
431
- title: '所属SPU名称',
432
- dataIndex: 'itemName',
433
- },
434
- {
435
- title: '所属SPU编码',
436
- dataIndex: 'itemCode',
437
- },
438
- requestConfig.url.includes('v2') ? {
439
- title: '外部编码',
440
- dataIndex: 'externalCode',
441
- } : false,
442
- {
443
- title: '规格',
444
- dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec',
445
- },
446
- {
447
- title: '类目',
448
- dataIndex: 'categoryName',
449
- },
450
- {
451
- title: '品类',
452
- dataIndex: 'className',
453
- },
454
- {
455
- title: '品牌',
456
- dataIndex: 'brandName',
457
- },
458
- ] : [
459
- {
460
- title: 'SKU编码',
461
- dataIndex: 'skuCode',
462
- },
463
- {
464
- title: 'SKU名称',
465
- dataIndex: 'name',
466
- },
467
- {
468
- title: '国际条码',
469
- dataIndex: 'barCode',
470
- },
471
- {
472
- title: '所属SPU名称',
473
- dataIndex: 'itemName',
474
- },
475
- {
476
- title: '所属SPU编码',
477
- dataIndex: 'itemCode',
478
- },
479
- {
480
- title: '规格',
481
- dataIndex: 'skuSpec',
482
- },
483
- {
484
- title: '类目',
485
- dataIndex: 'categoryName',
486
- },
487
- {
488
- title: '品类',
489
- dataIndex: 'className',
490
- },
491
- {
492
- title: '品牌',
493
- dataIndex: 'brandName',
494
- },
495
- ],
496
- ...modalTableBusProps
497
- }
498
- }
499
-
500
- // 商品选择器spu
501
- if(type === 'spuCommodity') {
502
- requestConfig = {
503
- url: `${prefixUrl.selectPrefix}/item`,
504
- filter: 'qp-itemCode,name-orGroup,like', // 过滤参数
505
- mappingTextField: 'name',
506
- mappingValueField: 'itemCode',
507
- otherParams: {
508
- 'qp-approveStatus-eq': 1, // 审核状态(0.待审批;1.审批通过;2.驳回;3.审批未通过)
509
- sorter: 'desc-id'
510
- }, // 默认参数
511
- sourceName: 'itemCode',
512
- ...requestConfigProp,
513
- }
514
- tableSearchForm = [
515
- { name: 'qp-name-like', label: 'SPU名称' },
516
- { name: 'qp-itemCode-like', label: 'SPU编码' },
517
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
518
- type: 'select',
519
- props: {
520
- mode: 'multiple',
521
- notFoundContent: '暂无数据',
522
- allowClear: true,
523
- showSearch: true,
524
- showArrow: true,
525
- maxTagCount: 1,
526
- optionFilterProp: 'children',
527
- filterOption: (input: string, option: { props: { children: string } }) =>
528
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
529
- },
530
- } },
531
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
532
- type: 'treeSelect',
533
- props: {
534
- treeData: [],
535
- treeCheckable: true,
536
- showSearch: true,
537
- allowClear: true,
538
- showArrow: true,
539
- treeNodeFilterProp: 'title',
540
- treeDefaultExpandAll: true,
541
- maxTagCount: 1,
542
- placeholder: '请选择',
543
- style: {
544
- width: '100%',
545
- },
546
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
547
- },
548
- } },
549
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
550
- type: 'select',
551
- props: {
552
- mode: 'multiple',
553
- notFoundContent: '暂无数据',
554
- allowClear: true,
555
- showSearch: true,
556
- showArrow: true,
557
- maxTagCount: 1,
558
- optionFilterProp: 'children',
559
- filterOption: (input: string, option: { props: { children: string } }) =>
560
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
561
- },
562
- } },
563
- ]
564
- Promise.all([
565
- loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
566
- pageSize: 5000,
567
- currentPage: 1,
568
- 'ctl-withAuth': true
569
- }),
570
- loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
571
- pageSize: 5000,
572
- currentPage: 1,
573
- }),
574
- loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
575
- pageSize: 5000,
576
- currentPage: 1,
577
- }),
578
- ]).then((x: any)=>{
579
- formatSource(x,0, 2, tableSearchForm,['id','name']);
580
- formatTreeDataSource(x,1, 3, tableSearchForm);
581
- formatSource(x,2, 4, tableSearchForm,['id','name']);
582
- })
583
- modalTableProps = {
584
- modalTableTitle: '选择SPU',
585
- tableSearchForm,
586
- tableColumns: [
587
- {
588
- title: 'SPU编码',
589
- dataIndex: 'itemCode',
590
- },
591
- {
592
- title: 'SPU名称',
593
- dataIndex: 'name',
594
- },
595
- {
596
- title: '品牌',
597
- dataIndex: 'brandName',
598
- },
599
- {
600
- title: '类目',
601
- dataIndex: 'categoryText',
602
- },
603
- {
604
- title: '品类',
605
- dataIndex: 'className',
606
- },
607
- ],
608
- ...modalTableBusProps
609
- }
610
- }
611
-
612
- // 商品选择器skc
613
- if(type === 'skcCommodity') {
614
- requestConfig = {
615
- url: `${prefixUrl.selectPrefix}/skc/skcSelect`,
616
- filter: 'qp-code,name-orGroup,like', // 过滤参数
617
- mappingTextField: 'name',
618
- mappingValueField: 'code',
619
- 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
- sorter: 'desc-id'
1092
- }, // 默认参数
1093
- sourceName: 'customCode',
1094
- ...requestConfigProp,
1095
- }
1096
- tableSearchForm = [
1097
- { name: 'qp-name-like', label: '客户名称' },
1098
- { name: 'qp-code-like', label: '客户编码' },
1099
- { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
1100
- type: 'select',
1101
- props: {
1102
- // mode: 'multiple',
1103
- notFoundContent: '暂无数据',
1104
- allowClear: true,
1105
- showSearch: true,
1106
- showArrow: true,
1107
- // maxTagCount: 1,
1108
- optionFilterProp: 'children',
1109
- filterOption: (input: string, option: { props: { children: string } }) =>
1110
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1111
- },
1112
- } },
1113
- { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
1114
- type: 'select',
1115
- props: {
1116
- // mode: 'multiple',
1117
- notFoundContent: '暂无数据',
1118
- allowClear: true,
1119
- showSearch: true,
1120
- showArrow: true,
1121
- // maxTagCount: 1,
1122
- optionFilterProp: 'children',
1123
- filterOption: (input: string, option: { props: { children: string } }) =>
1124
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1125
- },
1126
- } },
1127
- ]
1128
- Promise.all([
1129
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1130
- loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
1131
- ]).then((x: any)=>{
1132
- formatSource(x,0, 2, tableSearchForm);
1133
- formatSource(x,1, 3, tableSearchForm);
1134
- })
1135
- modalTableProps = {
1136
- modalTableTitle: '选择客户',
1137
- tableSearchForm,
1138
- tableColumns: [
1139
- {
1140
- title: '客户编码',
1141
- dataIndex: 'code',
1142
- },
1143
- {
1144
- title: '客户名称',
1145
- dataIndex: 'name',
1146
- },
1147
- {
1148
- title: '创建组织',
1149
- dataIndex: 'createOrgName',
1150
- },
1151
- {
1152
- title: '使用组织',
1153
- dataIndex: 'salesOrgName',
1154
- },
1155
- ],
1156
- ...modalTableBusProps
1157
- }
1158
- }
1159
-
1160
- // 店铺选择器
1161
- if(type === 'shopFile') {
1162
- requestConfig = {
1163
- url: `${prefixUrl.selectPrefix}/store`,
1164
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1165
- mappingTextField: 'name',
1166
- mappingValueField: 'code',
1167
- otherParams: {
1168
- sorter: 'desc-id'
1169
- }, // 默认参数
1170
- sourceName: 'code',
1171
- ...requestConfigProp,
1172
- }
1173
- tableSearchForm = [
1174
- { name: 'qp-name-like', label: '店铺名称' },
1175
- { name: 'qp-code-like', label: '店铺编码' },
1176
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1177
- type: 'select',
1178
- props: {
1179
- mode: 'multiple',
1180
- notFoundContent: '暂无数据',
1181
- allowClear: true,
1182
- showSearch: true,
1183
- showArrow: true,
1184
- maxTagCount: 1,
1185
- optionFilterProp: 'children',
1186
- filterOption: (input: string, option: { props: { children: string } }) =>
1187
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1188
- },
1189
- } },
1190
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
1191
- type: 'select',
1192
- props: {
1193
- mode: 'multiple',
1194
- notFoundContent: '暂无数据',
1195
- allowClear: true,
1196
- showSearch: true,
1197
- showArrow: true,
1198
- maxTagCount: 1,
1199
- optionFilterProp: 'children',
1200
- filterOption: (input: string, option: { props: { children: string } }) =>
1201
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1202
- },
1203
- } },
1204
- { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
1205
- { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
1206
- type: 'select',
1207
- props: {
1208
- mode: 'multiple',
1209
- notFoundContent: '暂无数据',
1210
- allowClear: true,
1211
- showSearch: true,
1212
- showArrow: true,
1213
- maxTagCount: 1,
1214
- optionFilterProp: 'children',
1215
- filterOption: (input: string, option: { props: { children: string } }) =>
1216
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1217
- },
1218
- } },
1219
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1220
- type: 'select',
1221
- props: {
1222
- mode: 'multiple',
1223
- notFoundContent: '暂无数据',
1224
- allowClear: true,
1225
- showSearch: true,
1226
- showArrow: true,
1227
- maxTagCount: 1,
1228
- optionFilterProp: 'children',
1229
- filterOption: (input: string, option: { props: { children: string } }) =>
1230
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1231
- },
1232
- } },
1233
- ]
1234
- Promise.all([
1235
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1236
- pageSize: 5000,
1237
- currentPage: 1,
1238
- 'qp-companyType-eq': '30',
1239
- }),
1240
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1241
- pageSize: 5000,
1242
- currentPage: 1,
1243
- 'qp-companyType-eq': '20',
1244
- }),
1245
- loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1246
- // pageSize: 5000,
1247
- // currentPage: 1,
1248
- 'qp-status-eq': '1',
1249
- }),
1250
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1251
- pageSize: 5000,
1252
- currentPage: 1,
1253
- }),
1254
- ]).then((x: any)=>{
1255
- formatSource(x,0, 2, tableSearchForm);
1256
- formatSource(x,1, 3, tableSearchForm);
1257
- formatSource(x,2, 5, tableSearchForm);
1258
- formatSource(x,3, 6, tableSearchForm);
1259
- })
1260
- modalTableProps = {
1261
- modalTableTitle: '选择店铺',
1262
- tableSearchForm,
1263
- tableColumns: [
1264
- {
1265
- title: '店铺编码',
1266
- dataIndex: 'code',
1267
- },
1268
- {
1269
- title: '店铺名称',
1270
- dataIndex: 'name',
1271
- },
1272
- {
1273
- title: '归属集团',
1274
- dataIndex: 'conglomerateName',
1275
- },
1276
- {
1277
- title: '归属法人公司',
1278
- dataIndex: 'companyName',
1279
- },
1280
- {
1281
- title: '店铺类型',
1282
- dataIndex: 'type',
1283
- render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1284
- },
1285
- {
1286
- title: '店铺来源',
1287
- dataIndex: 'platformName',
1288
- },
1289
- {
1290
- title: '归属核算主体',
1291
- dataIndex: 'accountingName',
1292
- },
1293
- ],
1294
- ...modalTableBusProps
1295
- }
1296
- }
1297
- if(type === 'shopFile2') {
1298
- requestConfig = {
1299
- url: `${prefixUrl.selectPrefix}/store/page`,
1300
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1301
- mappingTextField: 'name',
1302
- mappingValueField: 'code',
1303
- otherParams: {
1304
- sorter: 'desc-id'
1305
- }, // 默认参数
1306
- sourceName: 'code',
1307
- ...requestConfigProp,
1308
- }
1309
- tableSearchForm = [
1310
- { name: 'qp-name-like', label: '商店名称' },
1311
- { name: 'qp-code-like', label: '商店编码' },
1312
- { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1313
- { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1314
- type: 'select',
1315
- props: {
1316
- mode: 'multiple',
1317
- notFoundContent: '暂无数据',
1318
- allowClear: true,
1319
- showSearch: true,
1320
- showArrow: true,
1321
- maxTagCount: 1,
1322
- optionFilterProp: 'children',
1323
- filterOption: (input: string, option: { props: { children: string } }) =>
1324
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1325
- },
1326
- } },
1327
- ]
1328
- Promise.all([
1329
- loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1330
- 'qp-employeeCode-eq': getEmployeeCode(),
1331
- 'qp-realOrg-eq': true,
1332
- 'qp-status-eq': 10
1333
- }),
1334
- ]).then((x: any)=>{
1335
- formatSource(x,0, 3, tableSearchForm);
1336
- })
1337
- modalTableProps = {
1338
- modalTableTitle: '选择商店',
1339
- tableSearchForm,
1340
- tableColumns: [
1341
- {
1342
- title: '商店编码',
1343
- dataIndex: 'code',
1344
- },
1345
- {
1346
- title: '商店名称',
1347
- dataIndex: 'name',
1348
- },
1349
- {
1350
- title: '商店类型',
1351
- dataIndex: 'type',
1352
- render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1353
- },
1354
- {
1355
- title: '所属销售组织',
1356
- dataIndex: 'orgName',
1357
- },
1358
- ],
1359
- ...modalTableBusProps
1360
- }
1361
- }
1362
-
1363
- // 核算主体选择器(无弹窗)
1364
- if(type === 'accountingSubject') {
1365
- requestConfig = {
1366
- url: `${prefixUrl.selectPrefix}/accountingSubject`,
1367
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1368
- mappingTextField: 'name',
1369
- mappingTextShowKeyField: 'code',
1370
- mappingValueField: 'id',
1371
- otherParams: {
1372
- sorter: 'desc-id'
1373
- }, // 默认参数
1374
- sourceName: 'accountingSubjectCode',
1375
- ...requestConfigProp,
1376
- }
1377
- needModalTable = false
1378
- }
1379
- // 库存组织选择器(无弹窗)
1380
- if(type === 'inventoryOrg') {
1381
- requestConfig = {
1382
- url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1383
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1384
- mappingTextField: 'name',
1385
- mappingTextShowKeyField: 'code',
1386
- mappingValueField: 'id',
1387
- otherParams: {
1388
- sorter: 'desc-id'
1389
- }, // 默认参数
1390
- sourceName: 'inventoryOrgCode',
1391
- ...requestConfigProp,
1392
- }
1393
- needModalTable = false
1394
- }
1395
-
1396
- // 法人公司选择器(无弹窗)
1397
- if(type === 'corporationCompany') {
1398
- requestConfig = {
1399
- url: `${prefixUrl.selectPrefix}/company`,
1400
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1401
- mappingTextField: 'name',
1402
- mappingTextShowKeyField: 'code',
1403
- mappingValueField: 'id',
1404
- otherParams: {
1405
- sorter: 'desc-id'
1406
- }, // 默认参数
1407
- sourceName: 'corporationCompany',
1408
- ...requestConfigProp,
1409
- }
1410
- needModalTable = false
1411
- }
1412
-
1413
- // 员工选择器
1414
- if(type === 'employee') {
1415
- requestConfig = {
1416
- url: `${prefixUrl.selectPrefix}/employee/v2`,
1417
- filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1418
- mappingTextField: 'name',
1419
- mappingTextShowKeyField: 'employeeNumber',
1420
- mappingValueField: 'employeeNumber',
1421
- otherParams: {
1422
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1423
- 'qp-employmentType-eq': 20,
1424
- sorter: 'desc-id'
1425
- }, // 默认参数
1426
- sourceName: 'employeeNumber',
1427
- ...requestConfigProp,
1428
- }
1429
- tableSearchForm = [
1430
- { name: 'qp-name-like', label: '员工名称' },
1431
- { name: 'qp-employeeNumber-like', label: '员工编码' },
1432
- { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1433
- type: 'select',
1434
- props: {
1435
- mode: 'multiple',
1436
- notFoundContent: '暂无数据',
1437
- allowClear: true,
1438
- showSearch: true,
1439
- showArrow: true,
1440
- maxTagCount: 1,
1441
- optionFilterProp: 'children',
1442
- filterOption: (input: string, option: { props: { children: string } }) =>
1443
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1444
- },
1445
- } },
1446
- { name: 'qp-email-like', label: '邮箱' },
1447
- { name: 'qp-officeTelephone-like', label: '手机号' },
1448
- ]
1449
- Promise.all([
1450
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1451
- pageSize: 5000,
1452
- currentPage: 1,
1453
- 'qp-companyType-eq': 20,
1454
- }),
1455
- ]).then((x: any)=>{
1456
- formatSource(x,0, 2, tableSearchForm);
1457
- })
1458
- modalTableProps = {
1459
- modalTableTitle: '选择员工',
1460
- tableSearchForm,
1461
- tableColumns: [
1462
- {
1463
- title: '员工编码',
1464
- dataIndex: 'employeeNumber',
1465
- },
1466
- {
1467
- title: '员工名称',
1468
- dataIndex: 'name',
1469
- },
1470
- {
1471
- title: '所属公司',
1472
- dataIndex: 'companyName',
1473
- },
1474
- {
1475
- title: '邮箱',
1476
- dataIndex: 'email',
1477
- },
1478
- {
1479
- title: '手机号',
1480
- dataIndex: 'officeTelephone',
1481
- },
1482
- ],
1483
- ...modalTableBusProps
1484
- }
1485
- }
1486
- if(type === 'employee2') {
1487
- // 版本2
1488
- requestConfig = {
1489
- url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1490
- filter: 'qp-username,name-orGroup,like', // 过滤参数
1491
- mappingTextField: 'name',
1492
- mappingTextShowKeyField: 'username',
1493
- mappingValueField: 'id',
1494
- otherParams: {
1495
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1496
- 'qp-employmentType-eq': 20,
1497
- 'qp-orgViewIds-like': 'administrative-organization-view',
1498
- sorter: 'desc-id'
1499
- }, // 默认参数
1500
- sourceName: 'employeeNumber',
1501
- ...requestConfigProp,
1502
- }
1503
- tableSearchForm = [
1504
- { name: 'qp-username-like', label: '账户名称' },
1505
- { name: 'qp-name-like', label: '显示名称' },
1506
- // { name: 'qp-employeeNumber-like', label: '员工编码' },
1507
- { name: 'qp-code-in', type: 'treeSelect', label: '所属组织机构', field: {
1508
- type: 'treeSelect',
1509
- props: {
1510
- multiple: true,
1511
- treeData: [],
1512
- treeCheckable: false,
1513
- showSearch: true,
1514
- allowClear: true,
1515
- showArrow: true,
1516
- treeNodeFilterProp: 'title',
1517
- treeDefaultExpandAll: true,
1518
- maxTagCount: 1,
1519
- placeholder: '请选择',
1520
- style: {
1521
- width: '100%',
1522
- },
1523
- showCheckedStrategy: 'TreeSelect.SHOW_ALL',
1524
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
1525
- },
1526
- } },
1527
- { name: 'qp-email-like', label: '邮箱' },
1528
- { name: 'qp-officeTelephone-like', label: '手机号' },
1529
- ]
1530
- Promise.all([
1531
- loadSelectSource(`${prefixUrl.formSelectFix}/orgViewNode/common/getTreeForOrgViewAndTenant`, { 'orgViewCode': 'administrative-organization-view' }),
1532
- ]).then((x: any)=>{
1533
- formatTreeDataSource(x,0, 2, tableSearchForm,['code', 'name']);
1534
- })
1535
- modalTableProps = {
1536
- modalTableTitle: '添加员工',
1537
- tableSearchForm,
1538
- tableColumns: [
1539
- {
1540
- title: '账户名称',
1541
- dataIndex: 'username',
1542
- },
1543
- {
1544
- title: '显示名称',
1545
- dataIndex: 'name',
1546
- },
1547
- // {
1548
- // title: '员工编码',
1549
- // dataIndex: 'employeeNumber',
1550
- // },
1551
- // {
1552
- // title: '员工名称',
1553
- // dataIndex: 'name',
1554
- // },
1555
- {
1556
- title: '所属组织机构',
1557
- dataIndex: 'administrativeNames',
1558
- render: (text: any) => handleTextOverflow(text),
1559
- },
1560
- {
1561
- title: '邮箱',
1562
- dataIndex: 'email',
1563
- },
1564
- {
1565
- title: '手机号',
1566
- dataIndex: 'officeTelephone',
1567
- },
1568
- ],
1569
- ...modalTableBusProps
1570
- }
1571
- }
1572
-
1573
- // 配送方式选择器
1574
- if(type === 'deliveryMode') {
1575
- const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
1576
- const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
1577
- requestConfig = {
1578
- url: `${prefixUrl.selectPrefix}/deliveryMode`,
1579
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1580
- mappingTextField: 'name',
1581
- mappingTextShowKeyField: 'code',
1582
- mappingValueField: 'code',
1583
- otherParams: {
1584
- sorter: 'desc-id'
1585
- }, // 默认参数
1586
- sourceName: 'deliveryModeCode',
1587
- ...requestConfigProp
1588
- }
1589
- tableSearchForm = [
1590
- { name: 'qp-name-like', label: '配送方式名称' },
1591
- { name: 'qp-code-like', label: '配送方式编码' },
1592
- { name: logisCompanyCodeSingleSearchName, type: 'select', label: '所属物流商', field: {
1593
- type: 'select',
1594
- props: {
1595
- ...(isLogisCompanyCodeSingleSearch ? {} : {
1596
- mode: 'multiple',
1597
- maxTagCount: 1,
1598
- }),
1599
- notFoundContent: '暂无数据',
1600
- allowClear: true,
1601
- showSearch: true,
1602
- showArrow: true,
1603
- optionFilterProp: 'children',
1604
- filterOption: (input: string, option: { props: { children: string } }) =>
1605
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1606
- },
1607
- } },
1608
- { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1609
- { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1610
- { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1611
- type: 'select',
1612
- props: {
1613
- mode: 'multiple',
1614
- notFoundContent: '暂无数据',
1615
- allowClear: true,
1616
- showSearch: true,
1617
- showArrow: true,
1618
- maxTagCount: 1,
1619
- optionFilterProp: 'children',
1620
- filterOption: (input: string, option: { props: { children: string } }) =>
1621
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1622
- },
1623
- } },
1624
- { name: 'qp-remark-like', label: '备注' },
1625
- ]
1626
- Promise.all([
1627
- loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1628
- pageSize: 5000,
1629
- currentPage: 1,
1630
- }),
1631
- loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1632
- pageSize: 5000,
1633
- currentPage: 1,
1634
- })
1635
- ]).then((x: any)=>{
1636
- formatSource(x,0, 2, tableSearchForm);
1637
- formatSource(x,1, 5, tableSearchForm);
1638
- })
1639
- modalTableProps = {
1640
- modalTableTitle: '选择配送方式',
1641
- tableSearchForm,
1642
- tableColumns: [
1643
- {
1644
- title: '配送方式编码',
1645
- dataIndex: 'code',
1646
- },
1647
- {
1648
- title: '配送方式名称',
1649
- dataIndex: 'name',
1650
- },
1651
- {
1652
- title: '所属物流商',
1653
- dataIndex: 'logisCompanyName',
1654
- },
1655
- {
1656
- dataIndex: 'recordChannnelCode',
1657
- title: '单号获取通道',
1658
- render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1659
- },
1660
- {
1661
- dataIndex: 'arrivalPaySupport',
1662
- title: '是否支持到付',
1663
- render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1664
- },
1665
- {
1666
- dataIndex: 'sheetTemplateName',
1667
- title: '面单模板',
1668
- },
1669
- {
1670
- dataIndex: 'remark',
1671
- title: '备注',
1672
- },
1673
- ],
1674
- ...modalTableBusProps
1675
- }
1676
- }
1677
-
1678
- // 规则场景选择器
1679
- if(type === 'ruleTemplate') {
1680
- requestConfig = {
1681
- url: `${prefixUrl.selectPrefix}/ruleTemplate`,
1682
- filter: 'qp-name,code-orGroup,like', // 过滤参数
1683
- mappingTextField: 'name',
1684
- mappingTextShowKeyField: 'code',
1685
- mappingValueField: 'code',
1686
- otherParams: {
1687
- sorter: 'desc-id'
1688
- }, // 默认参数
1689
- sourceName: 'ruleTemplateCode',
1690
- ...requestConfigProp
1691
- }
1692
- tableSearchForm = [
1693
- { name: 'qp-name-like', label: '规则场景名称' },
1694
- { name: 'qp-code-like', label: '规则场景编码' },
1695
- ]
1696
- modalTableProps = {
1697
- modalTableTitle: '选择规则场景',
1698
- tableSearchForm,
1699
- tableColumns: [
1700
- {
1701
- title: '规则场景编码',
1702
- dataIndex: 'code',
1703
- },
1704
- {
1705
- title: '规则场景名称',
1706
- dataIndex: 'name',
1707
- render: (text: any) => handleTextOverflow(text),
1708
- },
1709
- {
1710
- title: '条件对象',
1711
- dataIndex: 'objectName',
1712
- render: (text: any) => handleTextOverflow(text),
1713
- },
1714
- {
1715
- dataIndex: 'extName',
1716
- title: '条件扩展',
1717
- render: (text: any) => handleTextOverflow(text),
1718
- },
1719
- {
1720
- dataIndex: 'actionName',
1721
- title: '执行动作',
1722
- render: (text: any) => handleTextOverflow(text),
1723
- },
1724
- ],
1725
- ...modalTableBusProps
1726
- }
1727
- }
1728
-
1729
- return { modalTableProps, requestConfig, needModalTable };
1730
- }
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
+ sorter: 'desc-id'
1092
+ }, // 默认参数
1093
+ sourceName: 'customCode',
1094
+ ...requestConfigProp,
1095
+ }
1096
+ tableSearchForm = [
1097
+ { name: 'qp-name-like', label: '客户名称' },
1098
+ { name: 'qp-code-like', label: '客户编码' },
1099
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
1100
+ type: 'select',
1101
+ props: {
1102
+ // mode: 'multiple',
1103
+ notFoundContent: '暂无数据',
1104
+ allowClear: true,
1105
+ showSearch: true,
1106
+ showArrow: true,
1107
+ // maxTagCount: 1,
1108
+ optionFilterProp: 'children',
1109
+ filterOption: (input: string, option: { props: { children: string } }) =>
1110
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1111
+ },
1112
+ } },
1113
+ { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
1114
+ type: 'select',
1115
+ props: {
1116
+ // mode: 'multiple',
1117
+ notFoundContent: '暂无数据',
1118
+ allowClear: true,
1119
+ showSearch: true,
1120
+ showArrow: true,
1121
+ // maxTagCount: 1,
1122
+ optionFilterProp: 'children',
1123
+ filterOption: (input: string, option: { props: { children: string } }) =>
1124
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1125
+ },
1126
+ } },
1127
+ ]
1128
+ Promise.all([
1129
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1130
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
1131
+ ]).then((x: any)=>{
1132
+ formatSource(x,0, 2, tableSearchForm);
1133
+ formatSource(x,1, 3, tableSearchForm);
1134
+ })
1135
+ modalTableProps = {
1136
+ modalTableTitle: '选择客户',
1137
+ tableSearchForm,
1138
+ tableColumns: [
1139
+ {
1140
+ title: '客户编码',
1141
+ dataIndex: 'code',
1142
+ },
1143
+ {
1144
+ title: '客户名称',
1145
+ dataIndex: 'name',
1146
+ },
1147
+ {
1148
+ title: '创建组织',
1149
+ dataIndex: 'createOrgName',
1150
+ },
1151
+ {
1152
+ title: '使用组织',
1153
+ dataIndex: 'salesOrgName',
1154
+ },
1155
+ ],
1156
+ ...modalTableBusProps
1157
+ }
1158
+ }
1159
+
1160
+ // 店铺选择器
1161
+ if(type === 'shopFile') {
1162
+ requestConfig = {
1163
+ url: `${prefixUrl.selectPrefix}/store`,
1164
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1165
+ mappingTextField: 'name',
1166
+ mappingValueField: 'code',
1167
+ otherParams: {
1168
+ sorter: 'desc-id'
1169
+ }, // 默认参数
1170
+ sourceName: 'code',
1171
+ ...requestConfigProp,
1172
+ }
1173
+ tableSearchForm = [
1174
+ { name: 'qp-name-like', label: '店铺名称' },
1175
+ { name: 'qp-code-like', label: '店铺编码' },
1176
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
1177
+ type: 'select',
1178
+ props: {
1179
+ mode: 'multiple',
1180
+ notFoundContent: '暂无数据',
1181
+ allowClear: true,
1182
+ showSearch: true,
1183
+ showArrow: true,
1184
+ maxTagCount: 1,
1185
+ optionFilterProp: 'children',
1186
+ filterOption: (input: string, option: { props: { children: string } }) =>
1187
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1188
+ },
1189
+ } },
1190
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
1191
+ type: 'select',
1192
+ props: {
1193
+ mode: 'multiple',
1194
+ notFoundContent: '暂无数据',
1195
+ allowClear: true,
1196
+ showSearch: true,
1197
+ showArrow: true,
1198
+ maxTagCount: 1,
1199
+ optionFilterProp: 'children',
1200
+ filterOption: (input: string, option: { props: { children: string } }) =>
1201
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1202
+ },
1203
+ } },
1204
+ { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
1205
+ { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
1206
+ type: 'select',
1207
+ props: {
1208
+ mode: 'multiple',
1209
+ notFoundContent: '暂无数据',
1210
+ allowClear: true,
1211
+ showSearch: true,
1212
+ showArrow: true,
1213
+ maxTagCount: 1,
1214
+ optionFilterProp: 'children',
1215
+ filterOption: (input: string, option: { props: { children: string } }) =>
1216
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1217
+ },
1218
+ } },
1219
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
1220
+ type: 'select',
1221
+ props: {
1222
+ mode: 'multiple',
1223
+ notFoundContent: '暂无数据',
1224
+ allowClear: true,
1225
+ showSearch: true,
1226
+ showArrow: true,
1227
+ maxTagCount: 1,
1228
+ optionFilterProp: 'children',
1229
+ filterOption: (input: string, option: { props: { children: string } }) =>
1230
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1231
+ },
1232
+ } },
1233
+ ]
1234
+ Promise.all([
1235
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1236
+ pageSize: 5000,
1237
+ currentPage: 1,
1238
+ 'qp-companyType-eq': '30',
1239
+ }),
1240
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1241
+ pageSize: 5000,
1242
+ currentPage: 1,
1243
+ 'qp-companyType-eq': '20',
1244
+ }),
1245
+ loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
1246
+ // pageSize: 5000,
1247
+ // currentPage: 1,
1248
+ 'qp-status-eq': '1',
1249
+ }),
1250
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
1251
+ pageSize: 5000,
1252
+ currentPage: 1,
1253
+ }),
1254
+ ]).then((x: any)=>{
1255
+ formatSource(x,0, 2, tableSearchForm);
1256
+ formatSource(x,1, 3, tableSearchForm);
1257
+ formatSource(x,2, 5, tableSearchForm);
1258
+ formatSource(x,3, 6, tableSearchForm);
1259
+ })
1260
+ modalTableProps = {
1261
+ modalTableTitle: '选择店铺',
1262
+ tableSearchForm,
1263
+ tableColumns: [
1264
+ {
1265
+ title: '店铺编码',
1266
+ dataIndex: 'code',
1267
+ },
1268
+ {
1269
+ title: '店铺名称',
1270
+ dataIndex: 'name',
1271
+ },
1272
+ {
1273
+ title: '归属集团',
1274
+ dataIndex: 'conglomerateName',
1275
+ },
1276
+ {
1277
+ title: '归属法人公司',
1278
+ dataIndex: 'companyName',
1279
+ },
1280
+ {
1281
+ title: '店铺类型',
1282
+ dataIndex: 'type',
1283
+ render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
1284
+ },
1285
+ {
1286
+ title: '店铺来源',
1287
+ dataIndex: 'platformName',
1288
+ },
1289
+ {
1290
+ title: '归属核算主体',
1291
+ dataIndex: 'accountingName',
1292
+ },
1293
+ ],
1294
+ ...modalTableBusProps
1295
+ }
1296
+ }
1297
+ if(type === 'shopFile2') {
1298
+ requestConfig = {
1299
+ url: `${prefixUrl.selectPrefix}/store/page`,
1300
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1301
+ mappingTextField: 'name',
1302
+ mappingValueField: 'code',
1303
+ otherParams: {
1304
+ sorter: 'desc-id'
1305
+ }, // 默认参数
1306
+ sourceName: 'code',
1307
+ ...requestConfigProp,
1308
+ }
1309
+ tableSearchForm = [
1310
+ { name: 'qp-name-like', label: '商店名称' },
1311
+ { name: 'qp-code-like', label: '商店编码' },
1312
+ { name: 'qp-type-in', type: 'select', label: '商店类型', initialSource: shopFile2Type },
1313
+ { name: 'qp-orgCode-in', type: 'select', label: '所属销售组织', field: {
1314
+ type: 'select',
1315
+ props: {
1316
+ mode: 'multiple',
1317
+ notFoundContent: '暂无数据',
1318
+ allowClear: true,
1319
+ showSearch: true,
1320
+ showArrow: true,
1321
+ maxTagCount: 1,
1322
+ optionFilterProp: 'children',
1323
+ filterOption: (input: string, option: { props: { children: string } }) =>
1324
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1325
+ },
1326
+ } },
1327
+ ]
1328
+ Promise.all([
1329
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getTree/sales-organizational-view`, {
1330
+ 'qp-employeeCode-eq': getEmployeeCode(),
1331
+ 'qp-realOrg-eq': true,
1332
+ 'qp-status-eq': 10
1333
+ }),
1334
+ ]).then((x: any)=>{
1335
+ formatSource(x,0, 3, tableSearchForm);
1336
+ })
1337
+ modalTableProps = {
1338
+ modalTableTitle: '选择商店',
1339
+ tableSearchForm,
1340
+ tableColumns: [
1341
+ {
1342
+ title: '商店编码',
1343
+ dataIndex: 'code',
1344
+ },
1345
+ {
1346
+ title: '商店名称',
1347
+ dataIndex: 'name',
1348
+ },
1349
+ {
1350
+ title: '商店类型',
1351
+ dataIndex: 'type',
1352
+ render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
1353
+ },
1354
+ {
1355
+ title: '所属销售组织',
1356
+ dataIndex: 'orgName',
1357
+ },
1358
+ ],
1359
+ ...modalTableBusProps
1360
+ }
1361
+ }
1362
+
1363
+ // 核算主体选择器(无弹窗)
1364
+ if(type === 'accountingSubject') {
1365
+ requestConfig = {
1366
+ url: `${prefixUrl.selectPrefix}/accountingSubject`,
1367
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1368
+ mappingTextField: 'name',
1369
+ mappingTextShowKeyField: 'code',
1370
+ mappingValueField: 'id',
1371
+ otherParams: {
1372
+ sorter: 'desc-id'
1373
+ }, // 默认参数
1374
+ sourceName: 'accountingSubjectCode',
1375
+ ...requestConfigProp,
1376
+ }
1377
+ needModalTable = false
1378
+ }
1379
+ // 库存组织选择器(无弹窗)
1380
+ if(type === 'inventoryOrg') {
1381
+ requestConfig = {
1382
+ url: `${prefixUrl.selectPrefix}/inventoryOrg`,
1383
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1384
+ mappingTextField: 'name',
1385
+ mappingTextShowKeyField: 'code',
1386
+ mappingValueField: 'id',
1387
+ otherParams: {
1388
+ sorter: 'desc-id'
1389
+ }, // 默认参数
1390
+ sourceName: 'inventoryOrgCode',
1391
+ ...requestConfigProp,
1392
+ }
1393
+ needModalTable = false
1394
+ }
1395
+
1396
+ // 法人公司选择器(无弹窗)
1397
+ if(type === 'corporationCompany') {
1398
+ requestConfig = {
1399
+ url: `${prefixUrl.selectPrefix}/company`,
1400
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1401
+ mappingTextField: 'name',
1402
+ mappingTextShowKeyField: 'code',
1403
+ mappingValueField: 'id',
1404
+ otherParams: {
1405
+ sorter: 'desc-id'
1406
+ }, // 默认参数
1407
+ sourceName: 'corporationCompany',
1408
+ ...requestConfigProp,
1409
+ }
1410
+ needModalTable = false
1411
+ }
1412
+
1413
+ // 员工选择器
1414
+ if(type === 'employee') {
1415
+ requestConfig = {
1416
+ url: `${prefixUrl.selectPrefix}/employee/v2`,
1417
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1418
+ mappingTextField: 'name',
1419
+ mappingTextShowKeyField: 'employeeNumber',
1420
+ mappingValueField: 'employeeNumber',
1421
+ otherParams: {
1422
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1423
+ 'qp-employmentType-eq': 20,
1424
+ sorter: 'desc-id'
1425
+ }, // 默认参数
1426
+ sourceName: 'employeeNumber',
1427
+ ...requestConfigProp,
1428
+ }
1429
+ tableSearchForm = [
1430
+ { name: 'qp-name-like', label: '员工名称' },
1431
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
1432
+ { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
1433
+ type: 'select',
1434
+ props: {
1435
+ mode: 'multiple',
1436
+ notFoundContent: '暂无数据',
1437
+ allowClear: true,
1438
+ showSearch: true,
1439
+ showArrow: true,
1440
+ maxTagCount: 1,
1441
+ optionFilterProp: 'children',
1442
+ filterOption: (input: string, option: { props: { children: string } }) =>
1443
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1444
+ },
1445
+ } },
1446
+ { name: 'qp-email-like', label: '邮箱' },
1447
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1448
+ ]
1449
+ Promise.all([
1450
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
1451
+ pageSize: 5000,
1452
+ currentPage: 1,
1453
+ 'qp-companyType-eq': 20,
1454
+ }),
1455
+ ]).then((x: any)=>{
1456
+ formatSource(x,0, 2, tableSearchForm);
1457
+ })
1458
+ modalTableProps = {
1459
+ modalTableTitle: '选择员工',
1460
+ tableSearchForm,
1461
+ tableColumns: [
1462
+ {
1463
+ title: '员工编码',
1464
+ dataIndex: 'employeeNumber',
1465
+ },
1466
+ {
1467
+ title: '员工名称',
1468
+ dataIndex: 'name',
1469
+ },
1470
+ {
1471
+ title: '所属公司',
1472
+ dataIndex: 'companyName',
1473
+ },
1474
+ {
1475
+ title: '邮箱',
1476
+ dataIndex: 'email',
1477
+ },
1478
+ {
1479
+ title: '手机号',
1480
+ dataIndex: 'officeTelephone',
1481
+ },
1482
+ ],
1483
+ ...modalTableBusProps
1484
+ }
1485
+ }
1486
+ if(type === 'employee2') {
1487
+ // 版本2
1488
+ requestConfig = {
1489
+ url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1490
+ filter: 'qp-username,name-orGroup,like', // 过滤参数
1491
+ mappingTextField: 'name',
1492
+ mappingTextShowKeyField: 'username',
1493
+ mappingValueField: 'id',
1494
+ otherParams: {
1495
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1496
+ 'qp-employmentType-eq': 20,
1497
+ 'qp-orgViewIds-like': 'administrative-organization-view',
1498
+ sorter: 'desc-id'
1499
+ }, // 默认参数
1500
+ sourceName: 'employeeNumber',
1501
+ ...requestConfigProp,
1502
+ }
1503
+ tableSearchForm = [
1504
+ { name: 'qp-username-like', label: '账户名称' },
1505
+ { name: 'qp-name-like', label: '显示名称' },
1506
+ // { name: 'qp-employeeNumber-like', label: '员工编码' },
1507
+ { name: 'qp-code-in', type: 'treeSelect', label: '所属组织机构', field: {
1508
+ type: 'treeSelect',
1509
+ props: {
1510
+ multiple: true,
1511
+ treeData: [],
1512
+ treeCheckable: false,
1513
+ showSearch: true,
1514
+ allowClear: true,
1515
+ showArrow: true,
1516
+ treeNodeFilterProp: 'title',
1517
+ treeDefaultExpandAll: true,
1518
+ maxTagCount: 1,
1519
+ placeholder: '请选择',
1520
+ style: {
1521
+ width: '100%',
1522
+ },
1523
+ showCheckedStrategy: 'TreeSelect.SHOW_ALL',
1524
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
1525
+ },
1526
+ } },
1527
+ { name: 'qp-email-like', label: '邮箱' },
1528
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1529
+ ]
1530
+ Promise.all([
1531
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgViewNode/common/getTreeForOrgViewAndTenant`, { 'orgViewCode': 'administrative-organization-view' }),
1532
+ ]).then((x: any)=>{
1533
+ formatTreeDataSource(x,0, 2, tableSearchForm,['code', 'name']);
1534
+ })
1535
+ modalTableProps = {
1536
+ modalTableTitle: '添加员工',
1537
+ tableSearchForm,
1538
+ tableColumns: [
1539
+ {
1540
+ title: '账户名称',
1541
+ dataIndex: 'username',
1542
+ },
1543
+ {
1544
+ title: '显示名称',
1545
+ dataIndex: 'name',
1546
+ },
1547
+ // {
1548
+ // title: '员工编码',
1549
+ // dataIndex: 'employeeNumber',
1550
+ // },
1551
+ // {
1552
+ // title: '员工名称',
1553
+ // dataIndex: 'name',
1554
+ // },
1555
+ {
1556
+ title: '所属组织机构',
1557
+ dataIndex: 'administrativeNames',
1558
+ render: (text: any) => handleTextOverflow(text),
1559
+ },
1560
+ {
1561
+ title: '邮箱',
1562
+ dataIndex: 'email',
1563
+ },
1564
+ {
1565
+ title: '手机号',
1566
+ dataIndex: 'officeTelephone',
1567
+ },
1568
+ ],
1569
+ ...modalTableBusProps
1570
+ }
1571
+ }
1572
+
1573
+ // 配送方式选择器
1574
+ if(type === 'deliveryMode') {
1575
+ const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
1576
+ const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
1577
+ requestConfig = {
1578
+ url: `${prefixUrl.selectPrefix}/deliveryMode`,
1579
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1580
+ mappingTextField: 'name',
1581
+ mappingTextShowKeyField: 'code',
1582
+ mappingValueField: 'code',
1583
+ otherParams: {
1584
+ sorter: 'desc-id'
1585
+ }, // 默认参数
1586
+ sourceName: 'deliveryModeCode',
1587
+ ...requestConfigProp
1588
+ }
1589
+ tableSearchForm = [
1590
+ { name: 'qp-name-like', label: '配送方式名称' },
1591
+ { name: 'qp-code-like', label: '配送方式编码' },
1592
+ { name: logisCompanyCodeSingleSearchName, type: 'select', label: '所属物流商', field: {
1593
+ type: 'select',
1594
+ props: {
1595
+ ...(isLogisCompanyCodeSingleSearch ? {} : {
1596
+ mode: 'multiple',
1597
+ maxTagCount: 1,
1598
+ }),
1599
+ notFoundContent: '暂无数据',
1600
+ allowClear: true,
1601
+ showSearch: true,
1602
+ showArrow: true,
1603
+ optionFilterProp: 'children',
1604
+ filterOption: (input: string, option: { props: { children: string } }) =>
1605
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1606
+ },
1607
+ } },
1608
+ { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
1609
+ { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
1610
+ { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
1611
+ type: 'select',
1612
+ props: {
1613
+ mode: 'multiple',
1614
+ notFoundContent: '暂无数据',
1615
+ allowClear: true,
1616
+ showSearch: true,
1617
+ showArrow: true,
1618
+ maxTagCount: 1,
1619
+ optionFilterProp: 'children',
1620
+ filterOption: (input: string, option: { props: { children: string } }) =>
1621
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1622
+ },
1623
+ } },
1624
+ { name: 'qp-remark-like', label: '备注' },
1625
+ ]
1626
+ Promise.all([
1627
+ loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
1628
+ pageSize: 5000,
1629
+ currentPage: 1,
1630
+ }),
1631
+ loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
1632
+ pageSize: 5000,
1633
+ currentPage: 1,
1634
+ })
1635
+ ]).then((x: any)=>{
1636
+ formatSource(x,0, 2, tableSearchForm);
1637
+ formatSource(x,1, 5, tableSearchForm);
1638
+ })
1639
+ modalTableProps = {
1640
+ modalTableTitle: '选择配送方式',
1641
+ tableSearchForm,
1642
+ tableColumns: [
1643
+ {
1644
+ title: '配送方式编码',
1645
+ dataIndex: 'code',
1646
+ },
1647
+ {
1648
+ title: '配送方式名称',
1649
+ dataIndex: 'name',
1650
+ },
1651
+ {
1652
+ title: '所属物流商',
1653
+ dataIndex: 'logisCompanyName',
1654
+ },
1655
+ {
1656
+ dataIndex: 'recordChannnelCode',
1657
+ title: '单号获取通道',
1658
+ render: (text: any) => getDictionaryTextByValue('BSC00004', text),
1659
+ },
1660
+ {
1661
+ dataIndex: 'arrivalPaySupport',
1662
+ title: '是否支持到付',
1663
+ render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
1664
+ },
1665
+ {
1666
+ dataIndex: 'sheetTemplateName',
1667
+ title: '面单模板',
1668
+ },
1669
+ {
1670
+ dataIndex: 'remark',
1671
+ title: '备注',
1672
+ },
1673
+ ],
1674
+ ...modalTableBusProps
1675
+ }
1676
+ }
1677
+
1678
+ // 规则场景选择器
1679
+ if(type === 'ruleTemplate') {
1680
+ requestConfig = {
1681
+ url: `${prefixUrl.selectPrefix}/ruleTemplate`,
1682
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1683
+ mappingTextField: 'name',
1684
+ mappingTextShowKeyField: 'code',
1685
+ mappingValueField: 'code',
1686
+ otherParams: {
1687
+ sorter: 'desc-id'
1688
+ }, // 默认参数
1689
+ sourceName: 'ruleTemplateCode',
1690
+ ...requestConfigProp
1691
+ }
1692
+ tableSearchForm = [
1693
+ { name: 'qp-name-like', label: '规则场景名称' },
1694
+ { name: 'qp-code-like', label: '规则场景编码' },
1695
+ ]
1696
+ modalTableProps = {
1697
+ modalTableTitle: '选择规则场景',
1698
+ tableSearchForm,
1699
+ tableColumns: [
1700
+ {
1701
+ title: '规则场景编码',
1702
+ dataIndex: 'code',
1703
+ },
1704
+ {
1705
+ title: '规则场景名称',
1706
+ dataIndex: 'name',
1707
+ render: (text: any) => handleTextOverflow(text),
1708
+ },
1709
+ {
1710
+ title: '条件对象',
1711
+ dataIndex: 'objectName',
1712
+ render: (text: any) => handleTextOverflow(text),
1713
+ },
1714
+ {
1715
+ dataIndex: 'extName',
1716
+ title: '条件扩展',
1717
+ render: (text: any) => handleTextOverflow(text),
1718
+ },
1719
+ {
1720
+ dataIndex: 'actionName',
1721
+ title: '执行动作',
1722
+ render: (text: any) => handleTextOverflow(text),
1723
+ },
1724
+ ],
1725
+ ...modalTableBusProps
1726
+ }
1727
+ }
1728
+
1729
+ return { modalTableProps, requestConfig, needModalTable };
1730
+ }