@bit-sun/business-component 4.2.0-alpha.21 → 4.2.0-alpha.22

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.js CHANGED
@@ -10501,6 +10501,25 @@ function commonFun(type, prefixUrl, parentProps) {
10501
10501
  field: {
10502
10502
  type: 'proppertySelector'
10503
10503
  }
10504
+ }, {
10505
+ name: 'qp-itemLabelId-in',
10506
+ type: 'select',
10507
+ label: '商品标签',
10508
+ field: {
10509
+ type: 'select',
10510
+ props: {
10511
+ mode: 'multiple',
10512
+ notFoundContent: '暂无数据',
10513
+ allowClear: true,
10514
+ showSearch: true,
10515
+ showArrow: true,
10516
+ maxTagCount: 1,
10517
+ optionFilterProp: 'children',
10518
+ filterOption: function filterOption(input, option) {
10519
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10520
+ }
10521
+ }
10522
+ }
10504
10523
  }];
10505
10524
  var defaultQSHL = [{
10506
10525
  isOpen: true,
@@ -10518,9 +10537,14 @@ function commonFun(type, prefixUrl, parentProps) {
10518
10537
  }, getQueryHeadersItem(_queryHeaderParams2, 'qp-brandId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
10519
10538
  pageSize: 5000,
10520
10539
  currentPage: 1
10521
- }, getQueryHeadersItem(_queryHeaderParams2, 'qp-categoryId-in'))]).then(function (x) {
10540
+ }, getQueryHeadersItem(_queryHeaderParams2, 'qp-categoryId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/label"), {
10541
+ pageSize: 500,
10542
+ currentPage: 1,
10543
+ 'qp-labelType-eq': 1
10544
+ }, getQueryHeadersItem(_queryHeaderParams2, 'qp-itemLabelId-in'))]).then(function (x) {
10522
10545
  formatSource(x, 0, 3, tableSearchForm, ['id', 'name']);
10523
10546
  formatTreeDataSource(x, 1, 4, tableSearchForm);
10547
+ formatSource(x, 2, 6, tableSearchForm, ['id', 'name']);
10524
10548
  });
10525
10549
  modalTableProps = _objectSpread2({
10526
10550
  modalTableTitle: '选择SKU',
@@ -10674,6 +10698,25 @@ function commonFun(type, prefixUrl, parentProps) {
10674
10698
  }
10675
10699
  }
10676
10700
  }
10701
+ }, {
10702
+ name: 'qp-itemLabelId-in',
10703
+ type: 'select',
10704
+ label: '商品标签',
10705
+ field: {
10706
+ type: 'select',
10707
+ props: {
10708
+ mode: 'multiple',
10709
+ notFoundContent: '暂无数据',
10710
+ allowClear: true,
10711
+ showSearch: true,
10712
+ showArrow: true,
10713
+ maxTagCount: 1,
10714
+ optionFilterProp: 'children',
10715
+ filterOption: function filterOption(input, option) {
10716
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10717
+ }
10718
+ }
10719
+ }
10677
10720
  }];
10678
10721
  var _queryHeaderParams3 = getQueryHeadersList({
10679
10722
  querySelectHeadersList: querySelectHeadersList,
@@ -10689,10 +10732,15 @@ function commonFun(type, prefixUrl, parentProps) {
10689
10732
  }, getQueryHeadersItem(_queryHeaderParams3, 'qp-categoryId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
10690
10733
  pageSize: 5000,
10691
10734
  currentPage: 1
10692
- }, getQueryHeadersItem(_queryHeaderParams3, 'qp-classId-in'))]).then(function (x) {
10735
+ }, getQueryHeadersItem(_queryHeaderParams3, 'qp-classId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/label"), {
10736
+ pageSize: 500,
10737
+ currentPage: 1,
10738
+ 'qp-labelType-eq': 1
10739
+ }, getQueryHeadersItem(_queryHeaderParams3, 'qp-itemLabelId-in'))]).then(function (x) {
10693
10740
  formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10694
10741
  formatTreeDataSource(x, 1, 3, tableSearchForm);
10695
10742
  formatSource(x, 2, 4, tableSearchForm, ['id', 'name']);
10743
+ formatSource(x, 3, 5, tableSearchForm, ['id', 'name']);
10696
10744
  });
