@bit-sun/business-component 1.1.21 → 1.1.24

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 (29) hide show
  1. package/package.json +1 -1
  2. package/src/components/Business/CommodityEntry/index.md +69 -0
  3. package/src/components/Business/CommodityEntry/index.tsx +75 -0
  4. package/src/components/Business/SearchSelect/BusinessUtils.ts +888 -0
  5. package/src/components/Business/SearchSelect/common.ts +34 -0
  6. package/src/components/Business/SearchSelect/index.md +906 -0
  7. package/src/components/{SearchSelect/business/BusinessSearchSelect.tsx → Business/SearchSelect/index.tsx} +3 -2
  8. package/src/components/Business/SearchSelect/utils.ts +71 -0
  9. package/src/components/{DataValidation → Functional/DataValidation}/index.less +0 -0
  10. package/src/components/{DataValidation → Functional/DataValidation}/index.md +3 -3
  11. package/src/components/{DataValidation → Functional/DataValidation}/index.tsx +1 -1
  12. package/src/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.less +0 -0
  13. package/src/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.md +3 -3
  14. package/src/components/{QueryMutipleInput → Functional/QueryMutipleInput}/index.tsx +0 -0
  15. package/src/components/{SearchSelect → Functional/SearchSelect}/index.less +0 -0
  16. package/src/components/{SearchSelect → Functional/SearchSelect}/index.md +14 -11
  17. package/src/components/{SearchSelect → Functional/SearchSelect}/index.tsx +226 -106
  18. package/src/index.ts +5 -4
  19. package/dist/components/DataValidation/index.d.ts +0 -144
  20. package/dist/components/QueryMutipleInput/index.d.ts +0 -5
  21. package/dist/components/SearchSelect/business/BusinessSearchSelect.d.ts +0 -2
  22. package/dist/components/SearchSelect/business/BusinessUtils.d.ts +0 -22
  23. package/dist/components/SearchSelect/index.d.ts +0 -3
  24. package/dist/index.d.ts +0 -5
  25. package/dist/index.esm.js +0 -3723
  26. package/dist/index.js +0 -3738
  27. package/dist/utils/CheckOneUser/index.d.ts +0 -2
  28. package/src/components/SearchSelect/business/BusinessUtils.ts +0 -464
  29. package/src/components/SearchSelect/business/index.md +0 -181
@@ -1,17 +1,18 @@
1
1
  import React from 'react';
2
2
  import { commonFun } from './BusinessUtils';
3
- import SearchSelect from '../index';
3
+ import SearchSelect from '@/components/Functional/SearchSelect';
4
4
 
5
5
 
6
6
  const BusinessSearchSelect = (props: any) => {
7
7
  const businessType = props?.selectBusinessType || 'supplier';
8
8
  const prefixUrl = props?.prefixUrl || { selectPrefix: '/bop/api', formSelectFix: '/bop/api' };
9
9
 
10
- const { requestConfig, modalTableProps } = commonFun(businessType, prefixUrl);
10
+ const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl);
11
11
 
12
12
  const currentProps = {
13
13
  requestConfig,
14
14
  ...props,
15
+ needModalTable,
15
16
  modalTableProps
16
17
  }
17
18
 
