@bit-sun/business-component 1.1.36 → 1.1.37

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
@@ -2683,7 +2683,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2683
2683
  },
2684
2684
  sourceName: 'skuCode'
2685
2685
  }, requestConfigProp);
2686
- tableSearchForm = [requestConfig.url.includes('v2') ? {
2686
+ tableSearchForm = requestConfig.url.includes('v2') ? [requestConfig.url.includes('v2') ? {
2687
2687
  name: 'qp-skuName-like',
2688
2688
  label: 'SKU名称'
2689
2689
  } : {
@@ -2692,19 +2692,22 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2692
2692
  }, {
2693
2693
  name: 'qp-skuCode-like',
2694
2694
  label: 'SKU编码'
2695
- }, {
2695
+ }, requestConfig.url.includes('v2') ? {
2696
2696
  name: 'qp-code-like',
2697
2697
  label: '国际条码'
2698
+ } : {
2699
+ name: 'qp-barCode-like',
2700
+ label: '国际条码'
2698
2701
  }, {
2699
2702
  name: 'qp-itemName-like',
2700
2703
  label: '所属SPU名称'
2701
2704
  }, {
2702
2705
  name: 'qp-itemCode-like',
2703
2706
  label: '所属SPU编码'
2704
- }, {
2707
+ }, requestConfig.url.includes('v2') ? {
2705
2708
  name: 'qp-externalCode-like',
2706
2709
  label: '外部编码'
2707
- }, {
2710
+ } : null, requestConfig.url.includes('v2') ? {
2708
2711
  name: 'qp-propertyValueCode-in',
2709
2712
  type: 'businessSearchSelect',
2710
2713
  label: '规格',
@@ -2718,6 +2721,85 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2718
2721
  }
2719
2722
  }
2720
2723
  }
2724
+ } : null, {
2725
+ name: 'qp-brandId-in',
2726
+ type: 'select',
2727
+ label: '品牌',
2728
+ field: {
2729
+ type: 'select',
2730
+ props: {
2731
+ mode: 'multiple',
2732
+ notFoundContent: '暂无数据',
2733
+ allowClear: true,
2734
+ showSearch: true,
2735
+ showArrow: true,
2736
+ maxTagCount: 1,
2737
+ optionFilterProp: 'children',
2738
+ filterOption: function filterOption(input, option) {
2739
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
2740
+ }
2741
+ }
2742
+ }
2743
+ }, {
2744
+ name: 'qp-categoryId-in',
2745
+ type: 'treeSelect',
2746
+ label: '类目',
2747
+ field: {
2748
+ type: 'treeSelect',
2749
+ props: {
2750
+ treeData: [],
2751
+ treeCheckable: true,
2752
+ showSearch: true,
2753
+ allowClear: true,
2754
+ showArrow: true,
2755
+ treeNodeFilterProp: 'title',
2756
+ treeDefaultExpandAll: true,
2757
+ maxTagCount: 1,
2758
+ placeholder: '请选择',
2759
+ style: {
2760
+ width: '100%'
2761
+ },
2762
+ dropdownStyle: {
2763
+ maxHeight: 400,
2764
+ maxWidth: 100,
2765
+ overflow: 'auto'
2766
+ }
2767
+ }
2768
+ }
2769
+ }, {
2770
+ name: 'qp-classId-in',
2771
+ type: 'select',
2772
+ label: '品类',
2773
+ field: {
2774
+ type: 'select',
2775
+ props: {
2776
+ mode: 'multiple',
2777
+ notFoundContent: '暂无数据',
2778
+ allowClear: true,
2779
+ showSearch: true,
2780
+ showArrow: true,
2781
+ maxTagCount: 1,
2782
+ optionFilterProp: 'children',
2783
+ filterOption: function filterOption(input, option) {
2784
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
2785
+ }
2786
+ }
2787
+ }
2788
+ }] : [{
2789
+ name: 'qp-name-like',
2790
+ label: 'SKU名称'
2791
+ }, {
2792
+ name: 'qp-skuCode-like',
2793
+ label: 'SKU编码'
2794
+ }, {
2795
+ name: 'qp-barCode-like',
2796
+ label: '国际条码'
2797
+ }, {
2798
+ name: 'qp-itemName-like',
2799
+ label: '所属SPU名称'
2800
+ }, {
2801
+ name: 'qp-itemCode-like',
2802
+ label: '所属SPU编码'
2721
2803
  }, {
2722
2804
  name: 'qp-brandId-in',
2723
2805
  type: 'select',
@@ -2793,14 +2875,14 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2793
2875
  pageSize: 5000,
2794
2876
  currentPage: 1
2795
2877
  })]).then(function (x) {
2796
- formatSource(x, 0, 7, tableSearchForm, ['id', 'name']);
2797
- formatTreeDataSource(x, 1, 8, tableSearchForm);
2798
- formatSource(x, 2, 9, tableSearchForm, ['id', 'name']);
2878
+ requestConfig.url.includes('v2') ? formatSource(x, 0, 7, tableSearchForm, ['id', 'name']) : formatSource(x, 0, 5, tableSearchForm, ['id', 'name']);
2879
+ requestConfig.url.includes('v2') ? formatTreeDataSource(x, 1, 8, tableSearchForm) : formatTreeDataSource(x, 1, 6, tableSearchForm);
2880
+ requestConfig.url.includes('v2') ? formatSource(x, 2, 9, tableSearchForm, ['id', 'name']) : formatSource(x, 2, 7, tableSearchForm, ['id', 'name']);
2799
2881
  });