10697
10745
  modalTableProps = _objectSpread2({
10698
10746
  modalTableTitle: '选择商品(SPU) ',
@@ -10869,6 +10917,25 @@ function commonFun(type, prefixUrl, parentProps) {
10869
10917
  mode: 'multiple'
10870
10918
  }
10871
10919
  }
10920
+ }, {
10921
+ name: 'qp-itemLabelId-in',
10922
+ type: 'select',
10923
+ label: '商品标签',
10924
+ field: {
10925
+ type: 'select',
10926
+ props: {
10927
+ mode: 'multiple',
10928
+ notFoundContent: '暂无数据',
10929
+ allowClear: true,
10930
+ showSearch: true,
10931
+ showArrow: true,
10932
+ maxTagCount: 1,
10933
+ optionFilterProp: 'children',
10934
+ filterOption: function filterOption(input, option) {
10935
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10936
+ }
10937
+ }
10938
+ }
10872
10939
  }];
10873
10940
  var _queryHeaderParams4 = getQueryHeadersList({
10874
10941
  querySelectHeadersList: querySelectHeadersList,
@@ -10884,10 +10951,15 @@ function commonFun(type, prefixUrl, parentProps) {
10884
10951
  }, getQueryHeadersItem(_queryHeaderParams4, 'qp-categoryId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
10885
10952
  pageSize: 5000,
10886
10953
  currentPage: 1
10887
- }, getQueryHeadersItem(_queryHeaderParams4, 'qp-classId-in'))]).then(function (x) {
10954
+ }, getQueryHeadersItem(_queryHeaderParams4, 'qp-classId-in')), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/label"), {
10955
+ pageSize: 500,
10956
+ currentPage: 1,
10957
+ 'qp-labelType-eq': 1
10958
+ }, getQueryHeadersItem(_queryHeaderParams4, 'qp-itemLabelId-in'))]).then(function (x) {
10888
10959
  formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10889
10960
  formatTreeDataSource(x, 1, 3, tableSearchForm);
10890
10961
  formatSource(x, 2, 4, tableSearchForm, ['id', 'name']);
10962
+ formatSource(x, 3, 10, tableSearchForm, ['id', 'name']);
10891
10963
  });
10892
10964
  modalTableProps = _objectSpread2({
10893
10965
  modalTableTitle: '选择SPU',
@@ -34585,11 +34657,24 @@ var RuleField = /*#__PURE__*/function (_Component) {
34585
34657
  itemDetail = _this$props2$itemDeta === void 0 ? {} : _this$props2$itemDeta,
34586
34658
  _this$props2$others = _this$props2.others,
34587
34659
  others = _this$props2$others === void 0 ? {} : _this$props2$others,
34588
- propertyCode = _this$props2.propertyCode;
34660
+ propertyCode = _this$props2.propertyCode,
34661
+ isQueryParams = _this$props2.isQueryParams;
34589
34662
  var thresholdList = _this.state.thresholdList;
34590
34663
  var styleCommon = {
34591
34664
  width: customerWidth || '180px'
34592
34665
  };
34666
+ if (isQueryParams) {
34667
+ return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
34668
+ defaultValue: values.join(','),
34669
+ disabled: disabled,
34670
+ style: styleCommon,
34671
+ onBlur: function onBlur(e) {
34672
+ values = e.target.value.split(',');
34673
+ valueNames = e.target.value.split(',');
34674
+ callback(values, valueNames);
34675
+ }
34676
+ });
34677
+ }
34593
34678
  if (!selectOperation) return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
34594
34679
  disabled: true,
34595
34680
  style: styleCommon
@@ -37115,7 +37200,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
37115
37200
  fieldValues: [],
37116
37201
  thresholdQuery: {},
37117
37202
  thresholdList: [],
37118
- options: []
37203
+ options: [],
37204
+ isQueryParams: false
37119
37205
  };
37120
37206
  return _this;
37121
37207
  }
