apply-clients 5.0.35-ezhou-16 → 5.0.35-ezhou-18

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.
Files changed (20) hide show
  1. package/package.json +1 -1
  2. package/src/apply.js +1 -2
  3. package/src/components/product/EngineeringManagement/EngineerUpload.vue +304 -304
  4. package/src/components/product/EngineeringManagement/EngineeringSelect.vue +586 -586
  5. package/src/components/product/EngineeringSupervisory/EngineeringApplyStopInfo.vue +281 -281
  6. package/src/components/product/EngineeringSupervisory/EngineeringSupervisoryControl.vue +132 -132
  7. package/src/components/product/EngineeringSupervisory/EngineeringSupervisoryList.vue +340 -340
  8. package/src/components/product/EngineeringSupervisory/EngineeringSupervisoryServiceControl.vue +490 -490
  9. package/src/components/product/Function/InstallInfoSelect.vue +255 -255
  10. package/src/components/product/Function/functions/BuyerMessage.vue +512 -512
  11. package/src/components/product/Overview/addMaterialScience.vue +217 -217
  12. package/src/components/product/Process/ExplorationSelect.vue +805 -805
  13. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +405 -405
  14. package/src/components/product/Process/Processes/Service/ServiceControl.vue +2285 -2285
  15. package/src/components/product/Process/Processes/selectUserinfo.vue +13 -11
  16. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +556 -556
  17. package/src/components/product/Supervisory/SupervisoryList.vue +435 -435
  18. package/src/components/product/report/ChargeMoneyReport.vue +150 -136
  19. package/src/components/product/stopInfo/ApplyStopInfo.vue +281 -281
  20. package/src/ezhouAndroid.js +48 -48
