@bit-sun/business-component 4.0.11 → 4.0.12-alpha.3
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.
- package/.umirc.ts +10 -6
- package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +2 -4
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +1 -0
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +2 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +11 -0
- package/dist/index.esm.js +1910 -980
- package/dist/index.js +1909 -979
- package/package.json +2 -2
- package/src/assets/copyImg.svg +16 -0
- package/src/assets/zhankaitiaojian-icon.svg +18 -0
- package/src/components/Business/BsLayouts/index.tsx +17 -0
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +45 -17
- package/src/components/Business/BsSulaQueryTable/index.less +21 -38
- package/src/components/Business/BsSulaQueryTable/index.tsx +26 -16
- package/src/components/Business/BsSulaQueryTable/setting.tsx +5 -5
- package/src/components/Business/BsSulaQueryTable/utils.tsx +36 -15
- package/src/components/Business/DetailPageWrapper/index.less +11 -3
- package/src/components/Business/DetailPageWrapper/index.tsx +27 -2
- package/src/components/Business/HomePageWrapper/index.less +9 -0
- package/src/components/Business/HomePageWrapper/index.tsx +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +834 -179
- package/src/components/Business/SearchSelect/index.md +181 -0
- package/src/components/Business/SearchSelect/index.tsx +2 -1
- package/src/components/Business/SearchSelect/utils.ts +4 -1
- package/src/components/Business/StateFlow/index.less +140 -124
- package/src/components/Business/StateFlow/index.tsx +3 -3
- package/src/components/Business/columnSettingTable/columnSetting.tsx +6 -6
- package/src/components/Business/columnSettingTable/index.less +31 -69
- package/src/components/Business/columnSettingTable/index.tsx +36 -6
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +36 -7
- package/src/components/Common/ParagraphCopier/index.tsx +2 -6
- package/src/components/Functional/QueryMutipleInput/index.less +51 -19
- package/src/components/Functional/QueryMutipleInput/index.tsx +28 -22
- package/src/components/Functional/SearchSelect/index.less +236 -73
- package/src/components/Functional/SearchSelect/index.tsx +400 -263
- package/src/components/Functional/SearchSelect/utils.ts +35 -0
- package/src/components/Functional/TreeSearchSelect/index.tsx +1 -1
- package/src/components/Solution/RuleComponent/index.js +4 -3
- package/src/components/Solution/RuleSetter/function.ts +2 -1
- package/src/plugin/TableColumnSetting/index.less +38 -70
- package/src/plugin/TableColumnSetting/index.tsx +5 -5
- package/src/styles/bsDefault.less +132 -136
- package/src/utils/TableUtils.tsx +1 -1
- package/src/utils/utils.ts +5 -2
|
@@ -4,22 +4,26 @@ import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFi
|
|
|
4
4
|
import { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleHiddenFields, handleHiddenFieldsRequest, getFieldIndex } from './utils';
|
|
5
5
|
import { handleTextOverflow, tableColumnsImage, handleTooltip } from '@/components/Business/BsSulaQueryTable/utils';
|
|
6
6
|
import { getSkuImg } from '@/utils/TableUtils';
|
|
7
|
-
import { getEmployeeCode } from '@/utils/LocalstorageUtils';
|
|
7
|
+
import { getEmployeeCode, getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
|
|
8
8
|
import { Image } from 'antd';
|
|
9
9
|
|
|
10
10
|
const hasDictSharingType = getDictionarySource('UC000013')?.length;
|
|
11
11
|
const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
|
|
12
12
|
|
|
13
|
-
export function commonFun (type?: string, prefixUrl: any,
|
|
13
|
+
export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
14
|
+
const { requestConfig:requestConfigProp={}, selectProps:selectConfigProps={}, modalTableProps:modalTableBusProps={}, hiddenFields=[]} = parentProps || {};
|
|
15
|
+
|
|
14
16
|
// 默认type === 'supplier' 供应商选择器
|
|
15
17
|
let requestConfig = {
|
|
16
18
|
url: `${prefixUrl.selectPrefix}/supplier`,
|
|
17
19
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
18
20
|
otherParams: {
|
|
19
|
-
sorter: 'desc-id'
|
|
21
|
+
sorter: 'desc-id',
|
|
22
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
20
23
|
}, // 默认参数
|
|
21
24
|
...requestConfigProp
|
|
22
25
|
}
|
|
26
|
+
let selectProps = selectConfigProps;
|
|
23
27
|
|
|
24
28
|
/*
|
|
25
29
|
* 处理 格式化下拉框数据源
|
|
@@ -52,7 +56,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
52
56
|
const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
|
|
53
57
|
let data = reData && reData[position]?.data;
|
|
54
58
|
let disabledJudge;
|
|
55
|
-
if(Object.keys(data).length) {
|
|
59
|
+
if(data && typeof data === 'object' && !Array.isArray(data) && Object.keys(data).length > 0) {
|
|
56
60
|
data = [data];
|
|
57
61
|
disabledJudge=false
|
|
58
62
|
}
|
|
@@ -64,7 +68,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
64
68
|
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
65
69
|
}
|
|
66
70
|
|
|
67
|
-
|
|
68
71
|
let tableSearchForm: any [] = [];
|
|
69
72
|
let modalTableProps = {
|
|
70
73
|
modalTableTitle: '',
|
|
@@ -76,6 +79,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
76
79
|
|
|
77
80
|
// 供应商选择器
|
|
78
81
|
if(type === 'supplier') {
|
|
82
|
+
selectProps = {
|
|
83
|
+
placeholder: '输入供应商编码或名称',
|
|
84
|
+
renderTableColumns: [
|
|
85
|
+
{
|
|
86
|
+
title: '供应商编码',
|
|
87
|
+
dataIndex: 'code',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
title: '供应商名称',
|
|
91
|
+
dataIndex: 'name',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
...selectConfigProps,
|
|
95
|
+
}
|
|
79
96
|
tableSearchForm = [
|
|
80
97
|
{ name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
|
|
81
98
|
{ name: 'qp-code-like', label: '供应商编码' },
|
|
@@ -147,13 +164,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
147
164
|
modalTableTitle: '选择供应商',
|
|
148
165
|
tableSearchForm,
|
|
149
166
|
tableColumns: [
|
|
167
|
+
{
|
|
168
|
+
title: '序号',
|
|
169
|
+
dataIndex: 'keyIndex',
|
|
170
|
+
defaultSort: 0,
|
|
171
|
+
},
|
|
150
172
|
{
|
|
151
173
|
title: '供应商编码',
|
|
152
174
|
dataIndex: 'code',
|
|
175
|
+
defaultSort: 1,
|
|
153
176
|
},
|
|
154
177
|
{
|
|
155
178
|
title: '供应商名称',
|
|
156
179
|
dataIndex: 'name',
|
|
180
|
+
defaultSort: 2,
|
|
157
181
|
},
|
|
158
182
|
{
|
|
159
183
|
title: '归属集团',
|
|
@@ -162,6 +186,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
162
186
|
{
|
|
163
187
|
title: '归属法人公司',
|
|
164
188
|
dataIndex: 'legalCompanyName',
|
|
189
|
+
defaultSort: 3,
|
|
165
190
|
},
|
|
166
191
|
{
|
|
167
192
|
title: '归属核算主体',
|
|
@@ -170,6 +195,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
170
195
|
{
|
|
171
196
|
title: '共享类型',
|
|
172
197
|
dataIndex: 'sharingType',
|
|
198
|
+
defaultSort: 4,
|
|
173
199
|
render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
|
|
174
200
|
},
|
|
175
201
|
],
|
|
@@ -178,6 +204,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
178
204
|
}
|
|
179
205
|
if(type === 'supplier2') {
|
|
180
206
|
// 版本2
|
|
207
|
+
selectProps = {
|
|
208
|
+
placeholder: '输入供应商编码或名称',
|
|
209
|
+
renderTableColumns: [
|
|
210
|
+
{
|
|
211
|
+
title: '供应商编码',
|
|
212
|
+
dataIndex: 'code',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
title: '供应商名称',
|
|
216
|
+
dataIndex: 'name',
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
...selectConfigProps,
|
|
220
|
+
}
|
|
181
221
|
tableSearchForm = [
|
|
182
222
|
{ name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
|
|
183
223
|
{ name: 'qp-code-like', label: '供应商编码' },
|
|
@@ -222,21 +262,30 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
222
262
|
modalTableTitle: '选择供应商',
|
|
223
263
|
tableSearchForm,
|
|
224
264
|
tableColumns: [
|
|
265
|
+
{
|
|
266
|
+
title: '序号',
|
|
267
|
+
dataIndex: 'keyIndex',
|
|
268
|
+
defaultSort: 0,
|
|
269
|
+
},
|
|
225
270
|
{
|
|
226
271
|
title: '供应商编码',
|
|
227
272
|
dataIndex: 'code',
|
|
273
|
+
defaultSort: 1,
|
|
228
274
|
},
|
|
229
275
|
{
|
|
230
276
|
title: '供应商名称',
|
|
231
277
|
dataIndex: 'name',
|
|
278
|
+
defaultSort: 2,
|
|
232
279
|
},
|
|
233
280
|
{
|
|
234
281
|
title: '创建组织',
|
|
235
282
|
dataIndex: 'createOrgName',
|
|
283
|
+
defaultSort: 3,
|
|
236
284
|
},
|
|
237
285
|
{
|
|
238
286
|
title: '使用组织',
|
|
239
287
|
dataIndex: 'salesOrgName',
|
|
288
|
+
defaultSort: 4,
|
|
240
289
|
},
|
|
241
290
|
],
|
|
242
291
|
...modalTableBusProps
|
|
@@ -246,102 +295,44 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
246
295
|
// 商品选择器sku
|
|
247
296
|
if(type === 'skuCommodity') {
|
|
248
297
|
requestConfig = {
|
|
249
|
-
url: `${prefixUrl.selectPrefix}/sku/
|
|
298
|
+
url: `${prefixUrl.selectPrefix}/sku/doPageBySelect/v3`,
|
|
250
299
|
filter: 'skuCodeAndSkuName', // 过滤参数
|
|
300
|
+
searchStartLength: 4,
|
|
251
301
|
mappingTextField: 'name',
|
|
252
302
|
mappingValueField: 'skuCode',
|
|
253
303
|
mappingTextShowTextField: ['name', 'propertyNameAndValue'],
|
|
254
304
|
otherParams: {
|
|
255
|
-
'
|
|
256
|
-
'qp-approveStatus-eq': 1,
|
|
257
|
-
'qp-status-eq': 1,
|
|
305
|
+
'ownOrgSign': getCurrentTargetBgId(),
|
|
258
306
|
// 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
|
|
259
|
-
|
|
307
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
260
308
|
}, // 默认参数
|
|
261
309
|
sourceName: 'skuCode',
|
|
262
310
|
...requestConfigProp,
|
|
263
311
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
289
|
-
type: 'select',
|
|
290
|
-
props: {
|
|
291
|
-
mode: 'multiple',
|
|
292
|
-
notFoundContent: '暂无数据',
|
|
293
|
-
allowClear: true,
|
|
294
|
-
showSearch: true,
|
|
295
|
-
showArrow: true,
|
|
296
|
-
maxTagCount: 1,
|
|
297
|
-
optionFilterProp: 'children',
|
|
298
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
299
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
300
|
-
},
|
|
301
|
-
} },
|
|
302
|
-
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
303
|
-
type: 'treeSelect',
|
|
304
|
-
props: {
|
|
305
|
-
treeData: [],
|
|
306
|
-
treeCheckable: true,
|
|
307
|
-
showSearch: true,
|
|
308
|
-
allowClear: true,
|
|
309
|
-
showArrow: true,
|
|
310
|
-
treeNodeFilterProp: 'title',
|
|
311
|
-
treeDefaultExpandAll: true,
|
|
312
|
-
maxTagCount: 1,
|
|
313
|
-
placeholder: '请选择',
|
|
314
|
-
style: {
|
|
315
|
-
width: '100%',
|
|
316
|
-
},
|
|
317
|
-
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
318
|
-
},
|
|
319
|
-
} },
|
|
320
|
-
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
321
|
-
type: 'select',
|
|
322
|
-
props: {
|
|
323
|
-
mode: 'multiple',
|
|
324
|
-
notFoundContent: '暂无数据',
|
|
325
|
-
allowClear: true,
|
|
326
|
-
showSearch: true,
|
|
327
|
-
showArrow: true,
|
|
328
|
-
maxTagCount: 1,
|
|
329
|
-
optionFilterProp: 'children',
|
|
330
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
331
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
332
|
-
},
|
|
333
|
-
} },
|
|
334
|
-
] : [
|
|
335
|
-
{ name: 'qp-name-like', label: 'SKU名称' },
|
|
336
|
-
{ name: 'qp-skuCode-in', label: 'SKU编码', field: {
|
|
337
|
-
type: 'multipleQueryInput',
|
|
338
|
-
props: {
|
|
339
|
-
...(requestConfigProp?.skuCodeValueRequestConfig || {}),
|
|
340
|
-
},
|
|
341
|
-
}},
|
|
342
|
-
{ name: 'qp-barCode-like', label: '国际条码'},
|
|
343
|
-
{ name: 'qp-itemName-like', label: '所属SPU名称' },
|
|
344
|
-
{ name: 'qp-itemCode-like', label: '所属SPU编码' },
|
|
312
|
+
selectProps = {
|
|
313
|
+
placeholder: '输入sku编码或名称',
|
|
314
|
+
renderTableColumns: [
|
|
315
|
+
{
|
|
316
|
+
title: 'SKU编码',
|
|
317
|
+
dataIndex: 'skuCode',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
title: '商品名称',
|
|
321
|
+
dataIndex: 'skuName',
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
...selectConfigProps,
|
|
325
|
+
}
|
|
326
|
+
tableSearchForm = [
|
|
327
|
+
{ name: 'qp-skuCode-in', label: 'SKU编码',type:'multipleQueryInput' },
|
|
328
|
+
{ name: 'qp-skuName-like', label: 'SKU名称' },
|
|
329
|
+
{ name: 'qp-itemCode-like', label: '外部SPU编码' },
|
|
330
|
+
{ name: 'qp-eancode-in', label: '商品条码', field: {
|
|
331
|
+
type: 'multipleQueryInput',
|
|
332
|
+
props: {
|
|
333
|
+
...(requestConfigProp?.itemEancodeValueRequestConfig || {}),
|
|
334
|
+
},
|
|
335
|
+
}},
|
|
345
336
|
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
346
337
|
type: 'select',
|
|
347
338
|
props: {
|
|
@@ -374,20 +365,6 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
374
365
|
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
375
366
|
},
|
|
376
367
|
} },
|
|
377
|
-
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
378
|
-
type: 'select',
|
|
379
|
-
props: {
|
|
380
|
-
mode: 'multiple',
|
|
381
|
-
notFoundContent: '暂无数据',
|
|
382
|
-
allowClear: true,
|
|
383
|
-
showSearch: true,
|
|
384
|
-
showArrow: true,
|
|
385
|
-
maxTagCount: 1,
|
|
386
|
-
optionFilterProp: 'children',
|
|
387
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
388
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
389
|
-
},
|
|
390
|
-
} },
|
|
391
368
|
]
|
|
392
369
|
Promise.all([
|
|
393
370
|
loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
|
|
@@ -399,35 +376,43 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
399
376
|
pageSize: 5000,
|
|
400
377
|
currentPage: 1,
|
|
401
378
|
}),
|
|
402
|
-
loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
|
|
403
|
-
pageSize: 5000,
|
|
404
|
-
currentPage: 1,
|
|
405
|
-
}),
|
|
406
379
|
]).then((x: any)=>{
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
requestConfig.url.includes('v2') ? formatSource(x,2, 9, tableSearchForm,['id','name']) : formatSource(x,2, 7, tableSearchForm,['id','name'])
|
|
380
|
+
formatSource(x,0, 4, tableSearchForm,['id','name'])
|
|
381
|
+
formatTreeDataSource(x,1, 5, tableSearchForm)
|
|
410
382
|
})
|
|
411
383
|
modalTableProps = {
|
|
412
384
|
modalTableTitle: '选择SKU',
|
|
413
385
|
tableSearchForm,
|
|
414
|
-
|
|
386
|
+
isHorizontally: true,
|
|
387
|
+
tableColumns: [
|
|
388
|
+
{
|
|
389
|
+
title: '序号',
|
|
390
|
+
dataIndex: 'keyIndex',
|
|
391
|
+
defaultSort: 0,
|
|
392
|
+
},
|
|
415
393
|
{
|
|
416
394
|
title: 'SKU编码',
|
|
417
395
|
dataIndex: 'skuCode',
|
|
396
|
+
defaultSort: 2,
|
|
418
397
|
},
|
|
419
398
|
{
|
|
420
399
|
title: 'SKU名称',
|
|
421
|
-
dataIndex: '
|
|
400
|
+
dataIndex: 'skuName',
|
|
401
|
+
defaultSort: 3,
|
|
422
402
|
},
|
|
423
403
|
{
|
|
424
404
|
title: '图片',
|
|
425
405
|
dataIndex: 'itemUrl',
|
|
426
|
-
|
|
406
|
+
defaultSort: 1,
|
|
407
|
+
render: (text: any,record: any) => tableColumnsImage(getSkuImg(record), { width: 16, height: 16 }),
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
title: '商品条码',
|
|
411
|
+
dataIndex: 'eancode',
|
|
427
412
|
},
|
|
428
413
|
{
|
|
429
|
-
title: '
|
|
430
|
-
dataIndex: '
|
|
414
|
+
title: 'SKC编码',
|
|
415
|
+
dataIndex: 'skcCode',
|
|
431
416
|
},
|
|
432
417
|
{
|
|
433
418
|
title: '所属SPU名称',
|
|
@@ -437,50 +422,13 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
437
422
|
title: '所属SPU编码',
|
|
438
423
|
dataIndex: 'itemCode',
|
|
439
424
|
},
|
|
440
|
-
|
|
425
|
+
{
|
|
441
426
|
title: '外部编码',
|
|
442
427
|
dataIndex: 'externalCode',
|
|
443
|
-
} : false,
|
|
444
|
-
{
|
|
445
|
-
title: '规格',
|
|
446
|
-
dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec',
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
title: '类目',
|
|
450
|
-
dataIndex: 'categoryName',
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
title: '品类',
|
|
454
|
-
dataIndex: 'className',
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
title: '品牌',
|
|
458
|
-
dataIndex: 'brandName',
|
|
459
|
-
},
|
|
460
|
-
] : [
|
|
461
|
-
{
|
|
462
|
-
title: 'SKU编码',
|
|
463
|
-
dataIndex: 'skuCode',
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
title: 'SKU名称',
|
|
467
|
-
dataIndex: 'name',
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
title: '国际条码',
|
|
471
|
-
dataIndex: 'barCode',
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
title: '所属SPU名称',
|
|
475
|
-
dataIndex: 'itemName',
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
title: '所属SPU编码',
|
|
479
|
-
dataIndex: 'itemCode',
|
|
480
428
|
},
|
|
481
429
|
{
|
|
482
430
|
title: '规格',
|
|
483
|
-
dataIndex: '
|
|
431
|
+
dataIndex: 'propertyNameAndValue',
|
|
484
432
|
},
|
|
485
433
|
{
|
|
486
434
|
title: '类目',
|
|
@@ -493,6 +441,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
493
441
|
{
|
|
494
442
|
title: '品牌',
|
|
495
443
|
dataIndex: 'brandName',
|
|
444
|
+
defaultSort: 4,
|
|
496
445
|
},
|
|
497
446
|
],
|
|
498
447
|
...modalTableBusProps
|
|
@@ -501,6 +450,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
501
450
|
|
|
502
451
|
// 商品选择器spu
|
|
503
452
|
if(type === 'spuCommodity') {
|
|
453
|
+
selectProps = {
|
|
454
|
+
placeholder: '输入spu编码或名称',
|
|
455
|
+
renderTableColumns: [
|
|
456
|
+
{
|
|
457
|
+
title: 'spu编码',
|
|
458
|
+
dataIndex: 'itemCode',
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
title: 'spu名称',
|
|
462
|
+
dataIndex: 'name',
|
|
463
|
+
},
|
|
464
|
+
],
|
|
465
|
+
...selectConfigProps,
|
|
466
|
+
}
|
|
504
467
|
requestConfig = {
|
|
505
468
|
url: `${prefixUrl.selectPrefix}/item`,
|
|
506
469
|
filter: 'qp-itemCode,name-orGroup,like', // 过滤参数
|
|
@@ -508,7 +471,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
508
471
|
mappingValueField: 'itemCode',
|
|
509
472
|
otherParams: {
|
|
510
473
|
'qp-approveStatus-eq': 1, // 审核状态(0.待审批;1.审批通过;2.驳回;3.审批未通过)
|
|
511
|
-
sorter: 'desc-id'
|
|
474
|
+
sorter: 'desc-id',
|
|
475
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
512
476
|
}, // 默认参数
|
|
513
477
|
sourceName: 'itemCode',
|
|
514
478
|
...requestConfigProp,
|
|
@@ -586,21 +550,30 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
586
550
|
modalTableTitle: '选择SPU',
|
|
587
551
|
tableSearchForm,
|
|
588
552
|
tableColumns: [
|
|
553
|
+
{
|
|
554
|
+
title: '序号',
|
|
555
|
+
dataIndex: 'keyIndex',
|
|
556
|
+
defaultSort: 0,
|
|
557
|
+
},
|
|
589
558
|
{
|
|
590
559
|
title: 'SPU编码',
|
|
591
560
|
dataIndex: 'itemCode',
|
|
561
|
+
defaultSort: 1,
|
|
592
562
|
},
|
|
593
563
|
{
|
|
594
564
|
title: 'SPU名称',
|
|
595
565
|
dataIndex: 'name',
|
|
566
|
+
defaultSort: 2,
|
|
596
567
|
},
|
|
597
568
|
{
|
|
598
569
|
title: '品牌',
|
|
599
570
|
dataIndex: 'brandName',
|
|
571
|
+
defaultSort: 3,
|
|
600
572
|
},
|
|
601
573
|
{
|
|
602
574
|
title: '类目',
|
|
603
575
|
dataIndex: 'categoryText',
|
|
576
|
+
defaultSort: 4,
|
|
604
577
|
},
|
|
605
578
|
{
|
|
606
579
|
title: '品类',
|
|
@@ -613,6 +586,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
613
586
|
|
|
614
587
|
// 商品选择器skc
|
|
615
588
|
if(type === 'skcCommodity') {
|
|
589
|
+
selectProps = {
|
|
590
|
+
placeholder: '输入SKC编码或名称',
|
|
591
|
+
renderTableColumns: [
|
|
592
|
+
{
|
|
593
|
+
title: 'SKC编码',
|
|
594
|
+
dataIndex: 'code',
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
title: 'SKC名称',
|
|
598
|
+
dataIndex: 'name',
|
|
599
|
+
},
|
|
600
|
+
],
|
|
601
|
+
...selectConfigProps,
|
|
602
|
+
}
|
|
616
603
|
const tableSearchForm = handleHiddenFields([
|
|
617
604
|
{ name: 'qp-code-like', label: 'SKC编码' },
|
|
618
605
|
{ name: 'qp-skcName-like', label: 'SKC名称' },
|
|
@@ -722,6 +709,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
722
709
|
mappingValueField: 'code',
|
|
723
710
|
otherParams: {
|
|
724
711
|
'qp-skcStatus-eq': 1, // 状态:0禁用 1启用
|
|
712
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
725
713
|
}, // 默认参数
|
|
726
714
|
sourceName: 'qp-skcCode-eq',
|
|
727
715
|
...requestConfigProp,
|
|
@@ -737,13 +725,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
737
725
|
modalTableTitle: '选择SKC',
|
|
738
726
|
tableSearchForm,
|
|
739
727
|
tableColumns: handleHiddenFields([
|
|
728
|
+
{
|
|
729
|
+
title: '序号',
|
|
730
|
+
dataIndex: 'keyIndex',
|
|
731
|
+
defaultSort: 0,
|
|
732
|
+
},
|
|
740
733
|
{
|
|
741
734
|
title: 'SKC编码',
|
|
742
735
|
dataIndex: 'code',
|
|
736
|
+
defaultSort: 1,
|
|
743
737
|
},
|
|
744
738
|
{
|
|
745
739
|
title: 'SKC名称',
|
|
746
740
|
dataIndex: 'name',
|
|
741
|
+
defaultSort: 2,
|
|
747
742
|
},
|
|
748
743
|
{
|
|
749
744
|
title: '商品名称',
|
|
@@ -752,6 +747,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
752
747
|
{
|
|
753
748
|
title: '颜色',
|
|
754
749
|
dataIndex: 'colorName',
|
|
750
|
+
defaultSort: 3,
|
|
755
751
|
},
|
|
756
752
|
{
|
|
757
753
|
title: '类目',
|
|
@@ -764,6 +760,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
764
760
|
{
|
|
765
761
|
title: '品牌',
|
|
766
762
|
dataIndex: 'brandName',
|
|
763
|
+
defaultSort: 4,
|
|
767
764
|
},
|
|
768
765
|
], hiddenFields),
|
|
769
766
|
...modalTableBusProps
|
|
@@ -772,6 +769,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
772
769
|
|
|
773
770
|
// 商品规格选择器(无弹窗)
|
|
774
771
|
if(type === 'skuPropertyValue') {
|
|
772
|
+
selectProps = {
|
|
773
|
+
placeholder: '输入规格编码或名称',
|
|
774
|
+
renderTableColumns: [
|
|
775
|
+
{
|
|
776
|
+
title: '规格编码',
|
|
777
|
+
dataIndex: 'propertyValueCode',
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
title: '规格名称',
|
|
781
|
+
dataIndex: 'propertyValueName',
|
|
782
|
+
},
|
|
783
|
+
],
|
|
784
|
+
...selectConfigProps,
|
|
785
|
+
}
|
|
775
786
|
requestConfig = {
|
|
776
787
|
url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
|
|
777
788
|
filter: 'qp-value-like', // 过滤参数
|
|
@@ -779,7 +790,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
779
790
|
mappingTextShowKeyField: 'propertyValueCode',
|
|
780
791
|
mappingValueField: 'propertyValueCode',
|
|
781
792
|
otherParams: {
|
|
782
|
-
sorter: 'desc-id'
|
|
793
|
+
sorter: 'desc-id',
|
|
794
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
783
795
|
}, // 默认参数
|
|
784
796
|
sourceName: 'qp-propertyValueCode-in',
|
|
785
797
|
...requestConfigProp,
|
|
@@ -789,7 +801,22 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
789
801
|
|
|
790
802
|
// 仓库选择器(物理、逻辑仓、运营仓)
|
|
791
803
|
if(type === 'physicalWarehouse') {
|
|
804
|
+
selectProps = {
|
|
805
|
+
placeholder: '输入物理仓编码或名称',
|
|
806
|
+
renderTableColumns: [
|
|
807
|
+
{
|
|
808
|
+
title: '物理仓编码',
|
|
809
|
+
dataIndex: 'physicalWarehouseCode',
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
title: '物理仓名称',
|
|
813
|
+
dataIndex: 'physicalWarehouseName',
|
|
814
|
+
},
|
|
815
|
+
],
|
|
816
|
+
...selectConfigProps,
|
|
817
|
+
}
|
|
792
818
|
requestConfig = {
|
|
819
|
+
init: true,
|
|
793
820
|
url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
|
|
794
821
|
filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like', // 过滤参数
|
|
795
822
|
mappingTextField: 'physicalWarehouseName',
|
|
@@ -797,7 +824,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
797
824
|
mappingValueField: 'id',
|
|
798
825
|
otherParams: {
|
|
799
826
|
...(modalTableBusProps?.needStatusSearch?{}:{'qp-isEnable-eq': 1}),
|
|
800
|
-
sorter: 'desc-id'
|
|
827
|
+
sorter: 'desc-id',
|
|
828
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
801
829
|
}, // 默认参数
|
|
802
830
|
sourceName: 'warehouseIds',
|
|
803
831
|
...requestConfigProp,
|
|
@@ -835,17 +863,25 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
835
863
|
modalTableTitle: '选择物理仓',
|
|
836
864
|
tableSearchForm,
|
|
837
865
|
tableColumns: [
|
|
866
|
+
{
|
|
867
|
+
title: '序号',
|
|
868
|
+
dataIndex: 'keyIndex',
|
|
869
|
+
defaultSort: 0,
|
|
870
|
+
},
|
|
838
871
|
{
|
|
839
872
|
title: '物理仓编码',
|
|
840
873
|
dataIndex: 'physicalWarehouseCode',
|
|
874
|
+
defaultSort: 1,
|
|
841
875
|
},
|
|
842
876
|
{
|
|
843
877
|
title: '物理仓名称',
|
|
844
878
|
dataIndex: 'physicalWarehouseName',
|
|
879
|
+
defaultSort: 2,
|
|
845
880
|
},
|
|
846
881
|
{
|
|
847
882
|
title: '物理仓类型',
|
|
848
883
|
dataIndex: 'physicalWarehouseType',
|
|
884
|
+
defaultSort: 3,
|
|
849
885
|
render: (text: number) => getDictionaryTextByValue('SC00002', text),
|
|
850
886
|
},
|
|
851
887
|
...(modalTableBusProps?.needStatusSearch?[{
|
|
@@ -856,13 +892,29 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
856
892
|
{
|
|
857
893
|
title: '所属公司',
|
|
858
894
|
dataIndex: 'companyName',
|
|
895
|
+
defaultSort: 4,
|
|
859
896
|
},
|
|
860
897
|
],
|
|
861
898
|
...modalTableBusProps
|
|
862
899
|
}
|
|
863
900
|
}
|
|
864
901
|
if(type === 'realWarehouse') {
|
|
902
|
+
selectProps = {
|
|
903
|
+
placeholder: '输入逻辑仓编码或名称',
|
|
904
|
+
renderTableColumns: [
|
|
905
|
+
{
|
|
906
|
+
title: '逻辑仓编码',
|
|
907
|
+
dataIndex: 'realWarehouseCode',
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
title: '逻辑仓名称',
|
|
911
|
+
dataIndex: 'realWarehouseName',
|
|
912
|
+
},
|
|
913
|
+
],
|
|
914
|
+
...selectConfigProps,
|
|
915
|
+
}
|
|
865
916
|
requestConfig = {
|
|
917
|
+
init: true,
|
|
866
918
|
url: `${prefixUrl.selectPrefix}/realWarehouse`,
|
|
867
919
|
filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like', // 过滤参数
|
|
868
920
|
mappingTextField: 'realWarehouseName',
|
|
@@ -870,7 +922,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
870
922
|
mappingValueField: 'id',
|
|
871
923
|
otherParams: {
|
|
872
924
|
...(modalTableBusProps?.needStatusSearch?{}:{'qp-isEnable-eq': 1}),
|
|
873
|
-
sorter: 'desc-id'
|
|
925
|
+
sorter: 'desc-id',
|
|
926
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
874
927
|
}, // 默认参数
|
|
875
928
|
sourceName: 'warehouseIds',
|
|
876
929
|
...requestConfigProp,
|
|
@@ -885,22 +938,31 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
885
938
|
modalTableTitle: '选择逻辑仓',
|
|
886
939
|
tableSearchForm,
|
|
887
940
|
tableColumns: [
|
|
941
|
+
{
|
|
942
|
+
title: '序号',
|
|
943
|
+
dataIndex: 'keyIndex',
|
|
944
|
+
defaultSort: 0,
|
|
945
|
+
},
|
|
888
946
|
{
|
|
889
947
|
title: '逻辑仓编码',
|
|
890
948
|
dataIndex: 'realWarehouseCode',
|
|
949
|
+
defaultSort: 1,
|
|
891
950
|
},
|
|
892
951
|
{
|
|
893
952
|
title: '逻辑仓名称',
|
|
894
953
|
dataIndex: 'realWarehouseName',
|
|
954
|
+
defaultSort: 2,
|
|
895
955
|
},
|
|
896
956
|
{
|
|
897
957
|
title: '逻辑仓类型',
|
|
898
958
|
dataIndex: 'realWarehouseType',
|
|
959
|
+
defaultSort: 3,
|
|
899
960
|
render: (text: number) => getDictionaryTextByValue('SC00004', text),
|
|
900
961
|
},
|
|
901
962
|
...(modalTableBusProps?.needStatusSearch?[{
|
|
902
963
|
title: '状态',
|
|
903
964
|
dataIndex: 'isEnable',
|
|
965
|
+
defaultSort: 4,
|
|
904
966
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
905
967
|
}]:[]),
|
|
906
968
|
],
|
|
@@ -908,7 +970,22 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
908
970
|
}
|
|
909
971
|
}
|
|
910
972
|
if(type === 'ownerWarehouse') {
|
|
973
|
+
selectProps = {
|
|
974
|
+
placeholder: '输入运营仓编码或名称',
|
|
975
|
+
renderTableColumns: [
|
|
976
|
+
{
|
|
977
|
+
title: '运营仓编码',
|
|
978
|
+
dataIndex: 'operationWarehouseCode',
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
title: '运营仓名称',
|
|
982
|
+
dataIndex: 'name',
|
|
983
|
+
},
|
|
984
|
+
],
|
|
985
|
+
...selectConfigProps,
|
|
986
|
+
}
|
|
911
987
|
requestConfig = {
|
|
988
|
+
init: true,
|
|
912
989
|
url: `${prefixUrl.selectPrefix}/ownerWarehouse`,
|
|
913
990
|
filter: 'qp-name,operationWarehouseCode-orGroup,like', // 过滤参数
|
|
914
991
|
mappingTextField: 'name',
|
|
@@ -916,7 +993,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
916
993
|
mappingValueField: 'operationWarehouseCode',
|
|
917
994
|
otherParams: {
|
|
918
995
|
...(modalTableBusProps?.needStatusSearch?{}:{'qp-status-eq': 1}),
|
|
919
|
-
sorter: 'desc-id'
|
|
996
|
+
sorter: 'desc-id',
|
|
997
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
920
998
|
}, // 默认参数
|
|
921
999
|
sourceName: 'qp-operationWarehouseCode-in',
|
|
922
1000
|
...requestConfigProp,
|
|
@@ -949,21 +1027,30 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
949
1027
|
modalTableTitle: '选择运营仓',
|
|
950
1028
|
tableSearchForm,
|
|
951
1029
|
tableColumns: [
|
|
1030
|
+
{
|
|
1031
|
+
title: '序号',
|
|
1032
|
+
dataIndex: 'keyIndex',
|
|
1033
|
+
defaultSort: 0,
|
|
1034
|
+
},
|
|
952
1035
|
{
|
|
953
1036
|
title: '运营仓编码',
|
|
954
1037
|
dataIndex: 'operationWarehouseCode',
|
|
1038
|
+
defaultSort: 1,
|
|
955
1039
|
},
|
|
956
1040
|
{
|
|
957
1041
|
title: '运营仓名称',
|
|
958
1042
|
dataIndex: 'name',
|
|
1043
|
+
defaultSort: 2,
|
|
959
1044
|
},
|
|
960
1045
|
{
|
|
961
1046
|
title: '运营组',
|
|
962
1047
|
dataIndex: 'groupName',
|
|
1048
|
+
defaultSort: 3,
|
|
963
1049
|
},
|
|
964
1050
|
...(modalTableBusProps?.needStatusSearch?[{
|
|
965
1051
|
title: '状态',
|
|
966
1052
|
dataIndex: 'status',
|
|
1053
|
+
defaultSort: 4,
|
|
967
1054
|
render: (text: number) => getDictionaryTextByValue('SC00001', text),
|
|
968
1055
|
}]:[]),
|
|
969
1056
|
],
|
|
@@ -973,7 +1060,22 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
973
1060
|
|
|
974
1061
|
// 仓库选择器(虚拟、渠道仓)(无弹窗)
|
|
975
1062
|
if(type === 'virtualWarehouse') {
|
|
1063
|
+
selectProps = {
|
|
1064
|
+
placeholder: '输入虚拟仓编码或名称',
|
|
1065
|
+
renderTableColumns: [
|
|
1066
|
+
{
|
|
1067
|
+
title: '虚拟仓编码',
|
|
1068
|
+
dataIndex: 'virtualWarehouseCode',
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
title: '虚拟仓名称',
|
|
1072
|
+
dataIndex: 'virtualWarehouseName',
|
|
1073
|
+
},
|
|
1074
|
+
],
|
|
1075
|
+
...selectConfigProps,
|
|
1076
|
+
}
|
|
976
1077
|
requestConfig = {
|
|
1078
|
+
init: true,
|
|
977
1079
|
url: `${prefixUrl.selectPrefix}/virtualWarehouse`,
|
|
978
1080
|
filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like', // 过滤参数
|
|
979
1081
|
mappingTextField: 'virtualWarehouseName',
|
|
@@ -981,7 +1083,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
981
1083
|
mappingValueField: 'id',
|
|
982
1084
|
otherParams: {
|
|
983
1085
|
'qp-isEnable-eq': 1,
|
|
984
|
-
sorter: 'desc-id'
|
|
1086
|
+
sorter: 'desc-id',
|
|
1087
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
985
1088
|
}, // 默认参数
|
|
986
1089
|
sourceName: 'warehouseIds',
|
|
987
1090
|
...requestConfigProp,
|
|
@@ -989,7 +1092,22 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
989
1092
|
needModalTable = false
|
|
990
1093
|
}
|
|
991
1094
|
if(type === 'channelWarehouse') {
|
|
1095
|
+
selectProps = {
|
|
1096
|
+
placeholder: '输入渠道仓编码或名称',
|
|
1097
|
+
renderTableColumns: [
|
|
1098
|
+
{
|
|
1099
|
+
title: '渠道仓编码',
|
|
1100
|
+
dataIndex: 'channelWarehouseCode',
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
title: '渠道仓名称',
|
|
1104
|
+
dataIndex: 'channelWarehouseName',
|
|
1105
|
+
},
|
|
1106
|
+
],
|
|
1107
|
+
...selectConfigProps,
|
|
1108
|
+
}
|
|
992
1109
|
requestConfig = {
|
|
1110
|
+
init: true,
|
|
993
1111
|
url: `${prefixUrl.selectPrefix}/channelWarehouse`,
|
|
994
1112
|
filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like', // 过滤参数
|
|
995
1113
|
mappingTextField: 'channelWarehouseName',
|
|
@@ -997,7 +1115,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
997
1115
|
mappingValueField: 'id',
|
|
998
1116
|
otherParams: {
|
|
999
1117
|
'qp-isEnable-eq': 1,
|
|
1000
|
-
sorter: 'desc-id'
|
|
1118
|
+
sorter: 'desc-id',
|
|
1119
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1001
1120
|
}, // 默认参数
|
|
1002
1121
|
sourceName: 'warehouseIds',
|
|
1003
1122
|
...requestConfigProp,
|
|
@@ -1007,14 +1126,30 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1007
1126
|
|
|
1008
1127
|
// 客户选择器
|
|
1009
1128
|
if(type === 'customer') {
|
|
1129
|
+
selectProps = {
|
|
1130
|
+
placeholder: '输入客户编码或名称',
|
|
1131
|
+
renderTableColumns: [
|
|
1132
|
+
{
|
|
1133
|
+
title: '客户编码',
|
|
1134
|
+
dataIndex: 'code',
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
title: '客户名称',
|
|
1138
|
+
dataIndex: 'name',
|
|
1139
|
+
},
|
|
1140
|
+
],
|
|
1141
|
+
...selectConfigProps,
|
|
1142
|
+
}
|
|
1010
1143
|
requestConfig = {
|
|
1144
|
+
init: true,
|
|
1011
1145
|
url: `${prefixUrl.selectPrefix}/uc/customer/v2`,
|
|
1012
1146
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1013
1147
|
mappingTextField: 'name',
|
|
1014
1148
|
mappingValueField: 'code',
|
|
1015
1149
|
otherParams: {
|
|
1016
1150
|
'qp-status-eq': 10,
|
|
1017
|
-
sorter: 'desc-id'
|
|
1151
|
+
sorter: 'desc-id',
|
|
1152
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1018
1153
|
}, // 默认参数
|
|
1019
1154
|
sourceName: 'customCode',
|
|
1020
1155
|
...requestConfigProp,
|
|
@@ -1090,17 +1225,25 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1090
1225
|
modalTableTitle: '选择客户',
|
|
1091
1226
|
tableSearchForm,
|
|
1092
1227
|
tableColumns: [
|
|
1228
|
+
{
|
|
1229
|
+
title: '序号',
|
|
1230
|
+
dataIndex: 'keyIndex',
|
|
1231
|
+
defaultSort: 0,
|
|
1232
|
+
},
|
|
1093
1233
|
{
|
|
1094
1234
|
title: '客户编码',
|
|
1095
1235
|
dataIndex: 'code',
|
|
1236
|
+
defaultSort: 1,
|
|
1096
1237
|
},
|
|
1097
1238
|
{
|
|
1098
1239
|
title: '客户名称',
|
|
1099
1240
|
dataIndex: 'name',
|
|
1241
|
+
defaultSort: 2,
|
|
1100
1242
|
},
|
|
1101
1243
|
{
|
|
1102
1244
|
title: '归属集团',
|
|
1103
1245
|
dataIndex: 'conglomerateName',
|
|
1246
|
+
defaultSort: 3,
|
|
1104
1247
|
},
|
|
1105
1248
|
{
|
|
1106
1249
|
title: '归属法人公司',
|
|
@@ -1113,6 +1256,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1113
1256
|
{
|
|
1114
1257
|
title: '共享类型',
|
|
1115
1258
|
dataIndex: 'sharingType',
|
|
1259
|
+
defaultSort: 4,
|
|
1116
1260
|
render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text,
|
|
1117
1261
|
},
|
|
1118
1262
|
],
|
|
@@ -1120,8 +1264,23 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1120
1264
|
}
|
|
1121
1265
|
}
|
|
1122
1266
|
if(type === 'customer2') {
|
|
1267
|
+
selectProps = {
|
|
1268
|
+
placeholder: '输入客户编码或名称',
|
|
1269
|
+
renderTableColumns: [
|
|
1270
|
+
{
|
|
1271
|
+
title: '客户编码',
|
|
1272
|
+
dataIndex: 'code',
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
title: '客户名称',
|
|
1276
|
+
dataIndex: 'name',
|
|
1277
|
+
},
|
|
1278
|
+
],
|
|
1279
|
+
...selectConfigProps,
|
|
1280
|
+
}
|
|
1123
1281
|
// 版本2
|
|
1124
1282
|
requestConfig = {
|
|
1283
|
+
init: true,
|
|
1125
1284
|
url: `${prefixUrl.selectPrefix}/customer`,
|
|
1126
1285
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1127
1286
|
mappingTextField: 'name',
|
|
@@ -1129,7 +1288,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1129
1288
|
otherParams: {
|
|
1130
1289
|
'qp-isMain-eq': 1, // 员工权限过滤,若不需要不要加
|
|
1131
1290
|
'qp-status-eq': 1, // 1启用 0禁用
|
|
1132
|
-
sorter: 'desc-id'
|
|
1291
|
+
sorter: 'desc-id',
|
|
1292
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1133
1293
|
}, // 默认参数
|
|
1134
1294
|
sourceName: 'customCode',
|
|
1135
1295
|
...requestConfigProp,
|
|
@@ -1178,21 +1338,30 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1178
1338
|
modalTableTitle: '选择客户',
|
|
1179
1339
|
tableSearchForm,
|
|
1180
1340
|
tableColumns: [
|
|
1341
|
+
{
|
|
1342
|
+
title: '序号',
|
|
1343
|
+
dataIndex: 'keyIndex',
|
|
1344
|
+
defaultSort: 0,
|
|
1345
|
+
},
|
|
1181
1346
|
{
|
|
1182
1347
|
title: '客户编码',
|
|
1183
1348
|
dataIndex: 'code',
|
|
1349
|
+
defaultSort: 1,
|
|
1184
1350
|
},
|
|
1185
1351
|
{
|
|
1186
1352
|
title: '客户名称',
|
|
1187
1353
|
dataIndex: 'name',
|
|
1354
|
+
defaultSort: 2,
|
|
1188
1355
|
},
|
|
1189
1356
|
{
|
|
1190
1357
|
title: '创建组织',
|
|
1191
1358
|
dataIndex: 'createOrgName',
|
|
1359
|
+
defaultSort: 3,
|
|
1192
1360
|
},
|
|
1193
1361
|
{
|
|
1194
1362
|
title: '使用组织',
|
|
1195
1363
|
dataIndex: 'salesOrgName',
|
|
1364
|
+
defaultSort: 4,
|
|
1196
1365
|
},
|
|
1197
1366
|
],
|
|
1198
1367
|
...modalTableBusProps
|
|
@@ -1201,13 +1370,29 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1201
1370
|
|
|
1202
1371
|
// 店铺选择器
|
|
1203
1372
|
if(type === 'shopFile') {
|
|
1373
|
+
selectProps = {
|
|
1374
|
+
placeholder: '输入店铺编码或名称',
|
|
1375
|
+
renderTableColumns: [
|
|
1376
|
+
{
|
|
1377
|
+
title: '店铺编码',
|
|
1378
|
+
dataIndex: 'code',
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
title: '店铺名称',
|
|
1382
|
+
dataIndex: 'name',
|
|
1383
|
+
},
|
|
1384
|
+
],
|
|
1385
|
+
...selectConfigProps,
|
|
1386
|
+
}
|
|
1204
1387
|
requestConfig = {
|
|
1388
|
+
init: true,
|
|
1205
1389
|
url: `${prefixUrl.selectPrefix}/store`,
|
|
1206
1390
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1207
1391
|
mappingTextField: 'name',
|
|
1208
1392
|
mappingValueField: 'code',
|
|
1209
1393
|
otherParams: {
|
|
1210
|
-
sorter: 'desc-id'
|
|
1394
|
+
sorter: 'desc-id',
|
|
1395
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1211
1396
|
}, // 默认参数
|
|
1212
1397
|
sourceName: 'code',
|
|
1213
1398
|
...requestConfigProp,
|
|
@@ -1322,13 +1507,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1322
1507
|
modalTableTitle: '选择店铺',
|
|
1323
1508
|
tableSearchForm,
|
|
1324
1509
|
tableColumns: [
|
|
1510
|
+
{
|
|
1511
|
+
title: '序号',
|
|
1512
|
+
dataIndex: 'keyIndex',
|
|
1513
|
+
defaultSort: 0,
|
|
1514
|
+
},
|
|
1325
1515
|
{
|
|
1326
1516
|
title: '店铺编码',
|
|
1327
1517
|
dataIndex: 'code',
|
|
1518
|
+
defaultSort: 1,
|
|
1328
1519
|
},
|
|
1329
1520
|
{
|
|
1330
1521
|
title: '店铺名称',
|
|
1331
1522
|
dataIndex: 'name',
|
|
1523
|
+
defaultSort: 2,
|
|
1332
1524
|
},
|
|
1333
1525
|
{
|
|
1334
1526
|
title: '归属集团',
|
|
@@ -1341,11 +1533,13 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1341
1533
|
{
|
|
1342
1534
|
title: '店铺类型',
|
|
1343
1535
|
dataIndex: 'type',
|
|
1536
|
+
defaultSort: 3,
|
|
1344
1537
|
render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
|
|
1345
1538
|
},
|
|
1346
1539
|
{
|
|
1347
1540
|
title: '店铺来源',
|
|
1348
1541
|
dataIndex: 'platformName',
|
|
1542
|
+
defaultSort: 4,
|
|
1349
1543
|
},
|
|
1350
1544
|
{
|
|
1351
1545
|
title: '归属核算主体',
|
|
@@ -1356,13 +1550,29 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1356
1550
|
}
|
|
1357
1551
|
}
|
|
1358
1552
|
if(type === 'shopFile2') {
|
|
1553
|
+
selectProps = {
|
|
1554
|
+
placeholder: '输入商店编码或名称',
|
|
1555
|
+
renderTableColumns: [
|
|
1556
|
+
{
|
|
1557
|
+
title: '商店编码',
|
|
1558
|
+
dataIndex: 'code',
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
title: '商店名称',
|
|
1562
|
+
dataIndex: 'name',
|
|
1563
|
+
},
|
|
1564
|
+
],
|
|
1565
|
+
...selectConfigProps,
|
|
1566
|
+
}
|
|
1359
1567
|
requestConfig = {
|
|
1568
|
+
init: true,
|
|
1360
1569
|
url: `${prefixUrl.selectPrefix}/store/page`,
|
|
1361
1570
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1362
1571
|
mappingTextField: 'name',
|
|
1363
1572
|
mappingValueField: 'code',
|
|
1364
1573
|
otherParams: {
|
|
1365
|
-
sorter: 'desc-id'
|
|
1574
|
+
sorter: 'desc-id',
|
|
1575
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1366
1576
|
}, // 默认参数
|
|
1367
1577
|
sourceName: 'code',
|
|
1368
1578
|
...requestConfigProp,
|
|
@@ -1400,17 +1610,25 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1400
1610
|
modalTableTitle: '选择商店',
|
|
1401
1611
|
tableSearchForm,
|
|
1402
1612
|
tableColumns: [
|
|
1613
|
+
{
|
|
1614
|
+
title: '序号',
|
|
1615
|
+
dataIndex: 'keyIndex',
|
|
1616
|
+
defaultSort: 0,
|
|
1617
|
+
},
|
|
1403
1618
|
{
|
|
1404
1619
|
title: '商店编码',
|
|
1405
1620
|
dataIndex: 'code',
|
|
1621
|
+
defaultSort: 1,
|
|
1406
1622
|
},
|
|
1407
1623
|
{
|
|
1408
1624
|
title: '商店名称',
|
|
1409
1625
|
dataIndex: 'name',
|
|
1626
|
+
defaultSort: 2,
|
|
1410
1627
|
},
|
|
1411
1628
|
{
|
|
1412
1629
|
title: '商店类型',
|
|
1413
1630
|
dataIndex: 'type',
|
|
1631
|
+
defaultSort: 3,
|
|
1414
1632
|
render: (text: number) => shopFile2Type.find((i: any) => i.value === text)?.text,
|
|
1415
1633
|
},
|
|
1416
1634
|
{
|
|
@@ -1421,6 +1639,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1421
1639
|
{
|
|
1422
1640
|
title: '所属销售组织',
|
|
1423
1641
|
dataIndex: 'orgName',
|
|
1642
|
+
defaultSort: 4,
|
|
1424
1643
|
},
|
|
1425
1644
|
],
|
|
1426
1645
|
...modalTableBusProps
|
|
@@ -1429,6 +1648,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1429
1648
|
|
|
1430
1649
|
// 核算主体选择器(无弹窗)
|
|
1431
1650
|
if(type === 'accountingSubject') {
|
|
1651
|
+
selectProps = {
|
|
1652
|
+
placeholder: '输入核算主体编码或名称',
|
|
1653
|
+
renderTableColumns: [
|
|
1654
|
+
{
|
|
1655
|
+
title: '核算主体编码',
|
|
1656
|
+
dataIndex: 'code',
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
title: '核算主体名称',
|
|
1660
|
+
dataIndex: 'name',
|
|
1661
|
+
},
|
|
1662
|
+
],
|
|
1663
|
+
...selectConfigProps,
|
|
1664
|
+
}
|
|
1432
1665
|
requestConfig = {
|
|
1433
1666
|
url: `${prefixUrl.selectPrefix}/accountingSubject`,
|
|
1434
1667
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
@@ -1436,7 +1669,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1436
1669
|
mappingTextShowKeyField: 'code',
|
|
1437
1670
|
mappingValueField: 'id',
|
|
1438
1671
|
otherParams: {
|
|
1439
|
-
sorter: 'desc-id'
|
|
1672
|
+
sorter: 'desc-id',
|
|
1673
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1440
1674
|
}, // 默认参数
|
|
1441
1675
|
sourceName: 'accountingSubjectCode',
|
|
1442
1676
|
...requestConfigProp,
|
|
@@ -1445,6 +1679,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1445
1679
|
}
|
|
1446
1680
|
// 库存组织选择器(无弹窗)
|
|
1447
1681
|
if(type === 'inventoryOrg') {
|
|
1682
|
+
selectProps = {
|
|
1683
|
+
placeholder: '输入库存组织编码或名称',
|
|
1684
|
+
renderTableColumns: [
|
|
1685
|
+
{
|
|
1686
|
+
title: '库存组织编码',
|
|
1687
|
+
dataIndex: 'code',
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
title: '库存组织名称',
|
|
1691
|
+
dataIndex: 'name',
|
|
1692
|
+
},
|
|
1693
|
+
],
|
|
1694
|
+
...selectConfigProps,
|
|
1695
|
+
}
|
|
1448
1696
|
requestConfig = {
|
|
1449
1697
|
url: `${prefixUrl.selectPrefix}/inventoryOrg`,
|
|
1450
1698
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
@@ -1452,7 +1700,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1452
1700
|
mappingTextShowKeyField: 'code',
|
|
1453
1701
|
mappingValueField: 'id',
|
|
1454
1702
|
otherParams: {
|
|
1455
|
-
sorter: 'desc-id'
|
|
1703
|
+
sorter: 'desc-id',
|
|
1704
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1456
1705
|
}, // 默认参数
|
|
1457
1706
|
sourceName: 'inventoryOrgCode',
|
|
1458
1707
|
...requestConfigProp,
|
|
@@ -1462,6 +1711,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1462
1711
|
|
|
1463
1712
|
// 法人公司选择器(无弹窗)
|
|
1464
1713
|
if(type === 'corporationCompany') {
|
|
1714
|
+
selectProps = {
|
|
1715
|
+
placeholder: '输入法人公司编码或名称',
|
|
1716
|
+
renderTableColumns: [
|
|
1717
|
+
{
|
|
1718
|
+
title: '法人公司编码',
|
|
1719
|
+
dataIndex: 'code',
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
title: '法人公司名称',
|
|
1723
|
+
dataIndex: 'name',
|
|
1724
|
+
},
|
|
1725
|
+
],
|
|
1726
|
+
...selectConfigProps,
|
|
1727
|
+
}
|
|
1465
1728
|
requestConfig = {
|
|
1466
1729
|
url: `${prefixUrl.selectPrefix}/company`,
|
|
1467
1730
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
@@ -1469,7 +1732,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1469
1732
|
mappingTextShowKeyField: 'code',
|
|
1470
1733
|
mappingValueField: 'id',
|
|
1471
1734
|
otherParams: {
|
|
1472
|
-
sorter: 'desc-id'
|
|
1735
|
+
sorter: 'desc-id',
|
|
1736
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1473
1737
|
}, // 默认参数
|
|
1474
1738
|
sourceName: 'corporationCompany',
|
|
1475
1739
|
...requestConfigProp,
|
|
@@ -1479,6 +1743,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1479
1743
|
|
|
1480
1744
|
// 新-法人公司选择器(无弹窗)
|
|
1481
1745
|
if(type === 'platCompany') {
|
|
1746
|
+
selectProps = {
|
|
1747
|
+
placeholder: '输入法人公司编码或名称',
|
|
1748
|
+
renderTableColumns: [
|
|
1749
|
+
{
|
|
1750
|
+
title: '法人公司编码',
|
|
1751
|
+
dataIndex: 'socialCreditCode',
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
title: '法人公司名称',
|
|
1755
|
+
dataIndex: 'name',
|
|
1756
|
+
},
|
|
1757
|
+
],
|
|
1758
|
+
...selectConfigProps,
|
|
1759
|
+
}
|
|
1482
1760
|
requestConfig = {
|
|
1483
1761
|
url: `${prefixUrl.selectPrefix}/platCompany`,
|
|
1484
1762
|
filter: 'qp-name,socialCreditCode-orGroup,like', // 过滤参数
|
|
@@ -1486,7 +1764,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1486
1764
|
mappingTextShowKeyField: 'socialCreditCode',
|
|
1487
1765
|
mappingValueField: 'socialCreditCode',
|
|
1488
1766
|
otherParams: {
|
|
1489
|
-
sorter: 'desc-id'
|
|
1767
|
+
sorter: 'desc-id',
|
|
1768
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1490
1769
|
}, // 默认参数
|
|
1491
1770
|
sourceName: 'platCompany',
|
|
1492
1771
|
...requestConfigProp,
|
|
@@ -1496,6 +1775,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1496
1775
|
|
|
1497
1776
|
// 员工选择器
|
|
1498
1777
|
if(type === 'employee') {
|
|
1778
|
+
selectProps = {
|
|
1779
|
+
placeholder: '输入员工编码或名称',
|
|
1780
|
+
renderTableColumns: [
|
|
1781
|
+
{
|
|
1782
|
+
title: '员工编码',
|
|
1783
|
+
dataIndex: 'employeeNumber',
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
title: '员工名称',
|
|
1787
|
+
dataIndex: 'name',
|
|
1788
|
+
},
|
|
1789
|
+
],
|
|
1790
|
+
...selectConfigProps,
|
|
1791
|
+
}
|
|
1499
1792
|
requestConfig = {
|
|
1500
1793
|
url: `${prefixUrl.selectPrefix}/employee/v2`,
|
|
1501
1794
|
filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
|
|
@@ -1505,7 +1798,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1505
1798
|
otherParams: {
|
|
1506
1799
|
'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
|
|
1507
1800
|
'qp-employmentType-eq': 20,
|
|
1508
|
-
sorter: 'desc-id'
|
|
1801
|
+
sorter: 'desc-id',
|
|
1802
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1509
1803
|
}, // 默认参数
|
|
1510
1804
|
sourceName: 'employeeNumber',
|
|
1511
1805
|
...requestConfigProp,
|
|
@@ -1543,17 +1837,25 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1543
1837
|
modalTableTitle: '选择员工',
|
|
1544
1838
|
tableSearchForm,
|
|
1545
1839
|
tableColumns: [
|
|
1840
|
+
{
|
|
1841
|
+
title: '序号',
|
|
1842
|
+
dataIndex: 'keyIndex',
|
|
1843
|
+
defaultSort: 0,
|
|
1844
|
+
},
|
|
1546
1845
|
{
|
|
1547
1846
|
title: '员工编码',
|
|
1548
1847
|
dataIndex: 'employeeNumber',
|
|
1848
|
+
defaultSort: 1,
|
|
1549
1849
|
},
|
|
1550
1850
|
{
|
|
1551
1851
|
title: '员工名称',
|
|
1552
1852
|
dataIndex: 'name',
|
|
1853
|
+
defaultSort: 2,
|
|
1553
1854
|
},
|
|
1554
1855
|
{
|
|
1555
1856
|
title: '所属公司',
|
|
1556
1857
|
dataIndex: 'companyName',
|
|
1858
|
+
defaultSort: 3,
|
|
1557
1859
|
},
|
|
1558
1860
|
{
|
|
1559
1861
|
title: '邮箱',
|
|
@@ -1562,6 +1864,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1562
1864
|
{
|
|
1563
1865
|
title: '手机号',
|
|
1564
1866
|
dataIndex: 'officeTelephone',
|
|
1867
|
+
defaultSort: 4,
|
|
1565
1868
|
},
|
|
1566
1869
|
],
|
|
1567
1870
|
...modalTableBusProps
|
|
@@ -1569,6 +1872,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1569
1872
|
}
|
|
1570
1873
|
if(type === 'employee2') {
|
|
1571
1874
|
// 版本2
|
|
1875
|
+
selectProps = {
|
|
1876
|
+
placeholder: '输入员工编码或名称',
|
|
1877
|
+
renderTableColumns: [
|
|
1878
|
+
{
|
|
1879
|
+
title: '员工编码',
|
|
1880
|
+
dataIndex: 'username',
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
title: '员工名称',
|
|
1884
|
+
dataIndex: 'name',
|
|
1885
|
+
},
|
|
1886
|
+
],
|
|
1887
|
+
...selectConfigProps,
|
|
1888
|
+
}
|
|
1572
1889
|
requestConfig = {
|
|
1573
1890
|
url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
|
|
1574
1891
|
filter: 'qp-username,name-orGroup,like', // 过滤参数
|
|
@@ -1579,7 +1896,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1579
1896
|
'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
|
|
1580
1897
|
'qp-orgViewIds-like': 'administrative-organization-view', // 为了兼容 搜素所属组织机构时候需要传此参数
|
|
1581
1898
|
...(modalTableBusProps?.needTypeSearch?{}:{'qp-employmentType-eq': 20}), // 10外部员工;20内部员工
|
|
1582
|
-
sorter: 'desc-id'
|
|
1899
|
+
sorter: 'desc-id',
|
|
1900
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1583
1901
|
}, // 默认参数
|
|
1584
1902
|
sourceName: 'employeeNumber',
|
|
1585
1903
|
...requestConfigProp,
|
|
@@ -1621,14 +1939,21 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1621
1939
|
modalTableTitle: '添加员工',
|
|
1622
1940
|
tableSearchForm,
|
|
1623
1941
|
tableColumns: [
|
|
1942
|
+
{
|
|
1943
|
+
title: '序号',
|
|
1944
|
+
dataIndex: 'keyIndex',
|
|
1945
|
+
defaultSort: 0,
|
|
1946
|
+
},
|
|
1624
1947
|
{
|
|
1625
1948
|
title: '账户名称',
|
|
1626
1949
|
dataIndex: 'username',
|
|
1950
|
+
defaultSort: 1,
|
|
1627
1951
|
render: (text: any) => handleTextOverflow(text),
|
|
1628
1952
|
},
|
|
1629
1953
|
{
|
|
1630
1954
|
title: '显示名称',
|
|
1631
1955
|
dataIndex: 'name',
|
|
1956
|
+
defaultSort: 2,
|
|
1632
1957
|
},
|
|
1633
1958
|
// {
|
|
1634
1959
|
// title: '员工编码',
|
|
@@ -1641,6 +1966,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1641
1966
|
{
|
|
1642
1967
|
title: '所属组织机构',
|
|
1643
1968
|
dataIndex: 'administrativeNames',
|
|
1969
|
+
defaultSort: 3,
|
|
1644
1970
|
render: (text: any) => handleTextOverflow(text),
|
|
1645
1971
|
},
|
|
1646
1972
|
...(modalTableBusProps?.needTypeSearch?[{
|
|
@@ -1655,6 +1981,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1655
1981
|
{
|
|
1656
1982
|
title: '手机号',
|
|
1657
1983
|
dataIndex: 'officeTelephone',
|
|
1984
|
+
defaultSort: 4,
|
|
1658
1985
|
render: (text: any, record: any) => handleTextOverflow(text||record?.phone),
|
|
1659
1986
|
},
|
|
1660
1987
|
],
|
|
@@ -1664,6 +1991,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1664
1991
|
|
|
1665
1992
|
// 配送方式选择器
|
|
1666
1993
|
if(type === 'deliveryMode') {
|
|
1994
|
+
selectProps = {
|
|
1995
|
+
placeholder: '输入配送方式编码或名称',
|
|
1996
|
+
renderTableColumns: [
|
|
1997
|
+
{
|
|
1998
|
+
title: '配送方式编码',
|
|
1999
|
+
dataIndex: 'code',
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
title: '配送方式名称',
|
|
2003
|
+
dataIndex: 'name',
|
|
2004
|
+
},
|
|
2005
|
+
],
|
|
2006
|
+
...selectConfigProps,
|
|
2007
|
+
}
|
|
1667
2008
|
const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
|
|
1668
2009
|
const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
|
|
1669
2010
|
requestConfig = {
|
|
@@ -1673,7 +2014,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1673
2014
|
mappingTextShowKeyField: 'code',
|
|
1674
2015
|
mappingValueField: 'code',
|
|
1675
2016
|
otherParams: {
|
|
1676
|
-
sorter: 'desc-id'
|
|
2017
|
+
sorter: 'desc-id',
|
|
2018
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1677
2019
|
}, // 默认参数
|
|
1678
2020
|
sourceName: 'deliveryModeCode',
|
|
1679
2021
|
...requestConfigProp
|
|
@@ -1732,17 +2074,25 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1732
2074
|
modalTableTitle: '选择配送方式',
|
|
1733
2075
|
tableSearchForm,
|
|
1734
2076
|
tableColumns: [
|
|
2077
|
+
{
|
|
2078
|
+
title: '序号',
|
|
2079
|
+
dataIndex: 'keyIndex',
|
|
2080
|
+
defaultSort: 0,
|
|
2081
|
+
},
|
|
1735
2082
|
{
|
|
1736
2083
|
title: '配送方式编码',
|
|
1737
2084
|
dataIndex: 'code',
|
|
2085
|
+
defaultSort: 1,
|
|
1738
2086
|
},
|
|
1739
2087
|
{
|
|
1740
2088
|
title: '配送方式名称',
|
|
1741
2089
|
dataIndex: 'name',
|
|
2090
|
+
defaultSort: 2,
|
|
1742
2091
|
},
|
|
1743
2092
|
{
|
|
1744
2093
|
title: '所属物流商',
|
|
1745
2094
|
dataIndex: 'logisCompanyName',
|
|
2095
|
+
defaultSort: 3,
|
|
1746
2096
|
},
|
|
1747
2097
|
{
|
|
1748
2098
|
dataIndex: 'recordChannnelCode',
|
|
@@ -1761,6 +2111,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1761
2111
|
{
|
|
1762
2112
|
dataIndex: 'remark',
|
|
1763
2113
|
title: '备注',
|
|
2114
|
+
defaultSort: 4,
|
|
1764
2115
|
},
|
|
1765
2116
|
],
|
|
1766
2117
|
...modalTableBusProps
|
|
@@ -1769,6 +2120,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1769
2120
|
|
|
1770
2121
|
// 规则模板选择器
|
|
1771
2122
|
if(type === 'ruleTemplate') {
|
|
2123
|
+
selectProps = {
|
|
2124
|
+
placeholder: '输入规则模板编码或名称',
|
|
2125
|
+
renderTableColumns: [
|
|
2126
|
+
{
|
|
2127
|
+
title: '规则模板编码',
|
|
2128
|
+
dataIndex: 'code',
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
title: '规则模板名称',
|
|
2132
|
+
dataIndex: 'name',
|
|
2133
|
+
},
|
|
2134
|
+
],
|
|
2135
|
+
...selectConfigProps,
|
|
2136
|
+
}
|
|
1772
2137
|
requestConfig = {
|
|
1773
2138
|
url: `${prefixUrl.selectPrefix}/ruleTemplate`,
|
|
1774
2139
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
@@ -1776,7 +2141,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1776
2141
|
mappingTextShowKeyField: 'code',
|
|
1777
2142
|
mappingValueField: 'code',
|
|
1778
2143
|
otherParams: {
|
|
1779
|
-
sorter: 'desc-id'
|
|
2144
|
+
sorter: 'desc-id',
|
|
2145
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1780
2146
|
}, // 默认参数
|
|
1781
2147
|
sourceName: 'ruleTemplateCode',
|
|
1782
2148
|
...requestConfigProp
|
|
@@ -1789,18 +2155,26 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1789
2155
|
modalTableTitle: '选择规则模板',
|
|
1790
2156
|
tableSearchForm,
|
|
1791
2157
|
tableColumns: [
|
|
2158
|
+
{
|
|
2159
|
+
title: '序号',
|
|
2160
|
+
dataIndex: 'keyIndex',
|
|
2161
|
+
defaultSort: 0,
|
|
2162
|
+
},
|
|
1792
2163
|
{
|
|
1793
2164
|
title: '规则模板编码',
|
|
1794
2165
|
dataIndex: 'code',
|
|
2166
|
+
defaultSort: 1,
|
|
1795
2167
|
},
|
|
1796
2168
|
{
|
|
1797
2169
|
title: '规则模板名称',
|
|
1798
2170
|
dataIndex: 'name',
|
|
2171
|
+
defaultSort: 2,
|
|
1799
2172
|
render: (text: any) => handleTextOverflow(text),
|
|
1800
2173
|
},
|
|
1801
2174
|
{
|
|
1802
2175
|
title: '条件对象',
|
|
1803
2176
|
dataIndex: 'objectName',
|
|
2177
|
+
defaultSort: 3,
|
|
1804
2178
|
render: (text: any) => handleTextOverflow(text),
|
|
1805
2179
|
},
|
|
1806
2180
|
{
|
|
@@ -1811,6 +2185,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1811
2185
|
{
|
|
1812
2186
|
dataIndex: 'actionName',
|
|
1813
2187
|
title: '执行动作',
|
|
2188
|
+
defaultSort: 4,
|
|
1814
2189
|
render: (text: any) => handleTextOverflow(text),
|
|
1815
2190
|
},
|
|
1816
2191
|
],
|
|
@@ -1820,6 +2195,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1820
2195
|
|
|
1821
2196
|
// 角色选择器
|
|
1822
2197
|
if(type === 'role') {
|
|
2198
|
+
selectProps = {
|
|
2199
|
+
placeholder: '输入角色编码或名称',
|
|
2200
|
+
renderTableColumns: [
|
|
2201
|
+
{
|
|
2202
|
+
title: '角色编码',
|
|
2203
|
+
dataIndex: 'code',
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
title: '角色名称',
|
|
2207
|
+
dataIndex: 'name',
|
|
2208
|
+
},
|
|
2209
|
+
],
|
|
2210
|
+
...selectConfigProps,
|
|
2211
|
+
}
|
|
1823
2212
|
requestConfig = {
|
|
1824
2213
|
url: `${prefixUrl.selectPrefix}/role`,
|
|
1825
2214
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
@@ -1829,6 +2218,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1829
2218
|
otherParams: {
|
|
1830
2219
|
'qp-status-eq': 10, // 10启用 20禁用
|
|
1831
2220
|
sorter: 'desc-id',
|
|
2221
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1832
2222
|
}, // 默认参数
|
|
1833
2223
|
sourceName: 'roleCode',
|
|
1834
2224
|
...requestConfigProp
|
|
@@ -1863,18 +2253,26 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1863
2253
|
modalTableTitle: '选择角色',
|
|
1864
2254
|
tableSearchForm,
|
|
1865
2255
|
tableColumns: [
|
|
2256
|
+
{
|
|
2257
|
+
title: '序号',
|
|
2258
|
+
dataIndex: 'keyIndex',
|
|
2259
|
+
defaultSort: 0,
|
|
2260
|
+
},
|
|
1866
2261
|
{
|
|
1867
2262
|
title: '角色编码',
|
|
1868
2263
|
dataIndex: 'code',
|
|
2264
|
+
defaultSort: 1,
|
|
1869
2265
|
},
|
|
1870
2266
|
{
|
|
1871
2267
|
title: '角色名称',
|
|
1872
2268
|
dataIndex: 'name',
|
|
2269
|
+
defaultSort: 2,
|
|
1873
2270
|
render: (text: any) => handleTextOverflow(text),
|
|
1874
2271
|
},
|
|
1875
2272
|
{
|
|
1876
2273
|
title: '角色分类',
|
|
1877
2274
|
dataIndex: 'categoryName',
|
|
2275
|
+
defaultSort: 3,
|
|
1878
2276
|
render: (text: any) => handleTextOverflow(text),
|
|
1879
2277
|
},
|
|
1880
2278
|
{
|
|
@@ -1885,6 +2283,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1885
2283
|
{
|
|
1886
2284
|
dataIndex: 'applicationName',
|
|
1887
2285
|
title: '应用',
|
|
2286
|
+
defaultSort: 4,
|
|
1888
2287
|
render: (text: any) => handleTextOverflow(text),
|
|
1889
2288
|
},
|
|
1890
2289
|
],
|
|
@@ -1894,6 +2293,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1894
2293
|
|
|
1895
2294
|
// 销售渠道选择器
|
|
1896
2295
|
if(type === 'market-channel') {
|
|
2296
|
+
selectProps = {
|
|
2297
|
+
placeholder: '输入销售渠道编码或名称',
|
|
2298
|
+
renderTableColumns: [
|
|
2299
|
+
{
|
|
2300
|
+
title: '销售渠道编码',
|
|
2301
|
+
dataIndex: 'code',
|
|
2302
|
+
},
|
|
2303
|
+
{
|
|
2304
|
+
title: '销售渠道名称',
|
|
2305
|
+
dataIndex: 'name',
|
|
2306
|
+
},
|
|
2307
|
+
],
|
|
2308
|
+
...selectConfigProps,
|
|
2309
|
+
}
|
|
1897
2310
|
requestConfig = {
|
|
1898
2311
|
url: `${prefixUrl.selectPrefix}/channelInfo`,
|
|
1899
2312
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
@@ -1905,6 +2318,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1905
2318
|
'qp-isMain-eq': 1,
|
|
1906
2319
|
'qp-status-eq': 10, // 10启用 20禁用
|
|
1907
2320
|
sorter: 'desc-id',
|
|
2321
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1908
2322
|
}, // 默认参数
|
|
1909
2323
|
sourceName: 'marketChannelCode',
|
|
1910
2324
|
...requestConfigProp
|
|
@@ -1940,18 +2354,26 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1940
2354
|
modalTableTitle: '选择销售渠道',
|
|
1941
2355
|
tableSearchForm,
|
|
1942
2356
|
tableColumns: [
|
|
2357
|
+
{
|
|
2358
|
+
title: '序号',
|
|
2359
|
+
dataIndex: 'keyIndex',
|
|
2360
|
+
defaultSort: 0,
|
|
2361
|
+
},
|
|
1943
2362
|
{
|
|
1944
2363
|
title: '销售渠道编码',
|
|
1945
2364
|
dataIndex: 'code',
|
|
2365
|
+
defaultSort: 1,
|
|
1946
2366
|
},
|
|
1947
2367
|
{
|
|
1948
2368
|
title: '销售渠道名称',
|
|
1949
2369
|
dataIndex: 'name',
|
|
2370
|
+
defaultSort: 2,
|
|
1950
2371
|
render: (text: any) => handleTextOverflow(text),
|
|
1951
2372
|
},
|
|
1952
2373
|
{
|
|
1953
2374
|
title: '所属销售组织',
|
|
1954
2375
|
dataIndex: 'salesOrgCodeName',
|
|
2376
|
+
defaultSort: 3,
|
|
1955
2377
|
render: (text: any) => handleTextOverflow(text),
|
|
1956
2378
|
},
|
|
1957
2379
|
],
|
|
@@ -1961,6 +2383,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1961
2383
|
|
|
1962
2384
|
//业务组织选择器(可筛选业务职能/组织类型/组织形态)
|
|
1963
2385
|
if (type === 'business-organization') {
|
|
2386
|
+
selectProps = {
|
|
2387
|
+
placeholder: '输入业务组织编码或名称',
|
|
2388
|
+
renderTableColumns: [
|
|
2389
|
+
{
|
|
2390
|
+
title: '业务组织编码',
|
|
2391
|
+
dataIndex: 'code',
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
title: '业务组织名称',
|
|
2395
|
+
dataIndex: 'name',
|
|
2396
|
+
},
|
|
2397
|
+
],
|
|
2398
|
+
...selectConfigProps,
|
|
2399
|
+
}
|
|
1964
2400
|
requestConfig = {
|
|
1965
2401
|
url: `${prefixUrl.selectPrefix}/orgViewNode/common/pageList`,
|
|
1966
2402
|
filter: 'qp-name-like', // 过滤参数
|
|
@@ -1969,6 +2405,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
1969
2405
|
mappingValueField: 'code',
|
|
1970
2406
|
otherParams: {
|
|
1971
2407
|
sorter: 'desc-createTime',
|
|
2408
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
1972
2409
|
}, // 默认参数
|
|
1973
2410
|
sourceName: 'organizationCode',
|
|
1974
2411
|
...requestConfigProp
|
|
@@ -2030,18 +2467,26 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2030
2467
|
modalTableTitle: '选择组织',
|
|
2031
2468
|
tableSearchForm,
|
|
2032
2469
|
tableColumns: [
|
|
2470
|
+
{
|
|
2471
|
+
title: '序号',
|
|
2472
|
+
dataIndex: 'keyIndex',
|
|
2473
|
+
defaultSort: 0,
|
|
2474
|
+
},
|
|
2033
2475
|
{
|
|
2034
2476
|
title: '组织编码',
|
|
2035
2477
|
dataIndex: 'code',
|
|
2478
|
+
defaultSort: 1,
|
|
2036
2479
|
},
|
|
2037
2480
|
{
|
|
2038
2481
|
title: '组织名称',
|
|
2039
2482
|
dataIndex: 'name',
|
|
2483
|
+
defaultSort: 2,
|
|
2040
2484
|
render: (text: any) => handleTextOverflow(text),
|
|
2041
2485
|
},
|
|
2042
2486
|
{
|
|
2043
2487
|
title: '业务职能',
|
|
2044
2488
|
dataIndex: 'orgViewNameList',
|
|
2489
|
+
defaultSort: 3,
|
|
2045
2490
|
render: (text: any, record: any) => {
|
|
2046
2491
|
const { orgViewNameList = [] } = record;
|
|
2047
2492
|
return orgViewNameList.length ? orgViewNameList.join('/') : '--';
|
|
@@ -2050,6 +2495,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2050
2495
|
{
|
|
2051
2496
|
title: '组织类型',
|
|
2052
2497
|
dataIndex: 'orgType',
|
|
2498
|
+
defaultSort: 4,
|
|
2053
2499
|
render: (text: any) => {
|
|
2054
2500
|
const obj = orgType.find((i: any) => i.value == text);
|
|
2055
2501
|
return obj ? obj.text : '--';
|
|
@@ -2070,6 +2516,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2070
2516
|
|
|
2071
2517
|
// 人员选择器
|
|
2072
2518
|
if(type === 'person') {
|
|
2519
|
+
selectProps = {
|
|
2520
|
+
placeholder: '输入人员编码或名称',
|
|
2521
|
+
renderTableColumns: [
|
|
2522
|
+
{
|
|
2523
|
+
title: '人员编码',
|
|
2524
|
+
dataIndex: 'code',
|
|
2525
|
+
},
|
|
2526
|
+
{
|
|
2527
|
+
title: '人员名称',
|
|
2528
|
+
dataIndex: 'name',
|
|
2529
|
+
},
|
|
2530
|
+
],
|
|
2531
|
+
...selectConfigProps,
|
|
2532
|
+
}
|
|
2073
2533
|
requestConfig = {
|
|
2074
2534
|
url: `${prefixUrl.selectPrefix}/person`,
|
|
2075
2535
|
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
@@ -2077,7 +2537,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2077
2537
|
mappingTextShowKeyField: 'code',
|
|
2078
2538
|
mappingValueField: 'code',
|
|
2079
2539
|
otherParams: {
|
|
2080
|
-
sorter: 'desc-id'
|
|
2540
|
+
sorter: 'desc-id',
|
|
2541
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
2081
2542
|
}, // 默认参数
|
|
2082
2543
|
sourceName: 'personCode',
|
|
2083
2544
|
...requestConfigProp,
|
|
@@ -2091,22 +2552,31 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2091
2552
|
modalTableTitle: '添加人员',
|
|
2092
2553
|
tableSearchForm,
|
|
2093
2554
|
tableColumns: [
|
|
2555
|
+
{
|
|
2556
|
+
title: '序号',
|
|
2557
|
+
dataIndex: 'keyIndex',
|
|
2558
|
+
defaultSort: 0,
|
|
2559
|
+
},
|
|
2094
2560
|
{
|
|
2095
2561
|
title: '姓名',
|
|
2096
2562
|
dataIndex: 'name',
|
|
2563
|
+
defaultSort: 1,
|
|
2097
2564
|
},
|
|
2098
2565
|
{
|
|
2099
2566
|
title: '员工工号',
|
|
2100
2567
|
dataIndex: 'code',
|
|
2568
|
+
defaultSort: 2,
|
|
2101
2569
|
},
|
|
2102
2570
|
{
|
|
2103
2571
|
title: '员工类型',
|
|
2104
2572
|
dataIndex: 'dataSource',
|
|
2573
|
+
defaultSort: 3,
|
|
2105
2574
|
render: (text: number) => personDataSourceType.find((i: any) => i.value == text)?.text,
|
|
2106
2575
|
},
|
|
2107
2576
|
{
|
|
2108
2577
|
title: '手机号',
|
|
2109
2578
|
dataIndex: 'phone',
|
|
2579
|
+
defaultSort: 4,
|
|
2110
2580
|
},
|
|
2111
2581
|
],
|
|
2112
2582
|
...modalTableBusProps
|
|
@@ -2115,7 +2585,22 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2115
2585
|
|
|
2116
2586
|
// 品牌选择器
|
|
2117
2587
|
if(type === 'brand') {
|
|
2588
|
+
selectProps = {
|
|
2589
|
+
placeholder: '输入品牌编码或名称',
|
|
2590
|
+
renderTableColumns: [
|
|
2591
|
+
{
|
|
2592
|
+
title: '品牌编码',
|
|
2593
|
+
dataIndex: 'brandCode',
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
title: '品牌名称',
|
|
2597
|
+
dataIndex: 'name',
|
|
2598
|
+
},
|
|
2599
|
+
],
|
|
2600
|
+
...selectConfigProps,
|
|
2601
|
+
}
|
|
2118
2602
|
requestConfig = {
|
|
2603
|
+
init: true,
|
|
2119
2604
|
url: `${prefixUrl.selectPrefix}/brand/list`,
|
|
2120
2605
|
filter: 'qp-brandCode,name-orGroup,like', // 过滤参数
|
|
2121
2606
|
mappingTextField: 'name',
|
|
@@ -2124,7 +2609,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2124
2609
|
otherParams: {
|
|
2125
2610
|
'ctl-withAuth': true,
|
|
2126
2611
|
'qp-status-in': '1', // 1启用 0禁用
|
|
2127
|
-
sorter: 'desc-id'
|
|
2612
|
+
sorter: 'desc-id',
|
|
2613
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
2128
2614
|
}, // 默认参数
|
|
2129
2615
|
sourceName: 'brandCode',
|
|
2130
2616
|
...requestConfigProp,
|
|
@@ -2137,9 +2623,15 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2137
2623
|
modalTableTitle: '添加品牌',
|
|
2138
2624
|
tableSearchForm,
|
|
2139
2625
|
tableColumns: [
|
|
2626
|
+
{
|
|
2627
|
+
title: '序号',
|
|
2628
|
+
dataIndex: 'keyIndex',
|
|
2629
|
+
defaultSort: 0,
|
|
2630
|
+
},
|
|
2140
2631
|
{
|
|
2141
2632
|
title: '品牌图片',
|
|
2142
2633
|
dataIndex: 'logoUrl',
|
|
2634
|
+
defaultSort: 1,
|
|
2143
2635
|
render: (text: any) => (
|
|
2144
2636
|
<Image.PreviewGroup>
|
|
2145
2637
|
{(text && Object.prototype.toString.call(JSON.parse(text)) === '[object Array]' &&
|
|
@@ -2153,10 +2645,12 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2153
2645
|
{
|
|
2154
2646
|
title: '品牌编码',
|
|
2155
2647
|
dataIndex: 'brandCode',
|
|
2648
|
+
defaultSort: 2,
|
|
2156
2649
|
},
|
|
2157
2650
|
{
|
|
2158
2651
|
title: '品牌中文名',
|
|
2159
2652
|
dataIndex: 'name',
|
|
2653
|
+
defaultSort: 3,
|
|
2160
2654
|
},
|
|
2161
2655
|
{
|
|
2162
2656
|
title: '品牌英文名',
|
|
@@ -2165,6 +2659,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2165
2659
|
{
|
|
2166
2660
|
title: '品牌首字母',
|
|
2167
2661
|
dataIndex: 'brandInitial',
|
|
2662
|
+
defaultSort: 4,
|
|
2168
2663
|
},
|
|
2169
2664
|
{
|
|
2170
2665
|
title: '描述',
|
|
@@ -2177,6 +2672,20 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2177
2672
|
|
|
2178
2673
|
// 价格项选择器
|
|
2179
2674
|
if(type === 'priceItem') {
|
|
2675
|
+
selectProps = {
|
|
2676
|
+
placeholder: '输入价格项编码或名称',
|
|
2677
|
+
renderTableColumns: [
|
|
2678
|
+
{
|
|
2679
|
+
title: '价格项编码',
|
|
2680
|
+
dataIndex: 'code',
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
title: '价格项名称',
|
|
2684
|
+
dataIndex: 'name',
|
|
2685
|
+
},
|
|
2686
|
+
],
|
|
2687
|
+
...selectConfigProps,
|
|
2688
|
+
}
|
|
2180
2689
|
requestConfig = {
|
|
2181
2690
|
url: `${prefixUrl.selectPrefix}/priceType`,
|
|
2182
2691
|
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
@@ -2185,7 +2694,8 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2185
2694
|
mappingValueField: 'code',
|
|
2186
2695
|
otherParams: {
|
|
2187
2696
|
'qp-enabled-eq': true, // true启用 false禁用
|
|
2188
|
-
sorter: 'desc-id'
|
|
2697
|
+
sorter: 'desc-id',
|
|
2698
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
2189
2699
|
}, // 默认参数
|
|
2190
2700
|
sourceName: 'priceCode',
|
|
2191
2701
|
...requestConfigProp,
|
|
@@ -2198,27 +2708,172 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
|
|
|
2198
2708
|
modalTableTitle: '选择价格项',
|
|
2199
2709
|
tableSearchForm,
|
|
2200
2710
|
tableColumns: [
|
|
2711
|
+
{
|
|
2712
|
+
title: '序号',
|
|
2713
|
+
dataIndex: 'keyIndex',
|
|
2714
|
+
defaultSort: 0,
|
|
2715
|
+
},
|
|
2201
2716
|
{
|
|
2202
2717
|
title: '代码',
|
|
2203
2718
|
dataIndex: 'code',
|
|
2719
|
+
defaultSort: 1,
|
|
2204
2720
|
},
|
|
2205
2721
|
{
|
|
2206
2722
|
title: '名称',
|
|
2207
2723
|
dataIndex: 'name',
|
|
2724
|
+
defaultSort: 2,
|
|
2208
2725
|
},
|
|
2209
2726
|
{
|
|
2210
2727
|
title: '创建时间',
|
|
2211
2728
|
dataIndex: 'createTime',
|
|
2729
|
+
defaultSort: 3,
|
|
2212
2730
|
render: (text: any) => handleTooltip(text, true),
|
|
2213
2731
|
},
|
|
2214
2732
|
{
|
|
2215
2733
|
title: '创建人',
|
|
2216
2734
|
dataIndex: 'createUserName',
|
|
2735
|
+
defaultSort: 4,
|
|
2736
|
+
},
|
|
2737
|
+
],
|
|
2738
|
+
...modalTableBusProps
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
// 销售组织
|
|
2743
|
+
if (type === 'sales-organization') {
|
|
2744
|
+
selectProps = {
|
|
2745
|
+
placeholder: '输入销售组织编码或名称',
|
|
2746
|
+
renderTableColumns: [
|
|
2747
|
+
{
|
|
2748
|
+
title: '销售组织编码',
|
|
2749
|
+
dataIndex: 'code',
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
title: '销售组织名称',
|
|
2753
|
+
dataIndex: 'name',
|
|
2754
|
+
},
|
|
2755
|
+
],
|
|
2756
|
+
...selectConfigProps,
|
|
2757
|
+
}
|
|
2758
|
+
requestConfig = {
|
|
2759
|
+
init: true,
|
|
2760
|
+
url: `${prefixUrl.selectPrefix}/orgViewNode/listNoPage`,
|
|
2761
|
+
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
2762
|
+
mappingTextField: 'name',
|
|
2763
|
+
mappingTextShowKeyField: 'code',
|
|
2764
|
+
mappingValueField: 'code',
|
|
2765
|
+
otherParams: {
|
|
2766
|
+
'qp-orgViewCode-eq': 'sales-organizational-view',
|
|
2767
|
+
'qp-status-eq': 10,
|
|
2768
|
+
sorter: 'desc-createTime',
|
|
2769
|
+
...(requestConfigProp?.addOtherParams || {}),
|
|
2770
|
+
}, // 默认参数
|
|
2771
|
+
sourceName: 'supplierCode',
|
|
2772
|
+
...requestConfigProp
|
|
2773
|
+
},
|
|
2774
|
+
tableSearchForm = [
|
|
2775
|
+
{ name: 'qp-name-like', label: '组织名称' },
|
|
2776
|
+
{ name: 'qp-code-like', label: '组织编码' },
|
|
2777
|
+
{ name: 'qp-orgViewCode-in', type: 'select', label: '业务职能', field: {
|
|
2778
|
+
type: 'select',
|
|
2779
|
+
props: {
|
|
2780
|
+
mode: 'multiple',
|
|
2781
|
+
notFoundContent: '暂无数据',
|
|
2782
|
+
allowClear: true,
|
|
2783
|
+
showSearch: true,
|
|
2784
|
+
showArrow: true,
|
|
2785
|
+
maxTagCount: 1,
|
|
2786
|
+
optionFilterProp: 'children',
|
|
2787
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
2788
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
2789
|
+
},
|
|
2790
|
+
}
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
name: 'qp-orgType-in',
|
|
2794
|
+
type: 'select',
|
|
2795
|
+
label: '组织类型',
|
|
2796
|
+
field: {
|
|
2797
|
+
type: 'select',
|
|
2798
|
+
props: {
|
|
2799
|
+
mode: 'multiple',
|
|
2800
|
+
allowClear: true,
|
|
2801
|
+
maxTagCount: 1,
|
|
2802
|
+
},
|
|
2803
|
+
},
|
|
2804
|
+
initialSource: orgType
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
name: 'qp-nodeType-in',
|
|
2808
|
+
type: 'select',
|
|
2809
|
+
label: '组织形态',
|
|
2810
|
+
field: {
|
|
2811
|
+
type: 'select',
|
|
2812
|
+
props: {
|
|
2813
|
+
mode: 'multiple',
|
|
2814
|
+
allowClear: true,
|
|
2815
|
+
maxTagCount: 1,
|
|
2816
|
+
},
|
|
2817
|
+
},
|
|
2818
|
+
initialSource: nodeType
|
|
2819
|
+
}]
|
|
2820
|
+
Promise.all([
|
|
2821
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getOrgViewListNoPage`, {
|
|
2822
|
+
'qp-status-eq': 10
|
|
2823
|
+
}),
|
|
2824
|
+
]).then((x: any)=>{
|
|
2825
|
+
formatSource(x, 0, 2, tableSearchForm);
|
|
2826
|
+
})
|
|
2827
|
+
modalTableProps = {
|
|
2828
|
+
modalTableTitle: '选择组织',
|
|
2829
|
+
tableSearchForm,
|
|
2830
|
+
tableColumns: [
|
|
2831
|
+
{
|
|
2832
|
+
title: '序号',
|
|
2833
|
+
dataIndex: 'keyIndex',
|
|
2834
|
+
defaultSort: 0,
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
title: '组织编码',
|
|
2838
|
+
dataIndex: 'code',
|
|
2839
|
+
defaultSort: 1,
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
title: '组织名称',
|
|
2843
|
+
dataIndex: 'name',
|
|
2844
|
+
defaultSort: 2,
|
|
2845
|
+
render: (text: any) => handleTextOverflow(text),
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
title: '业务职能',
|
|
2849
|
+
dataIndex: 'orgViewNameList',
|
|
2850
|
+
defaultSort: 3,
|
|
2851
|
+
render: (text: any, record: any) => {
|
|
2852
|
+
const { orgViewNameList = [] } = record;
|
|
2853
|
+
return orgViewNameList.length ? orgViewNameList.join('/') : '--';
|
|
2854
|
+
},
|
|
2855
|
+
},
|
|
2856
|
+
{
|
|
2857
|
+
title: '组织类型',
|
|
2858
|
+
dataIndex: 'orgType',
|
|
2859
|
+
defaultSort: 4,
|
|
2860
|
+
render: (text: any) => {
|
|
2861
|
+
const obj = orgType.find((i: any) => i.value == text);
|
|
2862
|
+
return obj ? obj.text : '--';
|
|
2863
|
+
}
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
title: '组织形态',
|
|
2867
|
+
dataIndex: 'nodeType',
|
|
2868
|
+
render: (text: any) => {
|
|
2869
|
+
const obj = nodeType.find((i: any) => i.value == text);
|
|
2870
|
+
return obj ? obj.text : '--';
|
|
2871
|
+
}
|
|
2217
2872
|
},
|
|
2218
2873
|
],
|
|
2219
2874
|
...modalTableBusProps
|
|
2220
2875
|
}
|
|
2221
2876
|
}
|
|
2222
2877
|
|
|
2223
|
-
return { modalTableProps, requestConfig, needModalTable };
|
|
2878
|
+
return { modalTableProps, selectProps, requestConfig, needModalTable };
|
|
2224
2879
|
}
|