@@ -37135,13 +37221,15 @@ var RuleField = /*#__PURE__*/function (_Component) {
37135
37221
  initialThresholdQuery = _this$props3.initialThresholdQuery,
37136
37222
  queryIdentify = _this$props3.queryIdentify,
37137
37223
  propertyCode = _this$props3.propertyCode,
37138
- queryIdentifyType = _this$props3.queryIdentifyType;
37224
+ queryIdentifyType = _this$props3.queryIdentifyType,
37225
+ isQueryParams = _this$props3.isQueryParams;
37139
37226
  this.setState({
37140
37227
  selectOperation: selectOperation,
37141
37228
  thresholdQuery: initialThresholdQuery ? _objectSpread2({}, initialThresholdQuery) : {},
37142
37229
  dataTypeCode: dataTypeCode,
37143
37230
  dataChoiceBusinessType: dataChoiceBusinessType,
37144
37231
  dataInputBusinessType: dataInputBusinessType,
37232
+ isQueryParams: isQueryParams,
37145
37233
  others: others,
37146
37234
  fieldValues: _toConsumableArray(values),
37147
37235
  options: options
@@ -38348,6 +38436,18 @@ function RenderCompItem(props) {
38348
38436
  }
38349
38437
 
38350
38438
  var RangePicker$2 = antd.DatePicker.RangePicker;
38439
+ var FIXED_DATA_TYPES = {
38440
+ 10: '字符串',
38441
+ 20: '短整数',
38442
+ 21: '长整数',
38443
+ 22: '小数',
38444
+ 40: '数组',
38445
+ 41: '布尔值',
38446
+ 12: '富文本',
38447
+ 30: '日期',
38448
+ 31: '时间',
38449
+ 32: '日期时间'
38450
+ };
38351
38451
  var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38352
38452
  function RuleObjectComponent(props) {
38353
38453
  var _this;
@@ -38391,6 +38491,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38391
38491
  value: element.id,
38392
38492
  id: element.id,
38393
38493
  dataTypeCode: element.valueType,
38494
+ entityValueType: element.entityValueType,
38495
+ entityInputType: element.entityInputType,
38394
38496
  dataChoiceBusinessType: element.choiceType,
38395
38497
  dataInputBusinessType: element.inputType,
38396
38498
  info: element.info,
@@ -38412,6 +38514,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38412
38514
  metaObjectCode: _this.props.metaObjectCode || item.code
38413
38515
  }, item), {}, {
38414
38516
  dataTypeCode: item.valueType,
38517
+ entityValueType: item.entityValueType,
38518
+ entityInputType: item.entityInputType,
38415
38519
  dataChoiceBusinessType: item.choiceType,
38416
38520
  dataInputBusinessType: item.inputType
38417
38521
  }));
@@ -38445,6 +38549,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38445
38549
  value: element.id,
38446
38550
  id: element.id,
38447
38551
  dataTypeCode: element.valueType,
38552
+ entityValueType: element.entityValueType,
38553
+ entityInputType: element.entityInputType,
38448
38554
  dataChoiceBusinessType: element.choiceType,
38449
38555
  dataInputBusinessType: element.inputType,
38450
38556
  info: element.info,
@@ -38806,7 +38912,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38806
38912
  });
38807
38913
  };
