@bit-sun/business-component 2.2.9 → 2.2.10

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.
@@ -1 +1,2 @@
1
1
  export declare const AddSkuSelect: (parProps: any) => JSX.Element;
2
+ export declare const AddSkcSelect: (parProps: any) => JSX.Element;
package/dist/index.esm.js CHANGED
@@ -87,7 +87,10 @@ function handleRequestAuthHeader(config) {
87
87
  }
88
88
  // 处理请求头
89
89
  var handleRequestHeader = function handleRequestHeader(config) {
90
+ var _resposne$accountPers, _resposne$employeeRes;
90
91
  config.headers['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
92
+ config.headers['x-account-id'] = (resposne === null || resposne === void 0 ? void 0 : (_resposne$accountPers = resposne.accountPersonDetail) === null || _resposne$accountPers === void 0 ? void 0 : _resposne$accountPers.accountId) || -1;
93
+ config.headers['x-employee-id'] = (resposne === null || resposne === void 0 ? void 0 : (_resposne$employeeRes = resposne.employeeResVo) === null || _resposne$employeeRes === void 0 ? void 0 : _resposne$employeeRes.id) || 2;
91
94
  config.headers['x-tenant-id'] = getCurrentTenantId() || 1;
92
95
  if (localStorage.getItem('x-user-auth-context')) {
93
96
  config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
@@ -9892,7 +9895,11 @@ var AddSelect = function AddSelect(props) {
9892
9895
  buttonProps = _props$buttonProps === void 0 ? {} : _props$buttonProps,
9893
9896
  beforeShowModal = props.beforeShowModal,
9894
9897
  _props$tableCodeList = props.tableCodeList,
9895
- tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList;
9898
+ tableCodeList = _props$tableCodeList === void 0 ? [] : _props$tableCodeList,
9899
+ _props$businessType = props.businessType,
9900
+ businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
9901
+ _props$isAllowRepeate = props.isAllowRepeatedSelect,
9902
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
9896
9903
  var _ref = requestConfig || {},
9897
9904
  url = _ref.url,
9898
9905
  otherParams = _ref.otherParams,
@@ -9909,6 +9916,7 @@ var AddSelect = function AddSelect(props) {
9909
9916
  var realButtonProps = _objectSpread2({
9910
9917
  type: "primary"
9911
9918
  }, buttonProps);
9919
+ var selectRowKey = isAllowRepeatedSelect ? 'uuid' : mappingValueField;
9912
9920
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
9913
9921
  var initVal = value || (selectMode ? [] : null);
9914
9922
  var pageSize = 100; // 下拉框默认分页 条数
@@ -10060,7 +10068,9 @@ var AddSelect = function AddSelect(props) {
10060
10068
  var _record$packingUnitLi, _record$packingUnitLi2;
10061
10069
  // let
10062
10070
  if (record.needFocus === true && currentIndex === 0) ;
10063
- var precisionObj = {};
10071
+ var precisionObj = businessType == 'skc' ? {
10072
+ precision: 0
10073
+ } : {};
10064
10074
  var unitAccuracy = (_record$packingUnitLi = record.packingUnitList) === null || _record$packingUnitLi === void 0 ? void 0 : (_record$packingUnitLi2 = _record$packingUnitLi[0]) === null || _record$packingUnitLi2 === void 0 ? void 0 : _record$packingUnitLi2.unitAccuracy;
10065
10075
  var isCountUnitAccuracyCheck = item.dataIndex == 'count' && unitAccuracy !== undefined;
10066
10076
  if (isCountUnitAccuracyCheck) {
@@ -10184,6 +10194,53 @@ var AddSelect = function AddSelect(props) {
10184
10194
  }
10185
10195
  });
10186
10196
  }
10197
+ var selectLength = modalTableProps.selectColumn.filter(function (item) {
10198
+ return item.isSelectItem;
10199
+ }).length;
10200
+ if (item.isSelectItem) {
10201
+ return _objectSpread2(_objectSpread2({}, item), {}, {
10202
+ render: function render(text, record, index) {
10203
+ var _item$dataSource;
10204
+ if ((_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
10205
+ return /*#__PURE__*/React.createElement(Select, {
10206
+ value: text || null,
10207
+ onChange: function onChange(value) {
10208
+ if (businessType == 'skc' && popvalue.some(function (i) {
10209
+ return i.code == record.code && i[item.dataIndex] == value;
10210
+ })) {
10211
+ message.warning('相同skc配码不可设置相同哦');
10212
+ record[item.dataIndex] = null;
10213
+ var _newPopValue = popvalue.map(function (i, innerIndex) {
10214
+ if (innerIndex == index) {
10215
+ i[item.dataIndex] = record[item.dataIndex];
10216
+ }
10217
+ return i;
10218
+ });
10219
+ setPopValue(_newPopValue);
10220
+ return false;
10221
+ }
10222
+ record[item.dataIndex] = value;
10223
+ var newPopValue = popvalue.map(function (i, innerIndex) {
10224
+ if (innerIndex == index) {
10225
+ i[item.dataIndex] = record[item.dataIndex];
10226
+ }
10227
+ return i;
10228
+ });
10229
+ setPopValue(newPopValue);
10230
+ },
10231
+ style: {
10232
+ width: '160px'
10233
+ }
10234
+ }, item.dataSource.map(function (item) {
10235
+ return /*#__PURE__*/React.createElement(Select.Option, {
10236
+ value: item.code
10237
+ }, item.name);
10238
+ }));
10239
+ }
10240
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
10241
+ }
10242
+ });
10243
+ }
10187
10244
  return item;
10188
10245
  })), [{
10189
10246
  title: '操作',
@@ -10390,18 +10447,42 @@ var AddSelect = function AddSelect(props) {
10390
10447
  };
10391
10448
 
10392
10449
  useEffect(function () {
10393
- Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10394
- pageSize: 5000,
10395
- currentPage: 1,
10396
- 'ctl-withAuth': true
10397
- }), loadSelectSource("/items/category/queryCategoryTree", {
10398
- pageSize: 5000,
10399
- currentPage: 1
10400
- })]).then(function (x) {
10401
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10402
- formatTreeDataSource(x, 1, 3, tableSearchForm);
10403
- });
10404
- }, []);
10450
+ if (businessType == 'sku') {
10451
+ Promise.all([loadSelectSource("/items/brand/queryBrandList", {
10452
+ pageSize: 5000,
10453
+ currentPage: 1,
10454
+ 'ctl-withAuth': true
10455
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10456
+ pageSize: 5000,
10457
+ currentPage: 1
10458
+ })]).then(function (x) {
10459
+ formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10460
+ formatTreeDataSource(x, 1, 3, tableSearchForm);
10461
+ });
10462
+ }
10463
+ if (businessType == 'skc') {
10464
+ Promise.all([loadSelectSource("/items/item/propertyValue", {
10465
+ pageSize: 5000,
10466
+ currentPage: 1,
10467
+ 'qp-propertyId-eq': '1467042217951883265'
10468
+ }), loadSelectSource("/items/category/queryCategoryTree", {
10469
+ pageSize: 5000,
10470
+ currentPage: 1
10471
+ }), loadSelectSource("/items/class/withProperty", {
10472
+ pageSize: 5000,
10473
+ currentPage: 1
10474
+ }), loadSelectSource("/items/brand/queryBrandList", {
10475
+ pageSize: 5000,
10476
+ currentPage: 1,
10477
+ 'ctl-withAuth': true
10478
+ })]).then(function (x) {
10479
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
10480
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
10481
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
10482
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
10483
+ });
10484
+ }
10485
+ }, [businessType]);
10405
10486
  useEffect(function () {
10406
10487
  if (value) {
10407
10488
  setPopValue(value);
@@ -10531,8 +10612,18 @@ var AddSelect = function AddSelect(props) {
10531
10612
  selectRows[selectedRowKeys.length]['needFocus'] = true;
10532
10613
  }
10533
10614
  }
10534
- setPopValue(selectRows);
10535
- setSelectedRowKeys(selectKeys);
10615
+ if (isAllowRepeatedSelect) {
10616
+ var list = popvalue.concat(selectRows).map(function (i) {
10617
+ return _objectSpread2(_objectSpread2({}, i), {}, {
10618
+ uuid: i.uuid || uuid()
10619
+ });
10620
+ });
10621
+ setPopValue(list);
10622
+ setSelectedRowKeys([]);
10623
+ } else {
10624
+ setPopValue(selectRows);
10625
+ setSelectedRowKeys(selectKeys);
10626
+ }
10536
10627
  // setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
10537
10628
  // setCheckedAll(filterRows.length === tablePagination?.total);
10538
10629
  };
@@ -10649,12 +10740,19 @@ var AddSelect = function AddSelect(props) {
10649
10740
  setSelectedRowKeys([]);
10650
10741
  };
10651
10742
  var deleteRecord = function deleteRecord(record) {
10652
- setPopValue(popvalue.filter(function (item) {
10653
- return item.skuCode !== record.skuCode;
10654
- }));
10655
- setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10656
- return item !== record.skuCode;
10657
- })));
10743
+ if (isAllowRepeatedSelect) {
10744
+ setPopValue(popvalue.filter(function (item) {
10745
+ return item.uuid !== record.uuid;
10746
+ }));
10747
+ setSelectedRowKeys([]);
10748
+ } else {
10749
+ setPopValue(popvalue.filter(function (item) {
10750
+ return item.skuCode !== record.skuCode;
10751
+ }));
10752
+ setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
10753
+ return item !== record.skuCode;
10754
+ })));
10755
+ }
10658
10756
  };
