@bit-sun/business-component 1.1.39 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.umirc.ts CHANGED
@@ -24,5 +24,36 @@ export default defineConfig({
24
24
  'https://bitsun-website.oss-cn-shanghai.aliyuncs.com/cdn/dist/css/luckysheet.css',
25
25
  'https://bitsun-website.oss-cn-shanghai.aliyuncs.com/cdn/dist/assets/iconfont/iconfont.css',
26
26
  ],
27
+ proxy: {
28
+ '/bop/api/': {
29
+ // bop
30
+ target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
31
+ // 英伦
32
+ // target: 'http://47.100.87.54:9106/', // 开发环境
33
+ // target: 'http://test.i-baby.net/', // 测试环境
34
+ changeOrigin: true,
35
+ pathRewrite: { '^/bop/api/': '/bop/' },
36
+ },
37
+ '/wms-ops/': {
38
+ // bop
39
+ target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
40
+ // 英伦
41
+ // target: 'http://47.100.87.54:9102/', // 开发环境
42
+ // target: 'http://test.i-baby.net/', // 测试环境
43
+ changeOrigin: true,
44
+ pathRewrite: { '^/bop/api/': '/bop/' },
45
+ },
46
+ '/user/api/': {
47
+ target: 'http://bitsun.product.app.user-manage.v1-dev:8312/um/', // 开发环境
48
+ changeOrigin: true,
49
+ pathRewrite: { '^/user/api/': '/' }, // 开发环境
50
+ },
51
+ '/channel/api/': {
52
+ target: 'http://bitsun.product.app.channel-manage.v1-dev:8301/channel-manage/', // 开发环境
53
+ // target: 'http://172.16.0.26:8033/channel-manage/',
54
+ changeOrigin: true,
55
+ pathRewrite: { '^/channel/api/': '/' }, // 开发环境
56
+ },
57
+ },
27
58
  // more config: https://d.umijs.org/config
28
59
  });
package/dist/index.esm.js CHANGED
@@ -2579,6 +2579,7 @@ var SearchSelect = function SearchSelect(props) {
2579
2579
 
2580
2580
  if (fixedParamVal) {
2581
2581
  fixedParam[item] = fixedParamVal;
2582
+ form.setFieldsValue(_objectSpread2(_objectSpread2({}, form === null || form === void 0 ? void 0 : form.getFieldsValue()), {}, _defineProperty({}, item, fixedParamVal)));
2582
2583
  }
2583
2584
  });
2584
2585
  } // 数组对象处理,对带有特殊标记的name进行处理
@@ -2758,13 +2759,13 @@ var SearchSelect = function SearchSelect(props) {
2758
2759
 
2759
2760
  ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
2760
2761
  setItems(source);
2761
- setItemsTotal(Number(res === null || res === void 0 ? void 0 : res.total));
2762
+ setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
2762
2763
  } else {
2763
2764
  setTableData(source);
2764
2765
  setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
2765
- total: Number(res === null || res === void 0 ? void 0 : res.total),
2766
- pageSize: Number(res === null || res === void 0 ? void 0 : res.size),
2767
- current: Number(res === null || res === void 0 ? void 0 : res.page)
2766
+ total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
2767
+ pageSize: Number((res === null || res === void 0 ? void 0 : res.size) || (res === null || res === void 0 ? void 0 : res.pageSize) || (params === null || params === void 0 ? void 0 : params.pageSize) || pageSize),
2768
+ current: Number((res === null || res === void 0 ? void 0 : res.page) || (res === null || res === void 0 ? void 0 : res.currentPage) || (params === null || params === void 0 ? void 0 : params.currentPage) || currentPage)
2768
2769
  }));
2769
2770
  }
