@bit-sun/business-component 4.2.1-alpha.23-aiwei → 4.2.1-alpha.24-aiwei

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -2561,11 +2561,9 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2561
2561
  cell.v = cell.m;
2562
2562
  }
2563
2563
  }
2564
- // console.log(postion);
2565
2564
  },
2566
2565
  cellAllRenderBefore: function cellAllRenderBefore(data, sheetFile, ctx) {
2567
2566
  sheetFile.config.borderInfo = [];
2568
- // console.info(data,sheetFile,ctx)
2569
2567
  }
2570
2568
  },
2571
2569
  showtoolbarConfig: {
@@ -2733,14 +2731,21 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2733
2731
  };
2734
2732
  };
2735
2733
  _this.getData = function () {
2736
- console.time();
2734
+ // 是否使用字符串值 默认为false
2735
+ var useStringValue = _this.props.useStringValue || false;
2737
2736
  var sheetData = luckysheet.getSheetData();
2738
2737
  var data = JSON.parse(JSON.stringify(sheetData)).filter(function (item) {
2739
2738
  return item[0];
2740
2739
  }).map(function (item) {
2741
2740
  var obj = {};
2742
2741
  item.slice(0, itemsTemp.length).map(function (innerItem, index) {
2743
- obj[_this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
2742
+ // 如果使用字符串值,直接赋值字符串
2743
+ if (useStringValue) {
2744
+ obj[_this.state.items[index].code] = innerItem && innerItem.m;
2745
+ } else {
2746
+ // 否则根据值是否相等来判断是否使用字符串值
2747
+ obj[_this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
2748
+ }
2744
2749
  });
2745
2750
  return obj;
2746
2751
  });
@@ -2881,7 +2886,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2881
2886
  errorListCheck: false,
2882
2887
  resultData: res
2883
2888
  });
2884
- console.log(setExportData);
2885
2889
  setExportData([123123]);
2886
2890
  }).catch(function (err) {});
2887
2891
  case 3:
@@ -3177,7 +3181,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
3177
3181
  left: '0px',
3178
3182
  top: '0px'
3179
3183
  };
3180
- console.log('itemsTemp', itemsTemp);
3181
3184
  return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
3182
3185
  className: "sheet_table_top"
3183
3186
  }, /*#__PURE__*/React$1.createElement(Space, null, /*#__PURE__*/React$1.createElement("span", null, "\u6392\u5E8F\u5217"), /*#__PURE__*/React$1.createElement(Dropdown, {
@@ -5994,7 +5997,6 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
5994
5997
  };
5995
5998
  var formItem = function formItem(list) {
5996
5999
  if (isModalVisible && (list === null || list === void 0 ? void 0 : list.length)) {
5997
- debugger;
5998
6000
  var setDisabled = function setDisabled(name) {
5999
6001
  if (fixedparamsDisabled && (fixedparameter === null || fixedparameter === void 0 ? void 0 : fixedparameter.length) && fixedparameter.find(function (item) {
6000
6002
  return item === name;
@@ -8428,6 +8430,8 @@ var AddSelect = function AddSelect(props) {
8428
8430
  });
8429
8431
  };
8430
8432
  var handleTableChange = function handleTableChange(pagination) {
8433
+ // 设置分页tablePagination
8434
+ setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), pagination));
8431
8435
  getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
8432
8436
  pageSize: pagination.pageSize,
8433
8437
  currentPage: pagination.current
@@ -9020,7 +9024,6 @@ var InputElement = function InputElement(_ref) {
9020
9024
  // {
9021
9025
  // body: {
9022
9026
  // cell: ({index, record, ...props}) => {
9023
- // debugger
9024
9027
  // return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
9025
9028
  // }
9026
9029
  // }
@@ -11087,8 +11090,9 @@ function commonFun(type, prefixUrl, parentProps) {
11087
11090
  }]
11088
11091
  }, selectConfigProps);
11089
11092
  var _tableSearchForm = handleHiddenFields([{
11090
- name: 'qp-code-like',
11091
- label: 'SKC编码'
11093
+ name: 'qp-code-in',
11094
+ label: 'SKC编码',
11095
+ type: 'multipleQueryInput'
11092
11096
  }, {
11093
11097
  name: 'qp-skcName-like',
11094
11098
  label: 'SKC名称'
@@ -11140,10 +11144,25 @@ function commonFun(type, prefixUrl, parentProps) {
11140
11144
  }
11141
11145
  }
11142
11146
  }
11143
- }, {
11144
- name: 'qp-classId-in',
11147
+ },
11148
+ // { name: 'qp-classId-in', type: 'select', label: '品类', field: {
11149
+ // type: 'select',
11150
+ // props: {
11151
+ // mode: 'multiple',
11152
+ // notFoundContent: '暂无数据',
11153
+ // allowClear: true,
11154
+ // showSearch: true,
11155
+ // showArrow: true,
11156
+ // maxTagCount: 1,
11157
+ // optionFilterProp: 'children',
11158
+ // filterOption: (input: string, option: { props: { children: string } }) =>
11159
+ // option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
11160
+ // },
11161
+ // } },
11162
+ {
11163
+ name: 'qp-brandId-in',
11145
11164
  type: 'select',
11146
- label: '品类',
11165
+ label: '品牌',
11147
11166
  field: {
11148
11167
  type: 'select',
11149
11168
  props: {
@@ -11159,12 +11178,53 @@ function commonFun(type, prefixUrl, parentProps) {
11159
11178
  }
11160
11179
  }
11161
11180
  }
11162
- }, {
11163
- name: 'qp-brandId-in',
11164
- type: 'select',
11165
- label: '品牌',
11181
+ },
11182
+ // 商品属性 品类 == MAT_CATA (zzdlbm)
11183
+ {
11184
+ name: "qp-zzdlbm-in",
11185
+ label: "品类",
11166
11186
  field: {
11167
- type: 'select',
11187
+ type: "select",
11188
+ props: {
11189
+ mode: 'multiple',
11190
+ notFoundContent: '暂无数据',
11191
+ allowClear: true,
11192
+ showSearch: true,
11193
+ showArrow: true,
11194
+ maxTagCount: 1,
11195
+ optionFilterProp: 'children',
11196
+ filterOption: function filterOption(input, option) {
11197
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
11198
+ }
11199
+ }
11200
+ }
11201
+ },
11202
+ // 商品属性 大类 == MID_CATA (zzzlbm)
11203
+ {
11204
+ name: "qp-zzzlbm-in",
11205
+ label: "大类",
11206
+ field: {
11207
+ type: "select",
11208
+ props: {
11209
+ mode: 'multiple',
11210
+ notFoundContent: '暂无数据',
11211
+ allowClear: true,
11212
+ showSearch: true,
11213
+ showArrow: true,
11214
+ maxTagCount: 1,
11215
+ optionFilterProp: 'children',
11216
+ filterOption: function filterOption(input, option) {
11217
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
11218
+ }
11219
+ }
11220
+ }
11221
+ },
11222
+ // 商品属性 中类 == PROP_SUBCATEORY (zzxlbm)
11223
+ {
11224
+ name: "qp-zzxlbm-in",
11225
+ label: "中类",
11226
+ field: {
11227
+ type: "select",
11168
11228
  props: {
11169
11229
  mode: 'multiple',
11170
11230
  notFoundContent: '暂无数据',
@@ -11198,22 +11258,48 @@ function commonFun(type, prefixUrl, parentProps) {
11198
11258
  currentPage: 1
11199
11259
  },
11200
11260
  options: getQueryHeadersItem(_queryHeaderParams5, 'qp-categoryId-in')
11261
+ },
11262
+ // {
11263
+ // url: `${prefixUrl.formSelectFix}/class/withProperty`,
11264
+ // params: {
11265
+ // pageSize: 5000,
11266
+ // currentPage: 1,
11267
+ // },
11268
+ // options: getQueryHeadersItem(queryHeaderParams,'qp-classId-in')
11269
+ // },
11270
+ {
11271
+ url: "".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"),
11272
+ params: {
11273
+ pageSize: 5000,
11274
+ currentPage: 1,
11275
+ 'ctl-withAuth': true
11276
+ },
11277
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
11201
11278
  }, {
11202
- url: "".concat(prefixUrl.formSelectFix, "/class/withProperty"),
11279
+ url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
11203
11280
  params: {
11204
11281
  pageSize: 5000,
11205
- currentPage: 1
11282
+ currentPage: 1,
11283
+ 'qp-propertyCode-eq': 'MAT_CATA'
11206
11284
  },
11207
- options: getQueryHeadersItem(_queryHeaderParams5, 'qp-classId-in')
11285
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzdlbm-in')
11208
11286
  }, {
11209
- url: "".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"),
11287
+ url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
11210
11288
  params: {
11211
11289
  pageSize: 5000,
11212
11290
  currentPage: 1,
11213
- 'ctl-withAuth': true
11291
+ 'qp-propertyCode-eq': 'MID_CATA'
11214
11292
  },
11215
- options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
11216
- }], ['colorName', 'categoryId', 'classId', 'brandId'], hiddenFields);
11293
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzzlbm-in')
11294
+ }, {
11295
+ url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
11296
+ params: {
11297
+ pageSize: 5000,
11298
+ currentPage: 1,
11299
+ 'qp-propertyCode-eq': 'PROP_SUBCATEORY'
11300
+ },
11301
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzxlbm-in')
11302
+ }], ['colorName', 'categoryId', 'brandId', 'zzdlbm', 'zzzlbm', 'zzxlbm'], hiddenFields);
11217
11303
  var fieldLoadSource = fieldsRequest.map(function (i) {
11218
11304
  return loadSelectSource$1(i.url, i.params, i.options);
11219
11305
  });