@@ -0,0 +1,71 @@
1
+ import axios from 'axios';
2
+ import { message } from 'antd';
3
+ import { stringify } from 'querystring';
4
+
5
+ const getDicData = (dicCode: string) => {
6
+ let dicData = {};
7
+ let dictionaryData;
8
+ if (!dictionaryData) {
9
+ let storageDic = localStorage.getItem('dicData')
10
+ ? JSON.parse(localStorage.getItem('dicData') || '{}')
11
+ : {};
12
+ dicData = storageDic[dicCode];
13
+ } else {
14
+ dicData = dictionaryData[dicCode];
15
+ }
16
+ if (!dicData || !dicData.length) {
17
+ // throw new Error(`当前没有${dicCode}字典值`);
18
+ }
19
+ return dicData
20
+ }
21
+
22
+ const getDictionarySource = (dicCode: string, needConvertInterger = false) => {
23
+ let dicData = getDicData(dicCode);
24
+
25
+ try {
26
+ if (needConvertInterger) {
27
+ dicData = dicData.map((item: { text: string; value: string }) => ({
28
+ ...item,
29
+ value: parseFloat(item.value),
30
+ }));
31
+ }
32
+ } catch (e) {}
33
+ return dicData;
34
+ };
35
+
36
+ const getDictionaryTextByValue = (dicCode: string, value: string | number) => {
37
+ let dicData = getDicData(dicCode);
38
+
39
+ if (value === undefined) return '';
40
+
41
+ const dicItemArray = dicData?.filter(
42
+ (item: { value: string }) => item.value === value.toString(),
43
+ );
44
+
45
+ if (!dicItemArray?.length) {
46
+ // throw new Error(`当前${dicCode}字典值合没有${value}的数据`)
47
+ return value;
48
+ }
49
+
50
+ return dicItemArray[0].text;
51
+ };
52
+
53
+ const loadSelectSource = (url: string, params?: any) => {
54
+ return new Promise((resolve, reject) => {
55
+ axios
56
+ .get(`${url}?${stringify(params)}`)
57
+ .then((result: any) => {
58
+ result = result.data;
59
+ if (result.status !== '0') {
60
+ message.error(result.msg);
61
+ return;
62
+ }
63
+ resolve(result);
64
+ })
65
+ .catch((err) => {
66
+ reject(err);
67
+ });
68
+ })
69
+ };
70
+
71
+ export { getDictionarySource, getDictionaryTextByValue, loadSelectSource }
@@ -3,7 +3,7 @@ nav:
3
3
  title: '组件'
4
4
  order: 1
5
5
  group:
6
- title: 组件
6
+ title: 功能组件
7
7
  order: 0
8
8
  title: 数据校验
9
9
  order: 1
@@ -15,7 +15,7 @@ Demo:
15
15
 
16
16
  ```tsx
17
17
  import React, { useRef } from 'react';
18
- import { DataValidation } from '../../index';
18
+ import { DataValidation } from '../../../index';
19
19
 
20
20
  export default () => {
21
21
  let dataValidationRef: DataValidation = useRef();
@@ -25,7 +25,7 @@ export default () => {
25
25
  <DataValidation
26
26
  // columns={['skuCode', 'quantity', 'price']}
27
27
  columns={["skuCode", "quantity", "price"]} // 需要哪些列展示,以及展示的顺序
28
- validDataUrl="http://test.i-baby.net/wms-ops/recordDetailImport/check" // 校验的接口url
28
+ validDataUrl="/wms-ops/recordDetailImport/check" // 校验的接口url
29
29
  onRef={(ref) => {
30
30
  dataValidationRef = ref;
31
31
  }}
@@ -373,7 +373,7 @@ class DataValidation extends React.Component {
373
373
  getData = () => {
374
374
  console.time();
375
375
  let sheetData = luckysheet.getSheetData();
376
- let data = sheetData
376
+ let data = JSON.parse(JSON.stringify(sheetData))
377
377
  .filter((item) => item[0])
378
378
  .map((item) => {
379
379
  let obj = {};
@@ -3,10 +3,10 @@ nav:
3
3
  title: '组件'
4
4
  order: 1
5
5
  group:
6
- title: 组件
6
+ title: 功能组件
7
7
  order: 0
8
8
  title: 批量查询组件
9
- order: 1
9
+ order: 2
10
10
  ---
11
11
 
12
12
  ## QueryMutipleInput
@@ -15,7 +15,7 @@ Demo:
15
15
 
16
16
  ```tsx
17
17
  import React, { useRef } from 'react';
18
- import { QueryMutipleInput } from '../../index';
18
+ import { QueryMutipleInput } from '../../../index';
19
19
 
