@bit-sun/business-component 2.1.19 → 2.1.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/index.esm.js CHANGED
@@ -10784,6 +10784,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
10784
10784
  case 'realWarehouse':
10785
10785
  case 'virtualWarehouse':
10786
10786
  case 'channelWarehouse':
10787
+ case 'ownerWarehouse':
10787
10788
  result = '/stock';
10788
10789
  break;
10789
10790
  case 'inventoryOrg2':
@@ -11491,7 +11492,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
11491
11492
  }, requestConfigProp);
11492
11493
  needModalTable = false;
11493
11494
  }
11494
- // 仓库选择器(物理、逻辑仓)
11495
+ // 仓库选择器(物理、逻辑仓、运营仓)
11495
11496
  if (type === 'physicalWarehouse') {
11496
11497
  requestConfig = _objectSpread2({
11497
11498
  url: "".concat(prefixUrl.selectPrefix, "/physicalWarehouse"),
@@ -11607,6 +11608,65 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
11607
11608
  }]
11608
11609
  }, modalTableBusProps);
11609
11610
  }
11611
+ if (type === 'ownerWarehouse') {
11612
+ requestConfig = _objectSpread2({
11613
+ url: "".concat(prefixUrl.selectPrefix, "/ownerWarehouse"),
11614
+ filter: 'qp-name,operationWarehouseCode-orGroup,like',
11615
+ mappingTextField: 'name',
11616
+ mappingTextShowKeyField: 'operationWarehouseCode',
11617
+ mappingValueField: 'operationWarehouseCode',
11618
+ otherParams: {
11619
+ 'qp-status-eq': 1,
11620
+ sorter: 'desc-id'
11621
+ },
11622
+ sourceName: 'qp-operationWarehouseCode-in'
11623
+ }, requestConfigProp);
11624
+ tableSearchForm = [{
11625
+ name: 'qp-name-like',
11626
+ label: '运营仓名称'
11627
+ }, {
11628
+ name: 'qp-operationWarehouseCode-like',
11629
+ label: '运营仓编码'
11630
+ }, {
11631
+ name: 'qp-groupCode-in',
11632
+ type: 'select',
11633
+ label: '运营组',
11634
+ field: {
11635
+ type: 'select',
11636
+ props: {
11637
+ mode: 'multiple',
11638
+ notFoundContent: '暂无数据',
11639
+ allowClear: true,
11640
+ showSearch: true,
11641
+ showArrow: true,
11642
+ maxTagCount: 1,
11643
+ optionFilterProp: 'children',
11644
+ filterOption: function filterOption(input, option) {
11645
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
11646
+ }
11647
+ }
11648
+ }
11649
+ }];
11650
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
11651
+ 'qp-status-eq': 1
11652
+ })]).then(function (x) {
11653
+ formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
11654
+ });
11655
+ modalTableProps = _objectSpread2({
11656
+ modalTableTitle: '选择运营仓',
11657
+ tableSearchForm: tableSearchForm,
11658
+ tableColumns: [{
11659
+ title: '运营仓编码',
11660
+ dataIndex: 'operationWarehouseCode'
11661
+ }, {
11662
+ title: '运营仓名称',
11663
+ dataIndex: 'name'
11664
+ }, {
11665
+ title: '运营组',
11666
+ dataIndex: 'groupName'
11667
+ }]
11668
+ }, modalTableBusProps);
11669
+ }
11610
11670
  // 仓库选择器(虚拟、渠道仓)(无弹窗)
