@bit-sun/business-component 4.2.1-alpha.7-aiwei → 4.2.1-alpha.9-aiwei
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
|
@@ -5323,7 +5323,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5323
5323
|
viewShowValueStr = _ref.viewShowValueStr,
|
|
5324
5324
|
searchStartLength = _ref.searchStartLength,
|
|
5325
5325
|
_ref$isQuery = _ref.isQuery,
|
|
5326
|
-
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery
|
|
5326
|
+
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery,
|
|
5327
|
+
_ref$requireSearchCon = _ref.requireSearchCondition,
|
|
5328
|
+
requireSearchCondition = _ref$requireSearchCon === void 0 ? false : _ref$requireSearchCon;
|
|
5327
5329
|
var requestConfig = _objectSpread2({
|
|
5328
5330
|
url: url,
|
|
5329
5331
|
method: method,
|
|
@@ -5886,6 +5888,16 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5886
5888
|
};
|
|
5887
5889
|
var onSearchTable = function onSearchTable() {
|
|
5888
5890
|
var params = form.getFieldsValue();
|
|
5891
|
+
// 必须选择一个值
|
|
5892
|
+
if (requireSearchCondition) {
|
|
5893
|
+
var hasValidValue = Object.values(params).some(function (value) {
|
|
5894
|
+
return Array.isArray(value) && value.length > 0 || typeof value === 'string' && value.trim().length > 0;
|
|
5895
|
+
});
|
|
5896
|
+
if (!hasValidValue) {
|
|
5897
|
+
message$1.warning('请至少选择一个搜索条件');
|
|
5898
|
+
return;
|
|
5899
|
+
}
|
|
5900
|
+
}
|
|
5889
5901
|
setModalSearched(true);
|
|
5890
5902
|
setTableFormParams(params);
|
|
5891
5903
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
@@ -10474,7 +10486,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10474
10486
|
}, {
|
|
10475
10487
|
name: 'qp-zzdlbm-in',
|
|
10476
10488
|
type: 'select',
|
|
10477
|
-
label: '
|
|
10489
|
+
label: '品类',
|
|
10478
10490
|
field: {
|
|
10479
10491
|
type: 'select',
|
|
10480
10492
|
props: {
|
|
@@ -10493,7 +10505,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10493
10505
|
}, {
|
|
10494
10506
|
name: 'qp-zzzlbm-in',
|
|
10495
10507
|
type: 'select',
|
|
10496
|
-
label: '
|
|
10508
|
+
label: '大类',
|
|
10497
10509
|
field: {
|
|
10498
10510
|
type: 'select',
|
|
10499
10511
|
props: {
|
|
@@ -10512,7 +10524,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10512
10524
|
}, {
|
|
10513
10525
|
name: 'qp-zzxlbm-in',
|
|
10514
10526
|
type: 'select',
|
|
10515
|
-
label: '
|
|
10527
|
+
label: '中类',
|
|
10516
10528
|
field: {
|
|
10517
10529
|
type: 'select',
|
|
10518
10530
|
props: {
|
|
@@ -11578,11 +11590,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11578
11590
|
}
|
|
11579
11591
|
}
|
|
11580
11592
|
}, {
|
|
11581
|
-
name: 'qp-
|
|
11582
|
-
type: '
|
|
11583
|
-
label: '
|
|
11593
|
+
name: 'qp-operationWarehouseClassification-in',
|
|
11594
|
+
type: 'select',
|
|
11595
|
+
label: '分类',
|
|
11584
11596
|
field: {
|
|
11585
|
-
type: '
|
|
11597
|
+
type: 'select',
|
|
11586
11598
|
props: {
|
|
11587
11599
|
multiple: true,
|
|
11588
11600
|
treeData: [],
|
|
@@ -11598,7 +11610,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11598
11610
|
},
|
|
11599
11611
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11600
11612
|
}
|
|
11601
|
-
}
|
|
11613
|
+
},
|
|
11614
|
+
initialSource: getDictionarySource$1('BASIC_OPS_WH_TYPE')
|
|
11602
11615
|
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
11603
11616
|
name: 'qp-status-eq',
|
|
11604
11617
|
type: 'select',
|
|
@@ -11626,10 +11639,6 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11626
11639
|
});
|
|
11627
11640
|
});
|
|
11628
11641
|
x[1].data = newData1;
|
|
11629
|
-
var channelDisabledJude = function channelDisabledJude(data) {
|
|
11630
|
-
return data['parentCode'] === '0';
|
|
11631
|
-
}; // 所属销售渠道 树节点不能点判断
|
|
11632
|
-
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
11633
11642
|
});
|
|
11634
11643
|
modalTableProps = _objectSpread2({
|
|
11635
11644
|
modalTableTitle: '选择运营仓',
|
|
@@ -11901,18 +11910,18 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11901
11910
|
name: 'qp-code-like',
|
|
11902
11911
|
label: '客户编码'
|
|
11903
11912
|
}, {
|
|
11904
|
-
name: 'qp-createOrgCode-
|
|
11913
|
+
name: 'qp-createOrgCode-in',
|
|
11905
11914
|
type: 'select',
|
|
11906
11915
|
label: '创建组织',
|
|
11907
11916
|
field: {
|
|
11908
11917
|
type: 'select',
|
|
11909
11918
|
props: {
|
|
11910
|
-
|
|
11919
|
+
mode: 'multiple',
|
|
11911
11920
|
notFoundContent: '暂无数据',
|
|
11912
11921
|
allowClear: true,
|
|
11913
11922
|
showSearch: true,
|
|
11914
11923
|
showArrow: true,
|
|
11915
|
-
|
|
11924
|
+
maxTagCount: 1,
|
|
11916
11925
|
optionFilterProp: 'children',
|
|
11917
11926
|
filterOption: function filterOption(input, option) {
|
|
11918
11927
|
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
package/dist/index.js
CHANGED
|
@@ -5346,7 +5346,9 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5346
5346
|
viewShowValueStr = _ref.viewShowValueStr,
|
|
5347
5347
|
searchStartLength = _ref.searchStartLength,
|
|
5348
5348
|
_ref$isQuery = _ref.isQuery,
|
|
5349
|
-
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery
|
|
5349
|
+
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery,
|
|
5350
|
+
_ref$requireSearchCon = _ref.requireSearchCondition,
|
|
5351
|
+
requireSearchCondition = _ref$requireSearchCon === void 0 ? false : _ref$requireSearchCon;
|
|
5350
5352
|
var requestConfig = _objectSpread2({
|
|
5351
5353
|
url: url,
|
|
5352
5354
|
method: method,
|
|
@@ -5909,6 +5911,16 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5909
5911
|
};
|
|
5910
5912
|
var onSearchTable = function onSearchTable() {
|
|
5911
5913
|
var params = form.getFieldsValue();
|
|
5914
|
+
// 必须选择一个值
|
|
5915
|
+
if (requireSearchCondition) {
|
|
5916
|
+
var hasValidValue = Object.values(params).some(function (value) {
|
|
5917
|
+
return Array.isArray(value) && value.length > 0 || typeof value === 'string' && value.trim().length > 0;
|
|
5918
|
+
});
|
|
5919
|
+
if (!hasValidValue) {
|
|
5920
|
+
antd.message.warning('请至少选择一个搜索条件');
|
|
5921
|
+
return;
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5912
5924
|
setModalSearched(true);
|
|
5913
5925
|
setTableFormParams(params);
|
|
5914
5926
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
@@ -10497,7 +10509,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10497
10509
|
}, {
|
|
10498
10510
|
name: 'qp-zzdlbm-in',
|
|
10499
10511
|
type: 'select',
|
|
10500
|
-
label: '
|
|
10512
|
+
label: '品类',
|
|
10501
10513
|
field: {
|
|
10502
10514
|
type: 'select',
|
|
10503
10515
|
props: {
|
|
@@ -10516,7 +10528,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10516
10528
|
}, {
|
|
10517
10529
|
name: 'qp-zzzlbm-in',
|
|
10518
10530
|
type: 'select',
|
|
10519
|
-
label: '
|
|
10531
|
+
label: '大类',
|
|
10520
10532
|
field: {
|
|
10521
10533
|
type: 'select',
|
|
10522
10534
|
props: {
|
|
@@ -10535,7 +10547,7 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10535
10547
|
}, {
|
|
10536
10548
|
name: 'qp-zzxlbm-in',
|
|
10537
10549
|
type: 'select',
|
|
10538
|
-
label: '
|
|
10550
|
+
label: '中类',
|
|
10539
10551
|
field: {
|
|
10540
10552
|
type: 'select',
|
|
10541
10553
|
props: {
|
|
@@ -11601,11 +11613,11 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11601
11613
|
}
|
|
11602
11614
|
}
|
|
11603
11615
|
}, {
|
|
11604
|
-
name: 'qp-
|
|
11605
|
-
type: '
|
|
11606
|
-
label: '
|
|
11616
|
+
name: 'qp-operationWarehouseClassification-in',
|
|
11617
|
+
type: 'select',
|
|
11618
|
+
label: '分类',
|
|
11607
11619
|
field: {
|
|
11608
|
-
type: '
|
|
11620
|
+
type: 'select',
|
|
11609
11621
|
props: {
|
|
11610
11622
|
multiple: true,
|
|
11611
11623
|
treeData: [],
|
|
@@ -11621,7 +11633,8 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11621
11633
|
},
|
|
11622
11634
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL'
|
|
11623
11635
|
}
|
|
11624
|
-
}
|
|
11636
|
+
},
|
|
11637
|
+
initialSource: getDictionarySource$1('BASIC_OPS_WH_TYPE')
|
|
11625
11638
|
}].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
|
|
11626
11639
|
name: 'qp-status-eq',
|
|
11627
11640
|
type: 'select',
|
|
@@ -11649,10 +11662,6 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11649
11662
|
});
|
|
11650
11663
|
});
|
|
11651
11664
|
x[1].data = newData1;
|
|
11652
|
-
var channelDisabledJude = function channelDisabledJude(data) {
|
|
11653
|
-
return data['parentCode'] === '0';
|
|
11654
|
-
}; // 所属销售渠道 树节点不能点判断
|
|
11655
|
-
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code', 'name'], 'channelInfoSon', channelDisabledJude);
|
|
11656
11665
|
});
|
|
11657
11666
|
modalTableProps = _objectSpread2({
|
|
11658
11667
|
modalTableTitle: '选择运营仓',
|
|
@@ -11924,18 +11933,18 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
11924
11933
|
name: 'qp-code-like',
|
|
11925
11934
|
label: '客户编码'
|
|
11926
11935
|
}, {
|
|
11927
|
-
name: 'qp-createOrgCode-
|
|
11936
|
+
name: 'qp-createOrgCode-in',
|
|
11928
11937
|
type: 'select',
|
|
11929
11938
|
label: '创建组织',
|
|
11930
11939
|
field: {
|
|
11931
11940
|
type: 'select',
|
|
11932
11941
|
props: {
|
|
11933
|
-
|
|
11942
|
+
mode: 'multiple',
|
|
11934
11943
|
notFoundContent: '暂无数据',
|
|
11935
11944
|
allowClear: true,
|
|
11936
11945
|
showSearch: true,
|
|
11937
11946
|
showArrow: true,
|
|
11938
|
-
|
|
11947
|
+
maxTagCount: 1,
|
|
11939
11948
|
optionFilterProp: 'children',
|
|
11940
11949
|
filterOption: function filterOption(input, option) {
|
|
11941
11950
|
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
package/package.json
CHANGED
|
@@ -487,7 +487,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
487
487
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
488
488
|
},
|
|
489
489
|
} },
|
|
490
|
-
{ name: 'qp-zzdlbm-in', type: 'select', label: '
|
|
490
|
+
{ name: 'qp-zzdlbm-in', type: 'select', label: '品类', field: {
|
|
491
491
|
type: 'select',
|
|
492
492
|
props: {
|
|
493
493
|
mode: 'multiple',
|
|
@@ -501,7 +501,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
501
501
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
502
502
|
},
|
|
503
503
|
} },
|
|
504
|
-
{ name: 'qp-zzzlbm-in', type: 'select', label: '
|
|
504
|
+
{ name: 'qp-zzzlbm-in', type: 'select', label: '大类', field: {
|
|
505
505
|
type: 'select',
|
|
506
506
|
props: {
|
|
507
507
|
mode: 'multiple',
|
|
@@ -515,7 +515,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
515
515
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
516
516
|
},
|
|
517
517
|
} },
|
|
518
|
-
{ name: 'qp-zzxlbm-in', type: 'select', label: '
|
|
518
|
+
{ name: 'qp-zzxlbm-in', type: 'select', label: '中类', field: {
|
|
519
519
|
type: 'select',
|
|
520
520
|
props: {
|
|
521
521
|
mode: 'multiple',
|
|
@@ -1539,8 +1539,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1539
1539
|
},
|
|
1540
1540
|
} },
|
|
1541
1541
|
{
|
|
1542
|
-
name: 'qp-
|
|
1543
|
-
type: '
|
|
1542
|
+
name: 'qp-operationWarehouseClassification-in', type: 'select', label: '分类', field: {
|
|
1543
|
+
type: 'select',
|
|
1544
1544
|
props: {
|
|
1545
1545
|
multiple: true,
|
|
1546
1546
|
treeData: [],
|
|
@@ -1555,7 +1555,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1555
1555
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
1556
1556
|
showCheckedStrategy: 'TreeSelect.SHOW_ALL',
|
|
1557
1557
|
},
|
|
1558
|
-
}
|
|
1558
|
+
},
|
|
1559
|
+
initialSource: getDictionarySource('BASIC_OPS_WH_TYPE')
|
|
1559
1560
|
},
|
|
1560
1561
|
...(modalTableBusProps?.needStatusSearch?[{ name: 'qp-status-eq', type: 'select', label: '运营仓状态', initialSource: getDictionarySource('SC00001') }]:[]),
|
|
1561
1562
|
]
|
|
@@ -1574,8 +1575,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1574
1575
|
newData1.push({ code: item.code, name: item.name })
|
|
1575
1576
|
});
|
|
1576
1577
|
x[1].data = newData1;
|
|
1577
|
-
const channelDisabledJude = (data: any) => data['parentCode'] === '0'; // 所属销售渠道 树节点不能点判断
|
|
1578
|
-
formatTreeDataSource(x, 1, 3, tableSearchForm, ['code','name'], 'channelInfoSon', channelDisabledJude)
|
|
1579
1578
|
})
|
|
1580
1579
|
modalTableProps = {
|
|
1581
1580
|
modalTableTitle: '选择运营仓',
|
|
@@ -1858,15 +1857,15 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1858
1857
|
tableSearchForm = [
|
|
1859
1858
|
{ name: 'qp-name-like', label: '客户名称' },
|
|
1860
1859
|
{ name: 'qp-code-like', label: '客户编码' },
|
|
1861
|
-
{ name: 'qp-createOrgCode-
|
|
1860
|
+
{ name: 'qp-createOrgCode-in', type: 'select', label: '创建组织', field: {
|
|
1862
1861
|
type: 'select',
|
|
1863
1862
|
props: {
|
|
1864
|
-
|
|
1863
|
+
mode: 'multiple',
|
|
1865
1864
|
notFoundContent: '暂无数据',
|
|
1866
1865
|
allowClear: true,
|
|
1867
1866
|
showSearch: true,
|
|
1868
1867
|
showArrow: true,
|
|
1869
|
-
|
|
1868
|
+
maxTagCount: 1,
|
|
1870
1869
|
optionFilterProp: 'children',
|
|
1871
1870
|
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
1872
1871
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
@@ -55,6 +55,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
55
55
|
viewShowValueStr, // 详情展示值,不传展示组件处理的默认值
|
|
56
56
|
searchStartLength, // 默认不校验长度去搜索,如果配置了,则按照配置项长度进行处理搜索
|
|
57
57
|
isQuery = false, // 是否是查询条件
|
|
58
|
+
requireSearchCondition = false, // 是否必须选择一个值
|
|
58
59
|
} = rCTemp || {};
|
|
59
60
|
const requestConfig = {url,method,otherParams,isMap,fixedparameter,fieldValToParam,fixedparamsDisabled,mappingTextField,mappingTextShowKeyField,mappingValueField,mappingTextShowTextField,init,extralHeaders,specialBracket,noNeedSplit,noOperate,viewShowValueStr,searchStartLength,...rCTemp};
|
|
60
61
|
const resultSourceKey = handleSourceName(sourceName || requestConfig?.sourceName || ctx?.name || 'supplierCode')
|
|
@@ -479,6 +480,18 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
479
480
|
|
|
480
481
|
const onSearchTable = () => {
|
|
481
482
|
const params = form.getFieldsValue();
|
|
483
|
+
// 必须选择一个值
|
|
484
|
+
if(requireSearchCondition) {
|
|
485
|
+
const hasValidValue = Object.values(params).some(value =>
|
|
486
|
+
(Array.isArray(value) && value.length > 0) ||
|
|
487
|
+
(typeof value === 'string' && value.trim().length > 0)
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
if(!hasValidValue) {
|
|
491
|
+
message.warning('请至少选择一个搜索条件');
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
482
495
|
setModalSearched(true);
|
|
483
496
|
setTableFormParams(params);
|
|
484
497
|
getData({ ...params, pageSize: tableInitPageSize }, 2, null);
|