@@ -11230,8 +11316,11 @@ function commonFun(type, prefixUrl, parentProps) {
11230
11316
  Promise.all(fieldLoadSource).then(function (x) {
11231
11317
  formatSource(x, 0, getFieldIndex(_tableSearchForm, 'colorName'), _tableSearchForm, ['value', 'value']);
11232
11318
  formatTreeDataSource(x, 1, getFieldIndex(_tableSearchForm, 'categoryId'), _tableSearchForm);
11233
- formatSource(x, 2, getFieldIndex(_tableSearchForm, 'classId'), _tableSearchForm, ['id', 'name']);
11234
- formatSource(x, 3, getFieldIndex(_tableSearchForm, 'brandId'), _tableSearchForm, ['id', 'name']);
11319
+ // formatSource(x,2, getFieldIndex(tableSearchForm, 'classId'), tableSearchForm,['id','name']);
11320
+ formatSource(x, 2, getFieldIndex(_tableSearchForm, 'brandId'), _tableSearchForm, ['id', 'name']);
11321
+ formatSource(x, 3, getFieldIndex(_tableSearchForm, 'zzdlbm'), _tableSearchForm, ['value', 'value']);
11322
+ formatSource(x, 4, getFieldIndex(_tableSearchForm, 'zzzlbm'), _tableSearchForm, ['value', 'value']);
11323
+ formatSource(x, 5, getFieldIndex(_tableSearchForm, 'zzxlbm'), _tableSearchForm, ['value', 'value']);
11235
11324
  });
11236
11325
  modalTableProps = _objectSpread2({
11237
11326
  modalTableTitle: '选择SKC',
@@ -11250,21 +11339,37 @@ function commonFun(type, prefixUrl, parentProps) {
11250
11339
  defaultSort: 2
11251
11340
  }, {
11252
11341
  title: '商品名称',
11253
- dataIndex: 'itemName'
11342
+ dataIndex: 'itemName',
11343
+ defaultSort: 3
11254
11344
  }, {
11255
11345
  title: '颜色',
11256
11346
  dataIndex: 'colorName',
11257
- defaultSort: 3
11347
+ defaultSort: 4
11258
11348
  }, {
11259
11349
  title: '类目',
11260
- dataIndex: 'categoryText'
11350
+ dataIndex: 'categoryText',
11351
+ defaultSort: 5
11352
+ },
11353
+ // {
11354
+ // title: '品类',
11355
+ // dataIndex: 'className',
11356
+ // },
11357
+ {
11358
+ title: '品牌',
11359
+ dataIndex: 'brandName',
11360
+ defaultSort: 6
11261
11361
  }, {
11262
11362
  title: '品类',
11263
- dataIndex: 'className'
11363
+ dataIndex: 'zzdlbm',
11364
+ defaultSort: 7
11264
11365
  }, {
11265
- title: '品牌',
11266
- dataIndex: 'brandName',
11267
- defaultSort: 4
11366
+ title: '大类',
11367
+ dataIndex: 'zzzlbm',
11368
+ defaultSort: 8
11369
+ }, {
11370
+ title: '中类',
11371
+ dataIndex: 'zzxlbm',
11372
+ defaultSort: 9
11268
11373
  }], hiddenFields)
11269
11374
  }, modalTableBusProps);