11611
11671
  if (type === 'virtualWarehouse') {
11612
11672
  requestConfig = _objectSpread2({
@@ -12411,8 +12471,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12411
12471
  if (type === 'ruleTemplate') {
12412
12472
  requestConfig = _objectSpread2({
12413
12473
  url: "".concat(prefixUrl.selectPrefix, "/ruleTemplate"),
12414
- // filter: 'qp-name,code-orGroup,like', // 过滤参数
12415
- filter: 'qp-name-like',
12474
+ filter: 'qp-name,code-orGroup,like',
12416
12475
  mappingTextField: 'name',
12417
12476
  mappingTextShowKeyField: 'code',
12418
12477
  mappingValueField: 'code',
package/dist/index.js CHANGED
@@ -10798,6 +10798,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
10798
10798
  case 'realWarehouse':
10799
10799
  case 'virtualWarehouse':
10800
10800
  case 'channelWarehouse':
10801
+ case 'ownerWarehouse':
10801
10802
  result = '/stock';
10802
10803
  break;
10803
10804
  case 'inventoryOrg2':
@@ -11505,7 +11506,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
11505
11506
  }, requestConfigProp);
11506
11507
  needModalTable = false;
11507
11508
  }
11508
- // 仓库选择器(物理、逻辑仓)
11509
+ // 仓库选择器(物理、逻辑仓、运营仓)
11509
11510
  if (type === 'physicalWarehouse') {
11510
11511
  requestConfig = _objectSpread2({
11511
11512
  url: "".concat(prefixUrl.selectPrefix, "/physicalWarehouse"),
@@ -11621,6 +11622,65 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
11621
11622
  }]
11622
11623
  }, modalTableBusProps);
11623
11624
  }
11625
+ if (type === 'ownerWarehouse') {
11626
+ requestConfig = _objectSpread2({
11627
+ url: "".concat(prefixUrl.selectPrefix, "/ownerWarehouse"),
11628
+ filter: 'qp-name,operationWarehouseCode-orGroup,like',
11629
+ mappingTextField: 'name',
11630
+ mappingTextShowKeyField: 'operationWarehouseCode',
11631
+ mappingValueField: 'operationWarehouseCode',
11632
+ otherParams: {
11633
+ 'qp-status-eq': 1,
11634
+ sorter: 'desc-id'
11635
+ },
11636
+ sourceName: 'qp-operationWarehouseCode-in'
11637
+ }, requestConfigProp);
11638
+ tableSearchForm = [{
11639
+ name: 'qp-name-like',
11640
+ label: '运营仓名称'
11641
+ }, {
11642
+ name: 'qp-operationWarehouseCode-like',
11643
+ label: '运营仓编码'
11644
+ }, {
11645
+ name: 'qp-groupCode-in',
11646
+ type: 'select',
11647
+ label: '运营组',
11648
+ field: {
11649
+ type: 'select',
11650
+ props: {
11651
+ mode: 'multiple',
11652
+ notFoundContent: '暂无数据',
11653
+ allowClear: true,
11654
+ showSearch: true,
11655
+ showArrow: true,
11656
+ maxTagCount: 1,
11657
+ optionFilterProp: 'children',
11658
+ filterOption: function filterOption(input, option) {
11659
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
11660
+ }
11661
+ }
11662
+ }
11663
+ }];
11664
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
11665
+ 'qp-status-eq': 1
11666
+ })]).then(function (x) {
11667
+ formatSource(x, 0, 2, tableSearchForm, ['groupCode', 'groupName']);
11668
+ });
11669
+ modalTableProps = _objectSpread2({
11670
+ modalTableTitle: '选择运营仓',
11671
+ tableSearchForm: tableSearchForm,
11672
+ tableColumns: [{
11673
+ title: '运营仓编码',
11674
+ dataIndex: 'operationWarehouseCode'
11675
+ }, {
11676
+ title: '运营仓名称',
11677
+ dataIndex: 'name'
11678
+ }, {
11679
+ title: '运营组',
11680
+ dataIndex: 'groupName'
11681
+ }]
11682
+ }, modalTableBusProps);
11683
+ }
11624
11684
  // 仓库选择器(虚拟、渠道仓)(无弹窗)
