@bit-sun/business-component 2.2.0-alpha.2 → 2.2.0-alpha.20
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/dist/components/Business/AddSelectBusiness/index.d.ts +2 -0
- package/dist/components/Business/BsLayouts/utils.d.ts +0 -4
- package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +59 -0
- package/dist/index.esm.js +4221 -2601
- package/dist/index.js +4222 -2600
- package/dist/utils/LocalstorageUtils.d.ts +14 -0
- package/dist/utils/enumConfig.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.md +69 -3
- package/src/components/Business/AddSelectBusiness/index.tsx +494 -3
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +3 -3
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +5 -6
- package/src/components/Business/BsLayouts/index.tsx +20 -16
- package/src/components/Business/BsLayouts/utils.tsx +1 -24
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +107 -63
- package/src/components/Business/BsSulaQueryTable/setting.tsx +1 -1
- package/src/components/Business/CommodityEntry/index.md +1 -1
- package/src/components/Business/DetailPageWrapper/index.tsx +10 -21
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +6 -2
- package/src/components/Business/JsonQueryTable/index.tsx +258 -43
- package/src/components/Business/SearchSelect/BusinessUtils.ts +139 -2
- package/src/components/Business/SearchSelect/index.md +56 -0
- package/src/components/Business/SearchSelect/utils.ts +1 -1
- package/src/components/Business/moreTreeTable/index.md +29 -89
- package/src/components/Business/moreTreeTable/index.tsx +51 -5
- package/src/components/Functional/AddSelect/index.tsx +158 -27
- package/src/components/Functional/DataImport/index.tsx +1 -1
- package/src/components/Functional/DataValidation/index.tsx +1 -1
- package/src/styles/bsDefault.less +6 -0
- package/src/utils/LocalstorageUtils.ts +57 -0
- package/src/utils/enumConfig.ts +1 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/requestUtils.ts +5 -4
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
export declare const setConfigTableColumns: (configvalue: any, tableCode: string) => void;
|
|
2
2
|
export declare const getConfigTableColumns: (tableCode: string) => any;
|
|
3
|
+
export declare const saveTenantList: (data: any) => void;
|
|
4
|
+
export declare const getTenantList: () => any;
|
|
5
|
+
export declare const removeTenantList: () => void;
|
|
6
|
+
export declare const saveCurrentTenantId: (item: string) => void;
|
|
7
|
+
export declare const getCurrentTenantId: () => string | 1;
|
|
8
|
+
export declare const removeCurrentTenantId: () => void;
|
|
9
|
+
export declare function getEmployeeId(): any;
|
|
10
|
+
export declare function getEmployeeCode(): any;
|
|
11
|
+
export declare function getSessionId(): any;
|
|
12
|
+
export declare function getAccountId(): any;
|
|
13
|
+
export declare function getUserId(): any;
|
|
14
|
+
export declare function getAccountID(): any;
|
|
15
|
+
export declare function getUserName(): any;
|
|
16
|
+
export declare function handleUserPhone(): any;
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -5,14 +5,15 @@ nav:
|
|
|
5
5
|
group:
|
|
6
6
|
title: 业务组件
|
|
7
7
|
order: 1
|
|
8
|
-
title:
|
|
8
|
+
title: 商品档案录入器
|
|
9
9
|
order: 1
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# 商品选择录入器
|
|
13
13
|
|
|
14
|
+
## AddSkuSelect
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
### SKU选择录入器
|
|
16
17
|
|
|
17
18
|
```tsx
|
|
18
19
|
import React, { useState } from 'react';
|
|
@@ -61,3 +62,68 @@ export default () => {
|
|
|
61
62
|
);
|
|
62
63
|
};
|
|
63
64
|
```
|
|
65
|
+
|
|
66
|
+
## AddSkcSelect
|
|
67
|
+
|
|
68
|
+
### SKC选择录入器
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import React, { useState } from 'react';
|
|
72
|
+
import { Tabs } from 'antd';
|
|
73
|
+
import { AddSkcSelect } from '../../../index.ts';
|
|
74
|
+
|
|
75
|
+
export default () => {
|
|
76
|
+
const config = {
|
|
77
|
+
buttonText: 'context',
|
|
78
|
+
buttonProps: { disabled: false },
|
|
79
|
+
beforeShowModal: () => {
|
|
80
|
+
return Promise.resolve(true);
|
|
81
|
+
// return Promise.reject('校验有误');
|
|
82
|
+
},
|
|
83
|
+
onSaveCallback: (rows) => {
|
|
84
|
+
console.log('save call', rows);
|
|
85
|
+
return Promise.resolve(true);
|
|
86
|
+
// return Promise.reject('FAILE')
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return (
|
|
90
|
+
<div>
|
|
91
|
+
<AddSkcSelect {...config} />
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## AddSpuSelect
|
|
99
|
+
|
|
100
|
+
### SPU选择录入器
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
import React, { useState } from 'react';
|
|
104
|
+
import { Tabs } from 'antd';
|
|
105
|
+
import { AddSpuSelect } from '../../../index.ts';
|
|
106
|
+
|
|
107
|
+
export default () => {
|
|
108
|
+
const config = {
|
|
109
|
+
buttonText: 'context',
|
|
110
|
+
buttonProps: { disabled: false },
|
|
111
|
+
exceptColumns: ['count', 'categoryText', 'className'],
|
|
112
|
+
tableCodeList: [null,'spuSelect-tableSelectedItemPartCode_ItemLabel'],
|
|
113
|
+
beforeShowModal: () => {
|
|
114
|
+
return Promise.resolve(true);
|
|
115
|
+
// return Promise.reject('校验有误');
|
|
116
|
+
},
|
|
117
|
+
onSaveCallback: (rows) => {
|
|
118
|
+
console.log('save call', rows);
|
|
119
|
+
return Promise.resolve(true);
|
|
120
|
+
// return Promise.reject('FAILE')
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return (
|
|
124
|
+
<div>
|
|
125
|
+
<AddSpuSelect {...config} />
|
|
126
|
+
</div>
|
|
127
|
+
);
|
|
128
|
+
};
|
|
129
|
+
```
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* @LastEditTime: 2022-05-08 21:01:21
|
|
6
6
|
* @LastEditors: rodchen
|
|
7
7
|
*/
|
|
8
|
-
import React, { useState } from 'react';
|
|
9
|
-
import { Tooltip, Select } from 'antd';
|
|
8
|
+
import React, { useState, useEffect } from 'react';
|
|
9
|
+
import { Tooltip, Select, message } from 'antd';
|
|
10
|
+
import axios from 'axios';
|
|
10
11
|
import { AddSelect } from '../../../index';
|
|
11
12
|
import { tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
|
|
12
13
|
import { getSkuImg } from '@/utils/TableUtils';
|
|
@@ -38,6 +39,7 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
38
39
|
mode: 'multiple',
|
|
39
40
|
}
|
|
40
41
|
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
42
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
41
43
|
const initialSelectColumn = [
|
|
42
44
|
{
|
|
43
45
|
title: 'SKU编码',
|
|
@@ -146,7 +148,8 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
146
148
|
setValue(value)
|
|
147
149
|
},
|
|
148
150
|
beforeShowModal: parProps?.beforeShowModal,
|
|
149
|
-
onSaveCallback: parProps.onSaveCallback
|
|
151
|
+
onSaveCallback: parProps.onSaveCallback,
|
|
152
|
+
businessType: 'sku'
|
|
150
153
|
// onSaveCallback: (rows) => {
|
|
151
154
|
// console.log('save call', rows);
|
|
152
155
|
// // return Promise.resolve(true);
|
|
@@ -342,3 +345,491 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
342
345
|
</div>
|
|
343
346
|
);
|
|
344
347
|
};
|
|
348
|
+
|
|
349
|
+
export const AddSkcSelect = (parProps: any) => {
|
|
350
|
+
const selectProps = {
|
|
351
|
+
mode: 'multiple',
|
|
352
|
+
}
|
|
353
|
+
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
354
|
+
const [propertyList, setPropertyList] = useState([]);
|
|
355
|
+
|
|
356
|
+
useEffect(() => {
|
|
357
|
+
// type: 1 尺码组; 2 配码组
|
|
358
|
+
axios.get(`/items/itemPropertyValueGroup/listNoPage?qp-type-eq=2`).then((result: any) => {
|
|
359
|
+
result = result.data;
|
|
360
|
+
if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
|
|
361
|
+
message.error(result.msg);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
const data = result.data || [];
|
|
365
|
+
setPropertyList(data)
|
|
366
|
+
}).catch((err) => {});
|
|
367
|
+
},[])
|
|
368
|
+
|
|
369
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
370
|
+
const initialSelectColumn = [
|
|
371
|
+
{
|
|
372
|
+
title: 'SKC编码',
|
|
373
|
+
width: 150,
|
|
374
|
+
dataIndex: 'code',
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
title: 'SKC名称',
|
|
378
|
+
width: 200,
|
|
379
|
+
ellipsis: {
|
|
380
|
+
showTitle: false,
|
|
381
|
+
},
|
|
382
|
+
render: (text: any) => (
|
|
383
|
+
<Tooltip placement="topLeft" title={text}>
|
|
384
|
+
{text}
|
|
385
|
+
</Tooltip>
|
|
386
|
+
),
|
|
387
|
+
dataIndex: 'name',
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
title: '颜色',
|
|
391
|
+
width: 200,
|
|
392
|
+
ellipsis: {
|
|
393
|
+
showTitle: false,
|
|
394
|
+
},
|
|
395
|
+
render: (text: any) => (
|
|
396
|
+
<Tooltip placement="topLeft" title={text}>
|
|
397
|
+
{text}
|
|
398
|
+
</Tooltip>
|
|
399
|
+
),
|
|
400
|
+
dataIndex: 'colorName',
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
title: '配码',
|
|
404
|
+
dataIndex: 'selectPropertyGroupCode',
|
|
405
|
+
width: 160,
|
|
406
|
+
isSelectItem: true,
|
|
407
|
+
dataSource: propertyList,
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
title: '数量',
|
|
411
|
+
width: 100,
|
|
412
|
+
isInputItem: true,
|
|
413
|
+
dataIndex: 'count',
|
|
414
|
+
},
|
|
415
|
+
]
|
|
416
|
+
const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
|
|
417
|
+
const props = {
|
|
418
|
+
buttonText: parProps.buttonText || '新增',
|
|
419
|
+
buttonProps: parProps.buttonProps || {},
|
|
420
|
+
tableCodeList: parProps.tableCodeList || ['skcSelect-tableOptionsToChoosePartCode','skcSelect-tableSelectedItemPartCode'],
|
|
421
|
+
value,
|
|
422
|
+
// labelInValue: true, // 非必填 默认为false
|
|
423
|
+
requestConfig: {
|
|
424
|
+
url: `/items/skc/skcSelect`,
|
|
425
|
+
filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
|
|
426
|
+
otherParams: {}, // 默认参数
|
|
427
|
+
mappingTextField: 'name',
|
|
428
|
+
mappingValueField: 'code',
|
|
429
|
+
...parProps.requestConfig
|
|
430
|
+
},
|
|
431
|
+
selectProps,
|
|
432
|
+
onChange: (value: any) => {
|
|
433
|
+
console.log(value)
|
|
434
|
+
setValue(value)
|
|
435
|
+
},
|
|
436
|
+
beforeShowModal: parProps?.beforeShowModal,
|
|
437
|
+
onSaveCallback: parProps.onSaveCallback,
|
|
438
|
+
businessType: 'skc',
|
|
439
|
+
isAllowRepeatedSelect: true
|
|
440
|
+
};
|
|
441
|
+
const modalTableProps = {
|
|
442
|
+
modalTableTitle: '选择商品',
|
|
443
|
+
tableSearchForm: [
|
|
444
|
+
{ name: 'qp-code-like', label: 'SKC编码' },
|
|
445
|
+
{ name: 'qp-skcName-like', label: 'SKC名称' },
|
|
446
|
+
{ name: 'qp-itemName-like', label: '商品名称' },
|
|
447
|
+
{ name: 'qp-colorName-in', type: 'select', label: '颜色', field: {
|
|
448
|
+
type: 'select',
|
|
449
|
+
props: {
|
|
450
|
+
mode: 'multiple',
|
|
451
|
+
notFoundContent: '暂无数据',
|
|
452
|
+
allowClear: true,
|
|
453
|
+
showSearch: true,
|
|
454
|
+
showArrow: true,
|
|
455
|
+
maxTagCount: 1,
|
|
456
|
+
optionFilterProp: 'children',
|
|
457
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
458
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
459
|
+
},
|
|
460
|
+
} },
|
|
461
|
+
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
462
|
+
type: 'treeSelect',
|
|
463
|
+
props: {
|
|
464
|
+
treeData: [],
|
|
465
|
+
treeCheckable: true,
|
|
466
|
+
showSearch: true,
|
|
467
|
+
allowClear: true,
|
|
468
|
+
showArrow: true,
|
|
469
|
+
treeNodeFilterProp: 'title',
|
|
470
|
+
treeDefaultExpandAll: true,
|
|
471
|
+
maxTagCount: 1,
|
|
472
|
+
placeholder: '请选择',
|
|
473
|
+
style: {
|
|
474
|
+
width: '100%',
|
|
475
|
+
},
|
|
476
|
+
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
477
|
+
},
|
|
478
|
+
} },
|
|
479
|
+
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
480
|
+
type: 'select',
|
|
481
|
+
props: {
|
|
482
|
+
mode: 'multiple',
|
|
483
|
+
notFoundContent: '暂无数据',
|
|
484
|
+
allowClear: true,
|
|
485
|
+
showSearch: true,
|
|
486
|
+
showArrow: true,
|
|
487
|
+
maxTagCount: 1,
|
|
488
|
+
optionFilterProp: 'children',
|
|
489
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
490
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
491
|
+
},
|
|
492
|
+
} },
|
|
493
|
+
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
494
|
+
type: 'select',
|
|
495
|
+
props: {
|
|
496
|
+
mode: 'multiple',
|
|
497
|
+
notFoundContent: '暂无数据',
|
|
498
|
+
allowClear: true,
|
|
499
|
+
showSearch: true,
|
|
500
|
+
showArrow: true,
|
|
501
|
+
maxTagCount: 1,
|
|
502
|
+
optionFilterProp: 'children',
|
|
503
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
504
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
505
|
+
},
|
|
506
|
+
} },
|
|
507
|
+
],
|
|
508
|
+
tableColumns: [
|
|
509
|
+
{
|
|
510
|
+
title: 'SKC编码',
|
|
511
|
+
width: 150,
|
|
512
|
+
dataIndex: 'code',
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
title: 'SKC名称',
|
|
516
|
+
width: 200,
|
|
517
|
+
ellipsis: {
|
|
518
|
+
showTitle: false,
|
|
519
|
+
},
|
|
520
|
+
render: (text: any) => (
|
|
521
|
+
<Tooltip placement="topLeft" title={text}>
|
|
522
|
+
{text}
|
|
523
|
+
</Tooltip>
|
|
524
|
+
),
|
|
525
|
+
dataIndex: 'name',
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
title: '商品名称',
|
|
529
|
+
width: 100,
|
|
530
|
+
ellipsis: {
|
|
531
|
+
showTitle: false,
|
|
532
|
+
},
|
|
533
|
+
dataIndex: 'itemName',
|
|
534
|
+
render: (text: any) => (
|
|
535
|
+
<Tooltip placement="topLeft" title={text}>
|
|
536
|
+
{text}
|
|
537
|
+
</Tooltip>
|
|
538
|
+
),
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
title: '颜色',
|
|
542
|
+
width: 100,
|
|
543
|
+
ellipsis: {
|
|
544
|
+
showTitle: false,
|
|
545
|
+
},
|
|
546
|
+
render: (text: any) => (
|
|
547
|
+
<Tooltip placement="topLeft" title={text}>
|
|
548
|
+
{text}
|
|
549
|
+
</Tooltip>
|
|
550
|
+
),
|
|
551
|
+
dataIndex: 'colorName',
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
title: '类目',
|
|
555
|
+
width: 100,
|
|
556
|
+
ellipsis: {
|
|
557
|
+
showTitle: false,
|
|
558
|
+
},
|
|
559
|
+
render: (text: any) => (
|
|
560
|
+
<Tooltip placement="topLeft" title={text}>
|
|
561
|
+
{text}
|
|
562
|
+
</Tooltip>
|
|
563
|
+
),
|
|
564
|
+
dataIndex: 'categoryName',
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
title: '品类',
|
|
568
|
+
width: 100,
|
|
569
|
+
ellipsis: {
|
|
570
|
+
showTitle: false,
|
|
571
|
+
},
|
|
572
|
+
render: (text: any) => (
|
|
573
|
+
<Tooltip placement="topLeft" title={text}>
|
|
574
|
+
{text}
|
|
575
|
+
</Tooltip>
|
|
576
|
+
),
|
|
577
|
+
dataIndex: 'className',
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
title: '品牌',
|
|
581
|
+
width: 100,
|
|
582
|
+
ellipsis: {
|
|
583
|
+
showTitle: false,
|
|
584
|
+
},
|
|
585
|
+
render: (text: any) => (
|
|
586
|
+
<Tooltip placement="topLeft" title={text}>
|
|
587
|
+
{text}
|
|
588
|
+
</Tooltip>
|
|
589
|
+
),
|
|
590
|
+
dataIndex: 'brandName',
|
|
591
|
+
},
|
|
592
|
+
],
|
|
593
|
+
selectColumn: mTpSelectColumn,
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
return (
|
|
597
|
+
<div>
|
|
598
|
+
<AddSelect
|
|
599
|
+
{...props}
|
|
600
|
+
modalTableProps={modalTableProps}
|
|
601
|
+
/>
|
|
602
|
+
</div>
|
|
603
|
+
);
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
export const AddSpuSelect = (parProps: any) => {
|
|
607
|
+
const selectProps = {
|
|
608
|
+
mode: 'multiple',
|
|
609
|
+
}
|
|
610
|
+
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
611
|
+
//注⚠️:自定义过表头的请记得传tableCodeList参数
|
|
612
|
+
const initialSelectColumn = [
|
|
613
|
+
{
|
|
614
|
+
title: '商品编码',
|
|
615
|
+
width: 150,
|
|
616
|
+
dataIndex: 'itemCode',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
title: '商品名称',
|
|
620
|
+
width: 200,
|
|
621
|
+
ellipsis: {
|
|
622
|
+
showTitle: false,
|
|
623
|
+
},
|
|
624
|
+
render: (text: any) => (
|
|
625
|
+
<Tooltip placement="topLeft" title={text}>
|
|
626
|
+
{text}
|
|
627
|
+
</Tooltip>
|
|
628
|
+
),
|
|
629
|
+
dataIndex: 'name',
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
title: '数量',
|
|
633
|
+
width: 100,
|
|
634
|
+
isInputItem: true,
|
|
635
|
+
dataIndex: 'count',
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
title: '所属组织',
|
|
639
|
+
dataIndex: 'ownOrgSignName',
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
title: '品牌',
|
|
643
|
+
dataIndex: 'brandName',
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
title: '类目',
|
|
647
|
+
dataIndex: 'categoryText',
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
title: '品类',
|
|
651
|
+
dataIndex: 'className',
|
|
652
|
+
},
|
|
653
|
+
]
|
|
654
|
+
const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
|
|
655
|
+
const props = {
|
|
656
|
+
buttonText: parProps.buttonText || '新增',
|
|
657
|
+
buttonProps: parProps.buttonProps || {},
|
|
658
|
+
tableCodeList: parProps.tableCodeList || [],
|
|
659
|
+
value,
|
|
660
|
+
// labelInValue: true, // 非必填 默认为false
|
|
661
|
+
requestConfig: {
|
|
662
|
+
url: `/items/item`,
|
|
663
|
+
filter: 'qp-itemCode,name-orGroup,like', // 过滤参数
|
|
664
|
+
otherParams: {
|
|
665
|
+
'qp-approveStatus-eq': 1, // 审核状态(0.待审批;1.审批通过;2.驳回;3.审批未通过)
|
|
666
|
+
sorter: 'desc-id'
|
|
667
|
+
}, // 默认参数
|
|
668
|
+
mappingTextField: 'name',
|
|
669
|
+
mappingValueField: 'itemCode',
|
|
670
|
+
...parProps.requestConfig
|
|
671
|
+
},
|
|
672
|
+
selectProps,
|
|
673
|
+
onChange: (value: any) => {
|
|
674
|
+
console.log(value)
|
|
675
|
+
setValue(value)
|
|
676
|
+
},
|
|
677
|
+
beforeShowModal: parProps?.beforeShowModal,
|
|
678
|
+
onSaveCallback: parProps.onSaveCallback,
|
|
679
|
+
businessType: 'spu',
|
|
680
|
+
// onSaveCallback: (rows) => {
|
|
681
|
+
// console.log('save call', rows);
|
|
682
|
+
// // return Promise.resolve(true);
|
|
683
|
+
// // return Promise.reject('FAILE')
|
|
684
|
+
// }
|
|
685
|
+
};
|
|
686
|
+
const modalTableProps = {
|
|
687
|
+
modalTableTitle: '选择商品',
|
|
688
|
+
tableSearchForm: [
|
|
689
|
+
{ name: 'qp-itemCode-like', label: '商品编码' },
|
|
690
|
+
{ name: 'qp-name-like', label: '商品名称' },
|
|
691
|
+
{ name: 'qp-ownOrgSign-in', type: 'select', label: '所属组织', field: {
|
|
692
|
+
type: 'select',
|
|
693
|
+
props: {
|
|
694
|
+
mode: 'multiple',
|
|
695
|
+
notFoundContent: '暂无数据',
|
|
696
|
+
allowClear: true,
|
|
697
|
+
showSearch: true,
|
|
698
|
+
showArrow: true,
|
|
699
|
+
maxTagCount: 1,
|
|
700
|
+
optionFilterProp: 'children',
|
|
701
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
702
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
703
|
+
},
|
|
704
|
+
} },
|
|
705
|
+
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
706
|
+
type: 'select',
|
|
707
|
+
props: {
|
|
708
|
+
mode: 'multiple',
|
|
709
|
+
notFoundContent: '暂无数据',
|
|
710
|
+
allowClear: true,
|
|
711
|
+
showSearch: true,
|
|
712
|
+
showArrow: true,
|
|
713
|
+
maxTagCount: 1,
|
|
714
|
+
optionFilterProp: 'children',
|
|
715
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
716
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
717
|
+
},
|
|
718
|
+
} },
|
|
719
|
+
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
720
|
+
type: 'treeSelect',
|
|
721
|
+
props: {
|
|
722
|
+
treeData: [],
|
|
723
|
+
treeCheckable: true,
|
|
724
|
+
showSearch: true,
|
|
725
|
+
allowClear: true,
|
|
726
|
+
showArrow: true,
|
|
727
|
+
treeNodeFilterProp: 'title',
|
|
728
|
+
treeDefaultExpandAll: true,
|
|
729
|
+
maxTagCount: 1,
|
|
730
|
+
placeholder: '请选择',
|
|
731
|
+
style: {
|
|
732
|
+
width: '100%',
|
|
733
|
+
},
|
|
734
|
+
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
735
|
+
},
|
|
736
|
+
} },
|
|
737
|
+
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
738
|
+
type: 'select',
|
|
739
|
+
props: {
|
|
740
|
+
mode: 'multiple',
|
|
741
|
+
notFoundContent: '暂无数据',
|
|
742
|
+
allowClear: true,
|
|
743
|
+
showSearch: true,
|
|
744
|
+
showArrow: true,
|
|
745
|
+
maxTagCount: 1,
|
|
746
|
+
optionFilterProp: 'children',
|
|
747
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
748
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
749
|
+
},
|
|
750
|
+
} },
|
|
751
|
+
],
|
|
752
|
+
tableColumns: [
|
|
753
|
+
{
|
|
754
|
+
title: '商品编码',
|
|
755
|
+
width: 150,
|
|
756
|
+
dataIndex: 'itemCode',
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
title: '商品名称',
|
|
760
|
+
width: 200,
|
|
761
|
+
ellipsis: {
|
|
762
|
+
showTitle: false,
|
|
763
|
+
},
|
|
764
|
+
render: (text: any) => (
|
|
765
|
+
<Tooltip placement="topLeft" title={text}>
|
|
766
|
+
{text}
|
|
767
|
+
</Tooltip>
|
|
768
|
+
),
|
|
769
|
+
dataIndex: 'name',
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
title: '所属组织',
|
|
773
|
+
width: 100,
|
|
774
|
+
ellipsis: {
|
|
775
|
+
showTitle: false,
|
|
776
|
+
},
|
|
777
|
+
render: (text: any) => (
|
|
778
|
+
<Tooltip placement="topLeft" title={text}>
|
|
779
|
+
{text}
|
|
780
|
+
</Tooltip>
|
|
781
|
+
),
|
|
782
|
+
dataIndex: 'ownOrgSignName',
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
title: '品牌',
|
|
786
|
+
width: 100,
|
|
787
|
+
ellipsis: {
|
|
788
|
+
showTitle: false,
|
|
789
|
+
},
|
|
790
|
+
render: (text: any) => (
|
|
791
|
+
<Tooltip placement="topLeft" title={text}>
|
|
792
|
+
{text}
|
|
793
|
+
</Tooltip>
|
|
794
|
+
),
|
|
795
|
+
dataIndex: 'brandName',
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
title: '类目',
|
|
799
|
+
width: 100,
|
|
800
|
+
ellipsis: {
|
|
801
|
+
showTitle: false,
|
|
802
|
+
},
|
|
803
|
+
render: (text: any) => (
|
|
804
|
+
<Tooltip placement="topLeft" title={text}>
|
|
805
|
+
{text}
|
|
806
|
+
</Tooltip>
|
|
807
|
+
),
|
|
808
|
+
dataIndex: 'categoryName',
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
title: '品类',
|
|
812
|
+
width: 100,
|
|
813
|
+
ellipsis: {
|
|
814
|
+
showTitle: false,
|
|
815
|
+
},
|
|
816
|
+
render: (text: any) => (
|
|
817
|
+
<Tooltip placement="topLeft" title={text}>
|
|
818
|
+
{text}
|
|
819
|
+
</Tooltip>
|
|
820
|
+
),
|
|
821
|
+
dataIndex: 'className',
|
|
822
|
+
},
|
|
823
|
+
],
|
|
824
|
+
selectColumn: mTpSelectColumn
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
return (
|
|
828
|
+
<div>
|
|
829
|
+
<AddSelect
|
|
830
|
+
{...props}
|
|
831
|
+
modalTableProps={modalTableProps}
|
|
832
|
+
/>
|
|
833
|
+
</div>
|
|
834
|
+
);
|
|
835
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Form, Input, Button, Modal } from 'antd';
|
|
4
|
-
import {
|
|
4
|
+
import { getAccountID, getUserId } from '@/utils/LocalstorageUtils';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
|
|
7
7
|
export default (props: any) => {
|
|
@@ -21,7 +21,7 @@ export default (props: any) => {
|
|
|
21
21
|
onClick={() => {
|
|
22
22
|
form.validateFields().then((res) => {
|
|
23
23
|
axios({
|
|
24
|
-
url: `/bop/api/account/changePassWord/${
|
|
24
|
+
url: `/bop/api/account/changePassWord/${getAccountID()}`,
|
|
25
25
|
method: 'patch',
|
|
26
26
|
params: res,
|
|
27
27
|
}).then(res => {
|
|
@@ -41,7 +41,7 @@ export default (props: any) => {
|
|
|
41
41
|
labelCol={{ span: 4 }}
|
|
42
42
|
wrapperCol={{ span: 20 }}
|
|
43
43
|
initialValues={{
|
|
44
|
-
username:
|
|
44
|
+
username: getUserId(),
|
|
45
45
|
}}
|
|
46
46
|
>
|
|
47
47
|
<Form.Item label="账号" name="username">
|