11270
11375
  }
@@ -11445,7 +11550,6 @@ function commonFun(type, prefixUrl, parentProps) {
11445
11550
  headers: _objectSpread2({}, extralHeaders)
11446
11551
  })]).then(function (x) {
11447
11552
  var _x$, _x$$data$, _x$$data$$channelInfo;
11448
- debugger;
11449
11553
  // 战区限制一级数据
11450
11554
  var newData1 = [];
11451
11555
  (_x$ = x[0]) === null || _x$ === void 0 ? void 0 : (_x$$data$ = _x$.data[0]) === null || _x$$data$ === void 0 ? void 0 : (_x$$data$$channelInfo = _x$$data$.channelInfoSon) === null || _x$$data$$channelInfo === void 0 ? void 0 : _x$$data$$channelInfo.forEach(function (item) {
@@ -12484,7 +12588,6 @@ function commonFun(type, prefixUrl, parentProps) {
12484
12588
  optionFilterProp: 'children',
12485
12589
  filterOption: function filterOption(input, option) {
12486
12590
  var _option$value;
12487
- debugger;
12488
12591
  return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12489
12592
  }
12490
12593
  }
@@ -12632,7 +12735,6 @@ function commonFun(type, prefixUrl, parentProps) {
12632
12735
  var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12633
12736
  return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12634
12737
  });
12635
- debugger;
12636
12738
  var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12637
12739
  return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && trim(r === null || r === void 0 ? void 0 : r.value);
12638
12740
  });
@@ -14479,7 +14581,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14479
14581
  'ctl-withAuth': true
14480
14582
  },
14481
14583
  resType: 'list',
14482
- resPosition: isNoUseItemBarcode ? 3 : 4,
14584
+ resPosition: isNoUseItemBarcode ? 4 : 5,
14483
14585
  resKeyValue: ['id', 'name']
14484
14586
  }, {
14485
14587
  url: "/items/category/queryCategoryTree",
@@ -14488,7 +14590,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14488
14590
  currentPage: 1
14489
14591
  },
14490
14592
  resType: 'treeList',
14491
- resPosition: isNoUseItemBarcode ? 4 : 5
14593
+ resPosition: isNoUseItemBarcode ? 5 : 6
14492
14594
  }];
14493
14595
  var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
14494
14596
  var props = {
@@ -14525,7 +14627,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14525
14627
  tableSearchForm: mTpTableSearchForm,
14526
14628
  tableColumns: mTpTableColumn,
14527
14629
  selectColumn: mTpSelectColumn,
14528
- promiseLoadList: mTpPromiseLoadList
14630
+ promiseLoadList: mTpPromiseLoadList,
14631
+ topTablePagination: (parProps === null || parProps === void 0 ? void 0 : parProps.pagination) || {}
14529
14632
  };
14530
14633
  return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14531
14634
  modalTableProps: modalTableProps
@@ -20280,9 +20383,16 @@ var BsSulaQueryTable = (function (props) {
20280
20383
  }
20281
20384
  }));
20282
20385
  }));
20283
- } else {
20284
- return undefined;
20285
20386
  }
20387
+ // 判断summaryList 是否为reactNode
20388
+ if (/*#__PURE__*/React$1.isValidElement(summaryList)) {
20389
+ return summaryList;
20390
+ }
20391
+ // 判断summaryList 是否为函数
20392
+ if (Object.prototype.toString.call(summaryList) === '[object Function]') {
20393
+ return summaryList();
20394
+ }
20395
+ return undefined;
20286
20396
  };
20287
20397
  var columnsDom = /*#__PURE__*/React$1.createElement("span", {
20288
20398
  className: "ant-dropdown-link"
package/dist/index.js CHANGED
@@ -2584,11 +2584,9 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2584
2584
  cell.v = cell.m;
2585
2585
  }
2586
2586
  }
2587
- // console.log(postion);
2588
2587
  },
2589
2588
  cellAllRenderBefore: function cellAllRenderBefore(data, sheetFile, ctx) {
2590
2589
  sheetFile.config.borderInfo = [];
2591
- // console.info(data,sheetFile,ctx)
2592
2590
  }
2593
2591
  },
2594
2592
  showtoolbarConfig: {
@@ -2756,14 +2754,21 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2756
2754
  };
2757
2755
  };
2758
2756
  _this.getData = function () {
2759
- console.time();
2757
+ // 是否使用字符串值 默认为false
2758
+ var useStringValue = _this.props.useStringValue || false;
2760
2759
  var sheetData = luckysheet.getSheetData();
2761
2760
  var data = JSON.parse(JSON.stringify(sheetData)).filter(function (item) {
2762
2761
  return item[0];
2763
2762
  }).map(function (item) {
2764
2763
  var obj = {};
2765
2764
  item.slice(0, itemsTemp.length).map(function (innerItem, index) {
2766
- obj[_this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
2765
+ // 如果使用字符串值,直接赋值字符串
2766
+ if (useStringValue) {
2767
+ obj[_this.state.items[index].code] = innerItem && innerItem.m;
2768
+ } else {
2769
+ // 否则根据值是否相等来判断是否使用字符串值
2770
+ obj[_this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
2771
+ }
2767
2772
  });
2768
2773
  return obj;
2769
2774
  });
@@ -2904,7 +2909,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2904
2909
  errorListCheck: false,
2905
2910
  resultData: res
2906
2911
  });
2907
- console.log(setExportData);
2908
2912
  setExportData([123123]);
2909
2913
  }).catch(function (err) {});
2910
2914
  case 3:
@@ -3200,7 +3204,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
3200
3204
  left: '0px',
3201
3205
  top: '0px'
3202
3206
  };
3203
- console.log('itemsTemp', itemsTemp);
3204
3207
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
3205
3208
  className: "sheet_table_top"
