@bit-sun/business-component 2.0.0 → 2.0.3

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 (26) hide show
  1. package/dist/components/Business/AddSelectBusiness/index.d.ts +1 -0
  2. package/dist/components/Business/TreeSearchSelect/index.d.ts +3 -0
  3. package/dist/components/Business/TreeSearchSelect/utils.d.ts +2 -0
  4. package/dist/components/Functional/AddSelect/index.d.ts +3 -0
  5. package/dist/components/Functional/TreeSearchSelect/index.d.ts +2 -0
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.esm.js +2189 -140
  8. package/dist/index.js +2191 -138
  9. package/dist/utils/CheckOneUser/index.d.ts +1 -1
  10. package/package.json +1 -1
  11. package/src/components/Business/AddSelectBusiness/index.md +37 -0
  12. package/src/components/Business/AddSelectBusiness/index.tsx +295 -0
  13. package/src/components/Business/CommodityEntry/index.md +2 -2
  14. package/src/components/Business/CommodityEntry/index.tsx +5 -2
  15. package/src/components/Business/SearchSelect/BusinessUtils.ts +2 -0
  16. package/src/components/Business/TreeSearchSelect/index.md +126 -0
  17. package/src/components/Business/TreeSearchSelect/index.tsx +34 -0
  18. package/src/components/Business/TreeSearchSelect/utils.ts +60 -0
  19. package/src/components/Functional/AddSelect/index.less +284 -0
  20. package/src/components/Functional/AddSelect/index.md +118 -0
  21. package/src/components/Functional/AddSelect/index.tsx +882 -0
  22. package/src/components/Functional/DataImport/index.tsx +0 -1
  23. package/src/components/Functional/DataValidation/index.tsx +8 -1
  24. package/src/components/Functional/TreeSearchSelect/index.md +47 -0
  25. package/src/components/Functional/TreeSearchSelect/index.tsx +148 -0
  26. package/src/index.ts +8 -0
