apply-clients 3.5.4-81 → 3.5.4-83

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 (47) hide show
  1. package/build/dev-server.js +6 -6
  2. package/package.json +1 -1
  3. package/src/App.vue +25 -25
  4. package/src/applyAndroid.js +72 -72
  5. package/src/components/android/Process/Processes/AppChargeManagement.vue +635 -637
  6. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +635 -637
  7. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  8. package/src/components/product/MaterialsManage/MaterialsBase.vue +181 -181
  9. package/src/components/product/MaterialsManage/MaterialsManage.vue +60 -60
  10. package/src/components/product/Process/ExplorationSelect.vue +497 -497
  11. package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
  12. package/src/components/product/ServiceView.vue +1026 -1026
  13. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +824 -824
  14. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -916
  15. package/src/filiale/fugou/android/AppChargeManagement.vue +8 -8
  16. package/src/filiale/fugou/android/AppServiceControl.vue +1 -1
  17. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -214
  18. package/src/filiale/gongyi/android/AppInstallationDetails.vue +500 -500
  19. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -309
  20. package/src/filiale/gongyi/android/AppSign.vue +170 -170
  21. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -298
  22. package/src/filiale/gongyi/android.js +18 -18
  23. package/src/filiale/gongyi/pc/ApplyUpload.vue +371 -371
  24. package/src/filiale/gongyi/pc/PcAddLogs.vue +221 -221
  25. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -218
  26. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -309
  27. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +894 -894
  28. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -1005
  29. package/src/filiale/gongyi/pc/addMaterialScience.vue +575 -575
  30. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -765
  31. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -277
  32. package/src/filiale/gongyi/pc.js +24 -24
  33. package/src/filiale/hongda/pc/SupervisoryList.vue +422 -422
  34. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -1925
  35. package/src/filiale/jinhuang/pc/addressAndUserinfoManagement.vue +203 -0
  36. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -589
  37. package/src/filiale/jinhuang/pc.js +8 -7
  38. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +466 -466
  39. package/src/filiale/yongzhouch/pc/ApplyUpload.vue +327 -327
  40. package/src/filiale/yongzhouch/pc/ExplorationSelect.vue +490 -490
  41. package/src/filiale/yongzhouch/pc/InstallationDetails.vue +610 -610
  42. package/src/filiale/yongzhouch/pc/ServiceControl.vue +1943 -1943
  43. package/src/filiale/yongzhouch/pc/devicesManagement.vue +488 -488
  44. package/src/filiale/yongzhouch/pc.js +10 -10
  45. package/src/main.js +1 -1
  46. package/app/src/main/java/com/example/phonechatbot/MainActivity.java +0 -50
  47. package/~/chatbot/main.py +0 -57
@@ -1,497 +1,497 @@
1
- <template>
2
- <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
3
- </template>
4
- <script>
5
- import {HttpResetClass} from 'vue-client'
6
- import Vue from 'vue'
7
- import {isEmpty} from "../../../Util";
8
- export default {
9
- title: '报建功能业务控制层',
10
- props: ['selectdata'],
11
- data () {
12
- return {
13
- show_data: null, // 给通用页面显示的数据
14
- showview: false, // 控制通用页面
15
- config: {}
16
- }
17
- },
18
- ready () {
19
- this.refurbish()
20
- },
21
- methods: {
22
- async refurbish () {
23
- // fields 字段填充值
24
- for (const item of this.selectdata.fields) {
25
- if (!item.value) {
26
- item.value = null
27
- }
28
-
29
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
30
- if (item.eval) {
31
- item.value = eval(item.default)
32
- } else {
33
- item.value = item.default
34
- }
35
- }
36
-
37
- if (this.selectdata[item.field]) {
38
- // 将json字符串格式化赋值给value
39
- if (String(this.selectdata[item.field]).startsWith("{")) {
40
- item.value = JSON.parse(this.selectdata[item.field])
41
- } else {
42
- item.value = this.selectdata[item.field]
43
- }
44
- }
45
- if (this.selectdata[item.field] === 0) {
46
- item.value = 0
47
- }
48
-
49
- // datepicker
50
- if (item.type === 'datepicker' && !item.value && item.default) {
51
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
52
- }
53
-
54
- // 如果配置类型为select,优先从参数列表获取options
55
- if (item.type === 'select' || item.type === 'checkbox') {
56
- if (item.param) {
57
- let temp = this.$appdata.getParam(item.label)
58
-
59
- if (temp && temp.length > 0) {
60
- item.options = temp
61
- }
62
-
63
- if (item.paramLabel) {
64
- temp = this.$appdata.getParam(item.paramLabel)
65
- if (temp && temp.length > 0) {
66
- item.options = temp
67
- }
68
- }
69
- }
70
-
71
- if (item.ready) {
72
- item.options = await this[item.ready]()
73
- }
74
- }
75
-
76
-
77
- if (item.type === 'checkbox') {
78
- if (this.selectdata[item.field]) {
79
- item.value = JSON.parse(this.selectdata[item.field])
80
- } else {
81
- item.value = []
82
- }
83
- }
84
- }
85
-
86
- // 控制组件
87
- if (this.selectdata.components) {
88
- this.selectdata.components.forEach(item => {
89
- item.mark =item.mark
90
- })
91
- }
92
-
93
- // 初始化onetomany
94
- if (this.selectdata.onetomany) {
95
- for (const item of this.selectdata.onetomany) {
96
- let res = null
97
- if (item.queryEvent) {
98
- res = this[item.queryEvent]()
99
- } else {
100
- let data = {
101
- tablename: item.tables[0],
102
- condition: `f_process_id='${this.selectdata.f_process_id}'`
103
- }
104
- res = await this.$resetpost(
105
- 'rs/sql/apply_singleTable',
106
- {data: data},
107
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
108
- )
109
- }
110
-
111
- item.rows = res.data
112
-
113
- // 初始化onetomany中的fields
114
- for (const field of item.fields) {
115
- if (!field.value) {
116
- if (field.value !== 0) {
117
- field.value = null
118
- }
119
- }
120
-
121
- if (field.default || field.default === 0) {
122
- field.value = field.default
123
- }
124
-
125
- // datepicker
126
- if (field.type === 'datepicker' && !field.value && field.default) {
127
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
128
- }
129
-
130
- if (field.type === 'select') {
131
- let temp = this.$appdata.getParam(field.label)
132
-
133
- if (temp && temp.length > 0) {
134
- field.options = temp
135
- }
136
-
137
- if (field.paramLabel) {
138
- temp = this.$appdata.getParam(field.paramLabel)
139
- if (temp && temp.length > 0) {
140
- item.options = temp
141
- }
142
- }
143
- }
144
- }
145
- }
146
- }
147
-
148
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
149
- let temp = JSON.parse(JSON.stringify(this.selectdata))
150
-
151
- this.show_data = temp
152
- this.$nextTick(() => {
153
- this.showview = true
154
- })
155
- },
156
- getLableValue(label) {
157
- for (const item of this.show_data.fields) {
158
- if (item.label === label && item.type !== 'number') {
159
- return item.value || ''
160
- }
161
- if (item.label === label && item.type === 'number') {
162
- return item.value || 0
163
- }
164
- }
165
- },
166
- getLableOptions(label) {
167
- for (const item of this.show_data.fields) {
168
- if (item.label === label) {
169
- return item.options
170
- }
171
- }
172
- },
173
- setLabelValue(label, value) {
174
- for (const item of this.show_data.fields) {
175
- if (item.label === label) {
176
- item.value = value
177
- this.show_data[item.field] = value
178
- }
179
- }
180
- },
181
- setLabelOptions(label, options) {
182
- for (const item of this.show_data.fields) {
183
- if (item.label === label) {
184
- item.options = options
185
- }
186
- }
187
- },
188
- showLabels(...labels) {
189
- for (const item of this.show_data.fields) {
190
- if (labels.includes(item.label)) {
191
- item.hidden = false
192
- }
193
- }
194
- },
195
- hideLabels(...labels) {
196
- for (const item of this.show_data.fields) {
197
- if (labels.includes(item.label)) {
198
- item.hidden = true
199
- }
200
- }
201
- },
202
- requiredLabels(...labels) {
203
- for (const item of this.show_data.fields) {
204
- if (labels.includes(item.label)) {
205
- item.required = true
206
- }
207
- }
208
- },
209
- electiveLabels(...labels) {
210
- for (const item of this.show_data.fields) {
211
- if (labels.includes(item.label)) {
212
- item.required = false
213
- }
214
- }
215
- },
216
- readonlyLabels(...labels) {
217
- for (const item of this.show_data.fields) {
218
- if (labels.includes(item.label)) {
219
- item.readonly = true
220
- item.disabled = true
221
- }
222
- }
223
- },
224
- readwriteLabels(...labels) {
225
- for (const item of this.show_data.fields) {
226
- if (labels.includes(item.label)) {
227
- item.readonly = false
228
- item.disabled = false
229
- }
230
- }
231
- },
232
- async getPrice (f_price_id) {
233
- console.log('=======================')
234
- console.log(f_price_id)
235
-
236
- let data = {
237
- condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
238
- }
239
- // if(this.Pricetype==='机表'){
240
- // data.condition=`sp.f_custom = '机表'`
241
- // }
242
- // if(this.Pricetype==='非机表'){
243
- // data.condition=`sp.f_custom = '非机表'`
244
- // }
245
-
246
- if (!isEmpty(f_price_id)) {
247
- data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
248
- }
249
- let http = new HttpResetClass()
250
- let res = await http.load(
251
- 'POST',
252
- `rs/sql/applyGetPrice`,
253
- {data: data},
254
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
255
- )
256
-
257
- let a= res.data.map(item => {
258
- return {
259
- label: item.f_price_name,
260
- value: item
261
- }
262
- })
263
- this.selectdata.fields.forEach(field => {
264
- if (field.label === '气价名称') {
265
- field.options = a}
266
- })
267
- return a
268
- },
269
- },
270
- events: {
271
- // 选择气价
272
- 'priceChange' (index) {
273
- if (isEmpty(this.show_data.stairPrice)) {
274
- return
275
- }
276
-
277
- let stairPrice = this.getLableValue('气价名称')
278
-
279
- this.setLabelValue('气价类型', stairPrice.f_price_type)
280
- this.setLabelValue('用气性质', stairPrice.f_gasproperties)
281
- this.setLabelValue('价格', stairPrice.f_price)
282
- this.setLabelValue('客户类型', stairPrice.f_user_type)
283
- this.show_data.f_price_id = stairPrice.id
284
- this.show_data.f_price_name = stairPrice.f_price_name
285
- },
286
- // 信息修改初始化
287
- 'modifyInfoReadyEvent' () {
288
- this.$getConfig(this, 'UserAddress')
289
-
290
- let f_address_type = this.show_data.f_address_type
291
-
292
- for (const item of this.show_data.fields) {
293
- if (f_address_type === '民用市区') {
294
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
295
- item.hidden = false
296
- item.required = true
297
- }
298
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
299
- item.hidden = false
300
- item.required = false
301
- }
302
- if (item.label === '地址') {
303
- item.readonly = true
304
- }
305
- }
306
- if (f_address_type === '民用乡镇') {
307
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
308
- item.hidden = false
309
- item.required = true
310
- }
311
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
312
- item.hidden = false
313
- item.required = false
314
- }
315
- if (item.label === '楼层') {
316
- item.hidden = true
317
- item.required = false
318
- }
319
- if (item.label === '地址') {
320
- item.readonly = true
321
- }
322
- }
323
- if (f_address_type === '特殊地址') {
324
- if (item.label === '区/县' || item.label === '街道/乡镇') {
325
- item.hidden = false
326
- item.required = true
327
- }
328
- if (item.label === '集收单位') {
329
- item.hidden = false
330
- item.required = false
331
- }
332
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
333
- item.hidden = true
334
- item.required = false
335
- }
336
- if (item.label === '地址') {
337
- item.readonly = false
338
- }
339
- }
340
- }
341
- },
342
- // 信息修改
343
- async 'modifyInfo' () {
344
- let res = await this.$resetpost(
345
- `rs/logic/modifyUserInfo`,
346
- this.show_data,
347
- {resolveMsg: null, rejectMsg: '用户信息修改失败!!!'}
348
- )
349
- this.$dispatch('loadPage')
350
- },
351
- async 'stopApply' () {
352
-
353
- let data = {
354
- data: this.show_data,
355
- user: this.$login.f
356
- }
357
-
358
- let res = await this.$resetpost(
359
- `rs/logic/stopApply`,
360
- {data: data},
361
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
362
- )
363
-
364
- this.$dispatch('loadPage')
365
- },
366
- async 'pauseApply' () {
367
-
368
- let data = {
369
- data: this.show_data,
370
- user: this.$login.f
371
- }
372
-
373
- let res = await this.$resetpost(
374
- `rs/logic/pauseApply`,
375
- {data: data},
376
- {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
377
- )
378
-
379
- this.$dispatch('loadPage')
380
- },
381
- // 获取view层button事件
382
- async 'button' (){
383
-
384
- let res = await this.$resetpost(
385
- `rs/entity/t_apply`,
386
- this.show_data,
387
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
388
- )
389
-
390
- this.$dispatch('loadPage')
391
- },
392
- // 失去焦点出触发事件
393
- 'onchange' (index) {
394
- if (this.show_data.title === '信息修改') {
395
- if (
396
- this.show_data.fields[index].label === '区/县' ||
397
- this.show_data.fields[index].label === '街道/乡镇' ||
398
- this.show_data.fields[index].label === '集收单位' ||
399
- this.show_data.fields[index].label === '楼号/组' ||
400
- this.show_data.fields[index].label === '单元/排' ||
401
- this.show_data.fields[index].label === '楼层' ||
402
- this.show_data.fields[index].label === '门牌号'
403
- ) {
404
-
405
- let f_pcd = this.getLableValue('区/县') || ''
406
- let f_street = this.getLableValue('街道/乡镇') || ''
407
- let f_residential_area = this.getLableValue('集收单位') || ''
408
- let f_building = this.getLableValue('楼号/组') || ''
409
- let f_building_suffix = f_building ? this.config.f_building_suffix : ''
410
- let f_unit = this.getLableValue('单元/排') || ''
411
- let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
412
- let f_floor = this.getLableValue('楼层') || ''
413
- let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
414
- let f_room = this.getLableValue('门牌号') || ''
415
- let f_room_suffix = f_room ? this.config.f_room_suffix : ''
416
-
417
- let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
418
- this.setLabelValue("地址", f_address)
419
- }
420
- }
421
- },
422
- 'onblur' (index) {},
423
- 'oninput' (index) {},
424
- 'initializtionView' () {},
425
- async 'onchangeModal' (index, fieldIndex) {
426
- },
427
- async 'onblurModal' (index, fieldIndex) {
428
-
429
- },
430
- async 'oninputModal' (index, fieldIndex) {
431
-
432
- },
433
- async 'onetomanydelete' (index, rowIndex) {
434
-
435
- let http = new HttpResetClass()
436
-
437
- let res = await http.load(
438
- 'DELETE',
439
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
440
- null,
441
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
442
- )
443
-
444
- res = await this.$resetpost(
445
- 'rs/entity/t_apply',
446
- this.show_data
447
- )
448
-
449
- this.$dispatch('breakControl', this.show_data)
450
- },
451
- async 'onetomanyupdate' (index, rowIndex) {
452
- let data = this.show_data.onetomany[index].rows[rowIndex]
453
-
454
- this.show_data.onetomany[index].fields.forEach(item => {
455
- data[item.field] = item.value
456
- })
457
- let res = await this.$resetpost(
458
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
459
- data
460
- )
461
-
462
- res = await this.$resetpost(
463
- 'rs/entity/t_apply',
464
- this.show_data
465
- )
466
-
467
- this.$dispatch('breakControl', this.show_data)
468
- },
469
- async 'onetomanyadd' (index) {
470
- let data = {
471
- f_process_id : this.show_data.f_process_id,
472
- f_operator_id: this.$login.f.id,
473
- f_operator: this.$login.f.name,
474
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
475
- f_orgid: this.$login.f.orgid,
476
- f_orgname: this.$login.f.orgs
477
- }
478
- this.show_data.onetomany[index].fields.forEach(item => {
479
- data[item.field] = item.value
480
- })
481
- let res = await this.$resetpost(
482
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
483
- data
484
- )
485
-
486
- res = await this.$resetpost(
487
- 'rs/entity/t_apply',
488
- this.show_data
489
- )
490
-
491
- this.$dispatch('breakControl', this.show_data)
492
- }
493
- },
494
- watch:{
495
- }
496
- }
497
- </script>
1
+ <template>
2
+ <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
3
+ </template>
4
+ <script>
5
+ import {HttpResetClass} from 'vue-client'
6
+ import Vue from 'vue'
7
+ import {isEmpty} from "../../../Util";
8
+ export default {
9
+ title: '报建功能业务控制层',
10
+ props: ['selectdata'],
11
+ data () {
12
+ return {
13
+ show_data: null, // 给通用页面显示的数据
14
+ showview: false, // 控制通用页面
15
+ config: {}
16
+ }
17
+ },
18
+ ready () {
19
+ this.refurbish()
20
+ },
21
+ methods: {
22
+ async refurbish () {
23
+ // fields 字段填充值
24
+ for (const item of this.selectdata.fields) {
25
+ if (!item.value) {
26
+ item.value = null
27
+ }
28
+
29
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
30
+ if (item.eval) {
31
+ item.value = eval(item.default)
32
+ } else {
33
+ item.value = item.default
34
+ }
35
+ }
36
+
37
+ if (this.selectdata[item.field]) {
38
+ // 将json字符串格式化赋值给value
39
+ if (String(this.selectdata[item.field]).startsWith("{")) {
40
+ item.value = JSON.parse(this.selectdata[item.field])
41
+ } else {
42
+ item.value = this.selectdata[item.field]
43
+ }
44
+ }
45
+ if (this.selectdata[item.field] === 0) {
46
+ item.value = 0
47
+ }
48
+
49
+ // datepicker
50
+ if (item.type === 'datepicker' && !item.value && item.default) {
51
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
52
+ }
53
+
54
+ // 如果配置类型为select,优先从参数列表获取options
55
+ if (item.type === 'select' || item.type === 'checkbox') {
56
+ if (item.param) {
57
+ let temp = this.$appdata.getParam(item.label)
58
+
59
+ if (temp && temp.length > 0) {
60
+ item.options = temp
61
+ }
62
+
63
+ if (item.paramLabel) {
64
+ temp = this.$appdata.getParam(item.paramLabel)
65
+ if (temp && temp.length > 0) {
66
+ item.options = temp
67
+ }
68
+ }
69
+ }
70
+
71
+ if (item.ready) {
72
+ item.options = await this[item.ready]()
73
+ }
74
+ }
75
+
76
+
77
+ if (item.type === 'checkbox') {
78
+ if (this.selectdata[item.field]) {
79
+ item.value = JSON.parse(this.selectdata[item.field])
80
+ } else {
81
+ item.value = []
82
+ }
83
+ }
84
+ }
85
+
86
+ // 控制组件
87
+ if (this.selectdata.components) {
88
+ this.selectdata.components.forEach(item => {
89
+ item.mark =item.mark
90
+ })
91
+ }
92
+
93
+ // 初始化onetomany
94
+ if (this.selectdata.onetomany) {
95
+ for (const item of this.selectdata.onetomany) {
96
+ let res = null
97
+ if (item.queryEvent) {
98
+ res = this[item.queryEvent]()
99
+ } else {
100
+ let data = {
101
+ tablename: item.tables[0],
102
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
103
+ }
104
+ res = await this.$resetpost(
105
+ 'rs/sql/apply_singleTable',
106
+ {data: data},
107
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
108
+ )
109
+ }
110
+
111
+ item.rows = res.data
112
+
113
+ // 初始化onetomany中的fields
114
+ for (const field of item.fields) {
115
+ if (!field.value) {
116
+ if (field.value !== 0) {
117
+ field.value = null
118
+ }
119
+ }
120
+
121
+ if (field.default || field.default === 0) {
122
+ field.value = field.default
123
+ }
124
+
125
+ // datepicker
126
+ if (field.type === 'datepicker' && !field.value && field.default) {
127
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
128
+ }
129
+
130
+ if (field.type === 'select') {
131
+ let temp = this.$appdata.getParam(field.label)
132
+
133
+ if (temp && temp.length > 0) {
134
+ field.options = temp
135
+ }
136
+
137
+ if (field.paramLabel) {
138
+ temp = this.$appdata.getParam(field.paramLabel)
139
+ if (temp && temp.length > 0) {
140
+ item.options = temp
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
149
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
150
+
151
+ this.show_data = temp
152
+ this.$nextTick(() => {
153
+ this.showview = true
154
+ })
155
+ },
156
+ getLableValue(label) {
157
+ for (const item of this.show_data.fields) {
158
+ if (item.label === label && item.type !== 'number') {
159
+ return item.value || ''
160
+ }
161
+ if (item.label === label && item.type === 'number') {
162
+ return item.value || 0
163
+ }
164
+ }
165
+ },
166
+ getLableOptions(label) {
167
+ for (const item of this.show_data.fields) {
168
+ if (item.label === label) {
169
+ return item.options
170
+ }
171
+ }
172
+ },
173
+ setLabelValue(label, value) {
174
+ for (const item of this.show_data.fields) {
175
+ if (item.label === label) {
176
+ item.value = value
177
+ this.show_data[item.field] = value
178
+ }
179
+ }
180
+ },
181
+ setLabelOptions(label, options) {
182
+ for (const item of this.show_data.fields) {
183
+ if (item.label === label) {
184
+ item.options = options
185
+ }
186
+ }
187
+ },
188
+ showLabels(...labels) {
189
+ for (const item of this.show_data.fields) {
190
+ if (labels.includes(item.label)) {
191
+ item.hidden = false
192
+ }
193
+ }
194
+ },
195
+ hideLabels(...labels) {
196
+ for (const item of this.show_data.fields) {
197
+ if (labels.includes(item.label)) {
198
+ item.hidden = true
199
+ }
200
+ }
201
+ },
202
+ requiredLabels(...labels) {
203
+ for (const item of this.show_data.fields) {
204
+ if (labels.includes(item.label)) {
205
+ item.required = true
206
+ }
207
+ }
208
+ },
209
+ electiveLabels(...labels) {
210
+ for (const item of this.show_data.fields) {
211
+ if (labels.includes(item.label)) {
212
+ item.required = false
213
+ }
214
+ }
215
+ },
216
+ readonlyLabels(...labels) {
217
+ for (const item of this.show_data.fields) {
218
+ if (labels.includes(item.label)) {
219
+ item.readonly = true
220
+ item.disabled = true
221
+ }
222
+ }
223
+ },
224
+ readwriteLabels(...labels) {
225
+ for (const item of this.show_data.fields) {
226
+ if (labels.includes(item.label)) {
227
+ item.readonly = false
228
+ item.disabled = false
229
+ }
230
+ }
231
+ },
232
+ async getPrice (f_price_id) {
233
+ console.log('=======================')
234
+ console.log(f_price_id)
235
+
236
+ let data = {
237
+ condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
238
+ }
239
+ // if(this.Pricetype==='机表'){
240
+ // data.condition=`sp.f_custom = '机表'`
241
+ // }
242
+ // if(this.Pricetype==='非机表'){
243
+ // data.condition=`sp.f_custom = '非机表'`
244
+ // }
245
+
246
+ if (!isEmpty(f_price_id)) {
247
+ data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
248
+ }
249
+ let http = new HttpResetClass()
250
+ let res = await http.load(
251
+ 'POST',
252
+ `rs/sql/applyGetPrice`,
253
+ {data: data},
254
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
255
+ )
256
+
257
+ let a= res.data.map(item => {
258
+ return {
259
+ label: item.f_price_name,
260
+ value: item
261
+ }
262
+ })
263
+ this.selectdata.fields.forEach(field => {
264
+ if (field.label === '气价名称') {
265
+ field.options = a}
266
+ })
267
+ return a
268
+ },
269
+ },
270
+ events: {
271
+ // 选择气价
272
+ 'priceChange' (index) {
273
+ if (isEmpty(this.show_data.stairPrice)) {
274
+ return
275
+ }
276
+
277
+ let stairPrice = this.getLableValue('气价名称')
278
+
279
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
280
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
281
+ this.setLabelValue('价格', stairPrice.f_price)
282
+ this.setLabelValue('客户类型', stairPrice.f_user_type)
283
+ this.show_data.f_price_id = stairPrice.id
284
+ this.show_data.f_price_name = stairPrice.f_price_name
285
+ },
286
+ // 信息修改初始化
287
+ 'modifyInfoReadyEvent' () {
288
+ this.$getConfig(this, 'UserAddress')
289
+
290
+ let f_address_type = this.show_data.f_address_type
291
+
292
+ for (const item of this.show_data.fields) {
293
+ if (f_address_type === '民用市区') {
294
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
295
+ item.hidden = false
296
+ item.required = true
297
+ }
298
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
299
+ item.hidden = false
300
+ item.required = false
301
+ }
302
+ if (item.label === '地址') {
303
+ item.readonly = true
304
+ }
305
+ }
306
+ if (f_address_type === '民用乡镇') {
307
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
308
+ item.hidden = false
309
+ item.required = true
310
+ }
311
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
312
+ item.hidden = false
313
+ item.required = false
314
+ }
315
+ if (item.label === '楼层') {
316
+ item.hidden = true
317
+ item.required = false
318
+ }
319
+ if (item.label === '地址') {
320
+ item.readonly = true
321
+ }
322
+ }
323
+ if (f_address_type === '特殊地址') {
324
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
325
+ item.hidden = false
326
+ item.required = true
327
+ }
328
+ if (item.label === '集收单位') {
329
+ item.hidden = false
330
+ item.required = false
331
+ }
332
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
333
+ item.hidden = true
334
+ item.required = false
335
+ }
336
+ if (item.label === '地址') {
337
+ item.readonly = false
338
+ }
339
+ }
340
+ }
341
+ },
342
+ // 信息修改
343
+ async 'modifyInfo' () {
344
+ let res = await this.$resetpost(
345
+ `rs/logic/modifyUserInfo`,
346
+ this.show_data,
347
+ {resolveMsg: null, rejectMsg: '用户信息修改失败!!!'}
348
+ )
349
+ this.$dispatch('loadPage')
350
+ },
351
+ async 'stopApply' () {
352
+
353
+ let data = {
354
+ data: this.show_data,
355
+ user: this.$login.f
356
+ }
357
+
358
+ let res = await this.$resetpost(
359
+ `rs/logic/stopApply`,
360
+ {data: data},
361
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
362
+ )
363
+
364
+ this.$dispatch('loadPage')
365
+ },
366
+ async 'pauseApply' () {
367
+
368
+ let data = {
369
+ data: this.show_data,
370
+ user: this.$login.f
371
+ }
372
+
373
+ let res = await this.$resetpost(
374
+ `rs/logic/pauseApply`,
375
+ {data: data},
376
+ {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
377
+ )
378
+
379
+ this.$dispatch('loadPage')
380
+ },
381
+ // 获取view层button事件
382
+ async 'button' (){
383
+
384
+ let res = await this.$resetpost(
385
+ `rs/entity/t_apply`,
386
+ this.show_data,
387
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
388
+ )
389
+
390
+ this.$dispatch('loadPage')
391
+ },
392
+ // 失去焦点出触发事件
393
+ 'onchange' (index) {
394
+ if (this.show_data.title === '信息修改') {
395
+ if (
396
+ this.show_data.fields[index].label === '区/县' ||
397
+ this.show_data.fields[index].label === '街道/乡镇' ||
398
+ this.show_data.fields[index].label === '集收单位' ||
399
+ this.show_data.fields[index].label === '楼号/组' ||
400
+ this.show_data.fields[index].label === '单元/排' ||
401
+ this.show_data.fields[index].label === '楼层' ||
402
+ this.show_data.fields[index].label === '门牌号'
403
+ ) {
404
+
405
+ let f_pcd = this.getLableValue('区/县') || ''
406
+ let f_street = this.getLableValue('街道/乡镇') || ''
407
+ let f_residential_area = this.getLableValue('集收单位') || ''
408
+ let f_building = this.getLableValue('楼号/组') || ''
409
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
410
+ let f_unit = this.getLableValue('单元/排') || ''
411
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
412
+ let f_floor = this.getLableValue('楼层') || ''
413
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
414
+ let f_room = this.getLableValue('门牌号') || ''
415
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
416
+
417
+ let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
418
+ this.setLabelValue("地址", f_address)
419
+ }
420
+ }
421
+ },
422
+ 'onblur' (index) {},
423
+ 'oninput' (index) {},
424
+ 'initializtionView' () {},
425
+ async 'onchangeModal' (index, fieldIndex) {
426
+ },
427
+ async 'onblurModal' (index, fieldIndex) {
428
+
429
+ },
430
+ async 'oninputModal' (index, fieldIndex) {
431
+
432
+ },
433
+ async 'onetomanydelete' (index, rowIndex) {
434
+
435
+ let http = new HttpResetClass()
436
+
437
+ let res = await http.load(
438
+ 'DELETE',
439
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
440
+ null,
441
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
442
+ )
443
+
444
+ res = await this.$resetpost(
445
+ 'rs/entity/t_apply',
446
+ this.show_data
447
+ )
448
+
449
+ this.$dispatch('breakControl', this.show_data)
450
+ },
451
+ async 'onetomanyupdate' (index, rowIndex) {
452
+ let data = this.show_data.onetomany[index].rows[rowIndex]
453
+
454
+ this.show_data.onetomany[index].fields.forEach(item => {
455
+ data[item.field] = item.value
456
+ })
457
+ let res = await this.$resetpost(
458
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
459
+ data
460
+ )
461
+
462
+ res = await this.$resetpost(
463
+ 'rs/entity/t_apply',
464
+ this.show_data
465
+ )
466
+
467
+ this.$dispatch('breakControl', this.show_data)
468
+ },
469
+ async 'onetomanyadd' (index) {
470
+ let data = {
471
+ f_process_id : this.show_data.f_process_id,
472
+ f_operator_id: this.$login.f.id,
473
+ f_operator: this.$login.f.name,
474
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
475
+ f_orgid: this.$login.f.orgid,
476
+ f_orgname: this.$login.f.orgs
477
+ }
478
+ this.show_data.onetomany[index].fields.forEach(item => {
479
+ data[item.field] = item.value
480
+ })
481
+ let res = await this.$resetpost(
482
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
483
+ data
484
+ )
485
+
486
+ res = await this.$resetpost(
487
+ 'rs/entity/t_apply',
488
+ this.show_data
489
+ )
490
+
491
+ this.$dispatch('breakControl', this.show_data)
492
+ }
493
+ },
494
+ watch:{
495
+ }
496
+ }
497
+ </script>