3206
3209
  }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement("span", null, "\u6392\u5E8F\u5217"), /*#__PURE__*/React__default['default'].createElement(antd.Dropdown, {
@@ -6017,7 +6020,6 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
6017
6020
  };
6018
6021
  var formItem = function formItem(list) {
6019
6022
  if (isModalVisible && (list === null || list === void 0 ? void 0 : list.length)) {
6020
- debugger;
6021
6023
  var setDisabled = function setDisabled(name) {
6022
6024
  if (fixedparamsDisabled && (fixedparameter === null || fixedparameter === void 0 ? void 0 : fixedparameter.length) && fixedparameter.find(function (item) {
6023
6025
  return item === name;
@@ -8451,6 +8453,8 @@ var AddSelect = function AddSelect(props) {
8451
8453
  });
8452
8454
  };
8453
8455
  var handleTableChange = function handleTableChange(pagination) {
8456
+ // 设置分页tablePagination
8457
+ setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), pagination));
8454
8458
  getData(_objectSpread2(_objectSpread2({}, tableFormParams), {}, {
8455
8459
  pageSize: pagination.pageSize,
8456
8460
  currentPage: pagination.current
@@ -9043,7 +9047,6 @@ var InputElement = function InputElement(_ref) {
9043
9047
  // {
9044
9048
  // body: {
9045
9049
  // cell: ({index, record, ...props}) => {
9046
- // debugger
9047
9050
  // return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
9048
9051
  // }
9049
9052
  // }
@@ -11110,8 +11113,9 @@ function commonFun(type, prefixUrl, parentProps) {
11110
11113
  }]
11111
11114
  }, selectConfigProps);
11112
11115
  var _tableSearchForm = handleHiddenFields([{
11113
- name: 'qp-code-like',
11114
- label: 'SKC编码'
11116
+ name: 'qp-code-in',
11117
+ label: 'SKC编码',
11118
+ type: 'multipleQueryInput'
11115
11119
  }, {
11116
11120
  name: 'qp-skcName-like',
11117
11121
  label: 'SKC名称'
@@ -11163,10 +11167,25 @@ function commonFun(type, prefixUrl, parentProps) {
11163
11167
  }
11164
11168
  }
11165
11169
  }
11166
- }, {
11167
- name: 'qp-classId-in',
11170
+ },
11171
+ // { name: 'qp-classId-in', type: 'select', label: '品类', field: {
11172
+ // type: 'select',
11173
+ // props: {
11174
+ // mode: 'multiple',
11175
+ // notFoundContent: '暂无数据',
11176
+ // allowClear: true,
11177
+ // showSearch: true,
11178
+ // showArrow: true,
11179
+ // maxTagCount: 1,
11180
+ // optionFilterProp: 'children',
11181
+ // filterOption: (input: string, option: { props: { children: string } }) =>
11182
+ // option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
11183
+ // },
11184
+ // } },
11185
+ {
11186
+ name: 'qp-brandId-in',
11168
11187
  type: 'select',
11169
- label: '品类',
11188
+ label: '品牌',
11170
11189
  field: {
11171
11190
  type: 'select',
11172
11191
  props: {
@@ -11182,12 +11201,53 @@ function commonFun(type, prefixUrl, parentProps) {
11182
11201
  }
11183
11202
  }
11184
11203
  }
11185
- }, {
11186
- name: 'qp-brandId-in',
11187
- type: 'select',
11188
- label: '品牌',
11204
+ },
11205
+ // 商品属性 品类 == MAT_CATA (zzdlbm)
11206
+ {
11207
+ name: "qp-zzdlbm-in",
11208
+ label: "品类",
11189
11209
  field: {
11190
- type: 'select',
11210
+ type: "select",
11211
+ props: {
11212
+ mode: 'multiple',
11213
+ notFoundContent: '暂无数据',
11214
+ allowClear: true,
11215
+ showSearch: true,
11216
+ showArrow: true,
11217
+ maxTagCount: 1,
11218
+ optionFilterProp: 'children',
11219
+ filterOption: function filterOption(input, option) {
11220
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
11221
+ }
11222
+ }
11223
+ }
11224
+ },
11225
+ // 商品属性 大类 == MID_CATA (zzzlbm)
11226
+ {
11227
+ name: "qp-zzzlbm-in",
11228
+ label: "大类",
11229
+ field: {
11230
+ type: "select",
11231
+ props: {
11232
+ mode: 'multiple',
11233
+ notFoundContent: '暂无数据',
11234
+ allowClear: true,
11235
+ showSearch: true,
11236
+ showArrow: true,
11237
+ maxTagCount: 1,
11238
+ optionFilterProp: 'children',
11239
+ filterOption: function filterOption(input, option) {
11240
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
11241
+ }
11242
+ }
11243
+ }
11244
+ },
11245
+ // 商品属性 中类 == PROP_SUBCATEORY (zzxlbm)
11246
+ {
11247
+ name: "qp-zzxlbm-in",
11248
+ label: "中类",
11249
+ field: {
11250
+ type: "select",
11191
11251
  props: {
11192
11252
  mode: 'multiple',
11193
11253
  notFoundContent: '暂无数据',
@@ -11221,22 +11281,48 @@ function commonFun(type, prefixUrl, parentProps) {
11221
11281
  currentPage: 1
11222
11282
  },
11223
11283
  options: getQueryHeadersItem(_queryHeaderParams5, 'qp-categoryId-in')
11284
+ },
11285
+ // {
11286
+ // url: `${prefixUrl.formSelectFix}/class/withProperty`,
11287
+ // params: {
11288
+ // pageSize: 5000,
11289
+ // currentPage: 1,
11290
+ // },
11291
+ // options: getQueryHeadersItem(queryHeaderParams,'qp-classId-in')
11292
+ // },
11293
+ {
11294
+ url: "".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"),
11295
+ params: {
11296
+ pageSize: 5000,
11297
+ currentPage: 1,
11298
+ 'ctl-withAuth': true
11299
+ },
11300
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
11224
11301
  }, {
11225
- url: "".concat(prefixUrl.formSelectFix, "/class/withProperty"),
11302
+ url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
11226
11303
  params: {
11227
11304
  pageSize: 5000,
11228
- currentPage: 1
11305
+ currentPage: 1,
11306
+ 'qp-propertyCode-eq': 'MAT_CATA'
11229
11307
  },
11230
- options: getQueryHeadersItem(_queryHeaderParams5, 'qp-classId-in')
11308
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzdlbm-in')
11231
11309
  }, {
11232
- url: "".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"),
11310
+ url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
11233
11311
  params: {
11234
11312
  pageSize: 5000,
11235
11313
  currentPage: 1,
11236
- 'ctl-withAuth': true
11314
+ 'qp-propertyCode-eq': 'MID_CATA'
11237
11315
  },
11238
- options: getQueryHeadersItem(_queryHeaderParams5, 'qp-brandId-in')
11239
- }], ['colorName', 'categoryId', 'classId', 'brandId'], hiddenFields);
11316
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzzlbm-in')
11317
+ }, {
11318
+ url: "".concat(prefixUrl.formSelectFix, "/item/propertyValue"),
11319
+ params: {
11320
+ pageSize: 5000,
11321
+ currentPage: 1,
11322
+ 'qp-propertyCode-eq': 'PROP_SUBCATEORY'
11323
+ },
11324
+ options: getQueryHeadersItem(_queryHeaderParams5, 'qp-zzxlbm-in')
11325
+ }], ['colorName', 'categoryId', 'brandId', 'zzdlbm', 'zzzlbm', 'zzxlbm'], hiddenFields);
11240
11326
  var fieldLoadSource = fieldsRequest.map(function (i) {
11241
11327
  return loadSelectSource$1(i.url, i.params, i.options);
11242
11328
  });
@@ -11253,8 +11339,11 @@ function commonFun(type, prefixUrl, parentProps) {
11253
11339
  Promise.all(fieldLoadSource).then(function (x) {
11254
11340
  formatSource(x, 0, getFieldIndex(_tableSearchForm, 'colorName'), _tableSearchForm, ['value', 'value']);
11255
11341
  formatTreeDataSource(x, 1, getFieldIndex(_tableSearchForm, 'categoryId'), _tableSearchForm);
11256
- formatSource(x, 2, getFieldIndex(_tableSearchForm, 'classId'), _tableSearchForm, ['id', 'name']);
11257
- formatSource(x, 3, getFieldIndex(_tableSearchForm, 'brandId'), _tableSearchForm, ['id', 'name']);
11342
+ // formatSource(x,2, getFieldIndex(tableSearchForm, 'classId'), tableSearchForm,['id','name']);
11343
+ formatSource(x, 2, getFieldIndex(_tableSearchForm, 'brandId'), _tableSearchForm, ['id', 'name']);
11344
+ formatSource(x, 3, getFieldIndex(_tableSearchForm, 'zzdlbm'), _tableSearchForm, ['value', 'value']);
11345
+ formatSource(x, 4, getFieldIndex(_tableSearchForm, 'zzzlbm'), _tableSearchForm, ['value', 'value']);
11346
+ formatSource(x, 5, getFieldIndex(_tableSearchForm, 'zzxlbm'), _tableSearchForm, ['value', 'value']);
11258
11347
  });
11259
11348
  modalTableProps = _objectSpread2({
11260
11349
  modalTableTitle: '选择SKC',
@@ -11273,21 +11362,37 @@ function commonFun(type, prefixUrl, parentProps) {
11273
11362
  defaultSort: 2
11274
11363
  }, {
11275
11364
  title: '商品名称',
11276
- dataIndex: 'itemName'
11365
+ dataIndex: 'itemName',
11366
+ defaultSort: 3
11277
11367
  }, {
11278
11368
  title: '颜色',
11279
11369
  dataIndex: 'colorName',
11280
- defaultSort: 3
11370
+ defaultSort: 4
11281
11371
  }, {
11282
11372
  title: '类目',
11283
- dataIndex: 'categoryText'
11373
+ dataIndex: 'categoryText',
11374
+ defaultSort: 5
11375
+ },
11376
+ // {
11377
+ // title: '品类',
11378
+ // dataIndex: 'className',
11379
+ // },
11380
+ {
11381
+ title: '品牌',
11382
+ dataIndex: 'brandName',
11383
+ defaultSort: 6
11284
11384
  }, {
11285
11385
  title: '品类',
11286
- dataIndex: 'className'
11386
+ dataIndex: 'zzdlbm',
11387
+ defaultSort: 7
11287
11388
  }, {
11288
- title: '品牌',
11289
- dataIndex: 'brandName',
11290
- defaultSort: 4
11389
+ title: '大类',
11390
+ dataIndex: 'zzzlbm',
11391
+ defaultSort: 8
11392
+ }, {
11393
+ title: '中类',
11394
+ dataIndex: 'zzxlbm',
11395
+ defaultSort: 9
11291
11396
  }], hiddenFields)
11292
11397
  }, modalTableBusProps);