@@ -0,0 +1,284 @@
1
+ .add_select {
2
+ &_show {
3
+ display: flex;
4
+ }
5
+
6
+ &_expand_button {
7
+ position: relative;
8
+ width: 30px;
9
+ color: #ffffff;
10
+ cursor: pointer;
11
+
12
+ span {
13
+ position: absolute;
14
+ height: 20px;
15
+ line-height: 14px;
16
+ left: 50%;
17
+ top: 50%;
18
+ transform: translate(-50%, -50%);
19
+ }
20
+ }
21
+
22
+ &_header {
23
+ border-bottom: 1px solid #D9D9D9;
24
+ height: 24px;
25
+ height: 40px;
26
+ font-family: PingFangSC-Medium;
27
+ font-weight: 500;
28
+ font-size: 18px;
29
+ color: #000000;
30
+ letter-spacing: 0;
31
+ line-height: 40px;
32
+ margin-bottom: 10px;
33
+ padding-left: 10px;
34
+
35
+ & > span {
36
+ margin-left: 20px;
37
+ font-weight: 400;
38
+ font-size: 12px;
39
+ color: #666666;
40
+ letter-spacing: 0;
41
+ line-height: 40px;
42
+
43
+ & > span {
44
+ color: #ff0000;
45
+ }
46
+ }
47
+
48
+ &_close {
49
+ span {
50
+ position: absolute;
51
+ color: black !important;
52
+ right: 10px;
53
+ top: 10px;
54
+ }
55
+ }
56
+ }
57
+
58
+ &_wrapper {
59
+ position: relative;
60
+ display: flex;
61
+ // min-height: 60vh;
62
+ max-height: 60vh;
63
+ overflow: hidden;
64
+ font-size: 14px;
65
+ margin: 5px 10px;
66
+
67
+
68
+ .ant-table-pagination.ant-pagination {
69
+ margin: 5px;
70
+ padding-right: 5px;
71
+ }
72
+
73
+ .ant-checkbox-wrapper {
74
+ justify-content: center;
75
+ }
76
+
77
+ .ant-form-item-label {
78
+ padding: 0PX;
79
+ line-height: 23px !important;
80
+ }
81
+
82
+ .ant-form-item-label > label {
83
+ font-size: 12px;
84
+ }
85
+
86
+ .ant-table-thead {
87
+ th {
88
+ height: 20px !important;
89
+ padding: 0px 8px !important;
90
+ font-size: 12px !important;
91
+ font-weight: 600 !important;
92
+ line-height: 20px !important;
93
+ }
94
+ }
95
+
96
+ .ant-modal-body {
97
+ padding: 10px;
98
+ }
99
+
100
+ .ant-table-wrapper {
101
+ padding: 0px !important;
102
+ }
103
+
104
+ .row-class {
105
+ height: 24px;
106
+
107
+ td {
108
+ font-size: 12px !important;
109
+ height: 24px !important;
110
+ padding: 0px 8px !important;
111
+ line-height: 20px !important;
112
+ }
113
+ }
114
+
115
+ .ant-table-body {
116
+ height: 240px;
117
+ overflow-y: auto !important;
118
+ }
119
+
120
+ .ant-row.ant-form-item {
121
+ margin-bottom: 10px;
122
+ }
123
+
124
+ &_click_flag {
125
+ position: absolute;
126
+ z-index: 10;
127
+ &_arrow {
128
+ transform: rotate(0deg);
129
+ transition: transform 0.5s;
130
+ }
131
+ &_arrow_1 {
132
+ transform: rotate(-180deg);
133
+ transition: transform 0.5s;
134
+ }
135
+ }
136
+
137
+ &_left {
138
+ flex-basis: 298px;
139
+ width: 298px;
140
+ overflow-y: hidden;
141
+ //background-color: yellow;
142
+ transition: all 0.3s;
143
+ margin-right: 10px;
144
+ border: 1px solid #D9D9D9;
145
+ border-radius: 5px;
146
+ }
147
+
148
+ &_left1 {
149
+ width: 0;
150
+ height: 0;
151
+ transition: all 0.3s;
152
+ display: none;
153
+ }
154
+
155
+ &_right {
156
+ width: 872px;
157
+ //background-color: pink;
158
+ border: 1px solid #D9D9D9;
159
+ border-radius: 5px;
160
+ }
161
+
162
+ &_right1 {
163
+ width: 100%;
164
+ margin-left: 10px;
165
+ //background-color: green;
166
+ }
167
+
168
+ &_right, &_right1 {
169
+ overflow-x: auto;
170
+ }
171
+
172
+ .select_list_columns {
173
+ height: 272px;
174
+ overflow-y: auto;
175
+ border-bottom: 1px solid #D9D9D9;
176
+
177
+ &_tips {
178
+ background: #eee;
179
+ padding: 6px 20px;
180
+ margin-bottom: 10px;
181
+ }
182
+ &_formItems {
183
+ padding: 7px 10px;
184
+ }
185
+ }
186
+ .select_list_searchButton {
187
+ display: flex;
188
+ margin: 10px;
189
+ justify-content: flex-end;
190
+ }
191
+
192
+ .select_list_button_space {
193
+ margin-right: 10px;
194
+ }
195
+
196
+ .select_list_selectTips {
197
+ display: flex;
198
+ justify-content: space-between;
199
+ height: 24px;
200
+ font-size: 12px;
201
+ line-height: 24px;
202
+ background: #F7F8FB;
203
+ padding: 0 5px;
204
+ border-bottom: 1px solid #D9D9D9;
205
+ }
206
+
207
+ .select_list_selectAll {
208
+ position: relative;
209
+ top: -40px;
210
+ left: 20px;
211
+ width: 160px;
212
+ }
213
+ }
214
+
215
+ &_wrapper_select {
216
+ margin-top: 4px;
217
+ border: 1px solid #D9D9D9;
218
+ border-radius: 5px;
219
+ margin: 5px 10px;
220
+
221
+
222
+ .ant-table-pagination.ant-pagination {
223
+ margin: 9px;
224
+ padding-right: 5px;
225
+ }
226
+
227
+ .ant-modal-body {
228
+ padding: 10px;
229
+ }
230
+
231
+ .ant-table-wrapper {
232
+ padding: 0px !important;
233
+ }
234
+
235
+ .ant-table-thead {
236
+ th {
237
+ height: 23px !important;
238
+ padding: 0px 8px !important;
239
+ font-size: 12px !important;
240
+ font-weight: 600 !important;
241
+ line-height: 23px !important;
242
+ }
243
+ }
244
+
245
+ .ant-modal-close-x {
246
+ height: 30px;
247
+ }
248
+
249
+ .row-class {
250
+ height: 30px;
251
+
252
+ td {
253
+ font-size: 12px !important;
254
+ height: 30px !important;
255
+ padding: 4px 8px !important;
256
+ }
257
+ }
258
+
259
+ .ant-table-body {
260
+ height: 200px;
261
+ overflow-y: auto !important;
262
+ }
263
+
264
+ .ant-row.ant-form-item {
265
+ margin-bottom: 10px;
266
+ }
267
+
268
+ .ant-input-number-input {
269
+ height: auto;
270
+ }
271
+
272
+ .select_list_selectTips {
273
+ display: flex;
274
+ justify-content: space-between;
275
+ height: 24px;
276
+ font-size: 12px;
277
+ line-height: 24px;
278
+ background: #F7F8FB;
279
+ padding: 0 3px;
280
+
281
+ border-bottom: 1px solid #D9D9D9;
282
+ }
283
+ }
284
+ }
@@ -0,0 +1,118 @@
1
+ ---
2
+ nav:
3
+ title: '组件'
4
+ order: 1
5
+ group:
6
+ title: 功能组件
7
+ order: 0
8
+ title: 添加选择器
9
+ order: 3
10
+ ---
11
+
12
+ ## AddSelect
13
+
14
+ Demo:
15
+
16
+ ```tsx
17
+ import React, { useState } from 'react';
18
+ import { AddSelect } from '../../../index';
19
+
20
+ export default () => {
21
+ const selectProps = {
22
+ mode: 'multiple',
23
+ }
24
+ const [value, setValue] = useState(selectProps?.mode ? [] : null);
25
+ const props = {
26
+ value,
27
+ // labelInValue: true, // 非必填 默认为false
28
+ requestConfig: {
29
+ url: `/items/sku/pager/v2`,
30
+ filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
31
+ otherParams: {}, // 默认参数
32
+ mappingTextField: 'name',
33
+ mappingValueField: 'skuCode',
34
+ },
35
+ selectProps,
36
+ onChange: (value: any) => {
37
+ console.log(value)
38
+ setValue(value)
39
+ },
40
+ onSaveCallback: (rows) => {
41
+ console.log('save call', rows);
42
+ // return Promise.resolve(true);
43
+ // return Promise.reject('FAILE')
44
+ }
45
+ };
46
+ const DictionaryUC000013 = [{ text: '共享', value: '10' }, { text: '私有', value: '20' }]
47
+ const modalTableProps = {
48
+ modalTableTitle: '选择商品',
49
+ tableSearchForm: [
50
+ { name: 'qp-name-like', label: 'SKU名称' }, // field: { type: 'input', props: { placeholder: '8888'}}
51
+ { name: 'qp-code-like', label: 'SKU编码' },
52
+ ],
53
+ tableColumns: [
54
+ {
55
+ title: '商品编码',
56
+ width: 150,
57
+ dataIndex: 'skuCode',
58
+ },
59
+ {
60
+ title: '商品名称',
61
+ width: 250,
62
+ dataIndex: 'name',
63
+ },
64
+ {
65
+ title: '归属集团',
66
+ width: 150,
67
+ dataIndex: 'conglomerateName',
68
+ },
69
+ {
70
+ title: '归属法人公司',
71
+ width: 150,
72
+ dataIndex: 'legalCompanyName',
73
+ },
74
+ ],
75
+ selectColumn: [
76
+ {
77
+ title: '商品编码',
78
+ width: 150,
79
+ dataIndex: 'skuCode',
80
+ },
81
+ {
82
+ title: '商品名称',
83
+ width: 250,
84
+ dataIndex: 'name',
85
+ },
86
+ {
87
+ title: '数量',
88
+ width: 150,
89
+ isInputItem: true,
90
+ dataIndex: 'count',
91
+ },
92
+ {
93
+ title: '价格',
94
+ width: 150,
95
+ dataIndex: 'price',
96
+ isInputItem: true,
97
+ },
98
+ {
99
+ title: '折扣',
100
+ width: 150,
101
+ dataIndex: 'sales',
102
+ isInputItem: true,
103
+ }
104
+ ]
105
+ }
106
+
107
+ return (
108
+ <div>
109
+ <AddSelect
110
+ {...props}
111
+ modalTableProps={modalTableProps}
112
+ />
113
+ </div>
114
+ );
115
+ };
116
+ ```
117
+
118
+ More skills for writing demo: https://d.umijs.org/guide/demo-principle