2800
2882
  modalTableProps = _objectSpread2({
2801
2883
  modalTableTitle: '选择SKU',
2802
2884
  tableSearchForm: tableSearchForm,
2803
- tableColumns: [{
2885
+ tableColumns: requestConfig.url.includes('v2') ? [{
2804
2886
  title: 'SKU编码',
2805
2887
  dataIndex: 'skuCode'
2806
2888
  }, {
@@ -2815,12 +2897,39 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2815
2897
  }, {
2816
2898
  title: '所属SPU编码',
2817
2899
  dataIndex: 'itemCode'
2818
- }, {
2900
+ }, requestConfig.url.includes('v2') ? {
2819
2901
  title: '外部编码',
2820
2902
  dataIndex: 'externalCode'
2903
+ } : false, {
2904
+ title: '规格',
2905
+ dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec'
2906
+ }, {
2907
+ title: '类目',
2908
+ dataIndex: 'categoryName'
2909
+ }, {
2910
+ title: '品类',
2911
+ dataIndex: 'className'
2912
+ }, {
2913
+ title: '品牌',
2914
+ dataIndex: 'brandName'
2915
+ }] : [{
2916
+ title: 'SKU编码',
2917
+ dataIndex: 'skuCode'
2918
+ }, {
2919
+ title: 'SKU名称',
2920
+ dataIndex: 'name'
2921
+ }, {
2922
+ title: '国际条码',
2923
+ dataIndex: 'barCode'
2924
+ }, {
2925
+ title: '所属SPU名称',
2926
+ dataIndex: 'itemName'
2927
+ }, {
2928
+ title: '所属SPU编码',
2929
+ dataIndex: 'itemCode'
2821
2930
  }, {
2822
2931
  title: '规格',
2823
- dataIndex: 'propertyNameAndValue'
2932
+ dataIndex: 'skuSpec'
2824
2933
  }, {
2825
2934
  title: '类目',
2826
2935
  dataIndex: 'categoryName'
package/dist/index.js CHANGED
@@ -2694,7 +2694,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2694
2694
  },
2695
2695
  sourceName: 'skuCode'
2696
2696
  }, requestConfigProp);
2697
- tableSearchForm = [requestConfig.url.includes('v2') ? {
2697
+ tableSearchForm = requestConfig.url.includes('v2') ? [requestConfig.url.includes('v2') ? {
2698
2698
  name: 'qp-skuName-like',
2699
2699
  label: 'SKU名称'
2700
2700
  } : {
@@ -2703,19 +2703,22 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2703
2703
  }, {
2704
2704
  name: 'qp-skuCode-like',
2705
2705
  label: 'SKU编码'
2706
- }, {
2706
+ }, requestConfig.url.includes('v2') ? {
2707
2707
  name: 'qp-code-like',
2708
2708
  label: '国际条码'
2709
+ } : {
2710
+ name: 'qp-barCode-like',
2711
+ label: '国际条码'
2709
2712
  }, {
2710
2713
  name: 'qp-itemName-like',
2711
2714
  label: '所属SPU名称'
2712
2715
  }, {
2713
2716
  name: 'qp-itemCode-like',
2714
2717
  label: '所属SPU编码'
2715
- }, {
2718
+ }, requestConfig.url.includes('v2') ? {
2716
2719
  name: 'qp-externalCode-like',
2717
2720
  label: '外部编码'
2718
- }, {
2721
+ } : null, requestConfig.url.includes('v2') ? {
2719
2722
  name: 'qp-propertyValueCode-in',
2720
2723
  type: 'businessSearchSelect',
2721
2724
  label: '规格',
@@ -2729,6 +2732,85 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2729
2732
  }
2730
2733
  }
2731
2734
  }
2735
+ } : null, {
2736
+ name: 'qp-brandId-in',
2737
+ type: 'select',
2738
+ label: '品牌',
2739
+ field: {
2740
+ type: 'select',
2741
+ props: {
2742
+ mode: 'multiple',
2743
+ notFoundContent: '暂无数据',
2744
+ allowClear: true,
2745
+ showSearch: true,
2746
+ showArrow: true,
2747
+ maxTagCount: 1,
2748
+ optionFilterProp: 'children',
2749
+ filterOption: function filterOption(input, option) {
2750
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
2751
+ }
2752
+ }
2753
+ }
2754
+ }, {
2755
+ name: 'qp-categoryId-in',
2756
+ type: 'treeSelect',
2757
+ label: '类目',
2758
+ field: {
2759
+ type: 'treeSelect',
2760
+ props: {
2761
+ treeData: [],
2762
+ treeCheckable: true,
2763
+ showSearch: true,
2764
+ allowClear: true,
2765
+ showArrow: true,
2766
+ treeNodeFilterProp: 'title',
2767
+ treeDefaultExpandAll: true,
2768
+ maxTagCount: 1,
2769
+ placeholder: '请选择',
2770
+ style: {
2771
+ width: '100%'
2772
+ },
2773
+ dropdownStyle: {
2774
+ maxHeight: 400,
2775
+ maxWidth: 100,
2776
+ overflow: 'auto'
2777
+ }
2778
+ }
2779
+ }
2780
+ }, {
2781
+ name: 'qp-classId-in',
2782
+ type: 'select',
2783
+ label: '品类',
2784
+ field: {
2785
+ type: 'select',
2786
+ props: {
2787
+ mode: 'multiple',
2788
+ notFoundContent: '暂无数据',
2789
+ allowClear: true,
2790
+ showSearch: true,
2791
+ showArrow: true,
2792
+ maxTagCount: 1,
2793
+ optionFilterProp: 'children',
2794
+ filterOption: function filterOption(input, option) {
2795
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
2796
+ }
2797
+ }
2798
+ }
2799
+ }] : [{
2800
+ name: 'qp-name-like',
2801
+ label: 'SKU名称'
2802
+ }, {
2803
+ name: 'qp-skuCode-like',
2804
+ label: 'SKU编码'
2805
+ }, {
2806
+ name: 'qp-barCode-like',
2807
+ label: '国际条码'
2808
+ }, {
2809
+ name: 'qp-itemName-like',
2810
+ label: '所属SPU名称'
2811
+ }, {
2812
+ name: 'qp-itemCode-like',
2813
+ label: '所属SPU编码'
2732
2814
  }, {
2733
2815
  name: 'qp-brandId-in',
2734
2816
  type: 'select',
@@ -2804,14 +2886,14 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2804
2886
  pageSize: 5000,
2805
2887
  currentPage: 1
2806
2888
  })]).then(function (x) {
2807
- formatSource(x, 0, 7, tableSearchForm, ['id', 'name']);
2808
- formatTreeDataSource(x, 1, 8, tableSearchForm);
2809
- formatSource(x, 2, 9, tableSearchForm, ['id', 'name']);
2889
+ requestConfig.url.includes('v2') ? formatSource(x, 0, 7, tableSearchForm, ['id', 'name']) : formatSource(x, 0, 5, tableSearchForm, ['id', 'name']);
2890
+ requestConfig.url.includes('v2') ? formatTreeDataSource(x, 1, 8, tableSearchForm) : formatTreeDataSource(x, 1, 6, tableSearchForm);
2891
+ requestConfig.url.includes('v2') ? formatSource(x, 2, 9, tableSearchForm, ['id', 'name']) : formatSource(x, 2, 7, tableSearchForm, ['id', 'name']);
2810
2892
  });
2811
2893
  modalTableProps = _objectSpread2({
2812
2894
  modalTableTitle: '选择SKU',
2813
2895
  tableSearchForm: tableSearchForm,
2814
- tableColumns: [{
2896
+ tableColumns: requestConfig.url.includes('v2') ? [{
2815
2897
  title: 'SKU编码',
2816
2898
  dataIndex: 'skuCode'
2817
2899
  }, {
@@ -2826,12 +2908,39 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
2826
2908
  }, {
2827
2909
  title: '所属SPU编码',
2828
2910
  dataIndex: 'itemCode'
2829
- }, {
2911
+ }, requestConfig.url.includes('v2') ? {
2830
2912
  title: '外部编码',
2831
2913
  dataIndex: 'externalCode'
2914
+ } : false, {
2915
+ title: '规格',
2916
+ dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec'
2917
+ }, {
2918
+ title: '类目',
2919
+ dataIndex: 'categoryName'
2920
+ }, {
2921
+ title: '品类',
2922
+ dataIndex: 'className'
2923
+ }, {
2924
+ title: '品牌',
2925
+ dataIndex: 'brandName'
2926
+ }] : [{
2927
+ title: 'SKU编码',
2928
+ dataIndex: 'skuCode'
2929
+ }, {
2930
+ title: 'SKU名称',
2931
+ dataIndex: 'name'
2932
+ }, {
2933
+ title: '国际条码',
2934
+ dataIndex: 'barCode'
2935
+ }, {
2936
+ title: '所属SPU名称',
2937
+ dataIndex: 'itemName'
2938
+ }, {
2939
+ title: '所属SPU编码',
2940
+ dataIndex: 'itemCode'
2832
2941
  }, {
2833
2942
  title: '规格',
2834
- dataIndex: 'propertyNameAndValue'
2943
+ dataIndex: 'skuSpec'
2835
2944
  }, {
2836
2945
  title: '类目',
2837
2946
  dataIndex: 'categoryName'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "1.1.36",
3
+ "version": "1.1.37",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -177,14 +177,14 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
177
177
  sourceName: 'skuCode',
178
178
  ...requestConfigProp,
179
179
  }
180
- tableSearchForm = [
180
+ tableSearchForm = requestConfig.url.includes('v2') ? [
181
181
  requestConfig.url.includes('v2') ? { name: 'qp-skuName-like', label: 'SKU名称' } : { name: 'qp-name-like', label: 'SKU名称' },
182
182
  { name: 'qp-skuCode-like', label: 'SKU编码' },
183
- { name: 'qp-code-like', label: '国际条码' },
183
+ requestConfig.url.includes('v2') ? { name: 'qp-code-like', label: '国际条码' } : { name: 'qp-barCode-like', label: '国际条码'},
184
184
  { name: 'qp-itemName-like', label: '所属SPU名称' },
185
185
  { name: 'qp-itemCode-like', label: '所属SPU编码' },
186
- { name: 'qp-externalCode-like', label: '外部编码' },
187
- { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
186
+ requestConfig.url.includes('v2') ?{ name: 'qp-externalCode-like', label: '外部编码' } : null,
187
+ requestConfig.url.includes('v2') ? { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
188
188
  type: 'businessSearchSelect',
189
189
  props: {
190
190
  selectBusinessType: 'skuPropertyValue',
@@ -194,7 +194,59 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
194
194
  }
195
195
  },
196
196
  }
197
- },
197
+ } : null,
198
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
199
+ type: 'select',
200
+ props: {
201
+ mode: 'multiple',
202
+ notFoundContent: '暂无数据',
203
+ allowClear: true,
204
+ showSearch: true,
205
+ showArrow: true,
206
+ maxTagCount: 1,
207
+ optionFilterProp: 'children',
208
+ filterOption: (input: string, option: { props: { children: string } }) =>
209
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
210
+ },
211
+ } },
212
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
213
+ type: 'treeSelect',
214
+ props: {
215
+ treeData: [],
216
+ treeCheckable: true,
217
+ showSearch: true,
218
+ allowClear: true,
219
+ showArrow: true,
220
+ treeNodeFilterProp: 'title',
221
+ treeDefaultExpandAll: true,
222
+ maxTagCount: 1,
223
+ placeholder: '请选择',
224
+ style: {
225
+ width: '100%',
226
+ },
227
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
228
+ },
229
+ } },
230
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
231
+ type: 'select',
232
+ props: {
233
+ mode: 'multiple',
234
+ notFoundContent: '暂无数据',
235
+ allowClear: true,
236
+ showSearch: true,
237
+ showArrow: true,
238
+ maxTagCount: 1,
239
+ optionFilterProp: 'children',
240
+ filterOption: (input: string, option: { props: { children: string } }) =>
241
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
242
+ },
243
+ } },
244
+ ] : [
245
+ { name: 'qp-name-like', label: 'SKU名称' },
246
+ { name: 'qp-skuCode-like', label: 'SKU编码' },
247
+ { name: 'qp-barCode-like', label: '国际条码'},
248
+ { name: 'qp-itemName-like', label: '所属SPU名称' },
249
+ { name: 'qp-itemCode-like', label: '所属SPU编码' },
198
250
  { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
199
251
  type: 'select',
200
252
  props: {
@@ -256,14 +308,14 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
256
308
  currentPage: 1,
257
309
  }),
258
310
  ]).then((x: any)=>{
259
- formatSource(x,0, 7, tableSearchForm,['id','name']);
260
- formatTreeDataSource(x,1, 8, tableSearchForm);
261
- formatSource(x,2, 9, tableSearchForm,['id','name']);
311
+ requestConfig.url.includes('v2') ? formatSource(x,0, 7, tableSearchForm,['id','name']) : formatSource(x,0, 5, tableSearchForm,['id','name'])
312
+ requestConfig.url.includes('v2') ? formatTreeDataSource(x,1, 8, tableSearchForm) : formatTreeDataSource(x,1, 6, tableSearchForm)
313
+ requestConfig.url.includes('v2') ? formatSource(x,2, 9, tableSearchForm,['id','name']) : formatSource(x,2, 7, tableSearchForm,['id','name'])
262
314
  })
