@bit-sun/business-component 3.0.0-alpha.21 → 3.0.0-alpha.23

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 (117) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +1271 -1236
  9. package/dist/index.js +345 -310
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +82 -82
  18. package/src/assets/arrow_top.svg +17 -17
  19. package/src/assets/caidan.svg +11 -11
  20. package/src/assets/exportFail.svg +37 -37
  21. package/src/assets/exportProcessing.svg +28 -28
  22. package/src/assets/exportSuccess.svg +34 -34
  23. package/src/assets/fixed-left-active.svg +11 -11
  24. package/src/assets/fixed-right-active.svg +11 -11
  25. package/src/components/Business/AddSelectBusiness/index.md +162 -162
  26. package/src/components/Business/AddSelectBusiness/index.tsx +1079 -1079
  27. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  28. package/src/components/Business/BsLayouts/Components/ChooseStore/index.tsx +193 -193
  29. package/src/components/Business/BsLayouts/Components/ChooseStore/services.ts +10 -10
  30. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  31. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  32. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  33. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +163 -163
  34. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  35. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  36. package/src/components/Business/BsLayouts/Components/RightContent/i18n.ts +8 -8
  37. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +172 -172
  38. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  39. package/src/components/Business/BsLayouts/index.tsx +1494 -1494
  40. package/src/components/Business/BsLayouts/service.ts +10 -10
  41. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +566 -566
  42. package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +5 -5
  43. package/src/components/Business/BsSulaQueryTable/index.tsx +729 -729
  44. package/src/components/Business/BsSulaQueryTable/setting.tsx +892 -892
  45. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  46. package/src/components/Business/BsSulaQueryTable/utils.tsx +713 -713
  47. package/src/components/Business/CommodityEntry/index.tsx +3 -2
  48. package/src/components/Business/CommonAlert/index.tsx +23 -23
  49. package/src/components/Business/CommonGuideWrapper/index.less +121 -121
  50. package/src/components/Business/CommonGuideWrapper/index.tsx +94 -94
  51. package/src/components/Business/DetailPageWrapper/index.less +88 -88
  52. package/src/components/Business/DetailPageWrapper/index.tsx +326 -326
  53. package/src/components/Business/DetailPageWrapper/utils.tsx +164 -164
  54. package/src/components/Business/HomePageWrapper/index.less +33 -33
  55. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  56. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +205 -205
  57. package/src/components/Business/JsonQueryTable/components/Formula.tsx +206 -206
  58. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  59. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  60. package/src/components/Business/JsonQueryTable/index.tsx +535 -535
  61. package/src/components/Business/JsonQueryTable/static.ts +450 -450
  62. package/src/components/Business/SearchSelect/{BusinessUtils.ts → BusinessUtils.tsx} +2139 -2076
  63. package/src/components/Business/SearchSelect/common.ts +134 -134
  64. package/src/components/Business/SearchSelect/index.md +1503 -1444
  65. package/src/components/Business/SearchSelect/index.tsx +55 -55
  66. package/src/components/Business/SearchSelect/utils.ts +101 -101
  67. package/src/components/Business/StateFlow/index.less +130 -130
  68. package/src/components/Business/TreeSearchSelect/index.md +185 -185
  69. package/src/components/Business/TreeSearchSelect/index.tsx +33 -33
  70. package/src/components/Business/TreeSearchSelect/utils.ts +104 -104
  71. package/src/components/Business/columnSettingTable/columnSetting.tsx +767 -767
  72. package/src/components/Business/columnSettingTable/index.tsx +235 -235
  73. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +243 -243
  74. package/src/components/Business/columnSettingTable/utils.tsx +70 -70
  75. package/src/components/Business/moreTreeTable/index.md +448 -448
  76. package/src/components/Functional/AddSelect/helps.ts +81 -81
  77. package/src/components/Functional/AddSelect/index.md +155 -155
  78. package/src/components/Functional/AddSelect/index.tsx +1217 -1217
  79. package/src/components/Functional/BillEntry/index.md +39 -39
  80. package/src/components/Functional/BillEntry/index.tsx +773 -773
  81. package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -62
  82. package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -178
  83. package/src/components/Functional/DataImport/index.md +44 -44
  84. package/src/components/Functional/DataImport/index.tsx +696 -696
  85. package/src/components/Functional/DataValidation/index.md +39 -39
  86. package/src/components/Functional/DataValidation/index.tsx +688 -688
  87. package/src/components/Functional/EllipsisTooltip/index.md +30 -30
  88. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  89. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +65 -65
  90. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  91. package/src/components/Functional/QueryMutipleInput/index.tsx +129 -129
  92. package/src/components/Functional/SearchSelect/index.less +121 -121
  93. package/src/components/Functional/SearchSelect/index.md +141 -141
  94. package/src/components/Functional/SearchSelect/index.tsx +1003 -1003
  95. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  96. package/src/components/Functional/TreeSearchSelect/index.tsx +206 -206
  97. package/src/components/Solution/RuleComponent/InnerSelect.tsx +62 -62
  98. package/src/components/Solution/RuleComponent/RenderCompItem.tsx +637 -637
  99. package/src/components/Solution/RuleComponent/index.js +1428 -1428
  100. package/src/components/Solution/RuleComponent/ruleFiled.js +2281 -2281
  101. package/src/components/Solution/RuleComponent/services.ts +13 -13
  102. package/src/components/Solution/RuleComponent/util.js +143 -143
  103. package/src/index.ts +38 -38
  104. package/src/plugin/TableColumnSetting/index.tsx +725 -725
  105. package/src/styles/bsDefault.less +1912 -1912
  106. package/src/utils/CustomLoginInfo.ts +55 -55
  107. package/src/utils/LocalstorageUtils.ts +95 -95
  108. package/src/utils/TableUtils.less +51 -51
  109. package/src/utils/TableUtils.tsx +691 -691
  110. package/src/utils/businessUtils.ts +441 -441
  111. package/src/utils/constant.ts +38 -38
  112. package/src/utils/index.ts +6 -6
  113. package/src/utils/request.ts +53 -53
  114. package/src/utils/requestUtils.ts +193 -193
  115. package/src/utils/utils.ts +238 -238
  116. package/tsconfig.json +29 -29
  117. package/typings.d.ts +4 -4
