@bit-sun/business-component 1.2.3 → 1.2.4-alpha.1
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/.fatherrc.ts +1 -0
- package/.umirc.ts +31 -16
- package/dist/components/Business/AddSelectBusiness/index.d.ts +1 -0
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +17 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +30 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +3 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +2 -0
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +4 -0
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +2 -0
- package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +8 -0
- package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +8 -0
- package/dist/components/Business/BsLayouts/index.d.ts +18 -0
- package/dist/components/Business/BsLayouts/service.d.ts +1 -0
- package/dist/components/Business/BsLayouts/utils.d.ts +13 -0
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +2 -0
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +58 -0
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +98 -0
- package/dist/components/Business/CommonAlert/index.d.ts +3 -0
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +6 -0
- package/dist/components/Business/DetailPageWrapper/index.d.ts +9 -0
- package/dist/components/Business/DetailPageWrapper/utils.d.ts +8 -0
- package/dist/components/Business/HomePageWrapper/index.d.ts +3 -0
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
- package/dist/components/Business/SearchSelect/common.d.ts +5 -1
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/SearchSelect/utils.d.ts +2 -1
- package/dist/components/Business/StateFlow/index.d.ts +3 -0
- package/dist/components/Business/TreeSearchSelect/index.d.ts +3 -0
- package/dist/components/Business/TreeSearchSelect/utils.d.ts +2 -0
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +54 -0
- package/dist/components/Business/columnSettingTable/index.d.ts +16 -0
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +17 -0
- package/dist/components/Business/columnSettingTable/utils.d.ts +8 -0
- package/dist/components/Functional/AddSelect/index.d.ts +3 -0
- package/dist/components/Functional/BillEntry/index.d.ts +4 -0
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +12 -0
- package/dist/components/Functional/SearchSelect/index.d.ts +2 -1
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.esm.js +19420 -4457
- package/dist/index.js +19451 -4471
- package/dist/utils/CheckOneUser/index.d.ts +1 -1
- package/dist/utils/enumConfig.d.ts +10 -0
- package/dist/utils/requestUtils.d.ts +1 -0
- package/dist/utils/utils.d.ts +3 -0
- package/lib/assets/arrow_top.png +0 -0
- package/lib/assets/drag.svg +17 -0
- package/lib/assets/exportFail.svg +38 -0
- package/lib/assets/exportProcessing.svg +29 -0
- package/lib/assets/exportSuccess.svg +35 -0
- package/lib/assets/exportlogo.png +0 -0
- package/lib/assets/label_icon_bottom.svg +26 -0
- package/lib/assets/upExport.svg +23 -0
- package/package.json +26 -5
- package/src/assets/32.svg +28 -0
- package/src/assets/addIcon.svg +18 -0
- package/src/assets/allfunc.svg +28 -0
- package/src/assets/arrowRight.svg +25 -0
- package/src/assets/arrow_top.png +0 -0
- package/src/assets/btn-delete.svg +30 -0
- package/src/assets/btn-edit.svg +20 -0
- package/src/assets/btn-more.svg +18 -0
- package/src/assets/btn-submit.svg +20 -0
- package/src/assets/caidan.svg +12 -0
- package/src/assets/close.svg +26 -0
- package/src/assets/closeicon.png +0 -0
- package/src/assets/drag.svg +17 -0
- package/src/assets/exportFail.svg +38 -0
- package/src/assets/exportProcessing.svg +29 -0
- package/src/assets/exportSuccess.svg +35 -0
- package/src/assets/exportlogo.png +0 -0
- package/src/assets/fixed-left-active.svg +12 -0
- package/src/assets/fixed-left.svg +16 -0
- package/src/assets/fixed-right-active.svg +12 -0
- package/src/assets/fixed-right.svg +16 -0
- package/src/assets/guanbi.svg +16 -0
- package/src/assets/icon-quanping.svg +16 -0
- package/src/assets/icon-shezhi.svg +18 -0
- package/src/assets/label_icon_bottom.svg +26 -0
- package/src/assets/list-no-img.svg +22 -0
- package/src/assets/morentouxiang-32.svg +24 -0
- package/src/assets/right.png +0 -0
- package/src/assets/scanning.svg +25 -0
- package/src/assets/upExport.svg +23 -0
- package/src/assets/xinglan-icon-out.png +0 -0
- package/src/components/Business/AddSelectBusiness/index.md +41 -0
- package/src/components/Business/AddSelectBusiness/index.tsx +290 -0
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +112 -0
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -0
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +38 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +243 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +385 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +286 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +75 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +171 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +65 -0
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +154 -0
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +73 -0
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +158 -0
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -0
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -0
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -0
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +161 -0
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +76 -0
- package/src/components/Business/BsLayouts/index.less +80 -0
- package/src/components/Business/BsLayouts/index.tsx +1465 -0
- package/src/components/Business/BsLayouts/service.ts +11 -0
- package/src/components/Business/BsLayouts/utils.tsx +211 -0
- package/src/components/Business/BsSulaQueryTable/index.less +220 -0
- package/src/components/Business/BsSulaQueryTable/index.tsx +505 -0
- package/src/components/Business/BsSulaQueryTable/setting.tsx +799 -0
- package/src/components/Business/BsSulaQueryTable/utils.less +65 -0
- package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -0
- package/src/components/Business/CommodityEntry/index.md +4 -3
- package/src/components/Business/CommodityEntry/index.tsx +7 -2
- package/src/components/Business/CommonAlert/index.less +0 -0
- package/src/components/Business/CommonAlert/index.tsx +23 -0
- package/src/components/Business/CommonGuideWrapper/index.less +112 -0
- package/src/components/Business/CommonGuideWrapper/index.md +39 -0
- package/src/components/Business/CommonGuideWrapper/index.tsx +84 -0
- package/src/components/Business/DetailPageWrapper/index.less +80 -0
- package/src/components/Business/DetailPageWrapper/index.tsx +335 -0
- package/src/components/Business/DetailPageWrapper/utils.tsx +101 -0
- package/src/components/Business/HomePageWrapper/index.less +33 -0
- package/src/components/Business/HomePageWrapper/index.md +45 -0
- package/src/components/Business/HomePageWrapper/index.tsx +162 -0
- package/src/components/Business/SearchSelect/BusinessUtils.ts +107 -14
- package/src/components/Business/SearchSelect/common.ts +20 -1
- package/src/components/Business/SearchSelect/index.md +60 -30
- package/src/components/Business/SearchSelect/index.tsx +21 -12
- package/src/components/Business/SearchSelect/utils.ts +30 -4
- package/src/components/Business/StateFlow/index.less +131 -0
- package/src/components/Business/StateFlow/index.md +60 -0
- package/src/components/Business/StateFlow/index.tsx +30 -0
- package/src/components/Business/TreeSearchSelect/index.md +126 -0
- package/src/components/Business/TreeSearchSelect/index.tsx +34 -0
- package/src/components/Business/TreeSearchSelect/utils.ts +60 -0
- package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -0
- package/src/components/Business/columnSettingTable/index.less +247 -0
- package/src/components/Business/columnSettingTable/index.md +358 -0
- package/src/components/Business/columnSettingTable/index.tsx +233 -0
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +241 -0
- package/src/components/Business/columnSettingTable/utils.tsx +69 -0
- package/src/components/Functional/AddSelect/index.less +367 -0
- package/src/components/Functional/AddSelect/index.md +122 -0
- package/src/components/Functional/AddSelect/index.tsx +962 -0
- package/src/components/Functional/BillEntry/index.less +371 -0
- package/src/components/Functional/BillEntry/index.md +39 -0
- package/src/components/Functional/BillEntry/index.tsx +613 -0
- package/src/components/Functional/DataImport/index.tsx +7 -2
- package/src/components/Functional/DataValidation/index.md +1 -0
- package/src/components/Functional/DataValidation/index.tsx +17 -2
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -0
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -0
- package/src/components/Functional/SearchSelect/index.tsx +218 -121
- package/src/components/Functional/TreeSearchSelect/index.md +47 -0
- package/src/components/Functional/TreeSearchSelect/index.tsx +149 -0
- package/src/index.ts +15 -6
- package/src/styles/bsDefault.less +1907 -0
- package/src/utils/enumConfig.ts +10 -0
- package/src/utils/requestUtils.ts +33 -0
- package/src/utils/utils.ts +52 -0
- package/typings.d.ts +3 -0
|
@@ -47,17 +47,19 @@ export default () => {
|
|
|
47
47
|
// mappingTextField: 'name',
|
|
48
48
|
// mappingValueField: 'code',
|
|
49
49
|
// }, // 非必传,业务字段已根据业务默认默认
|
|
50
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' }, // 非必传,下拉框和tableForm下拉框接口前缀,默认为bop的接口
|
|
50
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' }, // 非必传,下拉框和tableForm下拉框接口前缀,默认为bop的接口
|
|
51
51
|
selectProps, // 非必传
|
|
52
52
|
onChange: (value: any) => {
|
|
53
53
|
console.log(value)
|
|
54
54
|
setValue(value)
|
|
55
55
|
},
|
|
56
56
|
selectBusinessType: 'supplier',
|
|
57
|
+
disabled: true,
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
const props2 = {
|
|
60
|
-
|
|
61
|
+
...props,
|
|
62
|
+
// prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
|
|
61
63
|
selectBusinessType: 'supplier2',
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -133,7 +135,7 @@ export default () => {
|
|
|
133
135
|
// }, // 默认参数
|
|
134
136
|
// sourceName: 'skuCode',
|
|
135
137
|
// },
|
|
136
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
138
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
137
139
|
selectProps,
|
|
138
140
|
selectBusinessType: 'skuCommodity',
|
|
139
141
|
};
|
|
@@ -290,7 +292,7 @@ export default () => {
|
|
|
290
292
|
console.log(value)
|
|
291
293
|
setValue(value)
|
|
292
294
|
},
|
|
293
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
295
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
294
296
|
selectProps,
|
|
295
297
|
selectBusinessType: 'spuCommodity',
|
|
296
298
|
};
|
|
@@ -323,7 +325,7 @@ export default () => {
|
|
|
323
325
|
## 仓库选择器(物理仓) Select-Warehouse-001
|
|
324
326
|
|
|
325
327
|
```tsx
|
|
326
|
-
import React, { useState } from 'react';
|
|
328
|
+
import React, { useState, useEffect } from 'react';
|
|
327
329
|
import { Tabs } from 'antd';
|
|
328
330
|
import {BusinessSearchSelect} from '../../../index.ts';
|
|
329
331
|
|
|
@@ -343,21 +345,30 @@ export default () => {
|
|
|
343
345
|
const [ tabKey, setTabKey ] = useState('single')
|
|
344
346
|
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
345
347
|
|
|
348
|
+
useEffect(() => {
|
|
349
|
+
if(tabKey === 'multiple') {
|
|
350
|
+
setValue(['1540295745870573570', '1540173160826613762'])
|
|
351
|
+
}
|
|
352
|
+
},[tabKey])
|
|
353
|
+
|
|
346
354
|
const props = {
|
|
347
355
|
value,
|
|
348
356
|
onChange: (value: any) => {
|
|
349
357
|
console.log(value)
|
|
350
358
|
setValue(value)
|
|
351
359
|
},
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
360
|
+
requestConfig: {
|
|
361
|
+
// mappingValueField: 'physicalWarehouseCode',
|
|
362
|
+
// sourceName: 'physicalWarehouseCode',
|
|
363
|
+
filterInit: 'qp-id-in'
|
|
364
|
+
},
|
|
356
365
|
// modalTableProps: {
|
|
357
366
|
// modalTableTitle: '选择物理仓-更改title测试',
|
|
367
|
+
// needModalTable: false
|
|
358
368
|
// },
|
|
359
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
369
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
360
370
|
selectProps,
|
|
371
|
+
// labelInValue: true,
|
|
361
372
|
selectBusinessType: 'physicalWarehouse',
|
|
362
373
|
};
|
|
363
374
|
|
|
@@ -424,7 +435,7 @@ export default () => {
|
|
|
424
435
|
// }, // 默认参数
|
|
425
436
|
// sourceName: 'warehouseIds',
|
|
426
437
|
// },
|
|
427
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
438
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
428
439
|
selectProps,
|
|
429
440
|
selectBusinessType: 'realWarehouse',
|
|
430
441
|
};
|
|
@@ -492,7 +503,7 @@ export default () => {
|
|
|
492
503
|
// }, // 默认参数
|
|
493
504
|
// sourceName: 'warehouseIds',
|
|
494
505
|
// },
|
|
495
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
506
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
496
507
|
selectProps,
|
|
497
508
|
selectBusinessType: 'virtualWarehouse',
|
|
498
509
|
};
|
|
@@ -560,7 +571,7 @@ export default () => {
|
|
|
560
571
|
// }, // 默认参数
|
|
561
572
|
// sourceName: 'warehouseIds',
|
|
562
573
|
// },
|
|
563
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
574
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
564
575
|
selectProps,
|
|
565
576
|
selectBusinessType: 'channelWarehouse',
|
|
566
577
|
};
|
|
@@ -629,13 +640,14 @@ export default () => {
|
|
|
629
640
|
// }, // 默认参数
|
|
630
641
|
// sourceName: 'customerCode',
|
|
631
642
|
// },
|
|
632
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
643
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
633
644
|
selectProps,
|
|
634
645
|
selectBusinessType: 'customer',
|
|
635
646
|
};
|
|
636
647
|
|
|
637
648
|
const props2 = {
|
|
638
|
-
|
|
649
|
+
...props,
|
|
650
|
+
// prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
|
|
639
651
|
selectBusinessType: 'customer2',
|
|
640
652
|
}
|
|
641
653
|
|
|
@@ -713,11 +725,17 @@ export default () => {
|
|
|
713
725
|
// }, // 默认参数
|
|
714
726
|
// sourceName: 'code',
|
|
715
727
|
// },
|
|
716
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
728
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
717
729
|
selectProps,
|
|
718
730
|
selectBusinessType: 'shopFile',
|
|
719
731
|
};
|
|
720
732
|
|
|
733
|
+
const props2 = {
|
|
734
|
+
...props,
|
|
735
|
+
// prefixUrl: { selectPrefix: '/channel-manage/', formSelectFix: '/channel-manage/' },
|
|
736
|
+
selectBusinessType: 'shopFile2',
|
|
737
|
+
}
|
|
738
|
+
|
|
721
739
|
const onTabChange = (key) => {
|
|
722
740
|
setTabKey(key)
|
|
723
741
|
setValue(key === 'single' ? null: [])
|
|
@@ -728,12 +746,22 @@ export default () => {
|
|
|
728
746
|
<Tabs onChange={onTabChange} activeKey={tabKey}>
|
|
729
747
|
<TabPane tab='单选' key='single'>
|
|
730
748
|
{tabKey === 'single' && (
|
|
731
|
-
|
|
749
|
+
<>
|
|
750
|
+
<span>版本1:支持英伦项目...</span>
|
|
751
|
+
<BusinessSearchSelect {...props} />
|
|
752
|
+
<span>版本2:支持麦克英孚项目...</span>
|
|
753
|
+
<BusinessSearchSelect {...props2} />
|
|
754
|
+
</>
|
|
732
755
|
)}
|
|
733
756
|
</TabPane>
|
|
734
757
|
<TabPane tab='多选' key='multiple'>
|
|
735
758
|
{tabKey === 'multiple' && (
|
|
736
|
-
|
|
759
|
+
<>
|
|
760
|
+
<span>版本1:支持英伦项目...</span>
|
|
761
|
+
<BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
|
|
762
|
+
<span>版本2:支持麦克英孚项目...</span>
|
|
763
|
+
<BusinessSearchSelect {...props2} selectProps={selectPropsMultiple} />
|
|
764
|
+
</>
|
|
737
765
|
)}
|
|
738
766
|
</TabPane>
|
|
739
767
|
</Tabs>
|
|
@@ -782,7 +810,7 @@ export default () => {
|
|
|
782
810
|
// }, // 默认参数
|
|
783
811
|
// sourceName: 'accountingCode',
|
|
784
812
|
// },
|
|
785
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
813
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
786
814
|
selectProps,
|
|
787
815
|
selectBusinessType: 'accountingSubject',
|
|
788
816
|
};
|
|
@@ -851,28 +879,30 @@ export default () => {
|
|
|
851
879
|
// }, // 默认参数
|
|
852
880
|
// sourceName: 'inventoryOrgCode',
|
|
853
881
|
// },
|
|
854
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
882
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
855
883
|
selectProps,
|
|
856
884
|
selectBusinessType: 'inventoryOrg',
|
|
857
885
|
};
|
|
858
886
|
|
|
887
|
+
const props2 = {
|
|
888
|
+
...props,
|
|
889
|
+
selectBusinessType: 'inventoryOrg2',
|
|
890
|
+
}
|
|
891
|
+
|
|
859
892
|
const onTabChange = (key) => {
|
|
860
893
|
setTabKey(key)
|
|
861
894
|
setValue(key === 'single' ? null: [])
|
|
862
895
|
}
|
|
863
896
|
|
|
864
897
|
return (
|
|
898
|
+
|
|
865
899
|
<div>
|
|
866
900
|
<Tabs onChange={onTabChange} activeKey={tabKey}>
|
|
867
901
|
<TabPane tab='单选' key='single'>
|
|
868
|
-
{tabKey === 'single' &&
|
|
869
|
-
<BusinessSearchSelect {...props} />
|
|
870
|
-
)}
|
|
902
|
+
{tabKey === 'single' && <BusinessSearchSelect {...props} />}
|
|
871
903
|
</TabPane>
|
|
872
904
|
<TabPane tab='多选' key='multiple'>
|
|
873
|
-
{tabKey === 'multiple' &&
|
|
874
|
-
<BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
|
|
875
|
-
)}
|
|
905
|
+
{tabKey === 'multiple' && <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />}
|
|
876
906
|
</TabPane>
|
|
877
907
|
</Tabs>
|
|
878
908
|
</div>
|
|
@@ -921,7 +951,7 @@ export default () => {
|
|
|
921
951
|
// }, // 默认参数
|
|
922
952
|
// sourceName: 'companyCode',
|
|
923
953
|
// },
|
|
924
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
954
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
925
955
|
selectProps,
|
|
926
956
|
selectBusinessType: 'corporationCompany',
|
|
927
957
|
};
|
|
@@ -990,14 +1020,14 @@ export default () => {
|
|
|
990
1020
|
// }, // 默认参数
|
|
991
1021
|
// sourceName: 'code',
|
|
992
1022
|
// },
|
|
993
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
1023
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
994
1024
|
selectProps,
|
|
995
1025
|
selectBusinessType: 'employee',
|
|
996
1026
|
};
|
|
997
1027
|
|
|
998
1028
|
const props2 = {
|
|
999
1029
|
...props,
|
|
1000
|
-
prefixUrl: { selectPrefix: '/user/api', formSelectFix: '/user/api' },
|
|
1030
|
+
// prefixUrl: { selectPrefix: '/user/api', formSelectFix: '/user/api' },
|
|
1001
1031
|
selectBusinessType: 'employee2',
|
|
1002
1032
|
}
|
|
1003
1033
|
|
|
@@ -1075,7 +1105,7 @@ export default () => {
|
|
|
1075
1105
|
// }, // 默认参数
|
|
1076
1106
|
// sourceName: 'deliveryModeCode',
|
|
1077
1107
|
// },
|
|
1078
|
-
prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
1108
|
+
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
1079
1109
|
selectProps,
|
|
1080
1110
|
selectBusinessType: 'deliveryMode',
|
|
1081
1111
|
};
|
|
@@ -2,20 +2,22 @@
|
|
|
2
2
|
* @Description:
|
|
3
3
|
* @Author: rodchen
|
|
4
4
|
* @Date: 2022-05-07 15:17:28
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @LastEditors:
|
|
5
|
+
* @LastEditTime: 2022-09-09 16:17:36
|
|
6
|
+
* @LastEditors: Sirius-kk
|
|
7
7
|
*/
|
|
8
|
-
import React, { useMemo } from 'react';
|
|
8
|
+
import React, { useMemo, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
9
9
|
import { commonFun } from './BusinessUtils';
|
|
10
|
+
import { handleDefaultPrefixUrl } from './utils';
|
|
10
11
|
import SearchSelect from '@/components/Functional/SearchSelect';
|
|
11
12
|
|
|
12
13
|
const MemoSearchSelect = React.memo(SearchSelect)
|
|
13
14
|
|
|
14
|
-
const
|
|
15
|
+
const BusinessSearchSelect = forwardRef((props: any, ref: any) => {
|
|
15
16
|
const businessType = props?.selectBusinessType || 'supplier';
|
|
16
|
-
const prefixUrl = props?.prefixUrl || { selectPrefix:
|
|
17
|
+
const prefixUrl = props?.prefixUrl || { selectPrefix: handleDefaultPrefixUrl(businessType), formSelectFix: handleDefaultPrefixUrl(businessType) };
|
|
18
|
+
const innerRef = useRef();
|
|
17
19
|
|
|
18
|
-
const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl,props?.requestConfig || {}, props?.modalTableProps || {});
|
|
20
|
+
const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl, props?.requestConfig || {}, props?.modalTableProps || {});
|
|
19
21
|
const currentProps = useMemo(() => {
|
|
20
22
|
return {
|
|
21
23
|
...props,
|
|
@@ -23,21 +25,28 @@ const BusinessSearchSelect = (props: any) => {
|
|
|
23
25
|
needModalTable,
|
|
24
26
|
modalTableProps
|
|
25
27
|
}
|
|
26
|
-
}, [props?.value])
|
|
28
|
+
}, [props?.value, props.disabled]);
|
|
29
|
+
|
|
30
|
+
useImperativeHandle(ref, () => ({
|
|
31
|
+
getRef: () => innerRef,
|
|
32
|
+
}))
|
|
27
33
|
|
|
28
34
|
return (
|
|
29
35
|
<div>
|
|
30
|
-
<MemoSearchSelect {...currentProps} />
|
|
36
|
+
<MemoSearchSelect {...currentProps} ref={innerRef} />
|
|
31
37
|
</div>
|
|
32
38
|
);
|
|
33
|
-
};
|
|
39
|
+
});
|
|
34
40
|
|
|
35
41
|
export default React.memo(BusinessSearchSelect, (props, nextProps) => {
|
|
36
|
-
if(props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
|
|
42
|
+
if (props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
|
|
37
43
|
return false
|
|
38
44
|
}
|
|
39
|
-
if(props && props.value !== nextProps.value) {
|
|
45
|
+
if (props && props.value !== nextProps.value) {
|
|
46
|
+
return false
|
|
47
|
+
}
|
|
48
|
+
if (props && props.disabled !== nextProps.disabled) {
|
|
40
49
|
return false
|
|
41
50
|
}
|
|
42
51
|
return true
|
|
43
|
-
});
|
|
52
|
+
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { message } from 'antd';
|
|
3
3
|
import { stringify } from 'querystring';
|
|
4
|
+
import ENUM from '@/utils/enumConfig';
|
|
4
5
|
|
|
5
6
|
const getDicData = (dicCode: string) => {
|
|
6
7
|
let dicData = {};
|
|
7
8
|
let dictionaryData;
|
|
8
9
|
if (!dictionaryData) {
|
|
9
|
-
let storageDic = localStorage.getItem(
|
|
10
|
-
? JSON.parse(localStorage.getItem(
|
|
10
|
+
let storageDic = localStorage.getItem(ENUM.BROWSER_CACHE.DICT_CODES)
|
|
11
|
+
? JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.DICT_CODES) || '{}')
|
|
11
12
|
: {};
|
|
12
13
|
dicData = storageDic[dicCode];
|
|
13
14
|
} else {
|
|
@@ -59,7 +60,7 @@ const loadSelectSource = (url: string, params?: any) => {
|
|
|
59
60
|
.get(`${url}?${stringify(params)}`)
|
|
60
61
|
.then((result: any) => {
|
|
61
62
|
result = result.data;
|
|
62
|
-
if ((result
|
|
63
|
+
if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
|
|
63
64
|
message.error(result.msg);
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
@@ -71,4 +72,29 @@ const loadSelectSource = (url: string, params?: any) => {
|
|
|
71
72
|
})
|
|
72
73
|
};
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
const handleDefaultPrefixUrl = (type: string) => {
|
|
76
|
+
let result;
|
|
77
|
+
switch (type){
|
|
78
|
+
case 'supplier2': case 'customer2': case 'shopFile2':
|
|
79
|
+
result = '/channel-manage';
|
|
80
|
+
break;
|
|
81
|
+
case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity':
|
|
82
|
+
result = '/items';
|
|
83
|
+
break;
|
|
84
|
+
case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse':
|
|
85
|
+
result = '/stock';
|
|
86
|
+
break;
|
|
87
|
+
case 'inventoryOrg2': case 'purchaseOrg': case 'salesOrg': case 'employee2':
|
|
88
|
+
result = '/user';
|
|
89
|
+
break;
|
|
90
|
+
case 'deliveryMode':
|
|
91
|
+
result = '/basic';
|
|
92
|
+
break;
|
|
93
|
+
default:
|
|
94
|
+
result = '/bop/api';
|
|
95
|
+
break
|
|
96
|
+
}
|
|
97
|
+
return result;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl }
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
.form-status-label {
|
|
2
|
+
height: 48px;
|
|
3
|
+
margin-right: 12px;
|
|
4
|
+
// flex-grow: 1;
|
|
5
|
+
// flex-shrink: 1;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
position: relative;
|
|
8
|
+
background-color: #B0B4B7;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
.choosed-status-label.form-status-label {
|
|
12
|
+
background-color: #005CFF;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.form-status-label:last-child {
|
|
16
|
+
margin-right: 0px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.form-status-label:first-child::after {
|
|
20
|
+
position: absolute;
|
|
21
|
+
display: block;
|
|
22
|
+
content: '';
|
|
23
|
+
right: -48px;
|
|
24
|
+
top: 0;
|
|
25
|
+
width: 48px;
|
|
26
|
+
height: 48px;
|
|
27
|
+
border: 24px solid;
|
|
28
|
+
border-color: transparent transparent transparent transparent;
|
|
29
|
+
border-left: 12px solid #B0B4B7;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.choosed-status-label.form-status-label::after {
|
|
33
|
+
border-left: 12px solid #005CFF;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {
|
|
37
|
+
border-left: 12px solid #005CFF;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.form-status-label:last-child::after {
|
|
41
|
+
position: absolute;
|
|
42
|
+
display: block;
|
|
43
|
+
content: '';
|
|
44
|
+
left: 0;
|
|
45
|
+
top: 0;
|
|
46
|
+
width: 48px;
|
|
47
|
+
height: 48px;
|
|
48
|
+
border: 24px solid;
|
|
49
|
+
border-color: transparent transparent transparent transparent;
|
|
50
|
+
border-left: 12px solid #ffffff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.form-status-label:not(:first-child):not(:last-child)::before {
|
|
54
|
+
position: absolute;
|
|
55
|
+
display: block;
|
|
56
|
+
content: '';
|
|
57
|
+
left: 0;
|
|
58
|
+
top: 0;
|
|
59
|
+
width: 48px;
|
|
60
|
+
height: 48px;
|
|
61
|
+
border: 24px solid;
|
|
62
|
+
border-color: transparent transparent transparent transparent;
|
|
63
|
+
border-left: 12px solid #ffffff;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.form-status-label:not(:first-child):not(:last-child)::after {
|
|
67
|
+
position: absolute;
|
|
68
|
+
display: block;
|
|
69
|
+
content: '';
|
|
70
|
+
right: -48px;
|
|
71
|
+
top: 0;
|
|
72
|
+
width: 48px;
|
|
73
|
+
height: 48px;
|
|
74
|
+
border: 24px solid;
|
|
75
|
+
border-color: transparent transparent transparent transparent;
|
|
76
|
+
border-left: 12px solid #B0B4B7;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.status-label-index {
|
|
80
|
+
display: inline-block;
|
|
81
|
+
width: 24px;
|
|
82
|
+
height: 24px;
|
|
83
|
+
border: 1px solid #FFFFFF;
|
|
84
|
+
color: #FFFFFF;
|
|
85
|
+
border-radius: 50%;
|
|
86
|
+
font-family: Montserrat;
|
|
87
|
+
font-size: 14px;line-height: 24px;
|
|
88
|
+
text-align: center;
|
|
89
|
+
margin: 0 6px 0 20px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.status-label-key {
|
|
93
|
+
width: 50px;
|
|
94
|
+
height: 100%;
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
float: left;
|
|
97
|
+
// flex-grow: 0;
|
|
98
|
+
// flex-shrink: 0;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.status-label-operate {
|
|
104
|
+
// flex-grow: 1;
|
|
105
|
+
// flex-shrink: 1;
|
|
106
|
+
float: left;
|
|
107
|
+
width: calc(100% - 50px);
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
text-overflow: ellipsis;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
height: 100%;
|
|
112
|
+
margin: 4px 0;
|
|
113
|
+
&>div {
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
height: 20px;
|
|
116
|
+
line-height: 20px;
|
|
117
|
+
color: #FFFFFF;
|
|
118
|
+
font-family: PingFangSC;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
text-overflow: ellipsis;
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
}
|
|
123
|
+
&>div:first-child {
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
font-weight: 600;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.only-one-child.form-status-label::after,.only-one-child.form-status-label::before {
|
|
130
|
+
border-left: 0px;
|
|
131
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: '组件'
|
|
4
|
+
order: 1
|
|
5
|
+
group:
|
|
6
|
+
title: 业务组件
|
|
7
|
+
order: 1
|
|
8
|
+
title: 状态流转
|
|
9
|
+
order: 1
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# StateFlow
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 单据状态流转
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import React, { useState } from 'react';
|
|
19
|
+
import { StateFlow } from '../../../index.ts';
|
|
20
|
+
|
|
21
|
+
export default () => {
|
|
22
|
+
const formStatusMapping = [
|
|
23
|
+
{
|
|
24
|
+
text: '状态1',
|
|
25
|
+
modifyUserName: '张三',
|
|
26
|
+
modifyTime: '2022-09-01 12:20:20',
|
|
27
|
+
isDone: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
text: '状态2',
|
|
31
|
+
modifyUserName: '李四',
|
|
32
|
+
modifyTime: '2022-09-01 12:20:20',
|
|
33
|
+
isDone: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
text: '状态3',
|
|
37
|
+
modifyUserName: '王五',
|
|
38
|
+
modifyTime: '2022-09-01 12:20:20',
|
|
39
|
+
isDone: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
text: '状态4',
|
|
43
|
+
modifyUserName: '韩梅梅',
|
|
44
|
+
isDone: true,
|
|
45
|
+
modifyTime: '2022-09-01 12:20:20',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
text: '状态5',
|
|
49
|
+
modifyUserName: '李雷',
|
|
50
|
+
isDone: true,
|
|
51
|
+
modifyTime: '2022-09-01 12:20:20',
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
return (
|
|
55
|
+
<StateFlow
|
|
56
|
+
formStatusMapping={formStatusMapping}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import './index.less'
|
|
3
|
+
|
|
4
|
+
export default (props: any) => {
|
|
5
|
+
const { formStatusMapping = [] } = props;
|
|
6
|
+
return (
|
|
7
|
+
<div style={{display: 'flex', padding: '10px 60px 0px', background: '#FFFFFF'}}>
|
|
8
|
+
{
|
|
9
|
+
formStatusMapping.map((item:any, index:number) => {
|
|
10
|
+
return (
|
|
11
|
+
<div style={{width: `${(100/formStatusMapping.length).toFixed(2)}%`}} className={`form-status-label ${item.isDone ? 'choosed-status-label' : ''} ${formStatusMapping.length === 1 ? 'only-one-child' : ''}`}>
|
|
12
|
+
<div className='status-label-key'>
|
|
13
|
+
<span className='status-label-index'>{index+1}</span>
|
|
14
|
+
</div>
|
|
15
|
+
<div className='status-label-operate'>
|
|
16
|
+
<div style={!item.isDone ? {height: '40px', lineHeight: '40px'} : {}}>{item.text}</div>
|
|
17
|
+
{
|
|
18
|
+
item.isDone ? (
|
|
19
|
+
<div title={`${item.modifyUserName || '--'} ${item.modifyTime || '--'}`}>{`${item.modifyUserName || '--'} ${item.modifyTime || '--'}`}</div>
|
|
20
|
+
) : null
|
|
21
|
+
}
|
|
22
|
+
</div>
|
|
23
|
+
<div style={{clear: 'both'}}></div>
|
|
24
|
+
</div>
|
|
25
|
+
)
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
}
|