2770
2771
  }).catch(function (err) {
@@ -3410,9 +3411,11 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
3410
3411
  var loadSelectSource = function loadSelectSource(url, params) {
3411
3412
  return new Promise(function (resolve, reject) {
3412
3413
  axios.get("".concat(url, "?").concat(stringify(params))).then(function (result) {
3414
+ var _result;
3415
+
3413
3416
  result = result.data;
3414
3417
 
3415
- if (result.status !== '0') {
3418
+ if (result.status && result.status !== '0' || ((_result = result) === null || _result === void 0 ? void 0 : _result.code) && result.code !== '000000') {
3416
3419
  message.error(result.msg);
3417
3420
  return;
3418
3421
  }
@@ -3490,7 +3493,15 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
3490
3493
  changeSearchForm[changePosition].field.props.treeData = formatData;
3491
3494
  };
3492
3495
 
3493
- var tableSearchForm = []; // 供应商选择器
3496
+ var tableSearchForm = [];
3497
+
3498
+ var modalTableProps = _objectSpread2({
3499
+ modalTableTitle: '',
3500
+ tableSearchForm: tableSearchForm,
3501
+ tableColumns: []
3502
+ }, modalTableBusProps);
3503
+
3504
+ var needModalTable = true; // 供应商选择器
3494
3505
 
3495
3506
  if (type === 'supplier') {
3496
3507
  tableSearchForm = [{
@@ -3578,40 +3589,108 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
3578
3589
  formatSource(x, 1, 3, tableSearchForm);
3579
3590
  formatSource(x, 2, 4, tableSearchForm);
3580
3591
  });
3592
+ modalTableProps = _objectSpread2({
3593
+ modalTableTitle: '选择供应商',
3594
+ tableSearchForm: tableSearchForm,
3595
+ tableColumns: [{
3596
+ title: '供应商编码',
3597
+ dataIndex: 'code'
3598
+ }, {
3599
+ title: '供应商名称',
3600
+ dataIndex: 'name'
3601
+ }, {
3602
+ title: '归属集团',
3603
+ dataIndex: 'conglomerateName'
3604
+ }, {
3605
+ title: '归属法人公司',
3606
+ dataIndex: 'legalCompanyName'
3607
+ }, {
3608
+ title: '归属核算主体',
3609
+ dataIndex: 'accountingName'
3610
+ }, {
3611
+ title: '共享类型',
3612
+ dataIndex: 'sharingType',
3613
+ render: function render(text) {
3614
+ var _sharingType$find;
3615
+
3616
+ return hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : (_sharingType$find = sharingType.find(function (i) {
3617
+ return i.value === text;
3618
+ })) === null || _sharingType$find === void 0 ? void 0 : _sharingType$find.text;
3619
+ }
3620
+ }]
3621
+ }, modalTableBusProps);
3581
3622
  }
3582
3623
 
3583
- var modalTableProps = _objectSpread2({
3584
- modalTableTitle: '选择供应商',
3585
- tableSearchForm: tableSearchForm,
3586
- tableColumns: [{
3587
- title: '供应商编码',
3588
- dataIndex: 'code'
3589
- }, {
3590
- title: '供应商名称',
3591
- dataIndex: 'name'
3592
- }, {
3593
- title: '归属集团',
3594
- dataIndex: 'conglomerateName'
3624
+ if (type === 'supplier2') {
3625
+ // 版本2
3626
+ tableSearchForm = [{
3627
+ name: 'qp-name-like',
3628
+ label: '供应商名称'
3595
3629
  }, {
3596
- title: '归属法人公司',
3597
- dataIndex: 'legalCompanyName'
3630
+ name: 'qp-code-like',
3631
+ label: '供应商编码'
3598
3632
  }, {
3599
- title: '归属核算主体',
3600
- dataIndex: 'accountingName'
3633
+ name: 'qp-createOrgCode-eq',
3634
+ type: 'select',
3635
+ label: '创建组织',
3636
+ field: {
3637
+ type: 'select',
3638
+ props: {
3639
+ // mode: 'multiple',
3640
+ notFoundContent: '暂无数据',
3641
+ allowClear: true,
3642
+ showSearch: true,
3643
+ showArrow: true,
3644
+ // maxTagCount: 1,
3645
+ optionFilterProp: 'children',
3646
+ filterOption: function filterOption(input, option) {
3647
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
3648
+ }
3649
+ }
3650
+ }
3601
3651
  }, {
3602
- title: '共享类型',
3603
- dataIndex: 'sharingType',
3604
- render: function render(text) {
3605
- var _sharingType$find;
3606
-
3607
- return hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : (_sharingType$find = sharingType.find(function (i) {
3608
- return i.value === text;
3609
- })) === null || _sharingType$find === void 0 ? void 0 : _sharingType$find.text;
3652
+ name: 'qp-supplierOrgCode-eq',
3653
+ type: 'select',
3654
+ label: '使用组织',
3655
+ field: {
3656
+ type: 'select',
3657
+ props: {
3658
+ // mode: 'multiple',
3659
+ notFoundContent: '暂无数据',
3660
+ allowClear: true,
3661
+ showSearch: true,
3662
+ showArrow: true,
3663
+ // maxTagCount: 1,
3664
+ optionFilterProp: 'children',
3665
+ filterOption: function filterOption(input, option) {
3666
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
3667
+ }
3668
+ }
3610
3669
  }
3611
- }]
3612
- }, modalTableBusProps);
3670
+ }];
3671
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {})]).then(function (x) {
3672
+ formatSource(x, 0, 2, tableSearchForm);
3673
+ formatSource(x, 1, 3, tableSearchForm);
3674
+ });
3675
+ modalTableProps = _objectSpread2({
3676
+ modalTableTitle: '选择供应商',
3677
+ tableSearchForm: tableSearchForm,
3678
+ tableColumns: [{
3679
+ title: '供应商编码',
3680
+ dataIndex: 'code'
3681
+ }, {
3682
+ title: '供应商名称',
3683
+ dataIndex: 'name'
3684
+ }, {
3685
+ title: '创建组织',
3686
+ dataIndex: 'createOrgName'
3687
+ }, {
3688
+ title: '使用组织',
3689
+ dataIndex: 'salesOrgName'
3690
+ }]
3691
+ }, modalTableBusProps);
3692
+ } // 商品选择器sku
3613
3693
 
3614
- var needModalTable = true; // 商品选择器sku
3615
3694
 
3616
3695
  if (type === 'skuCommodity') {
3617
3696
  requestConfig = _objectSpread2({
@@ -3663,7 +3742,9 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
3663
3742
  mode: 'multiple',
3664
3743
  maxTagCount: 1
3665
3744
  }
3666
- }, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuPropertyValueRequestConfig) || {})
3745
+ }, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuPropertyValueRequestConfig) || {
3746
+ prefixUrl: prefixUrl
3747
+ })
3667
3748
  }
3668
3749
  } : null, {
3669
3750
  name: 'qp-brandId-in',
@@ -4301,6 +4382,86 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4301
4382
  }
4302
4383
  }]
4303
4384
  }, modalTableBusProps);
