apply-clients 3.4.63 → 3.4.64

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 (94) hide show
  1. package/build/dev-server.js +119 -119
  2. package/dist-android/static/18.js +2 -2
  3. package/dist-android/static/18.js.map +1 -1
  4. package/dist-android/static/19.js +2 -2
  5. package/dist-android/static/19.js.map +1 -1
  6. package/dist-android/static/24.js +2 -2
  7. package/dist-android/static/24.js.map +1 -1
  8. package/dist-android/static/25.js +2 -2
  9. package/dist-android/static/25.js.map +1 -1
  10. package/dist-android/static/26.js +2 -2
  11. package/dist-android/static/26.js.map +1 -1
  12. package/dist-android/static/28.js +2 -2
  13. package/dist-android/static/28.js.map +1 -1
  14. package/dist-android/static/30.js +2 -2
  15. package/dist-android/static/30.js.map +1 -1
  16. package/dist-android/static/34.js +2 -2
  17. package/dist-android/static/34.js.map +1 -1
  18. package/dist-android/static/43.js +2 -2
  19. package/dist-android/static/43.js.map +1 -1
  20. package/dist-android/static/47.js +2 -2
  21. package/dist-android/static/47.js.map +1 -1
  22. package/dist-android/static/50.js +2 -2
  23. package/dist-android/static/50.js.map +1 -1
  24. package/dist-android/static/52.js +2 -2
  25. package/dist-android/static/52.js.map +1 -1
  26. package/dist-android/static/53.js +2 -2
  27. package/dist-android/static/53.js.map +1 -1
  28. package/dist-android/static/54.js +2 -2
  29. package/dist-android/static/54.js.map +1 -1
  30. package/dist-android/static/60.js +2 -2
  31. package/dist-android/static/60.js.map +1 -1
  32. package/dist-android/static/63.js +2 -2
  33. package/dist-android/static/63.js.map +1 -1
  34. package/dist-android/static/64.js +2 -2
  35. package/dist-android/static/64.js.map +1 -1
  36. package/dist-android/static/78.js +2 -2
  37. package/dist-android/static/78.js.map +1 -1
  38. package/dist-android/static/83.js +2 -2
  39. package/dist-android/static/83.js.map +1 -1
  40. package/dist-android/static/84.js +2 -2
  41. package/dist-android/static/84.js.map +1 -1
  42. package/dist-android/static/86.js +2 -2
  43. package/dist-android/static/86.js.map +1 -1
  44. package/dist-android/static/87.js +2 -2
  45. package/dist-android/static/87.js.map +1 -1
  46. package/dist-android/static/89.js +2 -2
  47. package/dist-android/static/89.js.map +1 -1
  48. package/dist-android/static/97.js +2 -2
  49. package/dist-android/static/97.js.map +1 -1
  50. package/dist-android/static/app.js +80 -80
  51. package/dist-android/static/app.js.map +1 -1
  52. package/dist.7z +0 -0
  53. package/package.json +1 -1
  54. package/src/components/android/AppSign.vue +154 -154
  55. package/src/components/android/AppTakePic.vue +143 -143
  56. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  57. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  58. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  59. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  60. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  61. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  62. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -537
  63. package/src/components/product/ApplyCharge/ApplyChargeList.vue +470 -470
  64. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -445
  65. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  66. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  67. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  68. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  69. package/src/components/product/Process/Service/ServiceControl.vue +18 -41
  70. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  71. package/src/components/product/Process/ShowBackReason.vue +33 -33
  72. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +882 -882
  73. package/src/components/product/VueUtils/ApplyUpload.vue +287 -287
  74. package/src/filiale/gehua/pc/ServiceControl.vue +1938 -1938
  75. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  76. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +520 -520
  77. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  78. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  79. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  80. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  81. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +724 -724
  82. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  83. package/src/filiale/guangxi/pc/Process/Service/ShowBackReason.vue +33 -33
  84. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  85. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +517 -517
  86. package/src/filiale/guangxi/pc/Process/ShowBackReason.vue +33 -33
  87. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -735
  88. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  89. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  90. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  91. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  92. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  93. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -621
  94. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1108