@@ -1,556 +1,556 @@
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
- this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
127
-
128
- if (typeof this.data.fields[i].value === 'string' && this.data.fields[i].value.startsWith("{") && this.data.fields[i].value.endsWith("}")) {
129
- this.data.fields[i].value = JSON.parse(this.data.fields[i].value)
130
- }
131
- this.data.fields[i].readonly = true
132
- this.data.fields[i].disabled = true
133
- if(this.$login.r.find(value => value == '报建流程修改') && this.$login.r.includes('报建流程修改')){
134
- this.data.fields[i].readonly = false
135
- this.data.fields[i].disabled = false
136
- }
137
- if(this.$login.r.find(value => value == '集体报建流程修改') && this.$login.r.includes('报建流程修改')){
138
- this.data.fields[i].readonly = false
139
- this.data.fields[i].disabled = false
140
- }
141
- if(this.data.fields[i].label=='合同总金额'){
142
- console.log("合同总金额修改");
143
- if(this.$login.r.includes('合同金额修改')){
144
- this.data.fields[i].readonly = false
145
- this.data.fields[i].disabled = false
146
- }
147
- }
148
- if(this.data.fields[i].label=='费用合计'){
149
- console.log("费用合计修改");
150
- if(this.$login.r.includes('合同金额修改')){
151
- this.data.fields[i].readonly = false
152
- this.data.fields[i].disabled = false
153
- }
154
- }
155
- }
156
- this.data.buttons = null
157
- if( this.$login.r.find(value => value == '报建流程修改') ){
158
- // 仅留保存按钮
159
- this.data.buttons = [
160
- {
161
- "button_name": "保存"
162
- }
163
- ]
164
- }
165
- if(this.$login.r.includes('集体报建流程修改')){
166
- // 仅留保存按钮
167
- this.data.buttons = [
168
- {
169
- "button_name": "保存"
170
- }
171
- ]
172
- }
173
- }
174
- },
175
- events:{
176
- 'getmodel'(){
177
- return this.$refs.service_show.getmodel()
178
- },
179
- async 'onetomanydelete'(i, j) {
180
- let http = new HttpResetClass()
181
- let data = {
182
- tables: this.$refs.service_show.data.onetomany[i].tables,
183
- row: this.$refs.service_show.model.rows[i][j]
184
- }
185
- await http.load('POST', 'rs/logic/applyDeleteValue', {data: data}, {
186
- resolveMsg: null,
187
- rejectMsg: 'onetomanydelete失败'
188
- }).then(() => {
189
- this.$dispatch('selfsearch')
190
- this.$refs.service_show.model.rows[i].splice(j, 1)
191
- })
192
- },
193
- //获取view层confirm事件
194
- async 'confirm'(tables, row, showadd_index, j) {
195
- debugger
196
- var _this = this
197
- for (let i = 0; i < tables.length; i++) {
198
- let datas = {
199
- tables: tables,
200
- row: row
201
- }
202
- console.log("看看datas")
203
- console.log(datas)
204
- console.log("看看showadd_index")
205
- console.log(showadd_index)
206
- datas.row['f_process_id'] = this.selectdata.f_process_id
207
- datas.row['f_apply_num'] = this.selectdata.f_apply_num
208
- datas.row['f_filiale'] = this.selectdata.f_filiale
209
- let http = new HttpResetClass()
210
- let sellid = ''
211
- let billtype = datas.row['f_bill_style']
212
- if (tables[i] == 't_charge_record') {
213
- await this.loadbuyer()
214
- if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是') {
215
- this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费', 'info', 2000)
216
- this.$refs.service_show.model.rows[showadd_index].splice(j, 1)
217
- this.$refs.service_show.initializtion()
218
- return
219
- }
220
- datas.row.f_charging_status = '有效'
221
- datas.row.f_is_correct = '否'
222
- datas.row.f_charge_collectors = this.$login.f.name
223
- datas.row.f_amount_words=this.smalltoBIG(datas.row.f_charge_money)
224
- await http.load('POST', 'rs/logic/applycharge', datas, {
225
- resolveMsg: null,
226
- rejectMsg: '收费保存失败'
227
- }).then((res) => {
228
- sellid = JSON.parse(res.data.sellid).id
229
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
230
- //
231
- // if (this.$refs.service_show.data.fields[i].label == '累计缴费金额') {
232
- // this.$refs.service_show.data.fields[i].value = res.data.f_cumulative_money
233
- // }
234
- //
235
- // if (this.$refs.service_show.data.fields[i].label == '未结总金额') {
236
- // this.$refs.service_show.data.fields[i].value = res.data.f_unaccounts_money
237
- // }
238
-
239
- }
240
- let temp = _this.$refs.service_show.model.rows[showadd_index][j]
241
- temp.id = sellid
242
- _this.$refs.service_show.model.rows[showadd_index][j] = temp
243
- })
244
- if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是') {
245
- this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
246
- if (res === 'confirm') {
247
- console.log('打印票据')
248
- if (billtype === '增值税电子发票') {
249
- this.selectsellid = sellid
250
- this.showbuyerinfo = true
251
- } else {
252
- this.printbill(sellid)
253
- }
254
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
255
- if (this.$refs.service_show.data.fields[i].label == '累计开票金额') {
256
- console.log("计算累计开票金额")
257
- this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[i].value) + this.datas.row.f_cumulative_invoicing
258
- }
259
- }
260
- }
261
- })
262
- }
263
- // 刷新列表数据
264
- console.log("刷新一下")
265
- this.$dispatch('selfsearch')
266
- console.log("刷新完成")
267
- } else {
268
- debugger
269
- await http.load('POST', 'rs/logic/saveentity', datas, {
270
- resolveMsg: null,
271
- rejectMsg: 'onetomany保存失败'
272
- }).then((res) => {
273
- // 刷新列表数据
274
- this.$dispatch('selfsearch')
275
- let temp = _this.$refs.service_show.model.rows[showadd_index][j]
276
- temp.id = res.data.id
277
- _this.$refs.service_show.model.rows[showadd_index][j] = temp
278
- })
279
- }
280
- }
281
- },
282
- // 获取view层button事件/
283
- async 'button'(model) {
284
- let http = new HttpResetClass()
285
- // 下发,提交,保存,退回通用业务后台处理logic
286
- let url = 'rs/logic/ApplyProductService'
287
- model.id = this.selectdata.appid
288
- let requestData = {
289
- tables: this.data.tables,
290
- model: model,
291
- isedit: true
292
- }
293
- requestData.loginUser = this.$login.f
294
- console.log('即将发送请求url=>' + url + ',参数=>' + JSON.stringify(requestData))
295
- let res = res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
296
- console.log("service处理完成返回数据:", JSON.stringify(res.data))
297
- if (res.data.code == 200) {
298
- this.$dispatch('close')
299
- } else {
300
- if (res.data.msg) {
301
- this.$showMessage(res.data.msg)
302
- }
303
- }
304
- },
305
- 'checkboxSelectControl'(index,index2){
306
- console.log("chufa事件control");
307
- console.log('this.$refs.service_show.data.fields[index]==>:'+JSON.stringify(this.$refs.service_show.data.fields[index]));
308
- if(this.$refs.service_show.data.fields[index].label=="提交资料"){
309
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
310
-
311
- if(this.$refs.service_show.data.fields[i].label=="用户提交资料"){
312
- //if(this.$refs.service_show.data.fields[index].value == ""){
313
- console.log("this.$refs.service_show.data.fields[index].items[index2].value==>"+JSON.stringify(this.$refs.service_show.data.fields[index].items[index2]))
314
- //增加和删除框中的内容
315
- if(this.$refs.service_show.data.fields[index].items[index2].value == false){
316
- this.$refs.service_show.data.fields[i].value+=this.$refs.service_show.data.fields[index].items[index2].label+" ";
317
- this.$refs.service_show.data.fields[index].items[index2].value=true;
318
- }else{
319
- let deleteValue = this.$refs.service_show.data.fields[index].items[index2].label;
320
- let values =this.$refs.service_show.data.fields[i].value;
321
- let result = values.split(" ").filter((item)=>{
322
- return item!=deleteValue;
323
- }).join(" ")
324
- console.log(result);
325
- this.$refs.service_show.data.fields[i].value =result;
326
- this.$refs.service_show.data.fields[index].items[index2].value=false;
327
- }
328
- //}
329
- }
330
- }
331
- }
332
- },
333
- async 'select_cascade'(index){
334
- console.log("sdsdsdsdsdsdsdsdsdsdsdsdsdsd")
335
- if (this.$refs.service_show.data.fields[index].label == '工程安装费'||
336
- this.$refs.service_show.data.fields[index].label == '材料费'||
337
- this.$refs.service_show.data.fields[index].label == '人工费') {
338
- debugger
339
- let gcmoney = 0;
340
- let clmoney=0;
341
- let rgmoney=0;
342
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
343
-
344
- if (this.$refs.service_show.data.fields[i].label == '工程安装费') {
345
- gcmoney =this.$refs.service_show.data.fields[i].value
346
- }
347
- if (this.$refs.service_show.data.fields[i].label == '材料费') {
348
- clmoney = this.$refs.service_show.data.fields[i].value
349
- }
350
- if (this.$refs.service_show.data.fields[i].label == '人工费') {
351
- rgmoney = this.$refs.service_show.data.fields[i].value
352
- }
353
- if (this.$refs.service_show.data.fields[i].label === '费用合计') {
354
- this.$refs.service_show.data.fields[i].value = parseInt(gcmoney)+parseInt(clmoney)+parseInt(rgmoney);
355
- }
356
- }
357
- this.$refs.service_show.update()
358
-
359
- }
360
-
361
- if (this.$refs.service_show.data.fields[index].label == '合同总金额'){
362
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
363
- if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
364
- this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[index].value);
365
- }
366
- }
367
- }
368
-
369
- /**
370
- * 增加需求: 流程监控地址可以下拉选择
371
- * 2020.07.23
372
- */
373
- if (this.$refs.service_show.data.fields[index].label === '县/区') {
374
- let temp = this.$refs.service_show.data.fields[index].value
375
- console.log('==============================县/区:' + temp)
376
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
377
- // 控制设置级联
378
- // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
379
- if (this.$refs.service_show.data.fields[i].label === '街道名称') {
380
- // this.$refs.service_show.data.fields[i].value = ''
381
- let street = await this.$resetpost('rs/sql/singleTable', {
382
- data: {
383
- tablename: 't_street',
384
- condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_pcd='${temp}'`
385
- }
386
- }, {resolveMsg: null, rejectMsg: null})
387
- let streetrs = []
388
- for (let i = 0; i < street.data.length; i++) {
389
- let temp = {
390
- label: street.data[i].f_street,
391
- value: street.data[i].f_street
392
- }
393
- streetrs.push(temp)
394
- }
395
-
396
- this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
397
- //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
398
- // console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.data.fields[i].options)
399
-
400
- this.$refs.service_show.update()
401
- }
402
- }
403
- }
404
- /**
405
- * 增加需求: 流程监控地址可以下拉选择
406
- * 2020.07.23
407
- */
408
- if (this.$refs.service_show.data.fields[index].label === '街道名称') {
409
- let temp = this.$refs.service_show.data.fields[index].value
410
- console.log('=============================街道:' + temp)
411
- for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
412
- // 控制设置级联
413
- // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
414
- if (this.$refs.service_show.data.fields[i].label === '小区名称') {
415
- // this.$refs.service_show.data.fields[i].value = ''
416
-
417
- let area = await this.$resetpost('rs/sql/singleTable', {
418
- data: {
419
- tablename: 't_area',
420
- condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_street='${temp}'`
421
- }
422
- }, {resolveMsg: null, rejectMsg: null})
423
- let arears = []
424
- this.areaall=area.data;
425
- for (let i = 0; i < area.data.length; i++) {
426
- let temp = {
427
- label: area.data[i].f_residential_area,
428
- value: area.data[i].f_residential_area
429
- }
430
- arears.push(temp)
431
- }
432
- this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...arears]
433
- //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
434
- console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.$refs.service_show.data.fields[i].options)
435
-
436
- this.$refs.service_show.update()
437
-
438
- }
439
- }
440
- }
441
- /**
442
- * 增加需求: 流程监控地址可以下拉选择
443
- * 2020.07.23
444
- */
445
- if(this.$refs.service_show.data.fields[index].label === '小区名称'){
446
- for (let i = 0; i < this.areaall.length; i++) {
447
- console.log("aaaaaaaaaaaa")
448
- if(this.areaall[i].f_residential_area== this.$refs.service_show.data.fields[index].value){
449
- console.log("abbbbbbbbb")
450
- for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
451
- if(this.$refs.service_show.data.fields[j].label === '小区地址'){
452
- console.log(this.areaall[i].f_area_address)
453
- this.$refs.service_show.data.fields[j].value=this.areaall[i].f_area_address
454
- }
455
- }
456
- }
457
- }
458
- }
459
- /**
460
- * 增加需求: 流程监控地址可以下拉选择,
461
- * 2020.07.23
462
- */
463
- // 合成地址
464
- if (
465
- this.$refs.service_show.data.fields[index].label === '县/区' ||
466
- this.$refs.service_show.data.fields[index].label === '街道名称' ||
467
- this.$refs.service_show.data.fields[index].label === '小区名称' ||
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
- ) {
473
- console.log('即将合成地址')
474
- var address = ''
475
- let k=0;
476
- for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
477
- // 控制设置级联
478
- // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
479
- // xxx xx xxx
480
- if (this.$refs.service_show.data.fields[k].label === '县/区' && this.$refs.service_show.data.fields[k].value) {
481
- address += this.$refs.service_show.data.fields[k].value
482
- if (address.indexOf('湖北省')!=-1){
483
- address = address.replace('湖北省','')
484
- }
485
- }
486
- if (this.$refs.service_show.data.fields[k].label === '街道名称' && this.$refs.service_show.data.fields[k].value) {
487
- address += this.$refs.service_show.data.fields[k].value
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
-
505
- }
506
- console.log('获取到的address=>' + address)
507
- // 数据获取完毕时放入地址text
508
- for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
509
- if (this.$refs.service_show.data.fields[k].label === '地址') {
510
- this.$refs.service_show.data.fields[k].value = address
511
- console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[k].value)
512
- this.$refs.service_show.update()
513
- }
514
- }
515
- }
516
-
517
- },
518
-
519
- },
520
- watch: {
521
- 'selectdata'() {
522
- this.json_datas = this.$supervisory_vue
523
- let sum = 0
524
- let jsonData = {}
525
- for (let i = 0; i < this.json_datas.activitys.length; i++) {
526
- if (this.selectdata.defname == this.json_datas.activitys[i].title) {
527
- jsonData = this.json_datas.activitys[i]
528
- sum++
529
- }
530
- }
531
- if (sum == 1) {
532
- this.data = jsonData
533
- this.initializtion()
534
- // 完成时间和完成人,部门,分公司
535
- if(this.selectdata.defname =='完工'){ this.data.filiale = this.selectdata.f_filiale
536
- this.data.f_parentname = this.selectdata.f_parentname
537
- this.data.operate_date = this.selectdata.sendtime
538
- this.data.operator = this.selectdata.sender
539
- this.showview = true
540
- }else{
541
- this.data.f_parentname = this.selectdata.f_parentname
542
- this.data.operate_date = this.selectdata.finishtime
543
- this.data.operator = this.selectdata.person
544
- this.showview = true
545
- }
546
-
547
- } else if (sum == 0) {
548
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
549
- } else {
550
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
551
- }
552
- },
553
- deep: true
554
- }
555
- }
556
- </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
+ this.data.fields[i].value = this.selectdata[this.data.fields[i].field]
127
+
128
+ if (typeof this.data.fields[i].value === 'string' && this.data.fields[i].value.startsWith("{") && this.data.fields[i].value.endsWith("}")) {
129
+ this.data.fields[i].value = JSON.parse(this.data.fields[i].value)
130
+ }
131
+ this.data.fields[i].readonly = true
132
+ this.data.fields[i].disabled = true
133
+ if(this.$login.r.find(value => value == '报建流程修改') && this.$login.r.includes('报建流程修改')){
134
+ this.data.fields[i].readonly = false
135
+ this.data.fields[i].disabled = false
136
+ }
137
+ if(this.$login.r.find(value => value == '集体报建流程修改') && this.$login.r.includes('报建流程修改')){
138
+ this.data.fields[i].readonly = false
139
+ this.data.fields[i].disabled = false
140
+ }
141
+ if(this.data.fields[i].label=='合同总金额'){
142
+ console.log("合同总金额修改");
143
+ if(this.$login.r.includes('合同金额修改')){
144
+ this.data.fields[i].readonly = false
145
+ this.data.fields[i].disabled = false
146
+ }
147
+ }
148
+ if(this.data.fields[i].label=='费用合计'){
149
+ console.log("费用合计修改");
150
+ if(this.$login.r.includes('合同金额修改')){
151
+ this.data.fields[i].readonly = false
152
+ this.data.fields[i].disabled = false
153
+ }
154
+ }
155
+ }
156
+ this.data.buttons = null
157
+ if( this.$login.r.find(value => value == '报建流程修改') ){
158
+ // 仅留保存按钮
159
+ this.data.buttons = [
160
+ {
161
+ "button_name": "保存"
162
+ }
163
+ ]
164
+ }
165
+ if(this.$login.r.includes('集体报建流程修改')){
166
+ // 仅留保存按钮
167
+ this.data.buttons = [
168
+ {
169
+ "button_name": "保存"
170
+ }
171
+ ]
172
+ }
173
+ }
174
+ },
175
+ events:{
176
+ 'getmodel'(){
177
+ return this.$refs.service_show.getmodel()
178
+ },
179
+ async 'onetomanydelete'(i, j) {
180
+ let http = new HttpResetClass()
181
+ let data = {
182
+ tables: this.$refs.service_show.data.onetomany[i].tables,
183
+ row: this.$refs.service_show.model.rows[i][j]
184
+ }
185
+ await http.load('POST', 'rs/logic/applyDeleteValue', {data: data}, {
186
+ resolveMsg: null,
187
+ rejectMsg: 'onetomanydelete失败'
188
+ }).then(() => {
189
+ this.$dispatch('selfsearch')
190
+ this.$refs.service_show.model.rows[i].splice(j, 1)
191
+ })
192
+ },
193
+ //获取view层confirm事件
194
+ async 'confirm'(tables, row, showadd_index, j) {
195
+ debugger
196
+ var _this = this
197
+ for (let i = 0; i < tables.length; i++) {
198
+ let datas = {
199
+ tables: tables,
200
+ row: row
201
+ }
202
+ console.log("看看datas")
203
+ console.log(datas)
204
+ console.log("看看showadd_index")
205
+ console.log(showadd_index)
206
+ datas.row['f_process_id'] = this.selectdata.f_process_id
207
+ datas.row['f_apply_num'] = this.selectdata.f_apply_num
208
+ datas.row['f_filiale'] = this.selectdata.f_filiale
209
+ let http = new HttpResetClass()
210
+ let sellid = ''
211
+ let billtype = datas.row['f_bill_style']
212
+ if (tables[i] == 't_charge_record') {
213
+ await this.loadbuyer()
214
+ if (this.buyerinfo.rows.length < 1 && billtype === '增值税电子发票' && this.$appdata.getSingleValue('默认打印票据') === '是') {
215
+ this.$showAlert('未找到购买方信息,请去报建功能"购买方信息"中完善购买方信息后再收费', 'info', 2000)
216
+ this.$refs.service_show.model.rows[showadd_index].splice(j, 1)
217
+ this.$refs.service_show.initializtion()
218
+ return
219
+ }
220
+ datas.row.f_charging_status = '有效'
221
+ datas.row.f_is_correct = '否'
222
+ datas.row.f_charge_collectors = this.$login.f.name
223
+ datas.row.f_amount_words=this.smalltoBIG(datas.row.f_charge_money)
224
+ await http.load('POST', 'rs/logic/applycharge', datas, {
225
+ resolveMsg: null,
226
+ rejectMsg: '收费保存失败'
227
+ }).then((res) => {
228
+ sellid = JSON.parse(res.data.sellid).id
229
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
230
+ //
231
+ // if (this.$refs.service_show.data.fields[i].label == '累计缴费金额') {
232
+ // this.$refs.service_show.data.fields[i].value = res.data.f_cumulative_money
233
+ // }
234
+ //
235
+ // if (this.$refs.service_show.data.fields[i].label == '未结总金额') {
236
+ // this.$refs.service_show.data.fields[i].value = res.data.f_unaccounts_money
237
+ // }
238
+
239
+ }
240
+ let temp = _this.$refs.service_show.model.rows[showadd_index][j]
241
+ temp.id = sellid
242
+ _this.$refs.service_show.model.rows[showadd_index][j] = temp
243
+ })
244
+ if (this.$appdata.getSingleValue('默认打印票据') && this.$appdata.getSingleValue('默认打印票据') === '是') {
245
+ this.$showMessage('是否打票据', ['confirm', 'cancel']).then((res) => {
246
+ if (res === 'confirm') {
247
+ console.log('打印票据')
248
+ if (billtype === '增值税电子发票') {
249
+ this.selectsellid = sellid
250
+ this.showbuyerinfo = true
251
+ } else {
252
+ this.printbill(sellid)
253
+ }
254
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
255
+ if (this.$refs.service_show.data.fields[i].label == '累计开票金额') {
256
+ console.log("计算累计开票金额")
257
+ this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[i].value) + this.datas.row.f_cumulative_invoicing
258
+ }
259
+ }
260
+ }
261
+ })
262
+ }
263
+ // 刷新列表数据
264
+ console.log("刷新一下")
265
+ this.$dispatch('selfsearch')
266
+ console.log("刷新完成")
267
+ } else {
268
+ debugger
269
+ await http.load('POST', 'rs/logic/saveentity', datas, {
270
+ resolveMsg: null,
271
+ rejectMsg: 'onetomany保存失败'
272
+ }).then((res) => {
273
+ // 刷新列表数据
274
+ this.$dispatch('selfsearch')
275
+ let temp = _this.$refs.service_show.model.rows[showadd_index][j]
276
+ temp.id = res.data.id
277
+ _this.$refs.service_show.model.rows[showadd_index][j] = temp
278
+ })
279
+ }
280
+ }
281
+ },
282
+ // 获取view层button事件/
283
+ async 'button'(model) {
284
+ let http = new HttpResetClass()
285
+ // 下发,提交,保存,退回通用业务后台处理logic
286
+ let url = 'rs/logic/ApplyProductService'
287
+ model.id = this.selectdata.appid
288
+ let requestData = {
289
+ tables: this.data.tables,
290
+ model: model,
291
+ isedit: true
292
+ }
293
+ requestData.loginUser = this.$login.f
294
+ console.log('即将发送请求url=>' + url + ',参数=>' + JSON.stringify(requestData))
295
+ let res = res = await http.load('POST', url, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
296
+ console.log("service处理完成返回数据:", JSON.stringify(res.data))
297
+ if (res.data.code == 200) {
298
+ this.$dispatch('close')
299
+ } else {
300
+ if (res.data.msg) {
301
+ this.$showMessage(res.data.msg)
302
+ }
303
+ }
304
+ },
305
+ 'checkboxSelectControl'(index,index2){
306
+ console.log("chufa事件control");
307
+ console.log('this.$refs.service_show.data.fields[index]==>:'+JSON.stringify(this.$refs.service_show.data.fields[index]));
308
+ if(this.$refs.service_show.data.fields[index].label=="提交资料"){
309
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
310
+
311
+ if(this.$refs.service_show.data.fields[i].label=="用户提交资料"){
312
+ //if(this.$refs.service_show.data.fields[index].value == ""){
313
+ console.log("this.$refs.service_show.data.fields[index].items[index2].value==>"+JSON.stringify(this.$refs.service_show.data.fields[index].items[index2]))
314
+ //增加和删除框中的内容
315
+ if(this.$refs.service_show.data.fields[index].items[index2].value == false){
316
+ this.$refs.service_show.data.fields[i].value+=this.$refs.service_show.data.fields[index].items[index2].label+" ";
317
+ this.$refs.service_show.data.fields[index].items[index2].value=true;
318
+ }else{
319
+ let deleteValue = this.$refs.service_show.data.fields[index].items[index2].label;
320
+ let values =this.$refs.service_show.data.fields[i].value;
321
+ let result = values.split(" ").filter((item)=>{
322
+ return item!=deleteValue;
323
+ }).join(" ")
324
+ console.log(result);
325
+ this.$refs.service_show.data.fields[i].value =result;
326
+ this.$refs.service_show.data.fields[index].items[index2].value=false;
327
+ }
328
+ //}
329
+ }
330
+ }
331
+ }
332
+ },
333
+ async 'select_cascade'(index){
334
+ console.log("sdsdsdsdsdsdsdsdsdsdsdsdsdsd")
335
+ if (this.$refs.service_show.data.fields[index].label == '工程安装费'||
336
+ this.$refs.service_show.data.fields[index].label == '材料费'||
337
+ this.$refs.service_show.data.fields[index].label == '人工费') {
338
+ debugger
339
+ let gcmoney = 0;
340
+ let clmoney=0;
341
+ let rgmoney=0;
342
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
343
+
344
+ if (this.$refs.service_show.data.fields[i].label == '工程安装费') {
345
+ gcmoney =this.$refs.service_show.data.fields[i].value
346
+ }
347
+ if (this.$refs.service_show.data.fields[i].label == '材料费') {
348
+ clmoney = this.$refs.service_show.data.fields[i].value
349
+ }
350
+ if (this.$refs.service_show.data.fields[i].label == '人工费') {
351
+ rgmoney = this.$refs.service_show.data.fields[i].value
352
+ }
353
+ if (this.$refs.service_show.data.fields[i].label === '费用合计') {
354
+ this.$refs.service_show.data.fields[i].value = parseInt(gcmoney)+parseInt(clmoney)+parseInt(rgmoney);
355
+ }
356
+ }
357
+ this.$refs.service_show.update()
358
+
359
+ }
360
+
361
+ if (this.$refs.service_show.data.fields[index].label == '合同总金额'){
362
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
363
+ if (this.$refs.service_show.data.fields[i].label === '未结总金额') {
364
+ this.$refs.service_show.data.fields[i].value = parseInt(this.$refs.service_show.data.fields[index].value);
365
+ }
366
+ }
367
+ }
368
+
369
+ /**
370
+ * 增加需求: 流程监控地址可以下拉选择
371
+ * 2020.07.23
372
+ */
373
+ if (this.$refs.service_show.data.fields[index].label === '县/区') {
374
+ let temp = this.$refs.service_show.data.fields[index].value
375
+ console.log('==============================县/区:' + temp)
376
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
377
+ // 控制设置级联
378
+ // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
379
+ if (this.$refs.service_show.data.fields[i].label === '街道名称') {
380
+ // this.$refs.service_show.data.fields[i].value = ''
381
+ let street = await this.$resetpost('rs/sql/singleTable', {
382
+ data: {
383
+ tablename: 't_street',
384
+ condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_pcd='${temp}'`
385
+ }
386
+ }, {resolveMsg: null, rejectMsg: null})
387
+ let streetrs = []
388
+ for (let i = 0; i < street.data.length; i++) {
389
+ let temp = {
390
+ label: street.data[i].f_street,
391
+ value: street.data[i].f_street
392
+ }
393
+ streetrs.push(temp)
394
+ }
395
+
396
+ this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
397
+ //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
398
+ // console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.data.fields[i].options)
399
+
400
+ this.$refs.service_show.update()
401
+ }
402
+ }
403
+ }
404
+ /**
405
+ * 增加需求: 流程监控地址可以下拉选择
406
+ * 2020.07.23
407
+ */
408
+ if (this.$refs.service_show.data.fields[index].label === '街道名称') {
409
+ let temp = this.$refs.service_show.data.fields[index].value
410
+ console.log('=============================街道:' + temp)
411
+ for (let i = 0; i < this.$refs.service_show.data.fields.length; i++) {
412
+ // 控制设置级联
413
+ // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
414
+ if (this.$refs.service_show.data.fields[i].label === '小区名称') {
415
+ // this.$refs.service_show.data.fields[i].value = ''
416
+
417
+ let area = await this.$resetpost('rs/sql/singleTable', {
418
+ data: {
419
+ tablename: 't_area',
420
+ condition: `f_filialeids = '${this.$login.f.f_orgids}' and f_street='${temp}'`
421
+ }
422
+ }, {resolveMsg: null, rejectMsg: null})
423
+ let arears = []
424
+ this.areaall=area.data;
425
+ for (let i = 0; i < area.data.length; i++) {
426
+ let temp = {
427
+ label: area.data[i].f_residential_area,
428
+ value: area.data[i].f_residential_area
429
+ }
430
+ arears.push(temp)
431
+ }
432
+ this.$refs.service_show.data.fields[i].options = [{label: '全部', value: ''}, ...arears]
433
+ //this.data.fields[i].options = [{label: '全部', value: ''}, ...streetrs]
434
+ console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~option:', this.$refs.service_show.data.fields[i].options)
435
+
436
+ this.$refs.service_show.update()
437
+
438
+ }
439
+ }
440
+ }
441
+ /**
442
+ * 增加需求: 流程监控地址可以下拉选择
443
+ * 2020.07.23
444
+ */
445
+ if(this.$refs.service_show.data.fields[index].label === '小区名称'){
446
+ for (let i = 0; i < this.areaall.length; i++) {
447
+ console.log("aaaaaaaaaaaa")
448
+ if(this.areaall[i].f_residential_area== this.$refs.service_show.data.fields[index].value){
449
+ console.log("abbbbbbbbb")
450
+ for (let j = 0; j < this.$refs.service_show.data.fields.length; j++) {
451
+ if(this.$refs.service_show.data.fields[j].label === '小区地址'){
452
+ console.log(this.areaall[i].f_area_address)
453
+ this.$refs.service_show.data.fields[j].value=this.areaall[i].f_area_address
454
+ }
455
+ }
456
+ }
457
+ }
458
+ }
459
+ /**
460
+ * 增加需求: 流程监控地址可以下拉选择,
461
+ * 2020.07.23
462
+ */
463
+ // 合成地址
464
+ if (
465
+ this.$refs.service_show.data.fields[index].label === '县/区' ||
466
+ this.$refs.service_show.data.fields[index].label === '街道名称' ||
467
+ this.$refs.service_show.data.fields[index].label === '小区名称' ||
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
+ ) {
473
+ console.log('即将合成地址')
474
+ var address = ''
475
+ let k=0;
476
+ for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
477
+ // 控制设置级联
478
+ // 源select所选的值 this.$refs.service_show.data.activitys.fields[index].value
479
+ // xxx xx xxx
480
+ if (this.$refs.service_show.data.fields[k].label === '县/区' && this.$refs.service_show.data.fields[k].value) {
481
+ address += this.$refs.service_show.data.fields[k].value
482
+ if (address.indexOf('湖北省')!=-1){
483
+ address = address.replace('湖北省','')
484
+ }
485
+ }
486
+ if (this.$refs.service_show.data.fields[k].label === '街道名称' && this.$refs.service_show.data.fields[k].value) {
487
+ address += this.$refs.service_show.data.fields[k].value
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
+
505
+ }
506
+ console.log('获取到的address=>' + address)
507
+ // 数据获取完毕时放入地址text
508
+ for (k = 0; k < this.$refs.service_show.data.fields.length; k++) {
509
+ if (this.$refs.service_show.data.fields[k].label === '地址') {
510
+ this.$refs.service_show.data.fields[k].value = address
511
+ console.log('修改fields[i].value后的值=>' + this.$refs.service_show.data.fields[k].value)
512
+ this.$refs.service_show.update()
513
+ }
514
+ }
515
+ }
516
+
517
+ },
518
+
519
+ },
520
+ watch: {
521
+ 'selectdata'() {
522
+ this.json_datas = this.$supervisory_vue
523
+ let sum = 0
524
+ let jsonData = {}
525
+ for (let i = 0; i < this.json_datas.activitys.length; i++) {
526
+ if (this.selectdata.defname == this.json_datas.activitys[i].title) {
527
+ jsonData = this.json_datas.activitys[i]
528
+ sum++
529
+ }
530
+ }
531
+ if (sum == 1) {
532
+ this.data = jsonData
533
+ this.initializtion()
534
+ // 完成时间和完成人,部门,分公司
535
+ if(this.selectdata.defname =='完工'){ this.data.filiale = this.selectdata.f_filiale
536
+ this.data.f_parentname = this.selectdata.f_parentname
537
+ this.data.operate_date = this.selectdata.sendtime
538
+ this.data.operator = this.selectdata.sender
539
+ this.showview = true
540
+ }else{
541
+ this.data.f_parentname = this.selectdata.f_parentname
542
+ this.data.operate_date = this.selectdata.finishtime
543
+ this.data.operator = this.selectdata.person
544
+ this.showview = true
545
+ }
546
+
547
+ } else if (sum == 0) {
548
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
549
+ } else {
550
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
551
+ }
552
+ },
553
+ deep: true
554
+ }
555
+ }
556
+ </script>