4385
+ }
4386
+
4387
+ if (type === 'customer2') {
4388
+ // 版本2
4389
+ requestConfig = _objectSpread2({
4390
+ url: "".concat(prefixUrl.selectPrefix, "/customer"),
4391
+ filter: 'qp-name,code-orGroup,like',
4392
+ mappingTextField: 'name',
4393
+ mappingValueField: 'code',
4394
+ otherParams: {
4395
+ sorter: 'desc-id'
4396
+ },
4397
+ sourceName: 'customCode'
4398
+ }, requestConfigProp);
4399
+ tableSearchForm = [{
4400
+ name: 'qp-name-like',
4401
+ label: '客户名称'
4402
+ }, {
4403
+ name: 'qp-code-like',
4404
+ label: '客户编码'
4405
+ }, {
4406
+ name: 'qp-createOrgCode-eq',
4407
+ type: 'select',
4408
+ label: '创建组织',
4409
+ field: {
4410
+ type: 'select',
4411
+ props: {
4412
+ // mode: 'multiple',
4413
+ notFoundContent: '暂无数据',
4414
+ allowClear: true,
4415
+ showSearch: true,
4416
+ showArrow: true,
4417
+ // maxTagCount: 1,
4418
+ optionFilterProp: 'children',
4419
+ filterOption: function filterOption(input, option) {
4420
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
4421
+ }
4422
+ }
4423
+ }
4424
+ }, {
4425
+ name: 'qp-salesOrgCode-eq',
4426
+ type: 'select',
4427
+ label: '使用组织',
4428
+ field: {
4429
+ type: 'select',
4430
+ props: {
4431
+ // mode: 'multiple',
4432
+ notFoundContent: '暂无数据',
4433
+ allowClear: true,
4434
+ showSearch: true,
4435
+ showArrow: true,
4436
+ // maxTagCount: 1,
4437
+ optionFilterProp: 'children',
4438
+ filterOption: function filterOption(input, option) {
4439
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
4440
+ }
4441
+ }
4442
+ }
4443
+ }];
4444
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {})]).then(function (x) {
4445
+ formatSource(x, 0, 2, tableSearchForm);
4446
+ formatSource(x, 1, 3, tableSearchForm);
4447
+ });
4448
+ modalTableProps = _objectSpread2({
4449
+ modalTableTitle: '选择客户',
4450
+ tableSearchForm: tableSearchForm,
4451
+ tableColumns: [{
4452
+ title: '客户编码',
4453
+ dataIndex: 'code'
4454
+ }, {
4455
+ title: '客户名称',
4456
+ dataIndex: 'name'
4457
+ }, {
4458
+ title: '创建组织',
4459
+ dataIndex: 'createOrgName'
4460
+ }, {
4461
+ title: '使用组织',
4462
+ dataIndex: 'salesOrgName'
4463
+ }]
4464
+ }, modalTableBusProps);
4304
4465
  } // 店铺选择器
4305
4466
 
4306
4467
 
@@ -4580,6 +4741,77 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4580
4741
  dataIndex: 'officeTelephone'
4581
4742
  }]
4582
4743
  }, modalTableBusProps);
4744
+ }
4745
+
4746
+ if (type === 'employee2') {
4747
+ // 版本2
4748
+ requestConfig = _objectSpread2({
4749
+ url: "".concat(prefixUrl.selectPrefix, "/employee/pageList/v2"),
4750
+ filter: 'qp-employeeNumber,name-orGroup,like',
4751
+ mappingTextField: 'name',
4752
+ mappingTextShowKeyField: 'employeeNumber',
4753
+ mappingValueField: 'id',
4754
+ otherParams: {
4755
+ 'qp-enable-eq': 10,
4756
+ sorter: 'desc-id'
4757
+ },
4758
+ sourceName: 'employeeNumber'
4759
+ }, requestConfigProp);
4760
+ tableSearchForm = [{
4761
+ name: 'qp-name-like',
4762
+ label: '员工名称'
4763
+ }, {
4764
+ name: 'qp-employeeNumber-like',
4765
+ label: '员工编码'
4766
+ }, {
4767
+ name: 'qp-directOrgCode-in',
4768
+ type: 'select',
4769
+ label: '所属组织机构',
4770
+ field: {
4771
+ type: 'select',
4772
+ props: {
4773
+ mode: 'multiple',
4774
+ notFoundContent: '暂无数据',
4775
+ allowClear: true,
4776
+ showSearch: true,
4777
+ showArrow: true,
4778
+ maxTagCount: 1,
4779
+ optionFilterProp: 'children',
4780
+ filterOption: function filterOption(input, option) {
4781
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
4782
+ }
4783
+ }
4784
+ }
4785
+ }, {
4786
+ name: 'qp-email-like',
4787
+ label: '邮箱'
4788
+ }, {
4789
+ name: 'qp-officeTelephone-like',
4790
+ label: '手机号'
4791
+ }];
4792
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {})]).then(function (x) {
4793
+ formatSource(x, 0, 2, tableSearchForm);
4794
+ });
4795
+ modalTableProps = _objectSpread2({
4796
+ modalTableTitle: '选择员工',
4797
+ tableSearchForm: tableSearchForm,
4798
+ tableColumns: [{
4799
+ title: '员工编码',
4800
+ dataIndex: 'employeeNumber'
4801
+ }, {
4802
+ title: '员工名称',
4803
+ dataIndex: 'name'
4804
+ }, {
4805
+ title: '所属组织机构',
4806
+ dataIndex: 'directOrgName'
4807
+ }, {
4808
+ title: '邮箱',
4809
+ dataIndex: 'email'
4810
+ }, {
4811
+ title: '手机号',
4812
+ dataIndex: 'officeTelephone'
4813
+ }]
4814
+ }, modalTableBusProps);
4583
4815
  } // 配送方式选择器
4584
4816
 
4585
4817
 
package/dist/index.js CHANGED
@@ -2590,6 +2590,7 @@ var SearchSelect = function SearchSelect(props) {
2590
2590
 
2591
2591
  if (fixedParamVal) {
2592
2592
  fixedParam[item] = fixedParamVal;
2593
+ form.setFieldsValue(_objectSpread2(_objectSpread2({}, form === null || form === void 0 ? void 0 : form.getFieldsValue()), {}, _defineProperty({}, item, fixedParamVal)));
2593
2594
  }
2594
2595
  });
2595
2596
  } // 数组对象处理,对带有特殊标记的name进行处理
@@ -2769,13 +2770,13 @@ var SearchSelect = function SearchSelect(props) {
2769
2770
 
2770
2771
  ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
2771
2772
  setItems(source);
2772
- setItemsTotal(Number(res === null || res === void 0 ? void 0 : res.total));
2773
+ setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
2773
2774
  } else {
2774
2775
  setTableData(source);
2775
2776
  setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
2776
- total: Number(res === null || res === void 0 ? void 0 : res.total),
2777
- pageSize: Number(res === null || res === void 0 ? void 0 : res.size),
2778
- current: Number(res === null || res === void 0 ? void 0 : res.page)
2777
+ total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
2778
+ pageSize: Number((res === null || res === void 0 ? void 0 : res.size) || (res === null || res === void 0 ? void 0 : res.pageSize) || (params === null || params === void 0 ? void 0 : params.pageSize) || pageSize),
2779
+ current: Number((res === null || res === void 0 ? void 0 : res.page) || (res === null || res === void 0 ? void 0 : res.currentPage) || (params === null || params === void 0 ? void 0 : params.currentPage) || currentPage)
2779
2780
  }));
