@bit-sun/business-component 2.3.10 → 2.3.11-alpha.2

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
@@ -1005,32 +1005,35 @@ function handleCommonTimeRender(text, format) {
1005
1005
  }
1006
1006
  //设置queryTable默认列宽
1007
1007
  var getItemDefaultWidth = function getItemDefaultWidth(item) {
1008
+ var _ref;
1008
1009
  var defaultWidth = 200;
1009
- var lowerCaseKey = (item.key || item.dataIndex).toLowerCase();
1010
- switch (true) {
1011
- case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
1012
- defaultWidth = 60;
1013
- break;
1014
- case lowerCaseKey.indexOf('number') > -1:
1015
- case lowerCaseKey.indexOf('quantity') > -1:
1016
- case lowerCaseKey.indexOf('amount') > -1:
1017
- defaultWidth = 90;
1018
- break;
1019
- case lowerCaseKey.indexOf('no') > -1:
1020
- defaultWidth = 200;
1021
- break;
1022
- case lowerCaseKey.indexOf('code') > -1:
1023
- defaultWidth = 170;
1024
- break;
1025
- case lowerCaseKey.indexOf('time') > -1:
1026
- defaultWidth = 130;
1027
- break;
1028
- case lowerCaseKey.indexOf('status') > -1:
1029
- defaultWidth = 100;
1030
- break;
1031
- case lowerCaseKey.indexOf('user') > -1:
1032
- defaultWidth = 130;
1033
- break;
1010
+ var lowerCaseKey = (_ref = item.key || item.dataIndex) === null || _ref === void 0 ? void 0 : _ref.toLowerCase();
1011
+ if (lowerCaseKey) {
1012
+ switch (true) {
1013
+ case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
1014
+ defaultWidth = 60;
1015
+ break;
1016
+ case lowerCaseKey.indexOf('number') > -1:
1017
+ case lowerCaseKey.indexOf('quantity') > -1:
1018
+ case lowerCaseKey.indexOf('amount') > -1:
1019
+ defaultWidth = 90;
1020
+ break;
1021
+ case lowerCaseKey.indexOf('no') > -1:
1022
+ defaultWidth = 200;
1023
+ break;
1024
+ case lowerCaseKey.indexOf('code') > -1:
1025
+ defaultWidth = 170;
1026
+ break;
1027
+ case lowerCaseKey.indexOf('time') > -1:
1028
+ defaultWidth = 130;
1029
+ break;
1030
+ case lowerCaseKey.indexOf('status') > -1:
1031
+ defaultWidth = 100;
1032
+ break;
1033
+ case lowerCaseKey.indexOf('user') > -1:
1034
+ defaultWidth = 130;
1035
+ break;
1036
+ }
1034
1037
  }
1035
1038
  return defaultWidth;
1036
1039
  };
@@ -2608,7 +2611,8 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2608
2611
  needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
2609
2612
  _props$getPopupContai = props.getPopupContainer,
2610
2613
  _getPopupContainer = _props$getPopupContai === void 0 ? undefined : _props$getPopupContai,
2611
- fieldComponent = props.fieldComponent;
2614
+ fieldComponent = props.fieldComponent,
2615
+ selectBusinessType = props.selectBusinessType;
2612
2616
  var _ref = requestConfig || {},
2613
2617
  url = _ref.url,
2614
2618
  otherParams = _ref.otherParams,
@@ -2626,7 +2630,9 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2626
2630
  _ref$init = _ref.init,
2627
2631
  init = _ref$init === void 0 ? true : _ref$init,
2628
2632
  _ref$extralHeaders = _ref.extralHeaders,
2629
- extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders;
2633
+ extralHeaders = _ref$extralHeaders === void 0 ? {} : _ref$extralHeaders,
2634
+ _ref$specialBracket = _ref.specialBracket,
2635
+ specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket;
2630
2636
  var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
2631
2637
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
2632
2638
  var initVal = value || (selectMode ? [] : null);
@@ -2728,8 +2734,8 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2728
2734
  setSelectedRowKeys = _useState24[1];
2729
2735
  var _useState25 = React.useState([]),
2730
2736
  _useState26 = _slicedToArray(_useState25, 2),
2731
- doubleArr = _useState26[0],
2732
- setDoubleArr = _useState26[1]; // 存放双数组的数组
2737
+ selectedRows = _useState26[0],
2738
+ setSelectedRows = _useState26[1];
2733
2739
  var _useState27 = React.useState(false),
2734
2740
  _useState28 = _slicedToArray(_useState27, 2),
2735
2741
  checkedAll = _useState28[0],
@@ -2785,6 +2791,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2785
2791
  var getData = function getData() {
2786
2792
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2787
2793
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2794
+ var callback = arguments.length > 2 ? arguments[2] : undefined;
2788
2795
  if (!requestConfig) return;
2789
2796
  setFetching(true);
2790
2797
  // 处理dependence参数
@@ -2933,7 +2940,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2933
2940
  }
2934
2941
  }
2935
2942
  return _objectSpread2(_objectSpread2({}, item), {}, {
2936
- text: item[mappingTextField],
2943
+ text: specialBracket ? "\u3010".concat(item[mappingValueField], "\u3011").concat(item[mappingTextField]) : item[mappingTextField],
2937
2944
  textShowText: textShowText,
2938
2945
  textShowKey: item[mappingTextShowKeyField || mappingValueField],
2939
2946
  value: item[mappingValueField]
@@ -2951,7 +2958,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2951
2958
  }
2952
2959
  }
2953
2960
  return _objectSpread2(_objectSpread2({}, item), {}, {
2954
- text: item[mappingTextField],
2961
+ text: specialBracket ? "\u3010".concat(item[mappingValueField], "\u3011").concat(item[mappingTextField]) : item[mappingTextField],
2955
2962
  textShowText: textShowText,
2956
2963
  textShowKey: item[mappingTextShowKeyField || mappingValueField],
2957
2964
  value: item[mappingValueField]
@@ -2959,18 +2966,22 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2959
2966
  })) : [];
2960
2967
  }
2961
2968
  source = Array.isArray(source) ? source : [];
2962
- if (type === 1) {
2963
- var _ctx$form;
2964
- ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
2965
- setItems(source);
2966
- setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
2969
+ if (callback) {
2970
+ callback(source);
2967
2971
  } else {
2968
- setTableData(source);
2969
- setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
2970
- total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
2971
- 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),
2972
- 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)
2973
- }));
2972
+ if (type === 1) {
2973
+ var _ctx$form;
2974
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
2975
+ setItems(source);
2976
+ setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
2977
+ } else {
2978
+ setTableData(source);
2979
+ setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
2980
+ total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
2981
+ 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),
2982
+ 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)
2983
+ }));
2984
+ }
2974
2985
  }
