@bit-sun/business-component 4.0.13-alpha.8 → 4.2.0-alpha.0

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.
Files changed (62) hide show
  1. package/.umirc.ts +21 -10
  2. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +5 -2
  3. package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -0
  4. package/dist/components/Business/ItemPropertySelector/index.d.ts +3 -0
  5. package/dist/components/Business/ModalUtils/index.d.ts +8 -0
  6. package/dist/components/Business/SearchSelect/utils.d.ts +4 -2
  7. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +3 -2
  8. package/dist/components/Business/columnSettingTable/index.d.ts +19 -2
  9. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +20 -3
  10. package/dist/components/Functional/DataValidation/index.d.ts +11 -1
  11. package/dist/components/Functional/SearchSelect/utils.d.ts +2 -1
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.esm.js +1998 -885
  14. package/dist/index.js +1998 -884
  15. package/package.json +9 -7
  16. package/src/assets/btn-cancel.svg +3 -0
  17. package/src/assets/btn-copy.svg +3 -0
  18. package/src/assets/btn-delete.svg +2 -29
  19. package/src/assets/btn-edit.svg +2 -19
  20. package/src/assets/btn-hangUp.svg +3 -0
  21. package/src/assets/btn-print.svg +3 -0
  22. package/src/assets/btn-refresh.svg +3 -0
  23. package/src/assets/btn-unhook.svg +3 -0
  24. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +4 -3
  25. package/src/components/Business/BsSulaQueryTable/index.less +5 -3
  26. package/src/components/Business/BsSulaQueryTable/index.md +45 -32
  27. package/src/components/Business/BsSulaQueryTable/index.tsx +153 -76
  28. package/src/components/Business/BsSulaQueryTable/setting.tsx +40 -10
  29. package/src/components/Business/BsSulaQueryTable/utils.tsx +15 -12
  30. package/src/components/Business/CommodityEntry/index.md +1 -1
  31. package/src/components/Business/CommodityEntry/index.tsx +11 -9
  32. package/src/components/Business/DetailPageWrapper/index.less +1 -1
  33. package/src/components/Business/DetailPageWrapper/index.tsx +24 -5
  34. package/src/components/Business/DetailPageWrapper/utils.tsx +7 -2
  35. package/src/components/Business/HomePageWrapper/index.less +1 -1
  36. package/src/components/Business/ItemPropertySelector/index.tsx +88 -0
  37. package/src/components/Business/JsonQueryTable/function.ts +1 -1
  38. package/src/components/Business/ModalUtils/index.tsx +45 -0
  39. package/src/components/Business/SearchSelect/BusinessUtils.tsx +284 -57
  40. package/src/components/Business/SearchSelect/index.md +4 -4
  41. package/src/components/Business/SearchSelect/utils.ts +26 -4
  42. package/src/components/Business/columnSettingTable/columnSetting.tsx +27 -11
  43. package/src/components/Business/columnSettingTable/index.less +5 -3
  44. package/src/components/Business/columnSettingTable/index.md +200 -136
  45. package/src/components/Business/columnSettingTable/index.tsx +167 -39
  46. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +178 -47
  47. package/src/components/Functional/AddSelect/index.tsx +19 -9
  48. package/src/components/Functional/BillEntry/index.less +3 -0
  49. package/src/components/Functional/DataValidation/index.md +1 -0
  50. package/src/components/Functional/DataValidation/index.tsx +138 -23
  51. package/src/components/Functional/QueryMutipleSelect/index.tsx +2 -1
  52. package/src/components/Functional/SearchSelect/index.less +4 -0
  53. package/src/components/Functional/SearchSelect/index.tsx +61 -20
  54. package/src/components/Functional/SearchSelect/utils.tsx +13 -10
  55. package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
  56. package/src/components/Solution/RuleComponent/index.js +59 -1
  57. package/src/components/Solution/RuleComponent/ruleFiled.js +1 -1
  58. package/src/index.ts +1 -0
  59. package/src/plugin/TableColumnSetting/index.less +5 -3
  60. package/src/plugin/TableColumnSetting/index.tsx +4 -3
  61. package/src/styles/bsDefault.less +9 -3
  62. package/src/utils/request.ts +8 -4