11625
11685
  if (type === 'virtualWarehouse') {
11626
11686
  requestConfig = _objectSpread2({
@@ -12425,8 +12485,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12425
12485
  if (type === 'ruleTemplate') {
12426
12486
  requestConfig = _objectSpread2({
12427
12487
  url: "".concat(prefixUrl.selectPrefix, "/ruleTemplate"),
12428
- // filter: 'qp-name,code-orGroup,like', // 过滤参数
12429
- filter: 'qp-name-like',
12488
+ filter: 'qp-name,code-orGroup,like',
12430
12489
  mappingTextField: 'name',
12431
12490
  mappingTextShowKeyField: 'code',
12432
12491
  mappingValueField: 'code',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.1.19",
3
+ "version": "2.1.20",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -626,7 +626,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
626
626
  needModalTable = false
627
627
  }
628
628
 
629
- // 仓库选择器(物理、逻辑仓)
629
+ // 仓库选择器(物理、逻辑仓、运营仓)
630
630
  if(type === 'physicalWarehouse') {
631
631
  requestConfig = {
632
632
  url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
@@ -734,6 +734,63 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
734
734
  ...modalTableBusProps,
735
735
  }
736
736
  }
737
+ if(type === 'ownerWarehouse') {
738
+ requestConfig = {
739
+ url: `${prefixUrl.selectPrefix}/ownerWarehouse`,
740
+ filter: 'qp-name,operationWarehouseCode-orGroup,like', // 过滤参数
741
+ mappingTextField: 'name',
742
+ mappingTextShowKeyField: 'operationWarehouseCode',
743
+ mappingValueField: 'operationWarehouseCode',
744
+ otherParams: {
745
+ 'qp-status-eq': 1,
746
+ sorter: 'desc-id'
747
+ }, // 默认参数
748
+ sourceName: 'qp-operationWarehouseCode-in',
749
+ ...requestConfigProp,
750
+ }
751
+ tableSearchForm = [
752
+ { name: 'qp-name-like', label: '运营仓名称' },
753
+ { name: 'qp-operationWarehouseCode-like', label: '运营仓编码' },
754
+ { name: 'qp-groupCode-in', type: 'select', label: '运营组', field: {
755
+ type: 'select',
756
+ props: {
757
+ mode: 'multiple',
758
+ notFoundContent: '暂无数据',
759
+ allowClear: true,
760
+ showSearch: true,
761
+ showArrow: true,
762
+ maxTagCount: 1,
763
+ optionFilterProp: 'children',
764
+ filterOption: (input: string, option: { props: { children: string } }) =>
765
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
766
+ },
767
+ } },
768
+ ]
769
+ Promise.all([
770
+ loadSelectSource(`${prefixUrl.formSelectFix}/groupInfo/listNoPage`, { 'qp-status-eq': 1 }),
771
+ ]).then((x: any)=>{
772
+ formatSource(x,0, 2, tableSearchForm,['groupCode','groupName']);
773
+ })
774
+ modalTableProps = {
775
+ modalTableTitle: '选择运营仓',
776
+ tableSearchForm,
777
+ tableColumns: [
778
+ {
779
+ title: '运营仓编码',
780
+ dataIndex: 'operationWarehouseCode',
781
+ },
782
+ {
783
+ title: '运营仓名称',
784
+ dataIndex: 'name',
785
+ },
786
+ {
787
+ title: '运营组',
788
+ dataIndex: 'groupName',
789
+ },
790
+ ],
791
+ ...modalTableBusProps,
792
+ }
793
+ }
737
794
 
738
795
  // 仓库选择器(虚拟、渠道仓)(无弹窗)
739
796
  if(type === 'virtualWarehouse') {
@@ -1478,8 +1535,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1478
1535
  if(type === 'ruleTemplate') {
1479
1536
  requestConfig = {
1480
1537
  url: `${prefixUrl.selectPrefix}/ruleTemplate`,
1481
- // filter: 'qp-name,code-orGroup,like', // 过滤参数
1482
- filter: 'qp-name-like', // 过滤参数
1538
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
1483
1539
  mappingTextField: 'name',
1484
1540
  mappingTextShowKeyField: 'code',
1485
1541
  mappingValueField: 'code',
@@ -464,6 +464,63 @@ export default () => {
464
464
  };
465
465
  ```
466
466
 
467
+ ## 仓库选择器(运营仓) Select-Warehouse-005
468
+
469
+ ```tsx
470
+ import React, { useState } from 'react';
471
+ import { Tabs } from 'antd';
472
+ import {BusinessSearchSelect} from '../../../index.ts';
473
+
474
+ const { TabPane } = Tabs;
475
+
476
+ export default () => {
477
+ const selectProps = {
478
+ // mode: 'multiple',
479
+ // maxTagCount: 1,
480
+ // disabled: true
481
+ }
482
+ const selectPropsMultiple = {
483
+ mode: 'multiple',
484
+ maxTagCount: 1,
485
+ }
486
+
487
+ const [ tabKey, setTabKey ] = useState('single')
488
+ const [value, setValue] = useState(selectProps?.mode ? [] : null);
489
+
490
+ const props = {
491
+ value,
492
+ onChange: (value: any) => {
493
+ console.log(value)
494
+ setValue(value)
495
+ },
496
+ selectProps,
497
+ selectBusinessType: 'ownerWarehouse',
498
+ };
499
+
500
+ const onTabChange = (key) => {
501
+ setTabKey(key)
502
+ setValue(key === 'single' ? null: [])
503
+ }
504
+
505
+ return (
506
+ <div>
507
+ <Tabs onChange={onTabChange} activeKey={tabKey}>
508
+ <TabPane tab='单选' key='single'>
509
+ {tabKey === 'single' && (
510
+ <BusinessSearchSelect {...props} />
511
+ )}
512
+ </TabPane>
513
+ <TabPane tab='多选' key='multiple'>
514
+ {tabKey === 'multiple' && (
515
+ <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
516
+ )}
517
+ </TabPane>
518
+ </Tabs>
519
+ </div>
520
+ );
521
+ };
522
+ ```
523
+
467
524
  ## 仓库选择器(虚拟仓) Select-Warehouse-003
468
525
 
469
526
  ```tsx
@@ -81,7 +81,7 @@ const handleDefaultPrefixUrl = (type: string) => {
81
81
  case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity':
82
82
  result = '/items';
83
83
  break;
84
- case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse':
84
+ case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse': case 'ownerWarehouse':
85
85
  result = '/stock';
86
86
  break;
87
87
  case 'inventoryOrg2': case 'purchaseOrg': case 'salesOrg': case 'employee2':