10659
10757
  var inputIndex = 0;
10660
10758
  useEffect(function () {
@@ -10726,6 +10824,7 @@ var AddSelect = function AddSelect(props) {
10726
10824
  handleColumns(showSelectedCol, [], function (res) {
10727
10825
  return setShowColumnsCallback(res);
10728
10826
  });
10827
+ var selectLength = isAllowRepeatedSelect ? (popvalue === null || popvalue === void 0 ? void 0 : popvalue.length) || 0 : (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0;
10729
10828
  return /*#__PURE__*/React.createElement("div", {
10730
10829
  className: 'add_select'
10731
10830
  }, /*#__PURE__*/React.createElement("div", {
@@ -10811,7 +10910,7 @@ var AddSelect = function AddSelect(props) {
10811
10910
  style: themeColor
10812
10911
  }, (tablePagination === null || tablePagination === void 0 ? void 0 : tablePagination.total) || 0), "\xA0\u9879", selectMode ? /*#__PURE__*/React.createElement("span", null, "\uFF0C \u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React.createElement("span", {
10813
10912
  style: themeColor
10814
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879") : ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10913
+ }, selectLength), "\xA0\u9879") : ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
10815
10914
  style: {
10816
10915
  marginRight: 8
10817
10916
  }
@@ -10854,7 +10953,7 @@ var AddSelect = function AddSelect(props) {
10854
10953
  }
10855
10954
  }, /*#__PURE__*/React.createElement("span", null, "\u672C\u6B21\u5DF2\u9009\xA0", /*#__PURE__*/React.createElement("span", {
10856
10955
  style: themeColor
10857
- }, (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || 0), "\xA0\u9879")), /*#__PURE__*/React.createElement("div", {
10956
+ }, selectLength), "\xA0\u9879")), /*#__PURE__*/React.createElement("div", {
10858
10957
  style: {
10859
10958
  display: 'flex'
10860
10959
  }
@@ -10888,7 +10987,7 @@ var AddSelect = function AddSelect(props) {
10888
10987
  dataSource: popvalue,
10889
10988
  pagination: false,
10890
10989
  // onChange={handleTableChange}
10891
- rowKey: mappingValueField,
10990
+ rowKey: selectRowKey,
10892
10991
  rowClassName: 'row-class',
10893
10992
  scroll: {
10894
10993
  y: 500
@@ -11938,6 +12037,7 @@ var handleDefaultPrefixUrl = function handleDefaultPrefixUrl(type) {
11938
12037
  case 'skuCommodity':
11939
12038
  case 'skuPropertyValue':
11940
12039
  case 'spuCommodity':
12040
+ case 'skcCommodity':
11941
12041
  result = '/items';
11942
12042
  break;
11943
12043
  case 'physicalWarehouse':
@@ -12637,6 +12737,155 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
12637
12737
  }]
12638
12738
  }, modalTableBusProps);
12639
12739
  }
12740
+ // 商品选择器skc
12741
+ if (type === 'skcCommodity') {
12742
+ requestConfig = _objectSpread2({
12743
+ url: "".concat(prefixUrl.selectPrefix, "/skc/skcSelect"),
12744
+ filter: 'qp-code,name-orGroup,like',
12745
+ mappingTextField: 'name',
12746
+ mappingValueField: 'code',
12747
+ sourceName: 'qp-skcCode-eq'
12748
+ }, requestConfigProp);
12749
+ tableSearchForm = [{
12750
+ name: 'qp-code-like',
12751
+ label: 'SKC编码'
12752
+ }, {
12753
+ name: 'qp-skcName-like',
12754
+ label: 'SKC名称'
12755
+ }, {
12756
+ name: 'qp-itemName-like',
12757
+ label: '商品名称'
12758
+ }, {
12759
+ name: 'qp-colorName-in',
12760
+ type: 'select',
12761
+ label: '颜色',
12762
+ field: {
12763
+ type: 'select',
12764
+ props: {
12765
+ mode: 'multiple',
12766
+ notFoundContent: '暂无数据',
12767
+ allowClear: true,
12768
+ showSearch: true,
12769
+ showArrow: true,
12770
+ maxTagCount: 1,
12771
+ optionFilterProp: 'children',
12772
+ filterOption: function filterOption(input, option) {
12773
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12774
+ }
12775
+ }
12776
+ }
12777
+ }, {
12778
+ name: 'qp-categoryId-in',
12779
+ type: 'treeSelect',
12780
+ label: '类目',
12781
+ field: {
12782
+ type: 'treeSelect',
12783
+ props: {
12784
+ treeData: [],
12785
+ treeCheckable: true,
12786
+ showSearch: true,
12787
+ allowClear: true,
12788
+ showArrow: true,
12789
+ treeNodeFilterProp: 'title',
12790
+ treeDefaultExpandAll: true,
12791
+ maxTagCount: 1,
12792
+ placeholder: '请选择',
12793
+ style: {
12794
+ width: '100%'
12795
+ },
12796
+ dropdownStyle: {
12797
+ maxHeight: 400,
12798
+ maxWidth: 100,
12799
+ overflow: 'auto'
12800
+ }
12801
+ }
12802
+ }
12803
+ }, {
12804
+ name: 'qp-classId-in',
12805
+ type: 'select',
12806
+ label: '品类',
12807
+ field: {
12808
+ type: 'select',
12809
+ props: {
12810
+ mode: 'multiple',
12811
+ notFoundContent: '暂无数据',
12812
+ allowClear: true,
12813
+ showSearch: true,
12814
+ showArrow: true,
12815
+ maxTagCount: 1,
12816
+ optionFilterProp: 'children',
12817
+ filterOption: function filterOption(input, option) {
12818
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12819
+ }
12820
+ }
12821
+ }
12822
+ }, {
12823
+ name: 'qp-brandId-in',
12824
+ type: 'select',
12825
+ label: '品牌',
12826
+ field: {
12827
+ type: 'select',
12828
+ props: {
12829
+ mode: 'multiple',
12830
+ notFoundContent: '暂无数据',
12831
+ allowClear: true,
12832
+ showSearch: true,
12833
+ showArrow: true,
12834
+ maxTagCount: 1,
12835
+ optionFilterProp: 'children',
12836
+ filterOption: function filterOption(input, option) {
12837
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
12838
+ }
12839
+ }
12840
+ }
12841
+ }];
12842
+ Promise.all([loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/item/propertyValue"), {
12843
+ pageSize: 5000,
12844
+ currentPage: 1,
12845
+ 'qp-propertyId-eq': '1467042217951883265'
12846
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/category/queryCategoryTree"), {
12847
+ pageSize: 5000,
12848
+ currentPage: 1
12849
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/class/withProperty"), {
12850
+ pageSize: 5000,
12851
+ currentPage: 1
12852
+ }), loadSelectSource$1("".concat(prefixUrl.formSelectFix, "/brand/queryBrandList"), {
12853
+ pageSize: 5000,
12854
+ currentPage: 1,
12855
+ 'ctl-withAuth': true
12856
+ })]).then(function (x) {
12857
+ formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
12858
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
12859
+ formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
12860
+ formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
12861
+ });
12862
+ modalTableProps = _objectSpread2({
12863
+ modalTableTitle: '选择SKC',
12864
+ tableSearchForm: tableSearchForm,
12865
+ tableColumns: [{
12866
+ title: 'SKC编码',
12867
+ dataIndex: 'code'
12868
+ }, {
12869
+ title: 'SKC名称',
12870
+ dataIndex: 'name'
12871
+ }, {
12872
+ title: '商品名称',
12873
+ dataIndex: 'itemName'
12874
+ }, {
12875
+ title: '颜色',
12876
+ dataIndex: 'colorName'
12877
+ }, {
12878
+ title: '类目',
12879
+ dataIndex: 'categoryText'
12880
+ }, {
12881
+ title: '品类',
12882
+ dataIndex: 'className'
12883
+ }, {
12884
+ title: '品牌',
12885
+ dataIndex: 'brandName'
12886
+ }]
12887
+ }, modalTableBusProps);
12888
+ }
12640
12889
  // 商品规格选择器(无弹窗)