38808
38914
  _this.renderRuleItem = function (itemDetail, parentDetail, floorIndex, classDataIndex, relateDatas) {
38809
- var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2;
38915
+ var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2, _itemDetail$reqCondit, _itemDetail$reqCondit2, _itemDetail$reqCondit3, _itemDetail$reqCondit4;
38810
38916
  var ruleTreeData = _this.state.ruleTreeData;
38811
38917
  var _this$props3 = _this.props,
38812
38918
  callBack = _this$props3.callBack,
@@ -38814,7 +38920,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38814
38920
  initialThresholdQuery = _this$props3$initialT === void 0 ? {} : _this$props3$initialT,
38815
38921
  disabled = _this$props3.disabled,
38816
38922
  systemVariableList = _this$props3.systemVariableList,
38817
- needShowInsertSQL = _this$props3.needShowInsertSQL;
38923
+ needShowInsertSQL = _this$props3.needShowInsertSQL,
38924
+ needShowReqCondition = _this$props3.needShowReqCondition;
38818
38925
  var thresholdQuery = _objectSpread2(_objectSpread2({}, initialThresholdQuery), relateDatas);
38819
38926
  var finalIndex = floorIndex + 1;
38820
38927
  var queryIdentify = '';
@@ -38905,6 +39012,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
38905
39012
  itemDetail.elementId = nodeInfo.triggerNode.props.id;
38906
39013
  itemDetail.elementName = nodeInfo.triggerNode.props.title;
38907
39014
  itemDetail.dataTypeCode = nodeInfo.triggerNode.props.dataTypeCode;
39015
+ itemDetail.entityValueType = nodeInfo.triggerNode.props.entityValueType;
39016
+ itemDetail.entityInputType = nodeInfo.triggerNode.props.entityInputType;
38908
39017
  itemDetail.metaObjectCode = nodeInfo.triggerNode.props.metaObjectCode;
38909
39018
  itemDetail.isInsertParam = false;
38910
39019
  if (needShowInsertSQL) {
@@ -39074,12 +39183,13 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39074
39183
  }
39075
39184
  }, (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.isInsertSQL) ? '取消插入SQL' : '插入SQL')), /*#__PURE__*/React__default['default'].createElement("div", {
39076
39185
  style: {
39077
- display: itemDetail.operationType == 'logic' && !disabled ? 'block' : 'none'
39186
+ 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
39187
  }
39079
39188
  }, /*#__PURE__*/React__default['default'].createElement("span", {
39080
39189
  style: {
39081
39190
  color: '#008fe0',
39082
- cursor: 'pointer'
39191
+ cursor: 'pointer',
39192
+ display: disabled ? 'none' : 'inline'
39083
39193
  },
39084
39194
  type: "link",
39085
39195
  onClick: function onClick() {
@@ -39091,7 +39201,107 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39091
39201
  fontSize: '14px',
39092
39202
  marginRight: '5px'
39093
39203
  }
39094
- }), "\u6DFB\u52A0\u6761\u4EF6"))));
39204
+ }), "\u6DFB\u52A0\u6761\u4EF6"), needShowReqCondition && /*#__PURE__*/React__default['default'].createElement("span", {
39205
+ style: {
39206
+ marginLeft: 10,
39207
+ display: disabled ? 'none' : 'inline'
39208
+ }
39209
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
39210
+ type: "link",
39211
+ disabled: disabled && (!itemDetail.reqConditionData || !itemDetail.reqConditionData.reqParamName || !((_itemDetail$reqCondit2 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit2 === void 0 ? void 0 : _itemDetail$reqCondit2.length)),
39212
+ style: {
39213
+ padding: 0,
39214
+ height: 'auto'
39215
+ },
39216
+ onClick: function onClick() {
39217
+ return _this.handleReqConditionToggle(itemDetail);
39218
+ }
39219
+ }, 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", {
39220
+ style: {
39221
+ marginTop: 10,
39222
+ display: disabled && (!itemDetail.reqConditionData.reqParamName || !((_itemDetail$reqCondit4 = itemDetail.reqConditionData.params) === null || _itemDetail$reqCondit4 === void 0 ? void 0 : _itemDetail$reqCondit4.length)) ? 'none' : 'flex',
39223
+ alignItems: 'center',
39224
+ background: '#f5f5f5',
39225
+ padding: '10px',
39226
+ borderRadius: '4px'
39227
+ }
39228
+ }, /*#__PURE__*/React__default['default'].createElement("span", {
39229
+ style: {
39230
+ marginRight: 8,
39231
+ flexShrink: 0
39232
+ }
39233
+ }, "\u8BF7\u6C42\u53C2\u6570\u540D\u79F0:"), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
39234
+ disabled: disabled,
39235
+ style: {
39236
+ width: 150,
39237
+ marginRight: 10
39238
+ },
39239
+ value: itemDetail.reqConditionData.reqParamName,
39240
+ onChange: function onChange(e) {
39241
+ return _this.handleReqDataChange(itemDetail, 'reqParamName', e.target.value);
39242
+ }
39243
+ }), /*#__PURE__*/React__default['default'].createElement("span", {
39244
+ style: {
39245
+ marginRight: 8,
39246
+ flexShrink: 0
39247
+ }
39248
+ }, "\u7C7B\u578B:"), /*#__PURE__*/React__default['default'].createElement(antd.Select, {
39249
+ disabled: disabled,
39250
+ style: {
39251
+ width: 120,
39252
+ marginRight: 10
39253
+ },
39254
+ value: itemDetail.reqConditionData.dataTypeCode,
39255
+ onChange: function onChange(val) {
39256
+ return _this.handleReqDataChange(itemDetail, 'dataTypeCode', val);
39257
+ }
39258
+ }, Object.keys(FIXED_DATA_TYPES).map(function (code) {
39259
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
39260
+ key: code,
39261
+ value: code
39262
+ }, FIXED_DATA_TYPES[code]);
39263
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Select, {
39264
+ disabled: disabled,
39265
+ style: {
39266
+ width: 120,
39267
+ marginRight: 10
39268
+ },
39269
+ value: itemDetail.reqConditionData.operationCode,
39270
+ onChange: function onChange(val) {
39271
+ return _this.handleReqDataChange(itemDetail, 'operationCode', val);
39272
+ }
39273
+ }, [{
39274
+ 'code': '1',
39275
+ 'name': '在集合'
39276
+ }, {
39277
+ 'code': '2',
39278
+ 'name': '不等于'
39279
+ }, {
39280
+ code: '3',
39281
+ name: '小于'
39282
+ }, {
39283
+ code: '4',
39284
+ name: '大于'
39285
+ }, {
39286
+ code: '5',
39287
+ name: '等于'
39288
+ }].map(function (op) {
39289
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
39290
+ key: op.code,
39291
+ value: op.code
39292
+ }, op.name);
39293
+ })), /*#__PURE__*/React__default['default'].createElement(RuleField, {
39294
+ customerWidth: '180px',
39295
+ isQueryParams: true,
39296
+ selectOperation: itemDetail.reqConditionData.operationCode,
39297
+ dataTypeCode: itemDetail.reqConditionData.dataTypeCode,
39298
+ values: itemDetail.reqConditionData.params || [],
39299
+ valueNames: itemDetail.reqConditionData.paramNames || [],
39300
+ callback: function callback(newValues, newValueNames) {
39301
+ return _this.handleReqDataChange(itemDetail, 'params', newValues, newValueNames);
39302
+ },
39303
+ disabled: disabled
39304
+ })))));
39095
39305
  };
