@bit-sun/business-component 2.4.31-alpha.9 → 2.4.31
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/index.d.ts +0 -1
- package/dist/index.esm.js +823 -862
- package/dist/index.js +822 -864
- package/dist/utils/auth.d.ts +0 -1
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +5 -8
- package/src/components/Business/AddSelectBusiness/index.md +0 -236
- package/src/components/Business/AddSelectBusiness/index.tsx +296 -333
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +1 -0
- package/src/components/Business/BsLayouts/index.tsx +23 -111
- package/src/components/Business/BsLayouts/utils.tsx +0 -2
- package/src/components/Business/BsSulaQueryTable/index.tsx +90 -44
- package/src/components/Business/CommodityEntry/index.md +1 -15
- package/src/components/Business/CommodityEntry/index.tsx +0 -1
- package/src/components/Business/DetailPageWrapper/index.tsx +1 -2
- package/src/components/Business/SearchSelect/index.md +1 -10
- package/src/components/Functional/AddSelect/helps.ts +1 -1
- package/src/components/Functional/AddSelect/index.tsx +223 -63
- package/src/components/Functional/DataImport/index.tsx +30 -35
- package/src/components/Functional/DataValidation/index.md +2 -15
- package/src/components/Functional/DataValidation/index.tsx +26 -39
- package/src/components/Functional/SearchSelect/index.tsx +1 -1
- package/src/index.ts +0 -1
- package/src/utils/auth.ts +1 -7
- package/dist/components/Functional/AccessWrapper/index.d.ts +0 -5
- package/dist/components/Functional/AuthButton/index.d.ts +0 -3
- package/src/components/Functional/AccessWrapper/index.tsx +0 -34
- package/src/components/Functional/AuthButton/index.tsx +0 -15
|
@@ -17,36 +17,10 @@ import { getEmployeeId } from '@/utils/LocalstorageUtils';
|
|
|
17
17
|
|
|
18
18
|
function handleSelectColumn(c: any, parentProps: any) {
|
|
19
19
|
let result = c;
|
|
20
|
-
const showColumns = parentProps?.showColumns ||
|
|
21
|
-
const exceptColumns = parentProps?.exceptColumns ||
|
|
22
|
-
const coverColumns = parentProps?.coverColumns ||
|
|
23
|
-
const additionColumns = parentProps?.additionColumns ||
|
|
24
|
-
// 仅展示内容
|
|
25
|
-
if(showColumns?.length) {
|
|
26
|
-
result = result.filter((i: any) => showColumns.includes(i.dataIndex))
|
|
27
|
-
}
|
|
28
|
-
// 过滤不需要展示内容
|
|
29
|
-
if(exceptColumns?.length) {
|
|
30
|
-
result = result.filter((i: any) => !exceptColumns.includes(i.dataIndex))
|
|
31
|
-
}
|
|
32
|
-
// 追加(最好不用这个,当组件不固定时候会有影响)
|
|
33
|
-
if(additionColumns?.length) {
|
|
34
|
-
additionColumns.forEach((i: any) => {
|
|
35
|
-
result.splice(i.position,0,i.column)
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
// 覆盖内容
|
|
39
|
-
if(coverColumns?.length) {
|
|
40
|
-
result = coverColumns;
|
|
41
|
-
}
|
|
42
|
-
return result
|
|
43
|
-
}
|
|
44
|
-
function handleTableColumn(c: any, parentProps: any) {
|
|
45
|
-
let result = c;
|
|
46
|
-
const showColumns = parentProps?.showColumns || parentProps?.showTableColumns || [];
|
|
47
|
-
const exceptColumns = parentProps?.exceptColumns || parentProps?.exceptTableColumns || [];
|
|
48
|
-
const coverColumns = parentProps?.coverColumns || parentProps?.coverTableColumns || [];
|
|
49
|
-
const additionColumns = parentProps?.additionColumns || parentProps?.additionTableColumns || [];
|
|
20
|
+
const showColumns = parentProps?.showColumns || [];
|
|
21
|
+
const exceptColumns = parentProps?.exceptColumns || [];
|
|
22
|
+
const coverColumns = parentProps?.coverColumns || [];
|
|
23
|
+
const additionColumns = parentProps?.additionColumns || [];
|
|
50
24
|
// 仅展示内容
|
|
51
25
|
if(showColumns?.length) {
|
|
52
26
|
result = result.filter((i: any) => showColumns.includes(i.dataIndex))
|
|
@@ -356,7 +330,7 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
356
330
|
dataIndex: 'brandName',
|
|
357
331
|
},
|
|
358
332
|
]
|
|
359
|
-
const mTpTableColumn =
|
|
333
|
+
const mTpTableColumn = handleSelectColumn(initialTableColumn, parProps);
|
|
360
334
|
const initialTableSearchForm = [
|
|
361
335
|
{
|
|
362
336
|
name: 'qp-skuCode-like', label: 'SKU编码'
|
|
@@ -429,7 +403,6 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
429
403
|
},
|
|
430
404
|
]
|
|
431
405
|
const mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
432
|
-
|
|
433
406
|
const props = {
|
|
434
407
|
buttonText: parProps.buttonText || '新增',
|
|
435
408
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -461,7 +434,7 @@ export const AddSkuSelect = (parProps: any) => {
|
|
|
461
434
|
isAllowRepeatedSelect: !!parProps?.isAllowRepeatedSelect,
|
|
462
435
|
};
|
|
463
436
|
const modalTableProps = {
|
|
464
|
-
modalTableTitle:
|
|
437
|
+
modalTableTitle: '选择商品',
|
|
465
438
|
tableSearchForm: mTpTableSearchForm,
|
|
466
439
|
tableColumns: mTpTableColumn,
|
|
467
440
|
selectColumn: mTpSelectColumn,
|
|
@@ -546,158 +519,6 @@ export const AddSkcSelect = (parProps: any) => {
|
|
|
546
519
|
},
|
|
547
520
|
]
|
|
548
521
|
const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
|
|
549
|
-
const initialTableColumn = [
|
|
550
|
-
{
|
|
551
|
-
title: 'SKC编码',
|
|
552
|
-
width: 150,
|
|
553
|
-
dataIndex: 'code',
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
title: 'SKC名称',
|
|
557
|
-
width: 200,
|
|
558
|
-
ellipsis: {
|
|
559
|
-
showTitle: false,
|
|
560
|
-
},
|
|
561
|
-
render: (text: any) => (
|
|
562
|
-
<Tooltip placement="topLeft" title={text}>
|
|
563
|
-
{text}
|
|
564
|
-
</Tooltip>
|
|
565
|
-
),
|
|
566
|
-
dataIndex: 'name',
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
title: '商品名称',
|
|
570
|
-
width: 100,
|
|
571
|
-
ellipsis: {
|
|
572
|
-
showTitle: false,
|
|
573
|
-
},
|
|
574
|
-
dataIndex: 'itemName',
|
|
575
|
-
render: (text: any) => (
|
|
576
|
-
<Tooltip placement="topLeft" title={text}>
|
|
577
|
-
{text}
|
|
578
|
-
</Tooltip>
|
|
579
|
-
),
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
title: '颜色',
|
|
583
|
-
width: 100,
|
|
584
|
-
ellipsis: {
|
|
585
|
-
showTitle: false,
|
|
586
|
-
},
|
|
587
|
-
render: (text: any) => (
|
|
588
|
-
<Tooltip placement="topLeft" title={text}>
|
|
589
|
-
{text}
|
|
590
|
-
</Tooltip>
|
|
591
|
-
),
|
|
592
|
-
dataIndex: 'colorName',
|
|
593
|
-
},
|
|
594
|
-
{
|
|
595
|
-
title: '类目',
|
|
596
|
-
width: 100,
|
|
597
|
-
ellipsis: {
|
|
598
|
-
showTitle: false,
|
|
599
|
-
},
|
|
600
|
-
render: (text: any) => (
|
|
601
|
-
<Tooltip placement="topLeft" title={text}>
|
|
602
|
-
{text}
|
|
603
|
-
</Tooltip>
|
|
604
|
-
),
|
|
605
|
-
dataIndex: 'categoryName',
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
title: '品类',
|
|
609
|
-
width: 100,
|
|
610
|
-
ellipsis: {
|
|
611
|
-
showTitle: false,
|
|
612
|
-
},
|
|
613
|
-
render: (text: any) => (
|
|
614
|
-
<Tooltip placement="topLeft" title={text}>
|
|
615
|
-
{text}
|
|
616
|
-
</Tooltip>
|
|
617
|
-
),
|
|
618
|
-
dataIndex: 'className',
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
title: '品牌',
|
|
622
|
-
width: 100,
|
|
623
|
-
ellipsis: {
|
|
624
|
-
showTitle: false,
|
|
625
|
-
},
|
|
626
|
-
render: (text: any) => (
|
|
627
|
-
<Tooltip placement="topLeft" title={text}>
|
|
628
|
-
{text}
|
|
629
|
-
</Tooltip>
|
|
630
|
-
),
|
|
631
|
-
dataIndex: 'brandName',
|
|
632
|
-
},
|
|
633
|
-
]
|
|
634
|
-
const mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
|
|
635
|
-
const initialTableSearchForm = [
|
|
636
|
-
{ name: 'qp-code-like', label: 'SKC编码' },
|
|
637
|
-
{ name: 'qp-skcName-like', label: 'SKC名称' },
|
|
638
|
-
{ name: 'qp-itemName-like', label: '商品名称' },
|
|
639
|
-
{ name: 'qp-colorName-in', type: 'select', label: '颜色', field: {
|
|
640
|
-
type: 'select',
|
|
641
|
-
props: {
|
|
642
|
-
mode: 'multiple',
|
|
643
|
-
notFoundContent: '暂无数据',
|
|
644
|
-
allowClear: true,
|
|
645
|
-
showSearch: true,
|
|
646
|
-
showArrow: true,
|
|
647
|
-
maxTagCount: 1,
|
|
648
|
-
optionFilterProp: 'children',
|
|
649
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
650
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
651
|
-
},
|
|
652
|
-
} },
|
|
653
|
-
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
654
|
-
type: 'treeSelect',
|
|
655
|
-
props: {
|
|
656
|
-
treeData: [],
|
|
657
|
-
treeCheckable: true,
|
|
658
|
-
showSearch: true,
|
|
659
|
-
allowClear: true,
|
|
660
|
-
showArrow: true,
|
|
661
|
-
treeNodeFilterProp: 'title',
|
|
662
|
-
treeDefaultExpandAll: true,
|
|
663
|
-
maxTagCount: 1,
|
|
664
|
-
placeholder: '请选择',
|
|
665
|
-
style: {
|
|
666
|
-
width: '100%',
|
|
667
|
-
},
|
|
668
|
-
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
669
|
-
},
|
|
670
|
-
} },
|
|
671
|
-
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
672
|
-
type: 'select',
|
|
673
|
-
props: {
|
|
674
|
-
mode: 'multiple',
|
|
675
|
-
notFoundContent: '暂无数据',
|
|
676
|
-
allowClear: true,
|
|
677
|
-
showSearch: true,
|
|
678
|
-
showArrow: true,
|
|
679
|
-
maxTagCount: 1,
|
|
680
|
-
optionFilterProp: 'children',
|
|
681
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
682
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
683
|
-
},
|
|
684
|
-
} },
|
|
685
|
-
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
686
|
-
type: 'select',
|
|
687
|
-
props: {
|
|
688
|
-
mode: 'multiple',
|
|
689
|
-
notFoundContent: '暂无数据',
|
|
690
|
-
allowClear: true,
|
|
691
|
-
showSearch: true,
|
|
692
|
-
showArrow: true,
|
|
693
|
-
maxTagCount: 1,
|
|
694
|
-
optionFilterProp: 'children',
|
|
695
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
696
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
697
|
-
},
|
|
698
|
-
} },
|
|
699
|
-
];
|
|
700
|
-
const mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
|
|
701
522
|
const initialPromiseLoadList = [
|
|
702
523
|
{
|
|
703
524
|
url: `/items/item/propertyValue/sizeBySkcConfig`,
|
|
@@ -741,7 +562,6 @@ export const AddSkcSelect = (parProps: any) => {
|
|
|
741
562
|
resKeyValue: ['id','name']
|
|
742
563
|
},
|
|
743
564
|
]
|
|
744
|
-
const mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
745
565
|
const props = {
|
|
746
566
|
buttonText: parProps.buttonText || '新增',
|
|
747
567
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -770,11 +590,159 @@ export const AddSkcSelect = (parProps: any) => {
|
|
|
770
590
|
isAllowRepeatedSelect: parProps?.isAllowRepeatedSelect!==undefined ? !!parProps?.isAllowRepeatedSelect : true, // 默认开启一行选多次
|
|
771
591
|
};
|
|
772
592
|
const modalTableProps = {
|
|
773
|
-
modalTableTitle:
|
|
774
|
-
tableSearchForm:
|
|
775
|
-
|
|
593
|
+
modalTableTitle: '选择商品',
|
|
594
|
+
tableSearchForm: [
|
|
595
|
+
{ name: 'qp-code-like', label: 'SKC编码' },
|
|
596
|
+
{ name: 'qp-skcName-like', label: 'SKC名称' },
|
|
597
|
+
{ name: 'qp-itemName-like', label: '商品名称' },
|
|
598
|
+
{ name: 'qp-colorName-in', type: 'select', label: '颜色', field: {
|
|
599
|
+
type: 'select',
|
|
600
|
+
props: {
|
|
601
|
+
mode: 'multiple',
|
|
602
|
+
notFoundContent: '暂无数据',
|
|
603
|
+
allowClear: true,
|
|
604
|
+
showSearch: true,
|
|
605
|
+
showArrow: true,
|
|
606
|
+
maxTagCount: 1,
|
|
607
|
+
optionFilterProp: 'children',
|
|
608
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
609
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
610
|
+
},
|
|
611
|
+
} },
|
|
612
|
+
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
613
|
+
type: 'treeSelect',
|
|
614
|
+
props: {
|
|
615
|
+
treeData: [],
|
|
616
|
+
treeCheckable: true,
|
|
617
|
+
showSearch: true,
|
|
618
|
+
allowClear: true,
|
|
619
|
+
showArrow: true,
|
|
620
|
+
treeNodeFilterProp: 'title',
|
|
621
|
+
treeDefaultExpandAll: true,
|
|
622
|
+
maxTagCount: 1,
|
|
623
|
+
placeholder: '请选择',
|
|
624
|
+
style: {
|
|
625
|
+
width: '100%',
|
|
626
|
+
},
|
|
627
|
+
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
628
|
+
},
|
|
629
|
+
} },
|
|
630
|
+
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
631
|
+
type: 'select',
|
|
632
|
+
props: {
|
|
633
|
+
mode: 'multiple',
|
|
634
|
+
notFoundContent: '暂无数据',
|
|
635
|
+
allowClear: true,
|
|
636
|
+
showSearch: true,
|
|
637
|
+
showArrow: true,
|
|
638
|
+
maxTagCount: 1,
|
|
639
|
+
optionFilterProp: 'children',
|
|
640
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
641
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
642
|
+
},
|
|
643
|
+
} },
|
|
644
|
+
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
645
|
+
type: 'select',
|
|
646
|
+
props: {
|
|
647
|
+
mode: 'multiple',
|
|
648
|
+
notFoundContent: '暂无数据',
|
|
649
|
+
allowClear: true,
|
|
650
|
+
showSearch: true,
|
|
651
|
+
showArrow: true,
|
|
652
|
+
maxTagCount: 1,
|
|
653
|
+
optionFilterProp: 'children',
|
|
654
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
655
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
656
|
+
},
|
|
657
|
+
} },
|
|
658
|
+
],
|
|
659
|
+
tableColumns: [
|
|
660
|
+
{
|
|
661
|
+
title: 'SKC编码',
|
|
662
|
+
width: 150,
|
|
663
|
+
dataIndex: 'code',
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
title: 'SKC名称',
|
|
667
|
+
width: 200,
|
|
668
|
+
ellipsis: {
|
|
669
|
+
showTitle: false,
|
|
670
|
+
},
|
|
671
|
+
render: (text: any) => (
|
|
672
|
+
<Tooltip placement="topLeft" title={text}>
|
|
673
|
+
{text}
|
|
674
|
+
</Tooltip>
|
|
675
|
+
),
|
|
676
|
+
dataIndex: 'name',
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
title: '商品名称',
|
|
680
|
+
width: 100,
|
|
681
|
+
ellipsis: {
|
|
682
|
+
showTitle: false,
|
|
683
|
+
},
|
|
684
|
+
dataIndex: 'itemName',
|
|
685
|
+
render: (text: any) => (
|
|
686
|
+
<Tooltip placement="topLeft" title={text}>
|
|
687
|
+
{text}
|
|
688
|
+
</Tooltip>
|
|
689
|
+
),
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
title: '颜色',
|
|
693
|
+
width: 100,
|
|
694
|
+
ellipsis: {
|
|
695
|
+
showTitle: false,
|
|
696
|
+
},
|
|
697
|
+
render: (text: any) => (
|
|
698
|
+
<Tooltip placement="topLeft" title={text}>
|
|
699
|
+
{text}
|
|
700
|
+
</Tooltip>
|
|
701
|
+
),
|
|
702
|
+
dataIndex: 'colorName',
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
title: '类目',
|
|
706
|
+
width: 100,
|
|
707
|
+
ellipsis: {
|
|
708
|
+
showTitle: false,
|
|
709
|
+
},
|
|
710
|
+
render: (text: any) => (
|
|
711
|
+
<Tooltip placement="topLeft" title={text}>
|
|
712
|
+
{text}
|
|
713
|
+
</Tooltip>
|
|
714
|
+
),
|
|
715
|
+
dataIndex: 'categoryName',
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
title: '品类',
|
|
719
|
+
width: 100,
|
|
720
|
+
ellipsis: {
|
|
721
|
+
showTitle: false,
|
|
722
|
+
},
|
|
723
|
+
render: (text: any) => (
|
|
724
|
+
<Tooltip placement="topLeft" title={text}>
|
|
725
|
+
{text}
|
|
726
|
+
</Tooltip>
|
|
727
|
+
),
|
|
728
|
+
dataIndex: 'className',
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
title: '品牌',
|
|
732
|
+
width: 100,
|
|
733
|
+
ellipsis: {
|
|
734
|
+
showTitle: false,
|
|
735
|
+
},
|
|
736
|
+
render: (text: any) => (
|
|
737
|
+
<Tooltip placement="topLeft" title={text}>
|
|
738
|
+
{text}
|
|
739
|
+
</Tooltip>
|
|
740
|
+
),
|
|
741
|
+
dataIndex: 'brandName',
|
|
742
|
+
},
|
|
743
|
+
],
|
|
776
744
|
selectColumn: mTpSelectColumn,
|
|
777
|
-
promiseLoadList:
|
|
745
|
+
promiseLoadList: initialPromiseLoadList
|
|
778
746
|
}
|
|
779
747
|
|
|
780
748
|
return (
|
|
@@ -869,144 +837,6 @@ export const AddSpuSelect = (parProps: any) => {
|
|
|
869
837
|
},
|
|
870
838
|
]
|
|
871
839
|
const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
|
|
872
|
-
const initialTableColumn = [
|
|
873
|
-
{
|
|
874
|
-
title: '商品编码',
|
|
875
|
-
width: 150,
|
|
876
|
-
dataIndex: 'itemCode',
|
|
877
|
-
},
|
|
878
|
-
{
|
|
879
|
-
title: '商品名称',
|
|
880
|
-
width: 200,
|
|
881
|
-
ellipsis: {
|
|
882
|
-
showTitle: false,
|
|
883
|
-
},
|
|
884
|
-
render: (text: any) => (
|
|
885
|
-
<Tooltip placement="topLeft" title={text}>
|
|
886
|
-
{text}
|
|
887
|
-
</Tooltip>
|
|
888
|
-
),
|
|
889
|
-
dataIndex: 'name',
|
|
890
|
-
},
|
|
891
|
-
{
|
|
892
|
-
title: '所属组织',
|
|
893
|
-
width: 100,
|
|
894
|
-
ellipsis: {
|
|
895
|
-
showTitle: false,
|
|
896
|
-
},
|
|
897
|
-
render: (text: any) => (
|
|
898
|
-
<Tooltip placement="topLeft" title={text}>
|
|
899
|
-
{text}
|
|
900
|
-
</Tooltip>
|
|
901
|
-
),
|
|
902
|
-
dataIndex: 'ownOrgSignName',
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
title: '品牌',
|
|
906
|
-
width: 100,
|
|
907
|
-
ellipsis: {
|
|
908
|
-
showTitle: false,
|
|
909
|
-
},
|
|
910
|
-
render: (text: any) => (
|
|
911
|
-
<Tooltip placement="topLeft" title={text}>
|
|
912
|
-
{text}
|
|
913
|
-
</Tooltip>
|
|
914
|
-
),
|
|
915
|
-
dataIndex: 'brandName',
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
title: '类目',
|
|
919
|
-
width: 100,
|
|
920
|
-
ellipsis: {
|
|
921
|
-
showTitle: false,
|
|
922
|
-
},
|
|
923
|
-
render: (text: any) => (
|
|
924
|
-
<Tooltip placement="topLeft" title={text}>
|
|
925
|
-
{text}
|
|
926
|
-
</Tooltip>
|
|
927
|
-
),
|
|
928
|
-
dataIndex: 'categoryName',
|
|
929
|
-
},
|
|
930
|
-
{
|
|
931
|
-
title: '品类',
|
|
932
|
-
width: 100,
|
|
933
|
-
ellipsis: {
|
|
934
|
-
showTitle: false,
|
|
935
|
-
},
|
|
936
|
-
render: (text: any) => (
|
|
937
|
-
<Tooltip placement="topLeft" title={text}>
|
|
938
|
-
{text}
|
|
939
|
-
</Tooltip>
|
|
940
|
-
),
|
|
941
|
-
dataIndex: 'className',
|
|
942
|
-
},
|
|
943
|
-
]
|
|
944
|
-
const mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
|
|
945
|
-
const initialTableSearchForm = [
|
|
946
|
-
{ name: 'qp-itemCode-like', label: '商品编码' },
|
|
947
|
-
{ name: 'qp-name-like', label: '商品名称' },
|
|
948
|
-
{ name: 'qp-ownOrgSign-in', type: 'select', label: '所属组织', field: {
|
|
949
|
-
type: 'select',
|
|
950
|
-
props: {
|
|
951
|
-
mode: 'multiple',
|
|
952
|
-
notFoundContent: '暂无数据',
|
|
953
|
-
allowClear: true,
|
|
954
|
-
showSearch: true,
|
|
955
|
-
showArrow: true,
|
|
956
|
-
maxTagCount: 1,
|
|
957
|
-
optionFilterProp: 'children',
|
|
958
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
959
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
960
|
-
},
|
|
961
|
-
} },
|
|
962
|
-
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
963
|
-
type: 'select',
|
|
964
|
-
props: {
|
|
965
|
-
mode: 'multiple',
|
|
966
|
-
notFoundContent: '暂无数据',
|
|
967
|
-
allowClear: true,
|
|
968
|
-
showSearch: true,
|
|
969
|
-
showArrow: true,
|
|
970
|
-
maxTagCount: 1,
|
|
971
|
-
optionFilterProp: 'children',
|
|
972
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
973
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
974
|
-
},
|
|
975
|
-
} },
|
|
976
|
-
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
977
|
-
type: 'treeSelect',
|
|
978
|
-
props: {
|
|
979
|
-
treeData: [],
|
|
980
|
-
treeCheckable: true,
|
|
981
|
-
showSearch: true,
|
|
982
|
-
allowClear: true,
|
|
983
|
-
showArrow: true,
|
|
984
|
-
treeNodeFilterProp: 'title',
|
|
985
|
-
treeDefaultExpandAll: true,
|
|
986
|
-
maxTagCount: 1,
|
|
987
|
-
placeholder: '请选择',
|
|
988
|
-
style: {
|
|
989
|
-
width: '100%',
|
|
990
|
-
},
|
|
991
|
-
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
992
|
-
},
|
|
993
|
-
} },
|
|
994
|
-
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
995
|
-
type: 'select',
|
|
996
|
-
props: {
|
|
997
|
-
mode: 'multiple',
|
|
998
|
-
notFoundContent: '暂无数据',
|
|
999
|
-
allowClear: true,
|
|
1000
|
-
showSearch: true,
|
|
1001
|
-
showArrow: true,
|
|
1002
|
-
maxTagCount: 1,
|
|
1003
|
-
optionFilterProp: 'children',
|
|
1004
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1005
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1006
|
-
},
|
|
1007
|
-
} },
|
|
1008
|
-
]
|
|
1009
|
-
const mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
|
|
1010
840
|
const initialPromiseLoadList = [
|
|
1011
841
|
{
|
|
1012
842
|
url: `/user/orgViewNode/listNoPage`,
|
|
@@ -1050,7 +880,6 @@ export const AddSpuSelect = (parProps: any) => {
|
|
|
1050
880
|
resKeyValue: ['id','name']
|
|
1051
881
|
},
|
|
1052
882
|
]
|
|
1053
|
-
const mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
1054
883
|
const props = {
|
|
1055
884
|
buttonText: parProps.buttonText || '新增',
|
|
1056
885
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -1081,11 +910,145 @@ export const AddSpuSelect = (parProps: any) => {
|
|
|
1081
910
|
isAllowRepeatedSelect: !!parProps?.isAllowRepeatedSelect,
|
|
1082
911
|
};
|
|
1083
912
|
const modalTableProps = {
|
|
1084
|
-
modalTableTitle:
|
|
1085
|
-
tableSearchForm:
|
|
1086
|
-
|
|
913
|
+
modalTableTitle: '选择商品',
|
|
914
|
+
tableSearchForm: [
|
|
915
|
+
{ name: 'qp-itemCode-like', label: '商品编码' },
|
|
916
|
+
{ name: 'qp-name-like', label: '商品名称' },
|
|
917
|
+
{ name: 'qp-ownOrgSign-in', type: 'select', label: '所属组织', field: {
|
|
918
|
+
type: 'select',
|
|
919
|
+
props: {
|
|
920
|
+
mode: 'multiple',
|
|
921
|
+
notFoundContent: '暂无数据',
|
|
922
|
+
allowClear: true,
|
|
923
|
+
showSearch: true,
|
|
924
|
+
showArrow: true,
|
|
925
|
+
maxTagCount: 1,
|
|
926
|
+
optionFilterProp: 'children',
|
|
927
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
928
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
929
|
+
},
|
|
930
|
+
} },
|
|
931
|
+
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
932
|
+
type: 'select',
|
|
933
|
+
props: {
|
|
934
|
+
mode: 'multiple',
|
|
935
|
+
notFoundContent: '暂无数据',
|
|
936
|
+
allowClear: true,
|
|
937
|
+
showSearch: true,
|
|
938
|
+
showArrow: true,
|
|
939
|
+
maxTagCount: 1,
|
|
940
|
+
optionFilterProp: 'children',
|
|
941
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
942
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
943
|
+
},
|
|
944
|
+
} },
|
|
945
|
+
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
946
|
+
type: 'treeSelect',
|
|
947
|
+
props: {
|
|
948
|
+
treeData: [],
|
|
949
|
+
treeCheckable: true,
|
|
950
|
+
showSearch: true,
|
|
951
|
+
allowClear: true,
|
|
952
|
+
showArrow: true,
|
|
953
|
+
treeNodeFilterProp: 'title',
|
|
954
|
+
treeDefaultExpandAll: true,
|
|
955
|
+
maxTagCount: 1,
|
|
956
|
+
placeholder: '请选择',
|
|
957
|
+
style: {
|
|
958
|
+
width: '100%',
|
|
959
|
+
},
|
|
960
|
+
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
961
|
+
},
|
|
962
|
+
} },
|
|
963
|
+
{ name: 'qp-classId-in', type: 'select', label: '品类', field: {
|
|
964
|
+
type: 'select',
|
|
965
|
+
props: {
|
|
966
|
+
mode: 'multiple',
|
|
967
|
+
notFoundContent: '暂无数据',
|
|
968
|
+
allowClear: true,
|
|
969
|
+
showSearch: true,
|
|
970
|
+
showArrow: true,
|
|
971
|
+
maxTagCount: 1,
|
|
972
|
+
optionFilterProp: 'children',
|
|
973
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
974
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
975
|
+
},
|
|
976
|
+
} },
|
|
977
|
+
],
|
|
978
|
+
tableColumns: [
|
|
979
|
+
{
|
|
980
|
+
title: '商品编码',
|
|
981
|
+
width: 150,
|
|
982
|
+
dataIndex: 'itemCode',
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
title: '商品名称',
|
|
986
|
+
width: 200,
|
|
987
|
+
ellipsis: {
|
|
988
|
+
showTitle: false,
|
|
989
|
+
},
|
|
990
|
+
render: (text: any) => (
|
|
991
|
+
<Tooltip placement="topLeft" title={text}>
|
|
992
|
+
{text}
|
|
993
|
+
</Tooltip>
|
|
994
|
+
),
|
|
995
|
+
dataIndex: 'name',
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
title: '所属组织',
|
|
999
|
+
width: 100,
|
|
1000
|
+
ellipsis: {
|
|
1001
|
+
showTitle: false,
|
|
1002
|
+
},
|
|
1003
|
+
render: (text: any) => (
|
|
1004
|
+
<Tooltip placement="topLeft" title={text}>
|
|
1005
|
+
{text}
|
|
1006
|
+
</Tooltip>
|
|
1007
|
+
),
|
|
1008
|
+
dataIndex: 'ownOrgSignName',
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
title: '品牌',
|
|
1012
|
+
width: 100,
|
|
1013
|
+
ellipsis: {
|
|
1014
|
+
showTitle: false,
|
|
1015
|
+
},
|
|
1016
|
+
render: (text: any) => (
|
|
1017
|
+
<Tooltip placement="topLeft" title={text}>
|
|
1018
|
+
{text}
|
|
1019
|
+
</Tooltip>
|
|
1020
|
+
),
|
|
1021
|
+
dataIndex: 'brandName',
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
title: '类目',
|
|
1025
|
+
width: 100,
|
|
1026
|
+
ellipsis: {
|
|
1027
|
+
showTitle: false,
|
|
1028
|
+
},
|
|
1029
|
+
render: (text: any) => (
|
|
1030
|
+
<Tooltip placement="topLeft" title={text}>
|
|
1031
|
+
{text}
|
|
1032
|
+
</Tooltip>
|
|
1033
|
+
),
|
|
1034
|
+
dataIndex: 'categoryName',
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
title: '品类',
|
|
1038
|
+
width: 100,
|
|
1039
|
+
ellipsis: {
|
|
1040
|
+
showTitle: false,
|
|
1041
|
+
},
|
|
1042
|
+
render: (text: any) => (
|
|
1043
|
+
<Tooltip placement="topLeft" title={text}>
|
|
1044
|
+
{text}
|
|
1045
|
+
</Tooltip>
|
|
1046
|
+
),
|
|
1047
|
+
dataIndex: 'className',
|
|
1048
|
+
},
|
|
1049
|
+
],
|
|
1087
1050
|
selectColumn: mTpSelectColumn,
|
|
1088
|
-
promiseLoadList:
|
|
1051
|
+
promiseLoadList: initialPromiseLoadList
|
|
1089
1052
|
}
|
|
1090
1053
|
|
|
1091
1054
|
return (
|