12641
12890
  if (type === 'skuPropertyValue') {
12642
12891
  requestConfig = _objectSpread2({
@@ -13866,7 +14115,8 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
13866
14115
  setValue(value);
13867
14116
  },
13868
14117
  beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
13869
- onSaveCallback: parProps.onSaveCallback
14118
+ onSaveCallback: parProps.onSaveCallback,
14119
+ businessType: 'sku'
13870
14120
  // onSaveCallback: (rows) => {
13871
14121
  // console.log('save call', rows);
13872
14122
  // // return Promise.resolve(true);
@@ -14072,6 +14322,280 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14072
14322
  modalTableProps: modalTableProps
14073
14323
  })));
14074
14324
  };
14325
+ var AddSkcSelect = function AddSkcSelect(parProps) {
14326
+ var selectProps = {
14327
+ mode: 'multiple'
14328
+ };
14329
+ var _useState3 = useState((selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode) ? [] : null),
14330
+ _useState4 = _slicedToArray(_useState3, 2),
14331
+ value = _useState4[0],
14332
+ setValue = _useState4[1];
14333
+ var _useState5 = useState([]),
14334
+ _useState6 = _slicedToArray(_useState5, 2),
14335
+ propertyList = _useState6[0],
14336
+ setPropertyList = _useState6[1];
14337
+ useEffect(function () {
14338
+ axios.get("/items/itemPropertyValueGroup/listNoPage").then(function (result) {
14339
+ var _result, _result2;
14340
+ result = result.data;
14341
+ if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
14342
+ message.error(result.msg);
14343
+ return;
14344
+ }
14345
+ var data = result.data || [];
14346
+ setPropertyList(data);
14347
+ }).catch(function (err) {});
14348
+ }, []);
14349
+ var initialSelectColumn = [{
14350
+ title: 'SKC编码',
14351
+ width: 150,
14352
+ dataIndex: 'code'
14353
+ }, {
14354
+ title: 'SKC名称',
14355
+ width: 200,
14356
+ ellipsis: {
14357
+ showTitle: false
14358
+ },
14359
+ render: function render(text) {
14360
+ return /*#__PURE__*/React.createElement(Tooltip, {
14361
+ placement: "topLeft",
14362
+ title: text
14363
+ }, text);
14364
+ },
14365
+ dataIndex: 'name'
14366
+ }, {
14367
+ title: '颜色',
14368
+ width: 200,
14369
+ ellipsis: {
14370
+ showTitle: false
14371
+ },
14372
+ render: function render(text) {
14373
+ return /*#__PURE__*/React.createElement(Tooltip, {
14374
+ placement: "topLeft",
14375
+ title: text
14376
+ }, text);
14377
+ },
14378
+ dataIndex: 'colorName'
14379
+ }, {
14380
+ title: '配码',
14381
+ dataIndex: 'selectPropertyGroupCode',
14382
+ width: 160,
14383
+ isSelectItem: true,
14384
+ dataSource: propertyList
14385
+ }, {
14386
+ title: '数量',
14387
+ width: 100,
14388
+ isInputItem: true,
14389
+ dataIndex: 'count'
14390
+ }];
14391
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
14392
+ var props = {
14393
+ buttonText: parProps.buttonText || '新增',
14394
+ buttonProps: parProps.buttonProps || {},
14395
+ tableCodeList: parProps.tableCodeList || ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
14396
+ value: value,
14397
+ // labelInValue: true, // 非必填 默认为false
14398
+ requestConfig: _objectSpread2({
14399
+ url: "/items/skc/skcSelect",
14400
+ filter: 'qp-name-like',
14401
+ otherParams: {},
14402
+ mappingTextField: 'name',
14403
+ mappingValueField: 'code'
14404
+ }, parProps.requestConfig),
14405
+ selectProps: selectProps,
14406
+ onChange: function onChange(value) {
14407
+ console.log(value);
14408
+ setValue(value);
14409
+ },
14410
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
14411
+ onSaveCallback: parProps.onSaveCallback,
14412
+ businessType: 'skc',
14413
+ isAllowRepeatedSelect: true
14414
+ };
14415
+ var modalTableProps = {
14416
+ modalTableTitle: '选择商品',
14417
+ tableSearchForm: [{
14418
+ name: 'qp-code-like',
14419
+ label: 'SKC编码'
14420
+ }, {
14421
+ name: 'qp-skcName-like',
14422
+ label: 'SKC名称'
14423
+ }, {
14424
+ name: 'qp-itemName-like',
14425
+ label: '商品名称'
14426
+ }, {
14427
+ name: 'qp-colorName-in',
14428
+ type: 'select',
14429
+ label: '颜色',
14430
+ field: {
14431
+ type: 'select',
14432
+ props: {
14433
+ mode: 'multiple',
14434
+ notFoundContent: '暂无数据',
14435
+ allowClear: true,
14436
+ showSearch: true,
14437
+ showArrow: true,
14438
+ maxTagCount: 1,
14439
+ optionFilterProp: 'children',
14440
+ filterOption: function filterOption(input, option) {
14441
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14442
+ }
14443
+ }
14444
+ }
14445
+ }, {
14446
+ name: 'qp-categoryId-in',
14447
+ type: 'treeSelect',
14448
+ label: '类目',
14449
+ field: {
14450
+ type: 'treeSelect',
14451
+ props: {
14452
+ treeData: [],
14453
+ treeCheckable: true,
14454
+ showSearch: true,
14455
+ allowClear: true,
14456
+ showArrow: true,
14457
+ treeNodeFilterProp: 'title',
14458
+ treeDefaultExpandAll: true,
14459
+ maxTagCount: 1,
14460
+ placeholder: '请选择',
14461
+ style: {
14462
+ width: '100%'
14463
+ },
14464
+ dropdownStyle: {
14465
+ maxHeight: 400,
14466
+ maxWidth: 100,
14467
+ overflow: 'auto'
14468
+ }
14469
+ }
14470
+ }
14471
+ }, {
14472
+ name: 'qp-classId-in',
14473
+ type: 'select',
14474
+ label: '品类',
14475
+ field: {
14476
+ type: 'select',
14477
+ props: {
14478
+ mode: 'multiple',
14479
+ notFoundContent: '暂无数据',
14480
+ allowClear: true,
14481
+ showSearch: true,
14482
+ showArrow: true,
14483
+ maxTagCount: 1,
14484
+ optionFilterProp: 'children',
14485
+ filterOption: function filterOption(input, option) {
14486
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14487
+ }
14488
+ }
14489
+ }
14490
+ }, {
14491
+ name: 'qp-brandId-in',
14492
+ type: 'select',
14493
+ label: '品牌',
14494
+ field: {
14495
+ type: 'select',
14496
+ props: {
14497
+ mode: 'multiple',
14498
+ notFoundContent: '暂无数据',
14499
+ allowClear: true,
14500
+ showSearch: true,
14501
+ showArrow: true,
14502
+ maxTagCount: 1,
14503
+ optionFilterProp: 'children',
14504
+ filterOption: function filterOption(input, option) {
14505
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
14506
+ }
14507
+ }
14508
+ }
14509
+ }],
14510
+ tableColumns: [{
14511
+ title: 'SKC编码',
14512
+ width: 150,
14513
+ dataIndex: 'code'
14514
+ }, {
14515
+ title: 'SKC名称',
14516
+ width: 200,
14517
+ ellipsis: {
14518
+ showTitle: false
14519
+ },
14520
+ render: function render(text) {
14521
+ return /*#__PURE__*/React.createElement(Tooltip, {
14522
+ placement: "topLeft",
14523
+ title: text
14524
+ }, text);
14525
+ },
14526
+ dataIndex: 'name'
14527
+ }, {
14528
+ title: '商品名称',
14529
+ width: 100,
14530
+ ellipsis: {
14531
+ showTitle: false
14532
+ },
14533
+ dataIndex: 'itemName',
14534
+ render: function render(text) {
14535
+ return /*#__PURE__*/React.createElement(Tooltip, {
14536
+ placement: "topLeft",
14537
+ title: text
14538
+ }, text);
14539
+ }
14540
+ }, {
14541
+ title: '颜色',
14542
+ width: 100,
14543
+ ellipsis: {
14544
+ showTitle: false
14545
+ },
14546
+ render: function render(text) {
14547
+ return /*#__PURE__*/React.createElement(Tooltip, {
14548
+ placement: "topLeft",
14549
+ title: text
14550
+ }, text);
14551
+ },
14552
+ dataIndex: 'colorName'
14553
+ }, {
14554
+ title: '类目',
14555
+ width: 100,
14556
+ ellipsis: {
14557
+ showTitle: false
14558
+ },
14559
+ render: function render(text) {
14560
+ return /*#__PURE__*/React.createElement(Tooltip, {
14561
+ placement: "topLeft",
14562
+ title: text
14563
+ }, text);
14564
+ },
14565
+ dataIndex: 'categoryName'
14566
+ }, {
14567
+ title: '品类',
14568
+ width: 100,
14569
+ ellipsis: {
14570
+ showTitle: false
14571
+ },
14572
+ render: function render(text) {
14573
+ return /*#__PURE__*/React.createElement(Tooltip, {
14574
+ placement: "topLeft",
14575
+ title: text
14576
+ }, text);
14577
+ },
14578
+ dataIndex: 'className'
14579
+ }, {
14580
+ title: '品牌',
14581
+ width: 100,
14582
+ ellipsis: {
14583
+ showTitle: false
14584
+ },
14585
+ render: function render(text) {
14586
+ return /*#__PURE__*/React.createElement(Tooltip, {
14587
+ placement: "topLeft",
14588
+ title: text
14589
+ }, text);
14590
+ },
14591
+ dataIndex: 'brandName'
14592
+ }],
14593
+ selectColumn: mTpSelectColumn
14594
+ };
14595
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
14596
+ modalTableProps: modalTableProps
14597
+ })));
14598
+ };
14075
14599
 
14076
14600
  var CommodityEntry = function CommodityEntry(props) {
14077
14601
  var dataValidationRef = useRef();
@@ -29929,4 +30453,4 @@ var JsonQueryTable = /*#__PURE__*/React.memo(function (props) {
29929
30453
  }, "setting"));
29930
30454
  });
29931
30455
 
29932
- export { AddSelect, AddSkuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };
30456
+ export { AddSelect, AddSkcSelect, AddSkuSelect, BillEntry, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, index$1 as BusinessTreeSearchSelect, index as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, SearchSelect, index$2 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect };