1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
| import type { VbenFormSchema } from '#/adapter/form';
| import type { VxeTableGridOptions } from '#/adapter/vxe-table';
| import type { MesPdBaseDataApi } from '#/api/mes/pd/basedata';
|
| import { DICT_TYPE } from '@vben/constants';
| import { getDictOptions } from '@vben/hooks';
|
| import {
| createDiscountPolicy,
| createElectricityType,
| createPriceStandard,
| createServicePackage,
| createTieredPrice,
| createVoltageLevel,
| deleteDiscountPolicy,
| deleteElectricityType,
| deletePriceStandard,
| deleteServicePackage,
| deleteTieredPrice,
| deleteVoltageLevel,
| exportDiscountPolicy,
| exportElectricityType,
| exportPriceStandard,
| exportServicePackage,
| exportTieredPrice,
| exportVoltageLevel,
| getDiscountPolicy,
| getDiscountPolicyPage,
| getElectricityType,
| getElectricityTypeList,
| getElectricityTypePage,
| getPriceStandard,
| getPriceStandardPage,
| getServicePackage,
| getServicePackageList,
| getServicePackagePage,
| getTieredPrice,
| getTieredPricePage,
| getVoltageLevel,
| getVoltageLevelList,
| getVoltageLevelPage,
| updateDiscountPolicy,
| updateElectricityType,
| updatePriceStandard,
| updateServicePackage,
| updateTieredPrice,
| updateVoltageLevel,
| } from '#/api/mes/pd/basedata';
|
| /** 表单类型 */
| export type FormType = 'create' | 'detail' | 'update';
|
| /** 实体 API 映射(泛型 CRUD) */
| export interface EntityApi {
| page: (params: any) => Promise<any>;
| get: (id: number) => Promise<any>;
| create: (data: any) => Promise<any>;
| update: (data: any) => Promise<any>;
| remove: (id: number) => Promise<any>;
| exportExcel: (params: any) => Promise<any>;
| }
|
| /** 基础数据 Tab 配置 */
| export interface BaseDataEntity {
| key: string;
| title: string;
| api: EntityApi;
| columns: VxeTableGridOptions<any>['columns'];
| gridFormSchema: VbenFormSchema[];
| formSchema: VbenFormSchema[];
| }
|
| /** 加载定价对象下拉(1服务套餐/2电压等级/3用电类型) */
| export async function loadObjectOptions(
| type?: number | null,
| ): Promise<{ label: string; value: number }[]> {
| if (type === 1) {
| const list = await getServicePackageList();
| return list.map((i) => ({ label: i.name ?? '', value: i.id ?? 0 }));
| }
| if (type === 2) {
| const list = await getVoltageLevelList();
| return list.map((i) => ({ label: i.name ?? '', value: i.id ?? 0 }));
| }
| if (type === 3) {
| const list = await getElectricityTypeList();
| return list.map((i) => ({ label: i.name ?? '', value: i.id ?? 0 }));
| }
| return [];
| }
|
| /** 对象类型下拉(1服务套餐/2电压等级/3用电类型) */
| function useObjectTypeOptions() {
| return getDictOptions(DICT_TYPE.MES_PD_PRICE_OBJECT_TYPE, 'number');
| }
|
| /** 通用启用状态列 */
| function useStatusColumn(title = '启用状态') {
| return {
| field: 'status',
| title,
| width: 90,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.MES_PD_PRODUCT_STATUS },
| },
| } as const;
| }
|
| /** 用电类型 */
| export const ElectricityTypeConfig: BaseDataEntity = {
| key: 'electricityType',
| title: '用电类型',
| api: {
| page: getElectricityTypePage,
| get: getElectricityType,
| create: createElectricityType,
| update: updateElectricityType,
| remove: deleteElectricityType,
| exportExcel: exportElectricityType,
| },
| columns: [
| { field: 'code', title: '类型编码', width: 140 },
| { field: 'name', title: '类型名称', minWidth: 160 },
| { field: 'description', title: '类型说明', minWidth: 200 },
| { field: 'sort', title: '排序', width: 80 },
| useStatusColumn(),
| {
| field: 'createTime',
| title: '创建时间',
| width: 170,
| formatter: 'formatDateTime',
| },
| { title: '操作', width: 200, fixed: 'right', slots: { default: 'actions' } },
| ],
| gridFormSchema: [
| {
| fieldName: 'name',
| label: '类型名称',
| component: 'Input',
| componentProps: { placeholder: '请输入类型名称' },
| },
| ],
| formSchema: [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'code',
| label: '类型编码',
| component: 'Input',
| componentProps: { placeholder: '请输入类型编码' },
| rules: 'required',
| },
| {
| fieldName: 'name',
| label: '类型名称',
| component: 'Input',
| componentProps: { placeholder: '请输入类型名称' },
| rules: 'required',
| },
| {
| fieldName: 'description',
| label: '类型说明',
| component: 'Textarea',
| formItemClass: 'col-span-3',
| componentProps: { placeholder: '请输入类型说明', rows: 2 },
| },
| {
| fieldName: 'sort',
| label: '排序',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 0 },
| },
| {
| fieldName: 'status',
| label: '启用状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_PRODUCT_STATUS, 'number'),
| placeholder: '请选择启用状态',
| },
| },
| ],
| };
|
| /** 电压等级 */
| export const VoltageLevelConfig: BaseDataEntity = {
| key: 'voltageLevel',
| title: '电压等级',
| api: {
| page: getVoltageLevelPage,
| get: getVoltageLevel,
| create: createVoltageLevel,
| update: updateVoltageLevel,
| remove: deleteVoltageLevel,
| exportExcel: exportVoltageLevel,
| },
| columns: [
| { field: 'code', title: '等级编码', width: 140 },
| { field: 'name', title: '等级名称', minWidth: 160 },
| { field: 'voltageValue', title: '电压数值(kV)', width: 120 },
| { field: 'sort', title: '排序', width: 80 },
| useStatusColumn(),
| {
| field: 'createTime',
| title: '创建时间',
| width: 170,
| formatter: 'formatDateTime',
| },
| { title: '操作', width: 200, fixed: 'right', slots: { default: 'actions' } },
| ],
| gridFormSchema: [
| {
| fieldName: 'name',
| label: '等级名称',
| component: 'Input',
| componentProps: { placeholder: '请输入等级名称' },
| },
| ],
| formSchema: [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'code',
| label: '等级编码',
| component: 'Input',
| componentProps: { placeholder: '请输入等级编码' },
| rules: 'required',
| },
| {
| fieldName: 'name',
| label: '等级名称',
| component: 'Input',
| componentProps: { placeholder: '请输入等级名称' },
| rules: 'required',
| },
| {
| fieldName: 'voltageValue',
| label: '电压数值(kV)',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 2 },
| },
| {
| fieldName: 'sort',
| label: '排序',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 0 },
| },
| {
| fieldName: 'status',
| label: '启用状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_PRODUCT_STATUS, 'number'),
| placeholder: '请选择启用状态',
| },
| },
| ],
| };
|
| /** 服务套餐 */
| export const ServicePackageConfig: BaseDataEntity = {
| key: 'servicePackage',
| title: '服务套餐',
| api: {
| page: getServicePackagePage,
| get: getServicePackage,
| create: createServicePackage,
| update: updateServicePackage,
| remove: deleteServicePackage,
| exportExcel: exportServicePackage,
| },
| columns: [
| { field: 'code', title: '套餐编码', width: 150 },
| { field: 'name', title: '套餐名称', minWidth: 160 },
| {
| field: 'price',
| title: '套餐价格',
| width: 110,
| formatter: 'formatNumber',
| },
| {
| field: 'effectiveDate',
| title: '生效日期',
| width: 160,
| formatter: 'formatDateTime',
| },
| {
| field: 'expireDate',
| title: '失效日期',
| width: 160,
| formatter: 'formatDateTime',
| },
| useStatusColumn(),
| {
| field: 'createTime',
| title: '创建时间',
| width: 170,
| formatter: 'formatDateTime',
| },
| { title: '操作', width: 200, fixed: 'right', slots: { default: 'actions' } },
| ],
| gridFormSchema: [
| {
| fieldName: 'name',
| label: '套餐名称',
| component: 'Input',
| componentProps: { placeholder: '请输入套餐名称' },
| },
| ],
| formSchema: [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'code',
| label: '套餐编码',
| component: 'Input',
| componentProps: { placeholder: '保存时自动生成', disabled: true },
| },
| {
| fieldName: 'name',
| label: '套餐名称',
| component: 'Input',
| componentProps: { placeholder: '请输入套餐名称' },
| rules: 'required',
| },
| {
| fieldName: 'description',
| label: '套餐说明',
| component: 'Textarea',
| formItemClass: 'col-span-3',
| componentProps: { placeholder: '请输入套餐说明', rows: 2 },
| },
| {
| fieldName: 'price',
| label: '套餐价格',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 2 },
| },
| {
| fieldName: 'effectiveDate',
| label: '生效日期',
| component: 'DatePicker',
| componentProps: { class: '!w-full', valueFormat: 'YYYY-MM-DD HH:mm:ss' },
| },
| {
| fieldName: 'expireDate',
| label: '失效日期',
| component: 'DatePicker',
| componentProps: { class: '!w-full', valueFormat: 'YYYY-MM-DD HH:mm:ss' },
| },
| {
| fieldName: 'status',
| label: '启用状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_PRODUCT_STATUS, 'number'),
| placeholder: '请选择启用状态',
| },
| },
| ],
| };
|
| /** 定价标准 */
| export const PriceStandardConfig: BaseDataEntity = {
| key: 'priceStandard',
| title: '定价标准',
| api: {
| page: getPriceStandardPage,
| get: getPriceStandard,
| create: createPriceStandard,
| update: updatePriceStandard,
| remove: deletePriceStandard,
| exportExcel: exportPriceStandard,
| },
| columns: [
| {
| field: 'objectType',
| title: '定价对象类型',
| width: 120,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.MES_PD_PRICE_OBJECT_TYPE },
| },
| },
| { field: 'objectName', title: '定价对象', minWidth: 180 },
| {
| field: 'price',
| title: '价格',
| width: 110,
| formatter: 'formatNumber',
| },
| { field: 'unit', title: '计价单位', width: 100 },
| {
| field: 'effectiveDate',
| title: '生效日期',
| width: 160,
| formatter: 'formatDateTime',
| },
| useStatusColumn(),
| {
| field: 'createTime',
| title: '创建时间',
| width: 170,
| formatter: 'formatDateTime',
| },
| { title: '操作', width: 200, fixed: 'right', slots: { default: 'actions' } },
| ],
| gridFormSchema: [
| {
| fieldName: 'objectType',
| label: '定价对象类型',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: useObjectTypeOptions(),
| placeholder: '请选择定价对象类型',
| },
| },
| ],
| formSchema: [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'objectType',
| label: '定价对象类型',
| component: 'Select',
| rules: 'selectRequired',
| componentProps: {
| allowClear: true,
| options: useObjectTypeOptions(),
| placeholder: '请选择定价对象类型',
| },
| },
| {
| fieldName: 'objectId',
| label: '定价对象',
| component: 'Select',
| rules: 'selectRequired',
| dependencies: {
| triggerFields: ['objectType'],
| async componentProps(values, form) {
| const options = await loadObjectOptions(values.objectType);
| return {
| allowClear: true,
| placeholder: '请选择定价对象',
| options,
| onChange: (value: number) => {
| const opt = options.find((o) => o.value === value);
| form.setFieldValue('objectName', opt?.label ?? '');
| },
| };
| },
| },
| },
| {
| fieldName: 'objectName',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'price',
| label: '价格',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 2 },
| rules: 'required',
| },
| {
| fieldName: 'unit',
| label: '计价单位',
| component: 'Input',
| componentProps: { placeholder: '请输入计价单位' },
| },
| {
| fieldName: 'effectiveDate',
| label: '生效日期',
| component: 'DatePicker',
| componentProps: { class: '!w-full', valueFormat: 'YYYY-MM-DD HH:mm:ss' },
| },
| {
| fieldName: 'status',
| label: '启用状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_PRODUCT_STATUS, 'number'),
| placeholder: '请选择启用状态',
| },
| },
| ],
| };
|
| /** 优惠策略 */
| export const DiscountPolicyConfig: BaseDataEntity = {
| key: 'discountPolicy',
| title: '优惠策略',
| api: {
| page: getDiscountPolicyPage,
| get: getDiscountPolicy,
| create: createDiscountPolicy,
| update: updateDiscountPolicy,
| remove: deleteDiscountPolicy,
| exportExcel: exportDiscountPolicy,
| },
| columns: [
| { field: 'name', title: '策略名称', minWidth: 160 },
| {
| field: 'policyType',
| title: '策略类型',
| width: 100,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.MES_PD_DISCOUNT_POLICY_TYPE },
| },
| },
| {
| field: 'policyValue',
| title: '策略值',
| width: 110,
| formatter: 'formatNumber',
| },
| {
| field: 'targetType',
| title: '适用对象类型',
| width: 120,
| cellRender: {
| name: 'CellDict',
| props: { type: DICT_TYPE.MES_PD_PRICE_OBJECT_TYPE },
| },
| },
| {
| field: 'startDate',
| title: '生效日期',
| width: 160,
| formatter: 'formatDateTime',
| },
| {
| field: 'endDate',
| title: '失效日期',
| width: 160,
| formatter: 'formatDateTime',
| },
| useStatusColumn(),
| {
| field: 'createTime',
| title: '创建时间',
| width: 170,
| formatter: 'formatDateTime',
| },
| { title: '操作', width: 200, fixed: 'right', slots: { default: 'actions' } },
| ],
| gridFormSchema: [
| {
| fieldName: 'name',
| label: '策略名称',
| component: 'Input',
| componentProps: { placeholder: '请输入策略名称' },
| },
| {
| fieldName: 'policyType',
| label: '策略类型',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_DISCOUNT_POLICY_TYPE, 'number'),
| placeholder: '请选择策略类型',
| },
| },
| ],
| formSchema: [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'name',
| label: '策略名称',
| component: 'Input',
| componentProps: { placeholder: '请输入策略名称' },
| rules: 'required',
| },
| {
| fieldName: 'policyType',
| label: '策略类型',
| component: 'Select',
| rules: 'selectRequired',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_DISCOUNT_POLICY_TYPE, 'number'),
| placeholder: '请选择策略类型',
| },
| },
| {
| fieldName: 'policyValue',
| label: '策略值',
| component: 'InputNumber',
| componentProps: {
| class: '!w-full',
| min: 0,
| precision: 2,
| placeholder: '折扣填0-1比例,立减填金额',
| },
| help: '折扣:0-1 之间的比例;立减:按金额减免',
| rules: 'required',
| },
| {
| fieldName: 'targetType',
| label: '适用对象类型',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: useObjectTypeOptions(),
| placeholder: '不选则全局适用',
| },
| },
| {
| fieldName: 'targetId',
| label: '适用对象',
| component: 'Select',
| dependencies: {
| triggerFields: ['targetType'],
| disabled: (values) => !values.targetType,
| async componentProps(values) {
| const options = await loadObjectOptions(values.targetType);
| return {
| allowClear: true,
| placeholder: values.targetType ? '请选择适用对象' : '全局适用',
| options,
| };
| },
| },
| },
| {
| fieldName: 'startDate',
| label: '生效日期',
| component: 'DatePicker',
| componentProps: { class: '!w-full', valueFormat: 'YYYY-MM-DD HH:mm:ss' },
| },
| {
| fieldName: 'endDate',
| label: '失效日期',
| component: 'DatePicker',
| componentProps: { class: '!w-full', valueFormat: 'YYYY-MM-DD HH:mm:ss' },
| },
| {
| fieldName: 'status',
| label: '启用状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_PRODUCT_STATUS, 'number'),
| placeholder: '请选择启用状态',
| },
| },
| ],
| };
|
| /** 阶梯电价 */
| export const TieredPriceConfig: BaseDataEntity = {
| key: 'tieredPrice',
| title: '阶梯电价',
| api: {
| page: getTieredPricePage,
| get: getTieredPrice,
| create: createTieredPrice,
| update: updateTieredPrice,
| remove: deleteTieredPrice,
| exportExcel: exportTieredPrice,
| },
| columns: [
| { field: 'packageId', title: '服务套餐ID', width: 110 },
| { field: 'voltageLevelId', title: '电压等级ID', width: 110 },
| { field: 'startValue', title: '下限(含,kWh)', width: 120 },
| { field: 'endValue', title: '上限(不含,kWh)', width: 130 },
| {
| field: 'pricePerUnit',
| title: '档位单价',
| width: 110,
| formatter: 'formatNumber',
| },
| useStatusColumn(),
| {
| field: 'createTime',
| title: '创建时间',
| width: 170,
| formatter: 'formatDateTime',
| },
| { title: '操作', width: 200, fixed: 'right', slots: { default: 'actions' } },
| ],
| gridFormSchema: [
| {
| fieldName: 'packageId',
| label: '服务套餐ID',
| component: 'Input',
| componentProps: { placeholder: '请输入服务套餐ID' },
| },
| ],
| formSchema: [
| {
| fieldName: 'id',
| component: 'Input',
| dependencies: { triggerFields: [''], show: () => false },
| },
| {
| fieldName: 'packageId',
| label: '服务套餐',
| component: 'Select',
| componentProps: {
| allowClear: true,
| placeholder: '选择服务套餐(与电压等级二选一)',
| },
| dependencies: {
| triggerFields: ['voltageLevelId'],
| disabled: (values) => !!values.voltageLevelId,
| async componentProps(values) {
| const list = await getServicePackageList();
| return {
| allowClear: true,
| options: list.map((i) => ({ label: i.name, value: i.id })),
| placeholder: '选择服务套餐(与电压等级二选一)',
| };
| },
| },
| },
| {
| fieldName: 'voltageLevelId',
| label: '电压等级',
| component: 'Select',
| componentProps: {
| allowClear: true,
| placeholder: '选择电压等级(与服务套餐二选一)',
| },
| dependencies: {
| triggerFields: ['packageId'],
| disabled: (values) => !!values.packageId,
| async componentProps() {
| const list = await getVoltageLevelList();
| return {
| allowClear: true,
| options: list.map((i) => ({ label: i.name, value: i.id })),
| placeholder: '选择电压等级(与服务套餐二选一)',
| };
| },
| },
| },
| {
| fieldName: 'startValue',
| label: '档位下限(含,kWh)',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 2 },
| rules: 'required',
| },
| {
| fieldName: 'endValue',
| label: '档位上限(不含,kWh)',
| component: 'InputNumber',
| componentProps: {
| class: '!w-full',
| min: 0,
| precision: 2,
| placeholder: '为空表示上不封顶',
| },
| },
| {
| fieldName: 'pricePerUnit',
| label: '档位单价',
| component: 'InputNumber',
| componentProps: { class: '!w-full', min: 0, precision: 4 },
| rules: 'required',
| },
| {
| fieldName: 'status',
| label: '启用状态',
| component: 'Select',
| componentProps: {
| allowClear: true,
| options: getDictOptions(DICT_TYPE.MES_PD_TIERED_PRICE_STATUS, 'number'),
| placeholder: '请选择启用状态',
| },
| },
| ],
| };
|
| /** 全部 Tab 配置 */
| export const BaseDataConfigs: BaseDataEntity[] = [
| ElectricityTypeConfig,
| VoltageLevelConfig,
| ServicePackageConfig,
| PriceStandardConfig,
| DiscountPolicyConfig,
| TieredPriceConfig,
| ];
|
|