2780
2781
  }
2781
2782
  }).catch(function (err) {
@@ -3421,9 +3422,11 @@ var getDictionaryTextByValue = function getDictionaryTextByValue(dicCode, value)
3421
3422
  var loadSelectSource = function loadSelectSource(url, params) {
3422
3423
  return new Promise(function (resolve, reject) {
3423
3424
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
3425
+ var _result;
3426
+
3424
3427
  result = result.data;
3425
3428
 
3426
- if (result.status !== '0') {
3429
+ if (result.status && result.status !== '0' || ((_result = result) === null || _result === void 0 ? void 0 : _result.code) && result.code !== '000000') {
3427
3430
  antd.message.error(result.msg);
3428
3431
  return;
3429
3432
  }
@@ -3501,7 +3504,15 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
3501
3504
  changeSearchForm[changePosition].field.props.treeData = formatData;
3502
3505
  };
3503
3506
 
3504
- var tableSearchForm = []; // 供应商选择器
3507
+ var tableSearchForm = [];
3508
+
3509
+ var modalTableProps = _objectSpread2({
3510
+ modalTableTitle: '',
3511
+ tableSearchForm: tableSearchForm,
3512
+ tableColumns: []
3513
+ }, modalTableBusProps);
3514
+
3515
+ var needModalTable = true; // 供应商选择器
3505
3516
 
3506
3517
  if (type === 'supplier') {
3507
3518
  tableSearchForm = [{
@@ -3589,40 +3600,108 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
3589
3600
  formatSource(x, 1, 3, tableSearchForm);
3590
3601
  formatSource(x, 2, 4, tableSearchForm);
3591
3602
  });
3603
+ modalTableProps = _objectSpread2({
3604
+ modalTableTitle: '选择供应商',
3605
+ tableSearchForm: tableSearchForm,
3606
+ tableColumns: [{
3607
+ title: '供应商编码',
3608
+ dataIndex: 'code'
3609
+ }, {
3610
+ title: '供应商名称',
3611
+ dataIndex: 'name'
3612
+ }, {
3613
+ title: '归属集团',
3614
+ dataIndex: 'conglomerateName'
3615
+ }, {
3616
+ title: '归属法人公司',
3617
+ dataIndex: 'legalCompanyName'
3618
+ }, {
3619
+ title: '归属核算主体',
3620
+ dataIndex: 'accountingName'
3621
+ }, {
3622
+ title: '共享类型',
3623
+ dataIndex: 'sharingType',
3624
+ render: function render(text) {
3625
+ var _sharingType$find;
3626
+
3627
+ return hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : (_sharingType$find = sharingType.find(function (i) {
3628
+ return i.value === text;
3629
+ })) === null || _sharingType$find === void 0 ? void 0 : _sharingType$find.text;
3630
+ }
3631
+ }]
3632
+ }, modalTableBusProps);
3592
3633
  }
3593
3634
 
3594
- var modalTableProps = _objectSpread2({
3595
- modalTableTitle: '选择供应商',
3596
- tableSearchForm: tableSearchForm,
3597
- tableColumns: [{
3598
- title: '供应商编码',
3599
- dataIndex: 'code'
3600
- }, {
3601
- title: '供应商名称',
3602
- dataIndex: 'name'
3603
- }, {
3604
- title: '归属集团',
3605
- dataIndex: 'conglomerateName'
3635
+ if (type === 'supplier2') {
3636
+ // 版本2
3637
+ tableSearchForm = [{
3638
+ name: 'qp-name-like',
3639
+ label: '供应商名称'
3606
3640
  }, {
3607
- title: '归属法人公司',
3608
- dataIndex: 'legalCompanyName'
3641
+ name: 'qp-code-like',
3642
+ label: '供应商编码'
3609
3643
  }, {
3610
- title: '归属核算主体',
3611
- dataIndex: 'accountingName'
3644
+ name: 'qp-createOrgCode-eq',
3645
+ type: 'select',
3646
+ label: '创建组织',
3647
+ field: {
3648
+ type: 'select',
3649
+ props: {
3650
+ // mode: 'multiple',
3651
+ notFoundContent: '暂无数据',
3652
+ allowClear: true,
3653
+ showSearch: true,
3654
+ showArrow: true,
3655
+ // maxTagCount: 1,
3656
+ optionFilterProp: 'children',
3657
+ filterOption: function filterOption(input, option) {
3658
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
3659
+ }
3660
+ }
3661
+ }
3612
3662
  }, {
3613
- title: '共享类型',
3614
- dataIndex: 'sharingType',
3615
- render: function render(text) {
3616
- var _sharingType$find;
3617
-
3618
- return hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : (_sharingType$find = sharingType.find(function (i) {
3619
- return i.value === text;
3620
- })) === null || _sharingType$find === void 0 ? void 0 : _sharingType$find.text;
3663
+ name: 'qp-supplierOrgCode-eq',
3664
+ type: 'select',
3665
+ label: '使用组织',
3666
+ field: {
3667
+ type: 'select',
3668
+ props: {
3669
+ // mode: 'multiple',
3670
+ notFoundContent: '暂无数据',
3671
+ allowClear: true,
3672
+ showSearch: true,
3673
+ showArrow: true,
3674
+ // maxTagCount: 1,
3675
+ optionFilterProp: 'children',
3676
+ filterOption: function filterOption(input, option) {
3677
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
3678
+ }
3679
+ }
3621
3680
  }
3622
- }]
3623
- }, modalTableBusProps);
3681
+ }];
3682
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {})]).then(function (x) {
3683
+ formatSource(x, 0, 2, tableSearchForm);
3684
+ formatSource(x, 1, 3, tableSearchForm);
3685
+ });
3686
+ modalTableProps = _objectSpread2({
3687
+ modalTableTitle: '选择供应商',
3688
+ tableSearchForm: tableSearchForm,
3689
+ tableColumns: [{
3690
+ title: '供应商编码',
3691
+ dataIndex: 'code'
3692
+ }, {
3693
+ title: '供应商名称',
3694
+ dataIndex: 'name'
3695
+ }, {
3696
+ title: '创建组织',
3697
+ dataIndex: 'createOrgName'
3698
+ }, {
3699
+ title: '使用组织',
3700
+ dataIndex: 'salesOrgName'
3701
+ }]
3702
+ }, modalTableBusProps);
3703
+ } // 商品选择器sku
3624
3704
 
3625
- var needModalTable = true; // 商品选择器sku
3626
3705
 
3627
3706
  if (type === 'skuCommodity') {
3628
3707
  requestConfig = _objectSpread2({
@@ -3674,7 +3753,9 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
3674
3753
  mode: 'multiple',
3675
3754
  maxTagCount: 1
3676
3755
  }
3677
- }, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuPropertyValueRequestConfig) || {})
3756
+ }, (requestConfigProp === null || requestConfigProp === void 0 ? void 0 : requestConfigProp.skuPropertyValueRequestConfig) || {
3757
+ prefixUrl: prefixUrl
3758
+ })
3678
3759
  }