2975
2986
  }).catch(function (err) {
2976
2987
  setFetching(false);
@@ -3017,6 +3028,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3017
3028
  React.useEffect(function () {
3018
3029
  makeUniqueValue();
3019
3030
  }, [resultSourceKey]);
3031
+ React.useEffect(function () {
3032
+ if (init) {
3033
+ setItems([]);
3034
+ setItemsTotal(0);
3035
+ run('init');
3036
+ }
3037
+ }, [selectBusinessType]);
3020
3038
  var showModal = function showModal() {
3021
3039
  getData({
3022
3040
  pageSize: tableInitPageSize,
@@ -3029,6 +3047,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3029
3047
  setSelectedRowKeys(labelInValue ? value.map(function (i) {
3030
3048
  return i.key;
3031
3049
  }) : value);
3050
+ setSelectedRows(labelInValue ? value.map(function (i) {
3051
+ var _ref4;
3052
+ return _ref4 = {}, _defineProperty(_ref4, mappingValueField, i.key), _defineProperty(_ref4, "value", i.key), _defineProperty(_ref4, "text", i.label), _ref4;
3053
+ }) : value.map(function (i) {
3054
+ var _ref5;
3055
+ return _ref5 = {}, _defineProperty(_ref5, mappingValueField, i), _defineProperty(_ref5, "value", i), _ref5;
3056
+ }));
3032
3057
  setPopValue(labelInValue ? value.map(function (i) {
3033
3058
  return {
3034
3059
  value: i.key,
@@ -3041,12 +3066,10 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3041
3066
  }));
3042
3067
  setIndeterminate(!!value.length && value.length < itemsTotal);
3043
3068
  setCheckedAll(itemsTotal && value.length === itemsTotal);
3044
- // 需清空数据
3045
- if (!value.length) {
3046
- setDoubleArr([]);
3047
- }
3048
3069
  } else {
3070
+ var _ref6, _ref7;
3049
3071
  setSelectedRowKeys(labelInValue ? [value.key] : [value]);
3072
+ setSelectedRows(labelInValue ? [(_ref6 = {}, _defineProperty(_ref6, mappingValueField, value.key), _defineProperty(_ref6, "value", value.key), _defineProperty(_ref6, "text", value.label), _ref6)] : [(_ref7 = {}, _defineProperty(_ref7, mappingValueField, value), _defineProperty(_ref7, "value", value), _ref7)]);
3050
3073
  setPopValue(labelInValue ? [{
3051
3074
  value: value.key,
3052
3075
  text: value.label
@@ -3096,7 +3119,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3096
3119
  setTableData([]);
3097
3120
  setTablePagination(tableInitPagination);
3098
3121
  setSelectedRowKeys([]);
3099
- setDoubleArr([]);
3122
+ setSelectedRows([]);
3100
3123
  setCheckedAll(false);
3101
3124
  setIndeterminate(false);
3102
3125
  };
@@ -3159,25 +3182,39 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3159
3182
  currentPage: pagination.current
3160
3183
  }), 2);
3161
3184
  };
3185
+ var onCheckAllData = function onCheckAllData(pSize) {
3186
+ getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
3187
+ pageSize: pSize,
3188
+ currentPage: 1
3189
+ }), 2, function (source) {
3190
+ var currentItemsData = JSON.parse(JSON.stringify(source));
3191
+ setSelectedRowKeys(currentItemsData.map(function (i) {
3192
+ return i.value;
3193
+ }));
3194
+ setPopValue(currentItemsData);
3195
+ setSelectedRows(currentItemsData);
3196
+ });
3197
+ };
3162
3198
  var onChangeCheckAll = function onChangeCheckAll(e) {
3163
3199
  if (e.target.checked) {
3164
3200
  // 如果下拉框有所有数据就处理选中所有【items.length === itemsTotal】(最多可选100条)
3165
3201
  // 如果超过100条 就默认查出所有数据
3166
- var currentItemsData = JSON.parse(JSON.stringify(items));
3167
- var totalPage = Math.ceil(itemsTotal / (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize));
3168
- for (var i = 0; i <= totalPage - 1; i++) {
3169
- doubleArr[i] = currentItemsData.slice((tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize) * i, (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize) * (i + 1));
3202
+ if (items.length < itemsTotal) {
3203
+ var totalPage = Math.ceil(itemsTotal / (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize));
3204
+ var allPageSize = totalPage * (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.pageSize);
3205
+ onCheckAllData(allPageSize);
3206
+ } else {
3207
+ var currentItemsData = JSON.parse(JSON.stringify(items));
3208
+ setSelectedRowKeys(currentItemsData.map(function (i) {
3209
+ return i.value;
3210
+ }));
3211
+ setPopValue(currentItemsData);
3212
+ setSelectedRows(currentItemsData);
3170
3213
  }
3171
- setDoubleArr(doubleArr);
3172
- setSelectedRowKeys(currentItemsData.map(function (i) {
3173
- return i.value;
3174
- }));
3175
- setPopValue(currentItemsData);
3176
- if (items.length < itemsTotal) ;
3177
3214
  } else {
3178
3215
  setSelectedRowKeys([]);
3179
3216
  setPopValue([]);
3180
- setDoubleArr([]);
3217
+ setSelectedRows([]);
3181
3218
  }
3182
3219
  setIndeterminate(false);
3183
3220
  setCheckedAll(e.target.checked);
@@ -3185,13 +3222,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3185
3222
  var LightHeightOption = function LightHeightOption(props) {
3186
3223
  var filterTxt = props.filterTxt,
3187
3224
  text = props.text;
3188
- var heightLightTxt = function heightLightTxt(txt, heightTxt) {
3225
+ var heightLightTxt = function heightLightTxt(text, heightTxt) {
3189
3226
  if (heightTxt === '') {
3190
- return txt;
3227
+ return text;
3191
3228
  }
3192
3229
  // 前面filterOption 不区分大小写,这里用i
3193
3230
  var regexp = new RegExp(heightTxt, 'gi');
3194
- return txt.replace(regexp, "<span style=\"color:red\">".concat(heightTxt, "</span>"));
3231
+ return text.replace(regexp, "<span style=\"color:red\">".concat(heightTxt, "</span>"));
3195
3232
  };
3196
3233
  return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
3197
3234
  title: text
@@ -3203,54 +3240,21 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3203
3240
  }
3204
3241
  }));
3205
3242
  };
3206
- // 扁平化二维数组的方法
3207
- var mapRows = function mapRows(params) {
3208
- var res = [];
3209
- for (var i = 0; i < params.length; i++) {
3210
- if (Array.isArray(params[i])) {
3211
- // 去重
3212
- res = ___default['default'].uniqBy(res.concat(mapRows(params[i])), 'value');
3213
- } else {
3214
- res.push(params[i]);
3215
- // 去重
3216
- res = ___default['default'].uniqBy(res, 'value');
3217
- }
3218
- }
3219
- return res.filter(Boolean); //去掉undefined的情况
3220
- };
3221
3243
 
3222
3244
  var onChangeSelectedKeys = function onChangeSelectedKeys(selectKeys, selectRows) {
3223
- var nowPage = tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.current;
3224
- var filterRows = []; // 存放拼接后的一维数组的变量
3225
- var sksResult = [];
3226
- if (selectMode) {
3227
- // 处理多选分页累计选中
3228
- // 勾选生成二维数组
3229
- doubleArr[nowPage ? nowPage - 1 : 0] = selectRows;
3230
- // console.log(doubleArr)
3231
- setDoubleArr(doubleArr);
3232
- // 这块扁平化成为一位数组
3233
- filterRows = mapRows(doubleArr);
3234
- // console.log(filterRows)
3235
- sksResult = filterRows.map(function (i) {
3236
- return i.value;
3237
- });
3238
- } else {
3239
- // 处理单选
3240
- filterRows = selectRows;
3241
- sksResult = selectRows.map(function (i) {
3242
- return i.value;
3243
- });
3244
- // 单选 默认直接选中 不需要确定 配置了modalRadioNeedFooter就需要确定
3245
- if (!(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalRadioNeedFooter)) {
3246
- handleSelectOver(filterRows);
3247
- handleCancel();
3248
- }
3245
+ var sksResult = selectRows.map(function (i) {
3246
+ return i.value;
3247
+ });
3248
+ // 单选 默认直接选中 不需要确定 配置了modalRadioNeedFooter就需要确定
3249
+ if (!selectMode && !(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalRadioNeedFooter)) {
3250
+ handleSelectOver(selectRows);
3251
+ handleCancel();
3249
3252
  }
3250
3253
  setSelectedRowKeys(sksResult);
3251
- setPopValue(filterRows);
3252
- setIndeterminate(!!filterRows.length && filterRows.length < (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total));
3253
- setCheckedAll(filterRows.length === (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total));
3254
+ setSelectedRows(selectRows);
3255
+ setPopValue(selectRows);
3256
+ setIndeterminate(!!selectRows.length && selectRows.length < (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total));
3257
+ setCheckedAll(selectRows.length === (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total));
3254
3258
  };
3255
3259
  // 生成唯一值
3256
3260
  var makeUniqueValue = function makeUniqueValue() {
@@ -3261,8 +3265,21 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3261
3265
  var rowSelection = {
3262
3266
  type: selectMode ? 'checkbox' : 'radio',
3263
3267
  selectedRowKeys: selectedRowKeys,
3268
+ preserveSelectedRowKeys: true,
3264
3269
  onChange: function onChange(sks, srs) {
3265
- onChangeSelectedKeys(sks, srs);
3270
+ // 处理翻页后,之前存储的selectedRows变为undefined
3271
+ // selectedRows合并新数组,过滤undefined,过滤留下对应selectedRowKeys的集合
3272
+ var tmpSelectedRows = selectedRows.concat(srs).filter(function (item) {
3273
+ return item != undefined;
3274
+ });
3275
+ var totalSelectedRows = sks.map(function (key) {
3276
+ return tmpSelectedRows.filter(function (item) {
3277
+ return item[mappingValueField] == key;
3278
+ })[0];
3279
+ }).filter(function (item) {
3280
+ return item != undefined;
3281
+ });
3282
+ onChangeSelectedKeys(sks, totalSelectedRows);
3266
3283
  },
3267
3284
  getCheckboxProps: function getCheckboxProps() {
3268
3285
  return {
@@ -3397,6 +3414,10 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3397
3414
  })
3398
3415
  }, "+ ".concat(selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length));
3399
3416
  };
3417
+ var handleSelectOptionsShowValue = function handleSelectOptionsShowValue(specialBracket, item) {
3418
+ var showText = Array.isArray(item.textShowText) && item.textShowText.join(' ') || item.textShowText;
3419
+ return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
3420
+ };
3400
3421
  return /*#__PURE__*/React__default['default'].createElement("div", {
3401
3422
  className: 'search_select'
3402
3423
  }, fieldComponent ? /*#__PURE__*/React__default['default'].createElement("div", {
@@ -3466,7 +3487,7 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3466
3487
  key: item.value,
3467
3488
  label: item.text
3468
3489
  }, LightHeightOption({
3469
- text: "".concat(item.textShowKey, " ").concat(Array.isArray(item.textShowText) && item.textShowText.join(' ') || item.textShowText),
3490
+ text: handleSelectOptionsShowValue(specialBracket, item),
3470
3491
  filterTxt: searchValue
3471
3492
  }));
3472
3493
  })), needModalTable && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