263
315
  modalTableProps = {
264
316
  modalTableTitle: '选择SKU',
265
317
  tableSearchForm,
266
- tableColumns: [
318
+ tableColumns: requestConfig.url.includes('v2') ? [
267
319
  {
268
320
  title: 'SKU编码',
269
321
  dataIndex: 'skuCode',
@@ -284,13 +336,50 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
284
336
  title: '所属SPU编码',
285
337
  dataIndex: 'itemCode',
286
338
  },
287
- {
339
+ requestConfig.url.includes('v2') ? {
288
340
  title: '外部编码',
289
341
  dataIndex: 'externalCode',
342
+ } : false,
343
+ {
344
+ title: '规格',
345
+ dataIndex: requestConfig.url.includes('v2') ? 'propertyNameAndValue' : 'skuSpec',
346
+ },
347
+ {
348
+ title: '类目',
349
+ dataIndex: 'categoryName',
350
+ },
351
+ {
352
+ title: '品类',
353
+ dataIndex: 'className',
354
+ },
355
+ {
356
+ title: '品牌',
357
+ dataIndex: 'brandName',
358
+ },
359
+ ] : [
360
+ {
361
+ title: 'SKU编码',
362
+ dataIndex: 'skuCode',
363
+ },
364
+ {
365
+ title: 'SKU名称',
366
+ dataIndex: 'name',
367
+ },
368
+ {
369
+ title: '国际条码',
370
+ dataIndex: 'barCode',
371
+ },
372
+ {
373
+ title: '所属SPU名称',
374
+ dataIndex: 'itemName',
375
+ },
376
+ {
377
+ title: '所属SPU编码',
378
+ dataIndex: 'itemCode',
290
379
  },
291
380
  {
292
381
  title: '规格',
293
- dataIndex: 'propertyNameAndValue',
382
+ dataIndex: 'skuSpec',
294
383
  },
295
384
  {
296
385
  title: '类目',