3679
3760
  } : null, {
3680
3761
  name: 'qp-brandId-in',
@@ -4312,6 +4393,86 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4312
4393
  }
4313
4394
  }]
4314
4395
  }, modalTableBusProps);
4396
+ }
4397
+
4398
+ if (type === 'customer2') {
4399
+ // 版本2
4400
+ requestConfig = _objectSpread2({
4401
+ url: "".concat(prefixUrl.selectPrefix, "/customer"),
4402
+ filter: 'qp-name,code-orGroup,like',
4403
+ mappingTextField: 'name',
4404
+ mappingValueField: 'code',
4405
+ otherParams: {
4406
+ sorter: 'desc-id'
4407
+ },
4408
+ sourceName: 'customCode'
4409
+ }, requestConfigProp);
4410
+ tableSearchForm = [{
4411
+ name: 'qp-name-like',
4412
+ label: '客户名称'
4413
+ }, {
4414
+ name: 'qp-code-like',
4415
+ label: '客户编码'
4416
+ }, {
4417
+ name: 'qp-createOrgCode-eq',
4418
+ type: 'select',
4419
+ label: '创建组织',
4420
+ field: {
4421
+ type: 'select',
4422
+ props: {
4423
+ // mode: 'multiple',
4424
+ notFoundContent: '暂无数据',
4425
+ allowClear: true,
4426
+ showSearch: true,
4427
+ showArrow: true,
4428
+ // maxTagCount: 1,
4429
+ optionFilterProp: 'children',
4430
+ filterOption: function filterOption(input, option) {
4431
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
4432
+ }
4433
+ }
4434
+ }
4435
+ }, {
4436
+ name: 'qp-salesOrgCode-eq',
4437
+ type: 'select',
4438
+ label: '使用组织',
4439
+ field: {
4440
+ type: 'select',
4441
+ props: {
4442
+ // mode: 'multiple',
4443
+ notFoundContent: '暂无数据',
4444
+ allowClear: true,
4445
+ showSearch: true,
4446
+ showArrow: true,
4447
+ // maxTagCount: 1,
4448
+ optionFilterProp: 'children',
4449
+ filterOption: function filterOption(input, option) {
4450
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
4451
+ }
4452
+ }
4453
+ }
4454
+ }];
4455
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {}), loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {})]).then(function (x) {
4456
+ formatSource(x, 0, 2, tableSearchForm);
4457
+ formatSource(x, 1, 3, tableSearchForm);
4458
+ });
4459
+ modalTableProps = _objectSpread2({
4460
+ modalTableTitle: '选择客户',
4461
+ tableSearchForm: tableSearchForm,
4462
+ tableColumns: [{
4463
+ title: '客户编码',
4464
+ dataIndex: 'code'
4465
+ }, {
4466
+ title: '客户名称',
4467
+ dataIndex: 'name'
4468
+ }, {
4469
+ title: '创建组织',
4470
+ dataIndex: 'createOrgName'
4471
+ }, {
4472
+ title: '使用组织',
4473
+ dataIndex: 'salesOrgName'
4474
+ }]
4475
+ }, modalTableBusProps);
4315
4476
  } // 店铺选择器
4316
4477
 
4317
4478
 
@@ -4591,6 +4752,77 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
4591
4752
  dataIndex: 'officeTelephone'
4592
4753
  }]
4593
4754
  }, modalTableBusProps);
4755
+ }
4756
+
4757
+ if (type === 'employee2') {
4758
+ // 版本2
4759
+ requestConfig = _objectSpread2({
4760
+ url: "".concat(prefixUrl.selectPrefix, "/employee/pageList/v2"),
4761
+ filter: 'qp-employeeNumber,name-orGroup,like',
4762
+ mappingTextField: 'name',
4763
+ mappingTextShowKeyField: 'employeeNumber',
4764
+ mappingValueField: 'id',
4765
+ otherParams: {
4766
+ 'qp-enable-eq': 10,
4767
+ sorter: 'desc-id'
4768
+ },
4769
+ sourceName: 'employeeNumber'
4770
+ }, requestConfigProp);
4771
+ tableSearchForm = [{
4772
+ name: 'qp-name-like',
4773
+ label: '员工名称'
4774
+ }, {
4775
+ name: 'qp-employeeNumber-like',
4776
+ label: '员工编码'
4777
+ }, {
4778
+ name: 'qp-directOrgCode-in',
4779
+ type: 'select',
4780
+ label: '所属组织机构',
4781
+ field: {
4782
+ type: 'select',
4783
+ props: {
4784
+ mode: 'multiple',
4785
+ notFoundContent: '暂无数据',
4786
+ allowClear: true,
4787
+ showSearch: true,
4788
+ showArrow: true,
4789
+ maxTagCount: 1,
4790
+ optionFilterProp: 'children',
4791
+ filterOption: function filterOption(input, option) {
4792
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
4793
+ }
4794
+ }
4795
+ }
4796
+ }, {
4797
+ name: 'qp-email-like',
4798
+ label: '邮箱'
4799
+ }, {
4800
+ name: 'qp-officeTelephone-like',
4801
+ label: '手机号'
4802
+ }];
4803
+ Promise.all([loadSelectSource("".concat(prefixUrl.formSelectFix, "/org/listNoPage"), {})]).then(function (x) {
4804
+ formatSource(x, 0, 2, tableSearchForm);
4805
+ });
4806
+ modalTableProps = _objectSpread2({
4807
+ modalTableTitle: '选择员工',
4808
+ tableSearchForm: tableSearchForm,
4809
+ tableColumns: [{
4810
+ title: '员工编码',
4811
+ dataIndex: 'employeeNumber'
4812
+ }, {
4813
+ title: '员工名称',
4814
+ dataIndex: 'name'
4815
+ }, {
4816
+ title: '所属组织机构',
4817
+ dataIndex: 'directOrgName'
4818
+ }, {
4819
+ title: '邮箱',
4820
+ dataIndex: 'email'
4821
+ }, {
4822
+ title: '手机号',
4823
+ dataIndex: 'officeTelephone'
4824
+ }]
4825
+ }, modalTableBusProps);
4594
4826
  } // 配送方式选择器