@@ -4225,32 +4246,35 @@ var noEmptyArray = function noEmptyArray(arr) {
4225
4246
  };
4226
4247
  //设置queryTable默认列宽
4227
4248
  var getItemDefaultWidth$1 = function getItemDefaultWidth(item) {
4249
+ var _ref;
4228
4250
  var defaultWidth = 200;
4229
- var lowerCaseKey = (item.key || item.dataIndex).toLowerCase();
4230
- switch (true) {
4231
- case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
4232
- defaultWidth = 60;
4233
- break;
4234
- case lowerCaseKey.indexOf('number') > -1:
4235
- case lowerCaseKey.indexOf('quantity') > -1:
4236
- case lowerCaseKey.indexOf('amount') > -1:
4237
- defaultWidth = 90;
4238
- break;
4239
- case lowerCaseKey.indexOf('no') > -1:
4240
- defaultWidth = 200;
4241
- break;
4242
- case lowerCaseKey.indexOf('code') > -1:
4243
- defaultWidth = 170;
4244
- break;
4245
- case lowerCaseKey.indexOf('time') > -1:
4246
- defaultWidth = 130;
4247
- break;
4248
- case lowerCaseKey.indexOf('status') > -1:
4249
- defaultWidth = 100;
4250
- break;
4251
- case lowerCaseKey.indexOf('user') > -1:
4252
- defaultWidth = 130;
4253
- break;
4251
+ var lowerCaseKey = (_ref = item.key || item.dataIndex) === null || _ref === void 0 ? void 0 : _ref.toLowerCase();
4252
+ if (lowerCaseKey) {
4253
+ switch (true) {
4254
+ case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
4255
+ defaultWidth = 60;
4256
+ break;
4257
+ case lowerCaseKey.indexOf('number') > -1:
4258
+ case lowerCaseKey.indexOf('quantity') > -1:
4259
+ case lowerCaseKey.indexOf('amount') > -1:
4260
+ defaultWidth = 90;
4261
+ break;
4262
+ case lowerCaseKey.indexOf('no') > -1:
4263
+ defaultWidth = 200;
4264
+ break;
4265
+ case lowerCaseKey.indexOf('code') > -1:
4266
+ defaultWidth = 170;
4267
+ break;
4268
+ case lowerCaseKey.indexOf('time') > -1:
4269
+ defaultWidth = 130;
4270
+ break;
4271
+ case lowerCaseKey.indexOf('status') > -1:
4272
+ defaultWidth = 100;
4273
+ break;
4274
+ case lowerCaseKey.indexOf('user') > -1:
4275
+ defaultWidth = 130;
4276
+ break;
4277
+ }
4254
4278
  }
4255
4279
  return defaultWidth;
4256
4280
  };
@@ -4395,7 +4419,9 @@ var AddSelect = function AddSelect(props) {
4395
4419
  _props$businessType = props.businessType,
4396
4420
  businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
4397
4421
  _props$isAllowRepeate = props.isAllowRepeatedSelect,
4398
- isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
4422
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate,
4423
+ _props$noUseItemEanco = props.noUseItemEancode,
4424
+ noUseItemEancode = _props$noUseItemEanco === void 0 ? true : _props$noUseItemEanco;
4399
4425
  var _ref = requestConfig || {},
4400
4426
  url = _ref.url,
4401
4427
  otherParams = _ref.otherParams,
@@ -5072,8 +5098,10 @@ var AddSelect = function AddSelect(props) {
5072
5098
  pageSize: 5000,
5073
5099
  currentPage: 1
5074
5100
  })]).then(function (x) {
5075
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
5076
- formatTreeDataSource(x, 1, 3, tableSearchForm);
5101
+ var searchPosition1 = noUseItemEancode ? 3 : 2;
5102
+ var searchPosition2 = noUseItemEancode ? 4 : 3;
5103
+ formatSource(x, 0, searchPosition1, tableSearchForm, ['id', 'name']);
5104
+ formatTreeDataSource(x, 1, searchPosition2, tableSearchForm);
5077
5105
  });
5078
5106
  }
5079
5107
  if (businessType == 'skc') {
@@ -6618,6 +6646,13 @@ var shopFile2Type = [{
6618
6646
  text: "自营B2C",
6619
6647
  value: 'B2C'
6620
6648
  }];
6649
+ var shopFile2Status = [{
6650
+ text: "启用",
6651
+ value: 10
6652
+ }, {
6653
+ text: "禁用",
6654
+ value: 20
6655
+ }];
6621
6656
  var arrivalPaySupportList = [{
6622
6657
  text: "支持",
6623
6658
  value: 1
@@ -6632,6 +6667,13 @@ var sharingType = [{
6632
6667
  text: "私有",
6633
6668
  value: '20'
6634
6669
  }];
6670
+ var employeeType = [{
6671
+ text: "外部员工",
6672
+ value: '10'
6673
+ }, {
6674
+ text: "内部员工",
6675
+ value: '20'
6676
+ }];
6635
6677
 
6636
6678
  var getDicData = function getDicData(dicCode) {
6637
6679
  var dicData = {};
@@ -7573,10 +7615,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7573
7615
  mappingTextField: 'physicalWarehouseName',
7574
7616
  mappingTextShowKeyField: 'physicalWarehouseCode',
7575
7617
  mappingValueField: 'id',
7576
- otherParams: {
7577
- 'qp-isEnable-eq': 1,
7618
+ otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
7619
+ 'qp-isEnable-eq': 1
7620
+ }), {}, {
7578
7621
  sorter: 'desc-id'
7579
- },
7622
+ }),
7580
7623
  sourceName: 'warehouseIds'
7581
7624
  }, requestConfigProp);
7582
7625
  tableSearchForm = [{
@@ -7609,7 +7652,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7609
7652
  }
7610
7653
  }
7611
7654
  }
7612
- }];
7655
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
7656
+ name: 'qp-isEnable-eq',
7657
+ type: 'select',
7658
+ label: '物理仓状态',
7659
+ initialSource: getDictionarySource$1('SC00001')
7660
+ }] : []));
7613
7661
  Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/company"), {
7614
7662
  pageSize: 5000,
7615
7663
  currentPage: 1,
@@ -7632,10 +7680,16 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7632
7680
  render: function render(text) {
7633
7681
  return getDictionaryTextByValue('SC00002', text);
7634
7682
  }
7635
- }, {
7683
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
7684
+ title: '状态',
7685
+ dataIndex: 'isEnable',
7686
+ render: function render(text) {
7687
+ return getDictionaryTextByValue('SC00001', text);
7688
+ }
7689
+ }] : []), [{
7636
7690
  title: '所属公司',
7637
7691
  dataIndex: 'companyName'
7638
- }]
7692
+ }])
7639
7693
  }, modalTableBusProps);
7640
7694
  }
7641
7695
  if (type === 'realWarehouse') {
@@ -7645,10 +7699,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7645
7699
  mappingTextField: 'realWarehouseName',
7646
7700
  mappingTextShowKeyField: 'realWarehouseCode',
7647
7701
  mappingValueField: 'id',
7648
- otherParams: {
7649
- 'qp-isEnable-eq': 1,
7702
+ otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
7703
+ 'qp-isEnable-eq': 1
7704
+ }), {}, {
7650
7705
  sorter: 'desc-id'
7651
- },
7706
+ }),
7652
7707
  sourceName: 'warehouseIds'
7653
7708
  }, requestConfigProp);
7654
7709
  tableSearchForm = [{
@@ -7662,7 +7717,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7662
7717
  type: 'select',
7663
7718
  label: '逻辑仓类型',
7664
7719
  initialSource: getDictionarySource$1('SC00004')
7665
- }];
7720
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
7721
+ name: 'qp-isEnable-eq',
7722
+ type: 'select',
7723
+ label: '逻辑仓状态',
7724
+ initialSource: getDictionarySource$1('SC00001')
7725
+ }] : []));
7666
7726
  modalTableProps = _objectSpread2({
7667
7727
  modalTableTitle: '选择逻辑仓',
7668
7728
  tableSearchForm: tableSearchForm,
@@ -7678,7 +7738,13 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7678
7738
  render: function render(text) {
7679
7739
  return getDictionaryTextByValue('SC00004', text);
7680
7740
  }
7681
- }]
7741
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
7742
+ title: '状态',
7743
+ dataIndex: 'isEnable',
7744
+ render: function render(text) {
7745
+ return getDictionaryTextByValue('SC00001', text);
7746
+ }
7747
+ }] : []))
7682
7748
  }, modalTableBusProps);
7683
7749
  }
7684
7750
  if (type === 'ownerWarehouse') {
@@ -7688,10 +7754,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7688
7754
  mappingTextField: 'name',
7689
7755
  mappingTextShowKeyField: 'operationWarehouseCode',
7690
7756
  mappingValueField: 'operationWarehouseCode',
7691
- otherParams: {
7692
- 'qp-status-eq': 1,
7757
+ otherParams: _objectSpread2(_objectSpread2({}, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? {} : {
7758
+ 'qp-status-eq': 1
7759
+ }), {}, {
7693
7760
  sorter: 'desc-id'
7694
- },
7761
+ }),
7695
7762
  sourceName: 'qp-operationWarehouseCode-in'
7696
7763
  }, requestConfigProp);
7697
7764
  tableSearchForm = [{
@@ -7719,7 +7786,12 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7719
7786
  }
7720
7787
  }
7721
7788
  }
7722
- }];
7789
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
7790
+ name: 'qp-status-eq',
7791
+ type: 'select',
7792
+ label: '运营仓状态',
7793
+ initialSource: getDictionarySource$1('SC00001')
7794
+ }] : []));
7723
7795
  Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/groupInfo/listNoPage"), {
7724
7796
  'qp-status-eq': 1
7725
7797
  })]).then(function (x) {
@@ -7737,7 +7809,13 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
7737
7809
  }, {
7738
7810
  title: '运营组',
7739
7811
  dataIndex: 'groupName'
7740
- }]
7812
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needStatusSearch) ? [{
7813
+ title: '状态',
7814
+ dataIndex: 'status',
7815
+ render: function render(text) {
7816
+ return getDictionaryTextByValue('SC00001', text);
7817
+ }
7818
+ }] : []))
7741
7819
  }, modalTableBusProps);
7742
7820
  }
7743
7821
  // 仓库选择器(虚拟、渠道仓)(无弹窗)
@@ -8156,6 +8234,11 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8156
8234
  type: 'select',
8157
8235
  label: '商店类型',
8158
8236
  initialSource: shopFile2Type
8237
+ }, {
8238
+ name: 'qp-status-in',
8239
+ type: 'select',
8240
+ label: '商店状态',
8241
+ initialSource: shopFile2Status
8159
8242
  }, {
8160
8243
  name: 'qp-orgCode-in',
8161
8244
  type: 'select',
@@ -8181,7 +8264,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8181
8264
  'qp-realOrg-eq': true,
8182
8265
  'qp-status-eq': 10
8183
8266
  })]).then(function (x) {
8184
- formatSource(x, 0, 3, tableSearchForm);
8267
+ formatSource(x, 0, 4, tableSearchForm);
8185
8268
  });
8186
8269
  modalTableProps = _objectSpread2({
8187
8270
  modalTableTitle: '选择商店',
@@ -8201,6 +8284,15 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8201
8284
  return i.value === text;
8202
8285
  })) === null || _shopFile2Type$find === void 0 ? void 0 : _shopFile2Type$find.text;
8203
8286
  }
8287
+ }, {
8288
+ title: '启用状态',
8289
+ dataIndex: 'status',
8290
+ render: function render(text) {
8291
+ var _shopFile2Status$find;
8292
+ return (_shopFile2Status$find = shopFile2Status.find(function (i) {
8293
+ return i.value === text;
8294
+ })) === null || _shopFile2Status$find === void 0 ? void 0 : _shopFile2Status$find.text;
8295
+ }
8204
8296
  }, {
8205
8297
  title: '所属销售组织',
8206
8298
  dataIndex: 'orgName'
@@ -8335,12 +8427,14 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8335
8427
  mappingTextField: 'name',
8336
8428
  mappingTextShowKeyField: 'username',
8337
8429
  mappingValueField: 'id',
8338
- otherParams: {
8430
+ otherParams: _objectSpread2(_objectSpread2({
8339
8431
  'qp-enable-eq': 10,
8340
- 'qp-employmentType-eq': 20,
8341
- 'qp-orgViewIds-like': 'administrative-organization-view',
8432
+ 'qp-orgViewIds-like': 'administrative-organization-view'
8433
+ }, (modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needTypeSearch) ? {} : {
8434
+ 'qp-employmentType-eq': 20
8435
+ }), {}, {
8342
8436
  sorter: 'desc-id'
8343
- },
8437
+ }),
8344
8438
  sourceName: 'employeeNumber'
8345
8439
  }, requestConfigProp);
8346
8440
  tableSearchForm = [{
@@ -8379,13 +8473,18 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8379
8473
  }
8380
8474
  }
8381
8475
  }
8382
- }, {
8476
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needTypeSearch) ? [{
8477
+ name: 'qp-employmentType-eq',
8478
+ type: 'select',
8479
+ label: '员工类型',
8480
+ initialSource: employeeType
8481
+ }] : []), [{
8383
8482
  name: 'qp-email-like',
8384
8483
  label: '邮箱'
8385
8484
  }, {
8386
8485
  name: 'qp-officeTelephone-like',
8387
8486
  label: '手机号'
8388
- }];
8487
+ }]);
8389
8488
  Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/orgViewNode/common/getTreeForOrgViewAndTenant"), {
8390
8489
  'orgViewCode': 'administrative-organization-view'
8391
8490
  })]).then(function (x) {
@@ -8415,13 +8514,22 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
8415
8514
  render: function render(text) {
8416
8515
  return handleTextOverflow(text);
8417
8516
  }
8418
- }, {
8517
+ }].concat(_toConsumableArray((modalTableBusProps === null || modalTableBusProps === void 0 ? void 0 : modalTableBusProps.needTypeSearch) ? [{
8518
+ title: '员工类型',
8519
+ dataIndex: 'employmentType',
8520
+ render: function render(text) {
8521
+ var _employeeType$find;
8522
+ return (_employeeType$find = employeeType.find(function (i) {
8523
+ return i.value === text;
8524
+ })) === null || _employeeType$find === void 0 ? void 0 : _employeeType$find.text;
8525
+ }
8526
+ }] : []), [{
8419
8527
  title: '邮箱',
8420
8528
  dataIndex: 'email'
8421
8529
  }, {
8422
8530
  title: '手机号',
8423
8531
  dataIndex: 'officeTelephone'
8424
- }]
8532
+ }])
8425
8533
  }, modalTableBusProps);
8426
8534
  }
8427
8535
  // 配送方式选择器
@@ -8625,7 +8733,7 @@ var BusinessSearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
8625
8733
  needModalTable: needModalTable,
8626
8734
  modalTableProps: modalTableProps
8627
8735
  });
8628
- }, [props === null || props === void 0 ? void 0 : props.value, props.disabled]);
8736
+ }, [props === null || props === void 0 ? void 0 : props.value, props.disabled, props.selectBusinessType]);
8629
8737
  React.useImperativeHandle(ref, function () {
8630
8738
  return {
8631
8739
  getRef: function getRef() {
@@ -8647,9 +8755,13 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Busines
8647
8755
  if (props && props.disabled !== nextProps.disabled) {
8648
8756
  return false;
8649
8757
  }
8758
+ if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
8759
+ return false;
8760
+ }
8650
8761
  return true;
8651
8762
  });
8652
8763
 
8764
+ // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
8653
8765
  function handleSelectColumn(c, parentProps) {
8654
8766
  var result = c;
8655
8767
  var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
@@ -8661,7 +8773,7 @@ function handleSelectColumn(c, parentProps) {
8661
8773
  return !exceptColumns.includes(i.dataIndex);
8662
8774
  });
8663
8775
  }
8664
- // 追加
8776
+ // 追加(最好不用这个,当组件不固定时候会有影响)
8665
8777
  if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
8666
8778
  additionColumns.forEach(function (i) {
8667
8779
  result.splice(i.position, 0, i.column);
@@ -8674,6 +8786,7 @@ function handleSelectColumn(c, parentProps) {
8674
8786
  return result;
8675
8787
  }
8676
8788
  var AddSkuSelect = function AddSkuSelect(parProps) {
8789
+ var _parProps$requestConf, _parProps$requestConf2;
8677
8790
  var selectProps = {
8678
8791
  mode: 'multiple'
8679
8792
  };
@@ -8681,12 +8794,26 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8681
8794
  _useState2 = _slicedToArray(_useState, 2),
8682
8795
  value = _useState2[0],
8683
8796
  setValue = _useState2[1];
8797
+ var isNoUseItemBarcode = (parProps === null || parProps === void 0 ? void 0 : parProps.noUseItemEancode) !== undefined ? parProps === null || parProps === void 0 ? void 0 : parProps.noUseItemEancode : true; // 默认不加商品条码,兼容老项目
8684
8798
  //注⚠️:自定义过表头的请记得传tableCodeList参数
8685
8799
  var initialSelectColumn = [{
8686
8800
  title: 'SKU编码',
8687
8801
  width: 150,
8688
8802
  dataIndex: 'skuCode'
8689
- }, {
8803
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8804
+ title: '商品条码',
8805
+ width: 100,
8806
+ ellipsis: {
8807
+ showTitle: false
8808
+ },
8809
+ dataIndex: 'itemEancode',
8810
+ render: function render(text) {
8811
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8812
+ placement: "topLeft",
8813
+ title: text
8814
+ }, text);
8815
+ }
8816
+ }]), [{
8690
8817
  title: 'SKU名称',
8691
8818
  width: 200,
8692
8819
  ellipsis: {
@@ -8762,7 +8889,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8762
8889
  }, text);
8763
8890
  },
8764
8891
  dataIndex: 'propertyNameAndValue'
8765
- }];
8892
+ }]);
8766
8893
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
8767
8894
  var props = {
8768
8895
  buttonText: parProps.buttonText || '新增',
@@ -8773,11 +8900,11 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8773
8900
  requestConfig: _objectSpread2({
8774
8901
  url: "/items/sku/pager/v2",
8775
8902
  filter: 'qp-name-like',
8776
- otherParams: {
8903
+ otherParams: _objectSpread2({
8777
8904
  'qp-combination-eq': false,
8778
8905
  'qp-approveStatus-eq': 1,
8779
8906
  'qp-status-eq': 1
8780
- },
8907
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
8781
8908
  mappingTextField: 'name',
8782
8909
  mappingValueField: 'skuCode'
8783
8910
  }, parProps.requestConfig),
@@ -8789,7 +8916,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8789
8916
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
8790
8917
  onSaveCallback: parProps.onSaveCallback,
8791
8918
  businessType: 'sku',
8792
- isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
8919
+ isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect),
8920
+ noUseItemEancode: isNoUseItemBarcode
8793
8921
  };
8794
8922
  var modalTableProps = {
8795
8923
  modalTableTitle: '选择商品',
@@ -8799,7 +8927,14 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8799
8927
  }, {
8800
8928
  name: 'qp-skuName-like',
8801
8929
  label: 'SKU名称'
8802
- }, {
8930
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8931
+ name: 'qp-code-in',
8932
+ label: '商品条码',
8933
+ field: {
8934
+ type: 'multipleQueryInput',
8935
+ props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
8936
+ }
8937
+ }]), [{
8803
8938
  name: 'qp-brandId-in',
8804
8939
  type: 'select',
8805
8940
  label: '品牌',
@@ -8844,7 +8979,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8844
8979
  }
8845
8980
  }
8846
8981
  }
8847
- }],
8982
+ }]),
8848
8983
  tableColumns: [{
8849
8984
  title: 'SKU编码',
8850
8985
  width: 150,
@@ -8878,20 +9013,20 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8878
9013
  height: 20
8879
9014
  }));
8880
9015
  }
8881
- }, {
8882
- title: '国际条码',
9016
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
9017
+ title: '商品条码',
8883
9018
  width: 100,
8884
9019
  ellipsis: {
8885
9020
  showTitle: false
8886
9021
  },
8887
- dataIndex: 'barCode',
9022
+ dataIndex: 'itemEancode',
8888
9023
  render: function render(text) {
8889
9024
  return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8890
9025
  placement: "topLeft",
8891
9026
  title: text
8892
9027
  }, text);
8893
9028
  }
8894
- }, {
9029
+ }]), [{
8895
9030
  title: '所属SPU名称',
8896
9031
  width: 100,
8897
9032
  ellipsis: {
@@ -8982,7 +9117,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8982
9117
  }, text);
8983
9118
  },
8984
9119
  dataIndex: 'brandName'
8985
- }],
9120
+ }]),
8986
9121
  selectColumn: mTpSelectColumn
8987
9122
  };
8988
9123
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -8990,6 +9125,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8990
9125
  })));
8991
9126
  };
8992
9127
  var AddSkcSelect = function AddSkcSelect(parProps) {
9128
+ var _parProps$requestConf3;
8993
9129
  var selectProps = {
8994
9130
  mode: 'multiple'
8995
9131
  };
@@ -9067,9 +9203,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9067
9203
  requestConfig: _objectSpread2({
9068
9204
  url: "/items/skc/skcSelect",
9069
9205
  filter: 'qp-name-like',
9070
- otherParams: {
9206
+ otherParams: _objectSpread2({
9071
9207
  'qp-skcStatus-eq': 1
9072
- },
9208
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf3 = parProps.requestConfig) === null || _parProps$requestConf3 === void 0 ? void 0 : _parProps$requestConf3.addOtherParams) || {}),
9073
9209
  mappingTextField: 'name',
9074
9210
  mappingValueField: 'code'
9075
9211
  }, parProps.requestConfig),
@@ -9269,6 +9405,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9269
9405
  })));
9270
9406
  };
9271
9407
  var AddSpuSelect = function AddSpuSelect(parProps) {
9408
+ var _parProps$requestConf4;
9272
9409
  var selectProps = {
9273
9410
  mode: 'multiple'
9274
9411
  };
@@ -9355,11 +9492,11 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
9355
9492
  requestConfig: _objectSpread2({
9356
9493
  url: "/items/item",
9357
9494
  filter: 'qp-itemCode,name-orGroup,like',
9358
- otherParams: {
9495
+ otherParams: _objectSpread2({
9359
9496
  'qp-approveStatus-eq': 1,
9360
9497
  'qp-status-eq': 1,
9361
9498
  sorter: 'desc-id'
9362
- },
9499
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf4 = parProps.requestConfig) === null || _parProps$requestConf4 === void 0 ? void 0 : _parProps$requestConf4.addOtherParams) || {}),
9363
9500
  mappingTextField: 'name',
9364
9501
  mappingValueField: 'itemCode'
9365
9502
  }, parProps.requestConfig),
@@ -9668,7 +9805,7 @@ function getStorageVale(storageKeyString) {
9668
9805
  return "";
9669
9806
  }
9670
9807
 
