apply-clients 3.0.10-21 → 3.0.10-210
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/.gradle/3.5/file-changes/last-build.bin +0 -0
- package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
- package/.gradle/5.2.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/5.2.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/5.2.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/built.bin +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/doc//346/226/260/347/224/250/346/210/267/350/212/261/345/220/215/345/206/214/345/257/274/345/205/245/346/250/241/346/235/277.xls +0 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/gradlew +0 -0
- package/gradlew.bat +84 -0
- package/package.json +5 -4
- package/src/apply.js +187 -146
- package/src/components/Util.js +26 -22
- package/src/components/app_apply/ApplyDownList.vue +21 -8
- package/src/components/app_apply/ApplyToDoList.vue +83 -59
- package/src/components/app_apply/ApplyUserInfo.vue +3 -3
- package/src/components/app_apply/PlaceControler.vue +255 -255
- package/src/components/app_apply/ServiceControl.vue +1387 -1387
- package/src/components/app_apply/ServiceView.vue +583 -361
- 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/product/BatchFunction/BatchPay.vue +663 -0
- package/src/components/product/Function/InstallFunction.vue +9 -9
- package/src/components/product/Function/InstallInfoSelect.vue +230 -38
- package/src/components/product/Function/Service/FunctionServiceControl.vue +3 -1
- package/src/components/product/Function/functions/InstallFee.vue +58 -35
- package/src/components/product/Function/functions/StopInstall.vue +13 -1
- package/src/components/product/HiddenDangersInProjects/AddHiddenDangers.vue +957 -0
- package/src/components/product/HiddenDangersInProjects/HiddenProjectList.vue +425 -0
- package/src/components/product/HiddenDangersInProjects/HiddenProjectSchedule.vue +146 -0
- package/src/components/product/Process/ExplorationSelect.vue +302 -71
- package/src/components/product/Process/ExplorationUser.vue +18 -3
- package/src/components/product/Process/Processes/CustomerRecordMessage.vue +736 -201
- package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +75 -69
- package/src/components/product/Process/Processes/Service/ServiceControl.vue +3172 -3053
- package/src/components/product/ProjectManagement/AddProjectSchedule.vue +863 -0
- package/src/components/product/ProjectManagement/ProjectList.vue +420 -0
- package/src/components/product/ProjectManagement/ProjectSchedule.vue +146 -0
- package/src/components/product/ReportForm/PaymentRecord.vue +801 -0
- package/src/components/product/ReportForm/PaymentRecordAdd.vue +105 -0
- package/src/components/product/ReportForm/PaymentRecordBad.vue +1273 -0
- package/src/components/product/ReportForm/PaymentRecordDetailed.vue +472 -0
- package/src/components/product/ReportForm/PaymentRecordTooBad.vue +60 -0
- package/src/components/product/ReportForm/PaymentReport.vue +532 -0
- package/src/components/product/ReportForm/ProjectReport.vue +447 -0
- package/src/components/product/ReportForm/SettlementReport.vue +336 -0
- package/src/components/product/ReportForm/SummaryReport.vue +451 -0
- package/src/components/product/ReportForm/UserReport.vue +402 -0
- package/src/components/product/ServiceView.vue +17 -9
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +36 -2
- package/src/components/product/Supervisory/SupervisoryControl.vue +30 -6
- package/src/components/product/Supervisory/SupervisoryList.vue +249 -34
- package/src/components/product/VueUtils/ApplyUpload.vue +310 -0
- package/src/components/product/VueUtils/rightview/InstallCardList2.vue +0 -1
- package/src/main.js +4 -0
- package/success.rar +0 -0
- package/doc//350/212/261/345/220/215/345/206/214/345/257/274/345/205/245/346/250/241/346/235/277.xlsx +0 -0
|
@@ -1,1387 +1,1387 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<service-view-app v-ref:service_show :data="show_data" v-if="showview"></service-view-app>
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
import co from 'co'
|
|
6
|
-
import Vue from 'vue'
|
|
7
|
-
import {HttpResetClass} from 'vue-client'
|
|
8
|
-
export default {
|
|
9
|
-
title: '报建流程业务控制层',
|
|
10
|
-
props: ['selectdata'],
|
|
11
|
-
data () {
|
|
12
|
-
return {
|
|
13
|
-
data:null, // 数据库数据,json配置文件数据的数据集合
|
|
14
|
-
json_datas:null, // Json配置文件集合
|
|
15
|
-
showview:false, // 控制显示service-view组件
|
|
16
|
-
show_data:null, // 给view层显示的数据
|
|
17
|
-
department_search:null // 当前部门下所有人
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
methods: {
|
|
21
|
-
// 特殊化处理
|
|
22
|
-
async special(model){
|
|
23
|
-
console.log('进入async special方法')
|
|
24
|
-
if(this.data.distribute_async && model.button.button_name==='下发'){
|
|
25
|
-
// 流程异步处理
|
|
26
|
-
let http = new HttpResetClass();
|
|
27
|
-
let res = await http.load('POST',this.$androidUtil.getProxyUrl() + '/rs/logic/syncprocess',{data:{model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: '流程异步下发据保存失败'})
|
|
28
|
-
console.log("流程的异步处理:",JSON.stringify(res.data))
|
|
29
|
-
}
|
|
30
|
-
if(this.data.distribute_async && model.button.button_name==='完成'){
|
|
31
|
-
// 强制结束
|
|
32
|
-
let http = new HttpResetClass();
|
|
33
|
-
let res = await http.load('POST',this.$androidUtil.getProxyUrl() + '/rs/logic/stoprocess',{data:{model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: '流程异步完成数据保存失败'})
|
|
34
|
-
console.log("流程的异步处理:",JSON.stringify(res.data))
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
// 组件初始化操作
|
|
38
|
-
refurbish(){
|
|
39
|
-
if(!this.$workflow_vue){
|
|
40
|
-
this.$showMessage('流程配置文件不存在,请反馈系统管理员')
|
|
41
|
-
return
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
this.json_datas=this.$workflow_vue
|
|
45
|
-
let sum = 0
|
|
46
|
-
let jsonData ={}
|
|
47
|
-
for(let i=0;i<this.json_datas.activitys.length;i++){
|
|
48
|
-
if(this.selectdata.defname==this.json_datas.activitys[i].title){
|
|
49
|
-
jsonData = this.json_datas.activitys[i]
|
|
50
|
-
sum++
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
console.log('sum=>' + sum)
|
|
54
|
-
if(sum==1){
|
|
55
|
-
this.data =null
|
|
56
|
-
this.data = jsonData
|
|
57
|
-
console.log('调用initializtion前的this.data=>' + JSON.stringify(this.data))
|
|
58
|
-
this.initializtion()
|
|
59
|
-
|
|
60
|
-
} else if(sum==0) {
|
|
61
|
-
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
62
|
-
} else {
|
|
63
|
-
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
// json配置数据处理 比如下拉框的options
|
|
67
|
-
async initializtion() {
|
|
68
|
-
|
|
69
|
-
console.log('进入initializtion()方法')
|
|
70
|
-
console.log('接收到的selectdata有无变化'+JSON.stringify(this.selectdata))
|
|
71
|
-
console.log('接收到的selectdata有无actorexpression'+JSON.stringify(this.selectdata.actorexpression))
|
|
72
|
-
// 下发人 options 处理,options初始化
|
|
73
|
-
if(this.selectdata.actorexpression){
|
|
74
|
-
//截取actorexpression
|
|
75
|
-
|
|
76
|
-
let http = new HttpResetClass()
|
|
77
|
-
var url = this.$androidUtil.getProxyUrl() + '/rs/search'
|
|
78
|
-
console.log('即将请求后台获取下发人员,url=>' + url)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
let
|
|
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
|
-
this.data.buttons[i].button_fields[j].
|
|
127
|
-
}
|
|
128
|
-
//
|
|
129
|
-
if(this.data.buttons[i].
|
|
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
|
-
console.log(
|
|
173
|
-
this.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
this.$
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
"
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"
|
|
232
|
-
"
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
this.$refs.service_show.data.fields[i].
|
|
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
|
-
let
|
|
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
|
-
this.$refs.service_show.data.fields[
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
let
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
this.$refs.service_show.data.fields[i].
|
|
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
|
-
let
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
let
|
|
451
|
-
this.$refs.service_show.data.fields[
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
//
|
|
457
|
-
//
|
|
458
|
-
//
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
this.$refs.service_show.
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
this.$refs.service_show.
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
this.$refs.service_show.data.fields
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
//
|
|
617
|
-
//
|
|
618
|
-
//
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
console.log('
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
this.$refs.service_show.data.fields
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
this.$
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
this.$
|
|
723
|
-
|
|
724
|
-
this.$refs.service_show.data.fields[i].
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
if (this.$refs.service_show.data.fields[i].label === '
|
|
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
|
-
// this.$refs.service_show.
|
|
794
|
-
//
|
|
795
|
-
//
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
let
|
|
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
|
-
this.$refs.service_show.data.fields[i].
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
this.$refs.service_show.data.fields
|
|
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
|
-
this.$refs.service_show.data.fields[j].value =
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
if (
|
|
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
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
this.$refs.service_show.data.fields[index].label === '
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
this.$refs.service_show.data.fields[index].label === '
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
this.$refs.service_show.data.fields
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
//
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
//
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
//
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
//
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
//
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
//
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
if (this.$refs.service_show.data.fields[index].label === '
|
|
1138
|
-
this.$refs.service_show.data.fields[index].
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
}
|
|
1149
|
-
if (this.selectdata.defname
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
this.
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
//
|
|
1248
|
-
|
|
1249
|
-
//
|
|
1250
|
-
//
|
|
1251
|
-
//
|
|
1252
|
-
//
|
|
1253
|
-
//
|
|
1254
|
-
|
|
1255
|
-
//
|
|
1256
|
-
//
|
|
1257
|
-
//
|
|
1258
|
-
//
|
|
1259
|
-
// this.$refs.service_show.data.fields
|
|
1260
|
-
//
|
|
1261
|
-
//
|
|
1262
|
-
//
|
|
1263
|
-
//
|
|
1264
|
-
//
|
|
1265
|
-
//
|
|
1266
|
-
//
|
|
1267
|
-
//
|
|
1268
|
-
//
|
|
1269
|
-
//
|
|
1270
|
-
//
|
|
1271
|
-
//
|
|
1272
|
-
//
|
|
1273
|
-
//
|
|
1274
|
-
//
|
|
1275
|
-
//
|
|
1276
|
-
// //
|
|
1277
|
-
// //
|
|
1278
|
-
// //
|
|
1279
|
-
// //
|
|
1280
|
-
// //
|
|
1281
|
-
// //
|
|
1282
|
-
// // }
|
|
1283
|
-
// // if (this.$refs.service_show.data.fields[index].label === '
|
|
1284
|
-
// // fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1285
|
-
// // }
|
|
1286
|
-
//
|
|
1287
|
-
//
|
|
1288
|
-
//
|
|
1289
|
-
//
|
|
1290
|
-
//
|
|
1291
|
-
//
|
|
1292
|
-
//
|
|
1293
|
-
//
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
//
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
//
|
|
1329
|
-
//
|
|
1330
|
-
//
|
|
1331
|
-
//
|
|
1332
|
-
//
|
|
1333
|
-
//
|
|
1334
|
-
//
|
|
1335
|
-
//
|
|
1336
|
-
//
|
|
1337
|
-
//
|
|
1338
|
-
//
|
|
1339
|
-
//
|
|
1340
|
-
//
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
model.employeetemplate=''
|
|
1365
|
-
http.load('POST',url,{data:{employeetemplate:'',tables:self.data.tables,start_activity:self.$workflow_vue.start_activity,model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: null})
|
|
1366
|
-
.then((res) => {
|
|
1367
|
-
console.log(JSON.stringify(res))
|
|
1368
|
-
if(res.code = 200){
|
|
1369
|
-
self.showview = false
|
|
1370
|
-
// 如果需要删除本地记录则去删除
|
|
1371
|
-
if(delteLocal){
|
|
1372
|
-
self.deleteLocalApply(model)
|
|
1373
|
-
}
|
|
1374
|
-
// 特殊处理
|
|
1375
|
-
self.special(model)
|
|
1376
|
-
self.$dispatch('
|
|
1377
|
-
self.initializtion()
|
|
1378
|
-
self.$showMessage('操作成功')
|
|
1379
|
-
}else{
|
|
1380
|
-
self.$showMessage('操作失败,原因:' + res.data.msg)
|
|
1381
|
-
}
|
|
1382
|
-
})
|
|
1383
|
-
.catch((ret) => {
|
|
1384
|
-
self.$showMessage('操作异常,原因:' + JSON.stringify(ret.data))
|
|
1385
|
-
})
|
|
1386
|
-
}
|
|
1387
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<service-view-app v-ref:service_show :data="show_data" v-if="showview"></service-view-app>
|
|
3
|
+
</template>
|
|
4
|
+
<script>
|
|
5
|
+
import co from 'co'
|
|
6
|
+
import Vue from 'vue'
|
|
7
|
+
import {HttpResetClass} from 'vue-client'
|
|
8
|
+
export default {
|
|
9
|
+
title: '报建流程业务控制层',
|
|
10
|
+
props: ['selectdata'],
|
|
11
|
+
data () {
|
|
12
|
+
return {
|
|
13
|
+
data:null, // 数据库数据,json配置文件数据的数据集合
|
|
14
|
+
json_datas:null, // Json配置文件集合
|
|
15
|
+
showview:false, // 控制显示service-view组件
|
|
16
|
+
show_data:null, // 给view层显示的数据
|
|
17
|
+
department_search:null // 当前部门下所有人
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
// 特殊化处理
|
|
22
|
+
async special(model){
|
|
23
|
+
console.log('进入async special方法')
|
|
24
|
+
if(this.data.distribute_async && model.button.button_name==='下发'){
|
|
25
|
+
// 流程异步处理
|
|
26
|
+
let http = new HttpResetClass();
|
|
27
|
+
let res = await http.load('POST',this.$androidUtil.getProxyUrl() + '/rs/logic/syncprocess',{data:{model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: '流程异步下发据保存失败'})
|
|
28
|
+
console.log("流程的异步处理:",JSON.stringify(res.data))
|
|
29
|
+
}
|
|
30
|
+
if(this.data.distribute_async && model.button.button_name==='完成'){
|
|
31
|
+
// 强制结束
|
|
32
|
+
let http = new HttpResetClass();
|
|
33
|
+
let res = await http.load('POST',this.$androidUtil.getProxyUrl() + '/rs/logic/stoprocess',{data:{model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: '流程异步完成数据保存失败'})
|
|
34
|
+
console.log("流程的异步处理:",JSON.stringify(res.data))
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
// 组件初始化操作
|
|
38
|
+
refurbish(){
|
|
39
|
+
if(!this.$workflow_vue){
|
|
40
|
+
this.$showMessage('流程配置文件不存在,请反馈系统管理员')
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
console.log('内存中的流程配置文件数据=>' + JSON.stringify(this.$workflow_vue))
|
|
44
|
+
this.json_datas=this.$workflow_vue
|
|
45
|
+
let sum = 0
|
|
46
|
+
let jsonData ={}
|
|
47
|
+
for(let i=0;i<this.json_datas.activitys.length;i++){
|
|
48
|
+
if(this.selectdata.defname==this.json_datas.activitys[i].title){
|
|
49
|
+
jsonData = this.json_datas.activitys[i]
|
|
50
|
+
sum++
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
console.log('sum=>' + sum)
|
|
54
|
+
if(sum==1){
|
|
55
|
+
this.data =null
|
|
56
|
+
this.data = jsonData
|
|
57
|
+
console.log('调用initializtion前的this.data=>' + JSON.stringify(this.data))
|
|
58
|
+
this.initializtion()
|
|
59
|
+
|
|
60
|
+
} else if(sum==0) {
|
|
61
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
62
|
+
} else {
|
|
63
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
// json配置数据处理 比如下拉框的options
|
|
67
|
+
async initializtion() {
|
|
68
|
+
|
|
69
|
+
console.log('进入initializtion()方法')
|
|
70
|
+
console.log('接收到的selectdata有无变化'+JSON.stringify(this.selectdata))
|
|
71
|
+
console.log('接收到的selectdata有无actorexpression'+JSON.stringify(this.selectdata.actorexpression))
|
|
72
|
+
// 下发人 options 处理,options初始化
|
|
73
|
+
if(this.selectdata.actorexpression){
|
|
74
|
+
//截取actorexpression
|
|
75
|
+
|
|
76
|
+
let http = new HttpResetClass()
|
|
77
|
+
var url = this.$androidUtil.getProxyUrl() + '/rs/search'
|
|
78
|
+
console.log('即将请求后台获取下发人员,url=>' + url)
|
|
79
|
+
let res = await http.load('POST', url, this.selectdata.actorexpression, {resolveMsg: null, rejectMsg: '获取当前部门人员失败'})
|
|
80
|
+
console.log("请求后台获取下发人员结果转换=>" + JSON.stringify(res))
|
|
81
|
+
let jsonString = JSON.stringify(res.data)
|
|
82
|
+
let jsonArray = []
|
|
83
|
+
if(jsonString.startsWith("{")){
|
|
84
|
+
jsonArray.push(res.data)
|
|
85
|
+
res.data = jsonArray
|
|
86
|
+
}
|
|
87
|
+
this.department_search = res.data
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// data 填充 selectdata
|
|
91
|
+
console.log('即将合并data与selectdata,selectdata数据=>' + JSON.stringify(this.selectdata))
|
|
92
|
+
this.data = Object.assign({},this.data, this.selectdata)
|
|
93
|
+
console.log('this.data的值=>' + JSON.stringify(this.data))
|
|
94
|
+
|
|
95
|
+
// 初始化 fields
|
|
96
|
+
console.log('this.data.fields.length=>' + this.data.fields.length)
|
|
97
|
+
for(let i=0;i<this.data.fields.length;i++){
|
|
98
|
+
// 如果selectdata有这些key,则把selectdata的value赋值给data的value
|
|
99
|
+
if(this.selectdata[this.data.fields[i].field]){
|
|
100
|
+
this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
|
|
101
|
+
}
|
|
102
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
103
|
+
if(this.data.fields[i].type == 'select'){
|
|
104
|
+
console.log('进入下拉框参数获取方法,参数名称=>' + this.data.fields[i].label)
|
|
105
|
+
console.log('$appdata中的缓存参数与单值=>' + JSON.stringify(this.$appdata))
|
|
106
|
+
var param = this.$appdata.getParam(this.data.fields[i].label)
|
|
107
|
+
console.log(param)
|
|
108
|
+
if (param){
|
|
109
|
+
this.data.fields[i].options = param
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// 初始化 buttons_fields
|
|
115
|
+
for(let i=0;i<this.data.buttons.length;i++){
|
|
116
|
+
if(this.data.buttons[i].button_fields){
|
|
117
|
+
for(let j=0;j<this.data.buttons[i].button_fields.length;j++){
|
|
118
|
+
// 如果selectdata有这些key,则把selectdata的value赋值给data的value
|
|
119
|
+
if(this.selectdata[this.data.buttons[i].button_fields[j].field]){
|
|
120
|
+
this.data.buttons[i].button_fields[j].value = this.selectdata[this.data.buttons[i].button_fields[j].field]
|
|
121
|
+
}
|
|
122
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
123
|
+
if(this.data.buttons[i].button_fields[j].type==='select'&&this.$appdata.getParam(this.data.buttons[i].button_fields[j].label)){
|
|
124
|
+
console.log("这里是给select赋值的地方"+JSON.stringify(this.data.buttons[i].button_fields[j]))
|
|
125
|
+
console.log("参数列表获取到的"+JSON.stringify(this.$appdata.getParam(this.data.buttons[i].button_fields[j].label)))
|
|
126
|
+
this.data.buttons[i].button_fields[j].options=this.$appdata.getParam(this.data.buttons[i].button_fields[j].label)
|
|
127
|
+
}
|
|
128
|
+
// 下发特殊配置
|
|
129
|
+
if(this.data.buttons[i].button_name==='下发'){
|
|
130
|
+
if(this.data.buttons[i].button_fields.length===1){
|
|
131
|
+
// value初始化
|
|
132
|
+
// if(this.department_search){
|
|
133
|
+
console.log("看看111department_search"+JSON.stringify(this.department_search))
|
|
134
|
+
|
|
135
|
+
if(this.selectdata[this.data.buttons[i].button_fields[0].field]){
|
|
136
|
+
|
|
137
|
+
for(let k=0;k<this.department_search.length;k++){
|
|
138
|
+
// 将id转换为name
|
|
139
|
+
if(Number(this.department_search[k].id) === Number(this.selectdata[this.data.buttons[i].button_fields[0].field])){
|
|
140
|
+
this.data.buttons[i].button_fields[0].value=this.department_search[k].name
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if(this.department_search){
|
|
146
|
+
let array = []
|
|
147
|
+
console.log("看看department_search"+JSON.stringify(this.department_search))
|
|
148
|
+
this.department_search.forEach((paper)=>{
|
|
149
|
+
array.push({label:paper.name,value:paper.name})
|
|
150
|
+
})
|
|
151
|
+
this.data.buttons[i].button_fields[0].options = array
|
|
152
|
+
}
|
|
153
|
+
}else {
|
|
154
|
+
this.$showMessage("下发按钮必须满足 当且仅当一个字段")
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
161
|
+
let temp = JSON.parse(JSON.stringify(this.data))
|
|
162
|
+
// 退回原因展示
|
|
163
|
+
if(this.selectdata.f_back_reason){
|
|
164
|
+
temp['back_reason'] = this.selectdata.f_back_reason
|
|
165
|
+
}
|
|
166
|
+
console.log('即将给show_data赋值temp=>' + JSON.stringify(temp))
|
|
167
|
+
this.show_data = temp
|
|
168
|
+
console.log('initializtion()方法结束,showview')
|
|
169
|
+
this.showview = true
|
|
170
|
+
},
|
|
171
|
+
deleteLocalApply(model){
|
|
172
|
+
console.log(`前台上传完成,开始删除本地报建工单`)
|
|
173
|
+
this.$androidUtil.bzLogic('deleteApply', {data:model})
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
events: {
|
|
177
|
+
// 任意select选中时触发事件
|
|
178
|
+
async 'select_cascade'(index) {
|
|
179
|
+
// this.$refs.service_show.data // 子业务显示组件
|
|
180
|
+
// 级联操作示例:
|
|
181
|
+
/*
|
|
182
|
+
if(this.$refs.service_show.data.fields[index].label==='报建类型'){
|
|
183
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
184
|
+
// 控制设置级联
|
|
185
|
+
// 源select所选的值 this.$refs.service_show.data.fields[index].value
|
|
186
|
+
if(this.$refs.service_show.data.fields[i].label==='级联测试2'){
|
|
187
|
+
this.$refs.service_show.data.fields[i].options=[
|
|
188
|
+
{label:'级联选项1',value:'级联选项1'},{label:'级联选项2',value:'级联选项2'},{label:'级联选项3',value:'级联选项3'}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
*/
|
|
194
|
+
/*
|
|
195
|
+
{
|
|
196
|
+
"label": "用水性质",
|
|
197
|
+
"type": "select",
|
|
198
|
+
"bootstraped": "col-sm-4",
|
|
199
|
+
"field": "f_gasproperties",
|
|
200
|
+
"readonly": true,
|
|
201
|
+
"disabled": false,
|
|
202
|
+
"required": false,
|
|
203
|
+
"hidden": true,
|
|
204
|
+
"options": []
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"label": "水价类型",
|
|
208
|
+
"type": "select",
|
|
209
|
+
"bootstraped": "col-sm-4",
|
|
210
|
+
"field": "f_price_type",
|
|
211
|
+
"readonly": true,
|
|
212
|
+
"disabled": false,
|
|
213
|
+
"required": false,
|
|
214
|
+
"hidden": true,
|
|
215
|
+
"options": []
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"label": "水价名称",
|
|
219
|
+
"type": "select",
|
|
220
|
+
"bootstraped": "col-sm-4",
|
|
221
|
+
"field": "f_price_name",
|
|
222
|
+
"readonly": true,
|
|
223
|
+
"disabled": false,
|
|
224
|
+
"required": false,
|
|
225
|
+
"hidden": true,
|
|
226
|
+
"options": []
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"label": "水价id",
|
|
230
|
+
"type": "number",
|
|
231
|
+
"bootstraped": "col-sm-4",
|
|
232
|
+
"field": "f_price_id",
|
|
233
|
+
"readonly": true,
|
|
234
|
+
"disabled": false,
|
|
235
|
+
"required": false,
|
|
236
|
+
"hidden": true
|
|
237
|
+
},
|
|
238
|
+
*/
|
|
239
|
+
if(this.$refs.service_show.data.fields[index].label === '是否装新表'){
|
|
240
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
241
|
+
if(this.$refs.service_show.data.fields[index].value == '是'){
|
|
242
|
+
if(this.$refs.service_show.data.fields[i].label=='用水性质'||
|
|
243
|
+
this.$refs.service_show.data.fields[i].label=='水价类型'||
|
|
244
|
+
this.$refs.service_show.data.fields[i].label=='水价名称'
|
|
245
|
+
){
|
|
246
|
+
this.$refs.service_show.data.fields[i].required=true,
|
|
247
|
+
this.$refs.service_show.data.fields[i].hidden=false
|
|
248
|
+
}
|
|
249
|
+
}else{
|
|
250
|
+
if(this.$refs.service_show.data.fields[i].label=='用水性质'||
|
|
251
|
+
this.$refs.service_show.data.fields[i].label=='水价类型'||
|
|
252
|
+
this.$refs.service_show.data.fields[i].label=='水价名称'){
|
|
253
|
+
this.$refs.service_show.data.fields[i].required=false,
|
|
254
|
+
this.$refs.service_show.data.fields[i].hidden=true
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if(this.$refs.service_show.data.fields[index].label === '是否装新表'&&this.$refs.service_show.data.fields[index].value=='是'){
|
|
260
|
+
let usertype = ''
|
|
261
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
262
|
+
if(this.$refs.service_show.data.fields[i].label=='用户类型'){
|
|
263
|
+
usertype = this.$refs.service_show.data.fields[i].value
|
|
264
|
+
}
|
|
265
|
+
if(this.$refs.service_show.data.fields[i].label=='用水性质'&&this.$refs.service_show.data.fields[index].value){
|
|
266
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
267
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
268
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(usertype)
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (this.$refs.service_show.data.fields[index].label === '用户类型') { //用水性质
|
|
274
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
275
|
+
if(this.$refs.service_show.data.fields[i].label=='用水性质'&&this.$refs.service_show.data.fields[index].value){
|
|
276
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
277
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
278
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(this.$refs.service_show.data.fields[index].value.trim())
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (this.$refs.service_show.data.fields[index].label === '技术人员') { //水价类型
|
|
284
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
285
|
+
if(this.$refs.service_show.data.fields[i].label=='技术人员id'&&this.$refs.service_show.data.fields[index].value){
|
|
286
|
+
if(typeof this.$refs.service_show.data.fields[index].value=='object'){
|
|
287
|
+
this.$refs.service_show.data.fields[i].value=this.$refs.service_show.data.fields[index].value.id
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
if (this.$refs.service_show.data.fields[index].label === '用水性质') { //水价类型
|
|
295
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
296
|
+
if(this.$refs.service_show.data.fields[i].label=='水价类型'&&this.$refs.service_show.data.fields[index].value){
|
|
297
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
298
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
299
|
+
this.$refs.service_show.data.fields[i].options= this.$appdata.getParam(this.$refs.service_show.data.fields[i].label)
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (this.$refs.service_show.data.fields[index].label === '水价类型') {
|
|
305
|
+
let gasproperties = ''
|
|
306
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
307
|
+
if(this.$refs.service_show.data.fields[i].label=='用水性质'){
|
|
308
|
+
gasproperties= this.$refs.service_show.data.fields[i].value
|
|
309
|
+
}
|
|
310
|
+
if(this.$refs.service_show.data.fields[i].label=='水价名称'){
|
|
311
|
+
this.$refs.service_show.data.fields[i].value=''
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
let pricetype=this.$refs.service_show.data.fields[index].value
|
|
317
|
+
let http = new HttpResetClass()
|
|
318
|
+
let condition =`f_user_type = '${this.selectdata.f_user_type}' and f_filiale = '${Vue.user.f_fengongsi}'
|
|
319
|
+
and f_gasproperties = '${gasproperties}' and f_price_type = '${this.$refs.service_show.data.fields[index].value}'`
|
|
320
|
+
let res = await http.load('POST', 'rs/logic/getRecordItem', {condition}, {resolveMsg: null, rejectMsg: null})
|
|
321
|
+
console.log('获取的水价类型,',res)
|
|
322
|
+
let house2 = []
|
|
323
|
+
if (res.data.pricename) {
|
|
324
|
+
for (let row of res.data.pricename){
|
|
325
|
+
house2.push({label: row.f_price_name,value: {id:row.f_price_id,name:row.f_price_name}})
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
330
|
+
if (this.$refs.service_show.data.fields[i].label === '水价名称') {
|
|
331
|
+
this.$refs.service_show.data.fields[i].options= house2
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (this.$refs.service_show.data.fields[index].label === '水价名称') { //用水性质
|
|
337
|
+
if(this.$refs.service_show.data.fields[index].value&&typeof this.$refs.service_show.data.fields[index].value =='object'){
|
|
338
|
+
for(let i=0;i<this.$refs.service_show.data.fields.length;i++){
|
|
339
|
+
if(this.$refs.service_show.data.fields[i].label=='水价id'){
|
|
340
|
+
this.$refs.service_show.data.fields[i].value= Number(this.$refs.service_show.data.fields[index].value.id)
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
this.$refs.service_show.data.fields[index].value= this.$refs.service_show.data.fields[index].value.name
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (this.$refs.service_show.data.fields[index].label === '报建类型') {
|
|
348
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
349
|
+
if (this.$refs.service_show.data.fields[i].label == '用户类型') {
|
|
350
|
+
if (this.$refs.service_show.data.fields[index].value.includes('民用')) {
|
|
351
|
+
this.$refs.service_show.data.fields[i].value = '民用'
|
|
352
|
+
} else {
|
|
353
|
+
this.$refs.service_show.data.fields[i].value = '非民用'
|
|
354
|
+
}
|
|
355
|
+
this.$refs.service_show.update()
|
|
356
|
+
return
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (this.$refs.service_show.data.fields[index].label === '表号') {
|
|
362
|
+
if(this.$refs.service_show.data.fields[index].value){
|
|
363
|
+
let http = new HttpResetClass()
|
|
364
|
+
let data = {
|
|
365
|
+
columnname: ` uf.f_meternumber `,
|
|
366
|
+
tablename: ' t_userfiles uf LEFT JOIN t_userinfo ui on ui.f_userinfo_id = uf.f_userinfo_id ',
|
|
367
|
+
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}'`
|
|
368
|
+
}
|
|
369
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {
|
|
370
|
+
resolveMsg: null,
|
|
371
|
+
rejectMsg: "表号查询失败"
|
|
372
|
+
})
|
|
373
|
+
if(res.data.length>0){
|
|
374
|
+
this.$showMessage("警告:表号已被使用!请查证")
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (this.$refs.service_show.data.fields[index].label === '安装表数'&&this.$refs.service_show.data.fields[index].value==1) {
|
|
380
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++){
|
|
381
|
+
if (this.$refs.service_show.data.fields[i].label === '用户类型'){
|
|
382
|
+
// =this.$refs.service_show.data.fields[i].value
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
if (this.data.f_install_num == 1 && this.$refs.service_show.data.fields[index].label === '是否有表') {
|
|
388
|
+
if (this.$refs.service_show.data.fields[index].value == "是") {
|
|
389
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
390
|
+
if (this.$refs.service_show.data.fields[i].label === '水表品牌'
|
|
391
|
+
|| this.$refs.service_show.data.fields[i].label === '水表型号'
|
|
392
|
+
|| this.$refs.service_show.data.fields[i].label === '左右表'
|
|
393
|
+
|| this.$refs.service_show.data.fields[i].label === '表号'
|
|
394
|
+
|| this.$refs.service_show.data.fields[i].label === '水表厂家') {
|
|
395
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
396
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
397
|
+
} else if (this.selectdata.defname == '通水' && this.$refs.service_show.data.fields[i].label === '通水表号') {
|
|
398
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
399
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
} else {
|
|
403
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
404
|
+
if (this.$refs.service_show.data.fields[i].label === '水表品牌'
|
|
405
|
+
|| this.$refs.service_show.data.fields[i].label === '水表型号'
|
|
406
|
+
|| this.$refs.service_show.data.fields[i].label === '表号'
|
|
407
|
+
|| this.$refs.service_show.data.fields[i].label === '左右表'
|
|
408
|
+
|| this.$refs.service_show.data.fields[i].label === '水表厂家') {
|
|
409
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
410
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
411
|
+
} else if (this.selectdata.defname == '通水' && this.$refs.service_show.data.fields[i].label === '通水表号') {
|
|
412
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
413
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (this.$refs.service_show.data.fields[index].label === '水表品牌') {
|
|
419
|
+
// console.log("水表品牌>>>>>"+JSON.stringify(this.$refs.service_show.data.fields[index].value))
|
|
420
|
+
let id = null
|
|
421
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
422
|
+
if (this.$refs.service_show.data.fields[i].label == '水表型号') {
|
|
423
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
424
|
+
let temp = {}
|
|
425
|
+
// console.log("this.$refs.service_show.data.fields[index].value",this.$refs.service_show.data.fields[index].value)
|
|
426
|
+
if(typeof this.$refs.service_show.data.fields[index].value =='string'){
|
|
427
|
+
for (let x = 0; x < Vue.ApplyGetSaleParam.gasbrands.length; x++) {
|
|
428
|
+
if (Vue.ApplyGetSaleParam.gasbrands[x].label == this.$refs.service_show.data.fields[index].value) {
|
|
429
|
+
temp = Vue.ApplyGetSaleParam.gasbrands[x].value.gasmodel
|
|
430
|
+
id = Vue.ApplyGetSaleParam.gasbrands[x].value.id
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
// let temp = this.$refs.service_show.data.fields[index].value.gasmodel
|
|
434
|
+
this.$refs.service_show.data.fields[i].options = temp
|
|
435
|
+
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
|
|
436
|
+
}else{
|
|
437
|
+
id= Number(this.$refs.service_show.data.fields[index].value.id)
|
|
438
|
+
let http = new HttpResetClass()
|
|
439
|
+
let data = {
|
|
440
|
+
columnname: 'f_meter_style,id',
|
|
441
|
+
tablename: 't_gasmodel ',
|
|
442
|
+
condition: ` f_gasbrand_id = ${this.$refs.service_show.data.fields[index].value.id} `
|
|
443
|
+
}
|
|
444
|
+
let res = await http.load('POST', 'rs/sql/getdistinct', {data: data}, {resolveMsg: null, rejectMsg: '获取水表型号失败'})
|
|
445
|
+
this.$refs.service_show.data.fields[i].options=[]
|
|
446
|
+
for(let x=0;x<res.data.length;x++){
|
|
447
|
+
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}})
|
|
448
|
+
}
|
|
449
|
+
console.log("水表型号",this.$refs.service_show.data.fields[i].options)
|
|
450
|
+
// for (let x = 0; x < Vue.ApplyGetSaleParam.gasbrands.length; x++) {
|
|
451
|
+
// if (Vue.ApplyGetSaleParam.gasbrands[x].label == this.$refs.service_show.data.fields[index].value.f_meter_brand) {
|
|
452
|
+
// temp = Vue.ApplyGetSaleParam.gasbrands[x].value.gasmodel
|
|
453
|
+
// id = Vue.ApplyGetSaleParam.gasbrands[x].value.id
|
|
454
|
+
// }
|
|
455
|
+
// }
|
|
456
|
+
// // let temp = this.$refs.service_show.data.fields[index].value.gasmodel
|
|
457
|
+
// this.$refs.service_show.data.fields[i].options = temp
|
|
458
|
+
// 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
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
// this.$refs.service_show.update()
|
|
463
|
+
} else if (this.$refs.service_show.data.fields[i].label == '水表品牌id') {
|
|
464
|
+
this.$refs.service_show.data.fields[i].value = id
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
for(let i = 0; i < this.$refs.service_show.data.fields.length; i++){
|
|
468
|
+
if (this.$refs.service_show.data.fields[i].label == '水表品牌id') {
|
|
469
|
+
this.$refs.service_show.data.fields[i].value = id
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
this.$refs.service_show.update()
|
|
473
|
+
}
|
|
474
|
+
if (this.$refs.service_show.data.fields[index].label === '水表型号') {
|
|
475
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
476
|
+
if (this.$refs.service_show.data.fields[i].label == '水表型号id') {
|
|
477
|
+
this.$refs.service_show.data.fields[i].value = Number(this.$refs.service_show.data.fields[index].value.id)
|
|
478
|
+
// console.log("水表型号id:",this.$refs.service_show.data.fields[i].value)
|
|
479
|
+
}else if(this.$refs.service_show.data.fields[i].label == '水表品牌'&&typeof this.$refs.service_show.data.fields[i].value =='object'){
|
|
480
|
+
this.$refs.service_show.data.fields[i].value = this.$refs.service_show.data.fields[i].value.name
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
this.$refs.service_show.data.fields[index].value = this.$refs.service_show.data.fields[index].value.name
|
|
484
|
+
this.$refs.service_show.update()
|
|
485
|
+
return
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
if (this.$refs.service_show.data.fields[index].label == '电话号码') {
|
|
490
|
+
let phone = this.$refs.service_show.data.fields[index].value
|
|
491
|
+
// 电话号码效验
|
|
492
|
+
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
493
|
+
this.$refs.service_show.data.fields[index].value = ""
|
|
494
|
+
this.$showAlert('电话号码格式不正确,请重新输入。', 'info', 2000)
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if (this.$refs.service_show.data.fields[index].label == '施工单位' ||
|
|
499
|
+
this.$refs.service_show.data.fields[index].label == '检测单位' ||
|
|
500
|
+
this.$refs.service_show.data.fields[index].label == '监理单位' ||
|
|
501
|
+
this.$refs.service_show.data.fields[index].label == '土建单位' ||
|
|
502
|
+
this.$refs.service_show.data.fields[index].label == '设计单位') {
|
|
503
|
+
console.log(this.$refs.service_show.data.fields[index].label,this.$refs.service_show.data.fields[index].value)
|
|
504
|
+
this.$refs.service_show.update()
|
|
505
|
+
return
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
if (
|
|
509
|
+
this.$refs.service_show.data.fields[index].label === '最终核算成本金额' ||
|
|
510
|
+
this.$refs.service_show.data.fields[index].label === '合同总金额' ||
|
|
511
|
+
this.$refs.service_show.data.fields[index].label === '工程盈利'
|
|
512
|
+
) {
|
|
513
|
+
|
|
514
|
+
var a = 0
|
|
515
|
+
var b = 0
|
|
516
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
517
|
+
// 控制设置级联
|
|
518
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
519
|
+
// xxx xx xxx
|
|
520
|
+
if (this.$refs.service_show.data.fields[i].label === '最终核算成本金额') {
|
|
521
|
+
this.$refs.service_show.data.fields[i].value = (this.number + this.cost + this.anzhuangsum + this.tujiansum)
|
|
522
|
+
a = this.$refs.service_show.data.fields[i].value
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
if (this.$refs.service_show.data.fields[i].label === '合同总金额' && this.$refs.service_show.data.fields[i].value) {
|
|
526
|
+
b = this.$refs.service_show.data.fields[i].value
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
var c = b - a
|
|
530
|
+
// 数据计算完毕得到工程结余
|
|
531
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
532
|
+
if (this.$refs.service_show.data.fields[i].label === '工程盈利') {
|
|
533
|
+
this.$refs.service_show.data.fields[i].value = c
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
if (this.$refs.service_show.showadd_fields && this.$refs.service_show.showadd_fields.length > 0 && this.$refs.service_show.showadd_fields[index].label === '收费金额') {
|
|
539
|
+
let chargeMoney = this.$refs.service_show.showadd_fields[index].value
|
|
540
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
541
|
+
if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
|
|
542
|
+
let cumulativeMoney = this.$refs.service_show.data.fields[i].value
|
|
543
|
+
if (Number(chargeMoney) > Number(cumulativeMoney)) {
|
|
544
|
+
this.$showMessage("收费金额不得大于未结总金额!")
|
|
545
|
+
this.$refs.service_show.showadd_fields[index].value = null
|
|
546
|
+
return
|
|
547
|
+
} else {
|
|
548
|
+
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
//根据合同预算金额和累计缴费金额计算未结金额
|
|
555
|
+
if (this.$refs.service_show.data.fields[index] && this.$refs.service_show.data.fields[index].label === '累计缴费金额') {
|
|
556
|
+
let cumulativeMoney = this.$refs.service_show.data.fields[index].value
|
|
557
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
558
|
+
if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
|
|
559
|
+
this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_contract_money) - Number(cumulativeMoney)
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
//根据合同预算金额和累计开票金额计算未开票金额
|
|
564
|
+
if (this.$refs.service_show.data.fields[index].label === '累计开票金额') {
|
|
565
|
+
let residualInvoicing = this.$refs.service_show.data.fields[index].value
|
|
566
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
567
|
+
if (this.$refs.service_show.data.fields[i].label === '未开票金额') {
|
|
568
|
+
this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_contract_total_money) - Number(residualInvoicing)
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
//如果资料验收是否通过和工程验收是否通过为否的时候弹出原因填写框
|
|
573
|
+
if (this.$refs.service_show.data.fields[index].label === '资料验收是否通过') {
|
|
574
|
+
let res = this.$refs.service_show.data.fields[index].value
|
|
575
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
576
|
+
if (this.$refs.service_show.data.fields[i].label === '资料验收不通过原因') {
|
|
577
|
+
if (res === '否') {
|
|
578
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
579
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
580
|
+
} else {
|
|
581
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
582
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
//洪雅预算审核获取当前操作人
|
|
588
|
+
// console.log("lable:"+this.$refs.service_show.data.fields[index].label)
|
|
589
|
+
// console.log("field:"+this.$refs.service_show.data.fields[index].field)
|
|
590
|
+
// if (this.$refs.service_show.data.fields[index].label === "审核人" && this.$refs.service_show.data.fields[index].field === "f_nstall_checker_gc" ){
|
|
591
|
+
// console.log("name:"+JSON.stringify(Vue.$login.f.name))
|
|
592
|
+
// this.$refs.service_show.data.fields[index].field = Vue.$login.f.name
|
|
593
|
+
// }
|
|
594
|
+
|
|
595
|
+
if (this.$refs.service_show.data.fields[index].label === '工程验收是否通过') {
|
|
596
|
+
let res = this.$refs.service_show.data.fields[index].value
|
|
597
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
598
|
+
if (this.$refs.service_show.data.fields[i].label === '工程验收不通过原因') {
|
|
599
|
+
if (res === '否') {
|
|
600
|
+
this.$refs.service_show.data.fields[i].hidden = false
|
|
601
|
+
this.$refs.service_show.data.fields[i].required = true
|
|
602
|
+
} else {
|
|
603
|
+
this.$refs.service_show.data.fields[i].hidden = true
|
|
604
|
+
this.$refs.service_show.data.fields[i].required = false
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
//根据总户数和实际安装表数计算未安装表数
|
|
610
|
+
// if (this.$refs.service_show.data.fields[index].label === '实际安装表数') {
|
|
611
|
+
// let value = this.$refs.service_show.data.fields[index].value
|
|
612
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
613
|
+
// if (this.$refs.service_show.data.fields[i].label === '未安装表数') {
|
|
614
|
+
// this.$refs.service_show.data.fields[i].label === '未安装表数'
|
|
615
|
+
// this.$refs.service_show.data.fields[i].value = Number(this.selectdata.f_install_num) - Number(value)
|
|
616
|
+
// }
|
|
617
|
+
// }
|
|
618
|
+
// }
|
|
619
|
+
|
|
620
|
+
//金额小写得到大写
|
|
621
|
+
if (this.$refs.service_show.showadd_fields && this.$refs.service_show.showadd_fields.length > 0 && this.$refs.service_show.showadd_fields.fields[index].label === '收费金额') {
|
|
622
|
+
if (this.$refs.service_show.showadd_fields[index].value || this.$refs.service_show.showadd_fields.fields[index].value) {
|
|
623
|
+
var re = /^[0-9]+.?[0-9]*/
|
|
624
|
+
let temp = this.$refs.service_show.showadd_fields[index].value
|
|
625
|
+
if (temp == "" || isNaN(temp)) {
|
|
626
|
+
this.$showMessage("请输入纯数字")
|
|
627
|
+
this.$refs.service_show.showadd_fields[index].value = 0
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
let temp = this.$refs.service_show.showadd_fields[index]
|
|
631
|
+
let value = temp.value
|
|
632
|
+
// let chargeMoney = this.$refs.service_show.showadd_fields[index].value
|
|
633
|
+
for (let i = 0; i < this.$refs.service_show.showadd_fields.fields.length; i++) {
|
|
634
|
+
if (this.$refs.service_show.showadd_fields.fields[i].label === '金额大写') {
|
|
635
|
+
let te = {
|
|
636
|
+
value: this.smalltoBIG(value)
|
|
637
|
+
}
|
|
638
|
+
this.$refs.service_show.showadd_fields[i] = te
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// console.log(JSON.stringify(Vue.user))
|
|
644
|
+
if (this.$refs.service_show.data.fields[index].label === '县/区') {
|
|
645
|
+
let temp = this.$refs.service_show.data.fields[index].value
|
|
646
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
647
|
+
// 控制设置级联
|
|
648
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
649
|
+
if (this.$refs.service_show.data.fields[i].label === '片区') {
|
|
650
|
+
this.$refs.service_show.data.fields[i].value = ''
|
|
651
|
+
this.$refs.service_show.data.fields[i].options = []
|
|
652
|
+
let rs = []
|
|
653
|
+
console.log('小区片区。。。', temp)
|
|
654
|
+
for (let j = 0; j < Vue.user.f_allArea.length; j++) {
|
|
655
|
+
if (Vue.user.f_allArea[j].label === temp) {
|
|
656
|
+
rs = Vue.user.f_allArea[j].value
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
console.log('获取小区片区=>' + JSON.stringify(rs))
|
|
660
|
+
this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
|
|
661
|
+
this.$refs.service_show.update()
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
//控制尾款
|
|
666
|
+
if (
|
|
667
|
+
this.$refs.service_show.data.fields[index].label === '合同金额' ||
|
|
668
|
+
this.$refs.service_show.data.fields[index].label === '首付' ||
|
|
669
|
+
this.$refs.service_show.data.fields[index].label === '进度款' ||
|
|
670
|
+
this.$refs.service_show.data.fields[index].label === '尾款'
|
|
671
|
+
) {
|
|
672
|
+
console.log('即将计算合同金额')
|
|
673
|
+
var cash = 0
|
|
674
|
+
var downpayments = 0
|
|
675
|
+
var tailmoney = 0
|
|
676
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
677
|
+
// 控制设置级联
|
|
678
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
679
|
+
// xxx xx xxx
|
|
680
|
+
if (this.$refs.service_show.data.fields[i].label === '合同金额' && this.$refs.service_show.data.fields[i].value) {
|
|
681
|
+
cash = this.$refs.service_show.data.fields[i].value
|
|
682
|
+
}
|
|
683
|
+
if (this.$refs.service_show.data.fields[i].label === '首付' && this.$refs.service_show.data.fields[i].value) {
|
|
684
|
+
downpayments = this.$refs.service_show.data.fields[i].value
|
|
685
|
+
}
|
|
686
|
+
if (this.$refs.service_show.data.fields[i].label === '进度款' && this.$refs.service_show.data.fields[i].value) {
|
|
687
|
+
tailmoney = this.$refs.service_show.data.fields[i].value
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
var a = cash - downpayments
|
|
691
|
+
a= a.toFixed(2)
|
|
692
|
+
// 数据计算完毕得到尾款
|
|
693
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
694
|
+
if (this.$refs.service_show.data.fields[i].label === '尾款') {
|
|
695
|
+
if (cash === downpayments) {
|
|
696
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
697
|
+
} else {
|
|
698
|
+
this.$refs.service_show.data.fields[i].value = (cash - downpayments - tailmoney)
|
|
699
|
+
this.$refs.service_show.data.fields[i].value=this.$refs.service_show.data.fields[i].value.toFixed(2)
|
|
700
|
+
console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
if (this.$refs.service_show.data.fields[i].label === '首付') {
|
|
704
|
+
if (a < 0) {
|
|
705
|
+
this.$showMessage("首付款数额过大")
|
|
706
|
+
downpayments = 0
|
|
707
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
if (this.$refs.service_show.data.fields[i].label === '进度款') {
|
|
712
|
+
|
|
713
|
+
if (cash === downpayments) {
|
|
714
|
+
tailmoney = 0
|
|
715
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
716
|
+
this.$refs.service_show.data.fields[i].readonly = true
|
|
717
|
+
} else {
|
|
718
|
+
this.$refs.service_show.data.fields[i].readonly = false
|
|
719
|
+
tailmoney = this.$refs.service_show.data.fields[i].value
|
|
720
|
+
}
|
|
721
|
+
if (tailmoney > a) {
|
|
722
|
+
this.$showMessage("进度款数额过大")
|
|
723
|
+
tailmoney = 0
|
|
724
|
+
this.$refs.service_show.data.fields[i].value = 0
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
let temp = 0
|
|
730
|
+
let then = 0
|
|
731
|
+
let install = 0
|
|
732
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
733
|
+
//未交金额计算
|
|
734
|
+
if (this.selectdata.defname === "报建缴费") {
|
|
735
|
+
if (this.$refs.service_show.data.fields[i].label === '超长费') {
|
|
736
|
+
then = this.$refs.service_show.data.fields[i].value
|
|
737
|
+
}
|
|
738
|
+
if (this.$refs.service_show.data.fields[i].label === '安装费') {
|
|
739
|
+
install = this.$refs.service_show.data.fields[i].value
|
|
740
|
+
}
|
|
741
|
+
if (this.$refs.service_show.data.fields[i].label === '应收金额') {
|
|
742
|
+
this.$refs.service_show.data.fields[i].value = parseFloat(then) + parseFloat(install)
|
|
743
|
+
temp = this.$refs.service_show.data.fields[i].value
|
|
744
|
+
}
|
|
745
|
+
if (this.$refs.service_show.data.fields[i].label === '实收金额') {
|
|
746
|
+
temp = temp - this.$refs.service_show.data.fields[i].value
|
|
747
|
+
this.nowcost = this.$refs.service_show.data.fields[i].value
|
|
748
|
+
}
|
|
749
|
+
if (this.$refs.service_show.data.fields[i].label === '金额大写') {
|
|
750
|
+
this.$refs.service_show.data.fields[i].value = this.smalltoBIG(Number(this.nowcost))
|
|
751
|
+
}
|
|
752
|
+
for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
|
|
753
|
+
if (this.$refs.service_show.data.fields[j].label === '欠费金额'){
|
|
754
|
+
this.$refs.service_show.data.fields[j].value = temp
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
if (temp < 0) {
|
|
758
|
+
this.$showMessage("欠费金额不能为负数")
|
|
759
|
+
return
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
// if (this.selectdata.defname === "现场踏勘") {
|
|
763
|
+
// if (this.$refs.service_show.data.fields[i].label === '收款金额') {
|
|
764
|
+
// temp = this.$refs.service_show.data.fields[i].value
|
|
765
|
+
// }
|
|
766
|
+
// if (this.$refs.service_show.data.fields[i].label === '已交金额') {
|
|
767
|
+
// temp = temp - this.$refs.service_show.data.fields[i].value
|
|
768
|
+
// this.nowcost = this.$refs.service_show.data.fields[i].value
|
|
769
|
+
// }
|
|
770
|
+
// if (this.$refs.service_show.data.fields[i].label === '金额大写') {
|
|
771
|
+
// this.$refs.service_show.data.fields[i].value = this.smalltoBIG(Number(this.nowcost))
|
|
772
|
+
// }
|
|
773
|
+
// for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
|
|
774
|
+
// if (this.$refs.service_show.data.fields[j].label === '未交金额'){
|
|
775
|
+
// this.$refs.service_show.data.fields[j].value = temp
|
|
776
|
+
// }
|
|
777
|
+
// }
|
|
778
|
+
// if (temp < 0) {
|
|
779
|
+
// this.$showMessage("欠费金额不能为负数")
|
|
780
|
+
// return
|
|
781
|
+
// }
|
|
782
|
+
// }
|
|
783
|
+
|
|
784
|
+
//任何是否的选择框只要是否都不能提交
|
|
785
|
+
// if (this.selectdata.defname != '寻找市场' && this.selectdata.defname != '用户申请') {
|
|
786
|
+
// if (this.$refs.service_show.data.fields[i].value === '否') {
|
|
787
|
+
// this.$refs.service_show.disable_button = false
|
|
788
|
+
// console.log(this.$refs.service_show.data)
|
|
789
|
+
// this.$refs.service_show.data.buttons[1].button_name = '保存'
|
|
790
|
+
// this.$showMessage("当审核/确认为否时,无法提交")
|
|
791
|
+
// return
|
|
792
|
+
// }else {
|
|
793
|
+
// this.$refs.service_show.data.buttons[1].button_name = '提交'
|
|
794
|
+
// }
|
|
795
|
+
// }
|
|
796
|
+
//获取抄表员
|
|
797
|
+
if (this.$refs.service_show.data.fields[i].label === '安装员'){
|
|
798
|
+
let person = []
|
|
799
|
+
let array = []
|
|
800
|
+
person = Vue.user.f_installman.map(item => {
|
|
801
|
+
return item.name;
|
|
802
|
+
})
|
|
803
|
+
console.log("安装员获取" + JSON.stringify(person))
|
|
804
|
+
for (let q = 0; q < person.length; q++) {
|
|
805
|
+
let arraydata = {
|
|
806
|
+
'label': person[q],
|
|
807
|
+
'value': person[q]
|
|
808
|
+
}
|
|
809
|
+
if (array.length != 0) {
|
|
810
|
+
for (let w = 0; w < array.length; w++) {
|
|
811
|
+
if (array[w].label == person[q]) {
|
|
812
|
+
break
|
|
813
|
+
}
|
|
814
|
+
while (w == array.length - 1) {
|
|
815
|
+
array.push(arraydata)
|
|
816
|
+
break
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
} else {
|
|
820
|
+
array.push(arraydata)
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
824
|
+
}
|
|
825
|
+
//气价名称、气价类型
|
|
826
|
+
if (
|
|
827
|
+
this.$refs.service_show.data.fields[i].label === '气价名称' ||
|
|
828
|
+
this.$refs.service_show.data.fields[i].label === '气价类型' ||
|
|
829
|
+
this.$refs.service_show.data.fields[i].label === '价格' ||
|
|
830
|
+
this.$refs.service_show.data.fields[i].label === '客户类型' ||
|
|
831
|
+
this.$refs.service_show.data.fields[i].label === '用气性质'
|
|
832
|
+
) {
|
|
833
|
+
let http = new HttpResetClass()
|
|
834
|
+
let condition = "f_orgid = '" + Vue.user.orgid + "'"
|
|
835
|
+
let res = await http.load('POST','rs/sql/singleTable',{data:{tablename:'t_stairprice',condition:condition}}, {resolveMsg: null, rejectMsg: null})
|
|
836
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
837
|
+
if (this.$refs.service_show.data.fields[i].label == '气价名称') {
|
|
838
|
+
let data = []
|
|
839
|
+
let array = []
|
|
840
|
+
data = res.data.map(item => {
|
|
841
|
+
return item.f_price_name;
|
|
842
|
+
})
|
|
843
|
+
for (let q = 0; q < data.length; q++) {
|
|
844
|
+
let arraydata = {
|
|
845
|
+
'label': data[q],
|
|
846
|
+
'value': data[q]
|
|
847
|
+
}
|
|
848
|
+
if (array.length != 0) {
|
|
849
|
+
for (let w = 0; w < array.length; w++) {
|
|
850
|
+
if (array[w].label == data[q]) {
|
|
851
|
+
break
|
|
852
|
+
}
|
|
853
|
+
while (w == array.length - 1) {
|
|
854
|
+
array.push(arraydata)
|
|
855
|
+
break
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
} else {
|
|
859
|
+
array.push(arraydata)
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
863
|
+
console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
864
|
+
console.log("有没有数据长度:" + this.$refs.service_show.data.fields[i].value.length)
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
if (this.$refs.service_show.data.fields[i].label == '气价名称' && this.$refs.service_show.data.fields[i].value.length != 0) {
|
|
868
|
+
let http2 = new HttpResetClass()
|
|
869
|
+
let condition2 = "s.f_orgid = '" + Vue.user.orgid + "'" + " and s.f_price_name = '" + this.$refs.service_show.data.fields[i].value + "'"
|
|
870
|
+
let res2 = await http2.load('POST','rs/sql/searchGasPrice',{data:{condition:condition2}}, {resolveMsg: null, rejectMsg: null})
|
|
871
|
+
console.log("气价数据:" + JSON.stringify(res2.data))
|
|
872
|
+
for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
|
|
873
|
+
if (this.$refs.service_show.data.fields[j].label == '气价类型') {
|
|
874
|
+
console.log("气价类型:" + res2.data[0])
|
|
875
|
+
console.log("气价类型1:" + res2.data[0].f_price_type)
|
|
876
|
+
this.$refs.service_show.data.fields[j].value = res2.data[0].f_price_type
|
|
877
|
+
console.log("气价类型2:" + this.$refs.service_show.data.fields[j].value)
|
|
878
|
+
}
|
|
879
|
+
//气价拼接
|
|
880
|
+
if (this.$refs.service_show.data.fields[j].label == '价格') {
|
|
881
|
+
let p = 1
|
|
882
|
+
let resultPrice = ''
|
|
883
|
+
for(let l = 0; l < res2.data.length; l++){
|
|
884
|
+
resultPrice = resultPrice + res2.data[l].price + ' |'
|
|
885
|
+
if (p == 3) {
|
|
886
|
+
break
|
|
887
|
+
}
|
|
888
|
+
p++
|
|
889
|
+
}
|
|
890
|
+
console.log("拼接的价格:" + resultPrice)
|
|
891
|
+
this.$refs.service_show.data.fields[j].value = resultPrice
|
|
892
|
+
}
|
|
893
|
+
if (this.$refs.service_show.data.fields[j].label == '用气性质') {
|
|
894
|
+
this.$refs.service_show.data.fields[j].value = res2.data[0].f_gasproperties
|
|
895
|
+
}
|
|
896
|
+
if (this.$refs.service_show.data.fields[j].label == '客户类型') {
|
|
897
|
+
this.$refs.service_show.data.fields[j].value = res2.data[0].f_user_type
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
914
|
+
//所属公司
|
|
915
|
+
if (this.selectdata.defname == '用户建档') {
|
|
916
|
+
if (this.$refs.service_show.data.fields[i].label === '所属公司') {
|
|
917
|
+
this.$refs.service_show.data.fields[i].value = Vue.user.orgs
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
// 气表品牌
|
|
921
|
+
if (
|
|
922
|
+
this.$refs.service_show.data.fields[i].label === '气表品牌' ||
|
|
923
|
+
this.$refs.service_show.data.fields[i].label === '气表型号'
|
|
924
|
+
) {
|
|
925
|
+
if (this.$refs.service_show.data.fields[i].label == '气表品牌') {
|
|
926
|
+
let http = new HttpResetClass()
|
|
927
|
+
let condition = "f_orgid = '" + Vue.user.orgid + "'"
|
|
928
|
+
let res = await http.load('POST','rs/sql/applysingleTable',{data:{tablename:'t_gasbrand',condition:condition}}, {resolveMsg: null, rejectMsg: null})
|
|
929
|
+
for (let p = 0; p < this.$refs.service_show.data.fields.length; p++) {
|
|
930
|
+
if (this.$refs.service_show.data.fields[p].label == '气表品牌') {
|
|
931
|
+
let data = []
|
|
932
|
+
let array = []
|
|
933
|
+
data = res.data.map(item => {
|
|
934
|
+
return item.f_meter_brand;
|
|
935
|
+
})
|
|
936
|
+
for (let q = 0; q < data.length; q++) {
|
|
937
|
+
let arraydata = {
|
|
938
|
+
'label': data[q],
|
|
939
|
+
'value': data[q]
|
|
940
|
+
}
|
|
941
|
+
if (array.length != 0) {
|
|
942
|
+
for (let w = 0; w < array.length; w++) {
|
|
943
|
+
if (array[w].label == data[q]) {
|
|
944
|
+
break
|
|
945
|
+
}
|
|
946
|
+
while (w == array.length - 1) {
|
|
947
|
+
array.push(arraydata)
|
|
948
|
+
break
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
} else {
|
|
952
|
+
array.push(arraydata)
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
956
|
+
console.log("气表品牌选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
if (this.$refs.service_show.data.fields[i].label == '气表品牌' && this.$refs.service_show.data.fields[i].value.length != 0) {
|
|
963
|
+
let style = this.$refs.service_show.data.fields[i].value
|
|
964
|
+
for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
|
|
965
|
+
|
|
966
|
+
if (this.$refs.service_show.data.fields[j].label == '气表型号') {
|
|
967
|
+
let http2 = new HttpResetClass()
|
|
968
|
+
let res2 = await http2.load('POST','rs/sql/queryGasType',{data:{f_orgid:Vue.user.orgid,f_meter_brand:style}}, {resolveMsg: null, rejectMsg: null})
|
|
969
|
+
console.log("气表型号查询数据" + JSON.stringify(res2.data))
|
|
970
|
+
let data = []
|
|
971
|
+
let data2 = []
|
|
972
|
+
let array = []
|
|
973
|
+
data = res2.data.map(item => {
|
|
974
|
+
return item.f_meter_style;
|
|
975
|
+
})
|
|
976
|
+
data2 = res2.data.map(item => {
|
|
977
|
+
return item.f_type;
|
|
978
|
+
})
|
|
979
|
+
console.log("是不是来过这儿1")
|
|
980
|
+
for (let q = 0; q < data.length; q++) {
|
|
981
|
+
let arraydata = {
|
|
982
|
+
'label': data[q] + data2[q],
|
|
983
|
+
'value': data[q] + data2[q]
|
|
984
|
+
}
|
|
985
|
+
let then = data[q] + data2[q]
|
|
986
|
+
if (array.length != 0) {
|
|
987
|
+
for (let w = 0; w < array.length; w++) {
|
|
988
|
+
if (array[w].label == then) {
|
|
989
|
+
break
|
|
990
|
+
}
|
|
991
|
+
while (w == array.length - 1) {
|
|
992
|
+
array.push(arraydata)
|
|
993
|
+
break
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
} else {
|
|
997
|
+
array.push(arraydata)
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
this.$refs.service_show.data.fields[j].options = array
|
|
1001
|
+
console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[j].options))
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
//调压箱获取
|
|
1008
|
+
if (
|
|
1009
|
+
this.selectdata.defname == '气表安装'
|
|
1010
|
+
) {
|
|
1011
|
+
let http = new HttpResetClass()
|
|
1012
|
+
let condition = "f_filialeid = '" + Vue.user.orgid + "'"
|
|
1013
|
+
let res = await http.load('POST','rs/sql/singleTable',{data:{tablename:'t_adjustablebox',condition:condition}}, {resolveMsg: null, rejectMsg: null})
|
|
1014
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1015
|
+
if (this.$refs.service_show.data.fields[i].label === '调压箱') {
|
|
1016
|
+
let data = []
|
|
1017
|
+
let array = []
|
|
1018
|
+
data = res.data.map(item => {
|
|
1019
|
+
return item.f_adjustable_name;
|
|
1020
|
+
})
|
|
1021
|
+
for (let q = 0; q < data.length; q++) {
|
|
1022
|
+
let arraydata = {
|
|
1023
|
+
'label': data[q],
|
|
1024
|
+
'value': data[q]
|
|
1025
|
+
}
|
|
1026
|
+
if (array.length != 0) {
|
|
1027
|
+
for (let w = 0; w < array.length; w++) {
|
|
1028
|
+
if (array[w].label == data[q]) {
|
|
1029
|
+
break
|
|
1030
|
+
}
|
|
1031
|
+
while (w == array.length - 1) {
|
|
1032
|
+
array.push(arraydata)
|
|
1033
|
+
break
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
} else {
|
|
1037
|
+
array.push(arraydata)
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
1041
|
+
console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
// console.log("this.selectdata:" + JSON.stringify(this.selectdata))
|
|
1050
|
+
// 合成地址
|
|
1051
|
+
if (
|
|
1052
|
+
this.$refs.service_show.data.fields[index].label === '区域' ||
|
|
1053
|
+
// this.$refs.service_show.data.fields[index].label === '片区' ||
|
|
1054
|
+
// this.$refs.service_show.data.fields[index].label === '街道名称' ||
|
|
1055
|
+
this.$refs.service_show.data.fields[index].label === '街道' ||
|
|
1056
|
+
// this.$refs.service_show.data.fields[index].label === '小区/单位' ||
|
|
1057
|
+
this.$refs.service_show.data.fields[index].label === '小区' ||
|
|
1058
|
+
this.$refs.service_show.data.fields[index].label === '楼号' ||
|
|
1059
|
+
this.$refs.service_show.data.fields[index].label === '单元号' ||
|
|
1060
|
+
this.$refs.service_show.data.fields[index].label === '楼层' ||
|
|
1061
|
+
this.$refs.service_show.data.fields[index].label === '门牌号'
|
|
1062
|
+
) {
|
|
1063
|
+
console.log('即将合成地址')
|
|
1064
|
+
var address = ''
|
|
1065
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1066
|
+
// 控制设置级联
|
|
1067
|
+
// 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
|
|
1068
|
+
// xxx xx xxx
|
|
1069
|
+
if (this.$refs.service_show.data.fields[i].label === '区域' && this.$refs.service_show.data.fields[i].value) {
|
|
1070
|
+
// let f_area = res.data.f_area
|
|
1071
|
+
// this.$refs.service_show.data.fields[i].value = f_area
|
|
1072
|
+
address += this.$refs.service_show.data.fields[i].value
|
|
1073
|
+
}
|
|
1074
|
+
// if (this.$refs.service_show.data.fields[i].label === '片区' && this.$refs.service_show.data.fields[i].value) {
|
|
1075
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1076
|
+
// }
|
|
1077
|
+
// if (this.$refs.service_show.data.fields[i].label === '街道名称' && this.$refs.service_show.data.fields[i].value) {
|
|
1078
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1079
|
+
// }
|
|
1080
|
+
if (this.$refs.service_show.data.fields[i].label === '街道' && this.$refs.service_show.data.fields[i].value) {
|
|
1081
|
+
// let f_street = res.data.f_street
|
|
1082
|
+
// this.$refs.service_show.data.fields[i].value = f_street
|
|
1083
|
+
address += this.$refs.service_show.data.fields[i].value
|
|
1084
|
+
}
|
|
1085
|
+
// if (this.$refs.service_show.data.fields[i].label === '小区/单位' && this.$refs.service_show.data.fields[i].value) {
|
|
1086
|
+
// address += this.$refs.service_show.data.fields[i].value
|
|
1087
|
+
// }
|
|
1088
|
+
if (this.$refs.service_show.data.fields[i].label === '小区' && this.$refs.service_show.data.fields[i].value) {
|
|
1089
|
+
// let f_residential_area = res.data.f_residential_area
|
|
1090
|
+
// this.$refs.service_show.data.fields[i].value = f_residential_area
|
|
1091
|
+
address += this.$refs.service_show.data.fields[i].value
|
|
1092
|
+
}
|
|
1093
|
+
if (this.$refs.service_show.data.fields[i].label === '楼号' && this.$refs.service_show.data.fields[i].value) {
|
|
1094
|
+
// let f_building = res.data.f_building
|
|
1095
|
+
// this.$refs.service_show.data.fields[i].value = f_building
|
|
1096
|
+
address += ' ' + this.$refs.service_show.data.fields[i].value
|
|
1097
|
+
}
|
|
1098
|
+
if (this.$refs.service_show.data.fields[i].label === '单元号' && this.$refs.service_show.data.fields[i].value) {
|
|
1099
|
+
// let f_unit = res.data.f_unit
|
|
1100
|
+
// this.$refs.service_show.data.fields[i].value = f_unit
|
|
1101
|
+
address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1102
|
+
}
|
|
1103
|
+
if (this.$refs.service_show.data.fields[i].label === '楼层' && this.$refs.service_show.data.fields[i].value) {
|
|
1104
|
+
// let f_floor = res.data.f_floor
|
|
1105
|
+
// this.$refs.service_show.data.fields[i].value = f_floor
|
|
1106
|
+
address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1107
|
+
}
|
|
1108
|
+
if (this.$refs.service_show.data.fields[i].label === '门牌号' && this.$refs.service_show.data.fields[i].value) {
|
|
1109
|
+
// let f_room = res.data.f_room
|
|
1110
|
+
// this.$refs.service_show.data.fields[i].value = f_room
|
|
1111
|
+
address += '-' + this.$refs.service_show.data.fields[i].value
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
}
|
|
1115
|
+
console.log('获取到的address=>' + address)
|
|
1116
|
+
// 数据获取完毕时放入地址text
|
|
1117
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1118
|
+
if (this.$refs.service_show.data.fields[i].label === '地址') {
|
|
1119
|
+
this.$refs.service_show.data.fields[i].value = address
|
|
1120
|
+
console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[i].value)
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
//开户费+材料费+人工费+设备安装费=合计
|
|
1125
|
+
if (this.$refs.service_show.data.fields[index].label === '开户费' ||
|
|
1126
|
+
this.$refs.service_show.data.fields[index].label === '材料费' ||
|
|
1127
|
+
this.$refs.service_show.data.fields[index].label === '人工费' ||
|
|
1128
|
+
this.$refs.service_show.data.fields[index].label === '设备安装费') {
|
|
1129
|
+
let fee = 0
|
|
1130
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1131
|
+
if (this.$refs.service_show.data.fields[index].label === '开户费' ||
|
|
1132
|
+
this.$refs.service_show.data.fields[index].label === '材料费' ||
|
|
1133
|
+
this.$refs.service_show.data.fields[index].label === '人工费' ||
|
|
1134
|
+
this.$refs.service_show.data.fields[index].label === '设备安装费') {
|
|
1135
|
+
fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1136
|
+
}
|
|
1137
|
+
if (this.$refs.service_show.data.fields[index].label === '合计') {
|
|
1138
|
+
this.$refs.service_show.data.fields[index].value = fee
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
}
|
|
1143
|
+
if (this.selectdata.defname != '完工') {
|
|
1144
|
+
this.selectdata.f_sub_state = '正在进行'
|
|
1145
|
+
}
|
|
1146
|
+
if (this.selectdata.defname == '送气') {
|
|
1147
|
+
this.selectdata.f_sub_state = '完工'
|
|
1148
|
+
}
|
|
1149
|
+
if (this.selectdata.defname === '用户受理') {
|
|
1150
|
+
let http = new HttpResetClass()
|
|
1151
|
+
let condition = "f_filialeid = " + Vue.user.orgid
|
|
1152
|
+
let res = await http.load('POST','rs/sql/singleTable',{data:{tablename:'t_area',condition:condition}}, {resolveMsg: null, rejectMsg: null})
|
|
1153
|
+
for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1154
|
+
if (this.$refs.service_show.data.fields[i].label == '区域') {
|
|
1155
|
+
let data = []
|
|
1156
|
+
let array = []
|
|
1157
|
+
data = res.data.map(item => {
|
|
1158
|
+
return item.f_pcd;
|
|
1159
|
+
})
|
|
1160
|
+
for (let q = 0; q < data.length; q++) {
|
|
1161
|
+
let arraydata = {
|
|
1162
|
+
'label': data[q],
|
|
1163
|
+
'value': data[q]
|
|
1164
|
+
}
|
|
1165
|
+
if (array.length != 0) {
|
|
1166
|
+
for (let w = 0; w < array.length; w++) {
|
|
1167
|
+
if (array[w].label == data[q]) {
|
|
1168
|
+
break
|
|
1169
|
+
}
|
|
1170
|
+
while (w == array.length - 1) {
|
|
1171
|
+
array.push(arraydata)
|
|
1172
|
+
break
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
} else {
|
|
1176
|
+
array.push(arraydata)
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
1180
|
+
console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1181
|
+
}
|
|
1182
|
+
if (this.$refs.service_show.data.fields[i].label == '街道') {
|
|
1183
|
+
let data = []
|
|
1184
|
+
let array = []
|
|
1185
|
+
data = res.data.map(item => {
|
|
1186
|
+
return item.f_street;
|
|
1187
|
+
})
|
|
1188
|
+
for (let q = 0; q < data.length; q++) {
|
|
1189
|
+
let arraydata = {
|
|
1190
|
+
'label': data[q],
|
|
1191
|
+
'value': data[q]
|
|
1192
|
+
}
|
|
1193
|
+
if (array.length != 0) {
|
|
1194
|
+
for (let w = 0; w < array.length; w++) {
|
|
1195
|
+
if (array[w].label == data[q]) {
|
|
1196
|
+
break
|
|
1197
|
+
}
|
|
1198
|
+
while (w == array.length - 1) {
|
|
1199
|
+
array.push(arraydata)
|
|
1200
|
+
break
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
} else {
|
|
1204
|
+
array.push(arraydata)
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
1208
|
+
console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1209
|
+
}
|
|
1210
|
+
if (this.$refs.service_show.data.fields[i].label == '小区') {
|
|
1211
|
+
let data = []
|
|
1212
|
+
let array = []
|
|
1213
|
+
data = res.data.map(item => {
|
|
1214
|
+
return item.f_residential_area;
|
|
1215
|
+
})
|
|
1216
|
+
for (let q = 0; q < data.length; q++) {
|
|
1217
|
+
let arraydata = {
|
|
1218
|
+
'label': data[q],
|
|
1219
|
+
'value': data[q]
|
|
1220
|
+
}
|
|
1221
|
+
if (array.length != 0) {
|
|
1222
|
+
for (let w = 0; w < array.length; w++) {
|
|
1223
|
+
if (array[w].label == data[q]) {
|
|
1224
|
+
break
|
|
1225
|
+
}
|
|
1226
|
+
while (w == array.length - 1) {
|
|
1227
|
+
array.push(arraydata)
|
|
1228
|
+
break
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
} else {
|
|
1232
|
+
array.push(arraydata)
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
this.$refs.service_show.data.fields[i].options = array
|
|
1236
|
+
console.log("选择框数据:" + JSON.stringify(this.$refs.service_show.data.fields[i].options))
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
//报建类型
|
|
1241
|
+
// if (this.selectdata.defname === '用户申请' || this.selectdata.defname === '寻找市场') {
|
|
1242
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1243
|
+
// if (this.$refs.service_show.data.fields[i].label == '报建类型') {
|
|
1244
|
+
// this.$refs.service_show.data.fields[i].value = this.selectdata.f_applyinstall_type
|
|
1245
|
+
// }
|
|
1246
|
+
// }
|
|
1247
|
+
// }
|
|
1248
|
+
|
|
1249
|
+
// 维修费+服务费+工时费+其他费用=预算
|
|
1250
|
+
// console.log("即将进行预算------")
|
|
1251
|
+
// console.log("fields:"+JSON.stringify(this.$refs.service_show.data.fields))
|
|
1252
|
+
// if (this.$refs.service_show.data.fields[index].label === '维修费' ||
|
|
1253
|
+
// this.$refs.service_show.data.fields[index].label === '服务费' ||
|
|
1254
|
+
// this.$refs.service_show.data.fields[index].label === '工时费' ||
|
|
1255
|
+
// this.$refs.service_show.data.fields[index].label === '其他费用' ||
|
|
1256
|
+
// this.$refs.service_show.data.fields[index].label === '预算') {
|
|
1257
|
+
// let fee = 0
|
|
1258
|
+
// console.log("即将预算算法------")
|
|
1259
|
+
// for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
|
|
1260
|
+
// if (this.$refs.service_show.data.fields[i].label === '维修费' ||
|
|
1261
|
+
// this.$refs.service_show.data.fields[i].label === '服务费' ||
|
|
1262
|
+
// this.$refs.service_show.data.fields[i].label === '工时费' ||
|
|
1263
|
+
// this.$refs.service_show.data.fields[i].label === '其他费用') {
|
|
1264
|
+
// console.log("开始计算------")
|
|
1265
|
+
// console.log('费用' + Number(this.$refs.service_show.data.fields[i].value))
|
|
1266
|
+
// fee += Number(this.$refs.service_show.data.fields[i].value)
|
|
1267
|
+
// console.log("fee:"+fee)
|
|
1268
|
+
//
|
|
1269
|
+
// }
|
|
1270
|
+
// // console.log("i:"+i)
|
|
1271
|
+
// // console.log("fields:"+this.$refs.service_show.data.fields[index].label)
|
|
1272
|
+
// // if (this.$refs.service_show.data.fields[index].label === '维修费') {
|
|
1273
|
+
// // console.log("维修费"+this.$refs.service_show.data.fields[index].value)
|
|
1274
|
+
// // fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1275
|
+
// // console.log("维修费的预算:" + fee)
|
|
1276
|
+
// // }
|
|
1277
|
+
// // if (this.$refs.service_show.data.fields[index].label === '服务费' && this.$refs.service_show.data.fields[index].value) {
|
|
1278
|
+
// // fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1279
|
+
// // }
|
|
1280
|
+
// // if (this.$refs.service_show.data.fields[index].label === '工时费' && this.$refs.service_show.data.fields[index].value) {
|
|
1281
|
+
// // fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1282
|
+
// // }
|
|
1283
|
+
// // if (this.$refs.service_show.data.fields[index].label === '其他费用' && this.$refs.service_show.data.fields[index].value) {
|
|
1284
|
+
// // fee += Number(this.$refs.service_show.data.fields[index].value)
|
|
1285
|
+
// // }
|
|
1286
|
+
// if (this.$refs.service_show.data.fields[index].label === '预算') {
|
|
1287
|
+
// console.log("合成的预算:" + fee)
|
|
1288
|
+
// console.log("this",this.show_data)
|
|
1289
|
+
// this.$refs.service_show.data.fields[index].value = fee
|
|
1290
|
+
// }
|
|
1291
|
+
// }
|
|
1292
|
+
//
|
|
1293
|
+
// }
|
|
1294
|
+
},
|
|
1295
|
+
// 获取view层button事件
|
|
1296
|
+
async 'button'(model){
|
|
1297
|
+
console.log('进入async button事件方法')
|
|
1298
|
+
var delteLocal = true
|
|
1299
|
+
// 点击保存与重置按钮不需要修改本地工单状态
|
|
1300
|
+
if(model.button.button_name == '保存' || model.button.button_name==='重置'){
|
|
1301
|
+
delteLocal = false
|
|
1302
|
+
}
|
|
1303
|
+
// 点击重置按钮就重置数据
|
|
1304
|
+
if(model.button.button_name==='重置'){
|
|
1305
|
+
this.initializtion()
|
|
1306
|
+
return
|
|
1307
|
+
}
|
|
1308
|
+
if(model.button.button_name==='下发'){
|
|
1309
|
+
let person_name = model.button.button_fields[this.show_data.buttons[model.button.button_index].button_fields[0].field]
|
|
1310
|
+
for(let i=0;i<this.department_search.length;i++){
|
|
1311
|
+
// 找到人名为person_name 的人,然后把人名换成id
|
|
1312
|
+
if(this.department_search[i].name === person_name){
|
|
1313
|
+
model.button.button_fields[this.show_data.buttons[model.button.button_index].button_fields[0].field] = this.department_search[i].id
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
console.log("button事件接收参数model=>" + JSON.stringify(model))
|
|
1318
|
+
model=Object.assign({},this.selectdata,model)
|
|
1319
|
+
console.log('合并selectdata与model后的model=>' + JSON.stringify(model))
|
|
1320
|
+
let http = new HttpResetClass()
|
|
1321
|
+
var url = this.$androidUtil.getProxyUrl() + '/rs/logic/ApplyProductService'
|
|
1322
|
+
// let res = await http.load('POST',url,{data:{tables:this.data.tables,start_activity:this.$workflow_vue.start_activity,model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: null})
|
|
1323
|
+
// // 先判断是否包含code,如果服务端异常,可能不存在code
|
|
1324
|
+
// console.log("service处理完成返回数据=>" + res)
|
|
1325
|
+
// if(!res.code){
|
|
1326
|
+
// console.log("service处理完成返回数据=>" + res)
|
|
1327
|
+
// this.$showMessage('操作异常,原因:' + res)
|
|
1328
|
+
// }else{
|
|
1329
|
+
// console.log("service处理完成返回数据=>" + JSON.stringify(res))
|
|
1330
|
+
// if(res.code = 200){
|
|
1331
|
+
// this.showview = false
|
|
1332
|
+
// // 特殊处理
|
|
1333
|
+
// this.special(model)
|
|
1334
|
+
// this.$dispatch('close')
|
|
1335
|
+
// this.initializtion()
|
|
1336
|
+
// this.$showMessage('操作成功')
|
|
1337
|
+
// }else{
|
|
1338
|
+
// this.$showMessage('操作失败,原因:' + res.data.msg)
|
|
1339
|
+
// }
|
|
1340
|
+
// }
|
|
1341
|
+
let btn = btn_operate(this, url, http, model, delteLocal)
|
|
1342
|
+
co(btn)
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
watch:{
|
|
1346
|
+
// 监听selectdata的变化
|
|
1347
|
+
'selectdata'() {
|
|
1348
|
+
console.log('进入selectdata改变事件data=>' + JSON.stringify(this.selectdata))
|
|
1349
|
+
this.refurbish()
|
|
1350
|
+
},
|
|
1351
|
+
deep:true
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
let btn_operate = function * (self, url, http, model, delteLocal) {
|
|
1356
|
+
// 下发,提交,保存,退回都在后台处理
|
|
1357
|
+
console.log('即将请求后台url=>' + url)
|
|
1358
|
+
for (const selfKey in model) {
|
|
1359
|
+
if(model[selfKey]=="null"){
|
|
1360
|
+
delete model[selfKey]
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
}
|
|
1364
|
+
model.employeetemplate=''
|
|
1365
|
+
http.load('POST',url,{data:{employeetemplate:'',tables:self.data.tables,start_activity:self.$workflow_vue.start_activity,model:model,loginUser:Vue.user}}, {resolveMsg: null, rejectMsg: null})
|
|
1366
|
+
.then((res) => {
|
|
1367
|
+
console.log(JSON.stringify(res))
|
|
1368
|
+
if(res.code = 200){
|
|
1369
|
+
self.showview = false
|
|
1370
|
+
// 如果需要删除本地记录则去删除
|
|
1371
|
+
if(delteLocal){
|
|
1372
|
+
self.deleteLocalApply(model)
|
|
1373
|
+
}
|
|
1374
|
+
// 特殊处理
|
|
1375
|
+
self.special(model)
|
|
1376
|
+
self.$dispatch('confirm')
|
|
1377
|
+
self.initializtion()
|
|
1378
|
+
self.$showMessage('操作成功')
|
|
1379
|
+
}else{
|
|
1380
|
+
self.$showMessage('操作失败,原因:' + res.data.msg)
|
|
1381
|
+
}
|
|
1382
|
+
})
|
|
1383
|
+
.catch((ret) => {
|
|
1384
|
+
self.$showMessage('操作异常,原因:' + JSON.stringify(ret.data))
|
|
1385
|
+
})
|
|
1386
|
+
}
|
|
1387
|
+
</script>
|