4595
4827
 
4596
4828
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "1.1.39",
3
+ "version": "1.2.0",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -57,6 +57,14 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
57
57
 
58
58
 
59
59
  let tableSearchForm: any [] = [];
60
+ let modalTableProps = {
61
+ modalTableTitle: '',
62
+ tableSearchForm,
63
+ tableColumns: [],
64
+ ...modalTableBusProps,
65
+ }
66
+ let needModalTable = true;
67
+
60
68
  // 供应商选择器
61
69
  if(type === 'supplier') {
62
70
  tableSearchForm = [
@@ -126,40 +134,104 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
126
134
  formatSource(x,1, 3, tableSearchForm);
127
135
  formatSource(x,2, 4, tableSearchForm);
128
136
  })
137
+ modalTableProps = {
138
+ modalTableTitle: '选择供应商',
139
+ tableSearchForm,
140
+ tableColumns: [
141
+ {
142
+ title: '供应商编码',
143
+ dataIndex: 'code',
144
+ },
145
+ {
146
+ title: '供应商名称',
147
+ dataIndex: 'name',
148
+ },
149
+ {
150
+ title: '归属集团',
151
+ dataIndex: 'conglomerateName',
152
+ },
153
+ {
154
+ title: '归属法人公司',
155
+ dataIndex: 'legalCompanyName',
156
+ },
157
+ {
158
+ title: '归属核算主体',
159
+ dataIndex: 'accountingName',
160
+ },
161
+ {
162
+ title: '共享类型',
163
+ dataIndex: 'sharingType',
164
+ render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
165
+ },
166
+ ],
167
+ ...modalTableBusProps,
168
+ }
129
169
  }
130
- let modalTableProps = {
131
- modalTableTitle: '选择供应商',
132
- tableSearchForm,
133
- tableColumns: [
134
- {
135
- title: '供应商编码',
136
- dataIndex: 'code',
137
- },
138
- {
139
- title: '供应商名称',
140
- dataIndex: 'name',
141
- },
142
- {
143
- title: '归属集团',
144
- dataIndex: 'conglomerateName',
145
- },
146
- {
147
- title: '归属法人公司',
148
- dataIndex: 'legalCompanyName',
149
- },
150
- {
151
- title: '归属核算主体',
152
- dataIndex: 'accountingName',
153
- },
154
- {
155
- title: '共享类型',
156
- dataIndex: 'sharingType',
157
- render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
158
- },
159
- ],
160
- ...modalTableBusProps,
170
+ if(type === 'supplier2') {
171
+ // 版本2
172
+ tableSearchForm = [
173
+ { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
174
+ { name: 'qp-code-like', label: '供应商编码' },
175
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
176
+ type: 'select',
177
+ props: {
178
+ // mode: 'multiple',
179
+ notFoundContent: '暂无数据',
180
+ allowClear: true,
181
+ showSearch: true,
182
+ showArrow: true,
183
+ // maxTagCount: 1,
184
+ optionFilterProp: 'children',
185
+ filterOption: (input: string, option: { props: { children: string } }) =>
186
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
187
+ },
188
+ } },
189
+ { name: 'qp-supplierOrgCode-eq', type: 'select', label: '使用组织', field: {
190
+ type: 'select',
191
+ props: {
192
+ // mode: 'multiple',
193
+ notFoundContent: '暂无数据',
194
+ allowClear: true,
195
+ showSearch: true,
196
+ showArrow: true,
197
+ // maxTagCount: 1,
198
+ optionFilterProp: 'children',
199
+ filterOption: (input: string, option: { props: { children: string } }) =>
200
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
201
+ },
202
+ } },
203
+ ]
204
+ Promise.all([
205
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
206
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
207
+ ]).then((x: any)=>{
208
+ formatSource(x,0, 2, tableSearchForm);
209
+ formatSource(x,1, 3, tableSearchForm);
210
+ })
211
+ modalTableProps = {
212
+ modalTableTitle: '选择供应商',
213
+ tableSearchForm,
214
+ tableColumns: [
215
+ {
216
+ title: '供应商编码',
217
+ dataIndex: 'code',
218
+ },
219
+ {
220
+ title: '供应商名称',
221
+ dataIndex: 'name',
222
+ },
223
+ {
224
+ title: '创建组织',
225
+ dataIndex: 'createOrgName',
226
+ },
227
+ {
228
+ title: '使用组织',
229
+ dataIndex: 'salesOrgName',
230
+ },
231
+ ],
232
+ ...modalTableBusProps
233
+ }
161
234
  }
162
- let needModalTable = true;
163
235
 
164
236
  // 商品选择器sku
165
237
  if(type === 'skuCommodity') {
@@ -192,7 +264,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
192
264
  mode: 'multiple',
193
265
  maxTagCount: 1,
194
266
  },
