@bit-sun/business-component 2.0.4 → 2.0.7

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.
@@ -1,2 +1,2 @@
1
- declare const _default: (storageKeyString: string, seconds?: number, tipsCallFunction?: () => {}) => void;
1
+ declare const _default: (storageKeyString: string, seconds?: number, tipsCallFunction?: (() => {}) | undefined) => void;
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.0.4",
3
+ "version": "2.0.7",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -21,7 +21,9 @@ export const AddSkuSelect = (parProps: any) => {
21
21
  requestConfig: {
22
22
  url: `/items/sku/pager/v2`,
23
23
  filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
24
- otherParams: {}, // 默认参数
24
+ otherParams: {
25
+ 'qp-combination-eq': false,
26
+ }, // 默认参数
25
27
  mappingTextField: 'name',
26
28
  mappingValueField: 'skuCode',
27
29
  },
@@ -242,6 +242,7 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
242
242
  mappingValueField: 'skuCode',
243
243
  mappingTextShowTextField: ['name', 'propertyNameAndValue'],
244
244
  otherParams: {
245
+ 'qp-combination-eq': false,
245
246
  'qp-approveStatus-eq': 1,
246
247
  // 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
247
248
  sorter: 'desc-id'
@@ -55,6 +55,40 @@
55
55
  }
56
56
  }
57
57
 
58
+ &_quick_header {
59
+ font-family: PingFangSC-Medium;
60
+ font-weight: 500;
61
+ font-size: 18px;
62
+ color: #000000;
63
+ letter-spacing: 0;
64
+
65
+ &_title {
66
+ display: flex;
67
+ justify-content: space-between;
68
+ }
69
+
70
+ & > span {
71
+ font-weight: 400;
72
+ font-size: 12px;
73
+ color: #666666;
74
+ letter-spacing: 0;
75
+ line-height: 20px;
76
+
77
+ & > span {
78
+ color: #ff0000;
79
+ }
80
+ }
81
+
82
+ &_close {
83
+ span {
84
+ position: absolute;
85
+ color: black !important;
86
+ right: 10px;
87
+ top: 10px;
88
+ }
89
+ }
90
+ }
91
+
58
92
  &_wrapper {
59
93
  position: relative;
60
94
  display: flex;
@@ -265,8 +299,38 @@
265
299
  margin-bottom: 10px;
266
300
  }
267
301
 
268
- .ant-input-number-input {
302
+ .ant-input-number-input, .ant-input {
269
303
  height: auto;
304
+ height: 22px;
305
+ padding: 0px 10px;
306
+ font-size: 12px;
307
+ }
308
+
309
+ .ant-select-selection-search-input {
310
+ height: auto;
311
+ height: 22px !important;
312
+ padding: 0px 10px;
313
+ font-size: 12px;
314
+ }
315
+
316
+ .ant-select {
317
+ .ant-select-arrow {
318
+ top: 13px;
319
+ }
320
+ }
321
+
322
+ .ant-select-selector {
323
+ position: relative;
324
+ top: 1px;
325
+
326
+ height: 23px !important;
327
+ line-height: 23px !important;
328
+
329
+ .ant-select-selection-item, ant-select-selection-search {
330
+ height: 23px !important;
331
+ line-height: 23px !important;
332
+ font-size: 12px;
333
+ }
270
334
  }
271
335
 
272
336
  .select_list_selectTips {
@@ -281,4 +345,8 @@
281
345
  border-bottom: 1px solid #D9D9D9;
282
346
  }
283
347
  }
348
+
349
+ &_wrapper_select_quick {
350
+ margin: 0;
351
+ }
284
352
  }