9671
- var _excluded$5 = ["ctx", "value", "valueName", "onChange", "onChangeName", "placeholder", "remoteSource", "initialValue", "treeCheckable", "showSearch", "maxTagCount", "multiple", "isChoose", "mode", "getPopupContainer", "labelInValue", "showArrow", "allowClear", "showCheckedStrategy", "style", "getTreeData", "disabled"];
9808
+ var _excluded$5 = ["ctx", "value", "valueName", "onChange", "onChangeName", "placeholder", "remoteSource", "initialValue", "treeCheckable", "showSearch", "maxTagCount", "multiple", "isChoose", "rootDisabled", "mode", "getPopupContainer", "labelInValue", "showArrow", "allowClear", "showCheckedStrategy", "style", "getTreeData", "disabled"];
9672
9809
  var TreeSearchSelect = function TreeSearchSelect(props) {
9673
9810
  var _useState = React.useState([]),
9674
9811
  _useState2 = _slicedToArray(_useState, 2),
@@ -9692,6 +9829,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9692
9829
  multiple = _props$multiple === void 0 ? false : _props$multiple,
9693
9830
  _props$isChoose = props.isChoose,
9694
9831
  isChoose = _props$isChoose === void 0 ? false : _props$isChoose,
9832
+ _props$rootDisabled = props.rootDisabled,
9833
+ rootDisabled = _props$rootDisabled === void 0 ? false : _props$rootDisabled,
9695
9834
  mode = props.mode,
9696
9835
  _getPopupContainer = props.getPopupContainer,
9697
9836
  _props$labelInValue = props.labelInValue,
@@ -9718,7 +9857,8 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9718
9857
  _remoteSource$initial = remoteSource.initialParams,
9719
9858
  initialParams = _remoteSource$initial === void 0 ? {} : _remoteSource$initial;
9720
9859
  var mapSearchTree = function mapSearchTree(treeDataItem) {
9721
- var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
9860
+ var haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0; // 盘算是否为父节点
9861
+ var isRoot = (treeDataItem === null || treeDataItem === void 0 ? void 0 : treeDataItem.id) == '0'; // 判断是否为根节点
9722
9862
  return {
9723
9863
  title: treeDataItem[resKeyValue[1]],
9724
9864
  key: treeDataItem[resKeyValue[0]],
@@ -9726,17 +9866,20 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9726
9866
  parentId: treeDataItem.parent,
9727
9867
  data: _objectSpread2({}, treeDataItem),
9728
9868
  isLeaf: !haveChildren,
9729
- disabled: isDisabled(haveChildren),
9869
+ disabled: isDisabled(haveChildren, isRoot),
9730
9870
  children: haveChildren ? treeDataItem.children.map(function (i) {
9731
9871
  return mapSearchTree(i);
9732
9872
  }) : []
9733
9873
  };
9734
9874
  };
9735
- var isDisabled = function isDisabled(children) {
9875
+ var isDisabled = function isDisabled(isParent, isRoot) {
9736
9876
  if (isChoose) {
9877
+ if (rootDisabled && isRoot) {
9878
+ return rootDisabled;
9879
+ }
9737
9880
  return false;
9738
9881
  }
9739
- return children;
9882
+ return isParent;
9740
9883
  };
9741
9884
  /* 实时查询 但是目前用的直接是完整数据源, 所以没有使用 */
9742
9885
  var handleSearch = function handleSearch(q) {
@@ -9811,10 +9954,53 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9811
9954
  return _formatResult;
9812
9955
  }
9813
9956
  };
9957
+ var parallelData = function parallelData(data, result) {
9958
+ data.forEach(function (i) {
9959
+ result.push(i);
9960
+ if (i.children) {
9961
+ parallelData(i.children, result);
9962
+ }
9963
+ });
9964
+ return result;
9965
+ };
9966
+ var getSelectItem = function getSelectItem(tData, selectValue) {
9967
+ var handleList = tData || [];
9968
+ var result = [];
9969
+ if (labelInValue) {
9970
+ result = multiple || treeCheckable ? (selectValue === null || selectValue === void 0 ? void 0 : selectValue.map(function (i) {
9971
+ if (handleList.some(function (s) {
9972
+ return s.key == i.value;
9973
+ })) {
9974
+ return handleList.find(function (s) {
9975
+ return s.key == i.value;
9976
+ });
9977
+ }
9978
+ })) || [] : (handleList === null || handleList === void 0 ? void 0 : handleList.find(function (s) {
9979
+ return s.key == (selectValue === null || selectValue === void 0 ? void 0 : selectValue.value);
9980
+ })) || {};
9981
+ } else {
9982
+ var cValue = ___default['default'].get(selectValue === null || selectValue === void 0 ? void 0 : selectValue[0], 'value', selectValue);
9983
+ result = multiple || treeCheckable ? (selectValue === null || selectValue === void 0 ? void 0 : selectValue.map(function (i) {
9984
+ if (handleList.some(function (s) {
9985
+ return s.key == i;
9986
+ })) {
9987
+ return handleList.find(function (s) {
9988
+ return s.key == i;
9989
+ });
9990
+ }
9991
+ })) || [] : (handleList === null || handleList === void 0 ? void 0 : handleList.find(function (s) {
9992
+ return s.key == cValue;
9993
+ })) || {};
9994
+ }
9995
+ return result;
9996
+ };
9814
9997
  var handleChange = function handleChange(data, dataName) {
9815
9998
  var _ctx$form2;
9816
9999
  var handleData = formatData(data);
9817
- onChange(handleData, data);
10000
+ // 获取选中树节点当条数据,并返回给调用业务
10001
+ var parallelTreeData = parallelData(treeData, []);
10002
+ var currentItem = getSelectItem(parallelTreeData, data);
10003
+ onChange(handleData, data, currentItem, parallelTreeData);
9818
10004
  onChangeName && onChangeName(dataName);
9819
10005
  getTreeData && getTreeData(treeData); // 把树节点暴露出去
9820
10006
  ctx === null || ctx === void 0 ? void 0 : (_ctx$form2 = ctx.form) === null || _ctx$form2 === void 0 ? void 0 : _ctx$form2.setFieldValue(ctx.name, handleData);
@@ -12994,7 +13180,8 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
12994
13180
  }))))), /*#__PURE__*/React__default['default'].createElement("div", {
12995
13181
  onClick: this.showModal,
12996
13182
  style: {
12997
- fontSize: 14
13183
+ fontSize: 14,
13184
+ textAlign: 'center'
12998
13185
  }
12999
13186
  }, "\u641C\u7D22\u9879\u8BBE\u7F6E"));
13000
13187
  }