11293
11398
  }
@@ -11468,7 +11573,6 @@ function commonFun(type, prefixUrl, parentProps) {
11468
11573
  headers: _objectSpread2({}, extralHeaders)
11469
11574
  })]).then(function (x) {
11470
11575
  var _x$, _x$$data$, _x$$data$$channelInfo;
11471
- debugger;
11472
11576
  // 战区限制一级数据
11473
11577
  var newData1 = [];
11474
11578
  (_x$ = x[0]) === null || _x$ === void 0 ? void 0 : (_x$$data$ = _x$.data[0]) === null || _x$$data$ === void 0 ? void 0 : (_x$$data$$channelInfo = _x$$data$.channelInfoSon) === null || _x$$data$$channelInfo === void 0 ? void 0 : _x$$data$$channelInfo.forEach(function (item) {
@@ -12507,7 +12611,6 @@ function commonFun(type, prefixUrl, parentProps) {
12507
12611
  optionFilterProp: 'children',
12508
12612
  filterOption: function filterOption(input, option) {
12509
12613
  var _option$value;
12510
- debugger;
12511
12614
  return ((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '').toLowerCase().includes(input.toLowerCase());
12512
12615
  }
12513
12616
  }
@@ -12655,7 +12758,6 @@ function commonFun(type, prefixUrl, parentProps) {
12655
12758
  var m3 = (_opList4 = opList) === null || _opList4 === void 0 ? void 0 : _opList4.filter(function (r) {
12656
12759
  return (r === null || r === void 0 ? void 0 : r.field) === 'distribution_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12657
12760
  });
12658
- debugger;
12659
12761
  var m4 = (_opList5 = opList) === null || _opList5 === void 0 ? void 0 : _opList5.filter(function (r) {
12660
12762
  return (r === null || r === void 0 ? void 0 : r.field) === 'head_item' && _.trim(r === null || r === void 0 ? void 0 : r.value);
12661
12763
  });
@@ -14502,7 +14604,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14502
14604
  'ctl-withAuth': true
14503
14605
  },
14504
14606
  resType: 'list',
14505
- resPosition: isNoUseItemBarcode ? 3 : 4,
14607
+ resPosition: isNoUseItemBarcode ? 4 : 5,
14506
14608
  resKeyValue: ['id', 'name']
14507
14609
  }, {
14508
14610
  url: "/items/category/queryCategoryTree",
@@ -14511,7 +14613,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14511
14613
  currentPage: 1
14512
14614
  },
14513
14615
  resType: 'treeList',
14514
- resPosition: isNoUseItemBarcode ? 4 : 5
14616
+ resPosition: isNoUseItemBarcode ? 5 : 6
14515
14617
  }];
14516
14618
  var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
14517
14619
  var props = {
@@ -14548,7 +14650,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14548
14650
  tableSearchForm: mTpTableSearchForm,
14549
14651
  tableColumns: mTpTableColumn,
14550
14652
  selectColumn: mTpSelectColumn,
14551
- promiseLoadList: mTpPromiseLoadList
14653
+ promiseLoadList: mTpPromiseLoadList,
14654
+ topTablePagination: (parProps === null || parProps === void 0 ? void 0 : parProps.pagination) || {}
14552
14655
  };
14553
14656
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14554
14657
  modalTableProps: modalTableProps
@@ -20303,9 +20406,16 @@ var BsSulaQueryTable = (function (props) {
20303
20406
  }
20304
20407
  }));