@@ -28,7 +28,9 @@ export default () => {
28
28
  requestConfig: {
29
29
  url: `/items/sku/pager/v2`,
30
30
  filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
31
- otherParams: {}, // 默认参数
31
+ otherParams: {
32
+ 'qp-combination-eq': false,
33
+ }, // 默认参数
32
34
  mappingTextField: 'name',
33
35
  mappingValueField: 'skuCode',
34
36
  },
@@ -0,0 +1,371 @@
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
+ &_quick_header {
59
+ font-family: PingFangSC-Medium;
60
+ font-weight: 500;
61
+ font-size: 18px;
62
+ color: #000000;
63
+ letter-spacing: 0;
64
+
65
+ &_title {
66
+ display: flex;
67
+ justify-content: space-between;
68
+ }
69
+
70
+ & > span {
71
+ font-weight: 400;
72
+ font-size: 12px;
73
+ color: #666666;
74
+ letter-spacing: 0;
75
+ line-height: 20px;
76
+
77
+ & > span {
78
+ color: #ff0000;
79
+ }
80
+ }
81
+
82
+ &_close {
83
+ span {
84
+ position: absolute;
85
+ color: black !important;
86
+ right: 10px;
87
+ top: 10px;
88
+ }
89
+ }
90
+ }
91
+
92
+ &_wrapper {
93
+ position: relative;
94
+ display: flex;
95
+ // min-height: 60vh;
96
+ max-height: 60vh;
97
+ overflow: hidden;
98
+ font-size: 14px;
99
+ margin: 5px 10px;
100
+
101
+
102
+ .ant-table-pagination.ant-pagination {
103
+ margin: 5px;
104
+ padding-right: 5px;
105
+ }
106
+
107
+ .ant-checkbox-wrapper {
108
+ justify-content: center;
109
+ }
110
+
111
+ .ant-form-item-label {
112
+ padding: 0PX;
113
+ line-height: 23px !important;
114
+ }
115
+
116
+ .ant-form-item-label > label {
117
+ font-size: 12px;
118
+ }
119
+
120
+ .ant-table-thead {
121
+ th {
122
+ height: 20px !important;
123
+ padding: 0px 8px !important;
124
+ font-size: 12px !important;
125
+ font-weight: 600 !important;
126
+ line-height: 20px !important;
127
+ }
128
+ }
129
+
130
+ .ant-modal-body {
131
+ padding: 10px;
132
+ }
133
+
134
+ .ant-table-wrapper {
135
+ padding: 0px !important;
136
+ }
137
+
138
+ .row-class {
139
+ height: 24px;
140
+
141
+ td {
142
+ font-size: 12px !important;
143
+ height: 24px !important;
144
+ padding: 0px 8px !important;
145
+ line-height: 20px !important;
146
+ }
147
+ }
148
+
149
+ .ant-table-body {
150
+ height: 240px;
151
+ overflow-y: auto !important;
152
+ }
153
+
154
+ .ant-row.ant-form-item {
155
+ margin-bottom: 10px;
156
+ }
157
+
158
+ &_click_flag {
159
+ position: absolute;
160
+ z-index: 10;
161
+ &_arrow {
162
+ transform: rotate(0deg);
163
+ transition: transform 0.5s;
164
+ }
165
+ &_arrow_1 {
166
+ transform: rotate(-180deg);
167
+ transition: transform 0.5s;
168
+ }
169
+ }
170
+
171
+ &_left {
172
+ flex-basis: 298px;
173
+ width: 298px;
174
+ overflow-y: hidden;
175
+ //background-color: yellow;
176
+ transition: all 0.3s;
177
+ margin-right: 10px;
178
+ border: 1px solid #D9D9D9;
179
+ border-radius: 5px;
180
+ }
181
+
182
+ &_left1 {
183
+ width: 0;
184
+ height: 0;
185
+ transition: all 0.3s;
186
+ display: none;
187
+ }
188
+
189
+ &_right {
190
+ width: 872px;
191
+ //background-color: pink;
192
+ border: 1px solid #D9D9D9;
193
+ border-radius: 5px;
194
+ }
195
+
196
+ &_right1 {
197
+ width: 100%;
198
+ margin-left: 10px;
199
+ //background-color: green;
200
+ }
201
+
202
+ &_right, &_right1 {
203
+ overflow-x: auto;
204
+ }
205
+
206
+ .select_list_columns {
207
+ height: 272px;
208
+ overflow-y: auto;
209
+ border-bottom: 1px solid #D9D9D9;
210
+
211
+ &_tips {
212
+ background: #eee;
213
+ padding: 6px 20px;
214
+ margin-bottom: 10px;
215
+ }
216
+ &_formItems {
217
+ padding: 7px 10px;
218
+ }
219
+ }
220
+ .select_list_searchButton {
221
+ display: flex;
222
+ margin: 10px;
223
+ justify-content: flex-end;
224
+ }
225
+
226
+ .select_list_button_space {
227
+ margin-right: 10px;
228
+ }
229
+
230
+ .select_list_selectTips {
231
+ display: flex;
232
+ justify-content: space-between;
233
+ height: 24px;
234
+ font-size: 12px;
235
+ line-height: 24px;
236
+ background: #F7F8FB;
237
+ padding: 0 5px;
238
+ border-bottom: 1px solid #D9D9D9;
239
+ }
240
+
241
+ .select_list_selectAll {
242
+ position: relative;
243
+ top: -40px;
244
+ left: 20px;
245
+ width: 160px;
246
+ }
247
+ }
248
+
249
+ &_wrapper_select {
250
+ margin-top: 4px;
251
+ border: 1px solid #D9D9D9;
252
+ border-radius: 5px;
253
+ margin: 5px 10px;
254
+
255
+
256
+ .ant-table-pagination.ant-pagination {
257
+ margin: 9px;
258
+ padding-right: 5px;
259
+ }
260
+
261
+ .ant-modal-body {
262
+ padding: 10px;
263
+ }
264
+
265
+ .ant-table-wrapper {
266
+ padding: 0px !important;
267
+ }
268
+
269
+ .ant-table-thead {
270
+ th {
271
+ height: 23px !important;
272
+ padding: 0px 8px !important;
273
+ font-size: 12px !important;
274
+ font-weight: 600 !important;
275
+ line-height: 23px !important;
276
+ }
277
+ }
278
+
279
+ .ant-modal-close-x {
280
+ height: 30px;
281
+ }
282
+
283
+ .row-class {
284
+ height: 30px;
285
+
286
+ td {
287
+ font-size: 12px !important;
288
+ height: 30px !important;
289
+ padding: 4px 8px !important;
290
+ }
291
+ }
292
+
293
+ .ant-table-body {
294
+ height: 200px;
295
+ overflow-y: auto !important;
296
+ }
297
+
298
+ .ant-row.ant-form-item {
299
+ margin-bottom: 10px;
300
+ }
301
+
302
+ .ant-input-number-input, .ant-input {
303
+ height: auto;
304
+ height: 22px;
305
+ padding: 0px 10px;
306
+ font-size: 12px;
307
+ }
308
+
309
+ .ant-select-selection-search-input {
310
+ height: auto;
311
+ height: 22px !important;
312
+ padding: 0px 10px;
313
+ font-size: 12px;
314
+ }
315
+
316
+ .ant-select {
317
+ .ant-select-arrow {
318
+ top: 13px;
319
+ }
320
+ }
321
+
322
+ .ant-select-selector {
323
+ position: relative;
324
+ top: 1px;
325
+
326
+ height: 23px !important;
327
+ line-height: 23px !important;
328
+
329
+ .ant-select-selection-item, ant-select-selection-search {
330
+ height: 23px !important;
331
+ line-height: 23px !important;
332
+ font-size: 12px;
333
+ }
334
+ }
335
+
336
+ .select_list_selectTips {
337
+ display: flex;
338
+ justify-content: space-between;
339
+ height: 24px;
340
+ font-size: 12px;
341
+ line-height: 24px;
342
+ background: #F7F8FB;
343
+ padding: 0 3px;
344
+
345
+ border-bottom: 1px solid #D9D9D9;
346
+ }
347
+ }
348
+
349
+ div.add_select_wrapper_select.add_select_wrapper_select_quick {
350
+ margin: 0;
351
+
352
+ .ant-table-body {
353
+ height: 240px;
354
+ overflow-y: auto !important;
355
+ }
356
+
357
+ // table 的斑马线
358
+ .table_base {
359
+ background: #fff;
360
+ }
361
+ .table_odd {
362
+ background: #f7f8fb;
363
+ }
364
+
365
+ // 浮起的列 设置斑马
366
+ .ant-table-cell-fix-left,
367
+ .ant-table-cell-fix-right {
368
+ background: #FFFFFF !important;
369
+ }
370
+ }
371
+ }
@@ -0,0 +1,37 @@
1
+ ---
2
+ nav:
3
+ title: '组件'
4
+ order: 1
5
+ group:
6
+ title: 功能组件
7
+ order: 0
8
+ title: 单据录入
9
+ order: 4
10
+ ---
11
+
12
+ ## AddSelect
13
+
14
+ Demo:
15
+
16
+ ```tsx
17
+ import React, { useState } from 'react';
18
+ import { Tooltip, Select } from 'antd';
19
+ import BillEntry from './index';
20
+
21
+ export default () => {
22
+
23
+ return (
24
+ <div>
25
+ <div style={{height: '1000px'}}></div>
26
+ <BillEntry
27
+ onSaveCallback={(rows) => {
28
+ console.log(rows)
29
+ }}
30
+ />
31
+ <div style={{height: '1000px'}}></div>
32
+ </div>
33
+ );
34
+ };
35
+ ```
36
+
37
+ More skills for writing demo: https://d.umijs.org/guide/demo-principle