20
20
  export default () => {
21
21
  const handleOnChange = (value) => {
@@ -3,10 +3,10 @@ nav:
3
3
  title: '组件'
4
4
  order: 1
5
5
  group:
6
- title: 组件
6
+ title: 功能组件
7
7
  order: 0
8
8
  title: 档案选择器
9
- order: 2
9
+ order: 3
10
10
  ---
11
11
 
12
12
  ## SearchSelect
@@ -15,19 +15,19 @@ Demo:
15
15
 
16
16
  ```tsx
17
17
  import React, { useState } from 'react';
18
- import {SearchSelect} from '../../index.ts';
18
+ import { SearchSelect } from '../../../index';
19
19
 
20
20
  export default () => {
21
21
  const selectProps = {
22
- // mode: 'multiple',
23
- // maxTagCount: 1,
22
+ // mode: 'multiple',
23
+ // maxTagCount: 1,
24
24
  }
25
25
  const [value, setValue] = useState(selectProps?.mode ? [] : null);
26
26
  const props = {
27
27
  value,
28
28
  // labelInValue: true, // 非必填 默认为false
29
29
  requestConfig: {
30
- url: `http://test.i-baby.net/bop/api/supplier`,
30
+ url: `/bop/api/supplier`,
31
31
  filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
32
32
  otherParams: {}, // 默认参数
33
33
  // mappingTextField: 'name',
@@ -42,10 +42,11 @@ export default () => {
42
42
  const DictionaryUC000013 = [{ text: '共享', value: '10' }, { text: '私有', value: '20' }]
43
43
  const modalTableProps = {
44
44
  modalTableTitle: '选择供应商',
45
- tableSearchForm:[
45
+ tableSearchForm: [
46
46
  { name: 'qp-name-like', label: '客户名称' }, // field: { type: 'input', props: { placeholder: '8888'}}
47
47
  { name: 'qp-code-like', label: '客户编码' },
48
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
48
+ {
49
+ name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
49
50
  type: 'select',
50
51
  props: {
51
52
  mode: 'multiple',
@@ -61,7 +62,8 @@ export default () => {
61
62
  },
62
63
  initialSource: [{ text: '英伦宝贝儿童用品有限公司', value: 'A0001' }]
63
64
  },
64
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
65
+ {
66
+ name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
65
67
  type: 'select',
66
68
  props: {
67
69
  mode: 'multiple',
@@ -77,7 +79,8 @@ export default () => {
77
79
  },
78
80
  initialSource: [{ text: '上海哲雄母婴用品有限公司', value: 'F002' }, { text: '上海英伦宝贝儿童用品有限公司', value: 'F001' }]
79
81
  },
80
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
82
+ {
83
+ name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
81
84
  type: 'select',
82
85
  props: {
83
86
  mode: 'multiple',
@@ -123,7 +126,7 @@ export default () => {
123
126
  },
124
127
  ]
125
128
  }
126
-
129
+
127
130
  return (
128
131
  <div>
129
132
  <SearchSelect
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
2
  import React, { useState, useEffect } from 'react';
3
3
  import { useDebounceFn } from 'ahooks';
4
- import { Input, Button, Modal, Select, Divider, message, Spin, Form, Table, Checkbox, TreeSelect } from 'antd';
4
+ import { Input, Button, Modal, Select, Divider, message, Spin, Form, Table, Checkbox, TreeSelect, Tooltip, Tag } from 'antd';
5
5
  import { SearchOutlined, CopyOutlined, CaretLeftOutlined } from '@ant-design/icons';
6
6
  import axios from 'axios';
7
7
  import { stringify } from 'querystring';
@@ -20,6 +20,7 @@ const SearchSelect = (props: any) => {
20
20
  requestConfig,
21
21
  ctx,
22
22
  sourceName,
23
+ needModalTable=true,
23
24
  } = props;
24
25
  const { url, otherParams, isMap, fixedparameter, fieldValToParam, mappingTextField='name', mappingTextShowKeyField,mappingValueField='code' } = requestConfig || {};
25
26
  const resultSourceKey = sourceName || requestConfig?.sourceName || 'supplierCode'
@@ -78,6 +79,7 @@ const SearchSelect = (props: any) => {
78
79
  const [checkedAll, setCheckedAll] = useState(false)
79
80
  const [indeterminate, setIndeterminate] = useState(false)
80
81
  const [tableFormParams, setTableFormParams] = useState({});
82
+ const [tooltipVisible, setTooltipVisible] = useState(false);
81
83
 
82
84
  // 获取数据源 (type: 1下拉框 2弹框 不传值默认为下拉框)
83
85
  const getData = (params={}, type=1) => {
@@ -96,6 +98,95 @@ const SearchSelect = (props: any) => {
96
98
  });
97
99
  }
98
100
 
101
+ // 数组对象处理,对带有特殊标记的name进行处理
102
+ for (const key in params) {
103
+ if (Object.prototype.hasOwnProperty.call(params, key)) {
104
+ const element = params[key];
105
+ if (element && key.indexOf('*number*') >= 0) {
106
+ const dataParams = key.split('*number*');
107
+ dataParams.forEach((value, index) => {
108
+ params[value] = element[index];
109
+ });
110
+ delete params[key];
111
+ } else if (element && key.indexOf('*address*') >= 0) {
112
+ const dataParams = key.split('*address*');
113
+ dataParams.forEach((value, index) => {
114
+ params[value] = element.PCDCode[index];
115
+ });
116
+ delete params[key];
117
+ } else if (element && key.indexOf('*costType*') >= 0) {
118
+ const dataParams = key.split('*costType*');
119
+ // eslint-disable-next-line prefer-destructuring
120
+ params[dataParams[0]] = element[1];
121
+ delete params[key];
122
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
123
+ const dataParams = key.split('*fullDate*');
124
+ dataParams.forEach((value, index) => {
125
+ if (index === 0) {
126
+ params[value] = moment(element[index])
127
+ .millisecond(0)
128
+ .second(0)
129
+ .minute(0)
130
+ .hour(0)
131
+ .format('YYYY-MM-DD HH:mm:ss');
132
+ } else {
133
+ params[value] = moment(element[index])
134
+ .millisecond(59)
135
+ .second(59)
136
+ .minute(59)
137
+ .hour(23)
138
+ .format('YYYY-MM-DD HH:mm:ss');
139
+ }
140
+ });
141
+ delete params[key];
142
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
143
+ const dataParams = key.split('*checkBox*');
144
+ if(element){
145
+ params[dataParams[0]] = 0
146
+ }
147
+ delete params[key];
148
+ }else if (element && key.indexOf('*cascader*') >= 0) {
149
+ const dataParams = key.split('*cascader*');
150
+ params[dataParams[0]] = element[element.length -1]
151
+ delete params[key];
152
+ } else if (element && key.indexOf('*date*') >= 0) {
153
+ const dataParams = key.split('*date*')
154
+ dataParams.forEach((value, index) => {
155
+ if (index === 0) {
156
+ params[value] = moment(element[index])
157
+ .format('YYYY-MM-DD');
158
+ } else {
159
+ params[value] = moment(element[index])
160
+ .format('YYYY-MM-DD');
161
+ }
162
+ });
163
+ delete params[key];
164
+ }
165
+ else if (element && key.indexOf('*') >= 0) {
166
+ const dataParams = key.split('*');
167
+ dataParams.forEach((value, index) => {
168
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
169
+ });
170
+ delete params[key];
171
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) { // key = xxxxx_selectNumberRange qp-xxxxx-gt
172
+ const dataParams = key.split('_selectNumberRange')[0]
173
+ if (params[key][0] === 'range') {
174
+ if (params[key][1][0]) {
175
+ params[`qp-${dataParams}-ge`] = params[key][1][0]
176
+ }
177
+ if (params[key][1][1]) {
178
+ params[`qp-${dataParams}-le`] = params[key][1][1]
179
+ }
180
+ } else {
181
+ params[`qp-${dataParams}-${params[key][0]}`] = params[key][1]
182
+ }
183
+ delete params[key]
184
+ }else if (Array.isArray(element)) {
185
+ params[key] = element.join(',');
186
+ }
187
+ }
188
+ }
189
+
99
190
  const queryParams = {
100
191
  pageSize,
101
192
  currentPage,
@@ -255,7 +346,7 @@ const SearchSelect = (props: any) => {
255
346
  const onResetTable = () => {
256
347
  form.resetFields();
257
348
  setTableFormParams({});
258
- handleTableChange({ pageSize: tableInitPageSize, currentPage: 1 })
349
+ getData({ pageSize: tableInitPageSize, currentPage: 1 }, 2)
259
350
  }
260
351
 
261
352
  const handleTableChange = (pagination) => {
@@ -408,120 +499,149 @@ const SearchSelect = (props: any) => {
408
499
  }
409
500
  }
410
501
 
502
+ const TooltipContent = () => {
503
+ if(selectMode && value && value?.length){
504
+ const listSelected = JSON.parse(JSON.stringify(items)).filter((i: any) => value.find(item => item === i.value)) || []
505
+ const onClose = (e: any,item: any) => {
506
+ e.preventDefault();
507
+ const newValue = JSON.parse(JSON.stringify(value)).filter((i: any) => i !== item.value)
508
+ onChange(newValue);
509
+ }
510
+ return listSelected?.length && listSelected.map((i: any) => (
511
+ <Tag
512
+ closable={true}
513
+ onClose={(e) => onClose(e,i)}
514
+ style={{ marginRight: 3, background: '#f5f5f5', height: '24px', border: '1px solid #f0f0f0' }}
515
+ >
516
+ {i.text}
517
+ </Tag>
518
+ )) || ''
519
+ } else {
520
+ setTooltipVisible(false)
521
+ }
522
+ return ''
523
+ }
524
+
411
525
  return (
412
526
  <div className={'search_select'}>
413
527
  <div className="search_select_show" id={`search_select_div_${uniqueValue}`}>
414
- <Select
415
- virtual
416
- labelInValue={labelInValue}
417
- value={value}
418
- onChange={onChange}
419
- dropdownRender={menu => (
420
- <>
421
- <Input
422
- value={searchValue}
423
- style={{ width: '98%', marginLeft: '1%' }}
424
- placeholder="请输入"
425
- onChange={e=> onSearchChange(e)}
426
- onBlur={onSearchBlur}
427
- onKeyDown={(e) => {
428
- // 阻止多选的冒泡
429
- e.stopPropagation()
430
- }}
431
- />
432
- <Divider style={{ margin: '8px 0' }} />
433
- {menu}
434
- </>
435
- )}
436
- notFoundContent={
437
- fetching ? <Spin size="small" /> :
438
- <div style={{ textAlign: 'center'}}>
439
- <div style={{ marginBottom: 16 }}>
440
- <CopyOutlined style={{ fontSize: '50px' }} />
528
+ <Tooltip title={TooltipContent} visible={tooltipVisible} trigger={'hover'} onVisibleChange={visible => { if(selectMode && value && value?.length) { setTooltipVisible(visible)} }}>
529
+ <Select
530
+ virtual
531
+ labelInValue={labelInValue}
532
+ value={value}
533
+ onChange={onChange}
534
+ dropdownRender={menu => (
535
+ <>
536
+ <Input
537
+ value={searchValue}
538
+ style={{ width: '98%', marginLeft: '1%' }}
539
+ placeholder="请输入"
540
+ onChange={e=> onSearchChange(e)}
541
+ onBlur={onSearchBlur}
542
+ onKeyDown={(e) => {
543
+ // 阻止多选的冒泡
544
+ e.stopPropagation()
545
+ }}
546
+ />
547
+ <Divider style={{ margin: '8px 0' }} />
548
+ {menu}
549
+ </>
550
+ )}
551
+ notFoundContent={
552
+ fetching ? <Spin size="small" /> :
553
+ <div style={{ textAlign: 'center'}}>
554
+ <div style={{ marginBottom: 16 }}>
555
+ <CopyOutlined style={{ fontSize: '50px' }} />
556
+ </div>
557
+ <div>无匹配结果,请更换其他内容再试</div>
441
558
  </div>
442
- <div>无匹配结果,请更换其他内容再试</div>
443
- </div>
444
- }
445
- onPopupScroll={SelectScroll}
446
- {...currentSelectProps}
447
- getPopupContainer={() => document.getElementById(`search_select_div_${uniqueValue}`)}
448
- style={{ width: 'calc(100% - 30px)' }}
449
- placeholder="请选择"
450
- >
451
- {items.map(item => (
452
- <Option key={item.value} label={item.text}>
453
- {LightHeightOption({ text: `${item.textShowKey} ${item.text}`, filterTxt: searchValue })}
454
- </Option>
455
- ))}
456
- </Select>
457
- <Button style={{width: '30px', padding: '2px', height: 'auto'}} onClick={showModal} type="primary">
458
- <SearchOutlined />
459
- </Button>
460
- </div>
461
- <Modal
462
- width='80%'
463
- title={modalTableProps?.modalTableTitle}
464
- visible={isModalVisible}
465
- onOk={handleOk}
466
- onCancel={handleCancel}
467
- footer={[
468
- <Button key="back" onClick={handleCancel}>
469
- 取消
470
- </Button>,
471
- <Button
472
- key="submit"
473
- type="primary"
474
- onClick={handleOk}
475
- disabled={!tableData.length || (selectProps?.disabled || props?.disabled)}
559
+ }
560
+ onPopupScroll={SelectScroll}
561
+ style={{ width: needModalTable?'calc(100% - 30px)':'calc(100%)' }}
562
+ placeholder="请选择"
563
+ {...currentSelectProps}
564
+ getPopupContainer={() => document.getElementById(`search_select_div_${uniqueValue}`)}
476
565
  >
477
- 确定
478
- </Button>,
479
- ]}
480
- >
481
- <div className={'search_select_wrapper'}>
482
- <div className={'search_select_wrapper_click_flag'} onClick={() => setCaretLeftFlag(!caretLeftFlag)}>
483
- <CaretLeftOutlined className={caretLeftFlag ? 'search_select_wrapper_click_flag_arrow' : 'search_select_wrapper_click_flag_arrow_1' } />
484
- </div>
485
- <div className={caretLeftFlag ? 'search_select_wrapper_left' : 'search_select_wrapper_left1'}>
486
- <div className={'select_list_columns'}>
487
- <div className={'select_list_columns_tips'}>搜索</div>
488
- <div className={'select_list_columns_formItems'}>
489
- <Form form={form} layout='vertical' key='modalForm'>
490
- {formItem(modalTableProps?.tableSearchForm)}
491
- </Form>
492
- </div>
566
+ {items.map(item => (
567
+ <Option key={item.value} label={item.text}>
568
+ {LightHeightOption({ text: `${item.textShowKey} ${item.text}`, filterTxt: searchValue })}
569
+ </Option>
570
+ ))}
571
+ </Select>
572
+ </Tooltip>
573
+ {needModalTable && (
574
+ <Button style={{width: '30px', padding: '2px', height: 'auto'}} onClick={showModal} type="primary">
575
+ <SearchOutlined />
576
+ </Button>
577
+ )}
578
+ </div>
579
+ {needModalTable && isModalVisible && (
580
+ <Modal
581
+ width='80%'
582
+ title={modalTableProps?.modalTableTitle}
583
+ visible={isModalVisible}
584
+ onOk={handleOk}
585
+ onCancel={handleCancel}
586
+ footer={[
587
+ <Button key="back" onClick={handleCancel}>
588
+ 取消
589
+ </Button>,
590
+ <Button
591
+ key="submit"
592
+ type="primary"
593
+ onClick={handleOk}
594
+ disabled={!tableData.length || (selectProps?.disabled || props?.disabled)}
595
+ >
596
+ 确定
597
+ </Button>,
598
+ ]}
599
+ >
600
+ <div className={'search_select_wrapper'}>
601
+ <div className={'search_select_wrapper_click_flag'} onClick={() => setCaretLeftFlag(!caretLeftFlag)}>
602
+ <CaretLeftOutlined className={caretLeftFlag ? 'search_select_wrapper_click_flag_arrow' : 'search_select_wrapper_click_flag_arrow_1' } />
493
603
  </div>
494
- <div className={'select_list_searchButton'}>
495
- <Button key='reset' className={'select_list_button_space'} onClick={onResetTable}>重置</Button>
496
- <Button key='search' type="primary" onClick={onSearchTable}>查询</Button>
604
+ <div className={caretLeftFlag ? 'search_select_wrapper_left' : 'search_select_wrapper_left1'}>
605
+ <div className={'select_list_columns'}>
606
+ <div className={'select_list_columns_tips'}>搜索</div>
607
+ <div className={'select_list_columns_formItems'}>
608
+ <Form form={form} layout='vertical' key='modalForm'>
609
+ {formItem(modalTableProps?.tableSearchForm)}
610
+ </Form>
611
+ </div>
612
+ </div>
613
+ <div className={'select_list_searchButton'}>
614
+ <Button key='reset' className={'select_list_button_space'} onClick={onResetTable}>重置</Button>
615
+ <Button key='search' type="primary" onClick={onSearchTable}>查询</Button>
616
+ </div>
497
617
  </div>
498
- </div>
499
- <div className={caretLeftFlag ? 'search_select_wrapper_right': 'search_select_wrapper_right1'}>
500
- <div>
501
- <div className={'select_list_selectTips'}>
502
- <div style={{ marginLeft: 8 }}>搜索结果共<span style={themeColor}>{tablePagination?.total || 0}</span>项{selectMode ? <span>, 本次已选<span style={themeColor}>{selectedRowKeys?.length || 0}</span>项</span> : ''}</div>
503
- <div style={{ color: 'rgba(127, 127, 127, 0.6470588235294118)' }}>{selectMode ? '勾选后点击确定按钮完成选择' : '双击数据行或点击单选图标完成选择'}</div>
618
+ <div className={caretLeftFlag ? 'search_select_wrapper_right': 'search_select_wrapper_right1'}>
619
+ <div>
620
+ <div className={'select_list_selectTips'}>
621
+ <div style={{ marginLeft: 8 }}>搜索结果共<span style={themeColor}>{tablePagination?.total || 0}</span>项{selectMode ? <span>, 本次已选<span style={themeColor}>{selectedRowKeys?.length || 0}</span>项</span> : ''}</div>
622
+ <div style={{ color: 'rgba(127, 127, 127, 0.6470588235294118)' }}>{selectMode ? '勾选后点击确定按钮完成选择' : '双击数据行或点击单选图标完成选择'}</div>
623
+ </div>
624
+ <Table
625
+ size='small'
626
+ rowSelection={rowSelection}
627
+ columns={modalTableProps?.tableColumns}
628
+ dataSource={tableData}
629
+ pagination={tablePagination}
630
+ onChange={handleTableChange}
631
+ rowKey={mappingValueField}
632
+ scroll={{ x: modalTableProps.overScrollX || 'max-content', y: modalTableProps.overScrollY || null }}
633
+ onRow={record => {
634
+ return {
635
+ onDoubleClick: event => onDoubleClickSelect(event, record),
636
+ };
637
+ }}
638
+ />
639
+ {selectMode ? <div className={'select_list_selectAll'}><Checkbox indeterminate={indeterminate} checked={checkedAll} onChange={onChangeCheckAll} /> 全选所有页面</div> : ''}
504
640
  </div>
505
- <Table
506
- size='small'
507
- rowSelection={rowSelection}
508
- columns={modalTableProps?.tableColumns}
509
- dataSource={tableData}
510
- pagination={tablePagination}
511
- onChange={handleTableChange}
512
- rowKey={mappingValueField}
513
- scroll={{ x: modalTableProps.overScrollX || 'max-content', y: modalTableProps.overScrollY || null }}
514
- onRow={record => {
515
- return {
516
- onDoubleClick: event => onDoubleClickSelect(event, record),
517
- };
518
- }}
519
- />
520
- {selectMode ? <div className={'select_list_selectAll'}><Checkbox indeterminate={indeterminate} checked={checkedAll} onChange={onChangeCheckAll} /> 全选所有页面</div> : ''}
521
641
  </div>
522
642
  </div>
523
- </div>
524
- </Modal>
643
+ </Modal>
644
+ )}
525
645
  </div>
526
646
  );
527
647
  };
package/src/index.ts CHANGED
@@ -13,8 +13,9 @@ const resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
13
13
 
14
14
  axios.defaults.headers.common['sso-sessionid'] = resposne?.sessionId || '';
15
15
 
16
- export { default as DataValidation } from './components/DataValidation';
17
- export { default as QueryMutipleInput } from './components/QueryMutipleInput';
16
+ export { default as DataValidation } from './components/Functional/DataValidation';
17
+ export { default as QueryMutipleInput } from './components/Functional/QueryMutipleInput';
18
+ export { default as SearchSelect } from './components/Functional/SearchSelect';
19
+ export { default as BusinessSearchSelect } from './components/Business/SearchSelect';
20
+ export { default as CommodityEntry } from './components/Business/CommodityEntry';
18
21
  export { default as CheckOneUser } from './utils/CheckOneUser';
19
- export { default as SearchSelect } from './components/SearchSelect';
20
- export { default as BusinessSearchSelect } from './components/SearchSelect/business/BusinessSearchSelect';