20305
20408
  }));
20306
- } else {
20307
- return undefined;
20308
20409
  }
20410
+ // 判断summaryList 是否为reactNode
20411
+ if (/*#__PURE__*/React__default['default'].isValidElement(summaryList)) {
20412
+ return summaryList;
20413
+ }
20414
+ // 判断summaryList 是否为函数
20415
+ if (Object.prototype.toString.call(summaryList) === '[object Function]') {
20416
+ return summaryList();
20417
+ }
20418
+ return undefined;
20309
20419
  };
20310
20420
  var columnsDom = /*#__PURE__*/React__default['default'].createElement("span", {
20311
20421
  className: "ant-dropdown-link"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.1-alpha.23-aiwei",
3
+ "version": "4.2.1-alpha.24-aiwei",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -433,7 +433,7 @@ export const AddSkuSelect = (parProps: any) => {
433
433
  'ctl-withAuth': true
434
434
  },
435
435
  resType: 'list',
436
- resPosition: isNoUseItemBarcode ? 3 : 4,
436
+ resPosition: isNoUseItemBarcode ? 4 : 5,
437
437
  resKeyValue: ['id','name']
438
438
  },
439
439
  {
@@ -443,7 +443,7 @@ export const AddSkuSelect = (parProps: any) => {
443
443
  currentPage: 1,
444
444
  },
445
445
  resType: 'treeList',
446
- resPosition: isNoUseItemBarcode ? 4 : 5
446
+ resPosition: isNoUseItemBarcode ? 5 : 6
447
447
  },
448
448
  ]
449
449
  const mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
@@ -486,6 +486,7 @@ export const AddSkuSelect = (parProps: any) => {
486
486
  tableColumns: mTpTableColumn,
487
487
  selectColumn: mTpSelectColumn,
488
488
  promiseLoadList: mTpPromiseLoadList,
489
+ topTablePagination: parProps?.pagination || {},
489
490
  }
490
491
 
491
492
  return (
@@ -923,9 +923,16 @@ export default (props: any) => {
923
923
  ))}
924
924
  </Table.Summary>
925
925
  );
926
- } else {
927
- return undefined;
928
926
  }
927
+ // 判断summaryList 是否为reactNode
928
+ if(React.isValidElement(summaryList)){
929
+ return summaryList;
930
+ }
931
+ // 判断summaryList 是否为函数
932
+ if(Object.prototype.toString.call(summaryList) === '[object Function]'){
933
+ return summaryList();
934
+ }
935
+ return undefined;
929
936
  };
930
937
 
931
938
  const columnsDom = <span className="ant-dropdown-link">
@@ -942,7 +949,7 @@ export default (props: any) => {
942
949
  bsTableCode={bsTableCode}
943
950
  />
944
951
 
945
- const memoConfig = useMemo(
952
+ const memoConfig = useMemo(
946
953
  () => ({
947
954
  ...config,
948
955
  summary: props.summary,
@@ -1007,7 +1007,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1007
1007
  ...selectConfigProps,
1008
1008
  }
1009
1009
  const tableSearchForm = handleHiddenFields([
1010
- { name: 'qp-code-like', label: 'SKC编码' },
1010
+ { name: 'qp-code-in', label: 'SKC编码', type: 'multipleQueryInput' },
1011
1011
  { name: 'qp-skcName-like', label: 'SKC名称' },
1012
1012
  { name: 'qp-itemName-like', label: '商品名称' },
1013
1013
  { name: 'qp-colorName-in', type: 'select', label: '颜色', field: {
@@ -1042,8 +1042,40 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1042
1042
  dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
1043
1043
  },
1044
1044
  } },
1045
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
1046
- type: 'select',
1045
+ // { name: 'qp-classId-in', type: 'select', label: '品类', field: {
1046
+ // type: 'select',
1047
+ // props: {
1048
+ // mode: 'multiple',
1049
+ // notFoundContent: '暂无数据',
1050
+ // allowClear: true,
1051
+ // showSearch: true,
1052
+ // showArrow: true,
1053
+ // maxTagCount: 1,
1054
+ // optionFilterProp: 'children',
1055
+ // filterOption: (input: string, option: { props: { children: string } }) =>
1056
+ // option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1057
+ // },
1058
+ // } },
1059
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
1060
+ type: 'select',
1061
+ props: {
1062
+ mode: 'multiple',
1063
+ notFoundContent: '暂无数据',
1064
+ allowClear: true,
1065
+ showSearch: true,
1066
+ showArrow: true,
1067
+ maxTagCount: 1,
1068
+ optionFilterProp: 'children',
1069
+ filterOption: (input: string, option: { props: { children: string } }) =>
1070
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1071
+ },
1072
+ } },
1073
+ // 商品属性 品类 == MAT_CATA (zzdlbm)
1074
+ {
1075
+ name: "qp-zzdlbm-in",
1076
+ label: "品类",
1077
+ field: {
1078
+ type: "select",
1047
1079
  props: {
1048
1080
  mode: 'multiple',
1049
1081
  notFoundContent: '暂无数据',
@@ -1055,9 +1087,14 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1055
1087
  filterOption: (input: string, option: { props: { children: string } }) =>
1056
1088
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1057
1089
  },
1058
- } },
1059
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
1060
- type: 'select',
1090
+ },
1091
+ },
1092
+ // 商品属性 大类 == MID_CATA (zzzlbm)
1093
+ {
1094
+ name: "qp-zzzlbm-in",
1095
+ label: "大类",
1096
+ field: {
1097
+ type: "select",
1061
1098
  props: {
1062
1099
  mode: 'multiple',
1063
1100
  notFoundContent: '暂无数据',
@@ -1069,7 +1106,28 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1069
1106
  filterOption: (input: string, option: { props: { children: string } }) =>
1070
1107
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1071
1108
  },
1072
- } },
1109
+ },
1110
+ },
1111
+ // 商品属性 中类 == PROP_SUBCATEORY (zzxlbm)
1112
+ {
1113
+ name: "qp-zzxlbm-in",
1114
+ label: "中类",
1115
+ field: {
1116
+ type: "select",
1117
+ props: {
1118
+ mode: 'multiple',
1119
+ notFoundContent: '暂无数据',
1120
+ allowClear: true,
1121
+ showSearch: true,
1122
+ showArrow: true,
1123
+ maxTagCount: 1,
1124
+ optionFilterProp: 'children',
1125
+ filterOption: (input: string, option: { props: { children: string } }) =>
1126
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1127
+ },
1128
+ },
1129
+ },
1130
+
1073
1131
  ], hiddenFields);