@@ -150,7 +150,7 @@ export default () => {
150
150
  // },
151
151
  // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
152
152
  selectProps,
153
- selectBusinessType: 'skuCommodity',
153
+ selectBusinessType: 'shopFile2',
154
154
  };
155
155
 
156
156
  const onTabChange = (key) => {
@@ -297,7 +297,7 @@ import {BusinessSearchSelect} from '../../../index.ts';
297
297
  const { TabPane } = Tabs;
298
298
  export default () => {
299
299
  const selectProps = {
300
- // mode: 'multiple',
300
+ mode: 'multiple',
301
301
  // maxTagCount: 1,
302
302
  // disabled: true
303
303
  }
@@ -317,7 +317,7 @@ export default () => {
317
317
  },
318
318
  // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
319
319
  selectProps,
320
- selectBusinessType: 'spuCommodity',
320
+ selectBusinessType: 'spuCommodityWithProperty',
321
321
  };
322
322
 
323
323
  const onTabChange = (key) => {
@@ -520,7 +520,7 @@ export default () => {
520
520
  // needStatusSearch: true
521
521
  // },
522
522
  selectProps,
523
- selectBusinessType: 'brand',
523
+ selectBusinessType: 'realWarehouse',
524
524
  };
525
525
 
526
526
  const onTabChange = (key) => {
@@ -1,5 +1,6 @@
1
1
  import request from '@/utils/request';
2
2
  import { message } from 'antd';
3
+ import { uniqBy } from 'lodash';
3
4
  import { stringify } from 'querystring';
4
5
  import ENUM from '@/utils/enumConfig';
5
6
  import { judgeIsRequestError } from '@/utils/requestUtils';
@@ -55,10 +56,11 @@ const getDictionaryTextByValue = (dicCode: string, value: string | number) => {
55
56
  return dicItemArray[0].text;
56
57
  };
57
58
 
58
- const loadSelectSource = (url: string, params?: any) => {
59
+ const loadSelectSource = (url: string, params?: any,options?:any) => {
60
+ const realOptions = options || {};
59
61
  return new Promise((resolve, reject) => {
60
62
  request
61
- .get(`${url}?${stringify(params)}`)
63
+ .get(`${url}?${stringify(params)}`, realOptions)
62
64
  .then((result: any) => {
63
65
  result = result.data;
64
66
  if (judgeIsRequestError(result)) {
@@ -79,7 +81,7 @@ const handleDefaultPrefixUrl = (type: string) => {
79
81
  case 'supplier2': case 'customer2': case 'shopFile2': case 'platCompany': case 'market-channel':
80
82
  result = '/channel-manage';
81
83
  break;
82
- case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity': case 'skcCommodity': case 'brand':
84
+ case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity': case 'skcCommodity': case 'brand': case 'spuCommodityWithProperty':
83
85
  result = '/items';
84
86
  break;
85
87
  case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse': case 'ownerWarehouse':
@@ -125,4 +127,24 @@ const getFieldIndex = (tableSearchForm: any, name: string) =>{
125
127
  return tableSearchForm.findIndex((i: any) => i.name.includes(name));
126
128
  }
127
129
 
128
- export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl, handleHiddenFields, handleHiddenFieldsRequest, getFieldIndex }
130
+ // 获取选择器-弹窗中-下拉框查询接口-头部的请求头
131
+ const getQueryHeadersList = (params: any) => {
132
+ const { defaultQSHL = [], querySelectHeadersList = [], extralHeaders = {} } = params;
133
+
134
+ const realQSHL = uniqBy([...querySelectHeadersList, ...defaultQSHL],'queryKey')||[]; // 去重,保留最先出现的元素,故defaultQSHL需要放在后面
135
+
136
+
137
+ let result: any = {};
138
+ realQSHL.forEach((item: any) => {
139
+ const { queryKey, isOpen, extralHeaders:QSH } = item;
140
+ if (isOpen && queryKey) {
141
+ result[queryKey] = { headers: { ...extralHeaders, ...(QSH || {}) } };
142
+ }
143
+ });
144
+
145
+ return result;
146
+ }
147
+
148
+ const getQueryHeadersItem = (queryHeaders: any, queryKey: any) => queryHeaders?.[queryKey] || {};
149
+
150
+ export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl, handleHiddenFields, handleHiddenFieldsRequest, getFieldIndex, getQueryHeadersList, getQueryHeadersItem }
@@ -67,9 +67,10 @@ class SortableTable extends React.Component<SortTableProps> {
67
67
  onSearchSort: false,
68
68
  };
69
69
 
70
- patchUserColumnConfig = (config: any) => {
70
+ patchUserColumnConfig = (config: any, tableCodes: any) => {
71
71
  const { tableCode, appRequestConfig }: any = this.props;
72
- if (!tableCode) return;
72
+ const newTableCode = tableCodes || tableCode;
73
+ if (!newTableCode) return;
73
74
  let configvalue = config ? config.map((item:any) => ({
74
75
  key: item.key || item.dataIndex,
75
76
  dataIndex: item.dataIndex || item.key,
@@ -82,21 +83,22 @@ class SortableTable extends React.Component<SortTableProps> {
82
83
  url: handleRequestUrl('/user','/appConfig/saveUserOrder',appRequestConfig),
83
84
  method:'POST',
84
85
  data: {
85
- "code": tableCode,
86
+ "code": newTableCode,
86
87
  "detail": configvalue ? JSON.stringify(configvalue) : ''
87
88
  },
88
89
  }).then((res:any) => {
89
90
  if (judgeIsRequestSuccess(res?.data)) {
90
- this.patchConfigToLocalstorage(configvalue, tableCode)
91
+ this.patchConfigToLocalstorage(configvalue, newTableCode, config)
91
92
  } else {
92
93
  message.error('保存表头列自定义失败,请稍后尝试');
93
94
  }
94
95
  })
95
96
  }
96
97
 
97
- patchConfigToLocalstorage = (configvalue:any, tableCode:string) => {
98
+ patchConfigToLocalstorage = (configvalue:any, tableCode:string, newDataSource: any) => {
98
99
  const { setShowColumns, datasource = [] }: any = this.props;
99
100
  const { sortDataSource } = this.state;
101
+ const sourceList = newDataSource || sortDataSource;
100
102
  let config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]'
101
103
  let configArray = JSON.parse(config)
102
104
  let currentSetting = configArray.filter((item:any) => item.code === tableCode)
@@ -114,7 +116,7 @@ class SortableTable extends React.Component<SortTableProps> {
114
116
  visible: false,
115
117
  });
116
118
  if (configvalue) {
117
- setShowColumns([...sortDataSource]);
119
+ setShowColumns([...sourceList]);
118
120
  } else {
119
121
  this.setState({
120
122
  dataSource: [
@@ -175,15 +177,28 @@ class SortableTable extends React.Component<SortTableProps> {
175
177
  return preKeyStr !== nextKeyStr;
176
178
  }
177
179
 
180
+ // 提取逻辑到单独的方法
181
+ validateLocalStorageConfig = (datasource: any, tableCode: string) => {
182
+ let config = localStorage.getItem(ENUM.BROWSER_CACHE.COLUMN_CONDITION) || '[]';
183
+ let configArray = JSON.parse(config);
184
+ let currentSetting = configArray.filter((item:any) => item.code === tableCode);
185
+ let configvalue = currentSetting?.[0]?.detail ? JSON.parse(currentSetting[0].detail) : [];
186
+ if (currentSetting.length === 0 || configvalue.length === 0 ) {
187
+ this.patchUserColumnConfig(datasource || [], tableCode);
188
+ }
189
+ }
190
+
178
191
  componentWillReceiveProps(nextProps: any) {
179
192
  if (this.isColumnsChange(this.props?.datasource, nextProps?.datasource)) {
180
193
  this.setInitValue(nextProps?.datasource || []);
194
+ this.validateLocalStorageConfig(nextProps?.datasource, nextProps?.tableCode);
181
195
  }
182
196
  }
183
197
 
184
198
  componentDidMount() {
185
- const { datasource = [] }: any = this.props;
199
+ const { datasource = [], tableCode }: any = this.props;
186
200
  this.setInitValue(datasource);
201
+ this.validateLocalStorageConfig(datasource, tableCode);
187
202
  }
188
203
 
189
204
  columns = [
@@ -415,7 +430,7 @@ class SortableTable extends React.Component<SortTableProps> {
415
430
  visible: false,
416
431
  });
417
432
  setShowColumns([...sortDataSource]);
418
- this.patchUserColumnConfig(sortDataSource)
433
+ this.patchUserColumnConfig(sortDataSource, null)
419
434
  };
420
435
 
421
436
  handleCancel = (e: React.MouseEvent<HTMLElement>) => {
@@ -476,7 +491,7 @@ class SortableTable extends React.Component<SortTableProps> {
476
491
  DraggableContainer = (props: any) => (
477
492
  <SortableBody
478
493
  useDragHandle
479
- disableAutoscroll
494
+ lockAxis='y'
480
495
  helperClass="row-dragging"
481
496
  onSortEnd={this.onSortEnd}
482
497
  {...props}
@@ -487,9 +502,9 @@ class SortableTable extends React.Component<SortTableProps> {
487
502
  const { sortDataSource } = this.state;
488
503
  // function findIndex base on Table rowKey props and should always be a right array index
489
504
  const index = sortDataSource.findIndex(
490
- (x:any) => x.key === restProps['data-row-key'],
505
+ (x) => (x.key||x.dataIndex) == restProps['data-row-key'],
491
506
  );
492
- return <SortableItem index={index} {...restProps} />;
507
+ return <SortableItem key={restProps['data-row-key']} index={index} {...restProps} />;
493
508
  };
494
509
 
495
510
  onChange = (e: any, title: any) => {
@@ -854,6 +869,7 @@ class SortableTable extends React.Component<SortTableProps> {
854
869
  row: this.DraggableBodyRow,
855
870
  },
856
871
  }}
872
+ scroll={{ y: 364 }}
857
873
  />
858
874
  </div>
859
875
  </div>
@@ -151,16 +151,18 @@
151
151
  }
152
152
  }
153
153
 
154
- .ant-table-wrapper::-webkit-scrollbar {
154
+ .ant-table-tbody::-webkit-scrollbar {
155
155
  display: none;
156
156
  }
157
157
 
158
158
  .ant-table-wrapper {
159
159
  margin-top: 10px;
160
- height: 364px;
161
- overflow: scroll;
162
160
  padding-bottom: 50px;
163
161
 
162
+ tbody tr:first-child {
163
+ display: none;
164
+ }
165
+
164
166
  tr {
165
167
  height: 30px;
166
168
  td {
@@ -36,6 +36,7 @@ export default () => {
36
36
  ellipsis: {
37
37
  showTitle: false,
38
38
  },
39
+ showTotal: true,
39
40
  },
40
41
  {
41
42
  dataIndex: 'spuCode',
@@ -111,7 +112,7 @@ export default () => {
111
112
  x: '100%',
112
113
  },
113
114
  rowKey: 'id',
114
- dataSource: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
115
+ dataSource: [{"id": 1},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
115
116
  pagination: {
116
117
  showTotal: (total: any) => `共 ${total} 条`,
117
118
  showQuickJumper: true,
@@ -182,113 +183,182 @@ export default () => {
182
183
  ## sula列设置表格
183
184
 
184
185
  ```tsx
185
- import React, { useState } from 'react';
186
+ import React, { useState, Fragment, } from 'react';
187
+ import { Segmented } from 'antd';
186
188
  import { SulaColumnSettingTable } from '../../../index.ts';
187
189
 
188
190
  export default () => {
189
191
  const settingTableRef = React.useRef(null);
190
- const columns = [
191
- {
192
- dataIndex: 'lineNo',
193
- title: '行号',
194
- width: 80,
195
- fixed: 'left',
196
- ellipsis: {
197
- showTitle: false,
198
- },
199
- },
200
- {
201
- dataIndex: 'skuName',
202
- title: '商品名称',
203
- fixed: 'left',
204
- ellipsis: {
205
- showTitle: false,
206
- },
207
- },
208
- {
209
- dataIndex: 'spuCode',
210
- title: '商品代码',
211
- fixed: 'left',
212
- ellipsis: {
213
- showTitle: true,
214
- },
215
- },
216
- {
217
- dataIndex: 'skuCode',
218
- title: 'SKU',
219
- fixed: 'left',
220
- ellipsis: {
221
- showTitle: true,
222
- },
223
- },
224
- {
225
- dataIndex: 'skuSpec',
226
- title: '商品规格',
227
- ellipsis: {
228
- showTitle: false,
229
- },
230
- },
231
- {
232
- dataIndex: 'barCode',
233
- title: '条码',
234
- ellipsis: {
235
- showTitle: false,
236
- },
237
- },
238
- {
239
- dataIndex: 'executeAmount',
240
- title: '可执行数量',
241
- },
242
- {
243
- dataIndex: 'planAmount',
244
- title: '数量',
245
- ellipsis: {
246
- showTitle: false,
247
- },
248
- },
249
- {
250
- dataIndex: 'baseUnitCode',
251
- title: '单位',
252
- ellipsis: {
253
- showTitle: false,
254
- },
255
- },
256
- {
257
- dataIndex: 'completeAmount',
258
- title: '累计入库数量',
259
- },
260
- {
261
- dataIndex: 'reverseNumber',
262
- title: '累计退货数量',
263
- },
264
- {
265
- dataIndex: 'taxRate',
266
- title: '税率',
267
- },
268
- {
269
- dataIndex: 'taxAmount',
270
- title: '税额',
271
- },
272
- {
273
- dataIndex: 'standardPrice',
274
- title: '标准单价',
275
- },
276
- {
277
- key: 'createUserName',
278
- title: '操作人',
279
- },
280
- {
281
- key: 'remark',
282
- title: '备注',
283
- textOverflow: true,
192
+ const [inputModel, setInputModel] = useState('整款模式'); // 录入模式
193
+
194
+ const skuDetailColumns = [
195
+ {
196
+ title: '商品编码',
197
+ dataIndex: 'itemCode',
198
+ key: 'itemCode',
199
+ width: 120,
200
+ },
201
+ {
202
+ title: '商品名称',
203
+ dataIndex: 'itemName',
204
+ key: 'itemName',
205
+ width: 80,
206
+ },
207
+ {
208
+ key: 'skuCode',
209
+ dataIndex: 'skuCode',
210
+ title: 'SKU',
211
+ width: 160,
212
+ ellipsis: {
213
+ showTitle: false,
284
214
  },
285
- {
286
- key: 'operator',
287
- title: '操作',
288
- isPermissionColumn: true,
289
- fixed: 'right',
290
- }
291
- ]
215
+ },
216
+ {
217
+ title: '图片',
218
+ dataIndex: ['mediaList', '0', 'url'],
219
+ images: true,
220
+ width: 60,
221
+ },
222
+ { title: '颜色', dataIndex: 'colorName', key: 'colorName', width: 100 },
223
+ { title: '尺码', dataIndex: 'sizeName', key: 'sizeName', width: 60 },
224
+ {
225
+ key: 'unitCode',
226
+ dataIndex: 'unitCode',
227
+ title: '单位',
228
+ width: 60
229
+ },
230
+ // ...showPropertyList,
231
+ {
232
+ key: 'salemanName',
233
+ dataIndex: 'salemanName',
234
+ title: '导购',
235
+ width: 120,
236
+ },
237
+ {
238
+ key: 'quantity',
239
+ dataIndex: 'quantity',
240
+ title: '数量',
241
+ align: 'right',
242
+ width: 70,
243
+ },
244
+ {
245
+ key: 'labelPrice',
246
+ dataIndex: 'labelPrice',
247
+ title: '吊牌价',
248
+ align: 'right',
249
+ width: 70,
250
+ },
251
+ {
252
+ key: 'money',
253
+ dataIndex: 'money',
254
+ title: '吊牌金额',
255
+ align: 'right',
256
+ width: 70,
257
+ },
258
+ {
259
+ key: 'realUnitPrice',
260
+ dataIndex: 'realUnitPrice',
261
+ title: '实际售价',
262
+ align: 'right',
263
+ width: 70,
264
+ },
265
+ {
266
+ key: 'discountRate',
267
+ dataIndex: 'discountRate',
268
+ title: '折扣率(%)',
269
+ align: 'right',
270
+ width: 100,
271
+ },
272
+ {
273
+ key: 'receivableMoney',
274
+ dataIndex: 'receivableMoney',
275
+ title: '实收金额',
276
+ align: 'right',
277
+ width: 100,
278
+ },
279
+ {
280
+ key: 'discountUnitPrice',
281
+ dataIndex: 'discountUnitPrice',
282
+ title: '优惠单价',
283
+ align: 'right',
284
+ width: 70,
285
+ },
286
+ {
287
+ key: 'discountMoney',
288
+ dataIndex: 'discountMoney',
289
+ title: '优惠金额',
290
+ align: 'right',
291
+ width: 100,
292
+ },
293
+ {
294
+ key: 'moneyDiffer',
295
+ dataIndex: 'moneyDiffer',
296
+ title: '抹零金额',
297
+ align: 'right',
298
+ width: 70,
299
+ },
300
+
301
+ {
302
+ key: 'discountType',
303
+ dataIndex: 'discountType',
304
+ title: '优惠活动类型',
305
+ width: 120,
306
+ },
307
+ {
308
+ key: 'activityCode',
309
+ dataIndex: 'activityCode',
310
+ title: '活动编号',
311
+ width: 100,
312
+ },
313
+ {
314
+ key: 'column14',
315
+ dataIndex: 'column14',
316
+ title: '已发货数量',
317
+ align: 'right',
318
+ width: 70,
319
+ },
320
+ {
321
+ key: 'retQuantity',
322
+ dataIndex: 'retQuantity',
323
+ title: '已退数量',
324
+ align: 'right',
325
+ width: 70,
326
+ },
327
+ {
328
+ key: 'saleFlg',
329
+ dataIndex: 'saleFlg',
330
+ title: '销售方式',
331
+ width: 70,
332
+ },
333
+ {
334
+ key: 'returnReason',
335
+ dataIndex: 'returnReason',
336
+ title: '退货原因',
337
+ width: 100,
338
+ },
339
+ ];
340
+
341
+ const summary = () => {
342
+ return {
343
+ //diy: true,
344
+ cont: [
345
+ {
346
+ key: 'returnReason',
347
+ value: 0,
348
+ },
349
+ ],
350
+ };
351
+ };
352
+
353
+ // 表格字段控制
354
+ const getTableColumns = (inputModel: string, twoDimensions: string) => {
355
+ if(inputModel == 'SKU模式'){
356
+ return skuDetailColumns;
357
+ }else{
358
+ return [];
359
+ }
360
+ };
361
+
292
362
  const config = {
293
363
  modeType: 'view',
294
364
  rowKey: 'id',
@@ -297,7 +367,7 @@ export default () => {
297
367
  url: 'xxxxxx',
298
368
  converter: ({ data }: any) => {
299
369
  return {
300
- list: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
370
+ list: [{"id": 1},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
301
371
  total: 40
302
372
  };
303
373
  },
@@ -313,37 +383,8 @@ export default () => {
313
383
  },
314
384
  rowSelection: {
315
385
  },
316
- summary: () => {
317
- return {
318
- diy: true,
319
- cont: [
320
- {
321
- key: 'spuCode',
322
- value: 100,
323
- },
324
- {
325
- key: 'skuSpec',
326
- value: 200,
327
- },
328
- {
329
- key: 'executeAmount',
330
- value: 300,
331
- },
332
- {
333
- key: 'completeAmount',
334
- value: 300,
335
- },
336
- {
337
- key: 'taxAmount',
338
- value: 300,
339
- },
340
- {
341
- key: 'standardPrice',
342
- value: 300,
343
- },
344
- ],
345
- }
346
- },
386
+ isSpecial: true,
387
+ summary: summary,
347
388
  dynamicColumns: [
348
389
  {
349
390
  key: 'expectTime',
@@ -355,8 +396,31 @@ export default () => {
355
396
  key: 'price',
356
397
  },
357
398
  ],
358
- columns,
399
+ columns: skuDetailColumns,
400
+ newUpdateSummary: 1,
401
+ isSpecial: true,
359
402
  tableCode: 'uniquecode-1',
403
+ actionsRender: [
404
+ {
405
+ position: 'right',
406
+ type: () => {
407
+ return (
408
+ <Fragment>
409
+ <Segmented
410
+ value={inputModel}
411
+ style={{ marginRight: 22 }}
412
+ onChange={(value: any) => {
413
+ setInputModel(value)
414
+ }}
415
+ options={
416
+ ['整款模式', 'SKU模式']
417
+ }
418
+ />
419
+ </Fragment>
420
+ );
421
+ },
422
+ },
423
+ ]
360
424
  }
361
425
  return (
362
426
  <SulaColumnSettingTable