@bit-sun/business-component 2.2.49 → 2.3.1

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 (31) hide show
  1. package/dist/common/ENUM.d.ts +40 -0
  2. package/dist/components/Functional/BsAntdSula/BsCascader/index.d.ts +18 -0
  3. package/dist/components/Functional/BsAntdSula/index.d.ts +1 -0
  4. package/dist/components/Solution/RuleComponent/Formula.d.ts +8 -0
  5. package/dist/components/Solution/RuleComponent/services.d.ts +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.esm.js +10513 -11455
  8. package/dist/index.js +10827 -11765
  9. package/dist/utils/index.d.ts +1 -0
  10. package/dist/utils/utils.d.ts +7 -0
  11. package/package.json +2 -1
  12. package/src/common/ENUM.ts +41 -0
  13. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +4 -0
  14. package/src/components/Business/JsonQueryTable/index.tsx +248 -33
  15. package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -0
  16. package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -0
  17. package/src/components/Functional/BsAntdSula/index.ts +2 -0
  18. package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -0
  19. package/src/components/Functional/EllipsisTooltip/index.js +36 -0
  20. package/src/components/Functional/EllipsisTooltip/index.md +30 -0
  21. package/src/components/Solution/RuleComponent/Formula.tsx +335 -0
  22. package/src/components/Solution/RuleComponent/index.d.ts +29 -0
  23. package/src/components/Solution/RuleComponent/index.js +2028 -0
  24. package/src/components/Solution/RuleComponent/index.less +230 -0
  25. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -0
  26. package/src/components/Solution/RuleComponent/ruleFiled.js +2074 -0
  27. package/src/components/Solution/RuleComponent/services.ts +13 -0
  28. package/src/components/Solution/RuleComponent/util.js +139 -0
  29. package/src/index.ts +4 -0
  30. package/src/utils/index.ts +1 -0
  31. package/src/utils/utils.ts +29 -0
