@bit-sun/business-component 4.2.0-alpha.21 → 4.2.0-alpha.23
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 +285 -16
- package/dist/index.js +285 -16
- package/package.json +1 -1
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +60 -0
- package/src/components/Business/SearchSelect/index.md +2 -2
- package/src/components/Functional/SearchSelect/index.md +109 -0
- package/src/components/Functional/SearchSelect/index.tsx +12 -2
- package/src/components/Solution/RuleComponent/index.js +216 -8
- package/src/components/Solution/RuleComponent/ruleFiled.js +21 -5
package/dist/index.js
CHANGED
|
@@ -5362,8 +5362,7 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5362
5362
|
searchStartLength = _ref.searchStartLength,
|
|
5363
5363
|
_ref$isQuery = _ref.isQuery,
|
|
5364
5364
|
isQuery = _ref$isQuery === void 0 ? false : _ref$isQuery,
|
|
5365
|
-
_ref$requestType = _ref.requestType
|
|
5366
|
-
requestType = _ref$requestType === void 0 ? 'get' : _ref$requestType;
|
|
5365
|
+
_ref$requestType = _ref.requestType;
|
|
5367
5366
|
var requestConfig = _objectSpread2({
|
|
5368
5367
|
url: url,
|
|
5369
5368
|
method: method,
|
|
@@ -5650,9 +5649,16 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5650
5649
|
var getRequest;
|
|
5651
5650
|
var methodName = method === null || method === void 0 ? void 0 : (_method$toLocaleLower = method.toLocaleLowerCase) === null || _method$toLocaleLower === void 0 ? void 0 : _method$toLocaleLower.call(method);
|
|
5652
5651
|
if (['post', 'patch', 'put'].includes(methodName)) {
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5652
|
+
var bodyData = convertBodyParams(queryParams);
|
|
5653
|
+
var urlStr = convertUrlQueryParams(queryParams);
|
|
5654
|
+
// Fix: support sending params in body
|
|
5655
|
+
if (requestConfig.isBodyRequest) {
|
|
5656
|
+
if (!bodyData) {
|
|
5657
|
+
bodyData = convertQueryParams(queryParams);
|
|
5658
|
+
}
|
|
5659
|
+
urlStr = '';
|
|
5660
|
+
}
|
|
5661
|
+
getRequest = requestUtil[methodName]("".concat(url).concat(urlStr), bodyData, {
|
|
5656
5662
|
headers: _objectSpread2({}, extralHeaders)
|
|
5657
5663
|
});
|
|
5658
5664
|
} else {
|
|
@@ -10501,6 +10507,25 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10501
10507
|
field: {
|
|
10502
10508
|
type: 'proppertySelector'
|
|
10503
10509
|
}
|
|
10510
|
+
}, {
|
|
10511
|
+
name: 'qp-itemLabelId-in',
|
|
10512
|
+
type: 'select',
|
|
10513
|
+
label: '商品标签',
|
|
10514
|
+
field: {
|
|
10515
|
+
type: 'select',
|
|
10516
|
+
props: {
|
|
10517
|
+
mode: 'multiple',
|
|
10518
|
+
notFoundContent: '暂无数据',
|
|
10519
|
+
allowClear: true,
|
|
10520
|
+
showSearch: true,
|
|
10521
|
+
showArrow: true,
|
|
10522
|
+
maxTagCount: 1,
|
|
10523
|
+
optionFilterProp: 'children',
|
|
10524
|
+
filterOption: function filterOption(input, option) {
|
|
10525
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10526
|
+
}
|
|
10527
|
+
}
|
|
10528
|
+
}
|
|
10504
10529
|
}];
|
|
10505
10530
|
var defaultQSHL = [{
|
|
10506
10531
|
isOpen: true,
|
|
@@ -10518,9 +10543,14 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10518
10543
|
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-brandId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
|
|
10519
10544
|
pageSize: 5000,
|
|
10520
10545
|
currentPage: 1
|
|
10521
|
-
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-categoryId-in'))
|
|
10546
|
+
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-categoryId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/label"), {
|
|
10547
|
+
pageSize: 500,
|
|
10548
|
+
currentPage: 1,
|
|
10549
|
+
'qp-labelType-eq': 1
|
|
10550
|
+
}, getQueryHeadersItem(_queryHeaderParams2, 'qp-itemLabelId-in'))]).then(function (x) {
|
|
10522
10551
|
formatSource(x, 0, 3, tableSearchForm, ['id', 'name']);
|
|
10523
10552
|
formatTreeDataSource(x, 1, 4, tableSearchForm);
|
|
10553
|
+
formatSource(x, 2, 6, tableSearchForm, ['id', 'name']);
|
|
10524
10554
|
});
|
|
10525
10555
|
modalTableProps = _objectSpread2({
|
|
10526
10556
|
modalTableTitle: '选择SKU',
|
|
@@ -10674,6 +10704,25 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10674
10704
|
}
|
|
10675
10705
|
}
|
|
10676
10706
|
}
|
|
10707
|
+
}, {
|
|
10708
|
+
name: 'qp-itemLabelId-in',
|
|
10709
|
+
type: 'select',
|
|
10710
|
+
label: '商品标签',
|
|
10711
|
+
field: {
|
|
10712
|
+
type: 'select',
|
|
10713
|
+
props: {
|
|
10714
|
+
mode: 'multiple',
|
|
10715
|
+
notFoundContent: '暂无数据',
|
|
10716
|
+
allowClear: true,
|
|
10717
|
+
showSearch: true,
|
|
10718
|
+
showArrow: true,
|
|
10719
|
+
maxTagCount: 1,
|
|
10720
|
+
optionFilterProp: 'children',
|
|
10721
|
+
filterOption: function filterOption(input, option) {
|
|
10722
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10723
|
+
}
|
|
10724
|
+
}
|
|
10725
|
+
}
|
|
10677
10726
|
}];
|
|
10678
10727
|
var _queryHeaderParams3 = getQueryHeadersList({
|
|
10679
10728
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -10689,10 +10738,15 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10689
10738
|
}, getQueryHeadersItem(_queryHeaderParams3, 'qp-categoryId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
|
|
10690
10739
|
pageSize: 5000,
|
|
10691
10740
|
currentPage: 1
|
|
10692
|
-
}, getQueryHeadersItem(_queryHeaderParams3, 'qp-classId-in'))
|
|
10741
|
+
}, getQueryHeadersItem(_queryHeaderParams3, 'qp-classId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/label"), {
|
|
10742
|
+
pageSize: 500,
|
|
10743
|
+
currentPage: 1,
|
|
10744
|
+
'qp-labelType-eq': 1
|
|
10745
|
+
}, getQueryHeadersItem(_queryHeaderParams3, 'qp-itemLabelId-in'))]).then(function (x) {
|
|
10693
10746
|
formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
|
|
10694
10747
|
formatTreeDataSource(x, 1, 3, tableSearchForm);
|
|
10695
10748
|
formatSource(x, 2, 4, tableSearchForm, ['id', 'name']);
|
|
10749
|
+
formatSource(x, 3, 5, tableSearchForm, ['id', 'name']);
|
|
10696
10750
|
});
|
|
10697
10751
|
modalTableProps = _objectSpread2({
|
|
10698
10752
|
modalTableTitle: '选择商品(SPU) ',
|
|
@@ -10869,6 +10923,25 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10869
10923
|
mode: 'multiple'
|
|
10870
10924
|
}
|
|
10871
10925
|
}
|
|
10926
|
+
}, {
|
|
10927
|
+
name: 'qp-itemLabelId-in',
|
|
10928
|
+
type: 'select',
|
|
10929
|
+
label: '商品标签',
|
|
10930
|
+
field: {
|
|
10931
|
+
type: 'select',
|
|
10932
|
+
props: {
|
|
10933
|
+
mode: 'multiple',
|
|
10934
|
+
notFoundContent: '暂无数据',
|
|
10935
|
+
allowClear: true,
|
|
10936
|
+
showSearch: true,
|
|
10937
|
+
showArrow: true,
|
|
10938
|
+
maxTagCount: 1,
|
|
10939
|
+
optionFilterProp: 'children',
|
|
10940
|
+
filterOption: function filterOption(input, option) {
|
|
10941
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10942
|
+
}
|
|
10943
|
+
}
|
|
10944
|
+
}
|
|
10872
10945
|
}];
|
|
10873
10946
|
var _queryHeaderParams4 = getQueryHeadersList({
|
|
10874
10947
|
querySelectHeadersList: querySelectHeadersList,
|
|
@@ -10884,10 +10957,15 @@ function commonFun(type, prefixUrl, parentProps) {
|
|
|
10884
10957
|
}, getQueryHeadersItem(_queryHeaderParams4, 'qp-categoryId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
|
|
10885
10958
|
pageSize: 5000,
|
|
10886
10959
|
currentPage: 1
|
|
10887
|
-
}, getQueryHeadersItem(_queryHeaderParams4, 'qp-classId-in'))
|
|
10960
|
+
}, getQueryHeadersItem(_queryHeaderParams4, 'qp-classId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/label"), {
|
|
10961
|
+
pageSize: 500,
|
|
10962
|
+
currentPage: 1,
|
|
10963
|
+
'qp-labelType-eq': 1
|
|
10964
|
+
}, getQueryHeadersItem(_queryHeaderParams4, 'qp-itemLabelId-in'))]).then(function (x) {
|
|
10888
10965
|
formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
|
|
10889
10966
|
formatTreeDataSource(x, 1, 3, tableSearchForm);
|
|
10890
10967
|
formatSource(x, 2, 4, tableSearchForm, ['id', 'name']);
|
|
10968
|
+
formatSource(x, 3, 10, tableSearchForm, ['id', 'name']);
|
|
10891
10969
|
});
|
|
10892
10970
|
modalTableProps = _objectSpread2({
|
|
10893
10971
|
modalTableTitle: '选择SPU',
|
|
@@ -34585,11 +34663,24 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
34585
34663
|
itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
|
|
34586
34664
|
_this$props2$others = _this$props2.others,
|
|
34587
34665
|
others = _this$props2$others === void 0 ? {} : _this$props2$others,
|
|
34588
|
-
propertyCode = _this$props2.propertyCode
|
|
34666
|
+
propertyCode = _this$props2.propertyCode,
|
|
34667
|
+
isQueryParams = _this$props2.isQueryParams;
|
|
34589
34668
|
var thresholdList = _this.state.thresholdList;
|
|
34590
34669
|
var styleCommon = {
|
|
34591
34670
|
width: customerWidth || '180px'
|
|
34592
34671
|
};
|
|
34672
|
+
if (isQueryParams) {
|
|
34673
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
34674
|
+
defaultValue: values.join(','),
|
|
34675
|
+
disabled: disabled,
|
|
34676
|
+
style: styleCommon,
|
|
34677
|
+
onBlur: function onBlur(e) {
|
|
34678
|
+
values = e.target.value.split(',');
|
|
34679
|
+
valueNames = e.target.value.split(',');
|
|
34680
|
+
callback(values, valueNames);
|
|
34681
|
+
}
|
|
34682
|
+
});
|
|
34683
|
+
}
|
|
34593
34684
|
if (!selectOperation) return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
34594
34685
|
disabled: true,
|
|
34595
34686
|
style: styleCommon
|
|
@@ -37115,7 +37206,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
37115
37206
|
fieldValues: [],
|
|
37116
37207
|
thresholdQuery: {},
|
|
37117
37208
|
thresholdList: [],
|
|
37118
|
-
options: []
|
|
37209
|
+
options: [],
|
|
37210
|
+
isQueryParams: false
|
|
37119
37211
|
};
|
|
37120
37212
|
return _this;
|
|
37121
37213
|
}
|
|
@@ -37135,13 +37227,15 @@ var RuleField = /*#__PURE__*/function (_Component) {
|
|
|
37135
37227
|
initialThresholdQuery = _this$props3.initialThresholdQuery,
|
|
37136
37228
|
queryIdentify = _this$props3.queryIdentify,
|
|
37137
37229
|
propertyCode = _this$props3.propertyCode,
|
|
37138
|
-
queryIdentifyType = _this$props3.queryIdentifyType
|
|
37230
|
+
queryIdentifyType = _this$props3.queryIdentifyType,
|
|
37231
|
+
isQueryParams = _this$props3.isQueryParams;
|
|
37139
37232
|
this.setState({
|
|
37140
37233
|
selectOperation: selectOperation,
|
|
37141
37234
|
thresholdQuery: initialThresholdQuery ? _objectSpread2({}, initialThresholdQuery) : {},
|
|
37142
37235
|
dataTypeCode: dataTypeCode,
|
|
37143
37236
|
dataChoiceBusinessType: dataChoiceBusinessType,
|
|
37144
37237
|
dataInputBusinessType: dataInputBusinessType,
|
|
37238
|
+
isQueryParams: isQueryParams,
|
|
37145
37239
|
others: others,
|
|
37146
37240
|
fieldValues: _toConsumableArray(values),
|
|
37147
37241
|
options: options
|
|
@@ -38348,6 +38442,18 @@ function RenderCompItem(props) {
|
|
|
38348
38442
|
}
|
|
38349
38443
|
|
|
38350
38444
|
var RangePicker$2 = antd.DatePicker.RangePicker;
|
|
38445
|
+
var FIXED_DATA_TYPES = {
|
|
38446
|
+
10: '字符串',
|
|
38447
|
+
20: '短整数',
|
|
38448
|
+
21: '长整数',
|
|
38449
|
+
22: '小数',
|
|
38450
|
+
40: '数组',
|
|
38451
|
+
41: '布尔值',
|
|
38452
|
+
12: '富文本',
|
|
38453
|
+
30: '日期',
|
|
38454
|
+
31: '时间',
|
|
38455
|
+
32: '日期时间'
|
|
38456
|
+
};
|
|
38351
38457
|
var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
38352
38458
|
function RuleObjectComponent(props) {
|
|
38353
38459
|
var _this;
|
|
@@ -38391,6 +38497,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38391
38497
|
value: element.id,
|
|
38392
38498
|
id: element.id,
|
|
38393
38499
|
dataTypeCode: element.valueType,
|
|
38500
|
+
entityValueType: element.entityValueType,
|
|
38501
|
+
entityInputType: element.entityInputType,
|
|
38394
38502
|
dataChoiceBusinessType: element.choiceType,
|
|
38395
38503
|
dataInputBusinessType: element.inputType,
|
|
38396
38504
|
info: element.info,
|
|
@@ -38412,6 +38520,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38412
38520
|
metaObjectCode: _this.props.metaObjectCode || item.code
|
|
38413
38521
|
}, item), {}, {
|
|
38414
38522
|
dataTypeCode: item.valueType,
|
|
38523
|
+
entityValueType: item.entityValueType,
|
|
38524
|
+
entityInputType: item.entityInputType,
|
|
38415
38525
|
dataChoiceBusinessType: item.choiceType,
|
|
38416
38526
|
dataInputBusinessType: item.inputType
|
|
38417
38527
|
}));
|
|
@@ -38445,6 +38555,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38445
38555
|
value: element.id,
|
|
38446
38556
|
id: element.id,
|
|
38447
38557
|
dataTypeCode: element.valueType,
|
|
38558
|
+
entityValueType: element.entityValueType,
|
|
38559
|
+
entityInputType: element.entityInputType,
|
|
38448
38560
|
dataChoiceBusinessType: element.choiceType,
|
|
38449
38561
|
dataInputBusinessType: element.inputType,
|
|
38450
38562
|
info: element.info,
|
|
@@ -38806,7 +38918,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38806
38918
|
});
|
|
38807
38919
|
};
|
|
38808
38920
|
_this.renderRuleItem = function (itemDetail, parentDetail, floorIndex, classDataIndex, relateDatas) {
|
|
38809
|
-
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2;
|
|
38921
|
+
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2, _itemDetail$reqCondit, _itemDetail$reqCondit2, _itemDetail$reqCondit3, _itemDetail$reqCondit4;
|
|
38810
38922
|
var ruleTreeData = _this.state.ruleTreeData;
|
|
38811
38923
|
var _this$props3 = _this.props,
|
|
38812
38924
|
callBack = _this$props3.callBack,
|
|
@@ -38814,7 +38926,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38814
38926
|
initialThresholdQuery = _this$props3$initialT === void 0 ? {} : _this$props3$initialT,
|
|
38815
38927
|
disabled = _this$props3.disabled,
|
|
38816
38928
|
systemVariableList = _this$props3.systemVariableList,
|
|
38817
|
-
needShowInsertSQL = _this$props3.needShowInsertSQL
|
|
38929
|
+
needShowInsertSQL = _this$props3.needShowInsertSQL,
|
|
38930
|
+
needShowReqCondition = _this$props3.needShowReqCondition;
|
|
38818
38931
|
var thresholdQuery = _objectSpread2(_objectSpread2({}, initialThresholdQuery), relateDatas);
|
|
38819
38932
|
var finalIndex = floorIndex + 1;
|
|
38820
38933
|
var queryIdentify = '';
|
|
@@ -38905,6 +39018,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
38905
39018
|
itemDetail.elementId = nodeInfo.triggerNode.props.id;
|
|
38906
39019
|
itemDetail.elementName = nodeInfo.triggerNode.props.title;
|
|
38907
39020
|
itemDetail.dataTypeCode = nodeInfo.triggerNode.props.dataTypeCode;
|
|
39021
|
+
itemDetail.entityValueType = nodeInfo.triggerNode.props.entityValueType;
|
|
39022
|
+
itemDetail.entityInputType = nodeInfo.triggerNode.props.entityInputType;
|
|
38908
39023
|
itemDetail.metaObjectCode = nodeInfo.triggerNode.props.metaObjectCode;
|
|
38909
39024
|
itemDetail.isInsertParam = false;
|
|
38910
39025
|
if (needShowInsertSQL) {
|
|
@@ -39074,12 +39189,13 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39074
39189
|
}
|
|
39075
39190
|
}, (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.isInsertSQL) ? '取消插入SQL' : '插入SQL')), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
39076
39191
|
style: {
|
|
39077
|
-
display: itemDetail.operationType == 'logic' && !disabled ? 'block' : 'none'
|
|
39192
|
+
display: itemDetail.operationType == 'logic' && (!disabled || itemDetail.reqConditionData && itemDetail.reqConditionData.reqParamName && ((_itemDetail$reqCondit = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit === void 0 ? void 0 : _itemDetail$reqCondit.length)) ? 'block' : 'none'
|
|
39078
39193
|
}
|
|
39079
39194
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
39080
39195
|
style: {
|
|
39081
39196
|
color: '#008fe0',
|
|
39082
|
-
cursor: 'pointer'
|
|
39197
|
+
cursor: 'pointer',
|
|
39198
|
+
display: disabled ? 'none' : 'inline'
|
|
39083
39199
|
},
|
|
39084
39200
|
type: "link",
|
|
39085
39201
|
onClick: function onClick() {
|
|
@@ -39091,7 +39207,107 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39091
39207
|
fontSize: '14px',
|
|
39092
39208
|
marginRight: '5px'
|
|
39093
39209
|
}
|
|
39094
|
-
}), "\u6DFB\u52A0\u6761\u4EF6")
|
|
39210
|
+
}), "\u6DFB\u52A0\u6761\u4EF6"), needShowReqCondition && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
39211
|
+
style: {
|
|
39212
|
+
marginLeft: 10,
|
|
39213
|
+
display: disabled ? 'none' : 'inline'
|
|
39214
|
+
}
|
|
39215
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
39216
|
+
type: "link",
|
|
39217
|
+
disabled: disabled && (!itemDetail.reqConditionData || !itemDetail.reqConditionData.reqParamName || !((_itemDetail$reqCondit2 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit2 === void 0 ? void 0 : _itemDetail$reqCondit2.length)),
|
|
39218
|
+
style: {
|
|
39219
|
+
padding: 0,
|
|
39220
|
+
height: 'auto'
|
|
39221
|
+
},
|
|
39222
|
+
onClick: function onClick() {
|
|
39223
|
+
return _this.handleReqConditionToggle(itemDetail);
|
|
39224
|
+
}
|
|
39225
|
+
}, itemDetail.isReqCondition ? '取消参数条件控制' : '参数条件控制')), (itemDetail.isReqCondition || disabled && itemDetail.reqConditionData && itemDetail.reqConditionData.reqParamName && ((_itemDetail$reqCondit3 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit3 === void 0 ? void 0 : _itemDetail$reqCondit3.length)) && itemDetail.reqConditionData && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
39226
|
+
style: {
|
|
39227
|
+
marginTop: 10,
|
|
39228
|
+
display: disabled && (!itemDetail.reqConditionData.reqParamName || !((_itemDetail$reqCondit4 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit4 === void 0 ? void 0 : _itemDetail$reqCondit4.length)) ? 'none' : 'flex',
|
|
39229
|
+
alignItems: 'center',
|
|
39230
|
+
background: '#f5f5f5',
|
|
39231
|
+
padding: '10px',
|
|
39232
|
+
borderRadius: '4px'
|
|
39233
|
+
}
|
|
39234
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
39235
|
+
style: {
|
|
39236
|
+
marginRight: 8,
|
|
39237
|
+
flexShrink: 0
|
|
39238
|
+
}
|
|
39239
|
+
}, "\u8BF7\u6C42\u53C2\u6570\u540D\u79F0:"), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
39240
|
+
disabled: disabled,
|
|
39241
|
+
style: {
|
|
39242
|
+
width: 150,
|
|
39243
|
+
marginRight: 10
|
|
39244
|
+
},
|
|
39245
|
+
value: itemDetail.reqConditionData.reqParamName,
|
|
39246
|
+
onChange: function onChange(e) {
|
|
39247
|
+
return _this.handleReqDataChange(itemDetail, 'reqParamName', e.target.value);
|
|
39248
|
+
}
|
|
39249
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
39250
|
+
style: {
|
|
39251
|
+
marginRight: 8,
|
|
39252
|
+
flexShrink: 0
|
|
39253
|
+
}
|
|
39254
|
+
}, "\u7C7B\u578B:"), /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
39255
|
+
disabled: disabled,
|
|
39256
|
+
style: {
|
|
39257
|
+
width: 120,
|
|
39258
|
+
marginRight: 10
|
|
39259
|
+
},
|
|
39260
|
+
value: itemDetail.reqConditionData.dataTypeCode,
|
|
39261
|
+
onChange: function onChange(val) {
|
|
39262
|
+
return _this.handleReqDataChange(itemDetail, 'dataTypeCode', val);
|
|
39263
|
+
}
|
|
39264
|
+
}, Object.keys(FIXED_DATA_TYPES).map(function (code) {
|
|
39265
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
39266
|
+
key: code,
|
|
39267
|
+
value: code
|
|
39268
|
+
}, FIXED_DATA_TYPES[code]);
|
|
39269
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
39270
|
+
disabled: disabled,
|
|
39271
|
+
style: {
|
|
39272
|
+
width: 120,
|
|
39273
|
+
marginRight: 10
|
|
39274
|
+
},
|
|
39275
|
+
value: itemDetail.reqConditionData.operationCode,
|
|
39276
|
+
onChange: function onChange(val) {
|
|
39277
|
+
return _this.handleReqDataChange(itemDetail, 'operationCode', val);
|
|
39278
|
+
}
|
|
39279
|
+
}, [{
|
|
39280
|
+
'code': '1',
|
|
39281
|
+
'name': '在集合'
|
|
39282
|
+
}, {
|
|
39283
|
+
'code': '2',
|
|
39284
|
+
'name': '不等于'
|
|
39285
|
+
}, {
|
|
39286
|
+
code: '3',
|
|
39287
|
+
name: '小于'
|
|
39288
|
+
}, {
|
|
39289
|
+
code: '4',
|
|
39290
|
+
name: '大于'
|
|
39291
|
+
}, {
|
|
39292
|
+
code: '5',
|
|
39293
|
+
name: '等于'
|
|
39294
|
+
}].map(function (op) {
|
|
39295
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
39296
|
+
key: op.code,
|
|
39297
|
+
value: op.code
|
|
39298
|
+
}, op.name);
|
|
39299
|
+
})), /*#__PURE__*/React__default['default'].createElement(RuleField, {
|
|
39300
|
+
customerWidth: '180px',
|
|
39301
|
+
isQueryParams: true,
|
|
39302
|
+
selectOperation: itemDetail.reqConditionData.operationCode,
|
|
39303
|
+
dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
|
|
39304
|
+
values: itemDetail.reqConditionData.params || [],
|
|
39305
|
+
valueNames: itemDetail.reqConditionData.paramNames || [],
|
|
39306
|
+
callback: function callback(newValues, newValueNames) {
|
|
39307
|
+
return _this.handleReqDataChange(itemDetail, 'params', newValues, newValueNames);
|
|
39308
|
+
},
|
|
39309
|
+
disabled: disabled
|
|
39310
|
+
})))));
|
|
39095
39311
|
};
|
|
39096
39312
|
_this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex, key) {
|
|
39097
39313
|
var ruleClassData = _this.state.ruleClassData;
|
|
@@ -39407,6 +39623,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39407
39623
|
delete itemDetail.params;
|
|
39408
39624
|
delete itemDetail.paramNames;
|
|
39409
39625
|
delete itemDetail.dataTypeCode;
|
|
39626
|
+
delete itemDetail.entityValueType;
|
|
39627
|
+
delete itemDetail.entityInputType;
|
|
39410
39628
|
delete itemDetail.elementId;
|
|
39411
39629
|
delete itemDetail.elementName;
|
|
39412
39630
|
delete itemDetail.metaObjectCode;
|
|
@@ -39457,6 +39675,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39457
39675
|
parentDetail.elementId = parentDetail.subExpression[0].elementId;
|
|
39458
39676
|
parentDetail.elementName = parentDetail.subExpression[0].elementName;
|
|
39459
39677
|
parentDetail.dataTypeCode = parentDetail.subExpression[0].dataTypeCode;
|
|
39678
|
+
parentDetail.entityValueType = parentDetail.subExpression[0].entityValueType;
|
|
39679
|
+
parentDetail.entityInputType = parentDetail.subExpression[0].entityInputType;
|
|
39460
39680
|
delete parentDetail.subExpression;
|
|
39461
39681
|
}
|
|
39462
39682
|
}
|
|
@@ -39530,6 +39750,55 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
39530
39750
|
callBack(ruleClassData);
|
|
39531
39751
|
});
|
|
39532
39752
|
};
|
|
39753
|
+
_this.handleReqConditionToggle = function (itemDetail) {
|
|
39754
|
+
var ruleClassData = _this.state.ruleClassData;
|
|
39755
|
+
var callBack = _this.props.callBack;
|
|
39756
|
+
itemDetail.isReqCondition = !itemDetail.isReqCondition;
|
|
39757
|
+
if (itemDetail.isReqCondition && !itemDetail.reqConditionData) {
|
|
39758
|
+
itemDetail.reqConditionData = {
|
|
39759
|
+
operationType: 'relation',
|
|
39760
|
+
dataTypeCode: '10',
|
|
39761
|
+
entityInputType: '10',
|
|
39762
|
+
entityValueType: '10',
|
|
39763
|
+
operationCode: '',
|
|
39764
|
+
reqParamName: '',
|
|
39765
|
+
params: [],
|
|
39766
|
+
paramNames: []
|
|
39767
|
+
};
|
|
39768
|
+
}
|
|
39769
|
+
_this.setState({
|
|
39770
|
+
ruleClassData: ruleClassData
|
|
39771
|
+
}, function () {
|
|
39772
|
+
callBack(ruleClassData);
|
|
39773
|
+
});
|
|
39774
|
+
};
|
|
39775
|
+
_this.handleReqDataChange = function (itemDetail, field, value, valueNames) {
|
|
39776
|
+
var ruleClassData = _this.state.ruleClassData;
|
|
39777
|
+
var callBack = _this.props.callBack;
|
|
39778
|
+
if (!itemDetail.reqConditionData) return;
|
|
39779
|
+
if (field === 'dataTypeCode') {
|
|
39780
|
+
itemDetail.reqConditionData.dataTypeCode = value;
|
|
39781
|
+
itemDetail.reqConditionData.entityInputType = value;
|
|
39782
|
+
itemDetail.reqConditionData.entityValueType = value;
|
|
39783
|
+
itemDetail.reqConditionData.operationCode = '';
|
|
39784
|
+
itemDetail.reqConditionData.params = [];
|
|
39785
|
+
itemDetail.reqConditionData.paramNames = [];
|
|
39786
|
+
} else if (field === 'operationCode') {
|
|
39787
|
+
itemDetail.reqConditionData.operationCode = value;
|
|
39788
|
+
} else if (field === 'reqParamName') {
|
|
39789
|
+
itemDetail.reqConditionData.reqParamName = value;
|
|
39790
|
+
} else if (field === 'params') {
|
|
39791
|
+
itemDetail.reqConditionData.params = value;
|
|
39792
|
+
if (valueNames) {
|
|
39793
|
+
itemDetail.reqConditionData.paramNames = valueNames;
|
|
39794
|
+
}
|
|
39795
|
+
}
|
|
39796
|
+
_this.setState({
|
|
39797
|
+
ruleClassData: ruleClassData
|
|
39798
|
+
}, function () {
|
|
39799
|
+
callBack(ruleClassData);
|
|
39800
|
+
});
|
|
39801
|
+
};
|
|
39533
39802
|
_this.state = {
|
|
39534
39803
|
editNameIndex: 0,
|
|
39535
39804
|
isEdit: false,
|
package/package.json
CHANGED
|
@@ -440,6 +440,20 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
440
440
|
{ name: 'UNIQUE_SPEC', label: '属性', field: {
|
|
441
441
|
type: 'proppertySelector',
|
|
442
442
|
} },
|
|
443
|
+
{ name: 'qp-itemLabelId-in', type: 'select', label: '商品标签', field: {
|
|
444
|
+
type: 'select',
|
|
445
|
+
props: {
|
|
446
|
+
mode: 'multiple',
|
|
447
|
+
notFoundContent: '暂无数据',
|
|
448
|
+
allowClear: true,
|
|
449
|
+
showSearch: true,
|
|
450
|
+
showArrow: true,
|
|
451
|
+
maxTagCount: 1,
|
|
452
|
+
optionFilterProp: 'children',
|
|
453
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
454
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
455
|
+
},
|
|
456
|
+
} },
|
|
443
457
|
]
|
|
444
458
|
const defaultQSHL = [
|
|
445
459
|
{
|
|
@@ -459,9 +473,15 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
459
473
|
pageSize: 5000,
|
|
460
474
|
currentPage: 1,
|
|
461
475
|
},getQueryHeadersItem(queryHeaderParams,'qp-categoryId-in')),
|
|
476
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/label`, {
|
|
477
|
+
pageSize: 500,
|
|
478
|
+
currentPage: 1,
|
|
479
|
+
'qp-labelType-eq': 1,
|
|
480
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-itemLabelId-in')),
|
|
462
481
|
]).then((x: any)=>{
|
|
463
482
|
formatSource(x,0, 3, tableSearchForm,['id','name'])
|
|
464
483
|
formatTreeDataSource(x,1, 4, tableSearchForm)
|
|
484
|
+
formatSource(x,2, 6, tableSearchForm,['id','name'])
|
|
465
485
|
})
|
|
466
486
|
modalTableProps = {
|
|
467
487
|
modalTableTitle: '选择SKU',
|
|
@@ -609,6 +629,20 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
609
629
|
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
610
630
|
},
|
|
611
631
|
} },
|
|
632
|
+
{ name: 'qp-itemLabelId-in', type: 'select', label: '商品标签', field: {
|
|
633
|
+
type: 'select',
|
|
634
|
+
props: {
|
|
635
|
+
mode: 'multiple',
|
|
636
|
+
notFoundContent: '暂无数据',
|
|
637
|
+
allowClear: true,
|
|
638
|
+
showSearch: true,
|
|
639
|
+
showArrow: true,
|
|
640
|
+
maxTagCount: 1,
|
|
641
|
+
optionFilterProp: 'children',
|
|
642
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
643
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
644
|
+
},
|
|
645
|
+
} },
|
|
612
646
|
]
|
|
613
647
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
614
648
|
Promise.all([
|
|
@@ -625,10 +659,16 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
625
659
|
pageSize: 5000,
|
|
626
660
|
currentPage: 1,
|
|
627
661
|
},getQueryHeadersItem(queryHeaderParams,'qp-classId-in')),
|
|
662
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/label`, {
|
|
663
|
+
pageSize: 500,
|
|
664
|
+
currentPage: 1,
|
|
665
|
+
'qp-labelType-eq': 1,
|
|
666
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-itemLabelId-in')),
|
|
628
667
|
]).then((x: any)=>{
|
|
629
668
|
formatSource(x,0, 2, tableSearchForm,['id','name']);
|
|
630
669
|
formatTreeDataSource(x,1, 3, tableSearchForm);
|
|
631
670
|
formatSource(x,2, 4, tableSearchForm,['id','name']);
|
|
671
|
+
formatSource(x,3, 5, tableSearchForm,['id','name']);
|
|
632
672
|
})
|
|
633
673
|
modalTableProps = {
|
|
634
674
|
modalTableTitle: '选择商品(SPU) ',
|
|
@@ -802,6 +842,20 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
802
842
|
}
|
|
803
843
|
}
|
|
804
844
|
},
|
|
845
|
+
{ name: 'qp-itemLabelId-in', type: 'select', label: '商品标签', field: {
|
|
846
|
+
type: 'select',
|
|
847
|
+
props: {
|
|
848
|
+
mode: 'multiple',
|
|
849
|
+
notFoundContent: '暂无数据',
|
|
850
|
+
allowClear: true,
|
|
851
|
+
showSearch: true,
|
|
852
|
+
showArrow: true,
|
|
853
|
+
maxTagCount: 1,
|
|
854
|
+
optionFilterProp: 'children',
|
|
855
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
856
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
857
|
+
},
|
|
858
|
+
} },
|
|
805
859
|
]
|
|
806
860
|
const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
|
|
807
861
|
Promise.all([
|
|
@@ -818,10 +872,16 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
818
872
|
pageSize: 5000,
|
|
819
873
|
currentPage: 1,
|
|
820
874
|
},getQueryHeadersItem(queryHeaderParams,'qp-classId-in')),
|
|
875
|
+
loadSelectSource(`${prefixUrl.formSelectFix}/label`, {
|
|
876
|
+
pageSize: 500,
|
|
877
|
+
currentPage: 1,
|
|
878
|
+
'qp-labelType-eq': 1,
|
|
879
|
+
},getQueryHeadersItem(queryHeaderParams,'qp-itemLabelId-in')),
|
|
821
880
|
]).then((x: any)=>{
|
|
822
881
|
formatSource(x,0, 2, tableSearchForm,['id','name']);
|
|
823
882
|
formatTreeDataSource(x,1, 3, tableSearchForm);
|
|
824
883
|
formatSource(x,2, 4, tableSearchForm,['id','name']);
|
|
884
|
+
formatSource(x,3, 10, tableSearchForm,['id','name']);
|
|
825
885
|
})
|
|
826
886
|
modalTableProps = {
|
|
827
887
|
modalTableTitle: '选择SPU',
|
|
@@ -150,7 +150,7 @@ export default () => {
|
|
|
150
150
|
// },
|
|
151
151
|
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
152
152
|
selectProps,
|
|
153
|
-
selectBusinessType: '
|
|
153
|
+
selectBusinessType: 'skuCommodity',
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
const onTabChange = (key) => {
|
|
@@ -317,7 +317,7 @@ export default () => {
|
|
|
317
317
|
},
|
|
318
318
|
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
319
319
|
selectProps,
|
|
320
|
-
selectBusinessType: '
|
|
320
|
+
selectBusinessType: 'spuCommodity',
|
|
321
321
|
};
|
|
322
322
|
|
|
323
323
|
const onTabChange = (key) => {
|