apply-clients 3.0.2 → 3.0.5-2
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/dist.zip +0 -0
- package/index.html +1 -1
- package/package.json +4 -3
- package/src/App.vue +126 -15
- package/src/apply.js +18 -0
- package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
- package/src/bootstrap/less/bootstrap.less +1 -2
- package/src/bootstrap/less/standard.less +208 -0
- package/src/components/Util.js +4 -0
- package/src/components/app_apply/FieldExploration.vue +2 -2
- package/src/components/app_apply/Ventilation.vue +2 -2
- package/src/components/image/doc.jpg +0 -0
- package/src/components/image/excel.jpg +0 -0
- package/src/components/image/pdf.jpg +0 -0
- package/src/components/image//345/233/276/345/261/20212.png +0 -0
- package/src/components/image//345/233/276/345/261/20213.png +0 -0
- package/src/components/image//345/233/276/345/261/20216.png +0 -0
- package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
- package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
- package/src/components/image//346/244/255/345/234/2062.png +0 -0
- package/src/components/image//346/244/255/345/234/2065.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
- package/src/components/image//347/273/2044.png +0 -0
- package/src/components/image//347/273/2045.png +0 -0
- package/src/components/image//347/273/2046.png +0 -0
- package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
- package/src/components/product/Function/InstallFunction.vue +9 -8
- package/src/components/product/Function/InstallInfoSelect.vue +98 -69
- package/src/components/product/Function/Service/FunctionServiceControl.vue +81 -3
- package/src/components/product/Function/functions/AddContract.vue +161 -139
- package/src/components/product/Function/functions/BuyerMessage.vue +522 -0
- package/src/components/product/Function/functions/InstallFee.vue +1117 -891
- package/src/components/product/MaterialBatchList.vue +109 -0
- package/src/components/product/MaterialBatchManage.vue +34 -0
- package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
- package/src/components/product/Process/ExplorationSelect.vue +208 -73
- package/src/components/product/Process/ExplorationUser.vue +94 -42
- package/src/components/product/Process/MaterialUseList.vue +159 -0
- package/src/components/product/Process/ModifyUserFiles.vue +15 -5
- package/src/components/product/Process/ProcessInfo/history_control.vue +139 -110
- package/src/components/product/Process/Processes/ApplyUpload.vue +279 -0
- package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +501 -212
- package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
- package/src/components/product/Process/Processes/ProjectSettlement.vue +549 -35
- package/src/components/product/Process/Processes/ReceiveBatch.vue +314 -168
- package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
- package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +44 -16
- package/src/components/product/Process/Processes/Service/ServiceControl.vue +2495 -1008
- package/src/components/product/Process/Processes/Upload.vue +532 -0
- package/src/components/product/Process/ShowBackReason.vue +1 -1
- package/src/components/product/ServiceView.vue +364 -124
- package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
- package/src/components/product/Supervisory/SupervisoryControl.vue +79 -29
- package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
- package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
- package/src/components/product/VueUtils/Tree.vue +330 -0
- package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
- package/src/main.js +2 -0
- package/src/stores/ApplyLoadParams.js +1 -1
- package/src/stores/PagedListLogic.js +173 -0
- package/.npmignore +0 -12
- package/node_modules.7z +0 -0
- package/yarn.lock +0 -9008
|
@@ -1,1008 +1,2495 @@
|
|
|
1
|
-
<template>
|
|
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
|
-
this
|
|
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
|
-
this.
|
|
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
|
-
this.
|
|
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
|
-
this
|
|
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
|
-
this
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
this
|
|
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
|
-
if
|
|
714
|
-
this
|
|
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
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
//
|
|
829
|
-
//
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
//
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
//
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
})
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<show-back-reason class="auto col-sm-7" v-if="selectdata.f_back_reason && selectdata.f_back_reason!=''"
|
|
4
|
+
:data="show_data"></show-back-reason>
|
|
5
|
+
<div class="auto col-sm-7" v-if="!(selectdata.f_back_reason && selectdata.f_back_reason!='')"></div>
|
|
6
|
+
<div class="auto col-sm-4">
|
|
7
|
+
<p v-show="changeHistoryData.length>0" class="text-right" href="#" @click="searchChangeHistory"><a href="#">点我查看修改历史</a>
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<!--<gas-stop v-if="selectdata.defname == '停气碰口'"></gas-stop>-->
|
|
14
|
+
<material-message v-if="selectdata.defname=='材料导入'" v-ref:material
|
|
15
|
+
:selectdata="selectdata"
|
|
16
|
+
:state="2"
|
|
17
|
+
:edit="true"></material-message>
|
|
18
|
+
<material-message v-if="selectdata.defname=='材料审核'" v-ref:material
|
|
19
|
+
:selectdata="selectdata"
|
|
20
|
+
:state="1"
|
|
21
|
+
:edit="true"></material-message>
|
|
22
|
+
<receive-batch v-if="selectdata.defname == '派工单'" :selectdata="selectdata" :showprint="true"
|
|
23
|
+
v-ref:receivebatch></receive-batch>
|
|
24
|
+
<project-settlement v-if="selectdata.defname == '工程结算'" :selectdata="selectdata"></project-settlement>
|
|
25
|
+
<installfee :infee="selectdata" :showfee='true' v-if="selectdata.defname == '通气条件确认'"></installfee>
|
|
26
|
+
<buyer-message v-ref:buyermessagev :selectdata="selectdata" :state="1"
|
|
27
|
+
v-if="selectdata.defname == '收费'||selectdata.defname == '勘察初设'"></buyer-message>
|
|
28
|
+
<installfee :infee="selectdata" v-if="selectdata.defname == '收费'"></installfee>
|
|
29
|
+
<record-message v-if="selectdata.defname=='营收数据导入'" v-ref:record :selectdata="selectdata" :key="'tittle22'"
|
|
30
|
+
:edit="true">
|
|
31
|
+
</record-message>
|
|
32
|
+
<service-view v-ref:service_show :data="show_data" v-if="showview" :is_show_datacheck="datacheck"></service-view>
|
|
33
|
+
|
|
34
|
+
<modal :show.sync="showbuyerinfo" v-ref:modal backdrop="false">
|
|
35
|
+
<header slot="modal-header" class="modal-header">
|
|
36
|
+
<button type="button" class="close" @click="closebuyerinfo"><span>×</span></button>
|
|
37
|
+
<h4 class="modal-title">打印电子发票,请请选择购货方信息</h4>
|
|
38
|
+
</header>
|
|
39
|
+
<article slot="modal-body" class="modal-body">
|
|
40
|
+
<div v-if="showbuyerinfo">
|
|
41
|
+
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 350px">
|
|
42
|
+
<partial-view v-ref:single-load>
|
|
43
|
+
<data-grid :model="buyerinfo" v-ref:grid>
|
|
44
|
+
<template partial='head'>
|
|
45
|
+
<tr>
|
|
46
|
+
<th>序号</th>
|
|
47
|
+
<th>购货方名称</th>
|
|
48
|
+
<th>购货方纳税人识别号</th>
|
|
49
|
+
<th>购货方地址、电话</th>
|
|
50
|
+
<th>购货方开户行及账号</th>
|
|
51
|
+
<th>购货方电子邮箱</th>
|
|
52
|
+
<th>操作</th>
|
|
53
|
+
</tr>
|
|
54
|
+
</template>
|
|
55
|
+
<template partial='body'>
|
|
56
|
+
<td style="text-align: center">{{$index+1}}</td>
|
|
57
|
+
<td style="text-align: center">{{row.f_buyer_name}}</td>
|
|
58
|
+
<td style="text-align: center">{{row.f_buyer_identify}}</td>
|
|
59
|
+
<td style="text-align: center">{{row.f_buyer_addphone}}</td>
|
|
60
|
+
<td style="text-align: center">{{row.f_buyer_bank}}</td>
|
|
61
|
+
<td style="text-align: center">{{row.f_buyer_email}}</td>
|
|
62
|
+
<td style="text-align: center">
|
|
63
|
+
<button type="button" class="btn btn-success"
|
|
64
|
+
@click='$parent.$parent.$parent.$parent.confirmbuyerinfo(row)'>选择
|
|
65
|
+
</button>
|
|
66
|
+
</td>
|
|
67
|
+
</template>
|
|
68
|
+
</data-grid>
|
|
69
|
+
</partial-view>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</article>
|
|
73
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
74
|
+
<button v-show="showbuyerinfo" type="button" class="btn btn-default" @click='closebuyerinfo'>取消</button>
|
|
75
|
+
</footer>
|
|
76
|
+
</modal>
|
|
77
|
+
<modal :show.sync="showChangeHistoryInfo" v-ref:modal backdrop="false">
|
|
78
|
+
<header slot="modal-header" class="modal-header">
|
|
79
|
+
<button type="button" class="close" @click="closeChangeHistoryInfo"><span>×</span></button>
|
|
80
|
+
<h4 class="modal-title">更改历史</h4>
|
|
81
|
+
</header>
|
|
82
|
+
<article slot="modal-body" class="modal-body">
|
|
83
|
+
<div class="col-sm-12 span recordTable" style="margin-top: 10px;min-height: 350px">
|
|
84
|
+
<apply-change-history v-if="showChangeHistoryInfo" :history_data="changeHistoryData"></apply-change-history>
|
|
85
|
+
</div>
|
|
86
|
+
</article>
|
|
87
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
88
|
+
</footer>
|
|
89
|
+
</modal>
|
|
90
|
+
<!--打印报表html-->
|
|
91
|
+
<div v-show="false">
|
|
92
|
+
<div class="row" style="display: flex;justify-content: center;" id='bill-fee3'>
|
|
93
|
+
{{{bill}}}
|
|
94
|
+
</div>
|
|
95
|
+
<report-print id='bill-fee3' top='15mm' left='5mm' width='90%' height='70%' :showbtn="false" preview="true"
|
|
96
|
+
v-ref:reportprint></report-print>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
</template>
|
|
100
|
+
<script>
|
|
101
|
+
import Vue from 'vue'
|
|
102
|
+
import {HttpResetClass} from 'vue-client'
|
|
103
|
+
import * as Util from '../../../../Util'
|
|
104
|
+
// import AppData from 'stores/AppData'
|
|
105
|
+
// Date格式化
|
|
106
|
+
Date.prototype.Format = function (fmt) {
|
|
107
|
+
var o = {
|
|
108
|
+
"M+": this.getMonth() + 1, //月份
|
|
109
|
+
"d+": this.getDate(), //日
|
|
110
|
+
"H+": this.getHours(), //小时
|
|
111
|
+
"m+": this.getMinutes(), //分
|
|
112
|
+
"s+": this.getSeconds(), //秒
|
|
113
|
+
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
114
|
+
"S": this.getMilliseconds() //毫秒
|
|
115
|
+
};
|
|
116
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
117
|
+
for (var k in o)
|
|
118
|
+
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
119
|
+
return fmt;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export default {
|
|
123
|
+
title: '报建流程业务控制层',
|
|
124
|
+
props: ['selectdata'],
|
|
125
|
+
data() {
|
|
126
|
+
return {
|
|
127
|
+
leijijiaofeijine:0, //累计缴费金额
|
|
128
|
+
tujiansum: 0,
|
|
129
|
+
anzhuangsum: 0,
|
|
130
|
+
showChangeHistoryInfo: false, // 历史数据模态框
|
|
131
|
+
changeHistoryData: [], // 修改历史数据处理
|
|
132
|
+
data: null, // 数据库数据,json配置文件数据的数据集合
|
|
133
|
+
json_datas: null, // Json配置文件集合
|
|
134
|
+
showview: false, // 控制显示service-view组件
|
|
135
|
+
show_data: null, // 给view层显示的数据
|
|
136
|
+
department_search: [], // 当前部门下所有人
|
|
137
|
+
contract: null, // 单值表合同编号记录
|
|
138
|
+
technologist: [], // 技术人员 角色下的人
|
|
139
|
+
price: 0,
|
|
140
|
+
cost: 0,
|
|
141
|
+
number: 0,
|
|
142
|
+
pgd: '',
|
|
143
|
+
showbuyerinfo: false, // 新增购货方信息模态框开关
|
|
144
|
+
selectsellid: null, //需要打票收费id
|
|
145
|
+
buyerinfo: {
|
|
146
|
+
id: '',
|
|
147
|
+
f_buyer_name: '',
|
|
148
|
+
f_buyer_identify: '',
|
|
149
|
+
f_buyer_addphone: '',
|
|
150
|
+
f_buyer_bank: '',
|
|
151
|
+
f_buyer_email: '',
|
|
152
|
+
rows: [] // 购货方信息
|
|
153
|
+
},
|
|
154
|
+
bill: ''
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
methods: {
|
|
158
|
+
/*
|
|
159
|
+
============================================收费临时使用
|
|
160
|
+
*/
|
|
161
|
+
// 判断部门
|
|
162
|
+
// checkParetment() {
|
|
163
|
+
// let flag = ''
|
|
164
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
165
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
166
|
+
// let arr = str.split(",")
|
|
167
|
+
// let arr2 = str2.split(",")
|
|
168
|
+
// for (let i = 0; i < arr.length; i++) {
|
|
169
|
+
// if (arr[i] == this.selectdata.f_apply_type) {
|
|
170
|
+
// flag = '客户服务部'
|
|
171
|
+
// break
|
|
172
|
+
// }
|
|
173
|
+
// }
|
|
174
|
+
// for (let i = 0; i < arr2.length; i++) {
|
|
175
|
+
// if (arr2[i] == this.selectdata.f_apply_type) {
|
|
176
|
+
// flag = '工程技术部'
|
|
177
|
+
// break
|
|
178
|
+
// }
|
|
179
|
+
// }
|
|
180
|
+
// return flag
|
|
181
|
+
// },
|
|
182
|
+
// 查看修改历史记录
|
|
183
|
+
searchChangeHistory() {
|
|
184
|
+
console.log("查看修改历史记录")
|
|
185
|
+
this.showChangeHistoryInfo = true
|
|
186
|
+
},
|
|
187
|
+
getmodel() {
|
|
188
|
+
return this.$refs.service_show.getmodel()
|
|
189
|
+
},
|
|
190
|
+
async printbill(sellid) {
|
|
191
|
+
let result = await this.$resetpost('rs/report/billReport', {data: {condition: `f_sell_id = ${sellid}`}}, {
|
|
192
|
+
resolveMsg: null,
|
|
193
|
+
rejectMsg: "提取数据出错,请重试!"
|
|
194
|
+
})
|
|
195
|
+
this.bill = result.data
|
|
196
|
+
console.log('this.bill', this.bill)
|
|
197
|
+
this.$nextTick(() => {
|
|
198
|
+
this.$refs.reportprint.print()
|
|
199
|
+
})
|
|
200
|
+
},
|
|
201
|
+
confirmbuyerinfo(args) {
|
|
202
|
+
let drawbilldata = {
|
|
203
|
+
sellid: this.selectsellid,
|
|
204
|
+
buyerid: args.id,
|
|
205
|
+
operator: this.$login.f.name
|
|
206
|
+
}
|
|
207
|
+
this.closebuyerinfo()
|
|
208
|
+
this.$resetpost('rs/logic/applyDrawBill', {data: drawbilldata}, {resolveMsg: null, rejectMsg: "开发票失败"})
|
|
209
|
+
.then((res) => {
|
|
210
|
+
if (res.data.status === 200) {
|
|
211
|
+
this.$showAlert('申请开具增值税电子发票成功,请稍后到报建功能中【报建收费】中查看电子发票', 'success', 5000)
|
|
212
|
+
/*let n = 0
|
|
213
|
+
var id = setInterval(async ()=>{
|
|
214
|
+
if(n>=3){
|
|
215
|
+
this.$showMessage('电子票延迟,请稍后查看!')
|
|
216
|
+
clearInterval(id)
|
|
217
|
+
}
|
|
218
|
+
if (this.seeeticket(res.data) === 'success'){
|
|
219
|
+
clearInterval(id)
|
|
220
|
+
this.load()
|
|
221
|
+
}
|
|
222
|
+
n++
|
|
223
|
+
this.$showAlert('电子发票开票中,请稍后...', 'info',3000)
|
|
224
|
+
},3000)*/
|
|
225
|
+
} else {
|
|
226
|
+
this.$showAlert('电子发票开票失败,失败代码为:' + res.data.status, 'warning', 3000)
|
|
227
|
+
}
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
// 金额转大写
|
|
231
|
+
smalltoBIG(n) {
|
|
232
|
+
let fraction = ['角', '分'];
|
|
233
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
234
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
235
|
+
let head = n < 0 ? '欠' : '';
|
|
236
|
+
n = Math.abs(n);
|
|
237
|
+
|
|
238
|
+
let s = '';
|
|
239
|
+
|
|
240
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
241
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
242
|
+
}
|
|
243
|
+
s = s || '整';
|
|
244
|
+
n = Math.floor(n);
|
|
245
|
+
|
|
246
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
247
|
+
let p = '';
|
|
248
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
249
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
250
|
+
n = Math.floor(n / 10);
|
|
251
|
+
}
|
|
252
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
253
|
+
}
|
|
254
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
255
|
+
},
|
|
256
|
+
// 关闭模态框
|
|
257
|
+
closebuyerinfo() {
|
|
258
|
+
this.showbuyerinfo = false
|
|
259
|
+
this.selectsellid = null
|
|
260
|
+
},
|
|
261
|
+
// 关闭历史数据模态框
|
|
262
|
+
closeChangeHistoryInfo() {
|
|
263
|
+
this.showChangeHistoryInfo = false
|
|
264
|
+
},
|
|
265
|
+
//根据票据流水号查看票据
|
|
266
|
+
async seeeticket(val) {
|
|
267
|
+
console.log('该票据流水号为:', val.f_fpqqlsh)
|
|
268
|
+
var eticketData = await this.$resetpost('rs/sql/querySingleTable', {
|
|
269
|
+
data: {
|
|
270
|
+
items: 'f_bill_url,f_url_code',
|
|
271
|
+
tablename: 't_eticket',
|
|
272
|
+
condition: `f_serial_number=${val.f_fpqqlsh}`
|
|
273
|
+
}
|
|
274
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
275
|
+
console.log('eticketData:', eticketData)
|
|
276
|
+
var data = eticketData.data[0]
|
|
277
|
+
if (data.f_bill_url && data.f_bill_url != '') {
|
|
278
|
+
console.log(data)
|
|
279
|
+
var auth = data.f_bill_url.split("/")
|
|
280
|
+
console.log("截取", auth)
|
|
281
|
+
var authCode = auth[auth.length - 1]
|
|
282
|
+
var url = `https://${auth[2]}/ent-views/fpExtract/get_fapiao.html?pwd=${data.f_url_code}&authCode=${authCode}`
|
|
283
|
+
this.$showAlert('开票成功!', 'success', 500)
|
|
284
|
+
window.open(url)
|
|
285
|
+
return 'success'
|
|
286
|
+
}
|
|
287
|
+
return 'fail'
|
|
288
|
+
},
|
|
289
|
+
async loadbuyer() {
|
|
290
|
+
//获取购货方信息
|
|
291
|
+
let querybuyerdata = {
|
|
292
|
+
tablename: 't_buyer_info',
|
|
293
|
+
condition: `f_process_id = '${this.selectdata.f_process_id}' and f_apply_num = '${this.selectdata.f_apply_num}'`
|
|
294
|
+
}
|
|
295
|
+
let buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querybuyerdata}, {
|
|
296
|
+
resolveMsg: null,
|
|
297
|
+
rejectMsg: '获取购货方信息失败'
|
|
298
|
+
})
|
|
299
|
+
this.buyerinfo.rows = buyerinfos.data
|
|
300
|
+
},
|
|
301
|
+
/*
|
|
302
|
+
============================================收费临时使用结束
|
|
303
|
+
*/
|
|
304
|
+
// AOP后续特殊化处理
|
|
305
|
+
async special(model) {
|
|
306
|
+
if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '分支流程异步处理') {
|
|
307
|
+
// 分支流程异步处理
|
|
308
|
+
let http = new HttpResetClass();
|
|
309
|
+
let res = await http.load('POST', 'rs/logic/branchsyncprocess', {
|
|
310
|
+
data: {
|
|
311
|
+
model: model,
|
|
312
|
+
loginUser: this.$login.f
|
|
313
|
+
}
|
|
314
|
+
}, {resolveMsg: null, rejectMsg: '分支流程异步处理保存失败'})
|
|
315
|
+
console.log("分支流程异步处理:", JSON.stringify(res.data))
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (this.data.distribute_async && model.button.button_name === '下发') {
|
|
319
|
+
// 同流程节点异步处理
|
|
320
|
+
let http = new HttpResetClass();
|
|
321
|
+
let res = await http.load('POST', 'rs/logic/syncprocess', {
|
|
322
|
+
data: {
|
|
323
|
+
model: model,
|
|
324
|
+
loginUser: this.$login.f
|
|
325
|
+
}
|
|
326
|
+
}, {resolveMsg: null, rejectMsg: '流程异步下发据保存失败'})
|
|
327
|
+
console.log("流程的异步处理:", JSON.stringify(res.data))
|
|
328
|
+
}
|
|
329
|
+
if (this.data.distribute_async && model.button.button_name === '完成') {
|
|
330
|
+
// 强制结束
|
|
331
|
+
let http = new HttpResetClass();
|
|
332
|
+
let res = await http.load('POST', 'rs/logic/stoprocess', {
|
|
333
|
+
data: {
|
|
334
|
+
model: model,
|
|
335
|
+
loginUser: this.$login.f
|
|
336
|
+
}
|
|
337
|
+
}, {resolveMsg: null, rejectMsg: '流程异步完成数据保存失败'})
|
|
338
|
+
console.log("流程的异步处理:", JSON.stringify(res.data))
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
hasChangeHistory() {
|
|
342
|
+
let http = new HttpResetClass()
|
|
343
|
+
let data = {
|
|
344
|
+
tablename: 't_apply_change_record',
|
|
345
|
+
condition: ` defname = '${this.selectdata.defname}' and f_process_id ='${this.selectdata.f_process_id}' and f_filiale = '${this.$login.f.f_fengongsi}'`
|
|
346
|
+
}
|
|
347
|
+
http.load('POST', 'rs/sql/singleTable', {data: data}, {resolveMsg: null, rejectMsg: "历史纪录"}).then((res) => {
|
|
348
|
+
this.changeHistoryData = []
|
|
349
|
+
this.changeHistoryData = res.data
|
|
350
|
+
})
|
|
351
|
+
},
|
|
352
|
+
// 组件初始化操作
|
|
353
|
+
refurbish(val) {
|
|
354
|
+
this.selectdata = val
|
|
355
|
+
this.json_datas = this.$workflow_vue
|
|
356
|
+
let sum = 0
|
|
357
|
+
let jsonData = {}
|
|
358
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length == 0) {
|
|
359
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
360
|
+
return
|
|
361
|
+
}
|
|
362
|
+
for (let i = 0; i < this.json_datas.activitys.length; i++) {
|
|
363
|
+
if (this.selectdata.defname == this.json_datas.activitys[i].title) {
|
|
364
|
+
jsonData = this.json_datas.activitys[i]
|
|
365
|
+
sum++
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
for (let j = 0; j < jsonData.fields.length; j++) {
|
|
369
|
+
jsonData.fields[j].value = ''
|
|
370
|
+
if (jsonData.fields[j].default) {
|
|
371
|
+
jsonData.fields[j].value = jsonData.fields[j].default
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
if (sum == 1) {
|
|
375
|
+
this.data = null
|
|
376
|
+
this.data = jsonData
|
|
377
|
+
// 历史数据查询
|
|
378
|
+
this.hasChangeHistory()
|
|
379
|
+
// selectdata 填充 data
|
|
380
|
+
this.data = Object.assign({}, this.data, this.selectdata)
|
|
381
|
+
|
|
382
|
+
this.initializtion()
|
|
383
|
+
} else if (sum == 0) {
|
|
384
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
385
|
+
} else {
|
|
386
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
// AOP:进入vue组件前初始化内容
|
|
390
|
+
// json配置数据处理 比如下拉框的options
|
|
391
|
+
async initializtion() {
|
|
392
|
+
if(this.show_data&&this.show_data.f_process_id == this.data.f_process_id&&this.show_data.defname==this.selectdata.defname){
|
|
393
|
+
this.data = Object.assign({}, this.data, this.selectdata,this.show_data)
|
|
394
|
+
}
|
|
395
|
+
this.showview = false
|
|
396
|
+
// 如果selectdata有这些key,则把selectdata的value赋值给data的value
|
|
397
|
+
for(let i=0;i<this.data.fields.length;i++){
|
|
398
|
+
if (this.selectdata[this.data.fields[i].field]) {
|
|
399
|
+
if (String(this.selectdata[this.data.fields[i].field]).startsWith("{")) {
|
|
400
|
+
if(this.data.fields[i].field=='f_survey_name') {
|
|
401
|
+
let json = JSON.parse(this.selectdata[this.data.fields[i].field])
|
|
402
|
+
this.data.fields[i].value=json.name
|
|
403
|
+
this.selectdata.f_survey_id = json.id
|
|
404
|
+
}else{
|
|
405
|
+
this.data.fields[i].value = JSON.parse(this.selectdata[this.data.fields[i].field])
|
|
406
|
+
this.selectdata[this.data.fields[i].field] = JSON.parse(this.selectdata[this.data.fields[i].field])
|
|
407
|
+
}
|
|
408
|
+
} else {
|
|
409
|
+
this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
// 有合同号不给合同表里插入数据
|
|
414
|
+
for (let i = 0; i < this.data.tables.length; i++) {
|
|
415
|
+
if ('t_contract' == this.data.tables[i] && this.selectdata.f_contract_number) {
|
|
416
|
+
this.data.tables.splice(i, 1)
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
// 下发人 options 处理,options初始化
|
|
420
|
+
if (this.data.source) {
|
|
421
|
+
let http = new HttpResetClass()
|
|
422
|
+
await http.load('POST', 'rs/search', `{"source":${this.data.source},"userid":"${this.$login.f.id}"}`, {
|
|
423
|
+
resolveMsg: null,
|
|
424
|
+
rejectMsg: null
|
|
425
|
+
}).then((res) => {
|
|
426
|
+
// console.log("search查询部门下所有人:", res.data)
|
|
427
|
+
let jsonString = JSON.stringify(res.data)
|
|
428
|
+
let jsonArray = []
|
|
429
|
+
if (jsonString.startsWith("{")) {
|
|
430
|
+
jsonArray.push(res.data)
|
|
431
|
+
res.data = jsonArray
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
this.department_search = res.data
|
|
435
|
+
if (this.department_search && this.showview) {
|
|
436
|
+
let array = []
|
|
437
|
+
for (let k = 0; k < this.department_search.length; k++) {
|
|
438
|
+
array.push({
|
|
439
|
+
label: this.department_search[k].name,
|
|
440
|
+
value: {id: this.department_search[k].id, name: this.department_search[k].name}
|
|
441
|
+
})
|
|
442
|
+
}
|
|
443
|
+
for (let x = 0; x < this.data.buttons.length; x++) {
|
|
444
|
+
if (this.data && this.data.buttons[x].button_name == "下发") {
|
|
445
|
+
this.data.buttons[x].button_fields[0].options = array
|
|
446
|
+
}
|
|
447
|
+
if (this.show_data && this.show_data.buttons[x].button_name == "下发") {
|
|
448
|
+
this.show_data.buttons[x].button_fields[0].options = array
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
}
|
|
454
|
+
// selectdata 填充 data
|
|
455
|
+
// this.data = Object.assign({}, this.data, this.selectdata)
|
|
456
|
+
// onetomany 数据获取
|
|
457
|
+
if (this.data.onetomany) {
|
|
458
|
+
console.log('判断是onetomany,this.data.onetomany的数据为=>' + JSON.stringify(this.data.onetomany))
|
|
459
|
+
for (let index = 0; index < this.data.onetomany.length; index++) {
|
|
460
|
+
let http = new HttpResetClass()
|
|
461
|
+
let data = {}
|
|
462
|
+
if (this.data.onetomany[index].tables[0] == 't_charge_record') {
|
|
463
|
+
data = {
|
|
464
|
+
tablename: this.data.onetomany[index].tables[0],
|
|
465
|
+
condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}' and f_charging_status != '无效'`
|
|
466
|
+
}
|
|
467
|
+
} else {
|
|
468
|
+
data = {
|
|
469
|
+
tablename: this.data.onetomany[index].tables[0],
|
|
470
|
+
condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}'`
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
474
|
+
resolveMsg: null,
|
|
475
|
+
rejectMsg: 'onetomany查询失败'
|
|
476
|
+
})
|
|
477
|
+
// 初始化 onetomany
|
|
478
|
+
let rows = []
|
|
479
|
+
console.log('查询返回结果res.data=>' + JSON.stringify(res.data))
|
|
480
|
+
this.data.onetomany[index].rows = res.data
|
|
481
|
+
// console.log(JSON.stringify('this.data.onetomany[index].rows=>' + JSON.stringify(this.data.onetomany[index].rows)))
|
|
482
|
+
|
|
483
|
+
// 初始化onetomany中的fields
|
|
484
|
+
for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
|
|
485
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
486
|
+
if (this.data.onetomany[index].fields[j].type === 'select') {
|
|
487
|
+
let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
|
|
488
|
+
if (temp && temp.length > 0) {
|
|
489
|
+
this.data.onetomany[index].fields[j].options = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
498
|
+
for (let p = 0; p < this.data.fields.length; p++) {
|
|
499
|
+
if (this.data.fields[p].type === 'select') {
|
|
500
|
+
let temp = Vue.$appdata.getParam(this.data.fields[p].label)
|
|
501
|
+
// if(this.data.fields[p].disabled){
|
|
502
|
+
// this.data.fields[p].options = []
|
|
503
|
+
// }else
|
|
504
|
+
if (temp && temp.length > 0) {
|
|
505
|
+
if (this.data.fields[p].label) {
|
|
506
|
+
this.data.fields[p].options = Vue.$appdata.getParam(this.data.fields[p].label)
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
// 初始化 fields
|
|
512
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
513
|
+
|
|
514
|
+
/*
|
|
515
|
+
{
|
|
516
|
+
"label": "累计缴费金额",
|
|
517
|
+
"field": "f_cumulative_money",
|
|
518
|
+
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"label": "未结总金额",
|
|
522
|
+
"field": "f_unaccounts_money",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"label": "累计开票金额"
|
|
526
|
+
"field": "f_cumulative_invoicing"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"label": "未开票金额",
|
|
530
|
+
"field": "f_residual_invoicing",
|
|
531
|
+
},
|
|
532
|
+
*/
|
|
533
|
+
if(this.data.fields[i].label === '设计单位'){
|
|
534
|
+
if(this.selectdata.f_apply_type == '民用散户'||this.selectdata.f_apply_type == '民用整改'){
|
|
535
|
+
this.data.fields[i].required = false
|
|
536
|
+
}else{
|
|
537
|
+
this.data.fields[i].required = true
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
if(this.data.fields[i].label === '累计缴费金额'){
|
|
541
|
+
let http = new HttpResetClass()
|
|
542
|
+
let data = {
|
|
543
|
+
columnname: 'f_charge_money',
|
|
544
|
+
tablename: 't_charge_record',
|
|
545
|
+
condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}'`
|
|
546
|
+
}
|
|
547
|
+
let res = await http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取缴费金额获取失败'})
|
|
548
|
+
if(res.data[0].f_charge_money){
|
|
549
|
+
this.data.fields[i].value = res.data[0].f_charge_money
|
|
550
|
+
}else {
|
|
551
|
+
this.data.fields[i].value = 0
|
|
552
|
+
}
|
|
553
|
+
this.leijijiaofeijine = res.data[0].f_charge_money
|
|
554
|
+
for (let k = 0; k < this.data.fields.length; k++) {
|
|
555
|
+
if(this.data.fields[k].label=='未结总金额'){
|
|
556
|
+
this.data.fields[k].value= Number(this.selectdata.f_contract_money) - this.data.fields[i].value
|
|
557
|
+
console.log(this.data.fields[k].label,this.data.fields[k].value)
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
console.log(this.data.fields[i].label,this.data.fields[i].value)
|
|
561
|
+
}
|
|
562
|
+
if(this.data.fields[i].label === '累计开票金额'){
|
|
563
|
+
let http = new HttpResetClass()
|
|
564
|
+
let data = {
|
|
565
|
+
columnname: 'f_charge_money',
|
|
566
|
+
tablename: 't_charge_record',
|
|
567
|
+
condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}' and (f_invoice_num !='' or f_invoice_num is not null)`
|
|
568
|
+
}
|
|
569
|
+
let res = await http.load('POST', 'rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '获取累计缴费金额获取失败'})
|
|
570
|
+
this.data.fields[i].value = res.data[0].f_charge_money
|
|
571
|
+
for (let k = 0; k < this.data.fields.length; k++) {
|
|
572
|
+
if(this.data.fields[k].label=='未开票金额'){
|
|
573
|
+
this.data.fields[k].value= Number(this.leijijiaofeijine) - res.data[0].f_charge_money
|
|
574
|
+
console.log(this.data.fields[k].label,this.data.fields[k].value)
|
|
575
|
+
console.log("this.data.fields1",this.data.fields)
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
console.log(this.data.fields[i].label,this.data.fields[i].value)
|
|
579
|
+
console.log("this.data.fields",this.data.fields)
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
if (this.data.fields[i].label === '气表品牌') {
|
|
583
|
+
if (!this.data.fields[i].value) {
|
|
584
|
+
let http = new HttpResetClass()
|
|
585
|
+
let data = {
|
|
586
|
+
columnname: 'f_meter_brand,id',
|
|
587
|
+
tablename: 't_gasbrand',
|
|
588
|
+
condition: ` 1=1 `
|
|
589
|
+
}
|
|
590
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {resolveMsg: null, rejectMsg: '获取气表品牌失败'})
|
|
591
|
+
this.data.fields[i].options=[]
|
|
592
|
+
for(let x=0;x<res.data.length;x++){
|
|
593
|
+
this.data.fields[i].options.push({label:res.data[x].f_meter_brand,value:{id:res.data[x].id,name:res.data[x].f_meter_brand}})
|
|
594
|
+
}
|
|
595
|
+
console.log("气表品牌",this.data.fields[i].options)
|
|
596
|
+
if (this.showview) {
|
|
597
|
+
this.$refs.service_show.update()
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
if (this.data.fields[i].label == '合同金额' || this.data.fields[i].label == '合同总金额') {
|
|
603
|
+
if (this.data.fields[i].value == null || this.data.fields[i].value == '') {
|
|
604
|
+
this.data.fields[i].value = "0"
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
if (this.data.fields[i].label == '技术人员'||this.data.fields[i].label == '设计人员') {
|
|
608
|
+
let buyerinfos = []
|
|
609
|
+
let numReg = /^[0-9]+$/
|
|
610
|
+
let numRe = new RegExp(numReg)
|
|
611
|
+
if (numRe.test(this.data.fields[i].value)) {
|
|
612
|
+
let querydata = {
|
|
613
|
+
tablename: 't_user',
|
|
614
|
+
condition: `id = ${this.data.fields[i].value}`
|
|
615
|
+
}
|
|
616
|
+
buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
617
|
+
resolveMsg: null,
|
|
618
|
+
rejectMsg: '获取人员失败'
|
|
619
|
+
})
|
|
620
|
+
this.data.fields[i].value = {
|
|
621
|
+
id: buyerinfos.data[0].id,
|
|
622
|
+
name: buyerinfos.data[0].name
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
if (this.data.defname === '工程结算') {
|
|
628
|
+
var a = 0
|
|
629
|
+
var b = 0
|
|
630
|
+
var c = 0
|
|
631
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
632
|
+
if (this.data.fields[i].label === '最终核算成本金额') {
|
|
633
|
+
this.data.fields[i].value = (this.cost + this.number + this.anzhuangsum + this.tujiansum)
|
|
634
|
+
a = this.data.fields[i].value
|
|
635
|
+
}
|
|
636
|
+
if (this.data.fields[i].label === '合同总金额') {
|
|
637
|
+
b = this.data.fields[i].value
|
|
638
|
+
}
|
|
639
|
+
if (this.data.fields[i].label === '材料成本金额') {
|
|
640
|
+
this.data.fields[i].value = this.number
|
|
641
|
+
}
|
|
642
|
+
if (this.data.fields[i].label === '安装人工成本') {
|
|
643
|
+
this.data.fields[i].value = this.anzhuangsum
|
|
644
|
+
}
|
|
645
|
+
if (this.data.fields[i].label === '土建人工成本') {
|
|
646
|
+
this.data.fields[i].value = this.tujiansum
|
|
647
|
+
}
|
|
648
|
+
if (this.data.fields[i].label === '其他成本金额') {
|
|
649
|
+
this.data.fields[i].value = this.cost
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
c = b - a
|
|
653
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
654
|
+
if (this.data.fields[i].label === '工程盈利') {
|
|
655
|
+
this.data.fields[i].value = c
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
if (this.data.defname === '派工单') {
|
|
660
|
+
|
|
661
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
662
|
+
if (this.data.fields[i].label === '派工单号') {
|
|
663
|
+
this.data.fields[i].value = this.pgd
|
|
664
|
+
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
}
|
|
670
|
+
// 特殊处理
|
|
671
|
+
//施工环节 如果是个人报建需要提交表具信息
|
|
672
|
+
// 如果安装表数为1,则显示是否有表选项
|
|
673
|
+
if (this.data.defname === '施工') {
|
|
674
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
675
|
+
if (this.data.fields[i].label == '是否有表') { //
|
|
676
|
+
if (this.data.f_apply_type === '管线整改' || this.data.f_apply_type === '商业预埋管线'|| this.data.f_apply_type === '商业新建管线') { //一定没有表
|
|
677
|
+
this.data.fields[i].value = '否'
|
|
678
|
+
this.selectdata.f_hasmeter = '否'
|
|
679
|
+
this.data.fields[i].hidden = true
|
|
680
|
+
this.data.fields[i].required = false
|
|
681
|
+
} else if (this.data.f_install_num == 1 && (this.data.f_apply_type === '民用整改' || this.data.f_apply_type === '非居整改' || this.data.f_apply_type === '内部投建'||(this.data.f_apply_type != '管线整改'&&this.data.f_apply_type.includes("整改")))) { // 民用整改,非居整改,内部投建可能不安装表
|
|
682
|
+
this.data.fields[i].hidden = false
|
|
683
|
+
this.data.fields[i].required = true
|
|
684
|
+
} else{
|
|
685
|
+
this.data.fields[i].hidden = false
|
|
686
|
+
this.data.fields[i].required = true
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
// 如果是民用散户默认 跳过 内验 和 外验
|
|
691
|
+
if(this.selectdata.f_apply_type == '民用散户'){
|
|
692
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
693
|
+
if (this.data.fields[i].label == '是否内验' || this.data.fields[i].label == '是否发起外验') { //this.data.f_install_num != 1&&
|
|
694
|
+
this.data.fields[i].value = '否'
|
|
695
|
+
this.data.fields[i].hidden = true
|
|
696
|
+
this.data.fields[i].required = false
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// 只有工商用户才让显示 6方以上 还是 6方以下
|
|
703
|
+
if(this.data.fields[i].label == '6方以上'){
|
|
704
|
+
if(this.selectdata.f_apply_type == '工业'||this.selectdata.f_apply_type == '商业'){
|
|
705
|
+
this.data.fields[i].value = null
|
|
706
|
+
this.data.fields[i].hidden = false
|
|
707
|
+
this.data.fields[i].required = true
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
if(this.data.fields[i].label == '是否内验'){
|
|
712
|
+
// 工业,商业
|
|
713
|
+
if(this.selectdata.f_apply_type == '工业'||this.selectdata.f_apply_type == '商业'){
|
|
714
|
+
this.data.fields[i].value = '是'
|
|
715
|
+
this.data.fields[i].hidden = true
|
|
716
|
+
this.data.fields[i].required = false
|
|
717
|
+
}
|
|
718
|
+
// 如果是 民用成套户 或者 民用集体散户 是否内验 和 是否外验 都是是
|
|
719
|
+
if(this.selectdata.f_apply_type == '民用成套户'||this.selectdata.f_apply_type == '民用集体散户'||this.selectdata.f_apply_type == '民用集体户'){
|
|
720
|
+
this.data.fields[i].value = '是'
|
|
721
|
+
this.data.fields[i].hidden = true
|
|
722
|
+
this.data.fields[i].required = false
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
if(this.data.fields[i].label == '是否发起外验'){
|
|
728
|
+
// 如果是 民用成套户 或者 民用集体散户 是否内验 和 是否外验 都是是
|
|
729
|
+
if(this.selectdata.f_apply_type == '工业'||this.selectdata.f_apply_type == '商业'){
|
|
730
|
+
this.data.fields[i].hidden = true
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
// 如果是 民用成套户 或者 民用集体散户 是否内验 和 是否外验 都是是
|
|
734
|
+
if(this.selectdata.f_apply_type == '民用成套户'||this.selectdata.f_apply_type == '民用集体散户'||this.selectdata.f_apply_type == '民用集体户'){
|
|
735
|
+
this.data.fields[i].value = '是'
|
|
736
|
+
this.data.fields[i].hidden = true
|
|
737
|
+
this.data.fields[i].required = false
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
if (this.data.defname === '通气') {
|
|
743
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
744
|
+
if (this.data.fields[i].label == '是否有表' && !this.data.fields[i].value) { //this.data.f_install_num != 1&&
|
|
745
|
+
this.data.fields[i].value = '否'
|
|
746
|
+
this.data.fields[i].hidden = true
|
|
747
|
+
this.data.fields[i].required = false
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if(this.data.fields[i].label === '是否装新表'){
|
|
753
|
+
for(let k=0;k<this.data.fields.length;k++){
|
|
754
|
+
if(this.data.fields[i].value == '是'){
|
|
755
|
+
if(this.data.fields[k].label=='用气性质'||
|
|
756
|
+
this.data.fields[k].label=='气价类型'||
|
|
757
|
+
this.data.fields[k].label=='气价名称'
|
|
758
|
+
){
|
|
759
|
+
this.data.fields[k].required=true,
|
|
760
|
+
this.data.fields[k].hidden=false
|
|
761
|
+
}
|
|
762
|
+
}else{
|
|
763
|
+
if(this.data.fields[k].label=='用气性质'||
|
|
764
|
+
this.data.fields[k].label=='气价类型'||
|
|
765
|
+
this.data.fields[k].label=='气价名称'){
|
|
766
|
+
this.data.fields[k].required=false,
|
|
767
|
+
this.data.fields[k].hidden=true
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
//通气环节可以调出施工环节的表信息来修改
|
|
774
|
+
if (this.data.defname == '通气' || this.data.defname == '施工') {
|
|
775
|
+
console.log("是否有表", this.selectdata.f_hasmeter)
|
|
776
|
+
for (let i = 0; i < this.data.fields.length; i++) {
|
|
777
|
+
if (this.data.fields[i].label === '气表品牌'
|
|
778
|
+
|| this.data.fields[i].label === '气表型号'
|
|
779
|
+
|| this.data.fields[i].label === '表号'
|
|
780
|
+
|| this.data.fields[i].label === '通气表号'
|
|
781
|
+
|| this.data.fields[i].label === '左右表'
|
|
782
|
+
|| this.data.fields[i].label === '气表厂家') {
|
|
783
|
+
if (this.data.f_install_num == 1 && this.selectdata.f_hasmeter && this.selectdata.f_hasmeter == '是') {
|
|
784
|
+
this.data.fields[i].hidden = false
|
|
785
|
+
this.data.fields[i].required = true
|
|
786
|
+
} else if ((this.data.f_install_num == 1 && this.selectdata.f_hasmeter && this.selectdata.f_hasmeter == '否')) {
|
|
787
|
+
this.data.fields[i].hidden = true
|
|
788
|
+
this.data.fields[i].required = false
|
|
789
|
+
}
|
|
790
|
+
if (this.data.fields[i].label === '表号') {
|
|
791
|
+
console.log("表号", this.data.fields[i].value)
|
|
792
|
+
}
|
|
793
|
+
} else if (this.data.fields[i].label === '气表品牌id' || this.data.fields[i].label === '气表型号id') {
|
|
794
|
+
this.data.fields[i].hidden = true
|
|
795
|
+
this.data.fields[i].required = false
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
let array = this.$login.f.rolesnames.split(',')
|
|
801
|
+
if ((this.data.fields[i].label === '技术人员' || array.includes("工程技术部负责人")) && (this.selectdata.defname == '报装申请' || this.selectdata.defname == '勘察初设' || this.selectdata.defname == '任务分配' || this.selectdata.defname == '合同信息')) { //{"source":"this.getParentByType($organization$).getChildByName($技术人员$).getChildren()","userid":"296851"}
|
|
802
|
+
let http = new HttpResetClass()
|
|
803
|
+
let res = await http.load('POST', 'rs/search', `{"source":"this.getParentByType($organization$).getChildByName($工程技术部门$).getChildByName($技术人员$).getChildren()","userid":"${this.$login.f.id}"}`, {
|
|
804
|
+
resolveMsg: null,
|
|
805
|
+
rejectMsg: null // 'search查询技术人员失败,请联系管理员配置技术人员角色'
|
|
806
|
+
})
|
|
807
|
+
// console.log("search查询部门下所有人:", JSON.stringify(res.data))
|
|
808
|
+
this.technologist = res.data
|
|
809
|
+
if (this.technologist) {
|
|
810
|
+
let array = []
|
|
811
|
+
for (let k = 0; k < this.technologist.length; k++) {
|
|
812
|
+
array.push({
|
|
813
|
+
label: this.technologist[k].name,
|
|
814
|
+
value: {name: this.technologist[k].name, id: this.technologist[k].id}
|
|
815
|
+
})
|
|
816
|
+
}
|
|
817
|
+
if (!array.includes("工程技术部负责人") && this.data.fields[i].label === '技术人员') {
|
|
818
|
+
this.data.fields[i].options = array
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
// if (this.data.fields[i].label == '县/区') {
|
|
824
|
+
// console.log('小区获取区县。。。。。' + JSON.stringify(this.$login.f.f_allArea))
|
|
825
|
+
// let rs = []
|
|
826
|
+
// for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
827
|
+
// let temp = {
|
|
828
|
+
// label: this.$login.f.f_allArea[i].label,
|
|
829
|
+
// value: this.$login.f.f_allArea[i].label
|
|
830
|
+
// }
|
|
831
|
+
// rs.push(temp)
|
|
832
|
+
// }
|
|
833
|
+
// this.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
|
|
834
|
+
// }
|
|
835
|
+
|
|
836
|
+
if (this.data.fields[i].label == '合同类型') {
|
|
837
|
+
this.data.fields[i].value = '主合同'
|
|
838
|
+
}
|
|
839
|
+
if (this.data.fields[i].label == '合同业务办理人') {
|
|
840
|
+
if (this.selectdata.f_apply_kefu_employee) {
|
|
841
|
+
if (this.selectdata.f_apply_kefu_employee.startsWith("{") && this.selectdata.f_apply_kefu_employee.endsWith("}")) {
|
|
842
|
+
let temp = JSON.parse(this.selectdata.f_apply_kefu_employee)
|
|
843
|
+
this.data.fields[i].value = temp.name
|
|
844
|
+
} else {
|
|
845
|
+
this.data.fields[i].value = this.selectdata.f_apply_kefu_employee
|
|
846
|
+
}
|
|
847
|
+
} else {
|
|
848
|
+
if (this.selectdata.f_survey_name) {
|
|
849
|
+
if (this.selectdata.f_survey_name.startsWith("{") && this.selectdata.f_survey_name.endsWith("}")) {
|
|
850
|
+
let temp = JSON.parse(this.selectdata.f_survey_name)
|
|
851
|
+
this.data.fields[i].value = temp.name
|
|
852
|
+
} else {
|
|
853
|
+
this.data.fields[i].value = this.selectdata.f_survey_name
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
if (this.data.fields[i].label == '合同编号' && !this.selectdata[this.data.fields[i].field] && this.selectdata.defname == '合同信息') {
|
|
859
|
+
if (!this.$appdata.getSingleValue('所属公司编码')) {
|
|
860
|
+
this.$showMessage(`请先去参数管理设置: 所属公司编码`)
|
|
861
|
+
}
|
|
862
|
+
if (!this.$appdata.getSingleValue('报装合同编号')){
|
|
863
|
+
this.$showMessage(`请先去参数管理设置: ${this.data.fields[i].label}`)
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
// if (this.data.fields[i].label == '合同编号' && !this.selectdata[this.data.fields[i].field] && this.selectdata.defname == '合同审核') {
|
|
867
|
+
// if (!this.$appdata.getSingleValue('所属公司编码')) {
|
|
868
|
+
// this.$showMessage(`请先去参数管理设置: 所属公司编码`)
|
|
869
|
+
// }
|
|
870
|
+
// if (!this.$appdata.getSingleValue(this.data.fields[i].label)) {
|
|
871
|
+
// this.$showMessage(`请先去参数管理设置: ${this.data.fields[i].label}`)
|
|
872
|
+
// } else {
|
|
873
|
+
// let http = new HttpResetClass()
|
|
874
|
+
// //获取购货方信息
|
|
875
|
+
// let data = {
|
|
876
|
+
// tablename: 't_singlevalue',
|
|
877
|
+
// condition: `name = '合同编号' and f_filialeids = '${this.$login.f.f_orgids}'`
|
|
878
|
+
// }
|
|
879
|
+
// let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
880
|
+
// resolveMsg: null,
|
|
881
|
+
// rejectMsg: '获取合同编号失败'
|
|
882
|
+
// }).then((res) => {
|
|
883
|
+
// let temp = res.data[0].value
|
|
884
|
+
// this.contract = temp
|
|
885
|
+
// while (temp.length < 4) {
|
|
886
|
+
// temp = '0' + temp
|
|
887
|
+
// }
|
|
888
|
+
// let dt = new Date().Format("yyyyMM")
|
|
889
|
+
// this.data.fields[i].value = this.$appdata.getSingleValue('所属公司编码') + dt + temp
|
|
890
|
+
// if (this.showview) {
|
|
891
|
+
// this.$refs.service_show.data.fields[i].value = this.$appdata.getSingleValue('所属公司编码') + dt + temp
|
|
892
|
+
// this.$refs.service_show.update()
|
|
893
|
+
// }
|
|
894
|
+
//
|
|
895
|
+
// })
|
|
896
|
+
//
|
|
897
|
+
// // this.$refs.service_show.update()
|
|
898
|
+
// }
|
|
899
|
+
// }
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
}
|
|
903
|
+
// 初始化 buttons_fields
|
|
904
|
+
for (let i = 0; i < this.data.buttons.length; i++) {
|
|
905
|
+
if (this.data.buttons[i].button_fields) {
|
|
906
|
+
for (let j = 0; j < this.data.buttons[i].button_fields.length; j++) {
|
|
907
|
+
// 如果selectdata有这些key,则把selectdata的value赋值给data的value
|
|
908
|
+
if (this.selectdata[this.data.buttons[i].button_fields[j].field]) {
|
|
909
|
+
this.data.buttons[i].button_fields[j].value = this.selectdata[this.data.buttons[i].button_fields[j].field]
|
|
910
|
+
}
|
|
911
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
912
|
+
if (this.data.buttons[i].button_fields[j].type === 'select' && this.$appdata.getParam(this.data.buttons[i].button_fields[j].label)) {
|
|
913
|
+
this.data.buttons[i].button_fields[j].options = this.$appdata.getParam(this.data.buttons[i].button_fields[j].label).trim()
|
|
914
|
+
}
|
|
915
|
+
// 下发特殊配置
|
|
916
|
+
if (this.data.buttons[i].button_name === '下发') {
|
|
917
|
+
if (this.data.buttons[i].button_fields.length === 1) {
|
|
918
|
+
// value初始化
|
|
919
|
+
// if(this.department_search){
|
|
920
|
+
if (this.selectdata[this.data.buttons[i].button_fields[0].field]) {
|
|
921
|
+
for (let k = 0; k < this.department_search.length; k++) {
|
|
922
|
+
// 将id转换为name
|
|
923
|
+
if (Number(this.department_search[k].id) === Number(this.selectdata[this.data.buttons[i].button_fields[0].field])) {
|
|
924
|
+
this.data.buttons[i].button_fields[0].value = {
|
|
925
|
+
id: this.department_search[k].id,
|
|
926
|
+
name: this.department_search[k].name
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
if (this.department_search) {
|
|
933
|
+
let array = []
|
|
934
|
+
for (let k = 0; k < this.department_search.length; k++) {
|
|
935
|
+
array.push({
|
|
936
|
+
label: this.department_search[k].name,
|
|
937
|
+
value: {id: this.department_search[k].id, name: this.department_search[k].name}
|
|
938
|
+
})
|
|
939
|
+
}
|
|
940
|
+
this.data.buttons[i].button_fields[0].options = array
|
|
941
|
+
}
|
|
942
|
+
let array = this.$login.f.rolesnames.split(',')
|
|
943
|
+
if (this.selectdata.defname == '任务分配' && array.includes("工程技术部负责人")) {
|
|
944
|
+
let array = []
|
|
945
|
+
for (let k = 0; k < this.technologist.length; k++) {
|
|
946
|
+
array.push({
|
|
947
|
+
label: this.technologist[k].name,
|
|
948
|
+
value: {id: this.technologist[k].id, name: this.technologist[k].name}
|
|
949
|
+
})
|
|
950
|
+
}
|
|
951
|
+
this.data.buttons[i].button_fields[0].options = array
|
|
952
|
+
}
|
|
953
|
+
} else {
|
|
954
|
+
this.$showMessage("下发按钮必须满足 当且仅当一个字段")
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
}
|
|
961
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
962
|
+
let temp = JSON.parse(JSON.stringify(this.data))
|
|
963
|
+
// let temp = this.data
|
|
964
|
+
// 退回原因展示
|
|
965
|
+
console.log("this.selectdata.f_back_reason:-----" + this.selectdata.f_back_reason)
|
|
966
|
+
if (this.selectdata.f_back_reason) {
|
|
967
|
+
temp['back_reason'] = this.selectdata.f_back_reason
|
|
968
|
+
}
|
|
969
|
+
this.show_data = temp
|
|
970
|
+
// 显示组件
|
|
971
|
+
// this.showview = false
|
|
972
|
+
this.$nextTick(() => {
|
|
973
|
+
this.showview = true
|
|
974
|
+
})
|
|
975
|
+
// console.log("fields",this.data.fields)
|
|
976
|
+
console.log("测试一----------")
|
|
977
|
+
if (this.selectdata.defname === '现场勘察') {
|
|
978
|
+
let http = new HttpResetClass()
|
|
979
|
+
// let condition = "f_filialeid = " + this.$login.f.orgid
|
|
980
|
+
let condition = "1 = 1"
|
|
981
|
+
let res = await http.load('POST','rs/sql/singleTable',{data:{tablename:'t_area',condition:condition}}, {resolveMsg: null, rejectMsg: null})
|
|
982
|
+
for (let i = 0; i < this.show_data.fields.length; i++) {
|
|
983
|
+
if (this.show_data.fields[i].label == '县/区') {
|
|
984
|
+
let data = []
|
|
985
|
+
let array = []
|
|
986
|
+
data = res.data.map(item => {
|
|
987
|
+
return item.f_area;
|
|
988
|
+
})
|
|
989
|
+
for (let q = 0; q < data.length; q++) {
|
|
990
|
+
let arraydata = {
|
|
991
|
+
'label': data[q],
|
|
992
|
+
'value': data[q]
|
|
993
|
+
}
|
|
994
|
+
if (array.length != 0) {
|
|
995
|
+
for (let w = 0; w < array.length; w++) {
|
|
996
|
+
if (array[w].label == data[q]) {
|
|
997
|
+
break
|
|
998
|
+
}
|
|
999
|
+
while (w == array.length - 1) {
|
|
1000
|
+
array.push(arraydata)
|
|
1001
|
+
break
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
} else {
|
|
1005
|
+
array.push(arraydata)
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
this.show_data.fields[i].options = array
|
|
1009
|
+
console.log("选择框数据:" + JSON.stringify(this.show_data.fields[i].options))
|
|
1010
|
+
}
|
|
1011
|
+
// if (this.$refs.service_show.data.fields[i].label == '街道') {
|
|
1012
|
+
// let data = []
|
|
1013
|
+
// let array = []
|
|
1014
|
+
// data = res.data.map(item => {
|
|
1015
|
+
// return item.f_street;
|
|
1016
|
+
// })
|
|
1017
|
+
// for (let q = 0; q < data.length; q++) {
|
|
1018
|
+
// let arraydata = {
|
|
1019
|
+
// 'label': data[q],
|
|
1020
|
+
// 'value': data[q]
|
|
1021
|
+
// }
|
|
1022
|
+
// if (array.length != 0) {
|
|
1023
|
+
// for (let w = 0; w < array.length; w++) {
|
|
1024
|
+
// if (array[w].label == data[q]) {
|
|
1025
|
+
// break
|
|
1026
|
+
// }
|
|
1027
|
+
// while (w == array.length - 1) {
|
|
1028
|
+
// array.push(arraydata)
|
|
1029
|
+
// break
|
|
1030
|
+
// }
|
|
1031
|
+
// }
|
|
1032
|
+
// } else {
|
|
1033
|
+
// array.push(arraydata)
|
|
1034
|
+
// }
|
|
1035
|
+
// }
|
|
1036
|
+
// this.$refs.service_show.data.fields[i].options = array
|
|
1037
|
+
// console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1038
|
+
// }
|
|
1039
|
+
// if (this.$refs.service_show.data.fields[i].label == '小区') {
|
|
1040
|
+
// let data = []
|
|
1041
|
+
// let array = []
|
|
1042
|
+
// data = res.data.map(item => {
|
|
1043
|
+
// return item.f_residential_area;
|
|
1044
|
+
// })
|
|
1045
|
+
// for (let q = 0; q < data.length; q++) {
|
|
1046
|
+
// let arraydata = {
|
|
1047
|
+
// 'label': data[q],
|
|
1048
|
+
// 'value': data[q]
|
|
1049
|
+
// }
|
|
1050
|
+
// if (array.length != 0) {
|
|
1051
|
+
// for (let w = 0; w < array.length; w++) {
|
|
1052
|
+
// if (array[w].label == data[q]) {
|
|
1053
|
+
// break
|
|
1054
|
+
// }
|
|
1055
|
+
// while (w == array.length - 1) {
|
|
1056
|
+
// array.push(arraydata)
|
|
1057
|
+
// break
|
|
1058
|
+
// }
|
|
1059
|
+
// }
|
|
1060
|
+
// } else {
|
|
1061
|
+
// array.push(arraydata)
|
|
1062
|
+
// }
|
|
1063
|
+
// }
|
|
1064
|
+
// this.$refs.service_show.data.fields[i].options = array
|
|
1065
|
+
// console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1066
|
+
// }
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
|
|
1071
|
+
dataChange(button_name) {
|
|
1072
|
+
let beforeData = this.data.fields
|
|
1073
|
+
let submitData = this.$refs.service_show.data.fields
|
|
1074
|
+
// 比较
|
|
1075
|
+
let f_before_change = []
|
|
1076
|
+
let f_change = []
|
|
1077
|
+
for (let i = 0; i < beforeData.length; i++) {
|
|
1078
|
+
if (beforeData[i].value != submitData[i].value) {
|
|
1079
|
+
f_before_change.push(beforeData[i])
|
|
1080
|
+
f_change.push(submitData[i])
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
if (f_before_change.length == 0 && f_change.length == 0) {
|
|
1084
|
+
return
|
|
1085
|
+
}
|
|
1086
|
+
// 构建数据结构
|
|
1087
|
+
let data = {}
|
|
1088
|
+
data.f_before_change = f_before_change
|
|
1089
|
+
data.f_change = f_change
|
|
1090
|
+
data.f_process_id = this.data.f_process_id
|
|
1091
|
+
data.f_apply_num = this.data.f_apply_num
|
|
1092
|
+
data.actdefid = this.data.actdefid
|
|
1093
|
+
data.defname = this.data.defname
|
|
1094
|
+
data.f_filiale = this.$refs.service_show.model.f_filiale
|
|
1095
|
+
data.f_parentname = this.$refs.service_show.model.f_parentname
|
|
1096
|
+
data.f_operator = this.$refs.service_show.model.f_operator
|
|
1097
|
+
data.f_date = this.$refs.service_show.model.f_operate_date
|
|
1098
|
+
data.f_button_name = button_name
|
|
1099
|
+
delete data.id
|
|
1100
|
+
// let http = new HttpResetClass()
|
|
1101
|
+
// http.load('POST', 'rs/logic/saveChageData', {
|
|
1102
|
+
// data: data
|
|
1103
|
+
// }, {resolveMsg: null, rejectMsg: null})
|
|
1104
|
+
// if(false){
|
|
1105
|
+
//
|
|
1106
|
+
// }
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
,
|
|
1110
|
+
events: {
|
|
1111
|
+
refreshSum(number, cost, tujiansum, anzhuangsum) {
|
|
1112
|
+
this.number = number
|
|
1113
|
+
this.cost = cost
|
|
1114
|
+
this.tujiansum = tujiansum
|
|
1115
|
+
this.anzhuangsum = anzhuangsum
|
|
1116
|
+
this.initializtion()
|
|
1117
|
+
},
|
|
1118
|
+
'get-cost'(val) {
|
|
1119
|
+
this.cost = val
|
|
1120
|
+
|
|
1121
|
+
this.initializtion()
|
|
1122
|
+
},
|
|
1123
|
+
'anzhuang-sum'(val) {
|
|
1124
|
+
this.anzhuangsum = val
|
|
1125
|
+
this.initializtion()
|
|
1126
|
+
},
|
|
1127
|
+
'tujian-sum'(val) {
|
|
1128
|
+
this.tujiansum = val
|
|
1129
|
+
this.initializtion()
|
|
1130
|
+
},
|
|
1131
|
+
'get-number'(val) {
|
|
1132
|
+
this.number = val
|
|
1133
|
+
|
|
1134
|
+
this.initializtion()
|
|
1135
|
+
}
|
|
1136
|
+
,
|
|
1137
|
+
'get-pgd'(val) {
|
|
1138
|
+
this.pgd = val
|
|
1139
|
+
this.initializtion()
|
|
1140
|
+
}
|
|
1141
|
+
,
|
|
1142
|
+
// 任意select选中时触发事件,关联性操作
|
|
1143
|
+
async 'select_cascade'(index) {
|
|
1144
|
+
// this.$refs.service_show.data // 子业务显示组件
|
|
1145
|
+
// 级联操作示例:
|
|
1146
|
+
/*
|
|
1147
|
+
if(this.$refs.service_show.data.fields[index].label==='报建类型'){
|
|
1148
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1149
|
+
// 控制设置级联
|
|
1150
|
+
// 源select所选的值 this.$refs.service_show.data.fields[index].value
|
|
1151
|
+
if(this.$refs.service_show.data.fields[i].label==='级联测试2'){
|
|
1152
|
+
this.$refs.service_show.data.fields[i].options=[
|
|
1153
|
+
{label:'级联选项1',value:'级联选项1'},{label:'级联选项2',value:'级联选项2'},{label:'级联选项3',value:'级联选项3'}
|
|
1154
|
+
]
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
*/
|
|
1159
|
+
/*
|
|
1160
|
+
{
|
|
1161
|
+
"label": "用气性质",
|
|
1162
|
+
"type": "select",
|
|
1163
|
+
"bootstraped": "col-sm-4",
|
|
1164
|
+
"field": "f_gasproperties",
|
|
1165
|
+
"readonly": true,
|
|
1166
|
+
"disabled": false,
|
|
1167
|
+
"required": false,
|
|
1168
|
+
"hidden": true,
|
|
1169
|
+
"options": []
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"label": "气价类型",
|
|
1173
|
+
"type": "select",
|
|
1174
|
+
"bootstraped": "col-sm-4",
|
|
1175
|
+
"field": "f_price_type",
|
|
1176
|
+
"readonly": true,
|
|
1177
|
+
"disabled": false,
|
|
1178
|
+
"required": false,
|
|
1179
|
+
"hidden": true,
|
|
1180
|
+
"options": []
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
"label": "气价名称",
|
|
1184
|
+
"type": "select",
|
|
1185
|
+
"bootstraped": "col-sm-4",
|
|
1186
|
+
"field": "f_price_name",
|
|
1187
|
+
"readonly": true,
|
|
1188
|
+
"disabled": false,
|
|
1189
|
+
"required": false,
|
|
1190
|
+
"hidden": true,
|
|
1191
|
+
"options": []
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"label": "气价id",
|
|
1195
|
+
"type": "number",
|
|
1196
|
+
"bootstraped": "col-sm-4",
|
|
1197
|
+
"field": "f_price_id",
|
|
1198
|
+
"readonly": true,
|
|
1199
|
+
"disabled": false,
|
|
1200
|
+
"required": false,
|
|
1201
|
+
"hidden": true
|
|
1202
|
+
},
|
|
1203
|
+
*/
|
|
1204
|
+
if(this.$refs.service_show.data.fields[index].label === '是否装新表'){
|
|
1205
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1206
|
+
if(this.$refs.service_show.data.fields[index].value == '是'){
|
|
1207
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'||
|
|
1208
|
+
this.$refs.service_show.data.fields[i].label=='气价类型'||
|
|
1209
|
+
this.$refs.service_show.data.fields[i].label=='气价名称'
|
|
1210
|
+
){
|
|
1211
|
+
this.$refs.service_show.data.fields[i].required=true,
|
|
1212
|
+
this.$refs.service_show.data.fields[i].hidden=false
|
|
1213
|
+
}
|
|
1214
|
+
}else{
|
|
1215
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'||
|
|
1216
|
+
this.$refs.service_show.data.fields[i].label=='气价类型'||
|
|
1217
|
+
this.$refs.service_show.data.fields[i].label=='气价名称'){
|
|
1218
|
+
this.$refs.service_show.data.fields[i].required=false,
|
|
1219
|
+
this.$refs.service_show.data.fields[i].hidden=true
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
if(this.$refs.service_show.data.fields[index].label === '是否装新表'&&this.$refs.service_show.data.fields[index].value=='是'){
|
|
1225
|
+
let usertype = ''
|
|
1226
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1227
|
+
if(this.$refs.service_show.data.fields[i].label=='用户类型'){
|
|
1228
|
+
usertype = this.$refs.service_show.data.fields[i].value
|
|
1229
|
+
}
|
|
1230
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'&&this.$refs.service_show.data.fields[index].value){
|
|
1231
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1232
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1233
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(usertype)
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
if (this.$refs.service_show.data.fields[index].label === '用户类型') { //用气性质
|
|
1239
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1240
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'&&this.$refs.service_show.data.fields[index].value){
|
|
1241
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1242
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1243
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(this.$refs.service_show.data.fields[index].value.trim())
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
if (this.$refs.service_show.data.fields[index].label === '技术人员') { //气价类型
|
|
1249
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1250
|
+
if(this.$refs.service_show.data.fields[i].label=='技术人员id'&&this.$refs.service_show.data.fields[index].value){
|
|
1251
|
+
if(typeof this.$refs.service_show.data.fields[index].value=='object'){
|
|
1252
|
+
this.$refs.service_show.data.fields[i].value=this.$refs.service_show.data.fields[index].value.id
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
if (this.$refs.service_show.data.fields[index].label === '用气性质') { //气价类型
|
|
1260
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1261
|
+
if(this.$refs.service_show.data.fields[i].label=='气价类型'&&this.$refs.service_show.data.fields[index].value){
|
|
1262
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1263
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1264
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(this.$refs.service_show.data.fields[i].label)
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
if (this.$refs.service_show.data.fields[index].label === '气价类型') {
|
|
1270
|
+
let gasproperties = ''
|
|
1271
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1272
|
+
if(this.$refs.service_show.data.fields[i].label=='用气性质'){
|
|
1273
|
+
gasproperties= this.$refs.service_show.data.fields[i].value
|
|
1274
|
+
}
|
|
1275
|
+
if(this.$refs.service_show.data.fields[i].label=='气价名称'){
|
|
1276
|
+
this.$refs.service_show.data.fields[i].value=''
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
let pricetype=this.$refs.service_show.data.fields[index].value
|
|
1282
|
+
let http = new HttpResetClass()
|
|
1283
|
+
let condition =`f_user_type = '${this.selectdata.f_user_type}' and f_filiale = '${this.$login.f.f_fengongsi}'
|
|
1284
|
+
and f_gasproperties = '${gasproperties}' and f_price_type = '${this.$refs.service_show.data.fields[index].value}'`
|
|
1285
|
+
let res = await http.load('POST', 'rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null})
|
|
1286
|
+
console.log('获取的气价类型,',res)
|
|
1287
|
+
let house2 = []
|
|
1288
|
+
if (res.data.pricename) {
|
|
1289
|
+
for (let row of res.data.pricename){
|
|
1290
|
+
house2.push({label: row.f_price_name,value: {id:row.f_price_id,name:row.f_price_name}})
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1295
|
+
if (this.$refs.service_show.data.fields[i].label === '气价名称') {
|
|
1296
|
+
this.$refs.service_show.data.fields[i].options= house2
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
if (this.$refs.service_show.data.fields[index].label === '气价名称') { //用气性质
|
|
1302
|
+
if(this.$refs.service_show.data.fields[index].value&&typeof this.$refs.service_show.data.fields[index].value =='object'){
|
|
1303
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
1304
|
+
if(this.$refs.service_show.data.fields[i].label=='气价id'){
|
|
1305
|
+
this.$refs.service_show.data.fields[i].value= Number(this.$refs.service_show.data.fields[index].value.id)
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
this.$refs.service_show.data.fields[index].value= this.$refs.service_show.data.fields[index].value.name
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
if (this.$refs.service_show.data.fields[index].label === '报建类型') {
|
|
1313
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1314
|
+
if (this.$refs.service_show.data.fields[i].label == '用户类型') {
|
|
1315
|
+
if (this.$refs.service_show.data.fields[index].value.includes('民用')) {
|
|
1316
|
+
this.$refs.service_show.data.fields[i].value = '民用'
|
|
1317
|
+
} else {
|
|
1318
|
+
this.$refs.service_show.data.fields[i].value = '非民用'
|
|
1319
|
+
}
|
|
1320
|
+
this.$refs.service_show.update()
|
|
1321
|
+
return
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
if (this.$refs.service_show.data.fields[index].label === '表号') {
|
|
1327
|
+
if(this.$refs.service_show.data.fields[index].value){
|
|
1328
|
+
let http = new HttpResetClass()
|
|
1329
|
+
let data = {
|
|
1330
|
+
columnname: ` uf.f_meternumber `,
|
|
1331
|
+
tablename: ' t_userfiles uf LEFT JOIN t_userinfo ui on ui.f_userinfo_id = uf.f_userinfo_id ',
|
|
1332
|
+
condition: `(f_user_state = '正常' or f_user_state = '报装') and uf.f_meternumber = '${this.$refs.service_show.data.fields[index].value}' and ui.f_process_id != '${this.selectdata.f_process_id}'`
|
|
1333
|
+
}
|
|
1334
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
1335
|
+
resolveMsg: null,
|
|
1336
|
+
rejectMsg: "表号查询失败"
|
|
1337
|
+
})
|
|
1338
|
+
if(res.data.length>0){
|
|
1339
|
+
this.$showMessage("警告:表号已被使用!请查证")
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
if (this.$refs.service_show.data.fields[index].label === '安装表数'&&this.$refs.service_show.data.fields[index].value==1) {
|
|
1345
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++){
|
|
1346
|
+
if (this.$refs.service_show.data.fields[i].label === '用户类型'){
|
|
1347
|
+
// =this.$refs.service_show.data.fields[i].value
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
if (this.data.f_install_num == 1 && this.$refs.service_show.data.fields[index].label === '是否有表') {
|
|
1353
|
+
if (this.$refs.service_show.data.fields[index].value == "是") {
|
|
1354
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1355
|
+
if (this.$refs.service_show.data.fields[i].label === '气表品牌'
|
|
1356
|
+
|| this.$refs.service_show.data.fields[i].label === '气表型号'
|
|
1357
|
+
|| this.$refs.service_show.data.fields[i].label === '左右表'
|
|
1358
|
+
|| this.$refs.service_show.data.fields[i].label === '表号'
|
|
1359
|
+
|| this.$refs.service_show.data.fields[i].label === '气表厂家') {
|
|
1360
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
1361
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
1362
|
+
} else if (this.selectdata.defname == '通气' && this.$refs.service_show.data.fields[i].label === '通气表号') {
|
|
1363
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
1364
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
} else {
|
|
1368
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1369
|
+
if (this.$refs.service_show.data.fields[i].label === '气表品牌'
|
|
1370
|
+
|| this.$refs.service_show.data.fields[i].label === '气表型号'
|
|
1371
|
+
|| this.$refs.service_show.data.fields[i].label === '表号'
|
|
1372
|
+
|| this.$refs.service_show.data.fields[i].label === '左右表'
|
|
1373
|
+
|| this.$refs.service_show.data.fields[i].label === '气表厂家') {
|
|
1374
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
1375
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
1376
|
+
} else if (this.selectdata.defname == '通气' && this.$refs.service_show.data.fields[i].label === '通气表号') {
|
|
1377
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
1378
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
if (this.$refs.service_show.data.fields[index].label === '气表品牌') {
|
|
1384
|
+
// console.log("气表品牌>>>>>"+JSON.stringify(this.$refs.service_show.data.fields[index].value))
|
|
1385
|
+
let id = null
|
|
1386
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1387
|
+
if (this.$refs.service_show.data.fields[i].label == '气表型号') {
|
|
1388
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1389
|
+
let temp = {}
|
|
1390
|
+
// console.log("this.$refs.service_show.data.fields[index].value",this.$refs.service_show.data.fields[index].value)
|
|
1391
|
+
if(typeof this.$refs.service_show.data.fields[index].value =='string'){
|
|
1392
|
+
for (let x = 0; x < Vue.ApplyGetSaleParam.gasbrands.length; x++) {
|
|
1393
|
+
if (Vue.ApplyGetSaleParam.gasbrands[x].label == this.$refs.service_show.data.fields[index].value) {
|
|
1394
|
+
temp = Vue.ApplyGetSaleParam.gasbrands[x].value.gasmodel
|
|
1395
|
+
id = Vue.ApplyGetSaleParam.gasbrands[x].value.id
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
// let temp = this.$refs.service_show.data.fields[index].value.gasmodel
|
|
1399
|
+
this.$refs.service_show.data.fields[i].options = temp
|
|
1400
|
+
this.$refs.service_show.data.fields[index].value = typeof this.$refs.service_show.data.fields[index].value == 'string' ? this.$refs.service_show.data.fields[index].value : this.$refs.service_show.data.fields[index].value.f_meter_brand
|
|
1401
|
+
}else{
|
|
1402
|
+
id= Number(this.$refs.service_show.data.fields[index].value.id)
|
|
1403
|
+
let http = new HttpResetClass()
|
|
1404
|
+
let data = {
|
|
1405
|
+
columnname: 'f_meter_style,id',
|
|
1406
|
+
tablename: 't_gasmodel ',
|
|
1407
|
+
condition: ` f_gasbrand_id = ${this.$refs.service_show.data.fields[index].value.id} `
|
|
1408
|
+
}
|
|
1409
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {resolveMsg: null, rejectMsg: '获取气表型号失败'})
|
|
1410
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
1411
|
+
for(let x=0;x<res.data.length;x++){
|
|
1412
|
+
this.$refs.service_show.data.fields[i].options.push({label:res.data[x].f_meter_style,value:{id:res.data[x].id,name:res.data[x].f_meter_style}})
|
|
1413
|
+
}
|
|
1414
|
+
console.log("气表型号",this.$refs.service_show.data.fields[i].options)
|
|
1415
|
+
// for (let x = 0; x < Vue.ApplyGetSaleParam.gasbrands.length; x++) {
|
|
1416
|
+
// if (Vue.ApplyGetSaleParam.gasbrands[x].label == this.$refs.service_show.data.fields[index].value.f_meter_brand) {
|
|
1417
|
+
// temp = Vue.ApplyGetSaleParam.gasbrands[x].value.gasmodel
|
|
1418
|
+
// id = Vue.ApplyGetSaleParam.gasbrands[x].value.id
|
|
1419
|
+
// }
|
|
1420
|
+
// }
|
|
1421
|
+
// // let temp = this.$refs.service_show.data.fields[index].value.gasmodel
|
|
1422
|
+
// this.$refs.service_show.data.fields[i].options = temp
|
|
1423
|
+
// this.$refs.service_show.data.fields[index].value = typeof this.$refs.service_show.data.fields[index].value == 'string' ? this.$refs.service_show.data.fields[index].value : this.$refs.service_show.data.fields[index].value.f_meter_brand
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
// this.$refs.service_show.update()
|
|
1428
|
+
} else if (this.$refs.service_show.data.fields[i].label == '气表品牌id') {
|
|
1429
|
+
this.$refs.service_show.data.fields[i].value = id
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
for(let i = 0; i < this.$refs.service_show.data.fields.length; i++){
|
|
1433
|
+
if (this.$refs.service_show.data.fields[i].label == '气表品牌id') {
|
|
1434
|
+
this.$refs.service_show.data.fields[i].value = id
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
this.$refs.service_show.update()
|
|
1438
|
+
}
|
|
1439
|
+
if (this.$refs.service_show.data.fields[index].label === '气表型号') {
|
|
1440
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1441
|
+
if (this.$refs.service_show.data.fields[i].label == '气表型号id') {
|
|
1442
|
+
this.$refs.service_show.data.fields[i].value = Number(this.$refs.service_show.data.fields[index].value.id)
|
|
1443
|
+
// console.log("气表型号id:",this.$refs.service_show.data.fields[i].value)
|
|
1444
|
+
}else if(this.$refs.service_show.data.fields[i].label == '气表品牌'&&typeof this.$refs.service_show.data.fields[i].value =='object'){
|
|
1445
|
+
this.$refs.service_show.data.fields[i].value = this.$refs.service_show.data.fields[i].value.name
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
this.$refs.service_show.data.fields[index].value = this.$refs.service_show.data.fields[index].value.name
|
|
1449
|
+
this.$refs.service_show.update()
|
|
1450
|
+
return
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
if (this.$refs.service_show.data.fields[index].label == '电话号码') {
|
|
1455
|
+
let phone = this.$refs.service_show.data.fields[index].value
|
|
1456
|
+
// 电话号码效验
|
|
1457
|
+
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
1458
|
+
this.$refs.service_show.data.fields[index].value = ""
|
|
1459
|
+
this.$showAlert('电话号码格式不正确,请重新输入。', 'info', 2000)
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
if (this.$refs.service_show.data.fields[index].label == '施工单位' ||
|
|
1464
|
+
this.$refs.service_show.data.fields[index].label == '检测单位' ||
|
|
1465
|
+
this.$refs.service_show.data.fields[index].label == '监理单位' ||
|
|
1466
|
+
this.$refs.service_show.data.fields[index].label == '土建单位' ||
|
|
1467
|
+
this.$refs.service_show.data.fields[index].label == '设计单位') {
|
|
1468
|
+
console.log(this.$refs.service_show.data.fields[index].label,this.$refs.service_show.data.fields[index].value)
|
|
1469
|
+
this.$refs.service_show.update()
|
|
1470
|
+
return
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
if (
|
|
1474
|
+
this.$refs.service_show.data.fields[index].label === '最终核算成本金额' ||
|
|
1475
|
+
this.$refs.service_show.data.fields[index].label === '合同总金额' ||
|
|
1476
|
+
this.$refs.service_show.data.fields[index].label === '工程盈利'
|
|
1477
|
+
) {
|
|
1478
|
+
|
|
1479
|
+
var a = 0
|
|
1480
|
+
var b = 0
|
|
1481
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1482
|
+
// 控制设置级联
|
|
1483
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
1484
|
+
// xxx xx xxx
|
|
1485
|
+
if (this.$refs.service_show.data.fields[i].label === '最终核算成本金额') {
|
|
1486
|
+
this.$refs.service_show.data.fields[i].value = (this.number + this.cost + this.anzhuangsum + this.tujiansum)
|
|
1487
|
+
a = this.$refs.service_show.data.fields[i].value
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
if (this.$refs.service_show.data.fields[i].label === '合同总金额' && this.$refs.service_show.data.fields[i].value) {
|
|
1491
|
+
b = this.$refs.service_show.data.fields[i].value
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
var c = b - a
|
|
1495
|
+
// 数据计算完毕得到工程结余
|
|
1496
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1497
|
+
if (this.$refs.service_show.data.fields[i].label === '工程盈利') {
|
|
1498
|
+
this.$refs.service_show.data.fields[i].value = c
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
if (this.$refs.service_show.showadd_fields && this.$refs.service_show.showadd_fields.length > 0 && this.$refs.service_show.showadd_fields[index].label === '收费金额') {
|
|
1504
|
+
let chargeMoney = this.$refs.service_show.showadd_fields[index].value
|
|
1505
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1506
|
+
if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
|
|
1507
|
+
let cumulativeMoney = this.$refs.service_show.data.fields[i].value
|
|
1508
|
+
if (Number(chargeMoney) > Number(cumulativeMoney)) {
|
|
1509
|
+
this.$showMessage("收费金额不得大于未结总金额!")
|
|
1510
|
+
this.$refs.service_show.showadd_fields[index].value = null
|
|
1511
|
+
return
|
|
1512
|
+
} else {
|
|
1513
|
+
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
//根据合同预算金额和累计缴费金额计算未结金额
|
|
1520
|
+
if (this.$refs.service_show.data.fields[index] && this.$refs.service_show.data.fields[index].label === '累计缴费金额') {
|
|
1521
|
+
let cumulativeMoney = this.$refs.service_show.data.fields[index].value
|
|
1522
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1523
|
+
if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
|
|
1524
|
+
this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_contract_money) - Number(cumulativeMoney)
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
//根据合同预算金额和累计开票金额计算未开票金额
|
|
1529
|
+
if (this.$refs.service_show.data.fields[index].label === '累计开票金额') {
|
|
1530
|
+
let residualInvoicing = this.$refs.service_show.data.fields[index].value
|
|
1531
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1532
|
+
if (this.$refs.service_show.data.fields[i].label === '未开票金额') {
|
|
1533
|
+
this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_contract_total_money) - Number(residualInvoicing)
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
//如果资料验收是否通过和工程验收是否通过为否的时候弹出原因填写框
|
|
1538
|
+
if (this.$refs.service_show.data.fields[index].label === '资料验收是否通过') {
|
|
1539
|
+
let res = this.$refs.service_show.data.fields[index].value
|
|
1540
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1541
|
+
if (this.$refs.service_show.data.fields[i].label === '资料验收不通过原因') {
|
|
1542
|
+
if (res === '否') {
|
|
1543
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
1544
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
1545
|
+
} else {
|
|
1546
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
1547
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
if (this.$refs.service_show.data.fields[index].label === '工程验收是否通过') {
|
|
1553
|
+
let res = this.$refs.service_show.data.fields[index].value
|
|
1554
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1555
|
+
if (this.$refs.service_show.data.fields[i].label === '工程验收不通过原因') {
|
|
1556
|
+
if (res === '否') {
|
|
1557
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
1558
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
1559
|
+
} else {
|
|
1560
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
1561
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
//根据总户数和实际安装表数计算未安装表数
|
|
1567
|
+
// if (this.$refs.service_show.data.fields[index].label === '实际安装表数') {
|
|
1568
|
+
// let value = this.$refs.service_show.data.fields[index].value
|
|
1569
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1570
|
+
// if (this.$refs.service_show.data.fields[i].label === '未安装表数') {
|
|
1571
|
+
// this.$refs.service_show.data.fields[i].label === '未安装表数'
|
|
1572
|
+
// this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_install_num) - Number(value)
|
|
1573
|
+
// }
|
|
1574
|
+
// }
|
|
1575
|
+
// }
|
|
1576
|
+
|
|
1577
|
+
//金额小写得到大写
|
|
1578
|
+
if (this.$refs.service_show.showadd_fields && this.$refs.service_show.showadd_fields.length > 0 && this.$refs.service_show.showadd_fields.fields[index].label === '收费金额') {
|
|
1579
|
+
if (this.$refs.service_show.showadd_fields[index].value || this.$refs.service_show.showadd_fields.fields[index].value) {
|
|
1580
|
+
var re = /^[0-9]+.?[0-9]*/
|
|
1581
|
+
let temp = this.$refs.service_show.showadd_fields[index].value
|
|
1582
|
+
if (temp == "" || isNaN(temp)) {
|
|
1583
|
+
this.$showMessage("请输入纯数字")
|
|
1584
|
+
this.$refs.service_show.showadd_fields[index].value = 0
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
let temp = this.$refs.service_show.showadd_fields[index]
|
|
1588
|
+
let value = temp.value
|
|
1589
|
+
// let chargeMoney = this.$refs.service_show.showadd_fields[index].value
|
|
1590
|
+
for (let i = 0; i < this.$refs.service_show.showadd_fields.fields.length; i++) {
|
|
1591
|
+
if (this.$refs.service_show.showadd_fields.fields[i].label === '金额大写') {
|
|
1592
|
+
let te = {
|
|
1593
|
+
value: this.smalltoBIG(value)
|
|
1594
|
+
}
|
|
1595
|
+
this.$refs.service_show.showadd_fields[i] = te
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
if (this.$refs.service_show.data.fields[index].label === '县/区') {
|
|
1602
|
+
let temp = this.$refs.service_show.data.fields[index].value
|
|
1603
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1604
|
+
// 控制设置级联
|
|
1605
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
1606
|
+
if (this.$refs.service_show.data.fields[i].label === '片区') {
|
|
1607
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
1608
|
+
this.$refs.service_show.data.fields[i].options = []
|
|
1609
|
+
let rs = []
|
|
1610
|
+
console.log('小区片区。。。', temp)
|
|
1611
|
+
for (let j = 0; j < this.$login.f.f_allArea.length; j++) {
|
|
1612
|
+
if (this.$login.f.f_allArea[j].label === temp) {
|
|
1613
|
+
rs = this.$login.f.f_allArea[j].value
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
console.log('获取小区片区=>' + JSON.stringify(rs))
|
|
1617
|
+
this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
|
|
1618
|
+
this.$refs.service_show.update()
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
//控制尾款
|
|
1623
|
+
if (
|
|
1624
|
+
this.$refs.service_show.data.fields[index].label === '合同金额' ||
|
|
1625
|
+
this.$refs.service_show.data.fields[index].label === '首付' ||
|
|
1626
|
+
this.$refs.service_show.data.fields[index].label === '进度款' ||
|
|
1627
|
+
this.$refs.service_show.data.fields[index].label === '尾款'
|
|
1628
|
+
) {
|
|
1629
|
+
console.log('即将计算合同金额')
|
|
1630
|
+
var cash = 0
|
|
1631
|
+
var downpayments = 0
|
|
1632
|
+
var tailmoney = 0
|
|
1633
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1634
|
+
// 控制设置级联
|
|
1635
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
1636
|
+
// xxx xx xxx
|
|
1637
|
+
if (this.$refs.service_show.data.fields[i].label === '合同金额' && this.$refs.service_show.data.fields[i].value) {
|
|
1638
|
+
cash = this.$refs.service_show.data.fields[i].value
|
|
1639
|
+
}
|
|
1640
|
+
if (this.$refs.service_show.data.fields[i].label === '首付' && this.$refs.service_show.data.fields[i].value) {
|
|
1641
|
+
downpayments = this.$refs.service_show.data.fields[i].value
|
|
1642
|
+
}
|
|
1643
|
+
if (this.$refs.service_show.data.fields[i].label === '进度款' && this.$refs.service_show.data.fields[i].value) {
|
|
1644
|
+
tailmoney = this.$refs.service_show.data.fields[i].value
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
var a = cash - downpayments
|
|
1648
|
+
a= a.toFixed(2)
|
|
1649
|
+
// 数据计算完毕得到尾款
|
|
1650
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1651
|
+
if (this.$refs.service_show.data.fields[i].label === '尾款') {
|
|
1652
|
+
if (cash === downpayments) {
|
|
1653
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
1654
|
+
} else {
|
|
1655
|
+
this.$refs.service_show.data.fields[i].value = (cash - downpayments - tailmoney)
|
|
1656
|
+
this.$refs.service_show.data.fields[i].value=this.$refs.service_show.data.fields[i].value.toFixed(2)
|
|
1657
|
+
console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
if (this.$refs.service_show.data.fields[i].label === '首付') {
|
|
1661
|
+
if (a < 0) {
|
|
1662
|
+
this.$showMessage("首付款数额过大")
|
|
1663
|
+
downpayments = 0
|
|
1664
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
if (this.$refs.service_show.data.fields[i].label === '进度款') {
|
|
1669
|
+
|
|
1670
|
+
if (cash === downpayments) {
|
|
1671
|
+
tailmoney = 0
|
|
1672
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
1673
|
+
this.$refs.service_show.data.fields[i].readonly = true
|
|
1674
|
+
} else {
|
|
1675
|
+
this.$refs.service_show.data.fields[i].readonly = false
|
|
1676
|
+
tailmoney = this.$refs.service_show.data.fields[i].value
|
|
1677
|
+
}
|
|
1678
|
+
if (tailmoney > a) {
|
|
1679
|
+
this.$showMessage("进度款数额过大")
|
|
1680
|
+
tailmoney = 0
|
|
1681
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
//新增的功能逻辑-------------
|
|
1687
|
+
//报建状态的改变
|
|
1688
|
+
if (this.selectdata.defname != '完工') {
|
|
1689
|
+
this.selectdata.f_sub_state = '正在进行'
|
|
1690
|
+
}
|
|
1691
|
+
//所有选择框/输入框遍历
|
|
1692
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1693
|
+
//任何是否的选择框只要是否都不能提交
|
|
1694
|
+
if (this.selectdata.defname != '客户申请') {
|
|
1695
|
+
if (this.$refs.service_show.data.fields[i].value === '否') {
|
|
1696
|
+
this.$refs.service_show.disable_button = false
|
|
1697
|
+
console.log(this.$refs.service_show.data)
|
|
1698
|
+
this.$refs.service_show.data.buttons[1].button_name = '保存'
|
|
1699
|
+
this.$showMessage("当审核/确认为否时,无法提交")
|
|
1700
|
+
return
|
|
1701
|
+
}else {
|
|
1702
|
+
this.$refs.service_show.data.buttons[1].button_name = '提交'
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
//时间到期提醒
|
|
1706
|
+
if (this.$refs.service_show.data.fields[i].label.includes("时间") || this.$refs.service_show.data.fields[i].label.includes("工期")) {
|
|
1707
|
+
let setTime = this.$refs.service_show.data.fields[i].value
|
|
1708
|
+
let nowTime = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
1709
|
+
console.log("到期时间:" + setTime)
|
|
1710
|
+
console.log("现在时间:" + nowTime)
|
|
1711
|
+
if (nowTime >= setTime) {
|
|
1712
|
+
this.$showMessage("请注意,当前节点时间/工期已过期!")
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
if (this.$refs.service_show.data.fields[i].label.includes("验收结果")) {
|
|
1716
|
+
|
|
1717
|
+
if (this.$refs.service_show.data.fields[i].value.length == 0 || this.$refs.service_show.data.fields[i].value == undefined || this.$refs.service_show.data.fields[i].value == null){
|
|
1718
|
+
this.$showMessage("验收结果未填写完毕,无法提交")
|
|
1719
|
+
this.$refs.service_show.data.buttons[1].button_name = '保存'
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
// 合成地址
|
|
1727
|
+
if (
|
|
1728
|
+
this.$refs.service_show.data.fields[index].label === '县/区'
|
|
1729
|
+
) {
|
|
1730
|
+
console.log('即将合成地址')
|
|
1731
|
+
var address = ''
|
|
1732
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1733
|
+
// 控制设置级联
|
|
1734
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
1735
|
+
// xxx xx xxx
|
|
1736
|
+
if (this.$refs.service_show.data.fields[i].label === '县/区' && this.$refs.service_show.data.fields[i].value) {
|
|
1737
|
+
address += this.$refs.service_show.data.fields[i].value
|
|
1738
|
+
}
|
|
1739
|
+
// if (this.$refs.service_show.data.fields[i].label === '乡镇' && this.$refs.service_show.data.fields[i].value) {
|
|
1740
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1741
|
+
// }
|
|
1742
|
+
// if (this.$refs.service_show.data.fields[i].label === '街道名称' && this.$refs.service_show.data.fields[i].value) {
|
|
1743
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1744
|
+
// }
|
|
1745
|
+
// if (this.$refs.service_show.data.fields[i].label === '小区/单位' && this.$refs.service_show.data.fields[i].value) {
|
|
1746
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1747
|
+
// }
|
|
1748
|
+
// if (this.$refs.service_show.data.fields[i].label === '楼号' && this.$refs.service_show.data.fields[i].value) {
|
|
1749
|
+
// address += ' ' + this.$refs.service_show.data.fields[i].value
|
|
1750
|
+
// }
|
|
1751
|
+
// if (this.$refs.service_show.data.fields[i].label === '单元号' && this.$refs.service_show.data.fields[i].value) {
|
|
1752
|
+
// address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1753
|
+
// }
|
|
1754
|
+
// if (this.$refs.service_show.data.fields[i].label === '楼层' && this.$refs.service_show.data.fields[i].value) {
|
|
1755
|
+
// address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1756
|
+
// }
|
|
1757
|
+
// if (this.$refs.service_show.data.fields[i].label === '门牌号' && this.$refs.service_show.data.fields[i].value) {
|
|
1758
|
+
// address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1759
|
+
// }
|
|
1760
|
+
|
|
1761
|
+
}
|
|
1762
|
+
console.log('获取到的address=>' + address)
|
|
1763
|
+
// 数据获取完毕时放入地址text
|
|
1764
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1765
|
+
// if (this.$refs.service_show.data.fields[i].label === '地址') {
|
|
1766
|
+
// this.$refs.service_show.data.fields[i].value = address
|
|
1767
|
+
// console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
1768
|
+
// }
|
|
1769
|
+
// }
|
|
1770
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1771
|
+
if (this.$refs.service_show.data.fields[i].label === '项目地址') {
|
|
1772
|
+
this.$refs.service_show.data.fields[i].value = address
|
|
1773
|
+
// console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
if (this.selectdata.defname = '现场勘察') {
|
|
1778
|
+
let projectAddress = ''
|
|
1779
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1780
|
+
if (this.$refs.service_show.data.fields[i].label === '项目地址') {
|
|
1781
|
+
projectAddress = this.$refs.service_show.data.fields[i].value
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
|
|
1785
|
+
if (this.$refs.service_show.data.fields[j].label === '地址') {
|
|
1786
|
+
this.$refs.service_show.data.fields[j].value = projectAddress
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
// 开户费+材料费+人工费+设备安装费=合计
|
|
1793
|
+
if (this.$refs.service_show.data.fields[index].label === '开户费' ||
|
|
1794
|
+
this.$refs.service_show.data.fields[index].label === '材料费' ||
|
|
1795
|
+
this.$refs.service_show.data.fields[index].label === '人工费' ||
|
|
1796
|
+
this.$refs.service_show.data.fields[index].label === '设备安装费') {
|
|
1797
|
+
let fee = 0
|
|
1798
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1799
|
+
if (this.$refs.service_show.data.fields[index].label === '开户费' ||
|
|
1800
|
+
this.$refs.service_show.data.fields[index].label === '材料费' ||
|
|
1801
|
+
this.$refs.service_show.data.fields[index].label === '人工费' ||
|
|
1802
|
+
this.$refs.service_show.data.fields[index].label === '设备安装费') {
|
|
1803
|
+
fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1804
|
+
}
|
|
1805
|
+
if (this.$refs.service_show.data.fields[index].label === '合计') {
|
|
1806
|
+
this.$refs.service_show.data.fields[index].value = fee
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
error_check(index) {
|
|
1813
|
+
// 时间格式检测
|
|
1814
|
+
if (this.$refs.service_show.data.fields[index].type == 'datepicker') {
|
|
1815
|
+
let dateRe = new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/)
|
|
1816
|
+
let datetimeRe = new RegExp(/((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/)
|
|
1817
|
+
if (datetimeRe.test(this.$refs.service_show.data.fields[index].value) && this.$refs.service_show.data.fields[index].value.trim().length == 19 && this.$refs.service_show.data.fields[index].fullsize) {
|
|
1818
|
+
this.$refs.service_show.data.fields[index].error.flag = false
|
|
1819
|
+
} else if (dateRe.test(this.$refs.service_show.data.fields[index].value) && this.$refs.service_show.data.fields[index].value.trim().length == 10) {
|
|
1820
|
+
this.$refs.service_show.data.fields[index].error.flag = false
|
|
1821
|
+
} else {
|
|
1822
|
+
if (this.$refs.service_show.data.fields[index].fullsize) {
|
|
1823
|
+
this.$refs.service_show.data.fields[index].error = Object.assign({}, this.$refs.service_show.data.fields[index].error)
|
|
1824
|
+
this.$refs.service_show.data.fields[index].error.msg = this.$refs.service_show.data.fields[index].error.msg ? this.$refs.service_show.data.fields[index].error.msg : '时间格式如:2019-05-02 09:23:21'
|
|
1825
|
+
this.$showAlert(this.$refs.service_show.data.fields[index].label + '格式错误' + this.$refs.service_show.data.fields[index].error.msg, 'warning', 3000)
|
|
1826
|
+
this.$refs.service_show.data.fields[index].error.flag = true
|
|
1827
|
+
this.$refs.service_show.data.fields[index].value = ''
|
|
1828
|
+
} else {
|
|
1829
|
+
this.$refs.service_show.data.fields[index].error = Object.assign({}, this.$refs.service_show.data.fields[index].error)
|
|
1830
|
+
this.$refs.service_show.data.fields[index].error.msg = this.$refs.service_show.data.fields[index].error.msg ? this.$refs.service_show.data.fields[index].error.msg : '时间格式如:2019-05-02'
|
|
1831
|
+
this.$showAlert(this.$refs.service_show.data.fields[index].label + '格式错误' + this.$refs.service_show.data.fields[index].error.msg, 'warning', 3000)
|
|
1832
|
+
this.$refs.service_show.data.fields[index].error.flag = true
|
|
1833
|
+
this.$refs.service_show.data.fields[index].value = ''
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
|
|
1840
|
+
modal_error_check(i, j) {
|
|
1841
|
+
let err = {flag: false, msg: ''}
|
|
1842
|
+
this.$refs.service_show.showadd_fields.fields[j].error = this.$refs.service_show.showadd_fields.fields[j].error ? this.$refs.service_show.showadd_fields.fields[j].error : err
|
|
1843
|
+
// 时间格式检测
|
|
1844
|
+
if (this.$refs.service_show.showadd_fields.fields[j].type == 'datepicker') {
|
|
1845
|
+
let dateRe = new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/)
|
|
1846
|
+
let datetimeRe = new RegExp(/((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\s([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/)
|
|
1847
|
+
if (datetimeRe.test(this.$refs.service_show.showadd_fields.fields[j].value) && this.$refs.service_show.showadd_fields.fields[j].value.trim().length == 19) {
|
|
1848
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = false
|
|
1849
|
+
} else if (dateRe.test(this.$refs.service_show.showadd_fields.fields[j].value) && this.$refs.service_show.showadd_fields.fields[j].value.trim().length == 10) {
|
|
1850
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = false
|
|
1851
|
+
} else {
|
|
1852
|
+
this.$refs.service_show.showadd_fields.fields[j].error = Object.assign({}, this.$refs.service_show.showadd_fields.fields[j].error)
|
|
1853
|
+
this.$refs.service_show.showadd_fields.fields[j].error.msg = this.$refs.service_show.showadd_fields.fields[j].label + '时间格式如:2019-05-02'
|
|
1854
|
+
this.$showAlert(this.$refs.service_show.showadd_fields.fields[j].error.msg, 'warning', 3000)
|
|
1855
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = true
|
|
1856
|
+
this.$refs.service_show.showadd_fields.fields[j].value = ''
|
|
1857
|
+
}
|
|
1858
|
+
if ((this.$refs.service_show.showadd_fields.fields[j].label == '停气碰口开始时间' || this.$refs.service_show.showadd_fields.fields[j].label == '停气碰口结束时间') &&
|
|
1859
|
+
(dateRe.test(this.$refs.service_show.showadd_fields.fields[j].value) && this.$refs.service_show.showadd_fields.fields[j].value.trim().length > 0)) {
|
|
1860
|
+
if (this.$refs.service_show.showadd_fields.fields[j].value > new Date().Format("yyyy-MM-dd HH:mm:ss")) {
|
|
1861
|
+
this.$refs.service_show.showadd_fields.fields[j].error.msg = this.$refs.service_show.showadd_fields.fields[j].label + '不能大于当前时间'
|
|
1862
|
+
this.$showAlert(this.$refs.service_show.showadd_fields.fields[j].label + '不能大于当前时间', 'warning', 3000)
|
|
1863
|
+
this.$refs.service_show.showadd_fields.fields[j].error.flag = true
|
|
1864
|
+
this.$refs.service_show.showadd_fields.fields[j].value = ''
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
},
|
|
1869
|
+
'getmodel'() {
|
|
1870
|
+
return this.$refs.service_show.getmodel()
|
|
1871
|
+
},
|
|
1872
|
+
// onetomany模态框监听事件
|
|
1873
|
+
async 'select_cascade_modal'(i, j) {
|
|
1874
|
+
if (this.data.onetomany[i].tables[0] == 't_apply_construct_balance') {
|
|
1875
|
+
if (this.data.onetomany[i].fields[j].label == '第三施工方') {
|
|
1876
|
+
for (let k = 0; k < this.data.onetomany[i].fields.length; k++) {
|
|
1877
|
+
|
|
1878
|
+
if (this.data.onetomany[i].fields[k].label.includes('当前累计结算比例')) {
|
|
1879
|
+
let sum = 0
|
|
1880
|
+
for (let p = 0; p < this.$refs.service_show.model.rows[i].length; p++) {
|
|
1881
|
+
if (this.$refs.service_show.model.rows[i][p].f_construct_company == this.$refs.service_show.showadd_fields.fields[j].value) {
|
|
1882
|
+
sum += Number(this.$refs.service_show.showadd_fields.fields[k - 2].value)
|
|
1883
|
+
sum += Number(this.$refs.service_show.model.rows[i][p].f_balance_scale)
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
if (this.$refs.service_show.model.rows[i].length == 0) {
|
|
1887
|
+
sum = Number(this.$refs.service_show.showadd_fields.fields[k - 2].value)
|
|
1888
|
+
}
|
|
1889
|
+
// this.$refs.service_show.showadd_fields.fields[k].value = sum
|
|
1890
|
+
this.$refs.service_show.update_showadd_fields_value(k, sum)
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
},
|
|
1898
|
+
async 'onetomanyevent'(datas) {
|
|
1899
|
+
// console.log(`onetomany=======>${JSON.stringify(datas)}`)
|
|
1900
|
+
|
|
1901
|
+
for (let i = 0; i < datas.rows.length; i++) {
|
|
1902
|
+
datas.rows[i]['f_process_id'] = this.selectdata.f_process_id
|
|
1903
|
+
datas.rows[i]['f_apply_num'] = this.selectdata.f_apply_num
|
|
1904
|
+
datas.rows[i]['f_filiale'] = this.$login.f.f_fengongsi
|
|
1905
|
+
datas.rows[i]['f_parentname'] = this.$login.f.f_parentname
|
|
1906
|
+
datas.rows[i]['f_operator'] = this.$login.f.name
|
|
1907
|
+
}
|
|
1908
|
+
let http = new HttpResetClass()
|
|
1909
|
+
await http.load('POST', 'rs/logic/saveentity', datas, {resolveMsg: null, rejectMsg: '保存onetomany实体失败'})
|
|
1910
|
+
}
|
|
1911
|
+
,
|
|
1912
|
+
// 获取view层button事件/
|
|
1913
|
+
async 'button'(model) {
|
|
1914
|
+
// console.log("button事件接收参数:", model)
|
|
1915
|
+
// 点击重置按钮就重置数据
|
|
1916
|
+
if (model.button.button_name === '重置') {
|
|
1917
|
+
this.refurbish()
|
|
1918
|
+
return
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
this.dataChange(model.button.button_name)// 调用修改记录方法
|
|
1922
|
+
|
|
1923
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '营收数据录入'){
|
|
1924
|
+
if(model.f_meternumber){
|
|
1925
|
+
let http = new HttpResetClass()
|
|
1926
|
+
let data = {
|
|
1927
|
+
columnname: ` uf.f_meternumber `,
|
|
1928
|
+
tablename: ' t_userfiles uf LEFT JOIN t_userinfo ui on ui.f_userinfo_id = uf.f_userinfo_id ',
|
|
1929
|
+
condition: `(f_user_state = '正常' or f_user_state = '报装') and uf.f_meternumber = '${model.f_meternumber}' and ui.f_process_id != '${this.selectdata.f_process_id}'`
|
|
1930
|
+
}
|
|
1931
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
1932
|
+
resolveMsg: null,
|
|
1933
|
+
rejectMsg: "表号查询失败"
|
|
1934
|
+
})
|
|
1935
|
+
if(res.data.length>0){
|
|
1936
|
+
let check = await this.$showMessage(`警告:表号已被使用!点击“确定”将会继续建档`, ['confirm', 'cancel'])
|
|
1937
|
+
if (check == 'confirm') {
|
|
1938
|
+
|
|
1939
|
+
} else {
|
|
1940
|
+
this.$refs.service_show.disable_button = false
|
|
1941
|
+
return
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
// 若户数为1则新增档案
|
|
1949
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '通气' && this.selectdata.f_install_num == 1 && !(this.selectdata.f_apply_type == '管线整改' || this.selectdata.f_apply_type == '商业预埋管线'||this.selectdata.f_apply_type == '商业新建管线')) { //商业新建管线
|
|
1950
|
+
if (model.f_gas_meternumber != model.f_meternumber) {
|
|
1951
|
+
|
|
1952
|
+
let check = await this.$showMessage(`通气表号和施工安装表号不一致,点击"确定"将以通气表号为准建立表档案`, ['confirm', 'cancel'])
|
|
1953
|
+
if (check == 'confirm') {
|
|
1954
|
+
model.f_gas_meternumber_back = model.f_meternumber
|
|
1955
|
+
model.f_meternumber = model.f_gas_meternumber
|
|
1956
|
+
} else {
|
|
1957
|
+
this.$refs.service_show.disable_button = false
|
|
1958
|
+
return
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
// 派工单环节,如果累计领用量为0,则不让提交
|
|
1963
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '派工单') {
|
|
1964
|
+
let http4 = new HttpResetClass()
|
|
1965
|
+
let model2 = Object.assign({}, this.selectdata, model)
|
|
1966
|
+
let ret = await http4.load('POST', 'rs/logic/getSumForMaterial', model2, {resolveMsg: null, rejectMsg: null})
|
|
1967
|
+
if (ret.data[0].sum == null || ret.data[0].sum == 0) {
|
|
1968
|
+
this.$showAlert('未领取材料,不能提交!', 'warning', 3000)
|
|
1969
|
+
this.$refs.service_show.disable_button = false
|
|
1970
|
+
return
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
// 施工环节 如果为民用集体散户而且没有导入用户资料弹框提并终止提交
|
|
1974
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '施工' && model.f_install_num > 1&& this.selectdata.f_apply_type == '民用集体散户' && this.$parent.$parent.$parent.$refs.record && this.$parent.$parent.$parent.$refs.record.model.rows.length == 0) {
|
|
1975
|
+
this.$showAlert('请在档案信息管理便签页导入用户档案!', 'warning', 3000)
|
|
1976
|
+
this.$refs.service_show.disable_button = false
|
|
1977
|
+
return
|
|
1978
|
+
}
|
|
1979
|
+
// 如果为内部投建项目点击提交 也为跳过收费
|
|
1980
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '合同审核' && this.selectdata.f_apply_type == '内部投建') {
|
|
1981
|
+
model.button.button_name === '跳过收费'
|
|
1982
|
+
}
|
|
1983
|
+
// 派工单环节 如果为民用散户 或者 整改 跳过 工程交底
|
|
1984
|
+
// || this.selectdata.f_apply_type.includes('整改') // 11月21日,古蕾姐说整改需要工程交底
|
|
1985
|
+
if (model.button.button_name === '提交' && this.selectdata.defname == '派工单' && (this.selectdata.f_apply_type.includes('民用散户'))) {
|
|
1986
|
+
model.button.button_name = '跳过工程交底'
|
|
1987
|
+
}
|
|
1988
|
+
var operate = ''
|
|
1989
|
+
// 判断当前按钮是否为特殊业务,即子流程提交或者分发
|
|
1990
|
+
if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '子流程提交') {
|
|
1991
|
+
operate = '子流程提交'
|
|
1992
|
+
}
|
|
1993
|
+
if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '合同信息') {
|
|
1994
|
+
model.f_budget_money = model.f_contract_money
|
|
1995
|
+
model.f_unaccounts_money = model.f_contract_money
|
|
1996
|
+
model.f_cumulative_money = 0
|
|
1997
|
+
model.f_cumulative_invoicing = 0
|
|
1998
|
+
model.f_additional_payment = 0
|
|
1999
|
+
model.f_residual_invoicing = model.f_contract_money
|
|
2000
|
+
}
|
|
2001
|
+
if (model.button.button_name === '下发') {
|
|
2002
|
+
if (model.button && model.button.button_event === '分发') {
|
|
2003
|
+
operate = '分发'
|
|
2004
|
+
}
|
|
2005
|
+
let array = this.$login.f.rolesnames.split(',')
|
|
2006
|
+
if (this.selectdata.defname == '任务分配' && array.includes("工程技术部负责人")) {
|
|
2007
|
+
model.f_survey_name = model.button.button_fields.f_apply_kefu_employee
|
|
2008
|
+
let buyerinfos = []
|
|
2009
|
+
let numReg = /^[0-9]+$/
|
|
2010
|
+
let numRe = new RegExp(numReg)
|
|
2011
|
+
let querydata = {
|
|
2012
|
+
tablename: 't_user',
|
|
2013
|
+
condition: ""
|
|
2014
|
+
}
|
|
2015
|
+
if (model.f_survey_name != null && "object" == typeof model.f_survey_name) {
|
|
2016
|
+
// object类型 切不为空
|
|
2017
|
+
querydata.condition = `id = ${model.f_survey_name.id}`
|
|
2018
|
+
} else if (numReg.test(model.f_survey_name)) {
|
|
2019
|
+
// 数字类型
|
|
2020
|
+
querydata.condition = `id = ${model.f_survey_name}`
|
|
2021
|
+
} else {
|
|
2022
|
+
// 字符串类型
|
|
2023
|
+
querydata.condition = `name = '${model.f_survey_name}'`
|
|
2024
|
+
}
|
|
2025
|
+
buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
2026
|
+
resolveMsg: null,
|
|
2027
|
+
rejectMsg: '获取人员失败'
|
|
2028
|
+
})
|
|
2029
|
+
model.f_survey_name = {
|
|
2030
|
+
id: buyerinfos.data[0].id,
|
|
2031
|
+
name: buyerinfos.data[0].name
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
// model.button.button_fields[this.show_data.buttons[model.button.button_index].button_fields[0].field]
|
|
2035
|
+
// for (let i = 0; i < this.department_search.length; i++) {
|
|
2036
|
+
// 找到人名为person_name 的人,然后把人名换成id
|
|
2037
|
+
// if (this.department_search[i].name === person_name) {
|
|
2038
|
+
// model.button.button_fields[this.show_data.buttons[model.button.button_index].button_fields[0].field] = this.department_search[i].id
|
|
2039
|
+
// }
|
|
2040
|
+
// }
|
|
2041
|
+
}
|
|
2042
|
+
if (model.button.button_name == '跳过收费' && this.selectdata.defname == '合同审核' && this.selectdata.f_apply_type.includes('民用') && this.selectdata.f_apply_type != '民用整改') {
|
|
2043
|
+
model.button.button_name = '提交'
|
|
2044
|
+
model.button.button_person = {
|
|
2045
|
+
button_event: "获取之前被下发人",
|
|
2046
|
+
button_person_field: "f_survey_name"
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
if (model.button.button_name == '提交' && model.button.button_person && model.button.button_person.button_event === '获取之前被下发人' && model.button.button_person.button_person_field) {
|
|
2052
|
+
if ((this.selectdata.defname == '收费' || this.selectdata.defname == '合同审核') && this.selectdata.f_apply_type.includes('民用散户')) {
|
|
2053
|
+
model.button.button_person = {
|
|
2054
|
+
button_event: "获取之前被下发人",
|
|
2055
|
+
button_person_field: 'f_apply_kefu_employee'
|
|
2056
|
+
}
|
|
2057
|
+
model.button.button_fields['f_apply_kefu_employee'] = model.f_apply_kefu_employee
|
|
2058
|
+
}
|
|
2059
|
+
model.button.button_name = '下发'
|
|
2060
|
+
model.button.button_fields = {}
|
|
2061
|
+
let buyerinfos = []
|
|
2062
|
+
let numReg = /^[0-9]+$/
|
|
2063
|
+
let numRe = new RegExp(numReg)
|
|
2064
|
+
if (this.selectdata[model.button.button_person.button_person_field].startsWith('{')) {
|
|
2065
|
+
let temp = JSON.parse(this.selectdata[model.button.button_person.button_person_field])
|
|
2066
|
+
model.button.button_fields[model.button.button_person.button_person_field] = temp.id
|
|
2067
|
+
} else if (!numRe.test(this.selectdata[model.button.button_person.button_person_field])) {
|
|
2068
|
+
console.log('model.button.button_person.button_person_field========>',model.button.button_person.button_person_field)
|
|
2069
|
+
console.log('this.selectdata[model.button.button_person.button_person_field]========>',this.selectdata[model.button.button_person.button_person_field])
|
|
2070
|
+
let temp = this.selectdata[model.button.button_person.button_person_field]
|
|
2071
|
+
let querydata = {
|
|
2072
|
+
tablename: 't_user',
|
|
2073
|
+
condition: `name = '${temp}'`
|
|
2074
|
+
}
|
|
2075
|
+
console.log('querydata========>',querydata)
|
|
2076
|
+
let userinfo = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
2077
|
+
resolveMsg: null,
|
|
2078
|
+
rejectMsg: '获取人员失败'
|
|
2079
|
+
})
|
|
2080
|
+
console.log('userinfo========>',userinfo)
|
|
2081
|
+
if(userinfo.data&&userinfo.data.length!=0){
|
|
2082
|
+
model.button.button_fields[model.button.button_person.button_person_field] = {
|
|
2083
|
+
id: userinfo.data[0].id,
|
|
2084
|
+
name: userinfo.data[0].name
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
} else {
|
|
2088
|
+
model.button.button_fields[model.button.button_person.button_person_field] = this.selectdata[model.button.button_person.button_person_field]
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
// if (model.button.button_name!='保存'&&model.button.button_name!='退回'&&(
|
|
2093
|
+
// this.selectdata.defname == '收费'
|
|
2094
|
+
// ) && (
|
|
2095
|
+
// this.selectdata.f_apply_type == '公用整改'
|
|
2096
|
+
// ||this.selectdata.f_apply_type == '工业整改'
|
|
2097
|
+
// ||this.selectdata.f_apply_type == '公用'
|
|
2098
|
+
// ||this.selectdata.f_apply_type == '工业'
|
|
2099
|
+
// ||this.selectdata.f_apply_type == '商业预埋管线'
|
|
2100
|
+
// )) {
|
|
2101
|
+
// model.button.button_name = '下发'
|
|
2102
|
+
// model.button.button_person = {
|
|
2103
|
+
// button_event: "获取之前被下发人",
|
|
2104
|
+
// button_person_field: "f_survey_name"
|
|
2105
|
+
// }
|
|
2106
|
+
// }else if(model.button.button_name!='保存'&&model.button.button_name!='退回'&&(
|
|
2107
|
+
// this.selectdata.defname == '勘察初设'
|
|
2108
|
+
// ) && (
|
|
2109
|
+
// this.selectdata.f_apply_type == '公用整改'
|
|
2110
|
+
// ||this.selectdata.f_apply_type == '工业整改'
|
|
2111
|
+
// ||this.selectdata.f_apply_type == '公用'
|
|
2112
|
+
// ||this.selectdata.f_apply_type == '工业'
|
|
2113
|
+
// ||this.selectdata.f_apply_type == '商业预埋管线'
|
|
2114
|
+
// )){
|
|
2115
|
+
// let act = {
|
|
2116
|
+
// tablename: 'activityins',
|
|
2117
|
+
// condition: `processid = '${this.selectdata.f_process_id}' and defname = '报装申请'`
|
|
2118
|
+
// }
|
|
2119
|
+
// let res = await this.$resetpost('rs/sql/singleTable', {data: act}, {
|
|
2120
|
+
// resolveMsg: null,
|
|
2121
|
+
// rejectMsg: '获取人员失败'
|
|
2122
|
+
// })
|
|
2123
|
+
//
|
|
2124
|
+
// let querydata = {
|
|
2125
|
+
// tablename: 't_user',
|
|
2126
|
+
// condition: `ename = '${res.data[0].userid}'`
|
|
2127
|
+
// }
|
|
2128
|
+
// let buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
|
|
2129
|
+
// resolveMsg: null,
|
|
2130
|
+
// rejectMsg: '获取人员失败'
|
|
2131
|
+
// })
|
|
2132
|
+
// model.f_apply_kefu_employee = {
|
|
2133
|
+
// id: buyerinfos.data[0].id,
|
|
2134
|
+
// name: buyerinfos.data[0].name
|
|
2135
|
+
// }
|
|
2136
|
+
// model.button.button_name = '下发'
|
|
2137
|
+
// model.button.button_person = {
|
|
2138
|
+
// button_event: "获取之前被下发人",
|
|
2139
|
+
// button_person_field: "f_apply_kefu_employee"
|
|
2140
|
+
// }
|
|
2141
|
+
// model.button.button_fields.f_apply_kefu_employee = model.f_apply_kefu_employee
|
|
2142
|
+
// }else if(model.button.button_name!='保存'&&model.button.button_name!='退回'&&this.checkParetment() == '客户服务部'&&( // 部门个人
|
|
2143
|
+
// this.selectdata.defname=="勘察初设"
|
|
2144
|
+
// )){
|
|
2145
|
+
// model.button.button_name = '下发'
|
|
2146
|
+
// model.button.button_person = {
|
|
2147
|
+
// button_event: "获取之前被下发人",
|
|
2148
|
+
// button_person_field: "f_apply_kefu_employee"
|
|
2149
|
+
// }
|
|
2150
|
+
// let numReg = /^[0-9]+$/
|
|
2151
|
+
// let numRe = new RegExp(numReg)
|
|
2152
|
+
// if (numRe.test(this.selectdata.f_apply_kefu_employee)) {
|
|
2153
|
+
// model.button.button_fields.f_apply_kefu_employee ={
|
|
2154
|
+
// id: this.selectdata.f_apply_kefu_employee,
|
|
2155
|
+
// name: this.selectdata.f_apply_kefu_employee
|
|
2156
|
+
// }
|
|
2157
|
+
// }else{
|
|
2158
|
+
// model.button.button_fields.f_apply_kefu_employee = JSON.parse(this.selectdata.f_apply_kefu_employee)
|
|
2159
|
+
// }
|
|
2160
|
+
// }else if(model.button.button_name!='保存'&&model.button.button_name!='退回'&&this.checkParetment() == '客户服务部'&&( // 技术人员
|
|
2161
|
+
// this.selectdata.defname=="派工单"||
|
|
2162
|
+
// this.selectdata.defname=="收费"||
|
|
2163
|
+
// this.selectdata.defname=="施工"||
|
|
2164
|
+
// this.selectdata.defname=="综合验收确认"
|
|
2165
|
+
// )){
|
|
2166
|
+
// model.button.button_name = '下发'
|
|
2167
|
+
// model.button.button_person = {
|
|
2168
|
+
// button_event: "获取之前被下发人",
|
|
2169
|
+
// button_person_field: "f_survey_name"
|
|
2170
|
+
// }
|
|
2171
|
+
// let numReg = /^[0-9]+$/
|
|
2172
|
+
// let numRe = new RegExp(numReg)
|
|
2173
|
+
// if (numRe.test(this.selectdata.f_survey_name)) {
|
|
2174
|
+
// model.button.button_fields.f_survey_name ={
|
|
2175
|
+
// id: this.selectdata.f_survey_name,
|
|
2176
|
+
// name: this.selectdata.f_survey_name
|
|
2177
|
+
// }
|
|
2178
|
+
// }else{
|
|
2179
|
+
// model.button.button_fields.f_survey_name = this.selectdata.f_survey_name
|
|
2180
|
+
// }
|
|
2181
|
+
// }
|
|
2182
|
+
|
|
2183
|
+
if (model.button.button_name === '提交') {
|
|
2184
|
+
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 开始
|
|
2185
|
+
// let http = new HttpResetClass()
|
|
2186
|
+
// if (this.$refs.service_show.data.defname === '通气') {
|
|
2187
|
+
// console.log('改变档案状态')
|
|
2188
|
+
// let param = {
|
|
2189
|
+
// f_process_id: model.f_process_id
|
|
2190
|
+
// }
|
|
2191
|
+
// let res = await http.load('POST', 'rs/logic/setUserstate', param, {
|
|
2192
|
+
// resolveMsg: null,
|
|
2193
|
+
// rejectMsg: null
|
|
2194
|
+
// })
|
|
2195
|
+
// }
|
|
2196
|
+
// if (this.$refs.service_show.data.defname === '综合验收确认') {
|
|
2197
|
+
// if (model.f_isdata_check == '否' || !model.f_isdata_check) {
|
|
2198
|
+
// this.$showMessage("资料验收未通过")
|
|
2199
|
+
// this.$refs.service_show.disable_button = false
|
|
2200
|
+
// return
|
|
2201
|
+
// }
|
|
2202
|
+
// if (model.f_isacceptance_pass == '否' || !model.f_isacceptance_pass) {
|
|
2203
|
+
// this.$showMessage("工程验收未通过")
|
|
2204
|
+
// this.$refs.service_show.disable_button = false
|
|
2205
|
+
// return
|
|
2206
|
+
// }
|
|
2207
|
+
// // http = new HttpResetClass()
|
|
2208
|
+
// // let data = {
|
|
2209
|
+
// // tablename: 't_files',
|
|
2210
|
+
// // condition: `fusetype = '综合验收签字单' and f_blobid='${this.selectdata.f_process_id}'`
|
|
2211
|
+
// // }
|
|
2212
|
+
// // let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
2213
|
+
// // resolveMsg: null,
|
|
2214
|
+
// // rejectMsg: "获取附件内容失败"
|
|
2215
|
+
// // })
|
|
2216
|
+
// // if (res.data.length <= 0) {
|
|
2217
|
+
// // this.$showMessage("请先上传综合验收签字单!")
|
|
2218
|
+
// // return
|
|
2219
|
+
// // } else {
|
|
2220
|
+
//
|
|
2221
|
+
// // }
|
|
2222
|
+
// }
|
|
2223
|
+
// // 判断分流程
|
|
2224
|
+
// if (this.$refs.service_show.data.defname === this.$workflow_vue.start_activity) {
|
|
2225
|
+
// let flag = ''
|
|
2226
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
2227
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
2228
|
+
// let arr = str.split(",")
|
|
2229
|
+
// let arr2 = str2.split(",")
|
|
2230
|
+
// for (let i = 0; i < arr.length; i++) {
|
|
2231
|
+
// if (arr[i] == model.f_apply_type) {
|
|
2232
|
+
// flag = '客户服务部'
|
|
2233
|
+
// break
|
|
2234
|
+
// }
|
|
2235
|
+
// }
|
|
2236
|
+
// for (let i = 0; i < arr2.length; i++) {
|
|
2237
|
+
// if (arr2[i] == model.f_apply_type) {
|
|
2238
|
+
// flag = '工程技术部'
|
|
2239
|
+
// break
|
|
2240
|
+
// }
|
|
2241
|
+
// }
|
|
2242
|
+
// model.button.button_name = flag
|
|
2243
|
+
// }
|
|
2244
|
+
|
|
2245
|
+
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 结束
|
|
2246
|
+
// flag 为合同编号更新标志
|
|
2247
|
+
// var flag = false
|
|
2248
|
+
// if (this.data.defname == '合同审核') {
|
|
2249
|
+
// flag = true
|
|
2250
|
+
// http = new HttpResetClass()
|
|
2251
|
+
// let data = {
|
|
2252
|
+
// tablename: 't_singlevalue',
|
|
2253
|
+
// condition: `name = '合同编号' and f_filialeids = '${this.$login.f.f_orgids}'`
|
|
2254
|
+
// }
|
|
2255
|
+
// let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
|
|
2256
|
+
// resolveMsg: null,
|
|
2257
|
+
// rejectMsg: "获取合同编号失败"
|
|
2258
|
+
// })
|
|
2259
|
+
// if (this.contract != res.data[0].value && !this.selectdata.f_contract_number) {
|
|
2260
|
+
// this.$showMessage("合同编号已经被使用,请按F5刷新页面后重新登记")
|
|
2261
|
+
// return
|
|
2262
|
+
// }
|
|
2263
|
+
// }
|
|
2264
|
+
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
if (model.button.button_name === '提交' && this.$refs.service_show.data.defname === '综合验收确认') {
|
|
2268
|
+
if (model.f_isacceptance_pass != '是') {
|
|
2269
|
+
this.$showMessage('验收不通过,请执行退回操作。', 'info', 2000)
|
|
2270
|
+
model.f_isacceptance_pass = ''
|
|
2271
|
+
this.$refs.service_show.disable_button = false
|
|
2272
|
+
return
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
if (model.button.button_name === '提交' && this.$refs.service_show.data.defname === '现场勘查') {
|
|
2276
|
+
if (model.f_install_num < 1) {
|
|
2277
|
+
this.$showAlert('安装表数不能小于1,请重新输入', 'info', 2000)
|
|
2278
|
+
model.f_install_num = ""
|
|
2279
|
+
this.$refs.service_show.disable_button = false
|
|
2280
|
+
return
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
if (model.button.button_name === '提交' && this.$refs.service_show.data.defname === '派工单') {
|
|
2284
|
+
if (model.f_unaccounts_money > 0) {
|
|
2285
|
+
this.$showMessage("未结清工程款。")
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 开始
|
|
2289
|
+
// if (model.button.button_name == '退回' && (this.$refs.service_show.data.defname == '勘察初设' || this.$refs.service_show.data.defname == '任务分配')) {
|
|
2290
|
+
// let flag = ''
|
|
2291
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
2292
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
2293
|
+
// let arr = str.split(",")
|
|
2294
|
+
// let arr2 = str2.split(",")
|
|
2295
|
+
// for (let i = 0; i < arr.length; i++) {
|
|
2296
|
+
// if (arr[i] == model.f_apply_type) {
|
|
2297
|
+
// flag = '客户服务部'
|
|
2298
|
+
// break
|
|
2299
|
+
// }
|
|
2300
|
+
// }
|
|
2301
|
+
// for (let i = 0; i < arr2.length; i++) {
|
|
2302
|
+
// if (arr2[i] == model.f_apply_type) {
|
|
2303
|
+
// flag = '工程技术部'
|
|
2304
|
+
// break
|
|
2305
|
+
// }
|
|
2306
|
+
// }
|
|
2307
|
+
// model.button.button_name = flag
|
|
2308
|
+
// // 如果为任务分配,而且报建类型没有改变,则为正常退回
|
|
2309
|
+
// if (this.$refs.service_show.data.defname == '任务分配') {
|
|
2310
|
+
// // 判断报建类型有没有变化
|
|
2311
|
+
// let beforeData = this.data.fields
|
|
2312
|
+
// let submitData = this.$refs.service_show.data.fields
|
|
2313
|
+
// // 比较
|
|
2314
|
+
// let f_before_change = []
|
|
2315
|
+
// let f_change = []
|
|
2316
|
+
// for (let i = 0; i < beforeData.length; i++) {
|
|
2317
|
+
// if (beforeData[i].field == 'f_apply_type' && beforeData[i].value == submitData[i].value) {
|
|
2318
|
+
// model.button.button_name = '退回'
|
|
2319
|
+
// break
|
|
2320
|
+
// }
|
|
2321
|
+
// }
|
|
2322
|
+
// }
|
|
2323
|
+
// }
|
|
2324
|
+
// if (this.selectdata.defname == '内验') {
|
|
2325
|
+
// // let http2 = new HttpResetClass()
|
|
2326
|
+
// // let data = {
|
|
2327
|
+
// // columnname: 'f_charge_money',
|
|
2328
|
+
// // tablename: 't_charge_record',
|
|
2329
|
+
// // condition: `f_charging_status='有效' and f_process_id = '${this.selectdata.f_process_id}'`
|
|
2330
|
+
// // }
|
|
2331
|
+
// // let res = await http2.load('POST', 'rs/sql/getSum', {data: data}, {
|
|
2332
|
+
// // resolveMsg: null,
|
|
2333
|
+
// // rejectMsg: "获取合同编号失败"
|
|
2334
|
+
// // })
|
|
2335
|
+
// // if ((Number(this.selectdata.f_contract_money) >= Number(res.data[0].f_charge_money))&&Number(res.data[0].f_charge_money)!=0) {
|
|
2336
|
+
// if (model.f_check_ngineering == '否') {
|
|
2337
|
+
// model.button.button_name = '停气碰口'
|
|
2338
|
+
// }
|
|
2339
|
+
// }
|
|
2340
|
+
// ===================>青白江特殊流程开始,合并分支时请忽略这段代码 结束
|
|
2341
|
+
console.log('本次点击button执行的操作是=>' + operate)
|
|
2342
|
+
model = Object.assign({}, this.selectdata, model)
|
|
2343
|
+
let http = new HttpResetClass()
|
|
2344
|
+
var url
|
|
2345
|
+
var requestData = {
|
|
2346
|
+
tables: this.data.tables,
|
|
2347
|
+
start_activity: this.$workflow_vue.start_activity,
|
|
2348
|
+
model: model,
|
|
2349
|
+
loginUser: this.$login.f
|
|
2350
|
+
}
|
|
2351
|
+
if (operate != '') {
|
|
2352
|
+
// 特殊操作走特殊logic业务处理
|
|
2353
|
+
url = 'rs/logic/SubprocessService'
|
|
2354
|
+
requestData = {
|
|
2355
|
+
tables: this.data.tables, model: model
|
|
2356
|
+
}
|
|
2357
|
+
} else if (model.button.button_name === '提交' && model.button.button_event && model.button.button_event === '分支流程异步合并处理') {
|
|
2358
|
+
url = 'rs/logic/branchsyncprocess'
|
|
2359
|
+
requestData = {
|
|
2360
|
+
tables: this.data.tables, model: model
|
|
2361
|
+
}
|
|
2362
|
+
} else {
|
|
2363
|
+
// 下发,提交,保存,退回通用业务后台处理logic
|
|
2364
|
+
|
|
2365
|
+
url = 'rs/logic/ApplyProductService'
|
|
2366
|
+
// model = Object.assign(model,model.button.button_fields)
|
|
2367
|
+
// let model2 = JSON.parse(JSON.stringify(model))
|
|
2368
|
+
// let str = ''
|
|
2369
|
+
// if(model2.button.button_name == '下发'){
|
|
2370
|
+
// for (let key in model2.button.button_fields) {
|
|
2371
|
+
// if(typeof model2.button.button_fields[key] == 'object'){
|
|
2372
|
+
// str=str+`id*${String(model2.button.button_fields[key].id)}&name*${model2.button.button_fields[key].name}`
|
|
2373
|
+
// model2[key] = ''
|
|
2374
|
+
// model2[key] =str
|
|
2375
|
+
// }
|
|
2376
|
+
// }
|
|
2377
|
+
// }
|
|
2378
|
+
// model2.button=null
|
|
2379
|
+
|
|
2380
|
+
requestData = {
|
|
2381
|
+
tables: this.data.tables, model: model
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
requestData.start_activity = this.$workflow_vue.start_activity
|
|
2385
|
+
requestData.loginUser = this.$login.f
|
|
2386
|
+
requestData.workflow_xmlfilename = this.$workflow_vue.workflow_xmlfilename
|
|
2387
|
+
requestData.employeetemplate = ''
|
|
2388
|
+
console.log('即将发送请求url=>' + url + ',参数=>' + JSON.stringify(requestData))
|
|
2389
|
+
let res = res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
2390
|
+
console.log("service处理完成返回数据:", JSON.stringify(res.data))
|
|
2391
|
+
if (res.data.code == 200) {
|
|
2392
|
+
model = res.data.model
|
|
2393
|
+
this.showview = false
|
|
2394
|
+
// 特殊处理
|
|
2395
|
+
this.special(model)
|
|
2396
|
+
this.$dispatch('close')
|
|
2397
|
+
this.initializtion()
|
|
2398
|
+
} else {
|
|
2399
|
+
if (res.data.msg) {
|
|
2400
|
+
this.$showMessage(res.data.msg)
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
,
|
|
2405
|
+
async 'onetomanydelete'(i, j) {
|
|
2406
|
+
let http = new HttpResetClass()
|
|
2407
|
+
let data = {
|
|
2408
|
+
tables: this.show_data.onetomany[i].tables,
|
|
2409
|
+
row: this.$refs.service_show.model.rows[i][j]
|
|
2410
|
+
}
|
|
2411
|
+
await http.load('POST', 'rs/logic/applyDeleteValue', {data: data}, {
|
|
2412
|
+
resolveMsg: null,
|
|
2413
|
+
rejectMsg: 'onetomanydelete失败'
|
|
2414
|
+
}).then(() => {
|
|
2415
|
+
this.$dispatch('selfsearch')
|
|
2416
|
+
this.$refs.service_show.model.rows[i].splice(j, 1)
|
|
2417
|
+
})
|
|
2418
|
+
}
|
|
2419
|
+
,
|
|
2420
|
+
//获取view层confirm事件
|
|
2421
|
+
async 'confirm'(tables, row, showadd_index, j) {
|
|
2422
|
+
var _this = this
|
|
2423
|
+
for (let i = 0; i < tables.length; i++) {
|
|
2424
|
+
let datas = {
|
|
2425
|
+
tables: tables,
|
|
2426
|
+
row: row
|
|
2427
|
+
}
|
|
2428
|
+
datas.row['f_process_id'] = this.selectdata.f_process_id
|
|
2429
|
+
datas.row['f_apply_num'] = this.selectdata.f_apply_num
|
|
2430
|
+
datas.row['f_filiale'] = this.selectdata.f_filiale
|
|
2431
|
+
let http = new HttpResetClass()
|
|
2432
|
+
let sellid = ''
|
|
2433
|
+
let billtype = datas.row['f_bill_style']
|
|
2434
|
+
if (tables[i] == 't_charge_record') {
|
|
2435
|
+
await this.loadbuyer()
|
|
2436
|
+
if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是') {
|
|
2437
|
+
this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费', 'info', 2000)
|
|
2438
|
+
this.$refs.service_show.model.rows[showadd_index].splice(j, 1)
|
|
2439
|
+
this.$refs.service_show.initializtion()
|
|
2440
|
+
return
|
|
2441
|
+
}
|
|
2442
|
+
datas.row.f_charging_status = '有效'
|
|
2443
|
+
datas.row.f_is_correct = '否'
|
|
2444
|
+
datas.row.f_charge_collectors = this.$login.f.name
|
|
2445
|
+
await http.load('POST', 'rs/logic/applycharge', datas, {
|
|
2446
|
+
resolveMsg: null,
|
|
2447
|
+
rejectMsg: '收费保存失败'
|
|
2448
|
+
}).then((res) => {
|
|
2449
|
+
sellid = JSON.parse(res.data.sellid).id
|
|
2450
|
+
/*for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
2451
|
+
|
|
2452
|
+
if (this.$refs.service_show.data.fields[i].label == '累计缴费金额') {
|
|
2453
|
+
this.$refs.service_show.data.fields[i].value = res.data.f_cumulative_money
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
if (this.$refs.service_show.data.fields[i].label == '未结总金额') {
|
|
2457
|
+
this.$refs.service_show.data.fields[i].value = res.data.f_unaccounts_money
|
|
2458
|
+
}
|
|
2459
|
+
}*/
|
|
2460
|
+
let temp = _this.$refs.service_show.model.rows[showadd_index][j]
|
|
2461
|
+
temp.id = sellid
|
|
2462
|
+
_this.$refs.service_show.model.rows[showadd_index][j] = temp
|
|
2463
|
+
})
|
|
2464
|
+
if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是') {
|
|
2465
|
+
this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
|
|
2466
|
+
if (res === 'confirm') {
|
|
2467
|
+
console.log('打印票据')
|
|
2468
|
+
if (billtype === '增值税电子发票') {
|
|
2469
|
+
this.selectsellid = sellid
|
|
2470
|
+
this.showbuyerinfo = true
|
|
2471
|
+
} else {
|
|
2472
|
+
this.printbill(sellid)
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
})
|
|
2476
|
+
}
|
|
2477
|
+
// 刷新列表数据
|
|
2478
|
+
this.$dispatch('selfsearch')
|
|
2479
|
+
} else {
|
|
2480
|
+
await http.load('POST', 'rs/logic/saveentity', datas, {
|
|
2481
|
+
resolveMsg: null,
|
|
2482
|
+
rejectMsg: 'onetomany保存失败'
|
|
2483
|
+
}).then((res) => {
|
|
2484
|
+
// 刷新列表数据
|
|
2485
|
+
this.$dispatch('selfsearch')
|
|
2486
|
+
let temp = _this.$refs.service_show.model.rows[showadd_index][j]
|
|
2487
|
+
temp.id = res.data.id
|
|
2488
|
+
_this.$refs.service_show.model.rows[showadd_index][j] = temp
|
|
2489
|
+
})
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
</script>
|