39096
39306
  _this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex, key) {
39097
39307
  var ruleClassData = _this.state.ruleClassData;
@@ -39407,6 +39617,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39407
39617
  delete itemDetail.params;
39408
39618
  delete itemDetail.paramNames;
39409
39619
  delete itemDetail.dataTypeCode;
39620
+ delete itemDetail.entityValueType;
39621
+ delete itemDetail.entityInputType;
39410
39622
  delete itemDetail.elementId;
39411
39623
  delete itemDetail.elementName;
39412
39624
  delete itemDetail.metaObjectCode;
@@ -39457,6 +39669,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39457
39669
  parentDetail.elementId = parentDetail.subExpression[0].elementId;
39458
39670
  parentDetail.elementName = parentDetail.subExpression[0].elementName;
39459
39671
  parentDetail.dataTypeCode = parentDetail.subExpression[0].dataTypeCode;
39672
+ parentDetail.entityValueType = parentDetail.subExpression[0].entityValueType;
39673
+ parentDetail.entityInputType = parentDetail.subExpression[0].entityInputType;
39460
39674
  delete parentDetail.subExpression;
39461
39675
  }
39462
39676
  }
@@ -39530,6 +39744,55 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
39530
39744
  callBack(ruleClassData);
39531
39745
  });
39532
39746
  };
39747
+ _this.handleReqConditionToggle = function (itemDetail) {
39748
+ var ruleClassData = _this.state.ruleClassData;
39749
+ var callBack = _this.props.callBack;
39750
+ itemDetail.isReqCondition = !itemDetail.isReqCondition;
39751
+ if (itemDetail.isReqCondition && !itemDetail.reqConditionData) {
39752
+ itemDetail.reqConditionData = {
39753
+ operationType: 'relation',
39754
+ dataTypeCode: '10',
39755
+ entityInputType: '10',
39756
+ entityValueType: '10',
39757
+ operationCode: '',
39758
+ reqParamName: '',
39759
+ params: [],
39760
+ paramNames: []
39761
+ };
39762
+ }
39763
+ _this.setState({
39764
+ ruleClassData: ruleClassData
39765
+ }, function () {
39766
+ callBack(ruleClassData);
39767
+ });
39768
+ };
39769
+ _this.handleReqDataChange = function (itemDetail, field, value, valueNames) {
39770
+ var ruleClassData = _this.state.ruleClassData;
39771
+ var callBack = _this.props.callBack;
39772
+ if (!itemDetail.reqConditionData) return;
39773
+ if (field === 'dataTypeCode') {
39774
+ itemDetail.reqConditionData.dataTypeCode = value;
39775
+ itemDetail.reqConditionData.entityInputType = value;
39776
+ itemDetail.reqConditionData.entityValueType = value;
39777
+ itemDetail.reqConditionData.operationCode = '';
39778
+ itemDetail.reqConditionData.params = [];
39779
+ itemDetail.reqConditionData.paramNames = [];
39780
+ } else if (field === 'operationCode') {
39781
+ itemDetail.reqConditionData.operationCode = value;
39782
+ } else if (field === 'reqParamName') {
39783
+ itemDetail.reqConditionData.reqParamName = value;
39784
+ } else if (field === 'params') {
39785
+ itemDetail.reqConditionData.params = value;
39786
+ if (valueNames) {
39787
+ itemDetail.reqConditionData.paramNames = valueNames;
39788
+ }
39789
+ }
39790
+ _this.setState({
39791
+ ruleClassData: ruleClassData
39792
+ }, function () {
39793
+ callBack(ruleClassData);
39794
+ });
39795
+ };
39533
39796
  _this.state = {
39534
39797
  editNameIndex: 0,
39535
39798
  isEdit: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.0-alpha.21",
3
+ "version": "4.2.0-alpha.22",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -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: 'shopFile2',
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: 'spuCommodityWithProperty',
320
+ selectBusinessType: 'spuCommodity',
321
321
  };
322
322
 
323
323
  const onTabChange = (key) => {