@@ -0,0 +1,2074 @@
1
+ import React, { Component } from 'react';
2
+ import { Select, Input, InputNumber, DatePicker, TimePicker } from 'antd';
3
+ import styles from './index.less';
4
+ import { getRegularThresholdRange } from './services';
5
+ import moment from 'moment';
6
+ import { handleError, judgeIsEmpty } from '../../../utils/utils';
7
+ import { queryIdentityInfo, findChangedThresholdQuery, setParams } from './util';
8
+ import { request as SulaRequest } from 'bssula';
9
+ import { stringify } from 'querystring';
10
+ import {
11
+ BusinessSearchSelect,
12
+ BusinessTreeSearchSelect,
13
+ BsCascader
14
+ } from '../../../index';
15
+ const { RangePicker } = DatePicker;
16
+
17
+ export default class RuleField extends Component {
18
+ constructor(props) {
19
+ super(props);
20
+ this.state = {
21
+ selectOperation: '',
22
+ dataTypeCode: '',
23
+ dataChoiceBusinessType: '',
24
+ dataInputBusinessType: '',
25
+ fieldValues: [],
26
+ thresholdQuery: {},
27
+ thresholdList: [],
28
+ options: [],
29
+ };
30
+ }
31
+
32
+ componentDidMount() {
33
+ const {
34
+ selectOperation,
35
+ dataTypeCode,
36
+ dataChoiceBusinessType,
37
+ dataInputBusinessType,
38
+ options,
39
+ values,
40
+ initialThresholdQuery,
41
+ queryIdentify,
42
+ propertyCode,
43
+ queryIdentifyType,
44
+ } = this.props;
45
+ this.setState(
46
+ {
47
+ selectOperation,
48
+ thresholdQuery: initialThresholdQuery
49
+ ? {
50
+ ...initialThresholdQuery,
51
+ }
52
+ : {},
53
+ dataTypeCode,
54
+ dataChoiceBusinessType,
55
+ dataInputBusinessType,
56
+ fieldValues: [...values],
57
+ options,
58
+ },
59
+ () => {
60
+ !judgeIsEmpty(queryIdentify) &&
61
+ this.getRegularThresholdRange(
62
+ queryIdentify,
63
+ propertyCode,
64
+ queryIdentifyType,
65
+ );
66
+ },
67
+ );
68
+ window.addEventListener('testEvent', this.eventHandle);
69
+ }
70
+
71
+ eventHandle = (obj) => {
72
+ const { thresholdQuery } = this.state;
73
+ const { queryIdentify, propertyCode, queryIdentifyType } = this.props;
74
+ this.setState(
75
+ {
76
+ thresholdQuery: {
77
+ ...thresholdQuery,
78
+ ...obj.data,
79
+ },
80
+ },
81
+ () => {
82
+ this.getRegularThresholdRange(
83
+ queryIdentify,
84
+ propertyCode,
85
+ queryIdentifyType,
86
+ );
87
+ },
88
+ );
89
+ };
90
+
91
+ componentWillUnmount() {
92
+ window.removeEventListener('testEvent', this.eventHandle);
93
+ }
94
+
95
+ componentWillReceiveProps(nextProps) {
96
+ if (nextProps.selectOperation != this.props.selectOperation) {
97
+ this.setState({
98
+ selectOperation: nextProps.selectOperation,
99
+ });
100
+ }
101
+ if (nextProps.dataTypeCode != this.props.dataTypeCode) {
102
+ this.setState({
103
+ dataTypeCode: nextProps.dataTypeCode,
104
+ });
105
+ }
106
+ if (nextProps.dataChoiceBusinessType != this.props.dataChoiceBusinessType) {
107
+ this.setState({
108
+ dataChoiceBusinessType: nextProps.dataChoiceBusinessType,
109
+ });
110
+ }
111
+ if (nextProps.dataInputBusinessType != this.props.dataInputBusinessType) {
112
+ this.setState({
113
+ dataInputBusinessType: nextProps.dataInputBusinessType,
114
+ });
115
+ }
116
+ // if (nextProps.selectOperation != this.props.selectOperation) {
117
+ // this.setState({
118
+ // options: nextProps.options
119
+ // })
120
+ // }
121
+ if (
122
+ nextProps.queryIdentify &&
123
+ nextProps.queryIdentify != this.props.queryIdentify
124
+ ) {
125
+ this.getRegularThresholdRange(
126
+ nextProps.queryIdentify,
127
+ nextProps.propertyCode,
128
+ nextProps.queryIdentifyType,
129
+ );
130
+ }
131
+
132
+ if (
133
+ JSON.stringify(nextProps.initialThresholdQuery) !=
134
+ JSON.stringify(this.props.initialThresholdQuery)
135
+ ) {
136
+ console.log(
137
+ findChangedThresholdQuery(
138
+ this.props.initialThresholdQuery,
139
+ nextProps.initialThresholdQuery,
140
+ ),
141
+ );
142
+ let changedPropsVal = findChangedThresholdQuery(
143
+ this.props.initialThresholdQuery,
144
+ nextProps.initialThresholdQuery,
145
+ );
146
+ this.setState(
147
+ {
148
+ thresholdQuery: {
149
+ ...nextProps.initialThresholdQuery,
150
+ },
151
+ },
152
+ () => {
153
+ if (changedPropsVal.indexOf(nextProps.propertyCode) > -1) {
154
+ this.getRegularThresholdRange(
155
+ nextProps.queryIdentify,
156
+ nextProps.propertyCode,
157
+ nextProps.queryIdentifyType,
158
+ );
159
+ }
160
+ },
161
+ );
162
+ }
163
+ }
164
+
165
+ //规则对象属性枚举值查询处理 queryIdentify有值是表示该属性有枚举选择
166
+ getRegularThresholdRange = async (
167
+ queryIdentify,
168
+ propertyCode,
169
+ queryIdentifyType,
170
+ ) => {
171
+ if (!queryIdentify) return;
172
+ const { thresholdQuery } = this.state;
173
+ let extraRequestUrl = '';
174
+ let querParams = setParams(propertyCode, thresholdQuery);
175
+ if (queryIdentityInfo.find((item) => item.identity == propertyCode)) {
176
+ //判断查询属性枚举时有没有必传参数,如果必传参数没有值则不调用查询接口
177
+ let needQueryList = queryIdentityInfo
178
+ .find((item) => item.identity == propertyCode)
179
+ .queryParam.filter((item) => item.isRequired)
180
+ .map((item) => item.queryKey);
181
+ if (
182
+ needQueryList.some(
183
+ (item) => !querParams[item] || !querParams[item].length,
184
+ )
185
+ ) {
186
+ return;
187
+ }
188
+ extraRequestUrl =
189
+ queryIdentityInfo.find((item) => item.identity == propertyCode)
190
+ .requestUrl || '';
191
+ }
192
+ if (queryIdentifyType === 'dictCodeIdentify') {
193
+ extraRequestUrl = `bscDictItem/selectDictItemsByDictCode`; // 字典接口
194
+ querParams = { dictCode: queryIdentify };
195
+ } else if (queryIdentifyType === 'dynamicDictCodeIdentify') {
196
+ extraRequestUrl = `dictDynamicItem/getDynamicData/${queryIdentify}`; // 字典接口
197
+ // querParams = { dictCode: queryIdentify }
198
+ }
199
+
200
+ if (extraRequestUrl) {
201
+ if (queryIdentify == 'maintain_area_code') {
202
+ extraRequestUrl = `/basic/${extraRequestUrl}${
203
+ querParams.memberCardCode
204
+ }?${stringify(querParams)}`;
205
+ } else if (queryIdentifyType == 'dictCodeIdentify') {
206
+ extraRequestUrl = `/basic/${extraRequestUrl}?${stringify(querParams)}`;
207
+ } else if (queryIdentifyType == 'dynamicDictCodeIdentify') {
208
+ extraRequestUrl = `/basic/${extraRequestUrl}`;
209
+ }
210
+
211
+ SulaRequest({
212
+ url: extraRequestUrl,
213
+ method: 'get',
214
+ converter: (res) => {
215
+ if (handleError(res)) {
216
+ let handleData = res?.data || [];
217
+ if (queryIdentifyType === 'dictCodeIdentify') {
218
+ handleData = handleData?.length
219
+ ? handleData.map((i) => ({
220
+ code: i.dictItemCode,
221
+ name: i.dictItemName,
222
+ }))
223
+ : [];
224
+ }
225
+ if (queryIdentifyType === 'dynamicDictCodeIdentify') {
226
+ handleData = handleData?.length
227
+ ? handleData.map((i) => ({
228
+ code: i.code.toString(),
229
+ name: i.name,
230
+ }))
231
+ : [];
232
+ }
233
+ this.setState({
234
+ thresholdList: handleData,
235
+ });
236
+ }
237
+ return handleData;
238
+ },
239
+ });
240
+ } else {
241
+ if (queryIdentifyType == 'objectPropertyListIdentify') {
242
+ this.setState({
243
+ thresholdList: queryIdentify,
244
+ });
245
+ } else if (queryIdentifyType == 'objectPropertyCodeIdentify') {
246
+ // TODO待处理
247
+ this.setState({
248
+ thresholdList: [],
249
+ });
250
+ } else {
251
+ querParams.queryIdentify = queryIdentify;
252
+ let res = await getRegularThresholdRange(querParams);
253
+ if (handleError(res)) {
254
+ this.setState({
255
+ thresholdList: res?.data || [],
256
+ });
257
+ }
258
+ }
259
+ }
260
+ };
261
+
262
+ renderConditionField = () => {
263
+ let {
264
+ selectOperation,
265
+ dataTypeCode,
266
+ dataChoiceBusinessType,
267
+ dataInputBusinessType,
268
+ options,
269
+ values,
270
+ valueNames,
271
+ callback,
272
+ queryIdentify,
273
+ disabled,
274
+ customerWidth,
275
+ } = this.props;
276
+ const { thresholdList } = this.state;
277
+ const dateFormat = 'YYYY-MM-DD';
278
+ const fullDateFormat = 'YYYY-MM-DD HH:mm:ss';
279
+ const styleCommon = {
280
+ width: customerWidth || '150px',
281
+ };
282
+ if (!selectOperation) return <Input disabled style={styleCommon}></Input>;
283
+ const SET_TYPE = ['in', 'nin', 'cn', 'ncn']; //集合类型
284
+ const INTERVAL_TYPE = ['be', 'bed', 'nbe', 'nbed', 'ber', 'bel']; //区间类型
285
+ const IS_KONG = ['en']; // 为空
286
+ if (IS_KONG.indexOf(selectOperation) > -1) {
287
+ return '';
288
+ }
289
+ // queryIdentify有值是表示该属性有枚举选择
290
+ if (!judgeIsEmpty(queryIdentify)) {
291
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
292
+ return (
293
+ <>
294
+ <Select
295
+ disabled={disabled}
296
+ showSearch
297
+ filterOption={(input, option) =>
298
+ option.props.children
299
+ ?.toLowerCase()
300
+ .indexOf(input.toLowerCase()) >= 0
301
+ }
302
+ onChange={(value, option) => {
303
+ values[0] = value;
304
+ valueNames[0] = option?.props?.children || '';
305
+ callback(values, valueNames);
306
+ }}
307
+ value={values[0]}
308
+ style={styleCommon}
309
+ >
310
+ {thresholdList.map((item) => (
311
+ <Select.Option value={item.code}>{item.name}</Select.Option>
312
+ ))}
313
+ </Select>
314
+ <span>~</span>
315
+ <Select
316
+ value={values[1]}
317
+ disabled={disabled}
318
+ showSearch
319
+ filterOption={(input, option) =>
320
+ option.props.children
321
+ ?.toLowerCase()
322
+ .indexOf(input.toLowerCase()) >= 0
323
+ }
324
+ onChange={(value, option) => {
325
+ values[1] = value;
326
+ valueNames[1] = option?.props?.children || '';
327
+ callback(values, valueNames);
328
+ }}
329
+ style={styleCommon}
330
+ >
331
+ {thresholdList.map((item) => (
332
+ <Select.Option value={item.code}>{item.name}</Select.Option>
333
+ ))}
334
+ </Select>
335
+ </>
336
+ );
337
+ } else {
338
+ return (
339
+ <Select
340
+ disabled={disabled}
341
+ showSearch
342
+ filterOption={(input, option) =>
343
+ option.props.children
344
+ ?.toLowerCase()
345
+ .indexOf(input.toLowerCase()) >= 0
346
+ }
347
+ onChange={(value, option) => {
348
+ if (SET_TYPE.indexOf(selectOperation) > -1) {
349
+ let valueNames1 = Array.isArray(option)
350
+ ? option.map((item) => item?.props?.children || '')
351
+ : [];
352
+ values = [...value];
353
+ valueNames = [...valueNames1];
354
+ } else {
355
+ values = [value];
356
+ valueNames = [option?.props?.children || ''];
357
+ }
358
+ callback(values, valueNames);
359
+ }}
360
+ value={SET_TYPE.indexOf(selectOperation) > -1 ? values : values[0]}
361
+ style={styleCommon}
362
+ mode={
363
+ SET_TYPE.indexOf(selectOperation) > -1 ? 'multiple' : 'default'
364
+ }
365
+ >
366
+ {thresholdList.map((item) => (
367
+ <Select.Option value={item.code}>{item.name}</Select.Option>
368
+ ))}
369
+ </Select>
370
+ );
371
+ }
372
+ } else if (dataInputBusinessType == 11 || dataInputBusinessType == 12) {
373
+ // 11 单选 12 多选
374
+ // 物理仓
375
+ if (dataChoiceBusinessType == 110) {
376
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
377
+ return (
378
+ <>
379
+ <BusinessSearchSelect
380
+ selectBusinessType="physicalWarehouse"
381
+ selectProps={{
382
+ style: styleCommon,
383
+ placeholder: '请选择物理仓',
384
+ ...(dataInputBusinessType === 12
385
+ ? {
386
+ mode: 'multiple',
387
+ maxTagCount: 1,
388
+ }
389
+ : {}),
390
+ }}
391
+ disabled={disabled}
392
+ labelInValue={true}
393
+ value={values[0]}
394
+ requestConfig={{
395
+ mappingValueField: 'physicalWarehouseCode',
396
+ filterInit: 'qp-physicalWarehouseCode-in',
397
+ }}
398
+ onChange={(value) => {
399
+ if (dataInputBusinessType === 12) {
400
+ values[0] = value.map((i) => i.key);
401
+ valueNames[0] = value.map((i) => i.label || '');
402
+ } else {
403
+ values[0] = [value.key];
404
+ valueNames[0] = [value.label || ''];
405
+ }
406
+ callback(values, valueNames);
407
+ }}
408
+ getPopupContainer={() => document.body}
409
+ />
410
+ <span>~</span>
411
+ <BusinessSearchSelect
412
+ selectBusinessType="physicalWarehouse"
413
+ selectProps={{
414
+ style: styleCommon,
415
+ placeholder: '请选择物理仓',
416
+ ...(dataInputBusinessType === 12
417
+ ? {
418
+ mode: 'multiple',
419
+ maxTagCount: 1,
420
+ }
421
+ : {}),
422
+ }}
423
+ disabled={disabled}
424
+ labelInValue={true}
425
+ value={values[1]}
426
+ requestConfig={{
427
+ mappingValueField: 'physicalWarehouseCode',
428
+ filterInit: 'qp-physicalWarehouseCode-in',
429
+ }}
430
+ onChange={(value) => {
431
+ if (dataInputBusinessType === 12) {
432
+ values[1] = value.map((i) => i.key);
433
+ valueNames[1] = value.map((i) => i.label || '');
434
+ } else {
435
+ values[1] = [value.key];
436
+ valueNames[1] = [value.label || ''];
437
+ }
438
+ callback(values, valueNames);
439
+ }}
440
+ getPopupContainer={() => document.body}
441
+ />
442
+ </>
443
+ );
444
+ } else {
445
+ return (
446
+ <BusinessSearchSelect
447
+ selectBusinessType="physicalWarehouse"
448
+ selectProps={{
449
+ style: styleCommon,
450
+ placeholder: '请选择物理仓',
451
+ ...(dataInputBusinessType === 12
452
+ ? {
453
+ mode: 'multiple',
454
+ maxTagCount: 1,
455
+ }
456
+ : {}),
457
+ }}
458
+ disabled={disabled}
459
+ labelInValue={true}
460
+ value={dataInputBusinessType === 12 ? values : values[0]}
461
+ requestConfig={{
462
+ mappingValueField: 'physicalWarehouseCode',
463
+ filterInit: 'qp-physicalWarehouseCode-in',
464
+ }}
465
+ onChange={(value) => {
466
+ if (dataInputBusinessType === 12) {
467
+ values = value.map((i) => i.key);
468
+ valueNames = value.map((i) => i.label || '');
469
+ } else {
470
+ values = [value.key];
471
+ valueNames = [value.label || ''];
472
+ }
473
+ callback(values, valueNames);
474
+ }}
475
+ getPopupContainer={() => document.body}
476
+ />
477
+ );
478
+ }
479
+ }
480
+ // 逻辑仓
481
+ if (dataChoiceBusinessType == 120) {
482
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
483
+ return (
484
+ <>
485
+ <BusinessSearchSelect
486
+ selectBusinessType="realWarehouse"
487
+ selectProps={{
488
+ style: styleCommon,
489
+ placeholder: '请选择逻辑仓',
490
+ ...(dataInputBusinessType === 12
491
+ ? {
492
+ mode: 'multiple',
493
+ maxTagCount: 1,
494
+ }
495
+ : {}),
496
+ }}
497
+ disabled={disabled}
498
+ labelInValue={true}
499
+ value={values[0]}
500
+ requestConfig={{
501
+ mappingValueField: 'realWarehouseCode',
502
+ filterInit: 'qp-realWarehouseCode-in',
503
+ }}
504
+ onChange={(value) => {
505
+ if (dataInputBusinessType === 12) {
506
+ values[0] = value.map((i) => i.key);
507
+ valueNames[0] = value.map((i) => i.label || '');
508
+ } else {
509
+ values[0] = [value.key];
510
+ valueNames[0] = [value.label || ''];
511
+ }
512
+ callback(values, valueNames);
513
+ }}
514
+ getPopupContainer={() => document.body}
515
+ />
516
+ <span>~</span>
517
+ <BusinessSearchSelect
518
+ selectBusinessType="realWarehouse"
519
+ selectProps={{
520
+ style: styleCommon,
521
+ placeholder: '请选择逻辑仓',
522
+ ...(dataInputBusinessType === 12
523
+ ? {
524
+ mode: 'multiple',
525
+ maxTagCount: 1,
526
+ }
527
+ : {}),
528
+ }}
529
+ disabled={disabled}
530
+ labelInValue={true}
531
+ value={values[1]}
532
+ requestConfig={{
533
+ mappingValueField: 'realWarehouseCode',
534
+ filterInit: 'qp-realWarehouseCode-in',
535
+ }}
536
+ onChange={(value) => {
537
+ if (dataInputBusinessType === 12) {
538
+ values[1] = value.map((i) => i.key);
539
+ valueNames[1] = value.map((i) => i.label || '');
540
+ } else {
541
+ values[1] = [value.key];
542
+ valueNames[1] = [value.label || ''];
543
+ }
544
+ callback(values, valueNames);
545
+ }}
546
+ getPopupContainer={() => document.body}
547
+ />
548
+ </>
549
+ );
550
+ } else {
551
+ return (
552
+ <BusinessSearchSelect
553
+ selectBusinessType="realWarehouse"
554
+ selectProps={{
555
+ style: styleCommon,
556
+ placeholder: '请选择逻辑仓',
557
+ ...(dataInputBusinessType === 12
558
+ ? {
559
+ mode: 'multiple',
560
+ maxTagCount: 1,
561
+ }
562
+ : {}),
563
+ }}
564
+ disabled={disabled}
565
+ labelInValue={true}
566
+ value={dataInputBusinessType === 12 ? values : values[0]}
567
+ requestConfig={{
568
+ mappingValueField: 'realWarehouseCode',
569
+ filterInit: 'qp-realWarehouseCode-in',
570
+ }}
571
+ onChange={(value) => {
572
+ if (dataInputBusinessType === 12) {
573
+ values = value.map((i) => i.key);
574
+ valueNames = value.map((i) => i.label || '');
575
+ } else {
576
+ values = [value.key];
577
+ valueNames = [value.label || ''];
578
+ }
579
+ callback(values, valueNames);
580
+ }}
581
+ getPopupContainer={() => document.body}
582
+ />
583
+ );
584
+ }
585
+ }
586
+ // 虚拟仓
587
+ if (dataChoiceBusinessType == 130) {
588
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
589
+ return (
590
+ <>
591
+ <BusinessSearchSelect
592
+ selectBusinessType="virtualWarehouse"
593
+ selectProps={{
594
+ style: styleCommon,
595
+ placeholder: '请选择虚拟仓',
596
+ ...(dataInputBusinessType === 12
597
+ ? {
598
+ mode: 'multiple',
599
+ maxTagCount: 1,
600
+ }
601
+ : {}),
602
+ }}
603
+ disabled={disabled}
604
+ labelInValue={true}
605
+ value={values[0]}
606
+ requestConfig={{
607
+ mappingValueField: 'virtualWarehouseCode',
608
+ filterInit: 'qp-virtualWarehouseCode-in',
609
+ }}
610
+ onChange={(value) => {
611
+ if (dataInputBusinessType === 12) {
612
+ values[0] = value.map((i) => i.key);
613
+ valueNames[0] = value.map((i) => i.label || '');
614
+ } else {
615
+ values[0] = [value.key];
616
+ valueNames[0] = [value.label || ''];
617
+ }
618
+ callback(values, valueNames);
619
+ }}
620
+ getPopupContainer={() => document.body}
621
+ />
622
+ <span>~</span>
623
+ <BusinessSearchSelect
624
+ selectBusinessType="virtualWarehouse"
625
+ selectProps={{
626
+ style: styleCommon,
627
+ placeholder: '请选择虚拟仓',
628
+ ...(dataInputBusinessType === 12
629
+ ? {
630
+ mode: 'multiple',
631
+ maxTagCount: 1,
632
+ }
633
+ : {}),
634
+ }}
635
+ disabled={disabled}
636
+ labelInValue={true}
637
+ value={values[1]}
638
+ requestConfig={{
639
+ mappingValueField: 'virtualWarehouseCode',
640
+ filterInit: 'qp-virtualWarehouseCode-in',
641
+ }}
642
+ onChange={(value) => {
643
+ if (dataInputBusinessType === 12) {
644
+ values[1] = value.map((i) => i.key);
645
+ valueNames[1] = value.map((i) => i.label || '');
646
+ } else {
647
+ values[1] = [value.key];
648
+ valueNames[1] = [value.label || ''];
649
+ }
650
+ callback(values, valueNames);
651
+ }}
652
+ getPopupContainer={() => document.body}
653
+ />
654
+ </>
655
+ );
656
+ } else {
657
+ return (
658
+ <BusinessSearchSelect
659
+ selectBusinessType="virtualWarehouse"
660
+ selectProps={{
661
+ style: styleCommon,
662
+ placeholder: '请选择虚拟仓',
663
+ ...(dataInputBusinessType === 12
664
+ ? {
665
+ mode: 'multiple',
666
+ maxTagCount: 1,
667
+ }
668
+ : {}),
669
+ }}
670
+ disabled={disabled}
671
+ labelInValue={true}
672
+ value={dataInputBusinessType === 12 ? values : values[0]}
673
+ requestConfig={{
674
+ mappingValueField: 'virtualWarehouseCode',
675
+ filterInit: 'qp-virtualWarehouseCode-in',
676
+ }}
677
+ onChange={(value) => {
678
+ if (dataInputBusinessType === 12) {
679
+ values = value.map((i) => i.key);
680
+ valueNames = value.map((i) => i.label || '');
681
+ } else {
682
+ values = [value.key];
683
+ valueNames = [value.label || ''];
684
+ }
685
+ callback(values, valueNames);
686
+ }}
687
+ getPopupContainer={() => document.body}
688
+ />
689
+ );
690
+ }
691
+ }
692
+ // 渠道仓
693
+ if (dataChoiceBusinessType == 140) {
694
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
695
+ return (
696
+ <>
697
+ <BusinessSearchSelect
698
+ selectBusinessType="channelWarehouse"
699
+ selectProps={{
700
+ style: styleCommon,
701
+ placeholder: '请选择渠道仓',
702
+ ...(dataInputBusinessType === 12
703
+ ? {
704
+ mode: 'multiple',
705
+ maxTagCount: 1,
706
+ }
707
+ : {}),
708
+ }}
709
+ disabled={disabled}
710
+ labelInValue={true}
711
+ value={values[0]}
712
+ requestConfig={{
713
+ mappingValueField: 'channelWarehouseCode',
714
+ filterInit: 'qp-channelWarehouseCode-in',
715
+ }}
716
+ onChange={(value) => {
717
+ if (dataInputBusinessType === 12) {
718
+ values[0] = value.map((i) => i.key);
719
+ valueNames[0] = value.map((i) => i.label || '');
720
+ } else {
721
+ values[0] = [value.key];
722
+ valueNames[0] = [value.label || ''];
723
+ }
724
+ callback(values, valueNames);
725
+ }}
726
+ getPopupContainer={() => document.body}
727
+ />
728
+ <span>~</span>
729
+ <BusinessSearchSelect
730
+ selectBusinessType="channelWarehouse"
731
+ selectProps={{
732
+ style: styleCommon,
733
+ placeholder: '请选择渠道仓',
734
+ ...(dataInputBusinessType === 12
735
+ ? {
736
+ mode: 'multiple',
737
+ maxTagCount: 1,
738
+ }
739
+ : {}),
740
+ }}
741
+ disabled={disabled}
742
+ labelInValue={true}
743
+ value={values[1]}
744
+ requestConfig={{
745
+ mappingValueField: 'channelWarehouseCode',
746
+ filterInit: 'qp-channelWarehouseCode-in',
747
+ }}
748
+ onChange={(value) => {
749
+ if (dataInputBusinessType === 12) {
750
+ values[1] = value.map((i) => i.key);
751
+ valueNames[1] = value.map((i) => i.label || '');
752
+ } else {
753
+ values[1] = [value.key];
754
+ valueNames[1] = [value.label || ''];
755
+ }
756
+ callback(values, valueNames);
757
+ }}
758
+ getPopupContainer={() => document.body}
759
+ />
760
+ </>
761
+ );
762
+ } else {
763
+ return (
764
+ <BusinessSearchSelect
765
+ selectBusinessType="channelWarehouse"
766
+ selectProps={{
767
+ style: styleCommon,
768
+ placeholder: '请选择渠道仓',
769
+ ...(dataInputBusinessType === 12
770
+ ? {
771
+ mode: 'multiple',
772
+ maxTagCount: 1,
773
+ }
774
+ : {}),
775
+ }}
776
+ disabled={disabled}
777
+ labelInValue={true}
778
+ value={dataInputBusinessType === 12 ? values : values[0]}
779
+ requestConfig={{
780
+ mappingValueField: 'channelWarehouseCode',
781
+ filterInit: 'qp-channelWarehouseCode-in',
782
+ }}
783
+ onChange={(value) => {
784
+ if (dataInputBusinessType === 12) {
785
+ values = value.map((i) => i.key);
786
+ valueNames = value.map((i) => i.label || '');
787
+ } else {
788
+ values = [value.key];
789
+ valueNames = [value.label || ''];
790
+ }
791
+ callback(values, valueNames);
792
+ }}
793
+ getPopupContainer={() => document.body}
794
+ />
795
+ );
796
+ }
797
+ }
798
+ // 商品SPU选择器
799
+ if (dataChoiceBusinessType == 150) {
800
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
801
+ return (
802
+ <>
803
+ <BusinessSearchSelect
804
+ selectBusinessType="spuCommodity"
805
+ selectProps={{
806
+ style: styleCommon,
807
+ placeholder: '请选择SPU',
808
+ ...(dataInputBusinessType === 12
809
+ ? {
810
+ mode: 'multiple',
811
+ maxTagCount: 1,
812
+ }
813
+ : {}),
814
+ }}
815
+ disabled={disabled}
816
+ labelInValue={true}
817
+ value={values[0]}
818
+ requestConfig={{
819
+ filterInit: 'qp-itemCode-in',
820
+ }}
821
+ onChange={(value) => {
822
+ if (dataInputBusinessType === 12) {
823
+ values[0] = value.map((i) => i.key);
824
+ valueNames[0] = value.map((i) => i.label || '');
825
+ } else {
826
+ values[0] = [value.key];
827
+ valueNames[0] = [value.label || ''];
828
+ }
829
+ callback(values, valueNames);
830
+ }}
831
+ getPopupContainer={() => document.body}
832
+ />
833
+ <span>~</span>
834
+ <BusinessSearchSelect
835
+ selectBusinessType="spuCommodity"
836
+ selectProps={{
837
+ style: styleCommon,
838
+ placeholder: '请选择SPU',
839
+ ...(dataInputBusinessType === 12
840
+ ? {
841
+ mode: 'multiple',
842
+ maxTagCount: 1,
843
+ }
844
+ : {}),
845
+ }}
846
+ disabled={disabled}
847
+ labelInValue={true}
848
+ value={values[1]}
849
+ requestConfig={{
850
+ filterInit: 'qp-itemCode-in',
851
+ }}
852
+ onChange={(value) => {
853
+ if (dataInputBusinessType === 12) {
854
+ values[1] = value.map((i) => i.key);
855
+ valueNames[1] = value.map((i) => i.label || '');
856
+ } else {
857
+ values[1] = [value.key];
858
+ valueNames[1] = [value.label || ''];
859
+ }
860
+ callback(values, valueNames);
861
+ }}
862
+ getPopupContainer={() => document.body}
863
+ />
864
+ </>
865
+ );
866
+ } else {
867
+ return (
868
+ <BusinessSearchSelect
869
+ selectBusinessType="spuCommodity"
870
+ selectProps={{
871
+ style: styleCommon,
872
+ placeholder: '请选择SPU',
873
+ ...(dataInputBusinessType === 12
874
+ ? {
875
+ mode: 'multiple',
876
+ maxTagCount: 1,
877
+ }
878
+ : {}),
879
+ }}
880
+ disabled={disabled}
881
+ labelInValue={true}
882
+ value={dataInputBusinessType === 12 ? values : values[0]}
883
+ requestConfig={{
884
+ filterInit: 'qp-itemCode-in',
885
+ }}
886
+ onChange={(value) => {
887
+ if (dataInputBusinessType === 12) {
888
+ values = value.map((i) => i.key);
889
+ valueNames = value.map((i) => i.label || '');
890
+ } else {
891
+ values = [value.key];
892
+ valueNames = [value.label || ''];
893
+ }
894
+ callback(values, valueNames);
895
+ }}
896
+ getPopupContainer={() => document.body}
897
+ />
898
+ );
899
+ }
900
+ }
901
+ // 商品SKU选择器
902
+ if (dataChoiceBusinessType == 160) {
903
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
904
+ return (
905
+ <>
906
+ <BusinessSearchSelect
907
+ selectBusinessType="skuCommodity"
908
+ selectProps={{
909
+ style: styleCommon,
910
+ placeholder: '请选择商品',
911
+ ...(dataInputBusinessType === 12
912
+ ? {
913
+ mode: 'multiple',
914
+ maxTagCount: 1,
915
+ }
916
+ : {}),
917
+ }}
918
+ disabled={disabled}
919
+ labelInValue={true}
920
+ value={values[0]}
921
+ requestConfig={{
922
+ filterInit: 'qp-skuCode-in',
923
+ }}
924
+ onChange={(value) => {
925
+ if (dataInputBusinessType === 12) {
926
+ values[0] = value.map((i) => i.key);
927
+ valueNames[0] = value.map((i) => i.label || '');
928
+ } else {
929
+ values[0] = [value.key];
930
+ valueNames[0] = [value.label || ''];
931
+ }
932
+ callback(values, valueNames);
933
+ }}
934
+ getPopupContainer={() => document.body}
935
+ />
936
+ <span>~</span>
937
+ <BusinessSearchSelect
938
+ selectBusinessType="skuCommodity"
939
+ selectProps={{
940
+ style: styleCommon,
941
+ placeholder: '请选择商品',
942
+ ...(dataInputBusinessType === 12
943
+ ? {
944
+ mode: 'multiple',
945
+ maxTagCount: 1,
946
+ }
947
+ : {}),
948
+ }}
949
+ disabled={disabled}
950
+ labelInValue={true}
951
+ value={values[1]}
952
+ requestConfig={{
953
+ filterInit: 'qp-skuCode-in',
954
+ }}
955
+ onChange={(value) => {
956
+ if (dataInputBusinessType === 12) {
957
+ values[1] = value.map((i) => i.key);
958
+ valueNames[1] = value.map((i) => i.label || '');
959
+ } else {
960
+ values[1] = [value.key];
961
+ valueNames[1] = [value.label || ''];
962
+ }
963
+ callback(values, valueNames);
964
+ }}
965
+ getPopupContainer={() => document.body}
966
+ />
967
+ </>
968
+ );
969
+ } else {
970
+ return (
971
+ <BusinessSearchSelect
972
+ selectBusinessType="skuCommodity"
973
+ selectProps={{
974
+ style: styleCommon,
975
+ placeholder: '请选择商品',
976
+ ...(dataInputBusinessType === 12
977
+ ? {
978
+ mode: 'multiple',
979
+ maxTagCount: 1,
980
+ }
981
+ : {}),
982
+ }}
983
+ disabled={disabled}
984
+ labelInValue={true}
985
+ value={dataInputBusinessType === 12 ? values : values[0]}
986
+ requestConfig={{
987
+ filterInit: 'qp-skuCode-in',
988
+ }}
989
+ onChange={(value) => {
990
+ if (dataInputBusinessType === 12) {
991
+ values = value.map((i) => i.key);
992
+ valueNames = value.map((i) => i.label || '');
993
+ } else {
994
+ values = [value.key];
995
+ valueNames = [value.label || ''];
996
+ }
997
+ callback(values, valueNames);
998
+ }}
999
+ getPopupContainer={() => document.body}
1000
+ />
1001
+ );
1002
+ }
1003
+ }
1004
+ // 省市区
1005
+ if (dataChoiceBusinessType == 190) {
1006
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1007
+ return (
1008
+ <>
1009
+ <BsCascader
1010
+ disabled={disabled}
1011
+ isAll={true}
1012
+ needNameAndCode={true}
1013
+ notChangeOnSelect={true}
1014
+ initRequestSource={async () => {
1015
+ return await SulaRequest({
1016
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
1017
+ method: 'get',
1018
+ converter: ({ data }) => {
1019
+ const handleData =
1020
+ data && data[0]
1021
+ ? data?.map((item) => {
1022
+ return {
1023
+ text: item.name,
1024
+ value: item.id,
1025
+ level: item.level,
1026
+ id: item.id,
1027
+ };
1028
+ })
1029
+ : [];
1030
+ return handleData;
1031
+ },
1032
+ });
1033
+ }}
1034
+ style={{ width: 240 }}
1035
+ value={{ PCDName: valueNames[0] || [] }}
1036
+ onChange={(value) => {
1037
+ values[0] = value.PCDCode;
1038
+ valueNames[0] = value.PCDName;
1039
+ callback(values, valueNames);
1040
+ }}
1041
+ getPopupContainer={() => document.body}
1042
+ />
1043
+ <span>~</span>
1044
+ <BsCascader
1045
+ disabled={disabled}
1046
+ onlyCode={true}
1047
+ isAll={true}
1048
+ needNameAndCode={true}
1049
+ notChangeOnSelect={true}
1050
+ initRequestSource={async () => {
1051
+ return await SulaRequest({
1052
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
1053
+ method: 'get',
1054
+ converter: ({ data }) => {
1055
+ const handleData =
1056
+ data && data[0]
1057
+ ? data?.map((item) => {
1058
+ return {
1059
+ text: item.name,
1060
+ value: item.id,
1061
+ level: item.level,
1062
+ id: item.id,
1063
+ };
1064
+ })
1065
+ : [];
1066
+ return handleData;
1067
+ },
1068
+ });
1069
+ }}
1070
+ style={{ width: 240 }}
1071
+ value={{ PCDName: valueNames[1] || [] }}
1072
+ onChange={(value) => {
1073
+ values[1] = value.PCDCode;
1074
+ valueNames[1] = value.PCDName;
1075
+ callback(values, valueNames);
1076
+ }}
1077
+ getPopupContainer={() => document.body}
1078
+ />
1079
+ </>
1080
+ );
1081
+ } else {
1082
+ return (
1083
+ <BsCascader
1084
+ disabled={disabled}
1085
+ onlyCode={true}
1086
+ isAll={true}
1087
+ needNameAndCode={true}
1088
+ notChangeOnSelect={true}
1089
+ initRequestSource={async () => {
1090
+ return await SulaRequest({
1091
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
1092
+ method: 'get',
1093
+ converter: ({ data }) => {
1094
+ const handleData =
1095
+ data && data[0]
1096
+ ? data?.map((item) => {
1097
+ return {
1098
+ text: item.name,
1099
+ value: item.id,
1100
+ level: item.level,
1101
+ id: item.id,
1102
+ };
1103
+ })
1104
+ : [];
1105
+ return handleData;
1106
+ },
1107
+ });
1108
+ }}
1109
+ style={{ width: 240 }}
1110
+ value={{ PCDName: valueNames || [] }}
1111
+ onChange={(value) => {
1112
+ values = value.PCDCode;
1113
+ valueNames = value.PCDName;
1114
+ callback(values, valueNames);
1115
+ }}
1116
+ getPopupContainer={() => document.body}
1117
+ />
1118
+ );
1119
+ }
1120
+ }
1121
+ // 行政组织选择器
1122
+ if (dataChoiceBusinessType == 210) {
1123
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1124
+ return (
1125
+ <>
1126
+ <BusinessTreeSearchSelect
1127
+ disabled={disabled}
1128
+ treeCheckable={dataInputBusinessType === 12}
1129
+ businessType="department"
1130
+ labelInValue={true}
1131
+ value={values[0]}
1132
+ style={styleCommon}
1133
+ onChange={(value) => {
1134
+ if (dataInputBusinessType === 12) {
1135
+ values[0] = value.map((i) => i.key);
1136
+ valueNames[0] = value.map((i) => i.label || '');
1137
+ } else {
1138
+ values[0] = [value.key];
1139
+ valueNames[0] = [value.label || ''];
1140
+ }
1141
+ callback(values, valueNames);
1142
+ }}
1143
+ getPopupContainer={() => document.body}
1144
+ />
1145
+ <span>~</span>
1146
+ <BusinessTreeSearchSelect
1147
+ disabled={disabled}
1148
+ treeCheckable={dataInputBusinessType === 12}
1149
+ businessType="department"
1150
+ labelInValue={true}
1151
+ value={values[0]}
1152
+ style={styleCommon}
1153
+ onChange={(value) => {
1154
+ if (dataInputBusinessType === 12) {
1155
+ values[1] = value.map((i) => i.key);
1156
+ valueNames[1] = value.map((i) => i.label || '');
1157
+ } else {
1158
+ values[1] = [value.key];
1159
+ valueNames[1] = [value.label || ''];
1160
+ }
1161
+ callback(values, valueNames);
1162
+ }}
1163
+ getPopupContainer={() => document.body}
1164
+ />
1165
+ </>
1166
+ );
1167
+ } else {
1168
+ return (
1169
+ <BusinessTreeSearchSelect
1170
+ disabled={disabled}
1171
+ treeCheckable={dataInputBusinessType === 12}
1172
+ businessType="department"
1173
+ labelInValue={true}
1174
+ value={values[0]}
1175
+ style={styleCommon}
1176
+ onChange={(value) => {
1177
+ if (dataInputBusinessType === 12) {
1178
+ values = value.map((i) => i.key);
1179
+ valueNames = value.map((i) => i.label || '');
1180
+ } else {
1181
+ values = [value.key];
1182
+ valueNames = [value.label || ''];
1183
+ }
1184
+ callback(values, valueNames);
1185
+ }}
1186
+ getPopupContainer={() => document.body}
1187
+ />
1188
+ );
1189
+ }
1190
+ }
1191
+ // 采购组织选择器
1192
+ if (dataChoiceBusinessType == 220) {
1193
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1194
+ return (
1195
+ <>
1196
+ <BusinessTreeSearchSelect
1197
+ disabled={disabled}
1198
+ treeCheckable={dataInputBusinessType === 12}
1199
+ businessType="purchase-organization"
1200
+ labelInValue={true}
1201
+ value={values[0]}
1202
+ style={styleCommon}
1203
+ onChange={(value) => {
1204
+ if (dataInputBusinessType === 12) {
1205
+ values[0] = value.map((i) => i.key);
1206
+ valueNames[0] = value.map((i) => i.label || '');
1207
+ } else {
1208
+ values[0] = [value.key];
1209
+ valueNames[0] = [value.label || ''];
1210
+ }
1211
+ callback(values, valueNames);
1212
+ }}
1213
+ getPopupContainer={() => document.body}
1214
+ />
1215
+ <span>~</span>
1216
+ <BusinessTreeSearchSelect
1217
+ disabled={disabled}
1218
+ treeCheckable={dataInputBusinessType === 12}
1219
+ businessType="purchase-organization"
1220
+ labelInValue={true}
1221
+ value={values[0]}
1222
+ style={styleCommon}
1223
+ onChange={(value) => {
1224
+ if (dataInputBusinessType === 12) {
1225
+ values[1] = value.map((i) => i.key);
1226
+ valueNames[1] = value.map((i) => i.label || '');
1227
+ } else {
1228
+ values[1] = [value.key];
1229
+ valueNames[1] = [value.label || ''];
1230
+ }
1231
+ callback(values, valueNames);
1232
+ }}
1233
+ getPopupContainer={() => document.body}
1234
+ />
1235
+ </>
1236
+ );
1237
+ } else {
1238
+ return (
1239
+ <BusinessTreeSearchSelect
1240
+ disabled={disabled}
1241
+ treeCheckable={dataInputBusinessType === 12}
1242
+ businessType="purchase-organization"
1243
+ labelInValue={true}
1244
+ value={values[0]}
1245
+ style={styleCommon}
1246
+ onChange={(value) => {
1247
+ if (dataInputBusinessType === 12) {
1248
+ values = value.map((i) => i.key);
1249
+ valueNames = value.map((i) => i.label || '');
1250
+ } else {
1251
+ values = [value.key];
1252
+ valueNames = [value.label || ''];
1253
+ }
1254
+ callback(values, valueNames);
1255
+ }}
1256
+ getPopupContainer={() => document.body}
1257
+ />
1258
+ );
1259
+ }
1260
+ }
1261
+ // 销售组织选择器
1262
+ if (dataChoiceBusinessType == 230) {
1263
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1264
+ return (
1265
+ <>
1266
+ <BusinessTreeSearchSelect
1267
+ disabled={disabled}
1268
+ treeCheckable={dataInputBusinessType === 12}
1269
+ businessType="sales-organization"
1270
+ labelInValue={true}
1271
+ value={values[0]}
1272
+ style={styleCommon}
1273
+ onChange={(value) => {
1274
+ if (dataInputBusinessType === 12) {
1275
+ values[0] = value.map((i) => i.key);
1276
+ valueNames[0] = value.map((i) => i.label || '');
1277
+ } else {
1278
+ values[0] = [value.key];
1279
+ valueNames[0] = [value.label || ''];
1280
+ }
1281
+ callback(values, valueNames);
1282
+ }}
1283
+ getPopupContainer={() => document.body}
1284
+ />
1285
+ <span>~</span>
1286
+ <BusinessTreeSearchSelect
1287
+ disabled={disabled}
1288
+ treeCheckable={dataInputBusinessType === 12}
1289
+ businessType="sales-organization"
1290
+ labelInValue={true}
1291
+ value={values[0]}
1292
+ style={styleCommon}
1293
+ onChange={(value) => {
1294
+ if (dataInputBusinessType === 12) {
1295
+ values[1] = value.map((i) => i.key);
1296
+ valueNames[1] = value.map((i) => i.label || '');
1297
+ } else {
1298
+ values[1] = [value.key];
1299
+ valueNames[1] = [value.label || ''];
1300
+ }
1301
+ callback(values, valueNames);
1302
+ }}
1303
+ getPopupContainer={() => document.body}
1304
+ />
1305
+ </>
1306
+ );
1307
+ } else {
1308
+ return (
1309
+ <BusinessTreeSearchSelect
1310
+ disabled={disabled}
1311
+ treeCheckable={dataInputBusinessType === 12}
1312
+ businessType="sales-organization"
1313
+ labelInValue={true}
1314
+ value={values[0]}
1315
+ style={styleCommon}
1316
+ onChange={(value) => {
1317
+ if (dataInputBusinessType === 12) {
1318
+ values = value.map((i) => i.key);
1319
+ valueNames = value.map((i) => i.label || '');
1320
+ } else {
1321
+ values = [value.key];
1322
+ valueNames = [value.label || ''];
1323
+ }
1324
+ callback(values, valueNames);
1325
+ }}
1326
+ getPopupContainer={() => document.body}
1327
+ />
1328
+ );
1329
+ }
1330
+ }
1331
+ // 供应商选择器
1332
+ if (dataChoiceBusinessType == 240) {
1333
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1334
+ return (
1335
+ <>
1336
+ <BusinessSearchSelect
1337
+ selectBusinessType="supplier2"
1338
+ selectProps={{
1339
+ style: styleCommon,
1340
+ placeholder: '请选择供应商',
1341
+ ...(dataInputBusinessType === 12
1342
+ ? {
1343
+ mode: 'multiple',
1344
+ maxTagCount: 1,
1345
+ }
1346
+ : {}),
1347
+ }}
1348
+ disabled={disabled}
1349
+ labelInValue={true}
1350
+ value={values[0]}
1351
+ requestConfig={{
1352
+ filterInit: 'qp-code-in',
1353
+ }}
1354
+ onChange={(value) => {
1355
+ if (dataInputBusinessType === 12) {
1356
+ values[0] = value.map((i) => i.key);
1357
+ valueNames[0] = value.map((i) => i.label || '');
1358
+ } else {
1359
+ values[0] = [value.key];
1360
+ valueNames[0] = [value.label || ''];
1361
+ }
1362
+ callback(values, valueNames);
1363
+ }}
1364
+ getPopupContainer={() => document.body}
1365
+ />
1366
+ <span>~</span>
1367
+ <BusinessSearchSelect
1368
+ selectBusinessType="supplier2"
1369
+ selectProps={{
1370
+ style: styleCommon,
1371
+ placeholder: '请选择供应商',
1372
+ ...(dataInputBusinessType === 12
1373
+ ? {
1374
+ mode: 'multiple',
1375
+ maxTagCount: 1,
1376
+ }
1377
+ : {}),
1378
+ }}
1379
+ disabled={disabled}
1380
+ labelInValue={true}
1381
+ value={values[1]}
1382
+ requestConfig={{
1383
+ filterInit: 'qp-code-in',
1384
+ }}
1385
+ onChange={(value) => {
1386
+ if (dataInputBusinessType === 12) {
1387
+ values[1] = value.map((i) => i.key);
1388
+ valueNames[1] = value.map((i) => i.label || '');
1389
+ } else {
1390
+ values[1] = [value.key];
1391
+ valueNames[1] = [value.label || ''];
1392
+ }
1393
+ callback(values, valueNames);
1394
+ }}
1395
+ getPopupContainer={() => document.body}
1396
+ />
1397
+ </>
1398
+ );
1399
+ } else {
1400
+ return (
1401
+ <BusinessSearchSelect
1402
+ selectBusinessType="supplier2"
1403
+ selectProps={{
1404
+ style: styleCommon,
1405
+ placeholder: '请选择供应商',
1406
+ ...(dataInputBusinessType === 12
1407
+ ? {
1408
+ mode: 'multiple',
1409
+ maxTagCount: 1,
1410
+ }
1411
+ : {}),
1412
+ }}
1413
+ disabled={disabled}
1414
+ labelInValue={true}
1415
+ value={dataInputBusinessType === 12 ? values : values[0]}
1416
+ requestConfig={{
1417
+ filterInit: 'qp-code-in',
1418
+ }}
1419
+ onChange={(value) => {
1420
+ if (dataInputBusinessType === 12) {
1421
+ values = value.map((i) => i.key);
1422
+ valueNames = value.map((i) => i.label || '');
1423
+ } else {
1424
+ values = [value.key];
1425
+ valueNames = [value.label || ''];
1426
+ }
1427
+ callback(values, valueNames);
1428
+ }}
1429
+ getPopupContainer={() => document.body}
1430
+ />
1431
+ );
1432
+ }
1433
+ }
1434
+ // 客户选择器
1435
+ if (dataChoiceBusinessType == 250) {
1436
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1437
+ return (
1438
+ <>
1439
+ <BusinessSearchSelect
1440
+ selectBusinessType="customer2"
1441
+ selectProps={{
1442
+ style: styleCommon,
1443
+ placeholder: '请选择客户',
1444
+ ...(dataInputBusinessType === 12
1445
+ ? {
1446
+ mode: 'multiple',
1447
+ maxTagCount: 1,
1448
+ }
1449
+ : {}),
1450
+ }}
1451
+ disabled={disabled}
1452
+ labelInValue={true}
1453
+ value={values[0]}
1454
+ requestConfig={{
1455
+ filterInit: 'qp-code-in',
1456
+ }}
1457
+ onChange={(value) => {
1458
+ if (dataInputBusinessType === 12) {
1459
+ values[0] = value.map((i) => i.key);
1460
+ valueNames[0] = value.map((i) => i.label || '');
1461
+ } else {
1462
+ values[0] = [value.key];
1463
+ valueNames[0] = [value.label || ''];
1464
+ }
1465
+ callback(values, valueNames);
1466
+ }}
1467
+ getPopupContainer={() => document.body}
1468
+ />
1469
+ <span>~</span>
1470
+ <BusinessSearchSelect
1471
+ selectBusinessType="customer2"
1472
+ selectProps={{
1473
+ style: styleCommon,
1474
+ placeholder: '请选择客户',
1475
+ ...(dataInputBusinessType === 12
1476
+ ? {
1477
+ mode: 'multiple',
1478
+ maxTagCount: 1,
1479
+ }
1480
+ : {}),
1481
+ }}
1482
+ disabled={disabled}
1483
+ labelInValue={true}
1484
+ value={values[1]}
1485
+ requestConfig={{
1486
+ filterInit: 'qp-code-in',
1487
+ }}
1488
+ onChange={(value) => {
1489
+ if (dataInputBusinessType === 12) {
1490
+ values[1] = value.map((i) => i.key);
1491
+ valueNames[1] = value.map((i) => i.label || '');
1492
+ } else {
1493
+ values[1] = [value.key];
1494
+ valueNames[1] = [value.label || ''];
1495
+ }
1496
+ callback(values, valueNames);
1497
+ }}
1498
+ getPopupContainer={() => document.body}
1499
+ />
1500
+ </>
1501
+ );
1502
+ } else {
1503
+ return (
1504
+ <BusinessSearchSelect
1505
+ selectBusinessType="customer2"
1506
+ selectProps={{
1507
+ style: styleCommon,
1508
+ placeholder: '请选择客户',
1509
+ ...(dataInputBusinessType === 12
1510
+ ? {
1511
+ mode: 'multiple',
1512
+ maxTagCount: 1,
1513
+ }
1514
+ : {}),
1515
+ }}
1516
+ disabled={disabled}
1517
+ labelInValue={true}
1518
+ value={dataInputBusinessType === 12 ? values : values[0]}
1519
+ requestConfig={{
1520
+ filterInit: 'qp-code-in',
1521
+ }}
1522
+ onChange={(value) => {
1523
+ if (dataInputBusinessType === 12) {
1524
+ values = value.map((i) => i.key);
1525
+ valueNames = value.map((i) => i.label || '');
1526
+ } else {
1527
+ values = [value.key];
1528
+ valueNames = [value.label || ''];
1529
+ }
1530
+ callback(values, valueNames);
1531
+ }}
1532
+ getPopupContainer={() => document.body}
1533
+ />
1534
+ );
1535
+ }
1536
+ }
1537
+ // 店铺选择器
1538
+ if (dataChoiceBusinessType == 260) {
1539
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1540
+ return (
1541
+ <>
1542
+ <BusinessSearchSelect
1543
+ selectBusinessType="shopFile2"
1544
+ selectProps={{
1545
+ style: styleCommon,
1546
+ placeholder: '请选择店铺',
1547
+ ...(dataInputBusinessType === 12
1548
+ ? {
1549
+ mode: 'multiple',
1550
+ maxTagCount: 1,
1551
+ }
1552
+ : {}),
1553
+ }}
1554
+ disabled={disabled}
1555
+ labelInValue={true}
1556
+ value={values[0]}
1557
+ requestConfig={{
1558
+ filterInit: 'qp-code-in',
1559
+ }}
1560
+ onChange={(value) => {
1561
+ if (dataInputBusinessType === 12) {
1562
+ values[0] = value.map((i) => i.key);
1563
+ valueNames[0] = value.map((i) => i.label || '');
1564
+ } else {
1565
+ values[0] = [value.key];
1566
+ valueNames[0] = [value.label || ''];
1567
+ }
1568
+ callback(values, valueNames);
1569
+ }}
1570
+ getPopupContainer={() => document.body}
1571
+ />
1572
+ <span>~</span>
1573
+ <BusinessSearchSelect
1574
+ selectBusinessType="shopFile2"
1575
+ selectProps={{
1576
+ style: styleCommon,
1577
+ placeholder: '请选择店铺',
1578
+ ...(dataInputBusinessType === 12
1579
+ ? {
1580
+ mode: 'multiple',
1581
+ maxTagCount: 1,
1582
+ }
1583
+ : {}),
1584
+ }}
1585
+ disabled={disabled}
1586
+ labelInValue={true}
1587
+ value={values[1]}
1588
+ requestConfig={{
1589
+ filterInit: 'qp-code-in',
1590
+ }}
1591
+ onChange={(value) => {
1592
+ if (dataInputBusinessType === 12) {
1593
+ values[1] = value.map((i) => i.key);
1594
+ valueNames[1] = value.map((i) => i.label || '');
1595
+ } else {
1596
+ values[1] = [value.key];
1597
+ valueNames[1] = [value.label || ''];
1598
+ }
1599
+ callback(values, valueNames);
1600
+ }}
1601
+ getPopupContainer={() => document.body}
1602
+ />
1603
+ </>
1604
+ );
1605
+ } else {
1606
+ return (
1607
+ <BusinessSearchSelect
1608
+ selectBusinessType="shopFile2"
1609
+ selectProps={{
1610
+ style: styleCommon,
1611
+ placeholder: '请选择店铺',
1612
+ ...(dataInputBusinessType === 12
1613
+ ? {
1614
+ mode: 'multiple',
1615
+ maxTagCount: 1,
1616
+ }
1617
+ : {}),
1618
+ }}
1619
+ disabled={disabled}
1620
+ labelInValue={true}
1621
+ value={dataInputBusinessType === 12 ? values : values[0]}
1622
+ requestConfig={{
1623
+ filterInit: 'qp-code-in',
1624
+ }}
1625
+ onChange={(value) => {
1626
+ if (dataInputBusinessType === 12) {
1627
+ values = value.map((i) => i.key);
1628
+ valueNames = value.map((i) => i.label || '');
1629
+ } else {
1630
+ values = [value.key];
1631
+ valueNames = [value.label || ''];
1632
+ }
1633
+ callback(values, valueNames);
1634
+ }}
1635
+ getPopupContainer={() => document.body}
1636
+ />
1637
+ );
1638
+ }
1639
+ }
1640
+ // 员工选择器
1641
+ if (dataChoiceBusinessType == 270) {
1642
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1643
+ return (
1644
+ <>
1645
+ <BusinessSearchSelect
1646
+ selectBusinessType="employee2"
1647
+ selectProps={{
1648
+ style: styleCommon,
1649
+ placeholder: '请选择员工',
1650
+ ...(dataInputBusinessType === 12
1651
+ ? {
1652
+ mode: 'multiple',
1653
+ maxTagCount: 1,
1654
+ }
1655
+ : {}),
1656
+ }}
1657
+ disabled={disabled}
1658
+ labelInValue={true}
1659
+ value={values[0]}
1660
+ requestConfig={{
1661
+ filterInit: 'qp-id-in',
1662
+ }}
1663
+ onChange={(value) => {
1664
+ if (dataInputBusinessType === 12) {
1665
+ values[0] = value.map((i) => i.key);
1666
+ valueNames[0] = value.map((i) => i.label || '');
1667
+ } else {
1668
+ values[0] = [value.key];
1669
+ valueNames[0] = [value.label || ''];
1670
+ }
1671
+ callback(values, valueNames);
1672
+ }}
1673
+ getPopupContainer={() => document.body}
1674
+ />
1675
+ <span>~</span>
1676
+ <BusinessSearchSelect
1677
+ selectBusinessType="employee2"
1678
+ selectProps={{
1679
+ style: styleCommon,
1680
+ placeholder: '请选择员工',
1681
+ ...(dataInputBusinessType === 12
1682
+ ? {
1683
+ mode: 'multiple',
1684
+ maxTagCount: 1,
1685
+ }
1686
+ : {}),
1687
+ }}
1688
+ disabled={disabled}
1689
+ labelInValue={true}
1690
+ value={values[1]}
1691
+ requestConfig={{
1692
+ filterInit: 'qp-id-in',
1693
+ }}
1694
+ onChange={(value) => {
1695
+ if (dataInputBusinessType === 12) {
1696
+ values[1] = value.map((i) => i.key);
1697
+ valueNames[1] = value.map((i) => i.label || '');
1698
+ } else {
1699
+ values[1] = [value.key];
1700
+ valueNames[1] = [value.label || ''];
1701
+ }
1702
+ callback(values, valueNames);
1703
+ }}
1704
+ getPopupContainer={() => document.body}
1705
+ />
1706
+ </>
1707
+ );
1708
+ } else {
1709
+ return (
1710
+ <BusinessSearchSelect
1711
+ selectBusinessType="employee2"
1712
+ selectProps={{
1713
+ style: styleCommon,
1714
+ placeholder: '请选择员工',
1715
+ ...(dataInputBusinessType === 12
1716
+ ? {
1717
+ mode: 'multiple',
1718
+ maxTagCount: 1,
1719
+ }
1720
+ : {}),
1721
+ }}
1722
+ disabled={disabled}
1723
+ labelInValue={true}
1724
+ value={dataInputBusinessType === 12 ? values : values[0]}
1725
+ requestConfig={{
1726
+ filterInit: 'qp-id-in',
1727
+ }}
1728
+ onChange={(value) => {
1729
+ if (dataInputBusinessType === 12) {
1730
+ values = value.map((i) => i.key);
1731
+ valueNames = value.map((i) => i.label || '');
1732
+ } else {
1733
+ values = [value.key];
1734
+ valueNames = [value.label || ''];
1735
+ }
1736
+ callback(values, valueNames);
1737
+ }}
1738
+ getPopupContainer={() => document.body}
1739
+ />
1740
+ );
1741
+ }
1742
+ }
1743
+ // 库存组织选择器
1744
+ if (dataChoiceBusinessType == 280) {
1745
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1746
+ return (
1747
+ <>
1748
+ <BusinessTreeSearchSelect
1749
+ disabled={disabled}
1750
+ treeCheckable={dataInputBusinessType === 12}
1751
+ businessType="stock-organization"
1752
+ labelInValue={true}
1753
+ value={values[0]}
1754
+ style={styleCommon}
1755
+ onChange={(value) => {
1756
+ if (dataInputBusinessType === 12) {
1757
+ values[0] = value.map((i) => i.key);
1758
+ valueNames[0] = value.map((i) => i.label || '');
1759
+ } else {
1760
+ values[0] = [value.key];
1761
+ valueNames[0] = [value.label || ''];
1762
+ }
1763
+ callback(values, valueNames);
1764
+ }}
1765
+ getPopupContainer={() => document.body}
1766
+ />
1767
+ <span>~</span>
1768
+ <BusinessTreeSearchSelect
1769
+ disabled={disabled}
1770
+ treeCheckable={dataInputBusinessType === 12}
1771
+ businessType="stock-organization"
1772
+ labelInValue={true}
1773
+ value={values[0]}
1774
+ style={styleCommon}
1775
+ onChange={(value) => {
1776
+ if (dataInputBusinessType === 12) {
1777
+ values[1] = value.map((i) => i.key);
1778
+ valueNames[1] = value.map((i) => i.label || '');
1779
+ } else {
1780
+ values[1] = [value.key];
1781
+ valueNames[1] = [value.label || ''];
1782
+ }
1783
+ callback(values, valueNames);
1784
+ }}
1785
+ getPopupContainer={() => document.body}
1786
+ />
1787
+ </>
1788
+ );
1789
+ } else {
1790
+ return (
1791
+ <BusinessTreeSearchSelect
1792
+ disabled={disabled}
1793
+ treeCheckable={dataInputBusinessType === 12}
1794
+ businessType="stock-organization"
1795
+ labelInValue={true}
1796
+ value={values[0]}
1797
+ style={styleCommon}
1798
+ onChange={(value) => {
1799
+ if (dataInputBusinessType === 12) {
1800
+ values = value.map((i) => i.key);
1801
+ valueNames = value.map((i) => i.label || '');
1802
+ } else {
1803
+ values = [value.key];
1804
+ valueNames = [value.label || ''];
1805
+ }
1806
+ callback(values, valueNames);
1807
+ }}
1808
+ getPopupContainer={() => document.body}
1809
+ />
1810
+ );
1811
+ }
1812
+ }
1813
+ // 配送方式选择器
1814
+ if (dataChoiceBusinessType == 310) {
1815
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1816
+ return (
1817
+ <>
1818
+ <BusinessSearchSelect
1819
+ selectBusinessType="deliveryMode"
1820
+ selectProps={{
1821
+ style: styleCommon,
1822
+ placeholder: '请选择配送方式',
1823
+ ...(dataInputBusinessType === 12
1824
+ ? {
1825
+ mode: 'multiple',
1826
+ maxTagCount: 1,
1827
+ }
1828
+ : {}),
1829
+ }}
1830
+ disabled={disabled}
1831
+ labelInValue={true}
1832
+ value={values[0]}
1833
+ requestConfig={{
1834
+ filterInit: 'qp-code-in',
1835
+ }}
1836
+ onChange={(value) => {
1837
+ if (dataInputBusinessType === 12) {
1838
+ values[0] = value.map((i) => i.key);
1839
+ valueNames[0] = value.map((i) => i.label || '');
1840
+ } else {
1841
+ values[0] = [value.key];
1842
+ valueNames[0] = [value.label || ''];
1843
+ }
1844
+ callback(values, valueNames);
1845
+ }}
1846
+ getPopupContainer={() => document.body}
1847
+ />
1848
+ <span>~</span>
1849
+ <BusinessSearchSelect
1850
+ selectBusinessType="deliveryMode"
1851
+ selectProps={{
1852
+ style: styleCommon,
1853
+ placeholder: '请选择配送方式',
1854
+ ...(dataInputBusinessType === 12
1855
+ ? {
1856
+ mode: 'multiple',
1857
+ maxTagCount: 1,
1858
+ }
1859
+ : {}),
1860
+ }}
1861
+ disabled={disabled}
1862
+ labelInValue={true}
1863
+ value={values[1]}
1864
+ requestConfig={{
1865
+ filterInit: 'qp-code-in',
1866
+ }}
1867
+ onChange={(value) => {
1868
+ if (dataInputBusinessType === 12) {
1869
+ values[1] = value.map((i) => i.key);
1870
+ valueNames[1] = value.map((i) => i.label || '');
1871
+ } else {
1872
+ values[1] = [value.key];
1873
+ valueNames[1] = [value.label || ''];
1874
+ }
1875
+ callback(values, valueNames);
1876
+ }}
1877
+ getPopupContainer={() => document.body}
1878
+ />
1879
+ </>
1880
+ );
1881
+ } else {
1882
+ return (
1883
+ <BusinessSearchSelect
1884
+ selectBusinessType="deliveryMode"
1885
+ selectProps={{
1886
+ style: styleCommon,
1887
+ placeholder: '请选择配送方式',
1888
+ ...(dataInputBusinessType === 12
1889
+ ? {
1890
+ mode: 'multiple',
1891
+ maxTagCount: 1,
1892
+ }
1893
+ : {}),
1894
+ }}
1895
+ disabled={disabled}
1896
+ labelInValue={true}
1897
+ value={dataInputBusinessType === 12 ? values : values[0]}
1898
+ requestConfig={{
1899
+ filterInit: 'qp-code-in',
1900
+ }}
1901
+ onChange={(value) => {
1902
+ if (dataInputBusinessType === 12) {
1903
+ values = value.map((i) => i.key);
1904
+ valueNames = value.map((i) => i.label || '');
1905
+ } else {
1906
+ values = [value.key];
1907
+ valueNames = [value.label || ''];
1908
+ }
1909
+ callback(values, valueNames);
1910
+ }}
1911
+ getPopupContainer={() => document.body}
1912
+ />
1913
+ );
1914
+ }
1915
+ }
1916
+ } else {
1917
+ if (
1918
+ dataTypeCode == 22 ||
1919
+ dataTypeCode == 21 ||
1920
+ dataTypeCode == 24 ||
1921
+ dataTypeCode == 23
1922
+ ) {
1923
+ //数值22, 字符串21, 布尔类型24, long23
1924
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1925
+ return (
1926
+ <>
1927
+ <Input
1928
+ defaultValue={values[0]}
1929
+ disabled={disabled}
1930
+ style={styleCommon}
1931
+ onBlur={(e) => {
1932
+ values[0] = e.target.value;
1933
+ valueNames[0] = e.target.value;
1934
+ callback(values, valueNames);
1935
+ }}
1936
+ />
1937
+ <span>~</span>
1938
+ <Input
1939
+ defaultValue={values[1]}
1940
+ disabled={disabled}
1941
+ style={styleCommon}
1942
+ onBlur={(e) => {
1943
+ values[1] = e.target.value;
1944
+ valueNames[1] = e.target.value;
1945
+ callback(values, valueNames);
1946
+ }}
1947
+ />
1948
+ </>
1949
+ );
1950
+ } else {
1951
+ return (
1952
+ <Input
1953
+ defaultValue={values.join(',')}
1954
+ disabled={disabled}
1955
+ style={styleCommon}
1956
+ onBlur={(e) => {
1957
+ values = e.target.value.split(',');
1958
+ valueNames = e.target.value.split(',');
1959
+ callback(values, valueNames);
1960
+ }}
1961
+ />
1962
+ );
1963
+ }
1964
+ } else if (dataTypeCode == 41) {
1965
+ // 日期41
1966
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
1967
+ return (
1968
+ <RangePicker
1969
+ // showTime
1970
+ disabled={disabled}
1971
+ style={{ width: customerWidth || '300px' }}
1972
+ format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
1973
+ value={[
1974
+ values[0] ? moment(values[0]) : '',
1975
+ values[1] ? moment(values[1]) : '',
1976
+ ]}
1977
+ onChange={(dates, dateStrings) => {
1978
+ // 业务产品要求时间范围取值固定00:00:00-23:59:59,有问题请找产品业务
1979
+ let dateStringFormat = [];
1980
+ if (dataTypeCode == 41) {
1981
+ dateStringFormat[0] = dateStrings[0]
1982
+ ? moment(dateStrings[0]).format('YYYY-MM-DD')
1983
+ : '';
1984
+ dateStringFormat[1] = dateStrings[1]
1985
+ ? moment(dateStrings[1]).format('YYYY-MM-DD')
1986
+ : '';
1987
+ } else {
1988
+ dateStringFormat[0] = dateStrings[0]
1989
+ ? moment(dateStrings[0]).format('YYYY-MM-DD 00:00:00')
1990
+ : '';
1991
+ dateStringFormat[1] = dateStrings[1]
1992
+ ? moment(dateStrings[1]).format('YYYY-MM-DD 23:59:59')
1993
+ : '';
1994
+ }
1995
+ values = [...dateStringFormat];
1996
+ valueNames = [...dateStringFormat];
1997
+ callback(values, valueNames);
1998
+ }}
1999
+ />
2000
+ );
2001
+ } else {
2002
+ return (
2003
+ <>
2004
+ <DatePicker
2005
+ format={dataTypeCode == 41 ? dateFormat : fullDateFormat}
2006
+ disabled={disabled}
2007
+ style={{ width: customerWidth || '300px' }}
2008
+ value={values[0] ? moment(values[0]) : ''}
2009
+ onChange={(date, dateString) => {
2010
+ values[0] = dateString;
2011
+ valueNames[0] = dateString;
2012
+ callback(values, valueNames);
2013
+ }}
2014
+ />
2015
+ </>
2016
+ );
2017
+ }
2018
+ } else if (dataTypeCode == 40) {
2019
+ // 时间40
2020
+ if (INTERVAL_TYPE.indexOf(selectOperation) > -1) {
2021
+ return (
2022
+ <>
2023
+ <TimePicker
2024
+ key="1"
2025
+ disabled={disabled}
2026
+ value={values[0] ? moment(values[0]) : ''}
2027
+ style={styleCommon}
2028
+ onChange={(time, timeString) => {
2029
+ values[0] = timeString;
2030
+ valueNames[0] = timeString;
2031
+ callback(values, valueNames);
2032
+ }}
2033
+ />
2034
+ <span>~</span>
2035
+ <TimePicker
2036
+ key="2"
2037
+ disabled={disabled}
2038
+ value={values[1] ? moment(values[1]) : ''}
2039
+ style={styleCommon}
2040
+ onChange={(time, timeString) => {
2041
+ values[1] = timeString;
2042
+ valueNames[1] = timeString;
2043
+ callback(values, valueNames);
2044
+ }}
2045
+ />
2046
+ </>
2047
+ );
2048
+ } else {
2049
+ return (
2050
+ <TimePicker
2051
+ defaultValue={values[0] ? moment(values[0]) : ''}
2052
+ disabled={disabled}
2053
+ style={styleCommon}
2054
+ onChange={(time, timeString) => {
2055
+ values[0] = timeString;
2056
+ valueNames[0] = timeString;
2057
+ callback(values, valueNames);
2058
+ }}
2059
+ />
2060
+ );
2061
+ }
2062
+ }
2063
+ }
2064
+ return '';
2065
+ };
2066
+
2067
+ render() {
2068
+ return (
2069
+ <div style={{ marginLeft: '10px' }} className={styles.rule_field_style}>
2070
+ {this.renderConditionField()}
2071
+ </div>
2072
+ );
2073
+ }
2074
+ }