apply-clients 5.0.36-2 → 5.0.37-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.
@@ -1,559 +1,559 @@
1
- <template>
2
- <show-back-reason v-if="selectdata.f_back_reason && selectdata.f_back_reason!=''"
3
- :data="show_data"></show-back-reason>
4
- <!--<gas-stop v-if="selectdata.defname == '停气碰口'"></gas-stop>-->
5
- <material-message v-if="selectdata.defname=='材料导入'" v-ref:material
6
- :selectdata="selectdata"
7
- :state="2"
8
- :edit="true"></material-message>
9
- <material-message v-if="selectdata.defname=='材料审核'" v-ref:material
10
- :selectdata="selectdata"
11
- :state="1"
12
- :edit="true"></material-message>
13
- <receive-batch v-if="selectdata.defname == '派工单'" :selectdata="selectdata" v-ref:receivebatch></receive-batch>
14
- <project-settlement v-if="selectdata.defname == '工程结算'" :selectdata="selectdata"></project-settlement>
15
- <!-- <installfee :infee="selectdata" :showfee='true' v-if="selectdata.defname == '通气条件确认'"></installfee>-->
16
- <buyer-message v-ref:buyermessagev :selectdata="selectdata" :state="1"
17
- v-if="selectdata.defname == '收费'"></buyer-message>
18
- <installfee :infee="selectdata" v-if="selectdata.defname == '收费'"></installfee>
19
- <service-view v-ref:service_show :data="data" v-if="showview"></service-view>
20
- </template>
21
- <script>
22
- import {HttpResetClass} from 'vue-client'
23
- import Vue from "vue";
24
- export default {
25
- title: '报建监控控制层',
26
- props: ['selectdata'],
27
- data() {
28
- return {
29
- data: null, // 展示的数据
30
- json_datas: null, // json配置数据结构
31
- showview: false // 控制显示层显示
32
- }
33
- },
34
- methods: {
35
- getmodel(){
36
- return this.$refs.service_show.getmodel()
37
- },
38
- // json配置数据处理 比如下拉框的options
39
- async initializtion() {
40
- // onetomany 数据获取
41
- if (this.data.onetomany) {
42
- console.log('判断是onetomany,this.data.onetomany的数据为=>' + JSON.stringify(this.data.onetomany))
43
- for (let index = 0; index < this.data.onetomany.length; index++) {
44
- let http = new HttpResetClass()
45
- let data = {}
46
- if (this.data.onetomany[index].tables[0] == 't_charge_record') {
47
- data = {
48
- tablename: this.data.onetomany[index].tables[0],
49
- condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}' and f_charging_status != '作废'`
50
- }
51
- } else {
52
- data = {
53
- tablename: this.data.onetomany[index].tables[0],
54
- condition: `f_process_id='${this.selectdata.f_process_id}'`
55
- }
56
- }
57
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
58
- resolveMsg: null,
59
- rejectMsg: 'onetomany查询失败'
60
- })
61
- // 初始化 onetomany
62
- let rows = []
63
- console.log('查询返回结果res.data=>' + JSON.stringify(res.data))
64
- this.data.onetomany[index].rows = res.data
65
- // console.log(JSON.stringify('this.data.onetomany[index].rows=>' + JSON.stringify(this.data.onetomany[index].rows)))
66
-
67
- // 初始化onetomany中的fields
68
- for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
69
- // 如果配置类型为select,优先从参数列表获取options
70
- if (this.data.onetomany[index].fields[j].type === 'select') {
71
- let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
72
- if (temp && temp.length > 0) {
73
- this.data.onetomany[index].fields[j].options = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
74
- }
75
- }
76
- }
77
- }
78
- }
79
- // selectdata 填充 data
80
- if (this.selectdata.f_survey_name) {
81
- let buyerinfos = []
82
- var numReg = /^[0-9]+$/
83
- var numRe = new RegExp(numReg)
84
- if (numRe.test(this.selectdata.f_survey_name)) {
85
- let querydata = {
86
- tablename: 't_user',
87
- condition: `id = ${this.selectdata.f_survey_name}`
88
- }
89
- buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
90
- resolveMsg: null,
91
- rejectMsg: '获取人员失败'
92
- })
93
- this.selectdata.f_survey_name = {
94
- id:buyerinfos.data[0].id,
95
- name:buyerinfos.data[0].name
96
- }
97
- }
98
- }
99
-
100
- this.data = Object.assign({}, this.data, this.selectdata)
101
- for (let i = 0; i < this.data.fields.length; i++) {
102
-
103
- /**
104
- * 增加需求: 流程监控想要能下拉选择县区
105
- * updateTime:2020.07.23
106
- */
107
- if (this.data.fields[i].label == '县/区') {
108
- let area = await this.$resetpost('rs/sql/singleTable', {
109
- data: {
110
- // items: 'f_bill_url,f_url_code',
111
- tablename: 't_pcd',
112
- condition: `f_filialeids = '${this.$login.f.f_orgids}'`
113
- }
114
- }, {resolveMsg: null, rejectMsg: null})
115
- let rs = []
116
- for (let i = 0; i < area.data.length; i++) {
117
- let temp = {
118
- label: area.data[i].f_pcd,
119
- value: area.data[i].f_pcd
120
- }
121
- rs.push(temp)
122
- }
123
- this.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
124
- }
125
-
126
-
127
- if (this.selectdata[this.data.fields[i].field]) {
128
- this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
129
- }
130
-
131
- if (typeof this.data.fields[i].value === 'string' && this.data.fields[i].value.startsWith("{") && this.data.fields[i].value.endsWith("}")) {
132
- this.data.fields[i].value = JSON.parse(this.data.fields[i].value)
133
- }
134
- this.data.fields[i].readonly = true
135
- this.data.fields[i].disabled = true
136
- if(this.$login.r.find(value => value == '报建流程修改') && this.$login.r.includes('报建流程修改')){
137
- this.data.fields[i].readonly = false
138
- this.data.fields[i].disabled = false
139
- }
140
- if(this.$login.r.find(value => value == '集体报建流程修改') && this.$login.r.includes('报建流程修改')){
141
- this.data.fields[i].readonly = false
142
- this.data.fields[i].disabled = false
143
- }
144
- if(this.data.fields[i].label=='合同总金额'){
145
- console.log("合同总金额修改");
146
- if(this.$login.r.includes('合同金额修改')){
147
- this.data.fields[i].readonly = false
148
- this.data.fields[i].disabled = false
149
- }
150
- }
151
- if(this.data.fields[i].label=='费用合计'){
152
- console.log("费用合计修改");
153
- if(this.$login.r.includes('合同金额修改')){
154
- this.data.fields[i].readonly = false
155
- this.data.fields[i].disabled = false
156
- }
157
- }
158
- }
159
- this.data.buttons = null
160
- if( this.$login.r.find(value => value == '报建流程修改') ){
161
- // 仅留保存按钮
162
- this.data.buttons = [
163
- {
164
- "button_name": "保存"
165
- }
166
- ]
167
- }
168
- if(this.$login.r.includes('集体报建流程修改')){
169
- // 仅留保存按钮
170
- this.data.buttons = [
171
- {
172
- "button_name": "保存"
173
- }
174
- ]
175
- }
176
- }
177
- },
178
- events:{
179
- 'getmodel'(){
180
- return this.$refs.service_show.getmodel()
181
- },
182
- async 'onetomanydelete'(i, j) {
183
- let http = new HttpResetClass()
184
- let data = {
185
- tables: this.$refs.service_show.data.onetomany[i].tables,
186
- row: this.$refs.service_show.model.rows[i][j]
187
- }
188
- await http.load('POST', 'rs/logic/applyDeleteValue', {data: data}, {
189
- resolveMsg: null,
190
- rejectMsg: 'onetomanydelete失败'
191
- }).then(() => {
192
- this.$dispatch('selfsearch')
193
- this.$refs.service_show.model.rows[i].splice(j, 1)
194
- })
195
- },
196
- //获取view层confirm事件
197
- async 'confirm'(tables, row, showadd_index, j) {
198
- debugger
199
- var _this = this
200
- for (let i = 0; i < tables.length; i++) {
201
- let datas = {
202
- tables: tables,
203
- row: row
204
- }
205
- console.log("看看datas")
206
- console.log(datas)
207
- console.log("看看showadd_index")
208
- console.log(showadd_index)
209
- datas.row['f_process_id'] = this.selectdata.f_process_id
210
- datas.row['f_apply_num'] = this.selectdata.f_apply_num
211
- datas.row['f_filiale'] = this.selectdata.f_filiale
212
- let http = new HttpResetClass()
213
- let sellid = ''
214
- let billtype = datas.row['f_bill_style']
215
- if (tables[i] == 't_charge_record') {
216
- await this.loadbuyer()
217
- if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是') {
218
- this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费', 'info', 2000)
219
- this.$refs.service_show.model.rows[showadd_index].splice(j, 1)
220
- this.$refs.service_show.initializtion()
221
- return
222
- }
223
- datas.row.f_charging_status = '有效'
224
- datas.row.f_is_correct = '否'
225
- datas.row.f_charge_collectors = this.$login.f.name
226
- datas.row.f_amount_words=this.smalltoBIG(datas.row.f_charge_money)
227
- await http.load('POST', 'rs/logic/applycharge', datas, {
228
- resolveMsg: null,
229
- rejectMsg: '收费保存失败'
230
- }).then((res) => {
231
- sellid = JSON.parse(res.data.sellid).id
232
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
233
- //
234
- // if (this.$refs.service_show.data.fields[i].label == '累计缴费金额') {
235
- // this.$refs.service_show.data.fields[i].value = res.data.f_cumulative_money
236
- // }
237
- //
238
- // if (this.$refs.service_show.data.fields[i].label == '未结总金额') {
239
- // this.$refs.service_show.data.fields[i].value = res.data.f_unaccounts_money
240
- // }
241
-
242
- }
243
- let temp = _this.$refs.service_show.model.rows[showadd_index][j]
244
- temp.id = sellid
245
- _this.$refs.service_show.model.rows[showadd_index][j] = temp
246
- })
247
- if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是') {
248
- this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
249
- if (res === 'confirm') {
250
- console.log('打印票据')
251
- if (billtype === '增值税电子发票') {
252
- this.selectsellid = sellid
253
- this.showbuyerinfo = true
254
- } else {
255
- this.printbill(sellid)
256
- }
257
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
258
- if (this.$refs.service_show.data.fields[i].label == '累计开票金额') {
259
- console.log("计算累计开票金额")
260
- this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[i].value) + this.datas.row.f_cumulative_invoicing
261
- }
262
- }
263
- }
264
- })
265
- }
266
- // 刷新列表数据
267
- console.log("刷新一下")
268
- this.$dispatch('selfsearch')
269
- console.log("刷新完成")
270
- } else {
271
- debugger
272
- await http.load('POST', 'rs/logic/saveentity', datas, {
273
- resolveMsg: null,
274
- rejectMsg: 'onetomany保存失败'
275
- }).then((res) => {
276
- // 刷新列表数据
277
- this.$dispatch('selfsearch')
278
- let temp = _this.$refs.service_show.model.rows[showadd_index][j]
279
- temp.id = res.data.id
280
- _this.$refs.service_show.model.rows[showadd_index][j] = temp
281
- })
282
- }
283
- }
284
- },
285
- // 获取view层button事件/
286
- async 'button'(model) {
287
- let http = new HttpResetClass()
288
- // 下发,提交,保存,退回通用业务后台处理logic
289
- let url = 'rs/logic/ApplyProductService'
290
- model.id = this.selectdata.appid
291
- let requestData = {
292
- tables: this.data.tables,
293
- model: model,
294
- isedit: true
295
- }
296
- requestData.loginUser = this.$login.f
297
- console.log('即将发送请求url=>' + url + ',参数=>' + JSON.stringify(requestData))
298
- let res = res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
299
- console.log("service处理完成返回数据:", JSON.stringify(res.data))
300
- if (res.data.code == 200) {
301
- this.$dispatch('close')
302
- } else {
303
- if (res.data.msg) {
304
- this.$showMessage(res.data.msg)
305
- }
306
- }
307
- },
308
- 'checkboxSelectControl'(index,index2){
309
- console.log("chufa事件control");
310
- console.log('this.$refs.service_show.data.fields[index]==>:'+JSON.stringify(this.$refs.service_show.data.fields[index]));
311
- if(this.$refs.service_show.data.fields[index].label=="提交资料"){
312
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
313
-
314
- if(this.$refs.service_show.data.fields[i].label=="用户提交资料"){
315
- //if(this.$refs.service_show.data.fields[index].value == ""){
316
- console.log("this.$refs.service_show.data.fields[index].items[index2].value==>"+JSON.stringify(this.$refs.service_show.data.fields[index].items[index2]))
317
- //增加和删除框中的内容
318
- if(this.$refs.service_show.data.fields[index].items[index2].value == false){
319
- this.$refs.service_show.data.fields[i].value+=this.$refs.service_show.data.fields[index].items[index2].label+" ";
320
- this.$refs.service_show.data.fields[index].items[index2].value=true;
321
- }else{
322
- let deleteValue = this.$refs.service_show.data.fields[index].items[index2].label;
323
- let values =this.$refs.service_show.data.fields[i].value;
324
- let result = values.split(" ").filter((item)=>{
325
- return item!=deleteValue;
326
- }).join(" ")
327
- console.log(result);
328
- this.$refs.service_show.data.fields[i].value =result;
329
- this.$refs.service_show.data.fields[index].items[index2].value=false;
330
- }
331
- //}
332
- }
333
- }
334
- }
335
- },
336
- async 'select_cascade'(index){
337
- console.log("sdsdsdsdsdsdsdsdsdsdsdsdsdsd")
338
- if (this.$refs.service_show.data.fields[index].label == '工程安装费'||
339
- this.$refs.service_show.data.fields[index].label == '材料费'||
340
- this.$refs.service_show.data.fields[index].label == '人工费') {
341
- debugger
342
- let gcmoney = 0;
343
- let clmoney=0;
344
- let rgmoney=0;
345
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
346
-
347
- if (this.$refs.service_show.data.fields[i].label == '工程安装费') {
348
- gcmoney =this.$refs.service_show.data.fields[i].value
349
- }
350
- if (this.$refs.service_show.data.fields[i].label == '材料费') {
351
- clmoney = this.$refs.service_show.data.fields[i].value
352
- }
353
- if (this.$refs.service_show.data.fields[i].label == '人工费') {
354
- rgmoney = this.$refs.service_show.data.fields[i].value
355
- }
356
- if (this.$refs.service_show.data.fields[i].label === '费用合计') {
357
- this.$refs.service_show.data.fields[i].value = parseInt(gcmoney)+parseInt(clmoney)+parseInt(rgmoney);
358
- }
359
- }
360
- this.$refs.service_show.update()
361
-
362
- }
363
-
364
- if (this.$refs.service_show.data.fields[index].label == '合同总金额'){
365
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
366
- if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
367
- this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[index].value);
368
- }
369
- }
370
- }
371
-
372
- /**
373
- * 增加需求: 流程监控地址可以下拉选择
374
- * 2020.07.23
375
- */
376
- if (this.$refs.service_show.data.fields[index].label === '县/区') {
377
- let temp = this.$refs.service_show.data.fields[index].value
378
- console.log('==============================县/区:' + temp)
379
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
380
- // 控制设置级联
381
- // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
382
- if (this.$refs.service_show.data.fields[i].label === '街道名称') {
383
- // this.$refs.service_show.data.fields[i].value = ''
384
- let street = await this.$resetpost('rs/sql/singleTable', {
385
- data: {
386
- tablename: 't_street',
387
- condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_pcd='${temp}'`
388
- }
389
- }, {resolveMsg: null, rejectMsg: null})
390
- let streetrs = []
391
- for (let i = 0; i < street.data.length; i++) {
392
- let temp = {
393
- label: street.data[i].f_street,
394
- value: street.data[i].f_street
395
- }
396
- streetrs.push(temp)
397
- }
398
-
399
- this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
400
- //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
401
- // console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.data.fields[i].options)
402
-
403
- this.$refs.service_show.update()
404
- }
405
- }
406
- }
407
- /**
408
- * 增加需求: 流程监控地址可以下拉选择
409
- * 2020.07.23
410
- */
411
- if (this.$refs.service_show.data.fields[index].label === '街道名称') {
412
- let temp = this.$refs.service_show.data.fields[index].value
413
- console.log('=============================街道:' + temp)
414
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
415
- // 控制设置级联
416
- // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
417
- if (this.$refs.service_show.data.fields[i].label === '小区名称') {
418
- // this.$refs.service_show.data.fields[i].value = ''
419
-
420
- let area = await this.$resetpost('rs/sql/singleTable', {
421
- data: {
422
- tablename: 't_area',
423
- condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_street='${temp}'`
424
- }
425
- }, {resolveMsg: null, rejectMsg: null})
426
- let arears = []
427
- this.areaall=area.data;
428
- for (let i = 0; i < area.data.length; i++) {
429
- let temp = {
430
- label: area.data[i].f_residential_area,
431
- value: area.data[i].f_residential_area
432
- }
433
- arears.push(temp)
434
- }
435
- this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...arears]
436
- //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
437
- console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.$refs.service_show.data.fields[i].options)
438
-
439
- this.$refs.service_show.update()
440
-
441
- }
442
- }
443
- }
444
- /**
445
- * 增加需求: 流程监控地址可以下拉选择
446
- * 2020.07.23
447
- */
448
- if(this.$refs.service_show.data.fields[index].label === '小区名称'){
449
- for (let i = 0; i < this.areaall.length; i++) {
450
- console.log("aaaaaaaaaaaa")
451
- if(this.areaall[i].f_residential_area== this.$refs.service_show.data.fields[index].value){
452
- console.log("abbbbbbbbb")
453
- for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
454
- if(this.$refs.service_show.data.fields[j].label === '小区地址'){
455
- console.log(this.areaall[i].f_area_address)
456
- this.$refs.service_show.data.fields[j].value=this.areaall[i].f_area_address
457
- }
458
- }
459
- }
460
- }
461
- }
462
- /**
463
- * 增加需求: 流程监控地址可以下拉选择,
464
- * 2020.07.23
465
- */
466
- // 合成地址
467
- if (
468
- this.$refs.service_show.data.fields[index].label === '县/区' ||
469
- this.$refs.service_show.data.fields[index].label === '街道名称' ||
470
- this.$refs.service_show.data.fields[index].label === '小区名称' ||
471
- this.$refs.service_show.data.fields[index].label === '楼号' ||
472
- this.$refs.service_show.data.fields[index].label === '单元号' ||
473
- this.$refs.service_show.data.fields[index].label === '楼层' ||
474
- this.$refs.service_show.data.fields[index].label === '门牌号'
475
- ) {
476
- console.log('即将合成地址')
477
- var address = ''
478
- let k=0;
479
- for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
480
- // 控制设置级联
481
- // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
482
- // xxx xx xxx
483
- if (this.$refs.service_show.data.fields[k].label === '县/区' && this.$refs.service_show.data.fields[k].value) {
484
- address += this.$refs.service_show.data.fields[k].value
485
- if (address.indexOf('湖北省')!=-1){
486
- address = address.replace('湖北省','')
487
- }
488
- }
489
- if (this.$refs.service_show.data.fields[k].label === '街道名称' && this.$refs.service_show.data.fields[k].value) {
490
- address += this.$refs.service_show.data.fields[k].value
491
- }
492
- if (this.$refs.service_show.data.fields[k].label === '小区名称' && this.$refs.service_show.data.fields[k].value) {
493
- address += this.$refs.service_show.data.fields[k].value
494
- }
495
- if (this.$refs.service_show.data.fields[k].label === '楼号' && this.$refs.service_show.data.fields[k].value) {
496
- address += this.$refs.service_show.data.fields[k].value + '栋'
497
- }
498
- if (this.$refs.service_show.data.fields[k].label === '单元号' && this.$refs.service_show.data.fields[k].value) {
499
- address += this.$refs.service_show.data.fields[k].value + '单元'
500
- }
501
- if (this.$refs.service_show.data.fields[k].label=== '楼层' && this.$refs.service_show.data.fields[k].value) {
502
- address += this.$refs.service_show.data.fields[k].value + '层'
503
- }
504
- if (this.$refs.service_show.data.fields[k].label === '门牌号' && this.$refs.service_show.data.fields[k].value) {
505
- address += this.$refs.service_show.data.fields[k].value + '室'
506
- }
507
-
508
- }
509
- console.log('获取到的address=>' + address)
510
- // 数据获取完毕时放入地址text
511
- for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
512
- if (this.$refs.service_show.data.fields[k].label === '地址') {
513
- this.$refs.service_show.data.fields[k].value = address
514
- console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[k].value)
515
- this.$refs.service_show.update()
516
- }
517
- }
518
- }
519
-
520
- },
521
-
522
- },
523
- watch: {
524
- 'selectdata'() {
525
- this.json_datas = this.$supervisory_vue
526
- let sum = 0
527
- let jsonData = {}
528
- for (let i = 0; i < this.json_datas.activitys.length; i++) {
529
- if (this.selectdata.defname == this.json_datas.activitys[i].title) {
530
- jsonData = this.json_datas.activitys[i]
531
- sum++
532
- }
533
- }
534
- if (sum == 1) {
535
- this.data = jsonData
536
- this.initializtion()
537
- // 完成时间和完成人,部门,分公司
538
- if(this.selectdata.defname =='完工'){ this.data.filiale = this.selectdata.f_filiale
539
- this.data.f_parentname = this.selectdata.f_parentname
540
- this.data.operate_date = this.selectdata.sendtime
541
- this.data.operator = this.selectdata.sender
542
- this.showview = true
543
- }else{
544
- this.data.f_parentname = this.selectdata.f_parentname
545
- this.data.operate_date = this.selectdata.finishtime
546
- this.data.operator = this.selectdata.person
547
- this.showview = true
548
- }
549
-
550
- } else if (sum == 0) {
551
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
552
- } else {
553
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
554
- }
555
- },
556
- deep: true
557
- }
558
- }
559
- </script>
1
+ <template>
2
+ <show-back-reason v-if="selectdata.f_back_reason && selectdata.f_back_reason!=''"
3
+ :data="show_data"></show-back-reason>
4
+ <!--<gas-stop v-if="selectdata.defname == '停气碰口'"></gas-stop>-->
5
+ <material-message v-if="selectdata.defname=='材料导入'" v-ref:material
6
+ :selectdata="selectdata"
7
+ :state="2"
8
+ :edit="true"></material-message>
9
+ <material-message v-if="selectdata.defname=='材料审核'" v-ref:material
10
+ :selectdata="selectdata"
11
+ :state="1"
12
+ :edit="true"></material-message>
13
+ <receive-batch v-if="selectdata.defname == '派工单'" :selectdata="selectdata" v-ref:receivebatch></receive-batch>
14
+ <project-settlement v-if="selectdata.defname == '工程结算'" :selectdata="selectdata"></project-settlement>
15
+ <!-- <installfee :infee="selectdata" :showfee='true' v-if="selectdata.defname == '通气条件确认'"></installfee>-->
16
+ <buyer-message v-ref:buyermessagev :selectdata="selectdata" :state="1"
17
+ v-if="selectdata.defname == '收费'"></buyer-message>
18
+ <installfee :infee="selectdata" v-if="selectdata.defname == '收费'"></installfee>
19
+ <service-view v-ref:service_show :data="data" v-if="showview"></service-view>
20
+ </template>
21
+ <script>
22
+ import {HttpResetClass} from 'vue-client'
23
+ import Vue from "vue";
24
+ export default {
25
+ title: '报建监控控制层',
26
+ props: ['selectdata'],
27
+ data() {
28
+ return {
29
+ data: null, // 展示的数据
30
+ json_datas: null, // json配置数据结构
31
+ showview: false // 控制显示层显示
32
+ }
33
+ },
34
+ methods: {
35
+ getmodel(){
36
+ return this.$refs.service_show.getmodel()
37
+ },
38
+ // json配置数据处理 比如下拉框的options
39
+ async initializtion() {
40
+ // onetomany 数据获取
41
+ if (this.data.onetomany) {
42
+ console.log('判断是onetomany,this.data.onetomany的数据为=>' + JSON.stringify(this.data.onetomany))
43
+ for (let index = 0; index < this.data.onetomany.length; index++) {
44
+ let http = new HttpResetClass()
45
+ let data = {}
46
+ if (this.data.onetomany[index].tables[0] == 't_charge_record') {
47
+ data = {
48
+ tablename: this.data.onetomany[index].tables[0],
49
+ condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}' and f_charging_status != '作废'`
50
+ }
51
+ } else {
52
+ data = {
53
+ tablename: this.data.onetomany[index].tables[0],
54
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
55
+ }
56
+ }
57
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
58
+ resolveMsg: null,
59
+ rejectMsg: 'onetomany查询失败'
60
+ })
61
+ // 初始化 onetomany
62
+ let rows = []
63
+ console.log('查询返回结果res.data=>' + JSON.stringify(res.data))
64
+ this.data.onetomany[index].rows = res.data
65
+ // console.log(JSON.stringify('this.data.onetomany[index].rows=>' + JSON.stringify(this.data.onetomany[index].rows)))
66
+
67
+ // 初始化onetomany中的fields
68
+ for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
69
+ // 如果配置类型为select,优先从参数列表获取options
70
+ if (this.data.onetomany[index].fields[j].type === 'select') {
71
+ let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
72
+ if (temp && temp.length > 0) {
73
+ this.data.onetomany[index].fields[j].options = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ // selectdata 填充 data
80
+ if (this.selectdata.f_survey_name) {
81
+ let buyerinfos = []
82
+ var numReg = /^[0-9]+$/
83
+ var numRe = new RegExp(numReg)
84
+ if (numRe.test(this.selectdata.f_survey_name)) {
85
+ let querydata = {
86
+ tablename: 't_user',
87
+ condition: `id = ${this.selectdata.f_survey_name}`
88
+ }
89
+ buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: querydata}, {
90
+ resolveMsg: null,
91
+ rejectMsg: '获取人员失败'
92
+ })
93
+ this.selectdata.f_survey_name = {
94
+ id:buyerinfos.data[0].id,
95
+ name:buyerinfos.data[0].name
96
+ }
97
+ }
98
+ }
99
+
100
+ this.data = Object.assign({}, this.data, this.selectdata)
101
+ for (let i = 0; i < this.data.fields.length; i++) {
102
+
103
+ /**
104
+ * 增加需求: 流程监控想要能下拉选择县区
105
+ * updateTime:2020.07.23
106
+ */
107
+ if (this.data.fields[i].label == '县/区') {
108
+ let area = await this.$resetpost('rs/sql/singleTable', {
109
+ data: {
110
+ // items: 'f_bill_url,f_url_code',
111
+ tablename: 't_pcd',
112
+ condition: `f_filialeids = '${this.$login.f.f_orgids}'`
113
+ }
114
+ }, {resolveMsg: null, rejectMsg: null})
115
+ let rs = []
116
+ for (let i = 0; i < area.data.length; i++) {
117
+ let temp = {
118
+ label: area.data[i].f_pcd,
119
+ value: area.data[i].f_pcd
120
+ }
121
+ rs.push(temp)
122
+ }
123
+ this.data.fields[i].options = [{label: '全部', value: ''}, ...rs]
124
+ }
125
+
126
+
127
+ if (this.selectdata[this.data.fields[i].field]) {
128
+ this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
129
+ }
130
+
131
+ if (typeof this.data.fields[i].value === 'string' && this.data.fields[i].value.startsWith("{") && this.data.fields[i].value.endsWith("}")) {
132
+ this.data.fields[i].value = JSON.parse(this.data.fields[i].value)
133
+ }
134
+ this.data.fields[i].readonly = true
135
+ this.data.fields[i].disabled = true
136
+ if(this.$login.r.find(value => value == '报建流程修改') && this.$login.r.includes('报建流程修改')){
137
+ this.data.fields[i].readonly = false
138
+ this.data.fields[i].disabled = false
139
+ }
140
+ if(this.$login.r.find(value => value == '集体报建流程修改') && this.$login.r.includes('报建流程修改')){
141
+ this.data.fields[i].readonly = false
142
+ this.data.fields[i].disabled = false
143
+ }
144
+ if(this.data.fields[i].label=='合同总金额'){
145
+ console.log("合同总金额修改");
146
+ if(this.$login.r.includes('合同金额修改')){
147
+ this.data.fields[i].readonly = false
148
+ this.data.fields[i].disabled = false
149
+ }
150
+ }
151
+ if(this.data.fields[i].label=='费用合计'){
152
+ console.log("费用合计修改");
153
+ if(this.$login.r.includes('合同金额修改')){
154
+ this.data.fields[i].readonly = false
155
+ this.data.fields[i].disabled = false
156
+ }
157
+ }
158
+ }
159
+ this.data.buttons = null
160
+ if( this.$login.r.find(value => value == '报建流程修改') ){
161
+ // 仅留保存按钮
162
+ this.data.buttons = [
163
+ {
164
+ "button_name": "保存"
165
+ }
166
+ ]
167
+ }
168
+ if(this.$login.r.includes('集体报建流程修改')){
169
+ // 仅留保存按钮
170
+ this.data.buttons = [
171
+ {
172
+ "button_name": "保存"
173
+ }
174
+ ]
175
+ }
176
+ }
177
+ },
178
+ events:{
179
+ 'getmodel'(){
180
+ return this.$refs.service_show.getmodel()
181
+ },
182
+ async 'onetomanydelete'(i, j) {
183
+ let http = new HttpResetClass()
184
+ let data = {
185
+ tables: this.$refs.service_show.data.onetomany[i].tables,
186
+ row: this.$refs.service_show.model.rows[i][j]
187
+ }
188
+ await http.load('POST', 'rs/logic/applyDeleteValue', {data: data}, {
189
+ resolveMsg: null,
190
+ rejectMsg: 'onetomanydelete失败'
191
+ }).then(() => {
192
+ this.$dispatch('selfsearch')
193
+ this.$refs.service_show.model.rows[i].splice(j, 1)
194
+ })
195
+ },
196
+ //获取view层confirm事件
197
+ async 'confirm'(tables, row, showadd_index, j) {
198
+ debugger
199
+ var _this = this
200
+ for (let i = 0; i < tables.length; i++) {
201
+ let datas = {
202
+ tables: tables,
203
+ row: row
204
+ }
205
+ console.log("看看datas")
206
+ console.log(datas)
207
+ console.log("看看showadd_index")
208
+ console.log(showadd_index)
209
+ datas.row['f_process_id'] = this.selectdata.f_process_id
210
+ datas.row['f_apply_num'] = this.selectdata.f_apply_num
211
+ datas.row['f_filiale'] = this.selectdata.f_filiale
212
+ let http = new HttpResetClass()
213
+ let sellid = ''
214
+ let billtype = datas.row['f_bill_style']
215
+ if (tables[i] == 't_charge_record') {
216
+ await this.loadbuyer()
217
+ if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是') {
218
+ this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费', 'info', 2000)
219
+ this.$refs.service_show.model.rows[showadd_index].splice(j, 1)
220
+ this.$refs.service_show.initializtion()
221
+ return
222
+ }
223
+ datas.row.f_charging_status = '有效'
224
+ datas.row.f_is_correct = '否'
225
+ datas.row.f_charge_collectors = this.$login.f.name
226
+ datas.row.f_amount_words=this.smalltoBIG(datas.row.f_charge_money)
227
+ await http.load('POST', 'rs/logic/applycharge', datas, {
228
+ resolveMsg: null,
229
+ rejectMsg: '收费保存失败'
230
+ }).then((res) => {
231
+ sellid = JSON.parse(res.data.sellid).id
232
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
233
+ //
234
+ // if (this.$refs.service_show.data.fields[i].label == '累计缴费金额') {
235
+ // this.$refs.service_show.data.fields[i].value = res.data.f_cumulative_money
236
+ // }
237
+ //
238
+ // if (this.$refs.service_show.data.fields[i].label == '未结总金额') {
239
+ // this.$refs.service_show.data.fields[i].value = res.data.f_unaccounts_money
240
+ // }
241
+
242
+ }
243
+ let temp = _this.$refs.service_show.model.rows[showadd_index][j]
244
+ temp.id = sellid
245
+ _this.$refs.service_show.model.rows[showadd_index][j] = temp
246
+ })
247
+ if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是') {
248
+ this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
249
+ if (res === 'confirm') {
250
+ console.log('打印票据')
251
+ if (billtype === '增值税电子发票') {
252
+ this.selectsellid = sellid
253
+ this.showbuyerinfo = true
254
+ } else {
255
+ this.printbill(sellid)
256
+ }
257
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
258
+ if (this.$refs.service_show.data.fields[i].label == '累计开票金额') {
259
+ console.log("计算累计开票金额")
260
+ this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[i].value) + this.datas.row.f_cumulative_invoicing
261
+ }
262
+ }
263
+ }
264
+ })
265
+ }
266
+ // 刷新列表数据
267
+ console.log("刷新一下")
268
+ this.$dispatch('selfsearch')
269
+ console.log("刷新完成")
270
+ } else {
271
+ debugger
272
+ await http.load('POST', 'rs/logic/saveentity', datas, {
273
+ resolveMsg: null,
274
+ rejectMsg: 'onetomany保存失败'
275
+ }).then((res) => {
276
+ // 刷新列表数据
277
+ this.$dispatch('selfsearch')
278
+ let temp = _this.$refs.service_show.model.rows[showadd_index][j]
279
+ temp.id = res.data.id
280
+ _this.$refs.service_show.model.rows[showadd_index][j] = temp
281
+ })
282
+ }
283
+ }
284
+ },
285
+ // 获取view层button事件/
286
+ async 'button'(model) {
287
+ let http = new HttpResetClass()
288
+ // 下发,提交,保存,退回通用业务后台处理logic
289
+ let url = 'rs/logic/ApplyProductService'
290
+ model.id = this.selectdata.appid
291
+ let requestData = {
292
+ tables: this.data.tables,
293
+ model: model,
294
+ isedit: true
295
+ }
296
+ requestData.loginUser = this.$login.f
297
+ console.log('即将发送请求url=>' + url + ',参数=>' + JSON.stringify(requestData))
298
+ let res = res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
299
+ console.log("service处理完成返回数据:", JSON.stringify(res.data))
300
+ if (res.data.code == 200) {
301
+ this.$dispatch('close')
302
+ } else {
303
+ if (res.data.msg) {
304
+ this.$showMessage(res.data.msg)
305
+ }
306
+ }
307
+ },
308
+ 'checkboxSelectControl'(index,index2){
309
+ console.log("chufa事件control");
310
+ console.log('this.$refs.service_show.data.fields[index]==>:'+JSON.stringify(this.$refs.service_show.data.fields[index]));
311
+ if(this.$refs.service_show.data.fields[index].label=="提交资料"){
312
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
313
+
314
+ if(this.$refs.service_show.data.fields[i].label=="用户提交资料"){
315
+ //if(this.$refs.service_show.data.fields[index].value == ""){
316
+ console.log("this.$refs.service_show.data.fields[index].items[index2].value==>"+JSON.stringify(this.$refs.service_show.data.fields[index].items[index2]))
317
+ //增加和删除框中的内容
318
+ if(this.$refs.service_show.data.fields[index].items[index2].value == false){
319
+ this.$refs.service_show.data.fields[i].value+=this.$refs.service_show.data.fields[index].items[index2].label+" ";
320
+ this.$refs.service_show.data.fields[index].items[index2].value=true;
321
+ }else{
322
+ let deleteValue = this.$refs.service_show.data.fields[index].items[index2].label;
323
+ let values =this.$refs.service_show.data.fields[i].value;
324
+ let result = values.split(" ").filter((item)=>{
325
+ return item!=deleteValue;
326
+ }).join(" ")
327
+ console.log(result);
328
+ this.$refs.service_show.data.fields[i].value =result;
329
+ this.$refs.service_show.data.fields[index].items[index2].value=false;
330
+ }
331
+ //}
332
+ }
333
+ }
334
+ }
335
+ },
336
+ async 'select_cascade'(index){
337
+ console.log("sdsdsdsdsdsdsdsdsdsdsdsdsdsd")
338
+ if (this.$refs.service_show.data.fields[index].label == '工程安装费'||
339
+ this.$refs.service_show.data.fields[index].label == '材料费'||
340
+ this.$refs.service_show.data.fields[index].label == '人工费') {
341
+ debugger
342
+ let gcmoney = 0;
343
+ let clmoney=0;
344
+ let rgmoney=0;
345
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
346
+
347
+ if (this.$refs.service_show.data.fields[i].label == '工程安装费') {
348
+ gcmoney =this.$refs.service_show.data.fields[i].value
349
+ }
350
+ if (this.$refs.service_show.data.fields[i].label == '材料费') {
351
+ clmoney = this.$refs.service_show.data.fields[i].value
352
+ }
353
+ if (this.$refs.service_show.data.fields[i].label == '人工费') {
354
+ rgmoney = this.$refs.service_show.data.fields[i].value
355
+ }
356
+ if (this.$refs.service_show.data.fields[i].label === '费用合计') {
357
+ this.$refs.service_show.data.fields[i].value = parseInt(gcmoney)+parseInt(clmoney)+parseInt(rgmoney);
358
+ }
359
+ }
360
+ this.$refs.service_show.update()
361
+
362
+ }
363
+
364
+ if (this.$refs.service_show.data.fields[index].label == '合同总金额'){
365
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
366
+ if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
367
+ this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[index].value);
368
+ }
369
+ }
370
+ }
371
+
372
+ /**
373
+ * 增加需求: 流程监控地址可以下拉选择
374
+ * 2020.07.23
375
+ */
376
+ if (this.$refs.service_show.data.fields[index].label === '县/区') {
377
+ let temp = this.$refs.service_show.data.fields[index].value
378
+ console.log('==============================县/区:' + temp)
379
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
380
+ // 控制设置级联
381
+ // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
382
+ if (this.$refs.service_show.data.fields[i].label === '街道名称') {
383
+ // this.$refs.service_show.data.fields[i].value = ''
384
+ let street = await this.$resetpost('rs/sql/singleTable', {
385
+ data: {
386
+ tablename: 't_street',
387
+ condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_pcd='${temp}'`
388
+ }
389
+ }, {resolveMsg: null, rejectMsg: null})
390
+ let streetrs = []
391
+ for (let i = 0; i < street.data.length; i++) {
392
+ let temp = {
393
+ label: street.data[i].f_street,
394
+ value: street.data[i].f_street
395
+ }
396
+ streetrs.push(temp)
397
+ }
398
+
399
+ this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
400
+ //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
401
+ // console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.data.fields[i].options)
402
+
403
+ this.$refs.service_show.update()
404
+ }
405
+ }
406
+ }
407
+ /**
408
+ * 增加需求: 流程监控地址可以下拉选择
409
+ * 2020.07.23
410
+ */
411
+ if (this.$refs.service_show.data.fields[index].label === '街道名称') {
412
+ let temp = this.$refs.service_show.data.fields[index].value
413
+ console.log('=============================街道:' + temp)
414
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
415
+ // 控制设置级联
416
+ // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
417
+ if (this.$refs.service_show.data.fields[i].label === '小区名称') {
418
+ // this.$refs.service_show.data.fields[i].value = ''
419
+
420
+ let area = await this.$resetpost('rs/sql/singleTable', {
421
+ data: {
422
+ tablename: 't_area',
423
+ condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_street='${temp}'`
424
+ }
425
+ }, {resolveMsg: null, rejectMsg: null})
426
+ let arears = []
427
+ this.areaall=area.data;
428
+ for (let i = 0; i < area.data.length; i++) {
429
+ let temp = {
430
+ label: area.data[i].f_residential_area,
431
+ value: area.data[i].f_residential_area
432
+ }
433
+ arears.push(temp)
434
+ }
435
+ this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...arears]
436
+ //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
437
+ console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.$refs.service_show.data.fields[i].options)
438
+
439
+ this.$refs.service_show.update()
440
+
441
+ }
442
+ }
443
+ }
444
+ /**
445
+ * 增加需求: 流程监控地址可以下拉选择
446
+ * 2020.07.23
447
+ */
448
+ if(this.$refs.service_show.data.fields[index].label === '小区名称'){
449
+ for (let i = 0; i < this.areaall.length; i++) {
450
+ console.log("aaaaaaaaaaaa")
451
+ if(this.areaall[i].f_residential_area== this.$refs.service_show.data.fields[index].value){
452
+ console.log("abbbbbbbbb")
453
+ for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
454
+ if(this.$refs.service_show.data.fields[j].label === '小区地址'){
455
+ console.log(this.areaall[i].f_area_address)
456
+ this.$refs.service_show.data.fields[j].value=this.areaall[i].f_area_address
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
462
+ /**
463
+ * 增加需求: 流程监控地址可以下拉选择,
464
+ * 2020.07.23
465
+ */
466
+ // 合成地址
467
+ if (
468
+ this.$refs.service_show.data.fields[index].label === '县/区' ||
469
+ this.$refs.service_show.data.fields[index].label === '街道名称' ||
470
+ this.$refs.service_show.data.fields[index].label === '小区名称' ||
471
+ this.$refs.service_show.data.fields[index].label === '楼号' ||
472
+ this.$refs.service_show.data.fields[index].label === '单元号' ||
473
+ this.$refs.service_show.data.fields[index].label === '楼层' ||
474
+ this.$refs.service_show.data.fields[index].label === '门牌号'
475
+ ) {
476
+ console.log('即将合成地址')
477
+ var address = ''
478
+ let k=0;
479
+ for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
480
+ // 控制设置级联
481
+ // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
482
+ // xxx xx xxx
483
+ if (this.$refs.service_show.data.fields[k].label === '县/区' && this.$refs.service_show.data.fields[k].value) {
484
+ address += this.$refs.service_show.data.fields[k].value
485
+ if (address.indexOf('湖北省')!=-1){
486
+ address = address.replace('湖北省','')
487
+ }
488
+ }
489
+ if (this.$refs.service_show.data.fields[k].label === '街道名称' && this.$refs.service_show.data.fields[k].value) {
490
+ address += this.$refs.service_show.data.fields[k].value
491
+ }
492
+ if (this.$refs.service_show.data.fields[k].label === '小区名称' && this.$refs.service_show.data.fields[k].value) {
493
+ address += this.$refs.service_show.data.fields[k].value
494
+ }
495
+ if (this.$refs.service_show.data.fields[k].label === '楼号' && this.$refs.service_show.data.fields[k].value) {
496
+ address += this.$refs.service_show.data.fields[k].value + '栋'
497
+ }
498
+ if (this.$refs.service_show.data.fields[k].label === '单元号' && this.$refs.service_show.data.fields[k].value) {
499
+ address += this.$refs.service_show.data.fields[k].value + '单元'
500
+ }
501
+ if (this.$refs.service_show.data.fields[k].label=== '楼层' && this.$refs.service_show.data.fields[k].value) {
502
+ address += this.$refs.service_show.data.fields[k].value + '层'
503
+ }
504
+ if (this.$refs.service_show.data.fields[k].label === '门牌号' && this.$refs.service_show.data.fields[k].value) {
505
+ address += this.$refs.service_show.data.fields[k].value + '室'
506
+ }
507
+
508
+ }
509
+ console.log('获取到的address=>' + address)
510
+ // 数据获取完毕时放入地址text
511
+ for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
512
+ if (this.$refs.service_show.data.fields[k].label === '地址') {
513
+ this.$refs.service_show.data.fields[k].value = address
514
+ console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[k].value)
515
+ this.$refs.service_show.update()
516
+ }
517
+ }
518
+ }
519
+
520
+ },
521
+
522
+ },
523
+ watch: {
524
+ 'selectdata'() {
525
+ this.json_datas = this.$supervisory_vue
526
+ let sum = 0
527
+ let jsonData = {}
528
+ for (let i = 0; i < this.json_datas.activitys.length; i++) {
529
+ if (this.selectdata.defname == this.json_datas.activitys[i].title) {
530
+ jsonData = this.json_datas.activitys[i]
531
+ sum++
532
+ }
533
+ }
534
+ if (sum == 1) {
535
+ this.data = jsonData
536
+ this.initializtion()
537
+ // 完成时间和完成人,部门,分公司
538
+ if(this.selectdata.defname =='完工'){ this.data.filiale = this.selectdata.f_filiale
539
+ this.data.f_parentname = this.selectdata.f_parentname
540
+ this.data.operate_date = this.selectdata.sendtime
541
+ this.data.operator = this.selectdata.sender
542
+ this.showview = true
543
+ }else{
544
+ this.data.f_parentname = this.selectdata.f_parentname
545
+ this.data.operate_date = this.selectdata.finishtime
546
+ this.data.operator = this.selectdata.person
547
+ this.showview = true
548
+ }
549
+
550
+ } else if (sum == 0) {
551
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
552
+ } else {
553
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
554
+ }
555
+ },
556
+ deep: true
557
+ }
558
+ }
559
+ </script>