1074
1132
  const queryHeaderParams = getQueryHeadersList({ querySelectHeadersList, extralHeaders});
1075
1133
  const fieldsRequest = handleHiddenFieldsRequest(
@@ -1091,25 +1149,52 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1091
1149
  },
1092
1150
  options: getQueryHeadersItem(queryHeaderParams,'qp-categoryId-in')
1093
1151
  },
1152
+ // {
1153
+ // url: `${prefixUrl.formSelectFix}/class/withProperty`,
1154
+ // params: {
1155
+ // pageSize: 5000,
1156
+ // currentPage: 1,
1157
+ // },
1158
+ // options: getQueryHeadersItem(queryHeaderParams,'qp-classId-in')
1159
+ // },
1094
1160
  {
1095
- url: `${prefixUrl.formSelectFix}/class/withProperty`,
1161
+ url: `${prefixUrl.formSelectFix}/brand/queryBrandList`,
1096
1162
  params: {
1097
1163
  pageSize: 5000,
1098
1164
  currentPage: 1,
1165
+ 'ctl-withAuth': true
1099
1166
  },
1100
- options: getQueryHeadersItem(queryHeaderParams,'qp-classId-in')
1167
+ options: getQueryHeadersItem(queryHeaderParams,'qp-brandId-in')
1101
1168
  },
1102
1169
  {
1103
- url: `${prefixUrl.formSelectFix}/brand/queryBrandList`,
1170
+ url: `${prefixUrl.formSelectFix}/item/propertyValue`,
1104
1171
  params: {
1105
1172
  pageSize: 5000,
1106
1173
  currentPage: 1,
1107
- 'ctl-withAuth': true
1174
+ 'qp-propertyCode-eq': 'MAT_CATA',
1108
1175
  },
1109
- options: getQueryHeadersItem(queryHeaderParams,'qp-brandId-in')
1110
- }
1176
+ options: getQueryHeadersItem(queryHeaderParams,'qp-zzdlbm-in')
1177
+ },
1178
+ {
1179
+ url: `${prefixUrl.formSelectFix}/item/propertyValue`,
1180
+ params: {
1181
+ pageSize: 5000,
1182
+ currentPage: 1,
1183
+ 'qp-propertyCode-eq': 'MID_CATA',
1184
+ },
1185
+ options: getQueryHeadersItem(queryHeaderParams,'qp-zzzlbm-in')
1186
+ },
1187
+ {
1188
+ url: `${prefixUrl.formSelectFix}/item/propertyValue`,
1189
+ params: {
1190
+ pageSize: 5000,
1191
+ currentPage: 1,
1192
+ 'qp-propertyCode-eq': 'PROP_SUBCATEORY',
1193
+ },
1194
+ options: getQueryHeadersItem(queryHeaderParams,'qp-zzxlbm-in')
1195
+ },
1111
1196
  ],
1112
- ['colorName', 'categoryId', 'classId', 'brandId'],
1197
+ ['colorName', 'categoryId', 'brandId', 'zzdlbm', 'zzzlbm', 'zzxlbm'],
1113
1198
  hiddenFields,
1114
1199
  );
1115
1200
  const fieldLoadSource = fieldsRequest.map((i: any) => loadSelectSource(i.url, i.params, i.options));
@@ -1128,8 +1213,11 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1128
1213
  Promise.all(fieldLoadSource).then((x: any)=>{
1129
1214
  formatSource(x,0, getFieldIndex(tableSearchForm, 'colorName'), tableSearchForm,['value','value']);
1130
1215
  formatTreeDataSource(x,1, getFieldIndex(tableSearchForm, 'categoryId'), tableSearchForm);
1131
- formatSource(x,2, getFieldIndex(tableSearchForm, 'classId'), tableSearchForm,['id','name']);
1132
- formatSource(x,3, getFieldIndex(tableSearchForm, 'brandId'), tableSearchForm,['id','name']);
1216
+ // formatSource(x,2, getFieldIndex(tableSearchForm, 'classId'), tableSearchForm,['id','name']);
1217
+ formatSource(x,2, getFieldIndex(tableSearchForm, 'brandId'), tableSearchForm,['id','name']);
1218
+ formatSource(x,3, getFieldIndex(tableSearchForm, 'zzdlbm'), tableSearchForm,['value','value']);
1219
+ formatSource(x,4, getFieldIndex(tableSearchForm, 'zzzlbm'), tableSearchForm,['value','value']);
1220
+ formatSource(x,5, getFieldIndex(tableSearchForm, 'zzxlbm'), tableSearchForm,['value','value']);
1133
1221
  })