195
- ...(requestConfigProp?.skuPropertyValueRequestConfig || {}),
267
+ ...(requestConfigProp?.skuPropertyValueRequestConfig || { prefixUrl }), // 可自定义此处规格请求接口相关参数,默认前缀取自sku选择器
196
268
  },
197
269
  }
198
270
  } : null,
@@ -783,6 +855,82 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
783
855
  ...modalTableBusProps
784
856
  }
785
857
  }
858
+ if(type === 'customer2') {
859
+ // 版本2
860
+ requestConfig = {
861
+ url: `${prefixUrl.selectPrefix}/customer`,
862
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
863
+ mappingTextField: 'name',
864
+ mappingValueField: 'code',
865
+ otherParams: {
866
+ sorter: 'desc-id'
867
+ }, // 默认参数
868
+ sourceName: 'customCode',
869
+ ...requestConfigProp,
870
+ }
871
+ tableSearchForm = [
872
+ { name: 'qp-name-like', label: '客户名称' },
873
+ { name: 'qp-code-like', label: '客户编码' },
874
+ { name: 'qp-createOrgCode-eq', type: 'select', label: '创建组织', field: {
875
+ type: 'select',
876
+ props: {
877
+ // mode: 'multiple',
878
+ notFoundContent: '暂无数据',
879
+ allowClear: true,
880
+ showSearch: true,
881
+ showArrow: true,
882
+ // maxTagCount: 1,
883
+ optionFilterProp: 'children',
884
+ filterOption: (input: string, option: { props: { children: string } }) =>
885
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
886
+ },
887
+ } },
888
+ { name: 'qp-salesOrgCode-eq', type: 'select', label: '使用组织', field: {
889
+ type: 'select',
890
+ props: {
891
+ // mode: 'multiple',
892
+ notFoundContent: '暂无数据',
893
+ allowClear: true,
894
+ showSearch: true,
895
+ showArrow: true,
896
+ // maxTagCount: 1,
897
+ optionFilterProp: 'children',
898
+ filterOption: (input: string, option: { props: { children: string } }) =>
899
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
900
+ },
901
+ } },
902
+ ]
903
+ Promise.all([
904
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
905
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`,{}),
906
+ ]).then((x: any)=>{
907
+ formatSource(x,0, 2, tableSearchForm);
908
+ formatSource(x,1, 3, tableSearchForm);
909
+ })
910
+ modalTableProps = {
911
+ modalTableTitle: '选择客户',
912
+ tableSearchForm,
913
+ tableColumns: [
914
+ {
915
+ title: '客户编码',
916
+ dataIndex: 'code',
917
+ },
918
+ {
919
+ title: '客户名称',
920
+ dataIndex: 'name',
921
+ },
922
+ {
923
+ title: '创建组织',
924
+ dataIndex: 'createOrgName',
925
+ },
926
+ {
927
+ title: '使用组织',
928
+ dataIndex: 'salesOrgName',
929
+ },
930
+ ],
931
+ ...modalTableBusProps
932
+ }
933
+ }
786
934
 
787
935
  // 店铺选择器
788
936
  if(type === 'shopFile') {
@@ -1043,6 +1191,74 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1043
1191
  ...modalTableBusProps
1044
1192
  }
1045
1193
  }
1194
+ if(type === 'employee2') {
1195
+ // 版本2
1196
+ requestConfig = {
1197
+ url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
1198
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
1199
+ mappingTextField: 'name',
1200
+ mappingTextShowKeyField: 'employeeNumber',
1201
+ mappingValueField: 'id',
1202
+ otherParams: {
1203
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
1204
+ sorter: 'desc-id'
1205
+ }, // 默认参数
1206
+ sourceName: 'employeeNumber',
1207
+ ...requestConfigProp,
1208
+ }
1209
+ tableSearchForm = [
1210
+ { name: 'qp-name-like', label: '员工名称' },
1211
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
1212
+ { name: 'qp-directOrgCode-in', type: 'select', label: '所属组织机构', field: {
1213
+ type: 'select',
1214
+ props: {
1215
+ mode: 'multiple',
1216
+ notFoundContent: '暂无数据',
1217
+ allowClear: true,
1218
+ showSearch: true,
1219
+ showArrow: true,
1220
+ maxTagCount: 1,
1221
+ optionFilterProp: 'children',
1222
+ filterOption: (input: string, option: { props: { children: string } }) =>
1223
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1224
+ },
1225
+ } },
1226
+ { name: 'qp-email-like', label: '邮箱' },
1227
+ { name: 'qp-officeTelephone-like', label: '手机号' },
1228
+ ]
1229
+ Promise.all([
1230
+ loadSelectSource(`${prefixUrl.formSelectFix}/org/listNoPage`, {}),
1231
+ ]).then((x: any)=>{
1232
+ formatSource(x,0, 2, tableSearchForm);
1233
+ })
1234
+ modalTableProps = {
1235
+ modalTableTitle: '选择员工',
1236
+ tableSearchForm,
1237
+ tableColumns: [
1238
+ {
1239
+ title: '员工编码',
1240
+ dataIndex: 'employeeNumber',
1241
+ },
1242
+ {
1243
+ title: '员工名称',
1244
+ dataIndex: 'name',
1245
+ },
1246
+ {
1247
+ title: '所属组织机构',
1248
+ dataIndex: 'directOrgName',
1249
+ },
1250
+ {
1251
+ title: '邮箱',
1252
+ dataIndex: 'email',
1253
+ },
1254
+ {
1255
+ title: '手机号',
1256
+ dataIndex: 'officeTelephone',
1257
+ },
1258
+ ],
1259
+ ...modalTableBusProps
1260
+ }
1261
+ }
1046
1262
 
1047
1263
  // 配送方式选择器
1048
1264
  if(type === 'deliveryMode') {
@@ -56,6 +56,11 @@ export default () => {
56
56
  selectBusinessType: 'supplier',
57
57
  };
58
58
 
59
+ const props2 = {
60
+ prefixUrl: { selectPrefix: '/channel/api', formSelectFix: '/channel/api' },
61
+ selectBusinessType: 'supplier2',
62
+ }
63
+
59
64
  const onTabChange = (key) => {
60
65
  setTabKey(key)
61
66
  setValue(key === 'single' ? null: [])
@@ -66,12 +71,22 @@ export default () => {
66
71
  <Tabs onChange={onTabChange} activeKey={tabKey}>
67
72
  <TabPane tab='单选' key='single'>
68
73
  {tabKey === 'single' && (
69
- <BusinessSearchSelect {...props} />
74
+ <>
75
+ <span>版本1:支持英伦项目...</span>
76
+ <BusinessSearchSelect {...props} />
77
+ <span>版本2:支持麦克英孚项目...</span>
78
+ <BusinessSearchSelect {...props2} />
79
+ </>
70
80
  )}
71
81
  </TabPane>
72
82
  <TabPane tab='多选' key='multiple'>
73
83
  {tabKey === 'multiple' && (
74
- <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
84
+ <>
85
+ <span>版本1:支持英伦项目...</span>
86
+ <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
87
+ <span>版本2:支持麦克英孚项目...</span>
88
+ <BusinessSearchSelect {...props2} selectProps={selectPropsMultiple} />
89
+ </>
75
90
  )}
76
91
  </TabPane>
77
92
  </Tabs>
@@ -619,6 +634,11 @@ export default () => {
619
634
  selectBusinessType: 'customer',
620
635
  };
621
636
 
637
+ const props2 = {
638
+ prefixUrl: { selectPrefix: '/channel/api', formSelectFix: '/channel/api' },
639
+ selectBusinessType: 'customer2',
640
+ }
641
+
622
642
  const onTabChange = (key) => {
623
643
  setTabKey(key)
624
644
  setValue(key === 'single' ? null: [])
@@ -629,12 +649,22 @@ export default () => {
629
649
  <Tabs onChange={onTabChange} activeKey={tabKey}>
630
650
  <TabPane tab='单选' key='single'>
631
651
  {tabKey === 'single' && (
632
- <BusinessSearchSelect {...props} />
652
+ <>
653
+ <span>版本1:支持英伦项目...</span>
654
+ <BusinessSearchSelect {...props} />
655
+ <span>版本2:支持麦克英孚项目...</span>
656
+ <BusinessSearchSelect {...props2} />
657
+ </>
633
658
  )}
634
659
  </TabPane>
635
660
  <TabPane tab='多选' key='multiple'>
636
661
  {tabKey === 'multiple' && (
637
- <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
662
+ <>
663
+ <span>版本1:支持英伦项目...</span>
664
+ <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
665
+ <span>版本2:支持麦克英孚项目...</span>
666
+ <BusinessSearchSelect {...props2} selectProps={selectPropsMultiple} />
667
+ </>
638
668
  )}
639
669
  </TabPane>
640
670
  </Tabs>
@@ -964,6 +994,12 @@ export default () => {
964
994
  selectProps,
965
995
  selectBusinessType: 'employee',
966
996
  };
997
+
998
+ const props2 = {
999
+ ...props,
1000
+ prefixUrl: { selectPrefix: '/user/api', formSelectFix: '/user/api' },
1001
+ selectBusinessType: 'employee2',
1002
+ }
967
1003
 
968
1004
  const onTabChange = (key) => {
969
1005
  setTabKey(key)
@@ -975,12 +1011,22 @@ export default () => {
975
1011
  <Tabs onChange={onTabChange} activeKey={tabKey}>
976
1012
  <TabPane tab='单选' key='single'>
977
1013
  {tabKey === 'single' && (
978
- <BusinessSearchSelect {...props} />
1014
+ <>
1015
+ <span>版本1:支持英伦项目...</span>
1016
+ <BusinessSearchSelect {...props} />
1017
+ <span>版本2:支持麦克英孚项目...</span>
1018
+ <BusinessSearchSelect {...props2} />
1019
+ </>
979
1020
  )}
980
1021
  </TabPane>
981
1022
  <TabPane tab='多选' key='multiple'>
982
1023
  {tabKey === 'multiple' && (
983
- <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
1024
+ <>
1025
+ <span>版本1:支持英伦项目...</span>
1026
+ <BusinessSearchSelect {...props} selectProps={selectPropsMultiple} />
1027
+ <span>版本2:支持麦克英孚项目...</span>
1028
+ <BusinessSearchSelect {...props2} selectProps={selectPropsMultiple} />
1029
+ </>
984
1030
  )}
985
1031
  </TabPane>
986
1032
  </Tabs>
@@ -59,7 +59,7 @@ const loadSelectSource = (url: string, params?: any) => {
59
59
  .get(`${url}?${stringify(params)}`)
60
60
  .then((result: any) => {
61
61
  result = result.data;
62
- if (result.status !== '0') {
62
+ if ((result.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
63
63
  message.error(result.msg);
64
64
  return;
65
65
  }
@@ -96,6 +96,7 @@ const SearchSelect = (props: any) => {
96
96
  const fixedParamVal = ctx.form.getFieldValue(fieldValToParam[index]);
97
97
  if (fixedParamVal) {
98
98
  fixedParam[item] = fixedParamVal;
99
+ form.setFieldsValue({ ...form?.getFieldsValue(), [item]: fixedParamVal })
99
100
  }
100
101
  });
101
102
  }
@@ -268,10 +269,10 @@ const SearchSelect = (props: any) => {
268
269
  if(type === 1) {
269
270
  ctx?.form?.setFieldSource(resultSourceKey, source)
270
271
  setItems(source)
271
- setItemsTotal(Number(res?.total))
272
+ setItemsTotal(Number(res?.total || res?.totalCount || source.length))
272
273
  } else {
273
274
  setTableData(source)
274
- setTablePagination({...tablePagination, total: Number(res?.total), pageSize: Number(res?.size), current: Number(res?.page)})
275
+ setTablePagination({...tablePagination, total: Number(res?.total || res?.totalCount || source.length), pageSize: Number(res?.size || res?.pageSize || (params?.pageSize || pageSize)), current: Number(res?.page || res?.currentPage || (params?.currentPage || currentPage))})
275
276
  }
276
277
  })
277
278
  .catch((err) => { setFetching(false) });