@@ -1,1922 +1,1922 @@
1
- <template>
2
- <div class="" v-if="showview">
3
- <show-back-reason :selectdata="show_data"></show-back-reason>
4
- <service-view v-ref:serviceview :data="show_data"></service-view>
5
- </div>
6
- </template>
7
- <script>
8
- import Vue from 'vue'
9
- import {HttpResetClass} from 'vue-client'
10
- import {isEmpty} from "../../../../../components/Util";
11
-
12
- // Date格式化
13
- Date.prototype.Format = function (fmt) {
14
- var o = {
15
- "M+": this.getMonth() + 1, //月份
16
- "d+": this.getDate(), //日
17
- "H+": this.getHours(), //小时
18
- "m+": this.getMinutes(), //分
19
- "s+": this.getSeconds(), //秒
20
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
21
- "S": this.getMilliseconds() //毫秒
22
- };
23
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
24
- for (var k in o)
25
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
26
- return fmt;
27
- }
28
-
29
- export default {
30
- title: '报建流程业务控制层',
31
- props: ['selectdata'],
32
- data () {
33
- return {
34
- data: null, // 数据库数据,json配置文件数据的数据集合
35
- json_datas: null, // Json配置文件集合
36
- showview: false, // 控制显示service-view组件
37
- show_data: null, // 给view层显示的数据
38
- config: {},
39
- Pricetype:''
40
- }
41
- },
42
- ready () {
43
- this.refurbish()
44
- this.servicer()
45
- this.ceshi()
46
- },
47
- methods: {
48
- async servicer(){
49
- let data = {
50
- tablename: 't_user',
51
- condition: `1=1`
52
- }
53
- let http = new HttpResetClass()
54
- let res = await http.load(
55
- 'POST',
56
- `rs/sql/singleTable`,
57
- {data: data},
58
- {resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
59
- )
60
- this.setLabelOptions('业务办理人员', res.data.map(item => {
61
- return {
62
- label: item.name,
63
- value: item.name
64
- }
65
- }))
66
- },
67
- async ceshi(){
68
- for (let i = 0; i < this.show_data.fields.length; i++) {
69
- if (this.show_data.defname==='报装申请' && this.show_data.fields[i].label === '合同编号') {
70
- debugger
71
- let http2 = new HttpResetClass()
72
- let applyNum = await http2.load('POST', 'rs/logic/getProjectNo', {
73
- data: {
74
- f_filiale: this.$login.f.orgs,
75
- f_order_id: this.selectdata.f_order_id
76
- }
77
- }, {resolveMsg: null, rejectMsg: null})
78
- debugger
79
- console.log("生成的合同编号为:" + applyNum.data)
80
- this.show_data.fields[i].value = applyNum.data
81
- }
82
- }
83
- },
84
- // async servicer(){
85
- // debugger
86
- // let data = {
87
- // tablename: 't_user',
88
- // condition: `1=1`
89
- // }
90
- // let http = new HttpResetClass()
91
- // let res = await http.load(
92
- // 'POST',
93
- // `rs/sql/singleTable`,
94
- // {data: data},
95
- // {resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
96
- // )
97
- // debugger
98
- // this.setLabelOptions('服务人', res.data.map(item => {
99
- // return {
100
- // label: item.name,
101
- // value: item.name
102
- // }
103
- // }))
104
- // },
105
- // 组件初始化操作
106
- async refurbish() {
107
- this.json_datas = this.$workflow_vue
108
- let sum = 0
109
- let jsonData = {}
110
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
111
- this.$showMessage("网络故障,请刷新页面")
112
- return
113
- }
114
- this.json_datas.activitys.forEach(item => {
115
- if (this.selectdata.defname === item.title) {
116
- jsonData = item // 拿到当前节点的json配置信息
117
- sum++ // 节点名一样的个数
118
- }
119
- return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
120
- })
121
-
122
- if (sum === 0) {
123
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
124
- return
125
- }
126
- if (sum > 1) {
127
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
128
- return
129
- }
130
-
131
- this.selectdata = Object.assign({}, this.selectdata, jsonData)
132
-
133
- // fields 字段填充值
134
- for (const item of this.selectdata.fields) {
135
- if (!item.value) {
136
- item.value = null
137
- }
138
-
139
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
140
- if (item.eval) {
141
- item.value = eval(item.default)
142
- } else {
143
- item.value = item.default
144
- }
145
- }
146
-
147
- if (this.selectdata[item.field]) {
148
- // 将json字符串格式化赋值给value
149
- if (String(this.selectdata[item.field]).startsWith("{")) {
150
- item.value = JSON.parse(this.selectdata[item.field])
151
- } else {
152
- item.value = this.selectdata[item.field]
153
- }
154
- }
155
- if (this.selectdata[item.field] === 0) {
156
- item.value = 0
157
- }
158
-
159
- // datepicker
160
- if (item.type === 'datepicker' && !item.value && item.default) {
161
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
162
- }
163
-
164
- // 如果配置类型为select,优先从参数列表获取options
165
- if (item.type === 'select' || item.type === 'checkbox') {
166
- if (item.param) {
167
- let temp = this.$appdata.getParam(item.label)
168
-
169
- if (temp && temp.length > 0) {
170
- item.options = temp
171
- }
172
-
173
- if (item.paramLabel) {
174
- temp = this.$appdata.getParam(item.paramLabel)
175
- if (temp && temp.length > 0) {
176
- item.options = temp
177
- }
178
- }
179
- }
180
-
181
- if (item.ready) {
182
- item.options = await this[item.ready]()
183
- }
184
- }
185
-
186
-
187
- if (item.type === 'checkbox') {
188
- if (this.selectdata[item.field]) {
189
- item.value = JSON.parse(this.selectdata[item.field])
190
- } else {
191
- item.value = []
192
- }
193
- }
194
-
195
- this.selectdata[item.field] = item.value
196
- }
197
-
198
- // 控制组件
199
- if (this.selectdata.components) {
200
- this.selectdata.components.forEach(item => {
201
- if (!item.mark) {
202
- item.mark = 0
203
- }
204
- })
205
- }
206
-
207
- // 初始化onetomany
208
- if (this.selectdata.onetomany) {
209
- for (const item of this.selectdata.onetomany) {
210
- let res = null
211
- if (item.queryEvent) {
212
- res = this[item.queryEvent]()
213
- } else {
214
- let data = {
215
- tablename: item.tables[0],
216
- condition: `f_process_id='${this.selectdata.f_process_id}'`
217
- }
218
- res = await this.$resetpost(
219
- 'rs/sql/singleTable',
220
- {data: data},
221
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
222
- )
223
- }
224
-
225
- item.rows = res.data
226
-
227
- // 初始化onetomany中的fields
228
- for (const field of item.fields) {
229
- if (!field.value) {
230
- if (field.value !== 0) {
231
- field.value = null
232
- }
233
- }
234
-
235
- if (field.default || field.default === 0) {
236
- field.value = field.default
237
- }
238
-
239
- // datepicker
240
- if (field.type === 'datepicker' && !field.value && field.default) {
241
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
242
- }
243
-
244
- if (field.type === 'select') {
245
-
246
- let temp = this.$appdata.getParam(field.label)
247
-
248
- if (temp && temp.length > 0) {
249
- field.options = temp
250
- }
251
-
252
- if (field.paramLabel) {
253
- temp = this.$appdata.getParam(field.paramLabel)
254
- if (temp && temp.length > 0) {
255
- item.options = temp
256
- }
257
- }
258
- }
259
- }
260
- }
261
- }
262
-
263
- // 初始化 buttons_fields
264
- for (const item of this.selectdata.buttons) {
265
- if (item.button_name === '下发') {
266
-
267
- let data = {
268
- source: item.source,
269
- userid: this.$login.f.id
270
- }
271
- if (item.sourceMethod) {
272
- data.source = this[item.sourceMethod]()
273
- }
274
- if (!data.source) {
275
- this.$showMessage("请配置获取人员表达式")
276
- return
277
- }
278
-
279
- let res = await this.$resetpost(
280
- 'rs/search',
281
- {data: data},
282
- {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
283
- )
284
-
285
- let options = res.data.map(source => {
286
- return {
287
- "label": source.name,
288
- "value": source.id
289
- }
290
- })
291
-
292
- if (item.button_fields.length !== 1) {
293
- this.$showMessage("下发有且只能有一个字段!!!")
294
- return
295
- }
296
-
297
- item.button_fields[0].options = options
298
- }
299
- if (item.button_fields) {
300
- item.button_fields.forEach(x => {
301
- // 如果配置类型为select,优先从参数列表获取options
302
- if (x.type === 'select') {
303
-
304
- if (x.param) {
305
- let temp = this.$appdata.getParam(x.label)
306
-
307
- if (temp && temp.length > 0) {
308
- x.options = temp
309
- }
310
-
311
- if (x.paramLabel) {
312
- temp = this.$appdata.getParam(x.paramLabel)
313
- if (temp && temp.length > 0) {
314
- x.options = temp
315
- }
316
- }
317
- }
318
-
319
- }
320
- })
321
- }
322
- }
323
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
324
- let temp = JSON.parse(JSON.stringify(this.selectdata))
325
- console.log('打印下temp',temp)
326
- this.show_data = temp
327
- this.$nextTick(() => {
328
- this.showview = true
329
- })
330
- this.ceshi()
331
- },
332
- // 金额转大写
333
- smalltoBIG(n) {
334
- let fraction = ['角', '分'];
335
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
336
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
337
- let head = n < 0 ? '欠' : '';
338
- n = Math.abs(n);
339
-
340
- let s = '';
341
-
342
- for (var i = 0; i < fraction.length; i++) {
343
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
344
- }
345
- s = s || '整';
346
- n = Math.floor(n);
347
-
348
- for (var i = 0; i < unit[0].length && n > 0; i++) {
349
- let p = '';
350
- for (var j = 0; j < unit[1].length && n > 0; j++) {
351
- p = digit[n % 10] + unit[1][j] + p;
352
- n = Math.floor(n / 10);
353
- }
354
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
355
- }
356
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
357
- },
358
- getLableValue(label) {
359
- for (const item of this.show_data.fields) {
360
- if (item.label === label && item.type !== 'number') {
361
- return item.value || ''
362
- }
363
- if (item.label === label && item.type === 'number') {
364
- return item.value || 0
365
- }
366
- }
367
- },
368
- getLableOptions(label) {
369
- for (const item of this.show_data.fields) {
370
- if (item.label === label) {
371
- return item.options
372
- }
373
- }
374
- },
375
- setLabelValue(label, value) {
376
- for (const item of this.show_data.fields) {
377
- if (item.label === label) {
378
- item.value = value
379
- this.show_data[item.field] = value
380
- }
381
- }
382
- },
383
- setLabelOptions(label, options) {
384
- for (const item of this.show_data.fields) {
385
- if (item.label === label) {
386
- item.options = options
387
- }
388
- }
389
- },
390
- showLabels(...labels) {
391
- for (const item of this.show_data.fields) {
392
- if (labels.includes(item.label)) {
393
- item.hidden = false
394
- }
395
- }
396
- },
397
- hideLabels(...labels) {
398
- for (const item of this.show_data.fields) {
399
- if (labels.includes(item.label)) {
400
- item.hidden = true
401
- }
402
- }
403
- },
404
- requiredLabels(...labels) {
405
- for (const item of this.show_data.fields) {
406
- if (labels.includes(item.label)) {
407
- item.required = true
408
- }
409
- }
410
- },
411
- electiveLabels(...labels) {
412
- for (const item of this.show_data.fields) {
413
- if (labels.includes(item.label)) {
414
- item.required = false
415
- }
416
- }
417
- },
418
- readonlyLabels(...labels) {
419
- for (const item of this.show_data.fields) {
420
- if (labels.includes(item.label)) {
421
- item.readonly = true
422
- item.disabled = true
423
- }
424
- }
425
- },
426
- readwriteLabels(...labels) {
427
- for (const item of this.show_data.fields) {
428
- if (labels.includes(item.label)) {
429
- item.readonly = false
430
- item.disabled = false
431
- }
432
- }
433
- },
434
- disabledButtons(...buttons) {
435
- for (const item of this.show_data.buttons) {
436
- if (buttons.includes(item.button_name)) {
437
- item.disabled = true
438
- }
439
- }
440
- },
441
- enableButtons(...buttons) {
442
- for (const item of this.show_data.buttons) {
443
- if (buttons.includes(item.button_name)) {
444
- item.disabled = false
445
- }
446
- }
447
- },
448
- showButtons(...buttons) {
449
- for (const item of this.show_data.buttons) {
450
- if (buttons.includes(item.button_name)) {
451
- item.hidden = false
452
- }
453
- }
454
- },
455
- hideButtons(...buttons) {
456
- for (const item of this.show_data.buttons) {
457
- if (buttons.includes(item.button_name)) {
458
- item.hidden = true
459
- }
460
- }
461
- },
462
- async checkDuplicate(index) {
463
- let http = new HttpResetClass()
464
- let data = {
465
- tablename: 't_apply',
466
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
467
- }
468
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
469
- resolveMsg: null,
470
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
471
- })
472
- if (res.data.length > 0) {
473
- this.show_data.fields[index].value = null
474
- this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
475
- }
476
- },
477
- // 获取片区
478
- async getSliceArea () {
479
- let data = {
480
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
481
- userid: this.$login.f.id
482
- }
483
-
484
- let http = new HttpResetClass()
485
- let res = await http.load(
486
- 'POST',
487
- `rs/search`,
488
- {data: data},
489
- {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
490
- )
491
-
492
- return res.data.map(item => {
493
- return {
494
- label: item.name,
495
- value: item.name
496
- }
497
- })
498
- },
499
- // 获取区县
500
- async getPcd () {
501
- let data = {
502
- tablename: 't_pcd',
503
- condition: `f_filialeid = '${this.$login.f.orgid}'`
504
- }
505
- let http = new HttpResetClass()
506
- let res = await http.load(
507
- 'POST',
508
- `rs/sql/singleTable`,
509
- {data: data},
510
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
511
- )
512
-
513
- return res.data.map(item => {
514
- return {
515
- label: item.f_pcd,
516
- value: item.f_pcd
517
- }
518
- })
519
- },
520
- // 获取集收单位
521
- async getArea () {
522
- let data = {
523
- tablename: 't_area',
524
- condition: `f_filialeid = '${this.$login.f.orgid}'`
525
- }
526
- let http = new HttpResetClass()
527
- let res = await http.load(
528
- 'POST',
529
- `rs/sql/singleTable`,
530
- {data: data},
531
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
532
- )
533
-
534
- return res.data.map(item => {
535
- return {
536
- label: item.f_residential_area,
537
- value: item.f_residential_area
538
- }
539
- })
540
- },
541
- // 缴费前置
542
- chargeBefore () {
543
- if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
544
- this.$showAlert('费用未结清!!!', 'warning', 3000)
545
- throw null
546
- }
547
- },
548
- // 施工前置 加表具后状态是待开通 提交后是正常 所以这里的判断条件需改正 (and uf.f_meter_classify is null and f_meternumber is null)
549
- async constructionBefore () {
550
- let http = new HttpResetClass()
551
- let data = {
552
- condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
553
- }
554
- let res = await http.load(
555
- 'POST',
556
- 'rs/sql/countApplyUserinfo',
557
- {data: data},
558
- {
559
- resolveMsg: null,
560
- rejectMsg: '安装明细查询失败!!!'
561
- })
562
- if (res.data[0].num > 0) {
563
- this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
564
- throw `还有${res.data[0].num}户未安装,无法提交`
565
- }
566
- },
567
- changePipeBuild () {
568
- if (this.selectdata.f_process_dep === '工程部') {
569
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
570
- }
571
- if (this.selectdata.f_process_dep === '运营部') {
572
- return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
573
- }
574
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
575
- },
576
- async getDevInfo () {
577
- let data = {
578
- tablename: 't_dev_info',
579
- condition: `f_orgid = '${this.$login.f.orgid}'`
580
- }
581
- let http = new HttpResetClass()
582
- let res = await http.load(
583
- 'POST',
584
- `rs/sql/singleTable`,
585
- {data: data},
586
- {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
587
- )
588
-
589
- return res.data.map(item => {
590
- return {
591
- label: item.f_dev_name,
592
- value: item.f_dev_name
593
- }
594
- })
595
- },
596
- async getPrice (f_price_id) {
597
- console.log('=======================')
598
- console.log(f_price_id)
599
-
600
- let data = {
601
- condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
602
- }
603
- if(this.Pricetype==='机表'){
604
- data.condition=`sp.f_custom = '机表'`
605
- }
606
- if(this.Pricetype==='非机表'){
607
- data.condition=`sp.f_custom = '非机表'`
608
- }
609
-
610
- if (!isEmpty(f_price_id)) {
611
- data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
612
- }
613
- let http = new HttpResetClass()
614
- let res = await http.load(
615
- 'POST',
616
- `rs/sql/applyGetPrice`,
617
- {data: data},
618
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
619
- )
620
-
621
- let a= res.data.map(item => {
622
- return {
623
- label: item.f_price_name,
624
- value: item
625
- }
626
- })
627
- this.selectdata.fields.forEach(field => {
628
- if (field.label === '气价名称') {
629
- field.options = a}
630
- })
631
- return a
632
- },
633
- addressInitialization () {
634
- this.$getConfig(this, 'UserAddress')
635
-
636
- let f_address_type = this.show_data.f_address_type
637
-
638
- for (const item of this.show_data.fields) {
639
- if (f_address_type === '民用市区') {
640
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
641
- item.hidden = false
642
- item.required = true
643
- }
644
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
645
- item.hidden = false
646
- item.required = false
647
- }
648
- if (item.label === '地址') {
649
- item.readonly = true
650
- }
651
- }
652
- if (f_address_type === '民用乡镇') {
653
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
654
- item.hidden = false
655
- item.required = true
656
- }
657
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
658
- item.hidden = false
659
- item.required = false
660
- }
661
- if (item.label === '楼层') {
662
- item.hidden = true
663
- item.required = false
664
- }
665
- if (item.label === '地址') {
666
- item.readonly = true
667
- }
668
- }
669
- if (f_address_type === '特殊地址') {
670
- if (item.label === '区/县' || item.label === '街道/乡镇') {
671
- item.hidden = false
672
- item.required = true
673
- }
674
- if (item.label === '集收单位') {
675
- item.hidden = false
676
- if (this.show_data.f_apply_type === '工商户报建'){
677
- item.required = false
678
- } else {
679
- item.required = false
680
- }
681
-
682
- }
683
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
684
- item.hidden = true
685
- item.required = false
686
- }
687
- if (item.label === '地址') {
688
- item.readonly = false
689
- }
690
- }
691
-
692
- if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
693
- item.hidden = true
694
- }
695
- }
696
- },
697
- async streetChange () {
698
- if (isEmpty(this.show_data.f_street)) {
699
- return
700
- }
701
-
702
- let data = {
703
- tablename: 't_area',
704
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
705
- }
706
- let http = new HttpResetClass()
707
- let res = await http.load(
708
- 'POST',
709
- `rs/sql/singleTable`,
710
- {data: data},
711
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
712
- )
713
-
714
- this.setLabelOptions('集收单位', res.data.map(item => {
715
- return {
716
- label: item.f_residential_area,
717
- value: item.f_residential_area
718
- }
719
- }))
720
- },
721
- async pcdChange () {
722
- if (isEmpty(this.show_data.f_pcd)) {
723
- return
724
- }
725
-
726
- let data = {
727
- tablename: 't_street',
728
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
729
- }
730
- let f_address_type = this.getLableValue('地址类型')
731
-
732
- if (f_address_type === '民用市区') {
733
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
734
- }
735
- if (f_address_type === '民用乡镇') {
736
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
737
- }
738
-
739
- let http = new HttpResetClass()
740
- let res = await http.load(
741
- 'POST',
742
- `rs/sql/singleTable`,
743
- {data: data},
744
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
745
- )
746
-
747
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
748
- return {
749
- label: item.f_street,
750
- value: item.f_street
751
- }
752
- }))
753
- },
754
- async addressTips () {
755
- // console.log('======================='+this.show_data.f_apply_type)
756
- let res = ''
757
- if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
758
- res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
759
- }else{
760
- res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
761
- }
762
- if (res == 'confirm') {
763
- return
764
- }
765
- throw '用户信息确认!!!'
766
- },
767
- // async getDesignerPeople () {
768
- // let data = {
769
- // source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
770
- // userid: this.$login.f.id
771
- // }
772
- //
773
- // let http = new HttpResetClass()
774
- // let res = await http.load(
775
- // 'POST',
776
- // `rs/search`,
777
- // {data: data},
778
- // {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
779
- // )
780
- //
781
- // return res.data.map(item => {
782
- // return {
783
- // label: item.name,
784
- // value: item.id
785
- // }
786
- // })
787
- // },
788
- async surveyStopApply () {
789
- console.log('终止报建!!!!!')
790
-
791
- this.show_data.f_stop_reason = '现场勘察不符合报装条件'
792
-
793
- let data = {
794
- data: this.show_data,
795
- user: this.$login.f
796
- }
797
-
798
- let res = await this.$resetpost(
799
- `rs/logic/surveyStopApply`,
800
- {data: data},
801
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
802
- )
803
-
804
- this.$dispatch('loadPage')
805
-
806
- throw '终止报建!!!'
807
- },
808
- async contract_number() {
809
- console.log("进入编号合同编号生成",this.$login.f.orgs)
810
- let f_contract_number = ''
811
- const nowDate = new Date();
812
- const date = {
813
- year: nowDate.getFullYear(),
814
- month: nowDate.getMonth() + 1,
815
- day: nowDate.getDate()
816
- }
817
-
818
- function upperCaseChars(dir) {
819
- let string = '';
820
- switch (dir){
821
- case '周口市天然气有限公司':
822
- string = 'ZK' // 当表达式的结果等于 房产 时,则执行该代码
823
- break;
824
- case '项城市天然气有限公司':
825
- string = "XC" // 当表达式的结果等于 自建房 时,则执行该代码
826
- break;
827
- case '西华县天然气有限公司':
828
- string = 'XH' // 当表达式的结果等于 商业 时,则执行该代码
829
- break;
830
- case '鹿邑县天然气有限公司':
831
- string = 'LY' // 当表达式的结果等于 工业 时,则执行该代码
832
- break;
833
- case '郸城县天然气有限公司':
834
- string = 'DC' // 当表达式的结果等于 中压 时,则执行该代码
835
- break;
836
- case '测试公司(一)':
837
- string = 'CS' // 当表达式的结果等于 中压 时,则执行该代码
838
- break;
839
- default :
840
- break; // 如果没有与表达式相同的值,则执行该代码
841
- }
842
- return string;
843
- }
844
-
845
- const dir = upperCaseChars(this.$login.f.orgs) //分公司
846
-
847
- let type = 0 //类型
848
-
849
- switch (this.show_data.f_entry_type){
850
- case '城区/县城':
851
- type = 1 // 当表达式的结果等于 城区 时,则执行该代码
852
- break;
853
- case '新农村':
854
- type = 2 // 当表达式的结果等于 新农村 时,则执行该代码
855
- break;
856
- case '测试':
857
- type = 3 // 当表达式的结果等于 新农村 时,则执行该代码
858
- break;
859
- default :
860
- break; // 如果没有与表达式相同的值,则执行该代码
861
- }
862
-
863
- let nature = 0 // 性质
864
- switch (this.show_data.f_apply_nature){
865
- case '楼房':
866
- nature = 1 // 当表达式的结果等于 楼房 时,则执行该代码
867
- break;
868
- case '房产':
869
- nature = 1 // 当表达式的结果等于 房产 时,则执行该代码
870
- break;
871
- case '自建房':
872
- nature = 2 // 当表达式的结果等于 自建房 时,则执行该代码
873
- break;
874
- case '商业':
875
- nature = 3 // 当表达式的结果等于 商业 时,则执行该代码
876
- break;
877
- case '学校':
878
- nature = 3 // 当表达式的结果等于 学校 时,则执行该代码
879
- break;
880
- case '福利机构':
881
- nature = 3 // 当表达式的结果等于 福利机构 时,则执行该代码
882
- break;
883
- case '其他':
884
- nature = 3 // 当表达式的结果等于 其他 时,则执行该代码
885
- break;
886
- case '工业':
887
- nature = 4 // 当表达式的结果等于 工业 时,则执行该代码
888
- break;
889
- case '中压':
890
- nature = 5 // 当表达式的结果等于 中压 时,则执行该代码
891
- break;
892
- case '测试':
893
- nature = 6 // 当表达式的结果等于 中压 时,则执行该代码
894
- break;
895
- default :
896
- break; // 如果没有与表达式相同的值,则执行该代码
897
- }
898
-
899
- const newMonth = date.month >= 10 ? date.month : '0' + date.month //月份
900
- const dataYm = date.year + '-01-01'
901
- const newYear = date.year + 1
902
- const year = date.year.toString().substring(2,4) //年份
903
-
904
- let data = {
905
- orgid: this.$login.f.orgid
906
- }
907
-
908
- let http = new HttpResetClass()
909
- let res = await http.load('POST', 'rs/sql/contractCount', {data:data}, {
910
- resolveMsg: null,
911
- rejectMsg: null
912
- })
913
- let oldDate
914
- for (const item of res.data) {
915
- if (item.name === '合同编号最后更新日期'){
916
- oldDate = item.value
917
- }
918
- }
919
- for (const item of res.data){
920
- if (item.name === '合同编号'){
921
- if (item.value === 0 || Date.parse(oldDate) < Date.parse(dataYm)) {
922
- f_contract_number = dir + type + nature + year + newMonth + '001'
923
- console.log("触发if", f_contract_number)
924
- } else {
925
- let count = item.value
926
- f_contract_number = dir + type + nature + year + newMonth + this.PrefixInteger(count, 3)
927
- console.log("触发else", f_contract_number)
928
- }
929
- }
930
- }
931
- this.selectdata.f_contract_number = f_contract_number
932
- this.show_data.f_contract_number = f_contract_number
933
- return f_contract_number
934
- },
935
- PrefixInteger(num, n) {
936
- return (Array(n).join(0) + num).slice(-n);
937
- }
938
- },
939
- events: {
940
- 'priceType'(index){
941
- this.Pricetype = this.getLableValue('所属类型')
942
- console.log('打印方法值',this.getPrice(this.show_data.f_price_id))
943
- for (const item of this.show_data.fields) {
944
- if (this.show_data.f_sprice_type !=null && this.show_data.f_sprice_type !='') {
945
- if(item.label==='气价名称'){
946
- this.getPrice(this.show_data.f_price_id).then(value =>{
947
- item.options=value
948
- })
949
- console.log('最终',item.options)
950
- }
951
- }
952
- }
953
- },
954
- 'complyInstallation' (index) {
955
- if (this.show_data.f_is_have === '否') {
956
- this.hideButtons('提交', '出图', '缴费')
957
- this.showButtons('终止')
958
- }
959
- if (this.show_data.f_is_have === '是') {
960
- this.hideButtons('终止')
961
- this.showButtons('提交', '出图', '缴费')
962
- }
963
- },
964
- async 'igniteDispatchReadyEvent' () {
965
- let data = {
966
- tablename: 'activityins',
967
- condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
968
- }
969
- let http = new HttpResetClass()
970
- let res = await http.load(
971
- 'POST',
972
- `rs/sql/singleTable`,
973
- {data: data},
974
- {resolveMsg: null, rejectMsg: '查询失败!!!'}
975
- )
976
- if (res.data.length <= 0) {
977
- console.log('+++++++++++++++++++++++++++++')
978
- console.log('没有施工,不能退回')
979
- this.hideButtons('退回')
980
- }
981
- },
982
- 'buildReadyEvent' () {
983
- this.setLabelValue('施工单位', this.$login.f.name)
984
- this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
985
- },
986
- // 选择材料
987
- async materialNameChenge (index, fieldIndex) {
988
- let material = this.show_data.onetomany[index].fields[fieldIndex].value
989
-
990
- this.show_data.onetomany[index].fields.forEach(item => {
991
- if (material[item.field]) {
992
- item.value = material[item.field]
993
- }
994
- })
995
- },
996
- // 打开模态框获取材料
997
- async 'getMaterialName' (index) {
998
- let data = {
999
- condition: `1=1`
1000
- }
1001
- let http = new HttpResetClass()
1002
- let res = await http.load(
1003
- 'POST',
1004
- `rs/sql/getStockMaterial`,
1005
- {data: data},
1006
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1007
- )
1008
-
1009
- this.show_data.onetomany[index].fields.forEach(field => {
1010
- if (field.label === '选择材料') {
1011
- field.options = res.data.map(item => {
1012
- return {
1013
- 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1014
- 'value': item
1015
- }
1016
- })
1017
- }
1018
- })
1019
- },
1020
- // 搜索小区
1021
- async 'searchArea' (area, index) {
1022
- let data = {
1023
- tablename: 't_area',
1024
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
1025
- }
1026
- let http = new HttpResetClass()
1027
- let res = await http.load(
1028
- 'POST',
1029
- `rs/sql/singleTable`,
1030
- {data: data},
1031
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1032
- )
1033
-
1034
- if (res.data.length === 0) {
1035
- return
1036
- }
1037
-
1038
- this.setLabelOptions('集收单位', res.data.map(item => {
1039
- return {
1040
- label: item.f_residential_area,
1041
- value: item.f_residential_area
1042
- }
1043
- }))
1044
- },
1045
- // 搜索小区
1046
- async 'searchAreaCollective' (area, index) {
1047
- let data = {
1048
- tablename: 't_area',
1049
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area like '%${area}%'`
1050
- }
1051
- let http = new HttpResetClass()
1052
- let res = await http.load(
1053
- 'POST',
1054
- `rs/sql/singleTable`,
1055
- {data: data},
1056
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1057
- )
1058
-
1059
- if (res.data.length === 0) {
1060
- return
1061
- }
1062
-
1063
- this.setLabelOptions('集收单位', res.data.map(item => {
1064
- return {
1065
- label: item.f_residential_area,
1066
- value: item.f_residential_area
1067
- }
1068
- }))
1069
- },
1070
- // 选择气价
1071
- 'priceChange' (index) {
1072
- debugger
1073
- if (isEmpty(this.show_data.stairPrice)) {
1074
- return
1075
- }
1076
-
1077
- let stairPrice = this.getLableValue('气价名称')
1078
-
1079
- this.setLabelValue('气价类型', stairPrice.f_price_type)
1080
- this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1081
- this.setLabelValue('价格', stairPrice.f_price)
1082
- this.setLabelValue('客户类型', stairPrice.f_user_type)
1083
- this.show_data.f_price_id = stairPrice.id
1084
- this.show_data.f_price_name = stairPrice.f_price_name
1085
- },
1086
- // 选择开发商
1087
- async 'devInfoChange' (index) {
1088
- if (isEmpty(this.show_data.f_company_name)) {
1089
- return
1090
- }
1091
- let data = {
1092
- tablename: 't_dev_info',
1093
- condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
1094
- }
1095
- let res = await this.$resetpost(
1096
- `rs/sql/singleTable`,
1097
- {data: data},
1098
- {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1099
- )
1100
- this.show_data.f_dev_id = res.data[0].id
1101
- this.show_data.f_dev_code = res.data[0].f_dev_code
1102
- this.setLabelValue('法人名称', res.data[0].f_legal_person)
1103
- this.setLabelValue('身份证', res.data[0].f_idnumber)
1104
- this.setLabelValue('营业执照', res.data[0].f_license_num)
1105
- },
1106
- // 退款金额
1107
- 'refundMoneyChange' (index) {
1108
- let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
1109
- let f_refund_money = this.show_data.fields[index].value
1110
-
1111
- if (f_refund_money > f_cumulative_payment_money) {
1112
- this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
1113
- this.show_data.fields[index].value = null
1114
- }
1115
- },
1116
- // 检查重复
1117
- 'checkRepeat' (index) {
1118
- this.checkDuplicate(index)
1119
- },
1120
- // 选择报建项目
1121
- 'selectApply' (row) {
1122
- this.setLabelValue('工程名称', row.f_entry_name)
1123
- this.setLabelValue('工程编号', row.f_apply_num)
1124
- this.setLabelValue('报建类型', row.f_apply_type)
1125
- this.setLabelValue('用户名称', row.f_user_name)
1126
- this.setLabelValue('用户电话', row.f_phone)
1127
- this.setLabelValue('证件类型', row.f_credentials)
1128
- this.setLabelValue('证件号码', row.f_idnumber)
1129
- this.setLabelValue('地址', row.f_address)
1130
- this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1131
-
1132
- this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1133
-
1134
- delete row.id
1135
- delete row.actid
1136
- delete row.defid
1137
- delete row.defname
1138
- delete row.version
1139
- delete row.f_apply_num
1140
- delete row.f_sub_state
1141
- delete row.f_apply_type
1142
- delete row.f_process_id
1143
-
1144
- this.show_data = Object.assign({}, this.show_data, row)
1145
-
1146
- this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1147
- },
1148
- // 是否终止
1149
- 'isStopChange' (index) {
1150
- let f_is_stop = this.show_data.f_is_stop
1151
-
1152
- for (const item of this.show_data.fields) {
1153
- if (f_is_stop === '是') {
1154
- if (item.label === '终止原因') {
1155
- item.hidden = false
1156
- item.required = true
1157
- }
1158
- } else {
1159
- if (item.label === '终止原因') {
1160
- item.hidden = true
1161
- item.required = false
1162
- }
1163
- }
1164
- }
1165
- },
1166
- // 终止报建初始化
1167
- async 'stopApplyReadyEvent' () {
1168
-
1169
- let f_is_stop = this.getLableValue('是否终止')
1170
-
1171
- for (const item of this.show_data.fields) {
1172
- if (f_is_stop === '是') {
1173
- if (item.label === '终止原因') {
1174
- item.hidden = false
1175
- item.required = true
1176
- }
1177
- } else {
1178
- if (item.label === '终止原因') {
1179
- item.hidden = true
1180
- item.required = false
1181
- }
1182
- }
1183
- }
1184
-
1185
- if (isEmpty(this.show_data.f_parent_process_id)) {
1186
- return
1187
- }
1188
- let data = {
1189
- condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
1190
- data: {
1191
- id: this.$login.f.id,
1192
- orgid: this.$login.f.orgid
1193
- }
1194
- }
1195
- let res = await this.$resetpost(
1196
- `rs/sql/supervisory`,
1197
- {data: data},
1198
- {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
1199
- )
1200
- this.show_data.parentApply = res.data[0]
1201
- },
1202
- // 选择用户档案信息
1203
- 'selectUserinfo' (row) {
1204
- this.setLabelValue('用户编号', row.f_userinfo_code)
1205
- this.setLabelValue('用户名称', row.f_user_name)
1206
- this.setLabelValue('用户电话', row.f_user_phone)
1207
- this.setLabelValue('证件类型', row.f_credentials)
1208
- this.setLabelValue('证件号码', row.f_idnumber)
1209
- this.setLabelValue('地址', row.f_address)
1210
-
1211
- this.show_data.f_userinfo_id = row.f_userinfo_id
1212
- this.show_data.f_userinfo_code = row.f_userinfo_code
1213
- },
1214
- // 是否购买保险
1215
- async 'isInsureChange' (index) {
1216
- if (!this.show_data.f_is_insure) {
1217
- return
1218
- }
1219
- let f_is_insure = this.show_data.f_is_insure
1220
- for (const item of this.show_data.fields) {
1221
- if (f_is_insure === '是') {
1222
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1223
- item.hidden = false
1224
- item.required = true
1225
- }
1226
- if (item.label === '保险备注') {
1227
- item.hidden = false
1228
- }
1229
- } else {
1230
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1231
- item.hidden = true
1232
- item.required = false
1233
- }
1234
- }
1235
- }
1236
- },
1237
- // 通气点火初始化
1238
- async 'gasReadyEvent' () {
1239
- // 是否有气价信息
1240
- if (!isEmpty(this.show_data.f_price_id)) {
1241
- let priceList = await this.getPrice(this.show_data.f_price_id)
1242
- this.setLabelValue('气价名称', priceList[0].value)
1243
- }
1244
-
1245
- let data = {
1246
- tablename: 't_userfees',
1247
- condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1248
- }
1249
- let http = new HttpResetClass()
1250
- let res = await http.load(
1251
- 'POST',
1252
- `rs/sql/singleTable`,
1253
- {data: data},
1254
- {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1255
- )
1256
- if (res.data.length > 0) {
1257
- this.setLabelValue('待执行保险', '是')
1258
- for (const item of this.show_data.fields) {
1259
- if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1260
- item.hidden = true
1261
- item.required = false
1262
- item.value = null
1263
- }
1264
- }
1265
- } else {
1266
- this.setLabelValue('待执行保险', '否')
1267
- for (const item of this.show_data.fields) {
1268
- if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1269
- item.hidden = false
1270
- item.required = true
1271
- }
1272
- }
1273
- }
1274
-
1275
- // 保险初始化显示内容
1276
- let f_is_insure = this.getLableValue('是否购买保险')
1277
- for (const item of this.show_data.fields) {
1278
- if (f_is_insure === '是') {
1279
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1280
- item.hidden = false
1281
- item.required = true
1282
- }
1283
- if (item.label === '保险备注') {
1284
- item.hidden = false
1285
- }
1286
- // 本期保费到期时间默认一年
1287
- if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1288
- let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1289
- this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1290
- }
1291
- }
1292
- if (f_is_insure === '否') {
1293
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1294
- item.hidden = true
1295
- item.required = false
1296
- }
1297
- }
1298
- }
1299
- },
1300
- // 合同金额失去焦点
1301
- async 'contractMoneyChange' (index) {
1302
- let data = {
1303
- operator: '+',
1304
- num1: this.show_data.f_contract_money || 0,
1305
- num2: this.getLableValue('追加金额') || 0
1306
- }
1307
- let res = await this.$resetpost(
1308
- `rs/logic/compute`,
1309
- {data: data},
1310
- {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1311
- )
1312
-
1313
- this.setLabelValue('应交金额', res.data)
1314
- },
1315
- // 街道失去焦点
1316
- async 'streetChange' (index) {
1317
- if (isEmpty(this.show_data.f_street)) {
1318
- return
1319
- }
1320
-
1321
- this.setLabelValue('集收单位', null)
1322
-
1323
- let data = {
1324
- tablename: 't_area',
1325
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1326
- }
1327
- let http = new HttpResetClass()
1328
- let res = await http.load(
1329
- 'POST',
1330
- `rs/sql/singleTable`,
1331
- {data: data},
1332
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1333
- )
1334
-
1335
- this.setLabelOptions('集收单位', res.data.map(item => {
1336
- return {
1337
- label: item.f_residential_area,
1338
- value: item.f_residential_area
1339
- }
1340
- }))
1341
- },
1342
- // 区县失去焦点
1343
- async 'pcdChange' (index) {
1344
- if (isEmpty(this.show_data.f_pcd)) {
1345
- return
1346
- }
1347
-
1348
- this.setLabelValue('街道/乡镇', null)
1349
- this.setLabelValue('集收单位', null)
1350
-
1351
-
1352
-
1353
- let data = {
1354
- tablename: 't_street',
1355
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1356
- }
1357
- let f_address_type = this.getLableValue('地址类型')
1358
-
1359
- if (f_address_type === '民用市区') {
1360
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1361
- }
1362
- if (f_address_type === '民用乡镇') {
1363
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1364
- }
1365
-
1366
- let http = new HttpResetClass()
1367
- let res = await http.load(
1368
- 'POST',
1369
- `rs/sql/singleTable`,
1370
- {data: data},
1371
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1372
- )
1373
-
1374
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
1375
- return {
1376
- label: item.f_street,
1377
- value: item.f_street
1378
- }
1379
- }))
1380
- },
1381
- // 地址类型失去焦点
1382
- 'addressTypeChange' (index) {
1383
- this.setLabelValue('街道/乡镇', null)
1384
- this.setLabelValue('集收单位', null)
1385
- let f_address_type = this.show_data.fields[index].value
1386
- for (const item of this.show_data.fields) {
1387
- if (f_address_type === '民用市区') {
1388
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1389
- item.hidden = false
1390
- item.required = true
1391
- item.value = null
1392
- }
1393
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1394
- item.hidden = false
1395
- item.required = false
1396
- item.value = null
1397
- }
1398
- if (item.label === '地址') {
1399
- item.readonly = true
1400
- item.value = null
1401
- }
1402
- }
1403
- if (f_address_type === '民用乡镇') {
1404
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1405
- item.hidden = false
1406
- item.required = true
1407
- item.value = null
1408
- }
1409
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1410
- item.hidden = false
1411
- item.required = false
1412
- item.value = null
1413
- }
1414
- if (item.label === '楼层') {
1415
- item.hidden = true
1416
- item.required = false
1417
- item.value = null
1418
- }
1419
- if (item.label === '地址') {
1420
- item.readonly = true
1421
- item.value = null
1422
- }
1423
- }
1424
- if (f_address_type === '特殊地址') {
1425
- if (item.label === '区/县' || item.label === '街道/乡镇') {
1426
- item.hidden = false
1427
- item.required = true
1428
- item.value = null
1429
- }
1430
- if (item.label === '集收单位') {
1431
- item.hidden = false
1432
- item.required = false
1433
- item.value = null
1434
- }
1435
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
1436
- item.hidden = true
1437
- item.required = false
1438
- item.value = null
1439
- }
1440
- if (item.label === '地址') {
1441
- item.readonly = false
1442
- item.value = null
1443
- }
1444
- }
1445
- }
1446
- },
1447
- // 团购转散户初始化
1448
- 'apply2ReadyEvent' () {
1449
- if (this.show_data.f_apply_source === '线下发起') {
1450
- this.addressInitialization()
1451
- this.hideLabels('用户编号')
1452
- this.electiveLabels('用户编号')
1453
- this.showLabels('片区', '地址类型')
1454
- this.requiredLabels('片区', '地址类型')
1455
- }
1456
- if (this.show_data.f_apply_source === '自动发起') {
1457
- this.hideLabels('片区', '地址类型')
1458
- this.electiveLabels('片区', '地址类型',)
1459
- }
1460
- },
1461
- // 申请节点初始化
1462
- 'applyReadyEvent' () {
1463
- this.addressInitialization()
1464
- this.pcdChange()
1465
- this.streetChange()
1466
- },
1467
- // ===========================================
1468
- async 'button'() {
1469
- if (this.show_data.button.before) {
1470
- await this[this.show_data.button.before]()
1471
- }
1472
- // 点击重置按钮就重置数据
1473
- if (this.show_data.button.button_name === '重置') {
1474
- this.$dispatch('breakControl', this.selectdata)
1475
- return
1476
- }
1477
-
1478
- this.show_data.user = this.$login.f
1479
- this.show_data.start_activity = this.$workflow_vue.start_activity
1480
- this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
1481
-
1482
- if ((this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工' && this.show_data.button.button_name === '完工'){
1483
- //判断是否添加报警器材料
1484
- let bjqlag = false
1485
- let datatemp = {
1486
- 'bjqid':"",
1487
- 'fprocessid':"",
1488
- 'sqvalue':"",
1489
- 'f_bjq_sid':"",
1490
- 'f_material_code':"",
1491
- 'f_bjq_baidu_lng':"",
1492
- 'f_bjq_baidu_lat':"",
1493
- 'f_bjq_gaode_lng':"",
1494
- 'f_bjq_gaode_lat':""
1495
- }
1496
-
1497
- let bjqststedata = {
1498
- "sid":"",
1499
- "bjqtype":"",
1500
- "f_process_id":"",
1501
- "bjqstate":"",
1502
- "f_userinfo_code":""
1503
- }
1504
- let numOne = [];
1505
-
1506
- let http = new HttpResetClass()
1507
- let data = {
1508
- tablename: `t_material_apply`,
1509
- condition: `f_process_id='${this.show_data.f_process_id}'`
1510
- }
1511
- let res = await http.load(
1512
- 'POST',
1513
- `rs/sql/singleTable`,
1514
- {data: data},
1515
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
1516
- )
1517
- res.data.forEach(item => {
1518
- if (item.f_material_name.substr(0,3) === '报警器'){
1519
- var bjname = item.f_material_name.split("-")
1520
- bjqststedata.sid = item.f_bjq_sid
1521
- bjqststedata.f_process_id = item.f_process_id
1522
- bjqststedata.bjqtype = bjname[1]
1523
- //====================================
1524
- bjqlag = true
1525
- datatemp.bjqid = item.id
1526
- datatemp.fprocessid = item.f_process_id
1527
- datatemp.f_bjq_sid = item.f_bjq_sid
1528
- datatemp.f_material_code = item.f_material_code
1529
- datatemp.f_bjq_lng = item.f_bjq_lng
1530
- datatemp.f_bjq_lat = item.f_bjq_lat
1531
- datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
1532
- datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
1533
- datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
1534
- datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
1535
- numOne.push(item.f_bjq_sid)
1536
- }
1537
- })
1538
-
1539
- // this.show_data.onetomany.forEach(item=>{
1540
- // console.log("查看报警器材料",item)
1541
- // item.rows.forEach(i=>{
1542
- // if (i.f_material_name.substr(0,3) === '报警器'){
1543
- // var bjname = i.f_material_name.split("-")
1544
- // bjqststedata.sid = i.f_bjq_sid
1545
- // bjqststedata.f_process_id = i.f_process_id
1546
- // bjqststedata.bjqtype = bjname[1]
1547
- // //====================================
1548
- // bjqlag = true
1549
- // datatemp.bjqid = i.id
1550
- // datatemp.fprocessid = i.f_process_id
1551
- // datatemp.f_bjq_sid = i.f_bjq_sid
1552
- // datatemp.f_material_code = i.f_material_code
1553
- // numOne.push(i.f_bjq_sid)
1554
- // }
1555
- // })
1556
- // })
1557
- if (!bjqlag){
1558
- this.$showMessage('请添加报警器物料信息!!!')
1559
- return
1560
- }
1561
- if (numOne.length > 1){
1562
- this.$showMessage("暂时支持单个报警器物料安装!!!")
1563
- return
1564
- }
1565
- datatemp.sqvalue = this.show_data.areaData.sqvalue
1566
- datatemp.f_bjq_baidu_lng = this.show_data.templatlng.baidutemplng
1567
- datatemp.f_bjq_baidu_lat = this.show_data.templatlng.baidutemplat
1568
- datatemp.f_bjq_gaode_lng = this.show_data.templatlng.gaodetemplng
1569
- datatemp.f_bjq_gaode_lat = this.show_data.templatlng.gaodetemplat
1570
- datatemp.f_bjq_lng = this.show_data.templatlng.baidutemplng
1571
- datatemp.f_bjq_lat = this.show_data.templatlng.baidutemplat
1572
-
1573
- bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
1574
-
1575
- //判断是否推送 及推送的状态
1576
- //查询是否存在, 以型号及厂家判断
1577
- let bjqres = await this.$resetpost(
1578
- `rs/logic/getbjqsyncinfo`,
1579
- bjqststedata
1580
- )
1581
- if (bjqres.data.bjqstate != "成功"){
1582
- //区域地址存入材料记录表
1583
- let areares = await this.$resetpost(
1584
- `rs/logic/saveArea`,
1585
- {data: datatemp},
1586
- {resolveMsg: null, rejectMsg: '区域地址保存失败'}
1587
- )
1588
-
1589
- //完工之后推送数据到汉威
1590
- let adddata = {
1591
- f_bjq_sid : datatemp.f_bjq_sid,
1592
- f_material_code : datatemp.f_material_code,
1593
- f_bjq_address: this.show_data.areaData.sqvalue,
1594
- f_user_name: this.show_data.f_user_name,
1595
- f_address: this.show_data.f_address,
1596
- f_user_phone: this.show_data.f_phone,
1597
- f_userinfo_code: this.show_data.f_userinfo_code,
1598
- installtime: this.show_data.f_construction_date,
1599
- f_orgid : this.show_data.f_orgid,
1600
- f_bjq_lng: datatemp.f_bjq_baidu_lng,
1601
- f_bjq_lat: datatemp.f_bjq_baidu_lat
1602
- }
1603
- let res = await this.$resetpost(
1604
- `ncc/rs/logic/bjqadduser`,
1605
- // `rs/logic/bjqadduser`,
1606
- adddata
1607
- )
1608
- if (res.data.code != 200){
1609
- if (bjqres.data.bjqstate.length == 0){
1610
- bjqststedata.bjqstate = "失败"
1611
- let bjqres3 = await this.$resetpost(
1612
- `rs/logic/addbjqsyncinfo`,
1613
- bjqststedata
1614
- )
1615
- }
1616
- this.$showMessage(res.data.msg)
1617
- return
1618
- }
1619
- //更改记录表状态
1620
- if (bjqres.data.bjqstate === "失败"){
1621
- bjqststedata.bjqstate = "成功"
1622
- let bjqres1 = await this.$resetpost(
1623
- `rs/logic/updatebjqsyncinfo`,
1624
- bjqststedata
1625
- )
1626
- }else{
1627
- bjqststedata.bjqstate = "成功"
1628
- let bjqres2 = await this.$resetpost(
1629
- `rs/logic/addbjqsyncinfo`,
1630
- bjqststedata
1631
- )
1632
- }
1633
- }
1634
- }
1635
- if ((this.show_data.f_apply_type === '工商户报建' || this.show_data.f_apply_type === '团购报建')
1636
- && (this.show_data.defname === '报装申请') && this.show_data.button.button_name === '提交'){
1637
- await this.contract_number()
1638
- }
1639
- if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '保存'||this.show_data.button.button_name === '提交')){
1640
- let dataz = {
1641
- condition: `u.id = ${this.show_data.id}`,
1642
- data: {
1643
- id: this.$login.f.id,
1644
- orgid: this.$login.f.orgid
1645
- }
1646
- }
1647
- let http = new HttpResetClass()
1648
- let restpz = await http.load(
1649
- 'POST',
1650
- `rs/sql/checkuser`,
1651
- {data: dataz},
1652
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1653
- )
1654
- this.show_data.actid=restpz.data[0].actid
1655
- }
1656
- if(this.selectdata.f_sumtwo_money==''||this.selectdata.f_sumtwo_money==null){
1657
- this.selectdata.f_sumtwo_money=0
1658
- }
1659
- this.show_data.f_sumtwo_money=this.selectdata.f_sumtwo_money
1660
- let res = await this.$resetpost(
1661
- `rs/logic/ApplyProductService`,
1662
- {data: this.show_data},
1663
- {resolveMsg: null, rejectMsg: '数据保存失败'}
1664
- )
1665
-
1666
-
1667
- if (this.show_data.button.after) {
1668
- this[this.show_data.button.after]()
1669
- }
1670
- // 改管报建 增容报建 优化
1671
- if((this.show_data.f_apply_type === '改管报建'||this.show_data.f_apply_type === '增容报建') && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '缴费'){
1672
- let datagg = {
1673
- condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1674
- }
1675
- let http = new HttpResetClass()
1676
- let restgg = await http.load(
1677
- 'POST',
1678
- `rs/sql/checkusertwo`,
1679
- {data: datagg},
1680
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1681
- )
1682
- debugger
1683
- if(this.show_data.f_apply_type === '改管报建'){
1684
- restgg.data[0].processname = '改管报建流程'
1685
- restgg.data[0].defname = '报装缴费'
1686
- }else{
1687
- restgg.data[0].processname = '增容报建流程'
1688
- restgg.data[0].defname = '报装缴费'
1689
- }
1690
- restgg.data[0].actid = restgg.data[0].actid + 1
1691
- this.$dispatch('apply',restgg.data[0])
1692
-
1693
- }
1694
-
1695
- // 退款报建 优化
1696
- if(this.show_data.f_apply_type === '退款报建' && this.show_data.defname === '终止报建' && this.show_data.button.button_name === '提交'){
1697
- let datatk = {
1698
- condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1699
- }
1700
- let http = new HttpResetClass()
1701
- let resttk = await http.load(
1702
- 'POST',
1703
- `rs/sql/checkusertwo`,
1704
- {data: datatk},
1705
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1706
- )
1707
- debugger
1708
- resttk.data[0].processname = '退款报建流程'
1709
- resttk.data[0].defname = '退款'
1710
- this.$dispatch('apply',resttk.data[0])
1711
-
1712
- }
1713
-
1714
-
1715
- if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
1716
- let data = {
1717
- tablename: 't_apply',
1718
- condition: `f_process_id='${this.show_data.f_process_id}'`
1719
- }
1720
- let http = new HttpResetClass()
1721
- let restp = await http.load(
1722
- 'POST',
1723
- `rs/sql/singleTable`,
1724
- {data: data},
1725
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1726
- )
1727
- debugger
1728
- restp.data[0].processname = '散户报建流程'
1729
- restp.data[0].defname = '合同签订'
1730
- this.$dispatch('apply',restp.data[0])
1731
-
1732
- } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
1733
- let data2 = {
1734
- condition: `u.id = ${this.show_data.id}`,
1735
- data: {
1736
- id: this.$login.f.id,
1737
- orgid: this.$login.f.orgid
1738
- }
1739
- }
1740
- let http = new HttpResetClass()
1741
- let restp1 = await http.load(
1742
- 'POST',
1743
- `rs/sql/checkuser`,
1744
- {data: data2},
1745
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1746
- )
1747
- debugger
1748
- console.log('有没有发请求打印查询的内容restp1',restp1)
1749
- // restp1.data[0].processname = '散户报建流程'
1750
- // restp1.data[0].defname = '报装缴费'
1751
- this.$dispatch('apply',restp1.data[0])
1752
- }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
1753
- let data3 = {
1754
- condition: `u.id = ${this.show_data.id}`,
1755
- data: {
1756
- id: this.$login.f.id,
1757
- orgid: this.$login.f.orgid
1758
- }
1759
- }
1760
- let http = new HttpResetClass()
1761
- let restp2 = await http.load(
1762
- 'POST',
1763
- `rs/sql/checkuser`,
1764
- {data: data3},
1765
- {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1766
- )
1767
- debugger
1768
- console.log('打印查询的内容',restp2)
1769
- if(restp2.length>0){
1770
- this.$dispatch('apply',restp2.data[0])
1771
- }else{
1772
- debugger
1773
- this.$dispatch('loadPage')
1774
- }
1775
- }
1776
- else{
1777
- this.$dispatch('loadPage')
1778
- }
1779
-
1780
- },
1781
- // 失去焦点出触发事件
1782
- 'onchange' (index) {
1783
- if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
1784
- if (
1785
- this.show_data.fields[index].label === '区/县' ||
1786
- this.show_data.fields[index].label === '街道/乡镇' ||
1787
- this.show_data.fields[index].label === '集收单位' ||
1788
- this.show_data.fields[index].label === '楼号/组' ||
1789
- this.show_data.fields[index].label === '单元/排' ||
1790
- this.show_data.fields[index].label === '楼层' ||
1791
- this.show_data.fields[index].label === '门牌号'
1792
- ) {
1793
-
1794
- let f_pcd = this.getLableValue('区/县') || ''
1795
- let f_street = this.getLableValue('街道/乡镇') || ''
1796
- let f_residential_area = this.getLableValue('集收单位') || ''
1797
- let f_building = this.getLableValue('楼号/组') || ''
1798
- let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1799
- let f_unit = this.getLableValue('单元/排') || ''
1800
- let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1801
- let f_floor = this.getLableValue('楼层') || ''
1802
- let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1803
- let f_room = this.getLableValue('门牌号') || ''
1804
- let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1805
-
1806
- 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
1807
- this.setLabelValue("地址", f_address)
1808
- }
1809
- }
1810
- },
1811
- selectSearch (val, index) {},
1812
- 'onblur' (index) {},
1813
- 'oninput' (index) {},
1814
- 'initializtionView' () {},
1815
- async 'onchangeModal' (index, fieldIndex) {
1816
- },
1817
- async 'onblurModal' (index, fieldIndex) {
1818
-
1819
- },
1820
- async 'oninputModal' (index, fieldIndex) {
1821
-
1822
- },
1823
- async 'onetomanydelete' (index, rowIndex) {
1824
-
1825
- let http = new HttpResetClass()
1826
-
1827
- let res = await http.load(
1828
- 'DELETE',
1829
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1830
- null,
1831
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
1832
- )
1833
-
1834
- res = await this.$resetpost(
1835
- 'rs/entity/t_apply',
1836
- this.show_data
1837
- )
1838
-
1839
- this.$dispatch('breakControl', this.show_data)
1840
- },
1841
- async 'onetomanyupdate' (index, rowIndex) {
1842
- let data = this.show_data.onetomany[index].rows[rowIndex]
1843
-
1844
- this.show_data.onetomany[index].fields.forEach(item => {
1845
- data[item.field] = item.value
1846
- })
1847
- let res = await this.$resetpost(
1848
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1849
- data
1850
- )
1851
-
1852
- res = await this.$resetpost(
1853
- 'rs/entity/t_apply',
1854
- this.show_data
1855
- )
1856
-
1857
- this.$dispatch('breakControl', this.show_data)
1858
- },
1859
- async 'onetomanyadd' (index) {
1860
- let data = {
1861
- f_process_id : this.show_data.f_process_id,
1862
- f_operator_id: this.$login.f.id,
1863
- f_operator: this.$login.f.name,
1864
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1865
- f_orgid: this.$login.f.orgid,
1866
- f_orgname: this.$login.f.orgs
1867
- }
1868
- this.show_data.onetomany[index].fields.forEach(item => {
1869
- data[item.field] = item.value
1870
- })
1871
- let res = await this.$resetpost(
1872
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1873
- data
1874
- )
1875
-
1876
- res = await this.$resetpost(
1877
- 'rs/entity/t_apply',
1878
- this.show_data
1879
- )
1880
-
1881
- this.$dispatch('breakControl', this.show_data)
1882
- },
1883
- async 'importEvent' (index, table, configName, filepath) {
1884
- let data = {
1885
- selectdata: this.show_data,
1886
- table: table,
1887
- filepath: filepath,
1888
- configName: configName,
1889
- user: this.$login.f
1890
- }
1891
-
1892
- let res = await this.$resetpost(
1893
- `rs/logic/importEvent`,
1894
- data
1895
- )
1896
-
1897
- this.$dispatch('breakControl', this.show_data)
1898
- },
1899
- 'onbutchange' (index) {
1900
-
1901
- },
1902
- 'onbutblur' (index) {
1903
-
1904
- },
1905
- 'onbutinput' (index) {
1906
-
1907
-
1908
- }
1909
- },
1910
- watch: {
1911
- }
1912
- }
1913
- </script>
1914
- <style scoped>
1915
- /*清除model中的浮动*/
1916
- .clearfix:after,.clearfix:before{
1917
- display: table;
1918
- }
1919
- .clearfix:after{
1920
- clear: both;
1921
- }
1922
- </style>
1
+ <template>
2
+ <div class="" v-if="showview">
3
+ <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ <service-view v-ref:serviceview :data="show_data"></service-view>
5
+ </div>
6
+ </template>
7
+ <script>
8
+ import Vue from 'vue'
9
+ import {HttpResetClass} from 'vue-client'
10
+ import {isEmpty} from "../../../../../components/Util";
11
+
12
+ // Date格式化
13
+ Date.prototype.Format = function (fmt) {
14
+ var o = {
15
+ "M+": this.getMonth() + 1, //月份
16
+ "d+": this.getDate(), //日
17
+ "H+": this.getHours(), //小时
18
+ "m+": this.getMinutes(), //分
19
+ "s+": this.getSeconds(), //秒
20
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
21
+ "S": this.getMilliseconds() //毫秒
22
+ };
23
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
24
+ for (var k in o)
25
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
26
+ return fmt;
27
+ }
28
+
29
+ export default {
30
+ title: '报建流程业务控制层',
31
+ props: ['selectdata'],
32
+ data () {
33
+ return {
34
+ data: null, // 数据库数据,json配置文件数据的数据集合
35
+ json_datas: null, // Json配置文件集合
36
+ showview: false, // 控制显示service-view组件
37
+ show_data: null, // 给view层显示的数据
38
+ config: {},
39
+ Pricetype:''
40
+ }
41
+ },
42
+ ready () {
43
+ this.refurbish()
44
+ this.servicer()
45
+ this.ceshi()
46
+ },
47
+ methods: {
48
+ async servicer(){
49
+ let data = {
50
+ tablename: 't_user',
51
+ condition: `1=1`
52
+ }
53
+ let http = new HttpResetClass()
54
+ let res = await http.load(
55
+ 'POST',
56
+ `rs/sql/apply_singleTable`,
57
+ {data: data},
58
+ {resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
59
+ )
60
+ this.setLabelOptions('业务办理人员', res.data.map(item => {
61
+ return {
62
+ label: item.name,
63
+ value: item.name
64
+ }
65
+ }))
66
+ },
67
+ async ceshi(){
68
+ for (let i = 0; i < this.show_data.fields.length; i++) {
69
+ if (this.show_data.defname==='报装申请' && this.show_data.fields[i].label === '合同编号') {
70
+ debugger
71
+ let http2 = new HttpResetClass()
72
+ let applyNum = await http2.load('POST', 'rs/logic/getProjectNo', {
73
+ data: {
74
+ f_filiale: this.$login.f.orgs,
75
+ f_order_id: this.selectdata.f_order_id
76
+ }
77
+ }, {resolveMsg: null, rejectMsg: null})
78
+ debugger
79
+ console.log("生成的合同编号为:" + applyNum.data)
80
+ this.show_data.fields[i].value = applyNum.data
81
+ }
82
+ }
83
+ },
84
+ // async servicer(){
85
+ // debugger
86
+ // let data = {
87
+ // tablename: 't_user',
88
+ // condition: `1=1`
89
+ // }
90
+ // let http = new HttpResetClass()
91
+ // let res = await http.load(
92
+ // 'POST',
93
+ // `rs/sql/apply_singleTable`,
94
+ // {data: data},
95
+ // {resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
96
+ // )
97
+ // debugger
98
+ // this.setLabelOptions('服务人', res.data.map(item => {
99
+ // return {
100
+ // label: item.name,
101
+ // value: item.name
102
+ // }
103
+ // }))
104
+ // },
105
+ // 组件初始化操作
106
+ async refurbish() {
107
+ this.json_datas = this.$workflow_vue
108
+ let sum = 0
109
+ let jsonData = {}
110
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
111
+ this.$showMessage("网络故障,请刷新页面")
112
+ return
113
+ }
114
+ this.json_datas.activitys.forEach(item => {
115
+ if (this.selectdata.defname === item.title) {
116
+ jsonData = item // 拿到当前节点的json配置信息
117
+ sum++ // 节点名一样的个数
118
+ }
119
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
120
+ })
121
+
122
+ if (sum === 0) {
123
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
124
+ return
125
+ }
126
+ if (sum > 1) {
127
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
128
+ return
129
+ }
130
+
131
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
132
+
133
+ // fields 字段填充值
134
+ for (const item of this.selectdata.fields) {
135
+ if (!item.value) {
136
+ item.value = null
137
+ }
138
+
139
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
140
+ if (item.eval) {
141
+ item.value = eval(item.default)
142
+ } else {
143
+ item.value = item.default
144
+ }
145
+ }
146
+
147
+ if (this.selectdata[item.field]) {
148
+ // 将json字符串格式化赋值给value
149
+ if (String(this.selectdata[item.field]).startsWith("{")) {
150
+ item.value = JSON.parse(this.selectdata[item.field])
151
+ } else {
152
+ item.value = this.selectdata[item.field]
153
+ }
154
+ }
155
+ if (this.selectdata[item.field] === 0) {
156
+ item.value = 0
157
+ }
158
+
159
+ // datepicker
160
+ if (item.type === 'datepicker' && !item.value && item.default) {
161
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
162
+ }
163
+
164
+ // 如果配置类型为select,优先从参数列表获取options
165
+ if (item.type === 'select' || item.type === 'checkbox') {
166
+ if (item.param) {
167
+ let temp = this.$appdata.getParam(item.label)
168
+
169
+ if (temp && temp.length > 0) {
170
+ item.options = temp
171
+ }
172
+
173
+ if (item.paramLabel) {
174
+ temp = this.$appdata.getParam(item.paramLabel)
175
+ if (temp && temp.length > 0) {
176
+ item.options = temp
177
+ }
178
+ }
179
+ }
180
+
181
+ if (item.ready) {
182
+ item.options = await this[item.ready]()
183
+ }
184
+ }
185
+
186
+
187
+ if (item.type === 'checkbox') {
188
+ if (this.selectdata[item.field]) {
189
+ item.value = JSON.parse(this.selectdata[item.field])
190
+ } else {
191
+ item.value = []
192
+ }
193
+ }
194
+
195
+ this.selectdata[item.field] = item.value
196
+ }
197
+
198
+ // 控制组件
199
+ if (this.selectdata.components) {
200
+ this.selectdata.components.forEach(item => {
201
+ if (!item.mark) {
202
+ item.mark = 0
203
+ }
204
+ })
205
+ }
206
+
207
+ // 初始化onetomany
208
+ if (this.selectdata.onetomany) {
209
+ for (const item of this.selectdata.onetomany) {
210
+ let res = null
211
+ if (item.queryEvent) {
212
+ res = this[item.queryEvent]()
213
+ } else {
214
+ let data = {
215
+ tablename: item.tables[0],
216
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
217
+ }
218
+ res = await this.$resetpost(
219
+ 'rs/sql/apply_singleTable',
220
+ {data: data},
221
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
222
+ )
223
+ }
224
+
225
+ item.rows = res.data
226
+
227
+ // 初始化onetomany中的fields
228
+ for (const field of item.fields) {
229
+ if (!field.value) {
230
+ if (field.value !== 0) {
231
+ field.value = null
232
+ }
233
+ }
234
+
235
+ if (field.default || field.default === 0) {
236
+ field.value = field.default
237
+ }
238
+
239
+ // datepicker
240
+ if (field.type === 'datepicker' && !field.value && field.default) {
241
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
242
+ }
243
+
244
+ if (field.type === 'select') {
245
+
246
+ let temp = this.$appdata.getParam(field.label)
247
+
248
+ if (temp && temp.length > 0) {
249
+ field.options = temp
250
+ }
251
+
252
+ if (field.paramLabel) {
253
+ temp = this.$appdata.getParam(field.paramLabel)
254
+ if (temp && temp.length > 0) {
255
+ item.options = temp
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ // 初始化 buttons_fields
264
+ for (const item of this.selectdata.buttons) {
265
+ if (item.button_name === '下发') {
266
+
267
+ let data = {
268
+ source: item.source,
269
+ userid: this.$login.f.id
270
+ }
271
+ if (item.sourceMethod) {
272
+ data.source = this[item.sourceMethod]()
273
+ }
274
+ if (!data.source) {
275
+ this.$showMessage("请配置获取人员表达式")
276
+ return
277
+ }
278
+
279
+ let res = await this.$resetpost(
280
+ 'rs/search',
281
+ {data: data},
282
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
283
+ )
284
+
285
+ let options = res.data.map(source => {
286
+ return {
287
+ "label": source.name,
288
+ "value": source.id
289
+ }
290
+ })
291
+
292
+ if (item.button_fields.length !== 1) {
293
+ this.$showMessage("下发有且只能有一个字段!!!")
294
+ return
295
+ }
296
+
297
+ item.button_fields[0].options = options
298
+ }
299
+ if (item.button_fields) {
300
+ item.button_fields.forEach(x => {
301
+ // 如果配置类型为select,优先从参数列表获取options
302
+ if (x.type === 'select') {
303
+
304
+ if (x.param) {
305
+ let temp = this.$appdata.getParam(x.label)
306
+
307
+ if (temp && temp.length > 0) {
308
+ x.options = temp
309
+ }
310
+
311
+ if (x.paramLabel) {
312
+ temp = this.$appdata.getParam(x.paramLabel)
313
+ if (temp && temp.length > 0) {
314
+ x.options = temp
315
+ }
316
+ }
317
+ }
318
+
319
+ }
320
+ })
321
+ }
322
+ }
323
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
324
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
325
+ console.log('打印下temp',temp)
326
+ this.show_data = temp
327
+ this.$nextTick(() => {
328
+ this.showview = true
329
+ })
330
+ this.ceshi()
331
+ },
332
+ // 金额转大写
333
+ smalltoBIG(n) {
334
+ let fraction = ['角', '分'];
335
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
336
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
337
+ let head = n < 0 ? '欠' : '';
338
+ n = Math.abs(n);
339
+
340
+ let s = '';
341
+
342
+ for (var i = 0; i < fraction.length; i++) {
343
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
344
+ }
345
+ s = s || '整';
346
+ n = Math.floor(n);
347
+
348
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
349
+ let p = '';
350
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
351
+ p = digit[n % 10] + unit[1][j] + p;
352
+ n = Math.floor(n / 10);
353
+ }
354
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
355
+ }
356
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
357
+ },
358
+ getLableValue(label) {
359
+ for (const item of this.show_data.fields) {
360
+ if (item.label === label && item.type !== 'number') {
361
+ return item.value || ''
362
+ }
363
+ if (item.label === label && item.type === 'number') {
364
+ return item.value || 0
365
+ }
366
+ }
367
+ },
368
+ getLableOptions(label) {
369
+ for (const item of this.show_data.fields) {
370
+ if (item.label === label) {
371
+ return item.options
372
+ }
373
+ }
374
+ },
375
+ setLabelValue(label, value) {
376
+ for (const item of this.show_data.fields) {
377
+ if (item.label === label) {
378
+ item.value = value
379
+ this.show_data[item.field] = value
380
+ }
381
+ }
382
+ },
383
+ setLabelOptions(label, options) {
384
+ for (const item of this.show_data.fields) {
385
+ if (item.label === label) {
386
+ item.options = options
387
+ }
388
+ }
389
+ },
390
+ showLabels(...labels) {
391
+ for (const item of this.show_data.fields) {
392
+ if (labels.includes(item.label)) {
393
+ item.hidden = false
394
+ }
395
+ }
396
+ },
397
+ hideLabels(...labels) {
398
+ for (const item of this.show_data.fields) {
399
+ if (labels.includes(item.label)) {
400
+ item.hidden = true
401
+ }
402
+ }
403
+ },
404
+ requiredLabels(...labels) {
405
+ for (const item of this.show_data.fields) {
406
+ if (labels.includes(item.label)) {
407
+ item.required = true
408
+ }
409
+ }
410
+ },
411
+ electiveLabels(...labels) {
412
+ for (const item of this.show_data.fields) {
413
+ if (labels.includes(item.label)) {
414
+ item.required = false
415
+ }
416
+ }
417
+ },
418
+ readonlyLabels(...labels) {
419
+ for (const item of this.show_data.fields) {
420
+ if (labels.includes(item.label)) {
421
+ item.readonly = true
422
+ item.disabled = true
423
+ }
424
+ }
425
+ },
426
+ readwriteLabels(...labels) {
427
+ for (const item of this.show_data.fields) {
428
+ if (labels.includes(item.label)) {
429
+ item.readonly = false
430
+ item.disabled = false
431
+ }
432
+ }
433
+ },
434
+ disabledButtons(...buttons) {
435
+ for (const item of this.show_data.buttons) {
436
+ if (buttons.includes(item.button_name)) {
437
+ item.disabled = true
438
+ }
439
+ }
440
+ },
441
+ enableButtons(...buttons) {
442
+ for (const item of this.show_data.buttons) {
443
+ if (buttons.includes(item.button_name)) {
444
+ item.disabled = false
445
+ }
446
+ }
447
+ },
448
+ showButtons(...buttons) {
449
+ for (const item of this.show_data.buttons) {
450
+ if (buttons.includes(item.button_name)) {
451
+ item.hidden = false
452
+ }
453
+ }
454
+ },
455
+ hideButtons(...buttons) {
456
+ for (const item of this.show_data.buttons) {
457
+ if (buttons.includes(item.button_name)) {
458
+ item.hidden = true
459
+ }
460
+ }
461
+ },
462
+ async checkDuplicate(index) {
463
+ let http = new HttpResetClass()
464
+ let data = {
465
+ tablename: 't_apply',
466
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
467
+ }
468
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
469
+ resolveMsg: null,
470
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
471
+ })
472
+ if (res.data.length > 0) {
473
+ this.show_data.fields[index].value = null
474
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
475
+ }
476
+ },
477
+ // 获取片区
478
+ async getSliceArea () {
479
+ let data = {
480
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
481
+ userid: this.$login.f.id
482
+ }
483
+
484
+ let http = new HttpResetClass()
485
+ let res = await http.load(
486
+ 'POST',
487
+ `rs/search`,
488
+ {data: data},
489
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
490
+ )
491
+
492
+ return res.data.map(item => {
493
+ return {
494
+ label: item.name,
495
+ value: item.name
496
+ }
497
+ })
498
+ },
499
+ // 获取区县
500
+ async getPcd () {
501
+ let data = {
502
+ tablename: 't_pcd',
503
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
504
+ }
505
+ let http = new HttpResetClass()
506
+ let res = await http.load(
507
+ 'POST',
508
+ `rs/sql/apply_singleTable`,
509
+ {data: data},
510
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
511
+ )
512
+
513
+ return res.data.map(item => {
514
+ return {
515
+ label: item.f_pcd,
516
+ value: item.f_pcd
517
+ }
518
+ })
519
+ },
520
+ // 获取集收单位
521
+ async getArea () {
522
+ let data = {
523
+ tablename: 't_area',
524
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
525
+ }
526
+ let http = new HttpResetClass()
527
+ let res = await http.load(
528
+ 'POST',
529
+ `rs/sql/apply_singleTable`,
530
+ {data: data},
531
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
532
+ )
533
+
534
+ return res.data.map(item => {
535
+ return {
536
+ label: item.f_residential_area,
537
+ value: item.f_residential_area
538
+ }
539
+ })
540
+ },
541
+ // 缴费前置
542
+ chargeBefore () {
543
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
544
+ this.$showAlert('费用未结清!!!', 'warning', 3000)
545
+ throw null
546
+ }
547
+ },
548
+ // 施工前置 加表具后状态是待开通 提交后是正常 所以这里的判断条件需改正 (and uf.f_meter_classify is null and f_meternumber is null)
549
+ async constructionBefore () {
550
+ let http = new HttpResetClass()
551
+ let data = {
552
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
553
+ }
554
+ let res = await http.load(
555
+ 'POST',
556
+ 'rs/sql/countApplyUserinfo',
557
+ {data: data},
558
+ {
559
+ resolveMsg: null,
560
+ rejectMsg: '安装明细查询失败!!!'
561
+ })
562
+ if (res.data[0].num > 0) {
563
+ this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
564
+ throw `还有${res.data[0].num}户未安装,无法提交`
565
+ }
566
+ },
567
+ changePipeBuild () {
568
+ if (this.selectdata.f_process_dep === '工程部') {
569
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
570
+ }
571
+ if (this.selectdata.f_process_dep === '运营部') {
572
+ return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
573
+ }
574
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
575
+ },
576
+ async getDevInfo () {
577
+ let data = {
578
+ tablename: 't_dev_info',
579
+ condition: `f_orgid = '${this.$login.f.orgid}'`
580
+ }
581
+ let http = new HttpResetClass()
582
+ let res = await http.load(
583
+ 'POST',
584
+ `rs/sql/apply_singleTable`,
585
+ {data: data},
586
+ {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
587
+ )
588
+
589
+ return res.data.map(item => {
590
+ return {
591
+ label: item.f_dev_name,
592
+ value: item.f_dev_name
593
+ }
594
+ })
595
+ },
596
+ async getPrice (f_price_id) {
597
+ console.log('=======================')
598
+ console.log(f_price_id)
599
+
600
+ let data = {
601
+ condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
602
+ }
603
+ if(this.Pricetype==='机表'){
604
+ data.condition=`sp.f_custom = '机表'`
605
+ }
606
+ if(this.Pricetype==='非机表'){
607
+ data.condition=`sp.f_custom = '非机表'`
608
+ }
609
+
610
+ if (!isEmpty(f_price_id)) {
611
+ data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
612
+ }
613
+ let http = new HttpResetClass()
614
+ let res = await http.load(
615
+ 'POST',
616
+ `rs/sql/applyGetPrice`,
617
+ {data: data},
618
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
619
+ )
620
+
621
+ let a= res.data.map(item => {
622
+ return {
623
+ label: item.f_price_name,
624
+ value: item
625
+ }
626
+ })
627
+ this.selectdata.fields.forEach(field => {
628
+ if (field.label === '气价名称') {
629
+ field.options = a}
630
+ })
631
+ return a
632
+ },
633
+ addressInitialization () {
634
+ this.$getConfig(this, 'UserAddress')
635
+
636
+ let f_address_type = this.show_data.f_address_type
637
+
638
+ for (const item of this.show_data.fields) {
639
+ if (f_address_type === '民用市区') {
640
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
641
+ item.hidden = false
642
+ item.required = true
643
+ }
644
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
645
+ item.hidden = false
646
+ item.required = false
647
+ }
648
+ if (item.label === '地址') {
649
+ item.readonly = true
650
+ }
651
+ }
652
+ if (f_address_type === '民用乡镇') {
653
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
654
+ item.hidden = false
655
+ item.required = true
656
+ }
657
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
658
+ item.hidden = false
659
+ item.required = false
660
+ }
661
+ if (item.label === '楼层') {
662
+ item.hidden = true
663
+ item.required = false
664
+ }
665
+ if (item.label === '地址') {
666
+ item.readonly = true
667
+ }
668
+ }
669
+ if (f_address_type === '特殊地址') {
670
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
671
+ item.hidden = false
672
+ item.required = true
673
+ }
674
+ if (item.label === '集收单位') {
675
+ item.hidden = false
676
+ if (this.show_data.f_apply_type === '工商户报建'){
677
+ item.required = false
678
+ } else {
679
+ item.required = false
680
+ }
681
+
682
+ }
683
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
684
+ item.hidden = true
685
+ item.required = false
686
+ }
687
+ if (item.label === '地址') {
688
+ item.readonly = false
689
+ }
690
+ }
691
+
692
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
693
+ item.hidden = true
694
+ }
695
+ }
696
+ },
697
+ async streetChange () {
698
+ if (isEmpty(this.show_data.f_street)) {
699
+ return
700
+ }
701
+
702
+ let data = {
703
+ tablename: 't_area',
704
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
705
+ }
706
+ let http = new HttpResetClass()
707
+ let res = await http.load(
708
+ 'POST',
709
+ `rs/sql/apply_singleTable`,
710
+ {data: data},
711
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
712
+ )
713
+
714
+ this.setLabelOptions('集收单位', res.data.map(item => {
715
+ return {
716
+ label: item.f_residential_area,
717
+ value: item.f_residential_area
718
+ }
719
+ }))
720
+ },
721
+ async pcdChange () {
722
+ if (isEmpty(this.show_data.f_pcd)) {
723
+ return
724
+ }
725
+
726
+ let data = {
727
+ tablename: 't_street',
728
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
729
+ }
730
+ let f_address_type = this.getLableValue('地址类型')
731
+
732
+ if (f_address_type === '民用市区') {
733
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
734
+ }
735
+ if (f_address_type === '民用乡镇') {
736
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
737
+ }
738
+
739
+ let http = new HttpResetClass()
740
+ let res = await http.load(
741
+ 'POST',
742
+ `rs/sql/apply_singleTable`,
743
+ {data: data},
744
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
745
+ )
746
+
747
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
748
+ return {
749
+ label: item.f_street,
750
+ value: item.f_street
751
+ }
752
+ }))
753
+ },
754
+ async addressTips () {
755
+ // console.log('======================='+this.show_data.f_apply_type)
756
+ let res = ''
757
+ if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
758
+ res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
759
+ }else{
760
+ res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
761
+ }
762
+ if (res == 'confirm') {
763
+ return
764
+ }
765
+ throw '用户信息确认!!!'
766
+ },
767
+ // async getDesignerPeople () {
768
+ // let data = {
769
+ // source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
770
+ // userid: this.$login.f.id
771
+ // }
772
+ //
773
+ // let http = new HttpResetClass()
774
+ // let res = await http.load(
775
+ // 'POST',
776
+ // `rs/search`,
777
+ // {data: data},
778
+ // {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
779
+ // )
780
+ //
781
+ // return res.data.map(item => {
782
+ // return {
783
+ // label: item.name,
784
+ // value: item.id
785
+ // }
786
+ // })
787
+ // },
788
+ async surveyStopApply () {
789
+ console.log('终止报建!!!!!')
790
+
791
+ this.show_data.f_stop_reason = '现场勘察不符合报装条件'
792
+
793
+ let data = {
794
+ data: this.show_data,
795
+ user: this.$login.f
796
+ }
797
+
798
+ let res = await this.$resetpost(
799
+ `rs/logic/surveyStopApply`,
800
+ {data: data},
801
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
802
+ )
803
+
804
+ this.$dispatch('loadPage')
805
+
806
+ throw '终止报建!!!'
807
+ },
808
+ async contract_number() {
809
+ console.log("进入编号合同编号生成",this.$login.f.orgs)
810
+ let f_contract_number = ''
811
+ const nowDate = new Date();
812
+ const date = {
813
+ year: nowDate.getFullYear(),
814
+ month: nowDate.getMonth() + 1,
815
+ day: nowDate.getDate()
816
+ }
817
+
818
+ function upperCaseChars(dir) {
819
+ let string = '';
820
+ switch (dir){
821
+ case '周口市天然气有限公司':
822
+ string = 'ZK' // 当表达式的结果等于 房产 时,则执行该代码
823
+ break;
824
+ case '项城市天然气有限公司':
825
+ string = "XC" // 当表达式的结果等于 自建房 时,则执行该代码
826
+ break;
827
+ case '西华县天然气有限公司':
828
+ string = 'XH' // 当表达式的结果等于 商业 时,则执行该代码
829
+ break;
830
+ case '鹿邑县天然气有限公司':
831
+ string = 'LY' // 当表达式的结果等于 工业 时,则执行该代码
832
+ break;
833
+ case '郸城县天然气有限公司':
834
+ string = 'DC' // 当表达式的结果等于 中压 时,则执行该代码
835
+ break;
836
+ case '测试公司(一)':
837
+ string = 'CS' // 当表达式的结果等于 中压 时,则执行该代码
838
+ break;
839
+ default :
840
+ break; // 如果没有与表达式相同的值,则执行该代码
841
+ }
842
+ return string;
843
+ }
844
+
845
+ const dir = upperCaseChars(this.$login.f.orgs) //分公司
846
+
847
+ let type = 0 //类型
848
+
849
+ switch (this.show_data.f_entry_type){
850
+ case '城区/县城':
851
+ type = 1 // 当表达式的结果等于 城区 时,则执行该代码
852
+ break;
853
+ case '新农村':
854
+ type = 2 // 当表达式的结果等于 新农村 时,则执行该代码
855
+ break;
856
+ case '测试':
857
+ type = 3 // 当表达式的结果等于 新农村 时,则执行该代码
858
+ break;
859
+ default :
860
+ break; // 如果没有与表达式相同的值,则执行该代码
861
+ }
862
+
863
+ let nature = 0 // 性质
864
+ switch (this.show_data.f_apply_nature){
865
+ case '楼房':
866
+ nature = 1 // 当表达式的结果等于 楼房 时,则执行该代码
867
+ break;
868
+ case '房产':
869
+ nature = 1 // 当表达式的结果等于 房产 时,则执行该代码
870
+ break;
871
+ case '自建房':
872
+ nature = 2 // 当表达式的结果等于 自建房 时,则执行该代码
873
+ break;
874
+ case '商业':
875
+ nature = 3 // 当表达式的结果等于 商业 时,则执行该代码
876
+ break;
877
+ case '学校':
878
+ nature = 3 // 当表达式的结果等于 学校 时,则执行该代码
879
+ break;
880
+ case '福利机构':
881
+ nature = 3 // 当表达式的结果等于 福利机构 时,则执行该代码
882
+ break;
883
+ case '其他':
884
+ nature = 3 // 当表达式的结果等于 其他 时,则执行该代码
885
+ break;
886
+ case '工业':
887
+ nature = 4 // 当表达式的结果等于 工业 时,则执行该代码
888
+ break;
889
+ case '中压':
890
+ nature = 5 // 当表达式的结果等于 中压 时,则执行该代码
891
+ break;
892
+ case '测试':
893
+ nature = 6 // 当表达式的结果等于 中压 时,则执行该代码
894
+ break;
895
+ default :
896
+ break; // 如果没有与表达式相同的值,则执行该代码
897
+ }
898
+
899
+ const newMonth = date.month >= 10 ? date.month : '0' + date.month //月份
900
+ const dataYm = date.year + '-01-01'
901
+ const newYear = date.year + 1
902
+ const year = date.year.toString().substring(2,4) //年份
903
+
904
+ let data = {
905
+ orgid: this.$login.f.orgid
906
+ }
907
+
908
+ let http = new HttpResetClass()
909
+ let res = await http.load('POST', 'rs/sql/contractCount', {data:data}, {
910
+ resolveMsg: null,
911
+ rejectMsg: null
912
+ })
913
+ let oldDate
914
+ for (const item of res.data) {
915
+ if (item.name === '合同编号最后更新日期'){
916
+ oldDate = item.value
917
+ }
918
+ }
919
+ for (const item of res.data){
920
+ if (item.name === '合同编号'){
921
+ if (item.value === 0 || Date.parse(oldDate) < Date.parse(dataYm)) {
922
+ f_contract_number = dir + type + nature + year + newMonth + '001'
923
+ console.log("触发if", f_contract_number)
924
+ } else {
925
+ let count = item.value
926
+ f_contract_number = dir + type + nature + year + newMonth + this.PrefixInteger(count, 3)
927
+ console.log("触发else", f_contract_number)
928
+ }
929
+ }
930
+ }
931
+ this.selectdata.f_contract_number = f_contract_number
932
+ this.show_data.f_contract_number = f_contract_number
933
+ return f_contract_number
934
+ },
935
+ PrefixInteger(num, n) {
936
+ return (Array(n).join(0) + num).slice(-n);
937
+ }
938
+ },
939
+ events: {
940
+ 'priceType'(index){
941
+ this.Pricetype = this.getLableValue('所属类型')
942
+ console.log('打印方法值',this.getPrice(this.show_data.f_price_id))
943
+ for (const item of this.show_data.fields) {
944
+ if (this.show_data.f_sprice_type !=null && this.show_data.f_sprice_type !='') {
945
+ if(item.label==='气价名称'){
946
+ this.getPrice(this.show_data.f_price_id).then(value =>{
947
+ item.options=value
948
+ })
949
+ console.log('最终',item.options)
950
+ }
951
+ }
952
+ }
953
+ },
954
+ 'complyInstallation' (index) {
955
+ if (this.show_data.f_is_have === '否') {
956
+ this.hideButtons('提交', '出图', '缴费')
957
+ this.showButtons('终止')
958
+ }
959
+ if (this.show_data.f_is_have === '是') {
960
+ this.hideButtons('终止')
961
+ this.showButtons('提交', '出图', '缴费')
962
+ }
963
+ },
964
+ async 'igniteDispatchReadyEvent' () {
965
+ let data = {
966
+ tablename: 'activityins',
967
+ condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
968
+ }
969
+ let http = new HttpResetClass()
970
+ let res = await http.load(
971
+ 'POST',
972
+ `rs/sql/apply_singleTable`,
973
+ {data: data},
974
+ {resolveMsg: null, rejectMsg: '查询失败!!!'}
975
+ )
976
+ if (res.data.length <= 0) {
977
+ console.log('+++++++++++++++++++++++++++++')
978
+ console.log('没有施工,不能退回')
979
+ this.hideButtons('退回')
980
+ }
981
+ },
982
+ 'buildReadyEvent' () {
983
+ this.setLabelValue('施工单位', this.$login.f.name)
984
+ this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
985
+ },
986
+ // 选择材料
987
+ async materialNameChenge (index, fieldIndex) {
988
+ let material = this.show_data.onetomany[index].fields[fieldIndex].value
989
+
990
+ this.show_data.onetomany[index].fields.forEach(item => {
991
+ if (material[item.field]) {
992
+ item.value = material[item.field]
993
+ }
994
+ })
995
+ },
996
+ // 打开模态框获取材料
997
+ async 'getMaterialName' (index) {
998
+ let data = {
999
+ condition: `1=1`
1000
+ }
1001
+ let http = new HttpResetClass()
1002
+ let res = await http.load(
1003
+ 'POST',
1004
+ `rs/sql/getStockMaterial`,
1005
+ {data: data},
1006
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1007
+ )
1008
+
1009
+ this.show_data.onetomany[index].fields.forEach(field => {
1010
+ if (field.label === '选择材料') {
1011
+ field.options = res.data.map(item => {
1012
+ return {
1013
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1014
+ 'value': item
1015
+ }
1016
+ })
1017
+ }
1018
+ })
1019
+ },
1020
+ // 搜索小区
1021
+ async 'searchArea' (area, index) {
1022
+ let data = {
1023
+ tablename: 't_area',
1024
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
1025
+ }
1026
+ let http = new HttpResetClass()
1027
+ let res = await http.load(
1028
+ 'POST',
1029
+ `rs/sql/apply_singleTable`,
1030
+ {data: data},
1031
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1032
+ )
1033
+
1034
+ if (res.data.length === 0) {
1035
+ return
1036
+ }
1037
+
1038
+ this.setLabelOptions('集收单位', res.data.map(item => {
1039
+ return {
1040
+ label: item.f_residential_area,
1041
+ value: item.f_residential_area
1042
+ }
1043
+ }))
1044
+ },
1045
+ // 搜索小区
1046
+ async 'searchAreaCollective' (area, index) {
1047
+ let data = {
1048
+ tablename: 't_area',
1049
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area like '%${area}%'`
1050
+ }
1051
+ let http = new HttpResetClass()
1052
+ let res = await http.load(
1053
+ 'POST',
1054
+ `rs/sql/apply_singleTable`,
1055
+ {data: data},
1056
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1057
+ )
1058
+
1059
+ if (res.data.length === 0) {
1060
+ return
1061
+ }
1062
+
1063
+ this.setLabelOptions('集收单位', res.data.map(item => {
1064
+ return {
1065
+ label: item.f_residential_area,
1066
+ value: item.f_residential_area
1067
+ }
1068
+ }))
1069
+ },
1070
+ // 选择气价
1071
+ 'priceChange' (index) {
1072
+ debugger
1073
+ if (isEmpty(this.show_data.stairPrice)) {
1074
+ return
1075
+ }
1076
+
1077
+ let stairPrice = this.getLableValue('气价名称')
1078
+
1079
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
1080
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1081
+ this.setLabelValue('价格', stairPrice.f_price)
1082
+ this.setLabelValue('客户类型', stairPrice.f_user_type)
1083
+ this.show_data.f_price_id = stairPrice.id
1084
+ this.show_data.f_price_name = stairPrice.f_price_name
1085
+ },
1086
+ // 选择开发商
1087
+ async 'devInfoChange' (index) {
1088
+ if (isEmpty(this.show_data.f_company_name)) {
1089
+ return
1090
+ }
1091
+ let data = {
1092
+ tablename: 't_dev_info',
1093
+ condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
1094
+ }
1095
+ let res = await this.$resetpost(
1096
+ `rs/sql/apply_singleTable`,
1097
+ {data: data},
1098
+ {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1099
+ )
1100
+ this.show_data.f_dev_id = res.data[0].id
1101
+ this.show_data.f_dev_code = res.data[0].f_dev_code
1102
+ this.setLabelValue('法人名称', res.data[0].f_legal_person)
1103
+ this.setLabelValue('身份证', res.data[0].f_idnumber)
1104
+ this.setLabelValue('营业执照', res.data[0].f_license_num)
1105
+ },
1106
+ // 退款金额
1107
+ 'refundMoneyChange' (index) {
1108
+ let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
1109
+ let f_refund_money = this.show_data.fields[index].value
1110
+
1111
+ if (f_refund_money > f_cumulative_payment_money) {
1112
+ this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
1113
+ this.show_data.fields[index].value = null
1114
+ }
1115
+ },
1116
+ // 检查重复
1117
+ 'checkRepeat' (index) {
1118
+ this.checkDuplicate(index)
1119
+ },
1120
+ // 选择报建项目
1121
+ 'selectApply' (row) {
1122
+ this.setLabelValue('工程名称', row.f_entry_name)
1123
+ this.setLabelValue('工程编号', row.f_apply_num)
1124
+ this.setLabelValue('报建类型', row.f_apply_type)
1125
+ this.setLabelValue('用户名称', row.f_user_name)
1126
+ this.setLabelValue('用户电话', row.f_phone)
1127
+ this.setLabelValue('证件类型', row.f_credentials)
1128
+ this.setLabelValue('证件号码', row.f_idnumber)
1129
+ this.setLabelValue('地址', row.f_address)
1130
+ this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1131
+
1132
+ this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1133
+
1134
+ delete row.id
1135
+ delete row.actid
1136
+ delete row.defid
1137
+ delete row.defname
1138
+ delete row.version
1139
+ delete row.f_apply_num
1140
+ delete row.f_sub_state
1141
+ delete row.f_apply_type
1142
+ delete row.f_process_id
1143
+
1144
+ this.show_data = Object.assign({}, this.show_data, row)
1145
+
1146
+ this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1147
+ },
1148
+ // 是否终止
1149
+ 'isStopChange' (index) {
1150
+ let f_is_stop = this.show_data.f_is_stop
1151
+
1152
+ for (const item of this.show_data.fields) {
1153
+ if (f_is_stop === '是') {
1154
+ if (item.label === '终止原因') {
1155
+ item.hidden = false
1156
+ item.required = true
1157
+ }
1158
+ } else {
1159
+ if (item.label === '终止原因') {
1160
+ item.hidden = true
1161
+ item.required = false
1162
+ }
1163
+ }
1164
+ }
1165
+ },
1166
+ // 终止报建初始化
1167
+ async 'stopApplyReadyEvent' () {
1168
+
1169
+ let f_is_stop = this.getLableValue('是否终止')
1170
+
1171
+ for (const item of this.show_data.fields) {
1172
+ if (f_is_stop === '是') {
1173
+ if (item.label === '终止原因') {
1174
+ item.hidden = false
1175
+ item.required = true
1176
+ }
1177
+ } else {
1178
+ if (item.label === '终止原因') {
1179
+ item.hidden = true
1180
+ item.required = false
1181
+ }
1182
+ }
1183
+ }
1184
+
1185
+ if (isEmpty(this.show_data.f_parent_process_id)) {
1186
+ return
1187
+ }
1188
+ let data = {
1189
+ condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
1190
+ data: {
1191
+ id: this.$login.f.id,
1192
+ orgid: this.$login.f.orgid
1193
+ }
1194
+ }
1195
+ let res = await this.$resetpost(
1196
+ `rs/sql/supervisory`,
1197
+ {data: data},
1198
+ {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
1199
+ )
1200
+ this.show_data.parentApply = res.data[0]
1201
+ },
1202
+ // 选择用户档案信息
1203
+ 'selectUserinfo' (row) {
1204
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1205
+ this.setLabelValue('用户名称', row.f_user_name)
1206
+ this.setLabelValue('用户电话', row.f_user_phone)
1207
+ this.setLabelValue('证件类型', row.f_credentials)
1208
+ this.setLabelValue('证件号码', row.f_idnumber)
1209
+ this.setLabelValue('地址', row.f_address)
1210
+
1211
+ this.show_data.f_userinfo_id = row.f_userinfo_id
1212
+ this.show_data.f_userinfo_code = row.f_userinfo_code
1213
+ },
1214
+ // 是否购买保险
1215
+ async 'isInsureChange' (index) {
1216
+ if (!this.show_data.f_is_insure) {
1217
+ return
1218
+ }
1219
+ let f_is_insure = this.show_data.f_is_insure
1220
+ for (const item of this.show_data.fields) {
1221
+ if (f_is_insure === '是') {
1222
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1223
+ item.hidden = false
1224
+ item.required = true
1225
+ }
1226
+ if (item.label === '保险备注') {
1227
+ item.hidden = false
1228
+ }
1229
+ } else {
1230
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1231
+ item.hidden = true
1232
+ item.required = false
1233
+ }
1234
+ }
1235
+ }
1236
+ },
1237
+ // 通气点火初始化
1238
+ async 'gasReadyEvent' () {
1239
+ // 是否有气价信息
1240
+ if (!isEmpty(this.show_data.f_price_id)) {
1241
+ let priceList = await this.getPrice(this.show_data.f_price_id)
1242
+ this.setLabelValue('气价名称', priceList[0].value)
1243
+ }
1244
+
1245
+ let data = {
1246
+ tablename: 't_userfees',
1247
+ condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1248
+ }
1249
+ let http = new HttpResetClass()
1250
+ let res = await http.load(
1251
+ 'POST',
1252
+ `rs/sql/apply_singleTable`,
1253
+ {data: data},
1254
+ {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1255
+ )
1256
+ if (res.data.length > 0) {
1257
+ this.setLabelValue('待执行保险', '是')
1258
+ for (const item of this.show_data.fields) {
1259
+ if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1260
+ item.hidden = true
1261
+ item.required = false
1262
+ item.value = null
1263
+ }
1264
+ }
1265
+ } else {
1266
+ this.setLabelValue('待执行保险', '否')
1267
+ for (const item of this.show_data.fields) {
1268
+ if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1269
+ item.hidden = false
1270
+ item.required = true
1271
+ }
1272
+ }
1273
+ }
1274
+
1275
+ // 保险初始化显示内容
1276
+ let f_is_insure = this.getLableValue('是否购买保险')
1277
+ for (const item of this.show_data.fields) {
1278
+ if (f_is_insure === '是') {
1279
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1280
+ item.hidden = false
1281
+ item.required = true
1282
+ }
1283
+ if (item.label === '保险备注') {
1284
+ item.hidden = false
1285
+ }
1286
+ // 本期保费到期时间默认一年
1287
+ if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1288
+ let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1289
+ this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1290
+ }
1291
+ }
1292
+ if (f_is_insure === '否') {
1293
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1294
+ item.hidden = true
1295
+ item.required = false
1296
+ }
1297
+ }
1298
+ }
1299
+ },
1300
+ // 合同金额失去焦点
1301
+ async 'contractMoneyChange' (index) {
1302
+ let data = {
1303
+ operator: '+',
1304
+ num1: this.show_data.f_contract_money || 0,
1305
+ num2: this.getLableValue('追加金额') || 0
1306
+ }
1307
+ let res = await this.$resetpost(
1308
+ `rs/logic/compute`,
1309
+ {data: data},
1310
+ {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1311
+ )
1312
+
1313
+ this.setLabelValue('应交金额', res.data)
1314
+ },
1315
+ // 街道失去焦点
1316
+ async 'streetChange' (index) {
1317
+ if (isEmpty(this.show_data.f_street)) {
1318
+ return
1319
+ }
1320
+
1321
+ this.setLabelValue('集收单位', null)
1322
+
1323
+ let data = {
1324
+ tablename: 't_area',
1325
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1326
+ }
1327
+ let http = new HttpResetClass()
1328
+ let res = await http.load(
1329
+ 'POST',
1330
+ `rs/sql/apply_singleTable`,
1331
+ {data: data},
1332
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1333
+ )
1334
+
1335
+ this.setLabelOptions('集收单位', res.data.map(item => {
1336
+ return {
1337
+ label: item.f_residential_area,
1338
+ value: item.f_residential_area
1339
+ }
1340
+ }))
1341
+ },
1342
+ // 区县失去焦点
1343
+ async 'pcdChange' (index) {
1344
+ if (isEmpty(this.show_data.f_pcd)) {
1345
+ return
1346
+ }
1347
+
1348
+ this.setLabelValue('街道/乡镇', null)
1349
+ this.setLabelValue('集收单位', null)
1350
+
1351
+
1352
+
1353
+ let data = {
1354
+ tablename: 't_street',
1355
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1356
+ }
1357
+ let f_address_type = this.getLableValue('地址类型')
1358
+
1359
+ if (f_address_type === '民用市区') {
1360
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1361
+ }
1362
+ if (f_address_type === '民用乡镇') {
1363
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1364
+ }
1365
+
1366
+ let http = new HttpResetClass()
1367
+ let res = await http.load(
1368
+ 'POST',
1369
+ `rs/sql/apply_singleTable`,
1370
+ {data: data},
1371
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1372
+ )
1373
+
1374
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
1375
+ return {
1376
+ label: item.f_street,
1377
+ value: item.f_street
1378
+ }
1379
+ }))
1380
+ },
1381
+ // 地址类型失去焦点
1382
+ 'addressTypeChange' (index) {
1383
+ this.setLabelValue('街道/乡镇', null)
1384
+ this.setLabelValue('集收单位', null)
1385
+ let f_address_type = this.show_data.fields[index].value
1386
+ for (const item of this.show_data.fields) {
1387
+ if (f_address_type === '民用市区') {
1388
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1389
+ item.hidden = false
1390
+ item.required = true
1391
+ item.value = null
1392
+ }
1393
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1394
+ item.hidden = false
1395
+ item.required = false
1396
+ item.value = null
1397
+ }
1398
+ if (item.label === '地址') {
1399
+ item.readonly = true
1400
+ item.value = null
1401
+ }
1402
+ }
1403
+ if (f_address_type === '民用乡镇') {
1404
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1405
+ item.hidden = false
1406
+ item.required = true
1407
+ item.value = null
1408
+ }
1409
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1410
+ item.hidden = false
1411
+ item.required = false
1412
+ item.value = null
1413
+ }
1414
+ if (item.label === '楼层') {
1415
+ item.hidden = true
1416
+ item.required = false
1417
+ item.value = null
1418
+ }
1419
+ if (item.label === '地址') {
1420
+ item.readonly = true
1421
+ item.value = null
1422
+ }
1423
+ }
1424
+ if (f_address_type === '特殊地址') {
1425
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
1426
+ item.hidden = false
1427
+ item.required = true
1428
+ item.value = null
1429
+ }
1430
+ if (item.label === '集收单位') {
1431
+ item.hidden = false
1432
+ item.required = false
1433
+ item.value = null
1434
+ }
1435
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
1436
+ item.hidden = true
1437
+ item.required = false
1438
+ item.value = null
1439
+ }
1440
+ if (item.label === '地址') {
1441
+ item.readonly = false
1442
+ item.value = null
1443
+ }
1444
+ }
1445
+ }
1446
+ },
1447
+ // 团购转散户初始化
1448
+ 'apply2ReadyEvent' () {
1449
+ if (this.show_data.f_apply_source === '线下发起') {
1450
+ this.addressInitialization()
1451
+ this.hideLabels('用户编号')
1452
+ this.electiveLabels('用户编号')
1453
+ this.showLabels('片区', '地址类型')
1454
+ this.requiredLabels('片区', '地址类型')
1455
+ }
1456
+ if (this.show_data.f_apply_source === '自动发起') {
1457
+ this.hideLabels('片区', '地址类型')
1458
+ this.electiveLabels('片区', '地址类型',)
1459
+ }
1460
+ },
1461
+ // 申请节点初始化
1462
+ 'applyReadyEvent' () {
1463
+ this.addressInitialization()
1464
+ this.pcdChange()
1465
+ this.streetChange()
1466
+ },
1467
+ // ===========================================
1468
+ async 'button'() {
1469
+ if (this.show_data.button.before) {
1470
+ await this[this.show_data.button.before]()
1471
+ }
1472
+ // 点击重置按钮就重置数据
1473
+ if (this.show_data.button.button_name === '重置') {
1474
+ this.$dispatch('breakControl', this.selectdata)
1475
+ return
1476
+ }
1477
+
1478
+ this.show_data.user = this.$login.f
1479
+ this.show_data.start_activity = this.$workflow_vue.start_activity
1480
+ this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
1481
+
1482
+ if ((this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工' && this.show_data.button.button_name === '完工'){
1483
+ //判断是否添加报警器材料
1484
+ let bjqlag = false
1485
+ let datatemp = {
1486
+ 'bjqid':"",
1487
+ 'fprocessid':"",
1488
+ 'sqvalue':"",
1489
+ 'f_bjq_sid':"",
1490
+ 'f_material_code':"",
1491
+ 'f_bjq_baidu_lng':"",
1492
+ 'f_bjq_baidu_lat':"",
1493
+ 'f_bjq_gaode_lng':"",
1494
+ 'f_bjq_gaode_lat':""
1495
+ }
1496
+
1497
+ let bjqststedata = {
1498
+ "sid":"",
1499
+ "bjqtype":"",
1500
+ "f_process_id":"",
1501
+ "bjqstate":"",
1502
+ "f_userinfo_code":""
1503
+ }
1504
+ let numOne = [];
1505
+
1506
+ let http = new HttpResetClass()
1507
+ let data = {
1508
+ tablename: `t_material_apply`,
1509
+ condition: `f_process_id='${this.show_data.f_process_id}'`
1510
+ }
1511
+ let res = await http.load(
1512
+ 'POST',
1513
+ `rs/sql/apply_singleTable`,
1514
+ {data: data},
1515
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
1516
+ )
1517
+ res.data.forEach(item => {
1518
+ if (item.f_material_name.substr(0,3) === '报警器'){
1519
+ var bjname = item.f_material_name.split("-")
1520
+ bjqststedata.sid = item.f_bjq_sid
1521
+ bjqststedata.f_process_id = item.f_process_id
1522
+ bjqststedata.bjqtype = bjname[1]
1523
+ //====================================
1524
+ bjqlag = true
1525
+ datatemp.bjqid = item.id
1526
+ datatemp.fprocessid = item.f_process_id
1527
+ datatemp.f_bjq_sid = item.f_bjq_sid
1528
+ datatemp.f_material_code = item.f_material_code
1529
+ datatemp.f_bjq_lng = item.f_bjq_lng
1530
+ datatemp.f_bjq_lat = item.f_bjq_lat
1531
+ datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
1532
+ datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
1533
+ datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
1534
+ datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
1535
+ numOne.push(item.f_bjq_sid)
1536
+ }
1537
+ })
1538
+
1539
+ // this.show_data.onetomany.forEach(item=>{
1540
+ // console.log("查看报警器材料",item)
1541
+ // item.rows.forEach(i=>{
1542
+ // if (i.f_material_name.substr(0,3) === '报警器'){
1543
+ // var bjname = i.f_material_name.split("-")
1544
+ // bjqststedata.sid = i.f_bjq_sid
1545
+ // bjqststedata.f_process_id = i.f_process_id
1546
+ // bjqststedata.bjqtype = bjname[1]
1547
+ // //====================================
1548
+ // bjqlag = true
1549
+ // datatemp.bjqid = i.id
1550
+ // datatemp.fprocessid = i.f_process_id
1551
+ // datatemp.f_bjq_sid = i.f_bjq_sid
1552
+ // datatemp.f_material_code = i.f_material_code
1553
+ // numOne.push(i.f_bjq_sid)
1554
+ // }
1555
+ // })
1556
+ // })
1557
+ if (!bjqlag){
1558
+ this.$showMessage('请添加报警器物料信息!!!')
1559
+ return
1560
+ }
1561
+ if (numOne.length > 1){
1562
+ this.$showMessage("暂时支持单个报警器物料安装!!!")
1563
+ return
1564
+ }
1565
+ datatemp.sqvalue = this.show_data.areaData.sqvalue
1566
+ datatemp.f_bjq_baidu_lng = this.show_data.templatlng.baidutemplng
1567
+ datatemp.f_bjq_baidu_lat = this.show_data.templatlng.baidutemplat
1568
+ datatemp.f_bjq_gaode_lng = this.show_data.templatlng.gaodetemplng
1569
+ datatemp.f_bjq_gaode_lat = this.show_data.templatlng.gaodetemplat
1570
+ datatemp.f_bjq_lng = this.show_data.templatlng.baidutemplng
1571
+ datatemp.f_bjq_lat = this.show_data.templatlng.baidutemplat
1572
+
1573
+ bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
1574
+
1575
+ //判断是否推送 及推送的状态
1576
+ //查询是否存在, 以型号及厂家判断
1577
+ let bjqres = await this.$resetpost(
1578
+ `rs/logic/getbjqsyncinfo`,
1579
+ bjqststedata
1580
+ )
1581
+ if (bjqres.data.bjqstate != "成功"){
1582
+ //区域地址存入材料记录表
1583
+ let areares = await this.$resetpost(
1584
+ `rs/logic/saveArea`,
1585
+ {data: datatemp},
1586
+ {resolveMsg: null, rejectMsg: '区域地址保存失败'}
1587
+ )
1588
+
1589
+ //完工之后推送数据到汉威
1590
+ let adddata = {
1591
+ f_bjq_sid : datatemp.f_bjq_sid,
1592
+ f_material_code : datatemp.f_material_code,
1593
+ f_bjq_address: this.show_data.areaData.sqvalue,
1594
+ f_user_name: this.show_data.f_user_name,
1595
+ f_address: this.show_data.f_address,
1596
+ f_user_phone: this.show_data.f_phone,
1597
+ f_userinfo_code: this.show_data.f_userinfo_code,
1598
+ installtime: this.show_data.f_construction_date,
1599
+ f_orgid : this.show_data.f_orgid,
1600
+ f_bjq_lng: datatemp.f_bjq_baidu_lng,
1601
+ f_bjq_lat: datatemp.f_bjq_baidu_lat
1602
+ }
1603
+ let res = await this.$resetpost(
1604
+ `ncc/rs/logic/bjqadduser`,
1605
+ // `rs/logic/bjqadduser`,
1606
+ adddata
1607
+ )
1608
+ if (res.data.code != 200){
1609
+ if (bjqres.data.bjqstate.length == 0){
1610
+ bjqststedata.bjqstate = "失败"
1611
+ let bjqres3 = await this.$resetpost(
1612
+ `rs/logic/addbjqsyncinfo`,
1613
+ bjqststedata
1614
+ )
1615
+ }
1616
+ this.$showMessage(res.data.msg)
1617
+ return
1618
+ }
1619
+ //更改记录表状态
1620
+ if (bjqres.data.bjqstate === "失败"){
1621
+ bjqststedata.bjqstate = "成功"
1622
+ let bjqres1 = await this.$resetpost(
1623
+ `rs/logic/updatebjqsyncinfo`,
1624
+ bjqststedata
1625
+ )
1626
+ }else{
1627
+ bjqststedata.bjqstate = "成功"
1628
+ let bjqres2 = await this.$resetpost(
1629
+ `rs/logic/addbjqsyncinfo`,
1630
+ bjqststedata
1631
+ )
1632
+ }
1633
+ }
1634
+ }
1635
+ if ((this.show_data.f_apply_type === '工商户报建' || this.show_data.f_apply_type === '团购报建')
1636
+ && (this.show_data.defname === '报装申请') && this.show_data.button.button_name === '提交'){
1637
+ await this.contract_number()
1638
+ }
1639
+ if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '保存'||this.show_data.button.button_name === '提交')){
1640
+ let dataz = {
1641
+ condition: `u.id = ${this.show_data.id}`,
1642
+ data: {
1643
+ id: this.$login.f.id,
1644
+ orgid: this.$login.f.orgid
1645
+ }
1646
+ }
1647
+ let http = new HttpResetClass()
1648
+ let restpz = await http.load(
1649
+ 'POST',
1650
+ `rs/sql/checkuser`,
1651
+ {data: dataz},
1652
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1653
+ )
1654
+ this.show_data.actid=restpz.data[0].actid
1655
+ }
1656
+ if(this.selectdata.f_sumtwo_money==''||this.selectdata.f_sumtwo_money==null){
1657
+ this.selectdata.f_sumtwo_money=0
1658
+ }
1659
+ this.show_data.f_sumtwo_money=this.selectdata.f_sumtwo_money
1660
+ let res = await this.$resetpost(
1661
+ `rs/logic/ApplyProductService`,
1662
+ {data: this.show_data},
1663
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
1664
+ )
1665
+
1666
+
1667
+ if (this.show_data.button.after) {
1668
+ this[this.show_data.button.after]()
1669
+ }
1670
+ // 改管报建 增容报建 优化
1671
+ if((this.show_data.f_apply_type === '改管报建'||this.show_data.f_apply_type === '增容报建') && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '缴费'){
1672
+ let datagg = {
1673
+ condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1674
+ }
1675
+ let http = new HttpResetClass()
1676
+ let restgg = await http.load(
1677
+ 'POST',
1678
+ `rs/sql/checkusertwo`,
1679
+ {data: datagg},
1680
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1681
+ )
1682
+ debugger
1683
+ if(this.show_data.f_apply_type === '改管报建'){
1684
+ restgg.data[0].processname = '改管报建流程'
1685
+ restgg.data[0].defname = '报装缴费'
1686
+ }else{
1687
+ restgg.data[0].processname = '增容报建流程'
1688
+ restgg.data[0].defname = '报装缴费'
1689
+ }
1690
+ restgg.data[0].actid = restgg.data[0].actid + 1
1691
+ this.$dispatch('apply',restgg.data[0])
1692
+
1693
+ }
1694
+
1695
+ // 退款报建 优化
1696
+ if(this.show_data.f_apply_type === '退款报建' && this.show_data.defname === '终止报建' && this.show_data.button.button_name === '提交'){
1697
+ let datatk = {
1698
+ condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1699
+ }
1700
+ let http = new HttpResetClass()
1701
+ let resttk = await http.load(
1702
+ 'POST',
1703
+ `rs/sql/checkusertwo`,
1704
+ {data: datatk},
1705
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1706
+ )
1707
+ debugger
1708
+ resttk.data[0].processname = '退款报建流程'
1709
+ resttk.data[0].defname = '退款'
1710
+ this.$dispatch('apply',resttk.data[0])
1711
+
1712
+ }
1713
+
1714
+
1715
+ if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
1716
+ let data = {
1717
+ tablename: 't_apply',
1718
+ condition: `f_process_id='${this.show_data.f_process_id}'`
1719
+ }
1720
+ let http = new HttpResetClass()
1721
+ let restp = await http.load(
1722
+ 'POST',
1723
+ `rs/sql/apply_singleTable`,
1724
+ {data: data},
1725
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1726
+ )
1727
+ debugger
1728
+ restp.data[0].processname = '散户报建流程'
1729
+ restp.data[0].defname = '合同签订'
1730
+ this.$dispatch('apply',restp.data[0])
1731
+
1732
+ } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
1733
+ let data2 = {
1734
+ condition: `u.id = ${this.show_data.id}`,
1735
+ data: {
1736
+ id: this.$login.f.id,
1737
+ orgid: this.$login.f.orgid
1738
+ }
1739
+ }
1740
+ let http = new HttpResetClass()
1741
+ let restp1 = await http.load(
1742
+ 'POST',
1743
+ `rs/sql/checkuser`,
1744
+ {data: data2},
1745
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1746
+ )
1747
+ debugger
1748
+ console.log('有没有发请求打印查询的内容restp1',restp1)
1749
+ // restp1.data[0].processname = '散户报建流程'
1750
+ // restp1.data[0].defname = '报装缴费'
1751
+ this.$dispatch('apply',restp1.data[0])
1752
+ }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
1753
+ let data3 = {
1754
+ condition: `u.id = ${this.show_data.id}`,
1755
+ data: {
1756
+ id: this.$login.f.id,
1757
+ orgid: this.$login.f.orgid
1758
+ }
1759
+ }
1760
+ let http = new HttpResetClass()
1761
+ let restp2 = await http.load(
1762
+ 'POST',
1763
+ `rs/sql/checkuser`,
1764
+ {data: data3},
1765
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1766
+ )
1767
+ debugger
1768
+ console.log('打印查询的内容',restp2)
1769
+ if(restp2.length>0){
1770
+ this.$dispatch('apply',restp2.data[0])
1771
+ }else{
1772
+ debugger
1773
+ this.$dispatch('loadPage')
1774
+ }
1775
+ }
1776
+ else{
1777
+ this.$dispatch('loadPage')
1778
+ }
1779
+
1780
+ },
1781
+ // 失去焦点出触发事件
1782
+ 'onchange' (index) {
1783
+ if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
1784
+ if (
1785
+ this.show_data.fields[index].label === '区/县' ||
1786
+ this.show_data.fields[index].label === '街道/乡镇' ||
1787
+ this.show_data.fields[index].label === '集收单位' ||
1788
+ this.show_data.fields[index].label === '楼号/组' ||
1789
+ this.show_data.fields[index].label === '单元/排' ||
1790
+ this.show_data.fields[index].label === '楼层' ||
1791
+ this.show_data.fields[index].label === '门牌号'
1792
+ ) {
1793
+
1794
+ let f_pcd = this.getLableValue('区/县') || ''
1795
+ let f_street = this.getLableValue('街道/乡镇') || ''
1796
+ let f_residential_area = this.getLableValue('集收单位') || ''
1797
+ let f_building = this.getLableValue('楼号/组') || ''
1798
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1799
+ let f_unit = this.getLableValue('单元/排') || ''
1800
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1801
+ let f_floor = this.getLableValue('楼层') || ''
1802
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1803
+ let f_room = this.getLableValue('门牌号') || ''
1804
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1805
+
1806
+ 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
1807
+ this.setLabelValue("地址", f_address)
1808
+ }
1809
+ }
1810
+ },
1811
+ selectSearch (val, index) {},
1812
+ 'onblur' (index) {},
1813
+ 'oninput' (index) {},
1814
+ 'initializtionView' () {},
1815
+ async 'onchangeModal' (index, fieldIndex) {
1816
+ },
1817
+ async 'onblurModal' (index, fieldIndex) {
1818
+
1819
+ },
1820
+ async 'oninputModal' (index, fieldIndex) {
1821
+
1822
+ },
1823
+ async 'onetomanydelete' (index, rowIndex) {
1824
+
1825
+ let http = new HttpResetClass()
1826
+
1827
+ let res = await http.load(
1828
+ 'DELETE',
1829
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1830
+ null,
1831
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
1832
+ )
1833
+
1834
+ res = await this.$resetpost(
1835
+ 'rs/entity/t_apply',
1836
+ this.show_data
1837
+ )
1838
+
1839
+ this.$dispatch('breakControl', this.show_data)
1840
+ },
1841
+ async 'onetomanyupdate' (index, rowIndex) {
1842
+ let data = this.show_data.onetomany[index].rows[rowIndex]
1843
+
1844
+ this.show_data.onetomany[index].fields.forEach(item => {
1845
+ data[item.field] = item.value
1846
+ })
1847
+ let res = await this.$resetpost(
1848
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1849
+ data
1850
+ )
1851
+
1852
+ res = await this.$resetpost(
1853
+ 'rs/entity/t_apply',
1854
+ this.show_data
1855
+ )
1856
+
1857
+ this.$dispatch('breakControl', this.show_data)
1858
+ },
1859
+ async 'onetomanyadd' (index) {
1860
+ let data = {
1861
+ f_process_id : this.show_data.f_process_id,
1862
+ f_operator_id: this.$login.f.id,
1863
+ f_operator: this.$login.f.name,
1864
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1865
+ f_orgid: this.$login.f.orgid,
1866
+ f_orgname: this.$login.f.orgs
1867
+ }
1868
+ this.show_data.onetomany[index].fields.forEach(item => {
1869
+ data[item.field] = item.value
1870
+ })
1871
+ let res = await this.$resetpost(
1872
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1873
+ data
1874
+ )
1875
+
1876
+ res = await this.$resetpost(
1877
+ 'rs/entity/t_apply',
1878
+ this.show_data
1879
+ )
1880
+
1881
+ this.$dispatch('breakControl', this.show_data)
1882
+ },
1883
+ async 'importEvent' (index, table, configName, filepath) {
1884
+ let data = {
1885
+ selectdata: this.show_data,
1886
+ table: table,
1887
+ filepath: filepath,
1888
+ configName: configName,
1889
+ user: this.$login.f
1890
+ }
1891
+
1892
+ let res = await this.$resetpost(
1893
+ `rs/logic/importEvent`,
1894
+ data
1895
+ )
1896
+
1897
+ this.$dispatch('breakControl', this.show_data)
1898
+ },
1899
+ 'onbutchange' (index) {
1900
+
1901
+ },
1902
+ 'onbutblur' (index) {
1903
+
1904
+ },
1905
+ 'onbutinput' (index) {
1906
+
1907
+
1908
+ }
1909
+ },
1910
+ watch: {
1911
+ }
1912
+ }
1913
+ </script>
1914
+ <style scoped>
1915
+ /*清除model中的浮动*/
1916
+ .clearfix:after,.clearfix:before{
1917
+ display: table;
1918
+ }
1919
+ .clearfix:after{
1920
+ clear: both;
1921
+ }
1922
+ </style>