1134
1222
  modalTableProps = {
1135
1223
  modalTableTitle: '选择SKC',
@@ -1153,24 +1241,41 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1153
1241
  {
1154
1242
  title: '商品名称',
1155
1243
  dataIndex: 'itemName',
1244
+ defaultSort: 3,
1156
1245
  },
1157
1246
  {
1158
1247
  title: '颜色',
1159
1248
  dataIndex: 'colorName',
1160
- defaultSort: 3,
1249
+ defaultSort: 4,
1161
1250
  },
1162
1251
  {
1163
1252
  title: '类目',
1164
1253
  dataIndex: 'categoryText',
1254
+ defaultSort: 5,
1255
+ },
1256
+ // {
1257
+ // title: '品类',
1258
+ // dataIndex: 'className',
1259
+ // },
1260
+ {
1261
+ title: '品牌',
1262
+ dataIndex: 'brandName',
1263
+ defaultSort: 6,
1165
1264
  },
1166
1265
  {
1167
1266
  title: '品类',
1168
- dataIndex: 'className',
1267
+ dataIndex: 'zzdlbm',
1268
+ defaultSort: 7,
1169
1269
  },
1170
1270
  {
1171
- title: '品牌',
1172
- dataIndex: 'brandName',
1173
- defaultSort: 4,
1271
+ title: '大类',
1272
+ dataIndex: 'zzzlbm',
1273
+ defaultSort: 8,
1274
+ },
1275
+ {
1276
+ title: '中类',
1277
+ dataIndex: 'zzxlbm',
1278
+ defaultSort: 9,
1174
1279
  },
1175
1280
  ], hiddenFields),
1176
1281
  ...modalTableBusProps
@@ -1359,7 +1464,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
1359
1464
  }
1360
1465
  }),
1361
1466
  ]).then((x: any)=>{
1362
- debugger
1363
1467
  // 战区限制一级数据
1364
1468
  const newData1 = [];
1365
1469
  x[0]?.data[0]?.channelInfoSon?.forEach((item: any) => {
@@ -2326,7 +2430,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2326
2430
  optionFilterProp: 'children',
2327
2431
  filterOption: (input: string, option: { props: { children: string } }) =>
2328
2432
  {
2329
- debugger
2330
2433
  return (option?.value ?? '').toLowerCase().includes(input.toLowerCase())
2331
2434
  }
2332
2435
  },
@@ -2448,7 +2551,6 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
2448
2551
  const m1 = opList?.filter((r: any) => r?.field === 'manage_supervisor' && trim(r?.value));
2449
2552
  const m2 = opList?.filter((r: any) => r?.field === 'direct_supervisor' && trim(r?.value));
2450
2553
  const m3 = opList?.filter((r: any) => r?.field === 'distribution_item' && trim(r?.value));
2451
- debugger
2452
2554
  const m4 = opList?.filter((r: any) => r?.field === 'head_item' && trim(r?.value));
2453
2555
  const m5 = opList?.filter((r: any) => r?.field === 'store_channel_name' && trim(r?.value));
2454
2556
  tableSearchForm[7] = { ...tableSearchForm[7], initialSource: m1 };
@@ -669,7 +669,7 @@ const AddSelect = (props: any) => {
669
669
  }
670
670
  // 数据源 不可以有重复key
671
671
  source = Array.isArray(source) ? _.uniqBy(source, 'value') : [];
672
-
672
+
673
673
  setTableData(source)
674
674
  setTablePagination({ ...tablePagination, total: Number(res?.total || res?.totalCount || source.length), pageSize: Number(res?.size || res?.pageSize || (params?.pageSize || pageSize)), current: Number(res?.page || res?.currentPage || (params?.currentPage || currentPage)) })
675
675
  })
@@ -807,6 +807,8 @@ const AddSelect = (props: any) => {
807
807
  }
808
808
 
809
809
  const handleTableChange = (pagination) => {
810
+ // 设置分页tablePagination
811
+ setTablePagination({ ...tablePagination, ...pagination })
810
812
  getData({ ...tableFormParams, pageSize: pagination.pageSize, currentPage: pagination.current }, 2)
811
813
  }
812
814
 
@@ -126,7 +126,6 @@ const InputElement = ({
126
126
  // {
127
127
  // body: {
128
128
  // cell: ({index, record, ...props}) => {
129
- // debugger
130
129
  // return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
131
130
  // }
132
131
  // }
@@ -242,11 +242,9 @@ class DataValidation extends React.Component {
242
242
  cell.v = cell.m
243
243
  }
244
244
  }
245
- // console.log(postion);
246
245
  },
247
246
  cellAllRenderBefore: function (data, sheetFile, ctx) {
248
247
  sheetFile.config.borderInfo = [];
249
- // console.info(data,sheetFile,ctx)
250
248
  },
251
249
  },
252
250
  showtoolbarConfig: {
@@ -411,7 +409,8 @@ class DataValidation extends React.Component {
411
409
  };
412
410
 
413
411
  getData = () => {
414
- console.time();
412
+ // 是否使用字符串值 默认为false
413
+ const useStringValue = this.props.useStringValue || false;
415
414
  let sheetData = luckysheet.getSheetData();
416
415
  let data = JSON.parse(JSON.stringify(sheetData))
417
416
  .filter((item) => item[0])
@@ -419,7 +418,13 @@ class DataValidation extends React.Component {
419
418
  let obj = {};
420
419
 
421
420
  item.slice(0, itemsTemp.length).map((innerItem, index) => {
422
- obj[this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
421
+ // 如果使用字符串值,直接赋值字符串
422
+ if (useStringValue) {
423
+ obj[this.state.items[index].code] = innerItem && innerItem.m;
424
+ } else {
425
+ // 否则根据值是否相等来判断是否使用字符串值
426
+ obj[this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
427
+ }
423
428
  });
424
429
 
425
430
  return obj;
@@ -570,7 +575,6 @@ customSort = (a, b) => {
570
575
  resultData: res,
571
576
  });
572
577
 
573
- console.log(setExportData);
574
578
  setExportData([123123]);
575
579
  })
576
580
  .catch((err:any) => { });
@@ -820,7 +824,6 @@ customSort = (a, b) => {
820
824
  top: '0px',
821
825
  };
822
826
 
823
- console.log('itemsTemp', itemsTemp)
824
827
  return (
825
828
  <>
826
829
  <div className="sheet_table_top">
@@ -594,7 +594,6 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
594
594
 
595
595
  const formItem = (list) => {
596
596
  if (isModalVisible && list?.length) {
597
- debugger
598
597
  const setDisabled = (name: any) => {
599
598
  if (fixedparamsDisabled && fixedparameter?.length && fixedparameter.find((item: any) => item === name)) {
600
599
  return true