@@ -13326,7 +13513,8 @@ var BsSulaQueryTable = (function (props) {
13326
13513
  overlay: /*#__PURE__*/React__default['default'].createElement(antd.Menu, null, /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
13327
13514
  onClick: sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current = sortTableRef.current) === null || _sortTableRef$current === void 0 ? void 0 : _sortTableRef$current.showModal,
13328
13515
  style: {
13329
- fontSize: 14
13516
+ fontSize: 14,
13517
+ textAlign: 'center'
13330
13518
  }
13331
13519
  }, "\u5217\u8BBE\u7F6E")), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement(SearchItemTable, {
13332
13520
  ref: searchTableRef,
@@ -15711,10 +15899,6 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
15711
15899
  _this.allFunc = /*#__PURE__*/React.createRef('');
15712
15900
  _this.customerMenuRef = /*#__PURE__*/React.createRef('');
15713
15901
  _this.actionRef = /*#__PURE__*/React.createRef();
15714
- _this.handleBeforeUnload = function () {
15715
- // 储存当前router信息
15716
- sessionStorage.setItem('@listenRouterState', JSON.stringify(_this.state.listenRouterState));
15717
- };
15718
15902
  _this.parseQueryString = function (queryString) {
15719
15903
  if (!queryString) {
15720
15904
  return '';
@@ -16118,49 +16302,15 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16118
16302
  },
16119
16303
  currentSubMenuData: [],
16120
16304
  showSubMenu: false,
16121
- isSlider: false,
16122
- _routerArray: routerArray
16305
+ isSlider: false
16123
16306
  };
16124
16307
  return _this;
16125
16308
  }
16126
16309
  _createClass(BasicLayout, [{
16127
- key: "componentWillMount",
16128
- value: function componentWillMount() {
16129
- var _this2 = this;
16130
- // 检查页面是否为刷新之后的
16131
- if (sessionStorage.getItem('@listenRouterState')) {
16132
- var lastListenRouterState = JSON.parse(sessionStorage.getItem('@listenRouterState')),
16133
- showListenRouterState = [],
16134
- nowItem = {};
16135
- if (lastListenRouterState.length === 1) {
16136
- sessionStorage.removeItem('@listenRouterState');
16137
- return;
16138
- }
16139
- lastListenRouterState.forEach(function (item) {
16140
- var _this2$state;
16141
- nowItem = _this2 === null || _this2 === void 0 ? void 0 : (_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state._routerArray.find(function (i) {
16142
- var _item$match;
16143
- return item.key === i.key || (item === null || item === void 0 ? void 0 : item.match) && (item === null || item === void 0 ? void 0 : (_item$match = item.match) === null || _item$match === void 0 ? void 0 : _item$match.path) === i.key;
16144
- });
16145
- // 详情页保留问题尚未解决
16146
- if (nowItem) {
16147
- showListenRouterState.push(_objectSpread2(_objectSpread2({}, item), {}, {
16148
- content: nowItem.content,
16149
- tab: item.tab || _this2.getPageTitle(nowItem.key)
16150
- }));
16151
- }
16152
- });
16153
- this.setState({
16154
- listenRouterState: [].concat(showListenRouterState)
16155
- });
16156
- sessionStorage.removeItem('@listenRouterState');
16157
- }
16158
- }
16159
- }, {
16160
16310
  key: "componentDidMount",
16161
16311
  value: function componentDidMount() {
16162
16312
  var _window$$wujie,
16163
- _this3 = this,
16313
+ _this2 = this,
16164
16314
  _localStorage$getItem,
16165
16315
  _localStorage$getItem2;
16166
16316
  var _this$props = this.props,
@@ -16210,11 +16360,11 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16210
16360
  // if (window.location.href.indexOf(`/${itemPath}`) === -1) return;
16211
16361
  // }
16212
16362
  if (route.pathname.startsWith("/".concat(itemPath, "/"))) return;
16213
- var _this3$state = _this3.state,
16214
- listenRouterState = _this3$state.listenRouterState,
16215
- listenRouterKey = _this3$state.listenRouterKey,
16216
- customerMatchs = _this3$state.customerMatchs,
16217
- hideMenuArray = _this3$state.hideMenuArray;
16363
+ var _this2$state = _this2.state,
16364
+ listenRouterState = _this2$state.listenRouterState,
16365
+ listenRouterKey = _this2$state.listenRouterKey,
16366
+ customerMatchs = _this2$state.customerMatchs,
16367
+ hideMenuArray = _this2$state.hideMenuArray;
16218
16368
  var newListenRouterState = _toConsumableArray(listenRouterState);
16219
16369
  var newListenRouterKey = _toConsumableArray(listenRouterKey);
16220
16370
  var replaceRouter = routerArray.filter(function (itemRoute) {
@@ -16225,7 +16375,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16225
16375
  // 处理中英文和特殊字符
16226
16376
  currentKey = decodeURIComponent(route.pathname);
16227
16377
  } else {
16228
- currentKey = decodeURIComponent(route.pathname + _this3.parseQueryString(route.search));
16378
+ currentKey = decodeURIComponent(route.pathname + _this2.parseQueryString(route.search));
16229
16379
  }
16230
16380
  if (!istParent) {
16231
16381
  var _window$$wujie2;
@@ -16245,7 +16395,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16245
16395
  replaceRouter = (_routerArray$filter = routerArray.filter(function (itemroute) {
16246
16396
  return itemroute.key === '/404';
16247
16397
  })) === null || _routerArray$filter === void 0 ? void 0 : _routerArray$filter[0];
16248
- _this3.setState({
16398
+ _this2.setState({
16249
16399
  listenRouterState: [].concat(_toConsumableArray(listenRouterState), [_objectSpread2(_objectSpread2({}, replaceRouter), {}, {
16250
16400
  key: currentKey,
16251
16401
  tab: '404'
@@ -16253,7 +16403,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16253
16403
  activeKey: currentKey,
16254
16404
  listenRouterKey: [].concat(_toConsumableArray(listenRouterKey), [currentKey])
16255
16405
  }, function () {
16256
- _this3.checkisNavSlide();
16406
+ _this2.checkisNavSlide();
16257
16407
  });
16258
16408
  } else {
16259
16409
  var match = matchPath(route.pathname, {
@@ -16263,7 +16413,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16263
16413
  query: route.query,
16264
16414
  match: match,
16265
16415
  key: currentKey,
16266
- tab: _this3.getPageTitle(route.pathname) + ''
16416
+ tab: _this2.getPageTitle(route.pathname) + ''
16267
16417
  })]);
16268
16418
  newListenRouterKey = [].concat(_toConsumableArray(listenRouterKey), [currentKey]);
16269
16419
  }
@@ -16301,13 +16451,13 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16301
16451
  localStorage.removeItem('isMenuClick');
16302
16452
  }, 0);
16303
16453
  }
16304
- _this3.setState({
16454
+ _this2.setState({
16305
16455
  //路由监听函数最后执行setState,避免处理hideMenu类型页面自动关闭的逻辑块内获取不到最新state的listenRouterState和listenRouterKey
16306
16456
  activeKey: currentKey,
16307
16457
  listenRouterState: newListenRouterState,
16308
16458
  listenRouterKey: newListenRouterKey
16309
16459
  }, function () {
16310
- _this3.checkisNavSlide();
16460
+ _this2.checkisNavSlide();
16311
16461
  });
16312
16462
  istParent = 0;
16313
16463
  });
@@ -16322,35 +16472,17 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16322
16472
  } else {
16323
16473
  history.push(location);
16324
16474
  }
16325
- try {
16326
- window.addEventListener('beforeunload', this.handleBeforeUnload);
16327
- } catch (error) {
16328
- console.log("\uD83D\uDE80 => componentDidMount => error:", error);
16329
- }
16330
16475
  }
16331
16476
  }, {
16332
16477
  key: "componentWillUnmount",
16333
16478
  value: function componentWillUnmount() {
16334
- window.removeEventListener('beforeunload', this.handleBeforeUnload);
16335
16479
  // eslint-disable-next-line no-unused-expressions
16336
16480
  UN_LISTTEN_DRP && UN_LISTTEN_DRP();
16337
16481
  }
16338
- }, {
16339
- key: "getWelcomePage",
16340
- value: function getWelcomePage() {
16341
- var homeRouter = routerArray.filter(function (itemroute) {
16342
- return itemroute.key === '/';
16343
- })[0];
16344
- return _objectSpread2(_objectSpread2({}, homeRouter), {}, {
16345
- key: '/',
16346
- tab: '欢迎',
16347
- closable: false
16348
- });
16349
- }
16350
16482
  }, {
16351
16483
  key: "render",
16352
16484
  value: function render() {
16353
- var _this4 = this;
16485
+ var _this3 = this;
16354
16486
  var _this$state4 = this.state,
16355
16487
  listenRouterState = _this$state4.listenRouterState,
16356
16488
  activeKey = _this$state4.activeKey,
@@ -16374,7 +16506,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16374
16506
  className: "tab_title_content"
16375
16507
  }, item.tab, item.key !== '/' && /*#__PURE__*/React__default['default'].createElement(ItemMenu, {
16376
16508
  info: item,
16377
- operateFun: _this4.operateFun,
16509
+ operateFun: _this3.operateFun,
16378
16510
  listenRouterState: listenRouterState
16379
16511
  }));
16380
16512
  };
@@ -16408,7 +16540,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16408
16540
  }, /*#__PURE__*/React__default['default'].createElement("a", {
16409
16541
  onClick: function onClick() {
16410
16542
  // 关闭全部
16411
- _this4.updateState([_objectSpread2(_objectSpread2({}, _this4.state.homeRouter), {}, {
16543
+ _this3.updateState([_objectSpread2(_objectSpread2({}, _this3.state.homeRouter), {}, {
16412
16544
  key: '/',
16413
16545
  tab: '欢迎',
16414
16546
  closable: false
@@ -16434,7 +16566,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16434
16566
  } else {
16435
16567
  newActiveKey = listenRouterState[1].key;
16436
16568
  }
16437
- _this4.updateState(listenRouterState.filter(function (d) {
16569
+ _this3.updateState(listenRouterState.filter(function (d) {
16438
16570
  return d.key !== activeKey;
16439
16571
  }), listenRouterKey.filter(function (d) {
16440
16572
  return d !== activeKey;
@@ -16461,7 +16593,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16461
16593
  // message.warning('首页不可关闭。');
16462
16594
  // return;
16463
16595
  // }
16464
- _this4.updateState(listenRouterState.filter(function (d, i) {
16596
+ _this3.updateState(listenRouterState.filter(function (d, i) {
16465
16597
  return i >= index || d.key === '/';
16466
16598
  }), listenRouterKey.filter(function (d, i) {
16467
16599
  return i >= index || d === '/';
@@ -16478,7 +16610,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16478
16610
  var index = listenRouterState.findIndex(function (item) {
16479
16611
  return item.key === activeKey;
16480
16612
  });
16481
- _this4.updateState(listenRouterState.filter(function (d, i) {
16613
+ _this3.updateState(listenRouterState.filter(function (d, i) {
16482
16614
  return i <= index || d.key === '/';
16483
16615
  }), listenRouterKey.filter(function (d, i) {
16484
16616
  return i <= index || d === '/';
@@ -16521,7 +16653,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16521
16653
  opacity: this.state.isSlider ? 1 : 0.5
16522
16654
  },
16523
16655
  onClick: function onClick() {
16524
- _this4.setTabNavTransLate(-100);
16656
+ _this3.setTabNavTransLate(-100);
16525
16657
  }
16526
16658
  }, /*#__PURE__*/React__default['default'].createElement(icons.DoubleLeftOutlined, null))),
16527
16659
  right: /*#__PURE__*/React__default['default'].createElement("div", {
@@ -16530,7 +16662,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16530
16662
  },
16531
16663
  className: 'tab_right_operate',
16532
16664
  onClick: function onClick() {
16533
- _this4.setTabNavTransLate(100);
16665
+ _this3.setTabNavTransLate(100);
16534
16666
  }
16535
16667
  }, /*#__PURE__*/React__default['default'].createElement(icons.DoubleRightOutlined, null))
16536
16668
  };
@@ -16544,7 +16676,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16544
16676
  return /*#__PURE__*/React__default['default'].createElement(CustomerMenuHeader, {
16545
16677
  originRoutes: originRoutes,
16546
16678
  itemPath: itemPath,
16547
- handleClose: _this4.handleClose,
16679
+ handleClose: _this3.handleClose,
16548
16680
  collapsed: collapse
16549
16681
  });
16550
16682
  },
@@ -16553,10 +16685,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16553
16685
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(CustomerMenu, {
16554
16686
  originRoutes: originRoutes,
16555
16687
  itemPath: itemPath,
16556
- ref: _this4.customerMenuRef,
16557
- actionRef: _this4.actionRef,
16558
- handleClose: _this4.handleClose,
16559
- isCollapse: _this4.state.collapse
16688
+ ref: _this3.customerMenuRef,
16689
+ actionRef: _this3.actionRef,
16690
+ handleClose: _this3.handleClose,
16691
+ isCollapse: _this3.state.collapse
16560
16692
  }));
16561
16693
  }
16562
16694
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -16564,7 +16696,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16564
16696
  }, /*#__PURE__*/React__default['default'].createElement("span", {
16565
16697
  className: "collapse_icon",
16566
16698
  onClick: function onClick() {
16567
- _this4.setState({
16699
+ _this3.setState({
16568
16700
  collapse: !collapse
16569
16701
  });
16570
16702
  }
@@ -16577,7 +16709,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16577
16709
  },
16578
16710
  collapsed: collapse,
16579
16711
  onCollapse: function onCollapse(boo) {
16580
- _this4.setState({
16712
+ _this3.setState({
16581
16713
  collapse: boo
16582
16714
  });
16583
16715
  },
@@ -16613,14 +16745,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16613
16745
  },
16614
16746
  onMouseEnter: function onMouseEnter() {
16615
16747
  if (menuItemProps.pro_layout_parentKeys && menuItemProps.pro_layout_parentKeys.length) return;
16616
- _this4.setState({
16748
+ _this3.setState({
16617
16749
  currentSubMenuData: menuItemProps.children,
16618
16750
  currentSubPath: menuItemProps.path
16619
16751
  });
16620
- _this4.setShowMenu(true);
16752
+ _this3.setShowMenu(true);
16621
16753
  },
16622
16754
  onMouseLeave: function onMouseLeave() {
16623
- _this4.setShowMenu(false);
16755
+ _this3.setShowMenu(false);
16624
16756
  }
16625
16757
  }, defaultDom, showSubMenu && currentSubPath === menuItemProps.path && !collapse && /*#__PURE__*/React__default['default'].createElement(icons.CaretLeftOutlined, {
16626
16758
  style: {
@@ -16639,7 +16771,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16639
16771
  }, '');
16640
16772
  },
16641
16773
  postMenuData: function postMenuData(menus) {
16642
- return _toConsumableArray(filterByMenuDate(menus || [], _this4.state.keyWord));
16774
+ return _toConsumableArray(filterByMenuDate(menus || [], _this3.state.keyWord));
16643
16775
  },
16644
16776
  links: [!this.state.collapse ? /*#__PURE__*/React__default['default'].createElement(AllFunc$1, {
16645
16777
  ref: this.allFunc,
@@ -16713,7 +16845,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16713
16845
  tab: /*#__PURE__*/React__default['default'].createElement(TabTitle, {
16714
16846
  item: item,
16715
16847
  index: index,
16716
- updateState: _this4.updateState
16848
+ updateState: _this3.updateState
16717
16849
  }),
16718
16850
  style: {
16719
16851
  marginTop: isWeiqianduan ? 0 : 30
@@ -16725,10 +16857,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16725
16857
  })
16726
16858
  }, /*#__PURE__*/React__default['default'].createElement(WrapperComponent, {
16727
16859
  item: item,
16728
- routerProps: _this4.props,
16729
- getDictionarySource: _this4.getDictionarySource,
16730
- getDictionaryTextByValue: _this4.getDictionaryTextByValue,
16731
- timeFormat: _this4.timeFormat,
16860
+ routerProps: _this3.props,
16861
+ getDictionarySource: _this3.getDictionarySource,
16862
+ getDictionaryTextByValue: _this3.getDictionaryTextByValue,
16863
+ timeFormat: _this3.timeFormat,
16732
16864
  transparentProps: transparentProps
16733
16865
  }));
16734
16866
  })), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -16753,10 +16885,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16753
16885
  itemPath: itemPath
16754
16886
  }, drawerLeftParams)), /*#__PURE__*/React__default['default'].createElement("div", {
16755
16887
  onMouseEnter: function onMouseEnter() {
16756
- _this4.setShowMenu(true);
16888
+ _this3.setShowMenu(true);
16757
16889
  },
16758
16890
  onMouseLeave: function onMouseLeave() {
16759
- _this4.setShowMenu(false);
16891
+ _this3.setShowMenu(false);
16760
16892
  },
16761
16893
  className: 'sub_menu_content',
16762
16894
  style: {
@@ -17011,6 +17143,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
17011
17143
  }
17012
17144
  };
17013
17145
  React.useEffect(function () {
17146
+ onContainerScroll();
17014
17147
  var onscroll = _.throttle(onContainerScroll, 50);
17015
17148
  container.addEventListener('scroll', onscroll);
17016
17149
  return function () {
@@ -29457,7 +29590,8 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29457
29590
  }
29458
29591
  var parallelTreeData = _this.coverToParallel(ruleTreeData, []) || [];
29459
29592
  var currentTreeItem = (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId) && parallelTreeData.find(function (i) {
29460
- return i.key === (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId);
29593
+ var _i$key;
29594
+ return ((i === null || i === void 0 ? void 0 : (_i$key = i.key) === null || _i$key === void 0 ? void 0 : _i$key.indexOf('.')) > -1 ? i.id : i.key) === (itemDetail === null || itemDetail === void 0 ? void 0 : itemDetail.elementId);
29461
29595
  });
29462
29596
  var dataChoiceBusinessType = currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.dataChoiceBusinessType;
29463
29597
  var dataInputBusinessType = currentTreeItem === null || currentTreeItem === void 0 ? void 0 : currentTreeItem.dataInputBusinessType;
@@ -29662,17 +29796,18 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29662
29796
  }
29663
29797
  }), "\u6DFB\u52A0\u6761\u4EF6"))));
29664
29798
  };
29665
- _this.handleEditExtraInfoResponse = function (code, val, parentDetail) {
29799
+ _this.handleEditExtraInfoResponse = function (code, val, parentDetail, classDataIndex) {
29666
29800
  var ruleClassData = _this.state.ruleClassData;
29667
29801
  var callBack = _this.props.callBack;
29668
29802
  parentDetail.extraInfo.response[code] = val;
29803
+ ruleClassData[classDataIndex].extraInfo.response[code] = val;
29669
29804
  _this.setState({
29670
29805
  ruleClassData: ruleClassData
29671
29806
  }, function () {
29672
29807
  callBack(ruleClassData);
29673
29808
  });
29674
29809
  };
29675
- _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, disabled, boxStyle) {
29810
+ _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, classDataIndex, disabled, boxStyle) {
29676
29811
  var _ruleReturnConfig$rig;
29677
29812
  var isShowResponse = itemDetail.response['enable'];
29678
29813
  var isRightText = ruleReturnConfig === null || ruleReturnConfig === void 0 ? void 0 : (_ruleReturnConfig$rig = ruleReturnConfig.rightText) === null || _ruleReturnConfig$rig === void 0 ? void 0 : _ruleReturnConfig$rig.length;
@@ -29688,7 +29823,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29688
29823
  var value = val;
29689
29824
  if (isObj(code)) {
29690
29825
  Object.keys(code).forEach(function (ite) {
29691
- _this.handleEditExtraInfoResponse(ite, code[ite], parentDetail);
29826
+ _this.handleEditExtraInfoResponse(ite, code[ite], parentDetail, classDataIndex);
29692
29827
  });
29693
29828
  return;
29694
29829
  }
@@ -29701,7 +29836,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29701
29836
  var _val$PCDCode;
29702
29837
  value = val.value || ((_val$PCDCode = val.PCDCode) === null || _val$PCDCode === void 0 ? void 0 : _val$PCDCode.join('/'));
29703
29838
  }
29704
- _this.handleEditExtraInfoResponse('value', value, parentDetail);
29839
+ _this.handleEditExtraInfoResponse('value', value, parentDetail, classDataIndex);
29705
29840
  };
29706
29841
  return isShowResponse && /*#__PURE__*/React__default['default'].createElement("div", {
29707
29842
  style: {
@@ -29710,7 +29845,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29710
29845
  }, _this.renderFormCompItem(ruleReturnConfig, showValue, handleEdit, {}, boxStyle, disabled), /*#__PURE__*/React__default['default'].createElement(icons.MinusCircleOutlined, {
29711
29846
  className: 'icon_btn_style',
29712
29847
  onClick: function onClick() {
29713
- _this.handleEditExtraInfoResponse('enable', false, parentDetail);
29848
+ _this.handleEditExtraInfoResponse('enable', false, parentDetail, classDataIndex);
29714
29849
  },
29715
29850
  style: {
29716
29851
  color: 'gray',
@@ -30321,12 +30456,12 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30321
30456
  type: "link",
30322
30457
  onClick: function onClick() {
30323
30458
  if (isHaveRuleReturnConfig) {
30324
- _this.handleEditExtraInfoResponse('enable', true, parentDetail);
30459
+ _this.handleEditExtraInfoResponse('enable', true, parentDetail, classDataIndex);
30325
30460
  } else {
30326
30461
  antd.message.warn('未配置返回');
30327
30462
  }
30328
30463
  }
30329
- }, "\u65B0\u589E\u8FD4\u56DE\u503C")), isHaveRuleReturnConfig && _this.renderResItem(itemDetail, parentDetail, ruleReturnConfig, disabled, RuleActionItemStyle) || null, isHaveRuleTypeData && _this.renderActionList(itemDetail, parentDetail, handleRuleTypeData, selectRuleActionData, classDataIndex, disabled, RuleActionItemStyle) || null);
30464
+ }, "\u65B0\u589E\u8FD4\u56DE\u503C")), isHaveRuleReturnConfig && _this.renderResItem(itemDetail, parentDetail, ruleReturnConfig, classDataIndex, disabled, RuleActionItemStyle) || null, isHaveRuleTypeData && _this.renderActionList(itemDetail, parentDetail, handleRuleTypeData, selectRuleActionData, classDataIndex, disabled, RuleActionItemStyle) || null);
30330
30465
  };
30331
30466
  _this.addPeerRule = function (itemDetail) {
30332
30467
  var ruleClassData = _this.state.ruleClassData;