apply-clients 3.2.51 → 3.2.53
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.
- package/package.json +1 -1
- package/src/components/app_apply/Process/AppServiceControl.vue +620 -620
- package/src/components/image//347/247/246/345/215/216.png +0 -0
- package/src/components/product/Apply/Supervisory/SupervisoryhCart.vue +1 -1
- package/src/components/product/Ledger/ContractManagement/PurchaseContract/PurchaseContractInformation.vue +1 -0
- package/src/components/product/Ledger/MaterialManagement/InventoryInformation/PurchaseMaterial.vue +1 -1
- package/src/components/product/Ledger/MaterialManagement/InventoryInformation/PurchaseOrder.vue +24 -1
- package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PrintPurchaseOrder.vue +4 -1
- package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PurchaseRecordsInformation.vue +21 -1
- package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PurchaseRecordsList.vue +2 -2
- package/src/components/product/Ledger/Process/Service/ServiceControl.vue +747 -665
- package/src/components/product/Ledger/Supervisory/BatchProcessing.vue +79 -0
- package/src/components/product/Ledger/Supervisory/BathProcessinglist.vue +205 -0
- package/src/components/product/Ledger/Supervisory/Service/PrepareContract.vue +218 -58
- package/src/components/product/Ledger/Supervisory/SupervisoryCart.vue +1 -1
- package/src/components/product/Ledger/Supervisory/SupervisoryList.vue +43 -13
|
@@ -1,665 +1,747 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
|
|
3
|
-
<div class="auto clearfix">
|
|
4
|
-
<show-back-reason :selectdata="show_data"></show-back-reason>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
|
|
8
|
-
|
|
9
|
-
</template>
|
|
10
|
-
<script>
|
|
11
|
-
import Vue from 'vue'
|
|
12
|
-
import {HttpResetClass} from 'vue-client'
|
|
13
|
-
import {getNowDate,isEmpty} from '../../../../Util'
|
|
14
|
-
|
|
15
|
-
Date
|
|
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
|
-
let
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
this.data =
|
|
70
|
-
this.data =
|
|
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
|
-
if (this.data.onetomany[index].fields[j].
|
|
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
|
-
let
|
|
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
|
-
let
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
let
|
|
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
|
-
let
|
|
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
|
-
this.$
|
|
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
|
-
if(
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div class="auto clearfix">
|
|
4
|
+
<show-back-reason :selectdata="show_data"></show-back-reason>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
|
|
8
|
+
|
|
9
|
+
</template>
|
|
10
|
+
<script>
|
|
11
|
+
import Vue from 'vue'
|
|
12
|
+
import {HttpResetClass} from 'vue-client'
|
|
13
|
+
import {getNowDate,isEmpty} from '../../../../Util'
|
|
14
|
+
import {number} from "echarts/lib/export";
|
|
15
|
+
// Date格式化
|
|
16
|
+
Date.prototype.Format = function (fmt) {
|
|
17
|
+
var o = {
|
|
18
|
+
'M+': this.getMonth() + 1, // 月份
|
|
19
|
+
'd+': this.getDate(), // 日
|
|
20
|
+
'H+': this.getHours(), // 小时
|
|
21
|
+
'm+': this.getMinutes(), // 分
|
|
22
|
+
's+': this.getSeconds(), // 秒
|
|
23
|
+
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
24
|
+
'S': this.getMilliseconds() // 毫秒
|
|
25
|
+
}
|
|
26
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
27
|
+
for (var k in o) {
|
|
28
|
+
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
29
|
+
}
|
|
30
|
+
return fmt
|
|
31
|
+
}
|
|
32
|
+
export default {
|
|
33
|
+
title: '报建流程业务控制层',
|
|
34
|
+
props: ['selectdata'],
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
38
|
+
json_datas: null, // Json配置文件集合
|
|
39
|
+
showview: false, // 控制显示service-view组件
|
|
40
|
+
show_data: null // 给view层显示的数据
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
created () {
|
|
44
|
+
this.refurbish()
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
// 组件初始化操作
|
|
48
|
+
refurbish() {
|
|
49
|
+
this.json_datas = this.$workflow_vue
|
|
50
|
+
let sum = 0
|
|
51
|
+
let jsonData = {}
|
|
52
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
53
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
this.json_datas.activitys.forEach(item => {
|
|
57
|
+
if (this.selectdata.defname === item.title) {
|
|
58
|
+
jsonData = item // 拿到当前节点的json配置信息
|
|
59
|
+
sum++ // 节点名一样的个数
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
if (sum === 0) {
|
|
64
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
65
|
+
return
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (sum === 1) {
|
|
69
|
+
this.data = null
|
|
70
|
+
this.data = jsonData
|
|
71
|
+
this.data = Object.assign({}, this.data, this.selectdata)
|
|
72
|
+
|
|
73
|
+
this.initializeJSON()
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
78
|
+
},
|
|
79
|
+
// json配置数据处理
|
|
80
|
+
async initializeJSON() {
|
|
81
|
+
// 有默认值,value就给默认值,没有就是null
|
|
82
|
+
for (const item of this.data.fields) {
|
|
83
|
+
if (!item.value) {
|
|
84
|
+
if (item.value === 0) {
|
|
85
|
+
item.value = 0
|
|
86
|
+
} else {
|
|
87
|
+
item.value = null
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if ((item.default || item.default == 0) && item.type !== 'datepicker' ) {
|
|
91
|
+
item.value = item.default
|
|
92
|
+
}
|
|
93
|
+
if (this.selectdata[item.field]) {
|
|
94
|
+
// 将json字符串格式化赋值给value
|
|
95
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
96
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
97
|
+
this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
|
|
98
|
+
} else {
|
|
99
|
+
item.value = this.selectdata[item.field]
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
if (this.selectdata[item.field] === 0) {
|
|
103
|
+
item.value = 0
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// datepicker 没有值给当时值
|
|
107
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
108
|
+
|
|
109
|
+
item.value = new Date().Format(item.format || 'yyyy-MM-dd HH:mm:ss')
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
113
|
+
if (item.type === 'select') {
|
|
114
|
+
let temp = null
|
|
115
|
+
|
|
116
|
+
temp = this.$appdata.getParam(item.label)
|
|
117
|
+
|
|
118
|
+
if (temp && temp.length > 0 && item.label) {
|
|
119
|
+
item.options = temp
|
|
120
|
+
} else {
|
|
121
|
+
if (item.paramLabel) {
|
|
122
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
123
|
+
if (temp && temp.length > 0) {
|
|
124
|
+
item.options = temp
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (item.ready) {
|
|
130
|
+
await this[item.ready]()
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 控制组件
|
|
135
|
+
if (this.data.components) {
|
|
136
|
+
this.data.components.forEach(item => {
|
|
137
|
+
item.mark = 0
|
|
138
|
+
})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// 初始化 fields 可对数据进行特殊处理
|
|
142
|
+
this.initializeFields()
|
|
143
|
+
|
|
144
|
+
// 初始化 buttons_fields
|
|
145
|
+
for (let i = 0; i < this.data.buttons.length; i++) {
|
|
146
|
+
// 下发按钮相关配置
|
|
147
|
+
if (this.data.buttons[i].button_name === '下发') {
|
|
148
|
+
if (this.data.buttons[i].button_fields && this.data.buttons[i].button_fields.length === 1) {
|
|
149
|
+
if (this.data.buttons[i].source){
|
|
150
|
+
let http = new HttpResetClass()
|
|
151
|
+
let res = await http.load('POST', 'rs/search', {
|
|
152
|
+
source: this.data.buttons[i].source,
|
|
153
|
+
userid: this.$login.f.id
|
|
154
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
155
|
+
|
|
156
|
+
let options = []
|
|
157
|
+
for (let i = 0; i < res.data.length; i++) {
|
|
158
|
+
options.push(
|
|
159
|
+
{
|
|
160
|
+
"label": res.data[i].name,
|
|
161
|
+
"value": res.data[i].id
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
this.data.buttons[i].button_fields[0]['options'] = options
|
|
166
|
+
} else {
|
|
167
|
+
this.$showMessage("请配置获取人员表达式")
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
this.$showMessage("下发按钮必须满足 当且仅当一个字段")
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (this.data.buttons[i].button_fields) {
|
|
174
|
+
this.data.buttons[i].button_fields.forEach(x => {
|
|
175
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
176
|
+
if (x.type === 'select' && this.$appdata.getParam(x.label)) {
|
|
177
|
+
x.options = this.$appdata.getParam(x.label).trim()
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// onetomany 数据获取
|
|
184
|
+
if (this.data.onetomany) {
|
|
185
|
+
for (let index = 0; index < this.data.onetomany.length; index++) {
|
|
186
|
+
let res = null
|
|
187
|
+
if (!this.data.onetomany[index].queryEvent || this.data.onetomany[index].queryEvent === 'default'){
|
|
188
|
+
let http = new HttpResetClass()
|
|
189
|
+
let data = {
|
|
190
|
+
tablename: this.data.onetomany[index].tables[0],
|
|
191
|
+
condition: `${this.data.onetomany[index].condition ? this.data.onetomany[index].condition : '1=1'} and f_process_id = '${this.selectdata.f_process_id}'`
|
|
192
|
+
}
|
|
193
|
+
res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
194
|
+
resolveMsg: null,
|
|
195
|
+
rejectMsg: 'onetomany查询失败'
|
|
196
|
+
})
|
|
197
|
+
} else {
|
|
198
|
+
res = await this[this.data.onetomany[index].queryEvent]()
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// 初始化 onetomany
|
|
202
|
+
this.data.onetomany[index].rows = res.data
|
|
203
|
+
|
|
204
|
+
// 初始化onetomany中的fields
|
|
205
|
+
for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
|
|
206
|
+
if (!this.data.onetomany[index].fields[j].value) {
|
|
207
|
+
if (this.data.onetomany[index].fields[j].value === 0) {
|
|
208
|
+
this.data.onetomany[index].fields[j].value = 0
|
|
209
|
+
} else {
|
|
210
|
+
this.data.onetomany[index].fields[j].value = null
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (this.data.onetomany[index].fields[j].default || this.data.onetomany[index].fields[j].default === 0) {
|
|
214
|
+
this.data.onetomany[index].fields[j].value = this.data.onetomany[index].fields[j].default
|
|
215
|
+
}
|
|
216
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
217
|
+
if (this.data.onetomany[index].fields[j].type === 'select') {
|
|
218
|
+
if (this.data.onetomany[index].fields[j].paramLabel) {
|
|
219
|
+
this.data.onetomany[index].fields[j].options = this.$appdata.getParam(this.data.onetomany[index].fields[j].paramLabel)
|
|
220
|
+
} else {
|
|
221
|
+
this.data.onetomany[index].fields[j].options = this.$appdata.getParam(this.data.onetomany[index].fields[j].label)
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
229
|
+
let temp = JSON.parse(JSON.stringify(this.data))
|
|
230
|
+
|
|
231
|
+
this.show_data = temp
|
|
232
|
+
this.$nextTick(() => {
|
|
233
|
+
this.showview = true
|
|
234
|
+
})
|
|
235
|
+
},
|
|
236
|
+
// 初始化fields值
|
|
237
|
+
initializeFields() {
|
|
238
|
+
|
|
239
|
+
},
|
|
240
|
+
// 金额转大写
|
|
241
|
+
smalltoBIG(n) {
|
|
242
|
+
let fraction = ['角', '分'];
|
|
243
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
244
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
245
|
+
let head = n < 0 ? '欠' : '';
|
|
246
|
+
n = Math.abs(n);
|
|
247
|
+
|
|
248
|
+
let s = '';
|
|
249
|
+
|
|
250
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
251
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
252
|
+
}
|
|
253
|
+
s = s || '整';
|
|
254
|
+
n = Math.floor(n);
|
|
255
|
+
|
|
256
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
257
|
+
let p = '';
|
|
258
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
259
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
260
|
+
n = Math.floor(n / 10);
|
|
261
|
+
}
|
|
262
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
263
|
+
}
|
|
264
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
265
|
+
},
|
|
266
|
+
getLableValue(label) {
|
|
267
|
+
for (const item of this.show_data.fields) {
|
|
268
|
+
if (item.label === label && item.type !== 'number') {
|
|
269
|
+
return item.value || ''
|
|
270
|
+
}
|
|
271
|
+
if (item.label === label && item.type === 'number') {
|
|
272
|
+
return item.value || 0
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
setLabelValue(label, value) {
|
|
277
|
+
for (const item of this.show_data.fields) {
|
|
278
|
+
if (item.label === label) {
|
|
279
|
+
item.value = value
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
async buttonBefore(model) {
|
|
284
|
+
return model
|
|
285
|
+
},
|
|
286
|
+
async checkDuplicate(index) {
|
|
287
|
+
let http = new HttpResetClass()
|
|
288
|
+
let data = {
|
|
289
|
+
tablename: 't_apply',
|
|
290
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
291
|
+
}
|
|
292
|
+
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
293
|
+
resolveMsg: null,
|
|
294
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
295
|
+
})
|
|
296
|
+
if (res.data.length > 0) {
|
|
297
|
+
this.show_data.fields[index].value = null
|
|
298
|
+
throw `${this.show_data.fields[index].label}已存在!!!`
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
async getCompletionTime() {
|
|
302
|
+
let startDate = null; // 开工日期
|
|
303
|
+
let duration = 0; // 工期
|
|
304
|
+
let resumeDate = null; // 复工日期
|
|
305
|
+
let stopDate = null; // 停工日期
|
|
306
|
+
// 提取所需字段值
|
|
307
|
+
this.data.fields.forEach(item => {
|
|
308
|
+
switch (item.label) {
|
|
309
|
+
case '开工日期':
|
|
310
|
+
startDate = this.getLableValue('开工日期');
|
|
311
|
+
break;
|
|
312
|
+
case '工期':
|
|
313
|
+
duration = parseInt(this.getLableValue('工期')) || 0;
|
|
314
|
+
break;
|
|
315
|
+
case '复工日期':
|
|
316
|
+
resumeDate = this.getLableValue('复工日期');
|
|
317
|
+
break;
|
|
318
|
+
case '停工日期':
|
|
319
|
+
stopDate = this.getLableValue('停工日期');
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
// 校验必要字段是否存在
|
|
324
|
+
if (!startDate) {
|
|
325
|
+
console.warn('缺少【开工日期】字段,无法计算竣工日期');
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
// 计算停工天数
|
|
329
|
+
let stopDays = 0;
|
|
330
|
+
if (resumeDate && stopDate) {
|
|
331
|
+
stopDays = this.getDaysBetween(resumeDate, stopDate);
|
|
332
|
+
}
|
|
333
|
+
// 总工期 = 原工期 + 停工天数
|
|
334
|
+
const totalDuration = duration + stopDays;
|
|
335
|
+
// 计算竣工日期 = 开工日期 + 总工期
|
|
336
|
+
const completionDate = this.addDaysToDate(startDate, totalDuration);
|
|
337
|
+
// 设置到表单项(可选)
|
|
338
|
+
this.setLabelValue('竣工日期', completionDate);
|
|
339
|
+
console.log('计算完成,竣工日期为:', completionDate);
|
|
340
|
+
return completionDate;
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 计算两个日期之间的天数差
|
|
345
|
+
* @param {string} date1 - 第一个日期(格式:yyyy-MM-dd)
|
|
346
|
+
* @param {string} date2 - 第二个日期(格式:yyyy-MM-dd)
|
|
347
|
+
* @returns {number} - 天数差
|
|
348
|
+
*/
|
|
349
|
+
getDaysBetween(date1, date2) {
|
|
350
|
+
const start = new Date(date1);
|
|
351
|
+
const end = new Date(date2);
|
|
352
|
+
const diffTime = Math.abs(end - start);
|
|
353
|
+
return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
354
|
+
},
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* 给指定日期增加天数,返回格式为 yyyy-MM-dd 的字符串
|
|
358
|
+
* @param {string} dateString - 原始日期(格式:yyyy-MM-dd)
|
|
359
|
+
* @param {number} days - 要加的天数
|
|
360
|
+
* @returns {string} - 新日期字符串
|
|
361
|
+
*/
|
|
362
|
+
addDaysToDate(dateString, days) {
|
|
363
|
+
const date = new Date(dateString);
|
|
364
|
+
date.setDate(date.getDate() + days);
|
|
365
|
+
const year = date.getFullYear();
|
|
366
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
367
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
368
|
+
return `${year}-${month}-${day}`;
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
events: {
|
|
372
|
+
//工程前期限制事件
|
|
373
|
+
async 'limit'(){
|
|
374
|
+
let rolename=this.$login.f.f_role_name
|
|
375
|
+
if(rolename.includes('工程前期申报内容填写权限')) {
|
|
376
|
+
for (const item of this.show_data.fields) {
|
|
377
|
+
if (item.label === '申报单编码' || item.label === '申报单完成时间') {
|
|
378
|
+
item.disabled = false
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
async 'addPEWelding'(index) {
|
|
384
|
+
let data = {
|
|
385
|
+
f_process_id : this.show_data.f_process_id,
|
|
386
|
+
f_type: 'PE焊接',
|
|
387
|
+
f_operator: this.$login.f.name,
|
|
388
|
+
f_operation_date: new Date().Format('yyyy-MM-dd'),
|
|
389
|
+
f_filiale: this.$login.f.orgs,
|
|
390
|
+
f_filialeid: this.$login.f.orgid,
|
|
391
|
+
f_orgid: this.$login.f.orgid,
|
|
392
|
+
f_orgname: this.$login.f.orgs
|
|
393
|
+
}
|
|
394
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
395
|
+
data[item.field] = item.value
|
|
396
|
+
})
|
|
397
|
+
let res = await this.$resetpost(
|
|
398
|
+
`rs/entity/t_acceptance`,
|
|
399
|
+
data
|
|
400
|
+
)
|
|
401
|
+
this.$dispatch('breakControl', this.show_data)
|
|
402
|
+
},
|
|
403
|
+
async 'addIndoorCheckpoint'(index) {
|
|
404
|
+
let data = {
|
|
405
|
+
f_process_id : this.show_data.f_process_id,
|
|
406
|
+
f_type: '户内验点',
|
|
407
|
+
f_operator: this.$login.f.name,
|
|
408
|
+
f_operation_date: new Date().Format('yyyy-MM-dd'),
|
|
409
|
+
f_filiale: this.$login.f.orgs,
|
|
410
|
+
f_filialeid: this.$login.f.orgid,
|
|
411
|
+
f_orgid: this.$login.f.orgid,
|
|
412
|
+
f_orgname: this.$login.f.orgs
|
|
413
|
+
}
|
|
414
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
415
|
+
data[item.field] = item.value
|
|
416
|
+
})
|
|
417
|
+
let res = await this.$resetpost(
|
|
418
|
+
`rs/entity/t_acceptance`,
|
|
419
|
+
data
|
|
420
|
+
)
|
|
421
|
+
this.$dispatch('breakControl', this.show_data)
|
|
422
|
+
},
|
|
423
|
+
async 'addCourtyardAcceptance'(index) {
|
|
424
|
+
let data = {
|
|
425
|
+
f_process_id : this.show_data.f_process_id,
|
|
426
|
+
f_type: '庭院验收',
|
|
427
|
+
f_operator: this.$login.f.name,
|
|
428
|
+
f_operation_date: new Date().Format('yyyy-MM-dd'),
|
|
429
|
+
f_filiale: this.$login.f.orgs,
|
|
430
|
+
f_filialeid: this.$login.f.orgid,
|
|
431
|
+
f_orgid: this.$login.f.orgid,
|
|
432
|
+
f_orgname: this.$login.f.orgs
|
|
433
|
+
}
|
|
434
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
435
|
+
data[item.field] = item.value
|
|
436
|
+
})
|
|
437
|
+
let res = await this.$resetpost(
|
|
438
|
+
`rs/entity/t_acceptance`,
|
|
439
|
+
data
|
|
440
|
+
)
|
|
441
|
+
this.$dispatch('breakControl', this.show_data)
|
|
442
|
+
},
|
|
443
|
+
async 'addPipeFittings'(index) {
|
|
444
|
+
|
|
445
|
+
let data = {
|
|
446
|
+
f_process_id : this.show_data.f_process_id,
|
|
447
|
+
defname: this.show_data.defname,
|
|
448
|
+
f_operator: this.$login.f.name,
|
|
449
|
+
f_operation_date: new Date().Format('yyyy-MM-dd'),
|
|
450
|
+
f_filiale: this.$login.f.orgs,
|
|
451
|
+
f_filialeid: this.$login.f.orgid,
|
|
452
|
+
f_orgid: this.$login.f.orgid,
|
|
453
|
+
f_orgname: this.$login.f.orgs
|
|
454
|
+
}
|
|
455
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
456
|
+
data[item.field] = item.value
|
|
457
|
+
})
|
|
458
|
+
let res = await this.$resetpost(
|
|
459
|
+
`rs/entity/t_pipe_fittings`,
|
|
460
|
+
data
|
|
461
|
+
)
|
|
462
|
+
this.$dispatch('breakControl', this.show_data)
|
|
463
|
+
},
|
|
464
|
+
'openAddModel'(index) {
|
|
465
|
+
},
|
|
466
|
+
// 获取view层button事件
|
|
467
|
+
async 'button'(model) {
|
|
468
|
+
// 修改提交数据
|
|
469
|
+
model = Object.assign({}, this.selectdata, model)
|
|
470
|
+
// 点击重置按钮就重置数据
|
|
471
|
+
if (model.button.button_name === '重置') {
|
|
472
|
+
this.$dispatch('breakControl', this.data)
|
|
473
|
+
return
|
|
474
|
+
}
|
|
475
|
+
if (model.button.button_name === '停工') {
|
|
476
|
+
//获取系统当前时间
|
|
477
|
+
model.f_stop_work_time = new Date().Format('yyyy-MM-dd')
|
|
478
|
+
//将按钮改为保存
|
|
479
|
+
model.button.button_name = '保存'
|
|
480
|
+
}
|
|
481
|
+
if (model.button.button_name === '复工') {
|
|
482
|
+
//获取系统当前时间
|
|
483
|
+
model.f_start_work_time = new Date().Format('yyyy-MM-dd')
|
|
484
|
+
//将按钮改为保存
|
|
485
|
+
model.button.button_name = '保存'
|
|
486
|
+
}
|
|
487
|
+
// 提交前置
|
|
488
|
+
try {
|
|
489
|
+
model = await this.buttonBefore(model)
|
|
490
|
+
} catch (e) {
|
|
491
|
+
this.$showAlert(e, 'warning', 3000)
|
|
492
|
+
return
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
let http = new HttpResetClass()
|
|
496
|
+
let requestData = {
|
|
497
|
+
tables: this.data.tables,
|
|
498
|
+
start_activity: this.$workflow_vue.start_activity,
|
|
499
|
+
model: model,
|
|
500
|
+
loginUser: this.$login.f,
|
|
501
|
+
workflow_xmlfilename: this.$workflow_vue.workflow_xmlfilename
|
|
502
|
+
}
|
|
503
|
+
// 下发,提交,保存,退回通用业务后台处理logic
|
|
504
|
+
let url = 'rs/logic/ApplyProductService'
|
|
505
|
+
let res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
506
|
+
|
|
507
|
+
if (res.data.code == 200) {
|
|
508
|
+
this.$dispatch('search')
|
|
509
|
+
} else {
|
|
510
|
+
if (res.data.msg) {
|
|
511
|
+
this.$showMessage(res.data.msg)
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
async 'initializtionView'() {
|
|
516
|
+
if (this.show_data.f_apply_type === '主体项目' && this.show_data.defname === '工程前期') {
|
|
517
|
+
if (this.show_data.f_project_type === '支线') {
|
|
518
|
+
for (const item of this.show_data.fields) {
|
|
519
|
+
if (
|
|
520
|
+
item.label === '会签完毕时间'
|
|
521
|
+
) {
|
|
522
|
+
item.hidden = true
|
|
523
|
+
item.required = false
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
} else {
|
|
527
|
+
for (const item of this.show_data.fields) {
|
|
528
|
+
if (
|
|
529
|
+
item.label === '领开挖证时间'
|
|
530
|
+
) {
|
|
531
|
+
item.hidden = true
|
|
532
|
+
item.required = false
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
if (this.show_data.f_apply_type === '主体项目' && this.show_data.defname === '结算') {
|
|
539
|
+
if (this.show_data.f_project_type === '支线') {
|
|
540
|
+
for (const item of this.show_data.fields) {
|
|
541
|
+
if (
|
|
542
|
+
item.label === '预付款' ||
|
|
543
|
+
item.label === '预付款占比' ||
|
|
544
|
+
item.label === '预付款时间'
|
|
545
|
+
) {
|
|
546
|
+
item.hidden = true
|
|
547
|
+
item.required = false
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
// 失去焦点出触发事件
|
|
554
|
+
async 'onchange'(index) {
|
|
555
|
+
|
|
556
|
+
// cea号重复提醒
|
|
557
|
+
if(this.show_data.defname==='信息录入'){
|
|
558
|
+
if (this.show_data.fields[index].label==='CEA号'){
|
|
559
|
+
const cea=this.getLableValue('CEA号')
|
|
560
|
+
if(cea){
|
|
561
|
+
let pcdText =`and f_cea_number = '${cea}'`
|
|
562
|
+
new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data:{items:"*",tablename:"t_apply",condition:` f_sub_state != '终止' ${pcdText} `}}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
|
|
563
|
+
console.log('请求发送完成!!!!!'+JSON.stringify(res))
|
|
564
|
+
if(res.data.length>0){
|
|
565
|
+
this.$showAlert('该cea已经存在!!!', 'warning', 3000)
|
|
566
|
+
}
|
|
567
|
+
})
|
|
568
|
+
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if (this.show_data.defname === '编制合同') {
|
|
574
|
+
if (this.show_data.fields[index].label==='室外安装费'|| this.show_data.fields[index].label==='室外甲供材'|| this.show_data.fields[index].label==='室外设备费'||this.show_data.fields[index].label==='室内安装费'|| this.show_data.fields[index].label==='室内甲供材'|| this.show_data.fields[index].label==='室内设备费') {
|
|
575
|
+
|
|
576
|
+
let a1 = this.getLableValue('室外安装费')
|
|
577
|
+
let b1 = this.getLableValue('室外甲供材')
|
|
578
|
+
let c1=this.getLableValue('室外设备费')
|
|
579
|
+
let a2 = this.getLableValue('室内安装费')
|
|
580
|
+
let b2 = this.getLableValue('室内甲供材')
|
|
581
|
+
let c2=this.getLableValue('室内设备费')
|
|
582
|
+
if(this.show_data.f_project_type!='支线'&&this.show_data.f_project_type!='主体'){
|
|
583
|
+
this.setLabelValue('合同总造价', parseFloat(parseFloat(a1) + parseFloat(b1) + parseFloat(c1)+ parseFloat(a2)+ parseFloat(b2)+ parseFloat(c2)).toFixed(2))
|
|
584
|
+
this.setLabelValue('安装费总和',parseFloat(parseFloat(a1)+ parseFloat(a2)).toFixed(2))
|
|
585
|
+
}
|
|
586
|
+
console.log('----------------------------------------')
|
|
587
|
+
}
|
|
588
|
+
if(this.show_data.fields[index].label==='室外安装费'|| this.show_data.fields[index].label==='室外甲供材'|| this.show_data.fields[index].label==='室外设备费'){
|
|
589
|
+
let a1 = this.getLableValue('室外安装费')
|
|
590
|
+
let b1 = this.getLableValue('室外甲供材')
|
|
591
|
+
let c1=this.getLableValue('室外设备费')
|
|
592
|
+
|
|
593
|
+
this.setLabelValue('室外税金', parseFloat(parseFloat(a1) * 0.03).toFixed(2))
|
|
594
|
+
this.setLabelValue('室外造价', parseFloat(parseFloat(a1) + parseFloat(b1) + parseFloat(c1)).toFixed(2))
|
|
595
|
+
}
|
|
596
|
+
if(this.show_data.fields[index].label==='室内安装费'|| this.show_data.fields[index].label==='室内甲供材'|| this.show_data.fields[index].label==='室内设备费'){
|
|
597
|
+
let a2 = this.getLableValue('室内安装费')
|
|
598
|
+
let b2 = this.getLableValue('室内甲供材')
|
|
599
|
+
let c2=this.getLableValue('室内设备费')
|
|
600
|
+
this.setLabelValue('室内税金', parseFloat(parseFloat(a2) * 0.03).toFixed(2))
|
|
601
|
+
this.setLabelValue('室内造价',parseFloat(parseFloat(a2) + parseFloat(b2) + parseFloat(c2)).toFixed(2))
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
console.log('失去焦点')
|
|
607
|
+
if (
|
|
608
|
+
this.show_data.fields[index].label === '合同编号' ||
|
|
609
|
+
this.show_data.fields[index].label === '工程编号'
|
|
610
|
+
) {
|
|
611
|
+
try {
|
|
612
|
+
await this.checkDuplicate(index)
|
|
613
|
+
} catch (e) {
|
|
614
|
+
this.$showAlert(e, 'warning', 3000)
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
// 号码检测
|
|
619
|
+
if (this.show_data.fields[index].label === '电话号码') {
|
|
620
|
+
let phone = this.show_data.fields[index].value
|
|
621
|
+
// 电话号码效验
|
|
622
|
+
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
623
|
+
this.show_data.fields[index].value = ""
|
|
624
|
+
this.$showAlert('电话号码格式不正确,请重新输入。', 'info', 2000)
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
//时间提醒
|
|
628
|
+
// if (this.show_data.fields[index].label.includes("时间") || this.show_data.fields[index].type === 'datepicker') {
|
|
629
|
+
// let setTime = this.show_data.fields[index].value
|
|
630
|
+
// let nowTime = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
631
|
+
// if (nowTime >= setTime) {
|
|
632
|
+
// this.$showMessage("请注意,当前节点时间/工期已过期!")
|
|
633
|
+
// }
|
|
634
|
+
// }
|
|
635
|
+
},
|
|
636
|
+
// input值发生变化
|
|
637
|
+
async 'oninput'(index) {
|
|
638
|
+
|
|
639
|
+
},
|
|
640
|
+
// 错误事件
|
|
641
|
+
error_check(index) {
|
|
642
|
+
// 时间格式检测
|
|
643
|
+
if (this.show_data.fields[index].type === 'datepicker' && !isEmpty(this.show_data.fields[index].value)) {
|
|
644
|
+
|
|
645
|
+
let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
|
|
646
|
+
let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
|
|
647
|
+
let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
|
|
648
|
+
if (this.show_data.fields[index].format) {
|
|
649
|
+
if (this.show_data.fields[index].format === 'yyyy-MM-dd') {
|
|
650
|
+
if (!dateReg.test(this.show_data.fields[index].value)) {
|
|
651
|
+
this.show_data.fields[index].value = ''
|
|
652
|
+
this.$showAlert(this.show_data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if (this.show_data.fields[index].format === 'HH:mm:ss') {
|
|
656
|
+
if (!timeReg.test(this.show_data.fields[index].value)) {
|
|
657
|
+
this.show_data.fields[index].value = ''
|
|
658
|
+
this.$showAlert(this.show_data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
if (this.show_data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
|
|
662
|
+
if (!datetimeReg.test(this.show_data.fields[index].value)) {
|
|
663
|
+
this.show_data.fields[index].value = ''
|
|
664
|
+
this.$showAlert(this.show_data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
} else {
|
|
668
|
+
if (!dateReg.test(this.show_data.fields[index].value)) {
|
|
669
|
+
this.show_data.fields[index].value = ''
|
|
670
|
+
this.$showAlert(this.show_data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
// onetomany模态框默认监听监听事件
|
|
676
|
+
async 'onetomanydelete'(i, j) {
|
|
677
|
+
console.log('默认删除')
|
|
678
|
+
let http = new HttpResetClass()
|
|
679
|
+
let data = {
|
|
680
|
+
table: this.show_data.onetomany[i].tables[0],
|
|
681
|
+
row: this.show_data.onetomany[i].rows[j]
|
|
682
|
+
}
|
|
683
|
+
let res = await http.load('POST', 'rs/logic/onetomanyDefaultDeleteEvent', {data: data}, {
|
|
684
|
+
resolveMsg: null,
|
|
685
|
+
rejectMsg: '删除失败'
|
|
686
|
+
})
|
|
687
|
+
|
|
688
|
+
if (res.data <= 0){
|
|
689
|
+
this.$showMessage('删除失败')
|
|
690
|
+
return
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
this.$dispatch('breakControl', this.show_data)
|
|
694
|
+
},
|
|
695
|
+
async 'onetomanyadd'(index) {
|
|
696
|
+
|
|
697
|
+
let data = {
|
|
698
|
+
f_process_id : this.show_data.f_process_id,
|
|
699
|
+
f_operator: this.$login.f.name,
|
|
700
|
+
f_operation_date: new Date().Format('yyyy-MM-dd'),
|
|
701
|
+
f_filiale: this.$login.f.orgs,
|
|
702
|
+
f_filialeid: this.$login.f.orgid,
|
|
703
|
+
f_orgid: this.$login.f.orgid,
|
|
704
|
+
f_orgname: this.$login.f.orgs
|
|
705
|
+
}
|
|
706
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
707
|
+
data[item.field] = item.value
|
|
708
|
+
})
|
|
709
|
+
let res = await this.$resetpost(
|
|
710
|
+
`rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
711
|
+
data
|
|
712
|
+
)
|
|
713
|
+
this.$dispatch('breakControl', this.show_data)
|
|
714
|
+
},
|
|
715
|
+
async 'onetomanyupdate'(i, j) {
|
|
716
|
+
let onetomany = this.show_data.onetomany[i]
|
|
717
|
+
let data = onetomany.rows[j]
|
|
718
|
+
|
|
719
|
+
onetomany.fields.forEach(item => {
|
|
720
|
+
data[item.field] = item.value
|
|
721
|
+
})
|
|
722
|
+
let res = await this.$resetpost(
|
|
723
|
+
`rs/entity/${this.show_data.onetomany[i].tables[0]}`,
|
|
724
|
+
data
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
this.$dispatch('breakControl', this.show_data)
|
|
728
|
+
},
|
|
729
|
+
// onetomany模态框监听事件
|
|
730
|
+
async 'onchange_modal'(index, i) {
|
|
731
|
+
},
|
|
732
|
+
async 'oninput_modal'(index, i) {
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
watch: {
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
</script>
|
|
739
|
+
<style scoped>
|
|
740
|
+
/*清除model中的浮动*/
|
|
741
|
+
.clearfix:after,.clearfix:before{
|
|
742
|
+
display: table;
|
|
743
|
+
}
|
|
744
|
+
.clearfix:after{
|
|
745
|
+
clear: both;
|
|
746
|
+
}
|
|
747
|
+
</style>
|