@@ -1,691 +1,691 @@
1
- import React, { useState } from 'react';
2
- import {
3
- Tooltip,
4
- Badge,
5
- Image,
6
- Space,
7
- Menu,
8
- Dropdown,
9
- Input,
10
- Button,
11
- InputNumber,
12
- Popover,
13
- Card,
14
- Avatar,
15
- } from 'antd';
16
- import moment from 'moment';
17
- import { FORMAT_TIME_STR, FORMAT_DAY_STR } from '@/utils/constant';
18
- import noImg from '@/assets/list-no-img.svg';
19
- import { request } from 'bssula';
20
- import styles from './TableUtils.less';
21
-
22
- import {
23
- CloseSquareOutlined,
24
- CopyOutlined,
25
- DeleteOutlined,
26
- EditOutlined,
27
- EyeOutlined,
28
- SendOutlined,
29
- WarningOutlined,
30
- } from '@ant-design/icons';
31
- type mediaListType = {
32
- type: number,
33
- url: string,
34
- [key: string]: any;
35
- }
36
- type recordType = {
37
- mediaList?: mediaListType;
38
- [key: string]: any;
39
- };
40
- const getSkuImg = (
41
- record: recordType,
42
- ) => {
43
- // 默认取sku图片、当没有设置时取商品图片,商品图片也没有返回空
44
- const ImgList = record.mediaList?.length && record.mediaList.filter((i: any) => i.type == 1) || [] // 获取SKU、SPU图片数组集合
45
- const imgShow = ImgList?.length && ImgList[0].url || null
46
- return imgShow;
47
- };
48
-
49
- const updateGuanDate = (requestParams: any, dateKeyParams: any = {}) => {
50
- return {
51
- type: 'modalForm',
52
- width: 800,
53
- props: {
54
- maskClosable: false,
55
- },
56
- title: '修改单据日期',
57
- mode: 'create', // 新建/编辑/查看
58
- initialValues: (ctx: any) => {
59
- if (!ctx.record) return;
60
- return {
61
- ...ctx.record,
62
- date: dateKeyParams.initDate
63
- ? ctx.record[dateKeyParams.initDate]
64
- : ctx.record.orderDate,
65
- };
66
- },
67
- fields: [
68
- {
69
- name: dateKeyParams.outDate || `date`,
70
- label: '单据日期',
71
- field: {
72
- type: 'datepicker',
73
- props: {
74
- autoSize: true,
75
- placeholder: '请选择',
76
- disabledDate: (currentDate: any) =>
77
- currentDate.valueOf() <
78
- moment().subtract(Number(moment().format('D')), 'days'),
79
- style: { width: '100%' },
80
- format: 'YYYY-MM-DD',
81
- valueFormat: true,
82
- },
83
- },
84
- initialValue: moment().utcOffset(8),
85
- rules: [{ required: true, message: '请选择单据日期' }],
86
- },
87
- ],
88
- submitButtonProps: {
89
- children: '确认',
90
- },
91
- backButtonProps: {
92
- children: '取消',
93
- },
94
- submit: requestParams,
95
- };
96
- };
97
-
98
- const textIcon = (type: string | number, text?: string) => {
99
- if (!type) return;
100
- if (type == 1) {
101
- return (
102
- <a className="cloumnsIconA">
103
- <EyeOutlined />
104
- <span>详情</span>
105
- </a>
106
- );
107
- }
108
- if (type == 2) {
109
- return (
110
- <a className="cloumnsIconA">
111
- <EyeOutlined />
112
- <span>查看</span>
113
- </a>
114
- );
115
- }
116
- if (type == 3) {
117
- return (
118
- <a className="cloumnsIconA">
119
- <DeleteOutlined />
120
- <span>删除</span>
121
- </a>
122
- );
123
- }
124
- if (type == 4) {
125
- return (
126
- <a className="cloumnsIconA">
127
- <EditOutlined />
128
- <span>编辑</span>
129
- </a>
130
- );
131
- }
132
- if (type == 5) {
133
- return (
134
- <a className="cloumnsIconA">
135
- <CopyOutlined />
136
- <span>复制</span>
137
- </a>
138
- );
139
- }
140
- if (type == 6) {
141
- return (
142
- <a className="cloumnsIconA">
143
- <CloseSquareOutlined />
144
- <span>作废</span>
145
- </a>
146
- );
147
- }
148
- if (type == 7) {
149
- return (
150
- <a className="cloumnsIconA">
151
- <WarningOutlined />
152
- <span>终止</span>
153
- </a>
154
- );
155
- }
156
- if (type == 8) {
157
- return (
158
- <a className="cloumnsIconA">
159
- <SendOutlined />
160
- <span>{text}</span>
161
- </a>
162
- );
163
- }
164
- };
165
-
166
- const handleTextDoubleOrId = (
167
- textOne: string | undefined,
168
- textTwo: string | undefined,
169
- ) => {
170
- return (
171
- <>
172
- <div style={{ color: '#000', marginBottom: -8 }}>{textOne}</div>
173
- <span style={{ color: '#848484' }}>ID : {textTwo}</span>
174
- </>
175
- );
176
- };
177
-
178
- const handleTextDouble = (
179
- textOne: string | undefined,
180
- textTwo: string | undefined,
181
- ) => {
182
- return (
183
- <>
184
- <div style={{ marginBottom: -8 }}>{textOne}</div>
185
- <div>{textTwo}</div>
186
- </>
187
- );
188
- };
189
-
190
- const handleTextOverflow = (text: string | undefined, width: number = 130) => {
191
- return (
192
- <Tooltip title={text || '--'}>
193
- <span
194
- style={{
195
- width: width ? width + 'px' : '130px',
196
- display: 'inline-block',
197
- textOverflow: 'ellipsis',
198
- overflow: 'hidden',
199
- whiteSpace: 'nowrap',
200
- position: 'relative',
201
- top: '5px',
202
- }}
203
- >
204
- {text || '--'}
205
- </span>
206
- </Tooltip>
207
- );
208
- };
209
-
210
- const handleTextLineFeed = (text: string | undefined, width: number = 130) => {
211
- return (
212
- <Tooltip title={text || '--'}>
213
- <span
214
- style={{
215
- width: width ? width + 'px' : '130px',
216
- display: 'inline-block',
217
- position: 'relative',
218
- whiteSpace: 'pre-line',
219
- top: '5px',
220
- }}
221
- >
222
- {text || '--'}
223
- </span>
224
- </Tooltip>
225
- );
226
- };
227
-
228
- const handleTextTooltip = (text: any) => {
229
- return <Tooltip title={text || '--'}>{text || '--'}</Tooltip>;
230
- };
231
-
232
- const handleTextBreakSpaces = (text: any) => {
233
- return (
234
- <Tooltip title={text || '--'}>
235
- <span
236
- style={{
237
- width: '130px',
238
- display: 'inline-block',
239
- textOverflow: 'ellipsis',
240
- overflow: 'hidden',
241
- whiteSpace: 'break-spaces',
242
- position: 'relative',
243
- top: '5px',
244
- }}
245
- >
246
- {text || '--'}
247
- </span>
248
- </Tooltip>
249
- );
250
- };
251
-
252
- const handleStatusBadge = (text: any, color: any) => {
253
- return (
254
- <Badge
255
- style={{
256
- width: '150px',
257
- display: 'inline-block',
258
- textOverflow: 'ellipsis',
259
- overflow: 'hidden',
260
- whiteSpace: 'nowrap',
261
- }}
262
- text={text}
263
- color={color}
264
- />
265
- );
266
- };
267
-
268
- const HandleTotalCount = (totalParams: any) => {
269
- const { total = {}, totalLeft, totalRight } = totalParams;
270
- return (
271
- <div className="total_warp">
272
- <div className="total_warp_left">
273
- {totalLeft.map((d: any) => (
274
- <div>
275
- <span className="total_warp_num">{total[d.value] || 0}</span>
276
- <span className="total_warp_title">{d.key}</span>
277
- </div>
278
- ))}
279
- </div>
280
- <div className="total_warp_right">
281
- {totalRight.map((d: any) => (
282
- <div>
283
- <span className="total_warp_num">{total[d.value] || 0}</span>
284
- <span className="total_warp_title">{d.key}</span>
285
- </div>
286
- ))}
287
- </div>
288
- </div>
289
- );
290
- };
291
-
292
- const handleCommonTimeRender = (text: any, format?: any) => {
293
- const formatType = format || FORMAT_TIME_STR;
294
- return (text && moment(text).format(formatType)) || '--';
295
- };
296
-
297
- const handleCommonTimeRenderHours = (text: any, format?: any) => {
298
- const formatType = format || FORMAT_DAY_STR;
299
- return (text && moment(text).format(formatType)) || '--';
300
- };
301
-
302
- const handleTooltip = (text: any, timeTrue?: boolean) => {
303
- return (
304
- <Tooltip title={timeTrue ? handleCommonTimeRender(text) : text}>
305
- {timeTrue ? handleCommonTimeRender(text) : text}
306
- </Tooltip>
307
- );
308
- };
309
-
310
- const handleTooltipHours = (text: any, timeTrue?: boolean) => {
311
- return (
312
- <Tooltip title={timeTrue ? handleCommonTimeRenderHours(text) : text}>
313
- {timeTrue ? handleCommonTimeRenderHours(text) : text}
314
- </Tooltip>
315
- );
316
- };
317
-
318
- /*
319
- 列表展示缩略图片
320
- url 图片 url
321
- {
322
- width: 图片宽度
323
- height: 图片高度
324
- }
325
- */
326
- type tableColumnsImageType = {
327
- width?: number | string;
328
- height?: number | string;
329
- [key: string]: any;
330
- };
331
- const tableColumnsImage = (url?: string, paramsObj?: tableColumnsImageType) => {
332
- // 测试使用 测试类型缩小 随时可删除 start
333
- const imgHtml = document.querySelector('.ant-image-mask-info')!;
334
- if (imgHtml) {
335
- let str = imgHtml?.innerHTML;
336
- str = str?.replace('预览', '');
337
- imgHtml.innerHTML = str;
338
- }
339
- // 测试使用 测试类型缩小 end
340
-
341
- return (
342
- <>
343
- {url ? (
344
- <div className={`clomnsImg`}>
345
- <Image src={url} width="44px" height="44px" {...paramsObj}></Image>
346
- </div>
347
- ) : (
348
- <img {...paramsObj} src={noImg}></img>
349
- )}
350
- </>
351
- );
352
- };
353
-
354
- interface ColumnsEditInterfave {
355
- text?: string;
356
- record?: any;
357
- type?: string;
358
- reqName: string;
359
- successMessage?: string;
360
- urlPathId?: boolean;
361
- disabled: boolean;
362
- requestProps: {
363
- url: string;
364
- converter?: Function;
365
- method?: string;
366
- };
367
- [key: string]: any;
368
- }
369
- /*
370
- text 当前项
371
- record 当前行
372
- table sula table 的实例
373
- type 默认 input 可选 number 输入框类型
374
- inpProps 输入框透传 props
375
- requestProps {} bssula 的 request
376
- reqName 修改数据传给后端的key
377
- urlPathId 默认 true 会在 requestProps.url 上面 拼接 /:id
378
- successMessage 默认提示操作成功 可传入 string
379
- disabled 什么时候禁用 boolean 类型
380
- */
381
- const ColumnsEdit = (props: ColumnsEditInterfave) => {
382
- const {
383
- text = '',
384
- record,
385
- table,
386
- type = 'input',
387
- inpProps = {},
388
- requestProps = {
389
- url: '',
390
- },
391
- reqName,
392
- urlPathId = true,
393
- successMessage = '操作成功',
394
- disabled,
395
- }: ColumnsEditInterfave = props;
396
- const [visible, setvisible] = useState(false);
397
- const [inputValue, setInputValue]: [
398
- inputValue: string | number,
399
- setInputValue: Function,
400
- ] = useState(text);
401
-
402
- const onSubmit = () => {
403
- const url = urlPathId
404
- ? requestProps.url + `/${record.id}`
405
- : requestProps.url;
406
- request({
407
- url: url,
408
- method: requestProps.method || 'patch',
409
- convertParams: () => {
410
- return {
411
- ...record,
412
- [reqName]: inputValue,
413
- };
414
- },
415
- successMessage,
416
- converter(ctx: any) {
417
- if (
418
- requestProps.converter &&
419
- typeof requestProps.converter === 'function'
420
- ) {
421
- requestProps.converter(ctx);
422
- return;
423
- }
424
- setvisible(false);
425
- table.resetTable();
426
- },
427
- });
428
- };
429
-
430
- const menu = (
431
- <Menu>
432
- <Menu.Item>
433
- {type === 'input' && (
434
- <Input
435
- disabled={disabled}
436
- onChange={(e: any) => {
437
- const v = e.target.value;
438
- setInputValue(v);
439
- }}
440
- style={{ width: 170 }}
441
- value={inputValue}
442
- {...inpProps}
443
- ></Input>
444
- )}
445
- {type === 'number' && (
446
- <InputNumber
447
- disabled={disabled}
448
- onBlur={(e: any) => {
449
- const v = parseFloat(e.target.value);
450
- if (!isNaN(v)) {
451
- setInputValue(v);
452
- }
453
- }}
454
- style={{ width: 170 }}
455
- value={inputValue}
456
- {...inpProps}
457
- ></InputNumber>
458
- )}
459
- </Menu.Item>
460
- <Menu.Divider />
461
- <Menu.Item>
462
- <div style={{ textAlign: 'right' }}>
463
- <Space>
464
- <Button
465
- onClick={() => {
466
- setvisible(false);
467
- }}
468
- >
469
- 取消
470
- </Button>
471
- <Button
472
- type="primary"
473
- disabled={disabled}
474
- onClick={() => onSubmit()}
475
- >
476
- 确定
477
- </Button>
478
- </Space>
479
- </div>
480
- </Menu.Item>
481
- </Menu>
482
- );
483
- return (
484
- <div key={record.id}>
485
- <Space>
486
- {text}
487
- <Dropdown
488
- visible={visible}
489
- overlay={menu}
490
- trigger={['click']}
491
- placement="bottomLeft"
492
- >
493
- <EditOutlined
494
- style={{ color: '#B0B4B7' }}
495
- onClick={() => {
496
- setvisible(!visible);
497
- }}
498
- className="cur"
499
- />
500
- </Dropdown>
501
- </Space>
502
- </div>
503
- );
504
- };
505
-
506
- type UserColumnsType = {
507
- name: string; //用户名
508
- department?: string; //部门
509
- position?: string; //职位
510
- company?: string; //公司
511
- avatar?: string; //头像
512
- };
513
- const userColumns = (props: UserColumnsType) => {
514
- const {
515
- name = '',
516
- department,
517
- position,
518
- company,
519
- avatar = '',
520
- }: UserColumnsType = props;
521
- return (
522
- <Popover
523
- overlayClassName={styles.user_info_card}
524
- overlayInnerStyle={{ padding: '0px' }}
525
- placement="bottom"
526
- title={null}
527
- content={userInfoCard(props)}
528
- >
529
- <div className="user_columns_warp">
530
- <img
531
- style={{ borderRadius: '50%' }}
532
- src={
533
- avatar ||
534
- 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png'
535
- }
536
- ></img>
537
- <span>{name}</span>
538
- </div>
539
- </Popover>
540
- );
541
- };
542
-
543
- const userInfoCard = (props: any) => {
544
- return (
545
- <Card
546
- style={{ width: 200 }}
547
- cover={
548
- <img
549
- alt="example"
550
- height={90}
551
- src={
552
- props.avatar ||
553
- 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png'
554
- }
555
- />
556
- }
557
- >
558
- <div className={styles.cardContent} style={{ padding: '0 15px' }}>
559
- <div className={styles.user_card_header}>
560
- <Avatar
561
- style={{ border: '2px solid #ffffff' }}
562
- size={64}
563
- src={
564
- props.avatar ||
565
- 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png'
566
- }
567
- />
568
- <div className={styles.card_name}>{props.name}</div>
569
- <div className={styles.card_company}>{props.company || 'XXXXX'}</div>
570
- </div>
571
- <p className={styles.card_detailInfo}>
572
- 部门:{' '}
573
- <span className={styles.card_department}>
574
- {props.department || 'XXXXX'}
575
- </span>
576
- </p>
577
- <p className={styles.card_detailInfo}>
578
- 职位: {props.position || 'XXXXX'}
579
- </p>
580
- </div>
581
- </Card>
582
- );
583
- };
584
-
585
- //设置queryTable默认列宽
586
- const getItemDefaultWidth = (item: any) => {
587
- let defaultWidth = 200;
588
- let lowerCaseKey = (item.key || item.dataIndex).toLowerCase();
589
- switch (true) {
590
- case lowerCaseKey.indexOf('number') > -1:
591
- case lowerCaseKey.indexOf('quantity') > -1:
592
- case lowerCaseKey.indexOf('amount') > -1:
593
- defaultWidth = 90;
594
- break;
595
- case lowerCaseKey.indexOf('no') > -1:
596
- defaultWidth = 180;
597
- break;
598
- case lowerCaseKey.indexOf('code') > -1:
599
- defaultWidth = 170;
600
- break;
601
- case lowerCaseKey.indexOf('time') > -1:
602
- defaultWidth = 130;
603
- break;
604
- case lowerCaseKey.indexOf('status') > -1:
605
- defaultWidth = 100;
606
- break;
607
- case lowerCaseKey.indexOf('user') > -1:
608
- defaultWidth = 130;
609
- break;
610
- default:
611
- break;
612
- }
613
- console.log(defaultWidth);
614
- return defaultWidth;
615
- };
616
-
617
- const sulaTableRenderTooltip = ({ text }: any) => {
618
- return (
619
- <Tooltip placement="topLeft" title={text}>
620
- <span>{text}</span>
621
- </Tooltip>
622
- );
623
- };
624
-
625
- //处理数字0不显示问题
626
- const renderNumberText = ({ text }: any) => {
627
- if (text == 0) {
628
- return text;
629
- }
630
-
631
- if (!text) {
632
- return '--';
633
- } else {
634
- return text;
635
- }
636
- };
637
-
638
- const renderFixed2 = (text: any) =>
639
- (text + '').indexOf('.') !== -1 ? parseFloat(text).toFixed(2) : text;
640
-
641
- // 自定义标签
642
- const handleTextWarpCustom = (text: any, style = {}) => {
643
- return (
644
- <div
645
- style={{
646
- width: '100%',
647
- position: 'relative',
648
- whiteSpace: 'initial',
649
- ...style,
650
- }}
651
- >
652
- {text}
653
- </div>
654
- );
655
- };
656
-
657
- const calculateValidPeriod = (start: any, end: any) => {
658
- return `${moment(end).diff(start, 'days')} 天` || '--';
659
- };
660
-
661
- const handleTextWarp = (text: any) => {
662
- return handleTextWarpCustom(text, { width: '150%' });
663
- };
664
-
665
- export {
666
- getSkuImg,
667
- updateGuanDate,
668
- textIcon,
669
- handleTextDoubleOrId,
670
- handleTextDouble,
671
- handleTextOverflow,
672
- handleTextLineFeed,
673
- handleTextTooltip,
674
- handleTextBreakSpaces,
675
- handleStatusBadge,
676
- HandleTotalCount,
677
- handleTooltip,
678
- handleCommonTimeRender,
679
- handleTooltipHours,
680
- tableColumnsImage,
681
- ColumnsEdit,
682
- userColumns,
683
- userInfoCard,
684
- getItemDefaultWidth,
685
- renderNumberText,
686
- sulaTableRenderTooltip,
687
- renderFixed2,
688
- handleTextWarpCustom,
689
- handleTextWarp,
690
- calculateValidPeriod
691
- };
1
+ import React, { useState } from 'react';
2
+ import {
3
+ Tooltip,
4
+ Badge,
5
+ Image,
6
+ Space,
7
+ Menu,
8
+ Dropdown,
9
+ Input,
10
+ Button,
11
+ InputNumber,
12
+ Popover,
13
+ Card,
14
+ Avatar,
15
+ } from 'antd';
16
+ import moment from 'moment';
17
+ import { FORMAT_TIME_STR, FORMAT_DAY_STR } from '@/utils/constant';
18
+ import noImg from '@/assets/list-no-img.svg';
19
+ import { request } from 'bssula';
20
+ import styles from './TableUtils.less';
21
+
22
+ import {
23
+ CloseSquareOutlined,
24
+ CopyOutlined,
25
+ DeleteOutlined,
26
+ EditOutlined,
27
+ EyeOutlined,
28
+ SendOutlined,
29
+ WarningOutlined,
30
+ } from '@ant-design/icons';
31
+ type mediaListType = {
32
+ type: number,
33
+ url: string,
34
+ [key: string]: any;
35
+ }
36
+ type recordType = {
37
+ mediaList?: mediaListType;
38
+ [key: string]: any;
39
+ };
40
+ const getSkuImg = (
41
+ record: recordType,
42
+ ) => {
43
+ // 默认取sku图片、当没有设置时取商品图片,商品图片也没有返回空
44
+ const ImgList = record.mediaList?.length && record.mediaList.filter((i: any) => i.type == 1) || [] // 获取SKU、SPU图片数组集合
45
+ const imgShow = ImgList?.length && ImgList[0].url || null
46
+ return imgShow;
47
+ };
48
+
49
+ const updateGuanDate = (requestParams: any, dateKeyParams: any = {}) => {
50
+ return {
51
+ type: 'modalForm',
52
+ width: 800,
53
+ props: {
54
+ maskClosable: false,
55
+ },
56
+ title: '修改单据日期',
57
+ mode: 'create', // 新建/编辑/查看
58
+ initialValues: (ctx: any) => {
59
+ if (!ctx.record) return;
60
+ return {
61
+ ...ctx.record,
62
+ date: dateKeyParams.initDate
63
+ ? ctx.record[dateKeyParams.initDate]
64
+ : ctx.record.orderDate,
65
+ };
66
+ },
67
+ fields: [
68
+ {
69
+ name: dateKeyParams.outDate || `date`,
70
+ label: '单据日期',
71
+ field: {
72
+ type: 'datepicker',
73
+ props: {
74
+ autoSize: true,
75
+ placeholder: '请选择',
76
+ disabledDate: (currentDate: any) =>
77
+ currentDate.valueOf() <
78
+ moment().subtract(Number(moment().format('D')), 'days'),
79
+ style: { width: '100%' },
80
+ format: 'YYYY-MM-DD',
81
+ valueFormat: true,
82
+ },
83
+ },
84
+ initialValue: moment().utcOffset(8),
85
+ rules: [{ required: true, message: '请选择单据日期' }],
86
+ },
87
+ ],
88
+ submitButtonProps: {
89
+ children: '确认',
90
+ },
91
+ backButtonProps: {
92
+ children: '取消',
93
+ },
94
+ submit: requestParams,
95
+ };
96
+ };
97
+
98
+ const textIcon = (type: string | number, text?: string) => {
99
+ if (!type) return;
100
+ if (type == 1) {
101
+ return (
102
+ <a className="cloumnsIconA">
103
+ <EyeOutlined />
104
+ <span>详情</span>
105
+ </a>
106
+ );
107
+ }
108
+ if (type == 2) {
109
+ return (
110
+ <a className="cloumnsIconA">
111
+ <EyeOutlined />
112
+ <span>查看</span>
113
+ </a>
114
+ );
115
+ }
116
+ if (type == 3) {
117
+ return (
118
+ <a className="cloumnsIconA">
119
+ <DeleteOutlined />
120
+ <span>删除</span>
121
+ </a>
122
+ );
123
+ }
124
+ if (type == 4) {
125
+ return (
126
+ <a className="cloumnsIconA">
127
+ <EditOutlined />
128
+ <span>编辑</span>
129
+ </a>
130
+ );
131
+ }
132
+ if (type == 5) {
133
+ return (
134
+ <a className="cloumnsIconA">
135
+ <CopyOutlined />
136
+ <span>复制</span>
137
+ </a>
138
+ );
139
+ }
140
+ if (type == 6) {
141
+ return (
142
+ <a className="cloumnsIconA">
143
+ <CloseSquareOutlined />
144
+ <span>作废</span>
145
+ </a>
146
+ );
147
+ }
148
+ if (type == 7) {
149
+ return (
150
+ <a className="cloumnsIconA">
151
+ <WarningOutlined />
152
+ <span>终止</span>
153
+ </a>
154
+ );
155
+ }
156
+ if (type == 8) {
157
+ return (
158
+ <a className="cloumnsIconA">
159
+ <SendOutlined />
160
+ <span>{text}</span>
161
+ </a>
162
+ );
163
+ }
164
+ };
165
+
166
+ const handleTextDoubleOrId = (
167
+ textOne: string | undefined,
168
+ textTwo: string | undefined,
169
+ ) => {
170
+ return (
171
+ <>
172
+ <div style={{ color: '#000', marginBottom: -8 }}>{textOne}</div>
173
+ <span style={{ color: '#848484' }}>ID : {textTwo}</span>
174
+ </>
175
+ );
176
+ };
177
+
178
+ const handleTextDouble = (
179
+ textOne: string | undefined,
180
+ textTwo: string | undefined,
181
+ ) => {
182
+ return (
183
+ <>
184
+ <div style={{ marginBottom: -8 }}>{textOne}</div>
185
+ <div>{textTwo}</div>
186
+ </>
187
+ );
188
+ };
189
+
190
+ const handleTextOverflow = (text: string | undefined, width: number = 130) => {
191
+ return (
192
+ <Tooltip title={text || '--'}>
193
+ <span
194
+ style={{
195
+ width: width ? width + 'px' : '130px',
196
+ display: 'inline-block',
197
+ textOverflow: 'ellipsis',
198
+ overflow: 'hidden',
199
+ whiteSpace: 'nowrap',
200
+ position: 'relative',
201
+ top: '5px',
202
+ }}
203
+ >
204
+ {text || '--'}
205
+ </span>
206
+ </Tooltip>
207
+ );
208
+ };
209
+
210
+ const handleTextLineFeed = (text: string | undefined, width: number = 130) => {
211
+ return (
212
+ <Tooltip title={text || '--'}>
213
+ <span
214
+ style={{
215
+ width: width ? width + 'px' : '130px',
216
+ display: 'inline-block',
217
+ position: 'relative',
218
+ whiteSpace: 'pre-line',
219
+ top: '5px',
220
+ }}
221
+ >
222
+ {text || '--'}
223
+ </span>
224
+ </Tooltip>
225
+ );
226
+ };
227
+
228
+ const handleTextTooltip = (text: any) => {
229
+ return <Tooltip title={text || '--'}>{text || '--'}</Tooltip>;
230
+ };
231
+
232
+ const handleTextBreakSpaces = (text: any) => {
233
+ return (
234
+ <Tooltip title={text || '--'}>
235
+ <span
236
+ style={{
237
+ width: '130px',
238
+ display: 'inline-block',
239
+ textOverflow: 'ellipsis',
240
+ overflow: 'hidden',
241
+ whiteSpace: 'break-spaces',
242
+ position: 'relative',
243
+ top: '5px',
244
+ }}
245
+ >
246
+ {text || '--'}
247
+ </span>
248
+ </Tooltip>
249
+ );
250
+ };
251
+
252
+ const handleStatusBadge = (text: any, color: any) => {
253
+ return (
254
+ <Badge
255
+ style={{
256
+ width: '150px',
257
+ display: 'inline-block',
258
+ textOverflow: 'ellipsis',
259
+ overflow: 'hidden',
260
+ whiteSpace: 'nowrap',
261
+ }}
262
+ text={text}
263
+ color={color}
264
+ />
265
+ );
266
+ };
267
+
268
+ const HandleTotalCount = (totalParams: any) => {
269
+ const { total = {}, totalLeft, totalRight } = totalParams;
270
+ return (
271
+ <div className="total_warp">
272
+ <div className="total_warp_left">
273
+ {totalLeft.map((d: any) => (
274
+ <div>
275
+ <span className="total_warp_num">{total[d.value] || 0}</span>
276
+ <span className="total_warp_title">{d.key}</span>
277
+ </div>
278
+ ))}
279
+ </div>
280
+ <div className="total_warp_right">
281
+ {totalRight.map((d: any) => (
282
+ <div>
283
+ <span className="total_warp_num">{total[d.value] || 0}</span>
284
+ <span className="total_warp_title">{d.key}</span>
285
+ </div>
286
+ ))}
287
+ </div>
288
+ </div>
289
+ );
290
+ };
291
+
292
+ const handleCommonTimeRender = (text: any, format?: any) => {
293
+ const formatType = format || FORMAT_TIME_STR;
294
+ return (text && moment(text).format(formatType)) || '--';
295
+ };
296
+
297
+ const handleCommonTimeRenderHours = (text: any, format?: any) => {
298
+ const formatType = format || FORMAT_DAY_STR;
299
+ return (text && moment(text).format(formatType)) || '--';
300
+ };
301
+
302
+ const handleTooltip = (text: any, timeTrue?: boolean) => {
303
+ return (
304
+ <Tooltip title={timeTrue ? handleCommonTimeRender(text) : text}>
305
+ {timeTrue ? handleCommonTimeRender(text) : text}
306
+ </Tooltip>
307
+ );
308
+ };
309
+
310
+ const handleTooltipHours = (text: any, timeTrue?: boolean) => {
311
+ return (
312
+ <Tooltip title={timeTrue ? handleCommonTimeRenderHours(text) : text}>
313
+ {timeTrue ? handleCommonTimeRenderHours(text) : text}
314
+ </Tooltip>
315
+ );
316
+ };
317
+
318
+ /*
319
+ 列表展示缩略图片
320
+ url 图片 url
321
+ {
322
+ width: 图片宽度
323
+ height: 图片高度
324
+ }
325
+ */
326
+ type tableColumnsImageType = {
327
+ width?: number | string;
328
+ height?: number | string;
329
+ [key: string]: any;
330
+ };
331
+ const tableColumnsImage = (url?: string, paramsObj?: tableColumnsImageType) => {
332
+ // 测试使用 测试类型缩小 随时可删除 start
333
+ const imgHtml = document.querySelector('.ant-image-mask-info')!;
334
+ if (imgHtml) {
335
+ let str = imgHtml?.innerHTML;
336
+ str = str?.replace('预览', '');
337
+ imgHtml.innerHTML = str;
338
+ }
339
+ // 测试使用 测试类型缩小 end
340
+
341
+ return (
342
+ <>
343
+ {url ? (
344
+ <div className={`clomnsImg`}>
345
+ <Image src={url} width="44px" height="44px" {...paramsObj}></Image>
346
+ </div>
347
+ ) : (
348
+ <img {...paramsObj} src={noImg}></img>
349
+ )}
350
+ </>
351
+ );
352
+ };
353
+
354
+ interface ColumnsEditInterfave {
355
+ text?: string;
356
+ record?: any;
357
+ type?: string;
358
+ reqName: string;
359
+ successMessage?: string;
360
+ urlPathId?: boolean;
361
+ disabled: boolean;
362
+ requestProps: {
363
+ url: string;
364
+ converter?: Function;
365
+ method?: string;
366
+ };
367
+ [key: string]: any;
368
+ }
369
+ /*
370
+ text 当前项
371
+ record 当前行
372
+ table sula table 的实例
373
+ type 默认 input 可选 number 输入框类型
374
+ inpProps 输入框透传 props
375
+ requestProps {} bssula 的 request
376
+ reqName 修改数据传给后端的key
377
+ urlPathId 默认 true 会在 requestProps.url 上面 拼接 /:id
378
+ successMessage 默认提示操作成功 可传入 string
379
+ disabled 什么时候禁用 boolean 类型
380
+ */
381
+ const ColumnsEdit = (props: ColumnsEditInterfave) => {
382
+ const {
383
+ text = '',
384
+ record,
385
+ table,
386
+ type = 'input',
387
+ inpProps = {},
388
+ requestProps = {
389
+ url: '',
390
+ },
391
+ reqName,
392
+ urlPathId = true,
393
+ successMessage = '操作成功',
394
+ disabled,
395
+ }: ColumnsEditInterfave = props;
396
+ const [visible, setvisible] = useState(false);
397
+ const [inputValue, setInputValue]: [
398
+ inputValue: string | number,
399
+ setInputValue: Function,
400
+ ] = useState(text);
401
+
402
+ const onSubmit = () => {
403
+ const url = urlPathId
404
+ ? requestProps.url + `/${record.id}`
405
+ : requestProps.url;
406
+ request({
407
+ url: url,
408
+ method: requestProps.method || 'patch',
409
+ convertParams: () => {
410
+ return {
411
+ ...record,
412
+ [reqName]: inputValue,
413
+ };
414
+ },
415
+ successMessage,
416
+ converter(ctx: any) {
417
+ if (
418
+ requestProps.converter &&
419
+ typeof requestProps.converter === 'function'
420
+ ) {
421
+ requestProps.converter(ctx);
422
+ return;
423
+ }
424
+ setvisible(false);
425
+ table.resetTable();
426
+ },
427
+ });
428
+ };
429
+
430
+ const menu = (
431
+ <Menu>
432
+ <Menu.Item>
433
+ {type === 'input' && (
434
+ <Input
435
+ disabled={disabled}
436
+ onChange={(e: any) => {
437
+ const v = e.target.value;
438
+ setInputValue(v);
439
+ }}
440
+ style={{ width: 170 }}
441
+ value={inputValue}
442
+ {...inpProps}
443
+ ></Input>
444
+ )}
445
+ {type === 'number' && (
446
+ <InputNumber
447
+ disabled={disabled}
448
+ onBlur={(e: any) => {
449
+ const v = parseFloat(e.target.value);
450
+ if (!isNaN(v)) {
451
+ setInputValue(v);
452
+ }
453
+ }}
454
+ style={{ width: 170 }}
455
+ value={inputValue}
456
+ {...inpProps}
457
+ ></InputNumber>
458
+ )}
459
+ </Menu.Item>
460
+ <Menu.Divider />
461
+ <Menu.Item>
462
+ <div style={{ textAlign: 'right' }}>
463
+ <Space>
464
+ <Button
465
+ onClick={() => {
466
+ setvisible(false);
467
+ }}
468
+ >
469
+ 取消
470
+ </Button>
471
+ <Button
472
+ type="primary"
473
+ disabled={disabled}
474
+ onClick={() => onSubmit()}
475
+ >
476
+ 确定
477
+ </Button>
478
+ </Space>
479
+ </div>
480
+ </Menu.Item>
481
+ </Menu>
482
+ );
483
+ return (
484
+ <div key={record.id}>
485
+ <Space>
486
+ {text}
487
+ <Dropdown
488
+ visible={visible}
489
+ overlay={menu}
490
+ trigger={['click']}
491
+ placement="bottomLeft"
492
+ >
493
+ <EditOutlined
494
+ style={{ color: '#B0B4B7' }}
495
+ onClick={() => {
496
+ setvisible(!visible);
497
+ }}
498
+ className="cur"
499
+ />
500
+ </Dropdown>
501
+ </Space>
502
+ </div>
503
+ );
504
+ };
505
+
506
+ type UserColumnsType = {
507
+ name: string; //用户名
508
+ department?: string; //部门
509
+ position?: string; //职位
510
+ company?: string; //公司
511
+ avatar?: string; //头像
512
+ };
513
+ const userColumns = (props: UserColumnsType) => {
514
+ const {
515
+ name = '',
516
+ department,
517
+ position,
518
+ company,
519
+ avatar = '',
520
+ }: UserColumnsType = props;
521
+ return (
522
+ <Popover
523
+ overlayClassName={styles.user_info_card}
524
+ overlayInnerStyle={{ padding: '0px' }}
525
+ placement="bottom"
526
+ title={null}
527
+ content={userInfoCard(props)}
528
+ >
529
+ <div className="user_columns_warp">
530
+ <img
531
+ style={{ borderRadius: '50%' }}
532
+ src={
533
+ avatar ||
534
+ 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png'
535
+ }
536
+ ></img>
537
+ <span>{name}</span>
538
+ </div>
539
+ </Popover>
540
+ );
541
+ };
542
+
543
+ const userInfoCard = (props: any) => {
544
+ return (
545
+ <Card
546
+ style={{ width: 200 }}
547
+ cover={
548
+ <img
549
+ alt="example"
550
+ height={90}
551
+ src={
552
+ props.avatar ||
553
+ 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png'
554
+ }
555
+ />
556
+ }
557
+ >
558
+ <div className={styles.cardContent} style={{ padding: '0 15px' }}>
559
+ <div className={styles.user_card_header}>
560
+ <Avatar
561
+ style={{ border: '2px solid #ffffff' }}
562
+ size={64}
563
+ src={
564
+ props.avatar ||
565
+ 'https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png'
566
+ }
567
+ />
568
+ <div className={styles.card_name}>{props.name}</div>
569
+ <div className={styles.card_company}>{props.company || 'XXXXX'}</div>
570
+ </div>
571
+ <p className={styles.card_detailInfo}>
572
+ 部门:{' '}
573
+ <span className={styles.card_department}>
574
+ {props.department || 'XXXXX'}
575
+ </span>
576
+ </p>
577
+ <p className={styles.card_detailInfo}>
578
+ 职位: {props.position || 'XXXXX'}
579
+ </p>
580
+ </div>
581
+ </Card>
582
+ );
583
+ };
584
+
585
+ //设置queryTable默认列宽
586
+ const getItemDefaultWidth = (item: any) => {
587
+ let defaultWidth = 200;
588
+ let lowerCaseKey = (item.key || item.dataIndex).toLowerCase();
589
+ switch (true) {
590
+ case lowerCaseKey.indexOf('number') > -1:
591
+ case lowerCaseKey.indexOf('quantity') > -1:
592
+ case lowerCaseKey.indexOf('amount') > -1:
593
+ defaultWidth = 90;
594
+ break;
595
+ case lowerCaseKey.indexOf('no') > -1:
596
+ defaultWidth = 180;
597
+ break;
598
+ case lowerCaseKey.indexOf('code') > -1:
599
+ defaultWidth = 170;
600
+ break;
601
+ case lowerCaseKey.indexOf('time') > -1:
602
+ defaultWidth = 130;
603
+ break;
604
+ case lowerCaseKey.indexOf('status') > -1:
605
+ defaultWidth = 100;
606
+ break;
607
+ case lowerCaseKey.indexOf('user') > -1:
608
+ defaultWidth = 130;
609
+ break;
610
+ default:
611
+ break;
612
+ }
613
+ console.log(defaultWidth);
614
+ return defaultWidth;
615
+ };
616
+
617
+ const sulaTableRenderTooltip = ({ text }: any) => {
618
+ return (
619
+ <Tooltip placement="topLeft" title={text}>
620
+ <span>{text}</span>
621
+ </Tooltip>
622
+ );
623
+ };
624
+
625
+ //处理数字0不显示问题
626
+ const renderNumberText = ({ text }: any) => {
627
+ if (text == 0) {
628
+ return text;
629
+ }
630
+
631
+ if (!text) {
632
+ return '--';
633
+ } else {
634
+ return text;
635
+ }
636
+ };
637
+
638
+ const renderFixed2 = (text: any) =>
639
+ (text + '').indexOf('.') !== -1 ? parseFloat(text).toFixed(2) : text;
640
+
641
+ // 自定义标签
642
+ const handleTextWarpCustom = (text: any, style = {}) => {
643
+ return (
644
+ <div
645
+ style={{
646
+ width: '100%',
647
+ position: 'relative',
648
+ whiteSpace: 'initial',
649
+ ...style,
650
+ }}
651
+ >
652
+ {text}
653
+ </div>
654
+ );
655
+ };
656
+
657
+ const calculateValidPeriod = (start: any, end: any) => {
658
+ return `${moment(end).diff(start, 'days')} 天` || '--';
659
+ };
660
+
661
+ const handleTextWarp = (text: any) => {
662
+ return handleTextWarpCustom(text, { width: '150%' });
663
+ };
664
+
665
+ export {
666
+ getSkuImg,
667
+ updateGuanDate,
668
+ textIcon,
669
+ handleTextDoubleOrId,
670
+ handleTextDouble,
671
+ handleTextOverflow,
672
+ handleTextLineFeed,
673
+ handleTextTooltip,
674
+ handleTextBreakSpaces,
675
+ handleStatusBadge,
676
+ HandleTotalCount,
677
+ handleTooltip,
678
+ handleCommonTimeRender,
679
+ handleTooltipHours,
680
+ tableColumnsImage,
681
+ ColumnsEdit,
682
+ userColumns,
683
+ userInfoCard,
684
+ getItemDefaultWidth,
685
+ renderNumberText,
686
+ sulaTableRenderTooltip,
687
+ renderFixed2,
688
+ handleTextWarpCustom,
689
+ handleTextWarp,
690
+ calculateValidPeriod
691
+ };