apply-clients 7.1.36-yuchuan-83 → 7.1.36-yuchuan-84

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 (36) hide show
  1. package/build/dev-server.js +3 -6
  2. package/package.json +1 -1
  3. package/src/components/android/AppServiceView.vue +603 -603
  4. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  5. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1032 -1032
  6. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  7. package/src/components/android/SealBind.vue +426 -426
  8. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1115 -1115
  9. package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianChargeList.vue +211 -211
  10. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  11. package/src/components/product/Function/Service/FunctionServiceControl.vue +581 -581
  12. package/src/components/product/GongJianPush/ApplyPushDispose.vue +299 -299
  13. package/src/components/product/GongJianPush/ApplyPushManage.vue +92 -92
  14. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  15. package/src/components/product/List/OldShowDevices.vue +272 -272
  16. package/src/components/product/List/ShowAllActivity.vue +540 -540
  17. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  18. package/src/components/product/Print/BuildOrder/printGaiXianOrder.vue +271 -271
  19. package/src/components/product/Print/OrderPrint/GaiXianOrder.vue +314 -314
  20. package/src/components/product/Print/OrderPrint/printChaiChuOrder.vue +266 -266
  21. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  22. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  23. package/src/components/product/Process/Processes/InstallationDetails.vue +1166 -1166
  24. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  25. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  26. package/src/components/product/Process/Processes/chargeManagement.vue +766 -766
  27. package/src/components/product/Process/Processes/newInstallationDetails.vue +683 -683
  28. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  29. package/src/components/product/Process/Service/ServiceControl.vue +2232 -2232
  30. package/src/components/product/ServiceView.vue +650 -650
  31. package/src/components/product/Supervisory/ExportExcel.vue +359 -359
  32. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
  33. package/src/components/product/Supervisory/SupervisoryList.vue +585 -585
  34. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +543 -543
  35. package/src/components/product/VueUtils/ApplyUpload.vue +302 -302
  36. package/src/components/product/VueUtils/HighMeter.vue +208 -208
@@ -1,2232 +1,2232 @@
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 {HttpResetClass} from 'vue-client'
9
- import {isEmpty} from '../../../Util'
10
- import Vue from "vue";
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
- area: {}, // 小区详细
39
- config: {}
40
- }
41
- },
42
- ready () {
43
- this.refurbish()
44
- },
45
- methods: {
46
- // 组件初始化操作
47
- async refurbish() {
48
- this.json_datas = Vue.prototype.$workflow_vue
49
- let sum = 0
50
- let jsonData = {}
51
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
52
- this.$showMessage("网络故障,请刷新页面")
53
- return
54
- }
55
- this.json_datas.activitys.forEach(item => {
56
- if (this.selectdata.defname === item.title) {
57
- jsonData = item // 拿到当前节点的json配置信息
58
- sum++ // 节点名一样的个数
59
- }
60
- })
61
-
62
- if (sum === 0) {
63
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
64
- return
65
- }
66
- if (sum > 1) {
67
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
68
- return
69
- }
70
- this.selectdata = Object.assign({}, this.selectdata, jsonData)
71
-
72
- // fields 字段填充值
73
- for (const item of this.selectdata.fields) {
74
- if (!item.value) {
75
- item.value = null
76
- }
77
-
78
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
79
- if (item.eval) {
80
- item.value = eval(item.default)
81
- } else {
82
- item.value = item.default
83
- }
84
- }
85
-
86
- if (this.selectdata[item.field]) {
87
- // 将json字符串格式化赋值给value
88
- if (String(this.selectdata[item.field]).startsWith("{")) {
89
- item.value = JSON.parse(this.selectdata[item.field])
90
- } else {
91
- item.value = this.selectdata[item.field]
92
- }
93
- }
94
- if (this.selectdata[item.field] === 0) {
95
- item.value = 0
96
- }
97
-
98
- // datepicker
99
- if (item.type === 'datepicker' && !item.value && item.default) {
100
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
101
- }
102
-
103
- // 如果配置类型为select,优先从参数列表获取options
104
- if (item.type === 'select' || item.type === 'checkbox') {
105
- if (item.param) {
106
- let temp = this.$appdata.getParam(item.label)
107
-
108
- if (temp && temp.length > 0) {
109
- item.options = temp
110
- }
111
-
112
- if (item.paramLabel) {
113
- temp = this.$appdata.getParam(item.paramLabel)
114
- if (temp && temp.length > 0) {
115
- item.options = temp
116
- }
117
- }
118
- }
119
- }
120
- if (item.ready) {
121
- item.options = await this[item.ready]()
122
- }
123
- if (item.type === 'checkbox') {
124
- if (this.selectdata[item.field]) {
125
- item.value = JSON.parse(this.selectdata[item.field])
126
- } else {
127
- item.value = []
128
- }
129
- }
130
- if(this.selectdata.state === '结束'){
131
- item.readonly = true
132
- item.disabled = true
133
- console.log('当前defname'+this.selectdata.defname+'当前title'+this.selectdata.title)
134
- }
135
- this.selectdata[item.field] = item.value
136
- }
137
-
138
- // 控制组件
139
- if (this.selectdata.components) {
140
- this.selectdata.components.forEach(item => {
141
- if (!item.mark) {
142
- item.mark = 0
143
- }
144
- if(this.selectdata.state === '结束'){
145
- item.mark = 1
146
- }
147
- })
148
- }
149
-
150
- // 初始化onetomany
151
- if (this.selectdata.onetomany) {
152
- for (const item of this.selectdata.onetomany) {
153
- let res = null
154
- if (item.queryEvent) {
155
- res = this[item.queryEvent]()
156
- } else {
157
- let data = {
158
- tablename: item.tables[0],
159
- condition: `f_process_id='${this.selectdata.f_process_id}'`
160
- }
161
- let http = new HttpResetClass()
162
- res = await http.load(
163
- 'POST',
164
- 'rs/sql/applySingleTable',
165
- {data: data},
166
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
167
- )
168
- }
169
- item.rows = res.data
170
- // 初始化onetomany中的fields
171
- for (const field of item.fields) {
172
- if (!field.value) {
173
- if (field.value !== 0) {
174
- field.value = null
175
- }
176
- }
177
-
178
- if (field.default || field.default === 0) {
179
- field.value = field.default
180
- }
181
-
182
- // datepicker
183
- if (field.type === 'datepicker' && !field.value && field.default) {
184
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
185
- }
186
-
187
- if (field.type === 'select') {
188
-
189
- let temp = this.$appdata.getParam(field.label)
190
-
191
- if (temp && temp.length > 0) {
192
- field.options = temp
193
- }
194
-
195
- if (field.paramLabel) {
196
- temp = this.$appdata.getParam(field.paramLabel)
197
- if (temp && temp.length > 0) {
198
- item.options = temp
199
- }
200
- }
201
- }
202
- }
203
- }
204
- }
205
-
206
- // 初始化 buttons_fields
207
- for (const item of this.selectdata.buttons) {
208
- if (item.button_name === '下发' || item.button_name === '转派') {
209
-
210
- let data = {
211
- source: item.source,
212
- userid: this.$login.f.id
213
- }
214
- if (item.sourceMethod) {
215
- data.source = this[item.sourceMethod]()
216
- }
217
- if (!data.source) {
218
- this.$showMessage("请配置获取人员表达式")
219
- return
220
- }
221
- let http = new HttpResetClass()
222
- let res = await http.load(
223
- 'POST',
224
- 'rs/search',
225
- {data: data},
226
- {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
227
- )
228
- let options = res.data.map(source => {
229
- return {
230
- "label": source.name,
231
- "value": source.id
232
- }
233
- })
234
- if (item.button_fields.length !== 1) {
235
- this.$showMessage("下发有且只能有一个字段!!!")
236
- return
237
- }
238
- item.button_fields[0].options = options
239
- }
240
- if (item.button_fields) {
241
- item.button_fields.forEach(x => {
242
- // 如果配置类型为select,优先从参数列表获取options
243
- if (x.type === 'select') {
244
-
245
- if (x.param) {
246
- let temp = this.$appdata.getParam(x.label)
247
-
248
- if (temp && temp.length > 0) {
249
- x.options = temp
250
- }
251
-
252
- if (x.paramLabel) {
253
- temp = this.$appdata.getParam(x.paramLabel)
254
- if (temp && temp.length > 0) {
255
- x.options = temp
256
- }
257
- }
258
- }
259
-
260
- }
261
- })
262
- }
263
- if(this.selectdata.state === '结束'){
264
- item.hidden = true
265
- }
266
- }
267
-
268
- if (this.selectdata.f_apply_nature === '散户' && this.selectdata.defname === '现场勘察') {
269
- for (const item of this.selectdata.fields) {
270
- if (item.label.includes('安装户数')) {
271
- item.readonly = true
272
- }
273
- }
274
- }
275
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
276
- let temp = JSON.parse(JSON.stringify(this.selectdata))
277
- this.show_data = temp
278
- if ((this.selectdata.f_apply_type =='非民用报建' || this.selectdata.f_apply_type =='民用报建' || this.selectdata.f_apply_type =='设备变更')&&this.selectdata.defname === '报装缴费'){
279
- let num = Number(this.$appdata.getSingleValue('税率'))
280
- let f_due_money =Number(this.selectdata.f_due_money)
281
- let tem = ( f_due_money - (f_due_money/(1+num)).toFixed(2)).toFixed(2)
282
- this.show_data.f_budget_money = tem
283
- this.setLabelValue('税额',tem)
284
- }
285
- if ((this.selectdata.f_apply_type =='非民用报建' || this.selectdata.f_apply_type =='民用报建' || this.selectdata.f_apply_type =='设备变更')&&this.selectdata.defname === '收费标准'){
286
- let str = '项目名称:天然气安装工程;项目地址:'+ this.show_data.f_address
287
- this.show_data.f_paper_remarks = str
288
- this.setLabelValue('发票备注',str)
289
- }
290
- if (this.show_data.f_apply_type === '改线业务' && this.show_data.defname === '报建受理'){
291
- let str = '项目名称:天然气整改工程;项目地址:'+ this.show_data.f_address
292
- this.show_data.f_paper_remarks = str
293
- this.setLabelValue('发票备注',str)
294
- }
295
- this.$nextTick(() => {
296
- this.showview = true
297
- })
298
-
299
- },
300
- // 金额转大写
301
- smalltoBIG(n) {
302
- let fraction = ['角', '分'];
303
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
304
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
305
- let head = n < 0 ? '欠' : '';
306
- n = Math.abs(n);
307
-
308
- let s = '';
309
-
310
- for (var i = 0; i < fraction.length; i++) {
311
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
312
- }
313
- s = s || '整';
314
- n = Math.floor(n);
315
-
316
- for (var i = 0; i < unit[0].length && n > 0; i++) {
317
- let p = '';
318
- for (var j = 0; j < unit[1].length && n > 0; j++) {
319
- p = digit[n % 10] + unit[1][j] + p;
320
- n = Math.floor(n / 10);
321
- }
322
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
323
- }
324
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
325
- },
326
- getLableValue(label) {
327
- for (const item of this.show_data.fields) {
328
- if (item.label === label && item.type !== 'number') {
329
- return item.value || ''
330
- }
331
- if (item.label === label && item.type === 'number') {
332
- return item.value || 0
333
- }
334
- }
335
- },
336
- getLableOptions(label) {
337
- for (const item of this.show_data.fields) {
338
- if (item.label === label) {
339
- return item.options
340
- }
341
- }
342
- },
343
- setLabelValue(label, value) {
344
- for (const item of this.show_data.fields) {
345
- if (item.label === label) {
346
- item.value = value
347
- this.show_data[item.field] = value
348
- }
349
- }
350
- },
351
- setLabelOptions(label, options) {
352
- for (const item of this.show_data.fields) {
353
- if (item.label === label) {
354
- item.options = options
355
- }
356
- }
357
- },
358
- showLabels(...labels) {
359
- for (const item of this.show_data.fields) {
360
- if (labels.includes(item.label)) {
361
- item.hidden = false
362
- }
363
- }
364
- },
365
- hideLabels(...labels) {
366
- for (const item of this.show_data.fields) {
367
- if (labels.includes(item.label)) {
368
- item.hidden = true
369
- }
370
- }
371
- },
372
- showButtons(...buttons) {
373
- for (const item of this.show_data.buttons) {
374
- if (buttons.includes(item.button_name)) {
375
- item.hidden = false
376
- }
377
- }
378
- },
379
- hideButtons(...buttons) {
380
- for (const item of this.show_data.buttons) {
381
- if (buttons.includes(item.button_name)) {
382
- item.hidden = true
383
- }
384
- }
385
- },
386
- requiredLabels(...labels) {
387
- for (const item of this.show_data.fields) {
388
- if (labels.includes(item.label)) {
389
- item.required = true
390
- }
391
- }
392
- },
393
- electiveLabels(...labels) {
394
- for (const item of this.show_data.fields) {
395
- if (labels.includes(item.label)) {
396
- item.required = false
397
- }
398
- }
399
- },
400
- readonlyLabels(...labels) {
401
- for (const item of this.show_data.fields) {
402
- if (labels.includes(item.label)) {
403
- item.readonly = true
404
- item.disabled = true
405
- }
406
- }
407
- },
408
- readwriteLabels(...labels) {
409
- for (const item of this.show_data.fields) {
410
- if (labels.includes(item.label)) {
411
- item.readonly = false
412
- item.disabled = false
413
- }
414
- }
415
- },
416
- disabledButtons(...buttons) {
417
- for (const item of this.show_data.buttons) {
418
- if (buttons.includes(item.button_name)) {
419
- item.disabled = true
420
- }
421
- }
422
- },
423
- enableButtons(...buttons) {
424
- for (const item of this.show_data.buttons) {
425
- if (buttons.includes(item.button_name)) {
426
- item.disabled = false
427
- }
428
- }
429
- },
430
- showComponents(...titles) {
431
- for (const item of this.show_data.components) {
432
- if (titles.includes(item.title) && item.device === 'pc') {
433
- item.hidden = false
434
- }
435
- }
436
- },
437
- hideComponents(...titles) {
438
- for (const item of this.show_data.components) {
439
- if (titles.includes(item.title) && item.device === 'pc') {
440
- item.hidden = true
441
- }
442
- }
443
- },
444
- async checkDuplicate(index) {
445
- let http = new HttpResetClass()
446
- let data = {
447
- tablename: 't_apply',
448
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
449
- }
450
- let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
451
- resolveMsg: null,
452
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
453
- })
454
- if (res.data.length > 0) {
455
- this.show_data.fields[index].value = null
456
- this.$showMessage(`${this.show_data.fields[index].label}已存在!!!`)
457
- }
458
- },
459
- // 获取片区
460
- async getSliceArea () {
461
- let data = {
462
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
463
- userid: this.$login.f.id
464
- }
465
-
466
- let http = new HttpResetClass()
467
- let res = await http.load(
468
- 'POST',
469
- `rs/search`,
470
- {data: data},
471
- {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
472
- )
473
-
474
- return res.data.map(item => {
475
- return {
476
- label: item.name,
477
- value: item.name
478
- }
479
- })
480
- },
481
- // 获取区县
482
- async getPcd () {
483
- let data = {
484
- tablename: 't_pcd',
485
- condition: `f_filialeid = '${this.$login.f.orgid}'`
486
- }
487
- let http = new HttpResetClass()
488
- let res = await http.load(
489
- 'POST',
490
- `rs/sql/applySingleTable`,
491
- {data: data},
492
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
493
- )
494
-
495
- return res.data.map(item => {
496
- return {
497
- label: item.f_pcd,
498
- value: item.f_pcd
499
- }
500
- })
501
- },
502
- // 缴费前置
503
- chargeBefore () {
504
- if ((this.show_data.f_apply_type === '民用报建' && this.show_data.f_apply_nature === '小区') || this.show_data.f_apply_type === '非民用报建') {
505
- return
506
- }
507
- if (this.show_data.f_house_type === '旧报建导入'){
508
- return
509
- }
510
- if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
511
- this.$showMessage('费用未结清!!!')
512
- throw null
513
- }
514
- },
515
- // 缴费流程退回前置
516
- async backBefore() {
517
- let data = {
518
- tablename: 't_apply',
519
- condition: `f_process_id = '${this.selectdata.f_process_id}'`
520
- }
521
- let http = new HttpResetClass()
522
- let res = await http.load(
523
- 'POST',
524
- `rs/sql/applySingleTable`,
525
- {data: data},
526
- {resolveMsg: null, rejectMsg: null}
527
- )
528
- if (res.data.length > 0 && res.data[0].f_surplus_money !== res.data[0].f_due_money) {
529
- this.$showMessage('用户已缴费,无法退回!!!')
530
- }
531
- },
532
- // 获取设计人员
533
- async getDesignerPeople () {
534
- let data = {
535
- source: 'this.getParentByType($organization$).getChildByName($设计人员$).getChildren()',
536
- userid: this.$login.f.id
537
- }
538
-
539
- let http = new HttpResetClass()
540
- let res = await http.load(
541
- 'POST',
542
- 'rs/search',
543
- {data: data},
544
- {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
545
- )
546
- return res.data.map(item => {
547
- return {
548
- label: item.name,
549
- value: item.name
550
- }
551
- })
552
- },
553
- //现场勘察
554
- async prospectingBefore() {
555
- let data = {
556
- tablename: 't_files',
557
- condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '现场勘察' and fremarks = '报装手机签字文件'`
558
- }
559
- let http = new HttpResetClass()
560
- let res = await http.load(
561
- 'POST',
562
- `rs/sql/applySingleTable`,
563
- {data: data},
564
- {resolveMsg: null, rejectMsg: null}
565
- )
566
- if (res.data.length <= 0) {
567
- this.$showMessage('现场勘察未签字,无法提交!!!')
568
- throw '现场勘察未签字,无法提交!'
569
- }
570
- },
571
- //报建受理下发,对基本信息进行校验
572
- checkSpaces(){
573
- let name=this.getLableValue('用户名称')
574
- //如果用户名称中包含空格,提示用户名称中不能包含空格
575
- if(name.indexOf(' ')>=0){
576
- this.$showMessage('用户名称中不能包含空格!!!')
577
- throw '用户名称中不能包含空格!!!'
578
- }
579
- let Contact= this.getLableValue('联系人')
580
- if(Contact.indexOf(' ')>=0){
581
- this.$showMessage('联系人中不能包含空格!!!')
582
- throw '联系人中不能包含空格!!!'
583
- }
584
- let phone= this.getLableValue('用户电话')
585
- if(phone.indexOf(' ')>=0){
586
- this.$showMessage('用户电话中不能包含空格!!!')
587
- throw '用户电话中不能包含空格!!!'
588
- }
589
- let ifnumber= this.getLableValue('证件号码')
590
- if(ifnumber.indexOf(' ')>=0){
591
- this.$showMessage('证件号码中不能包含空格!!!')
592
- throw '证件号码中不能包含空格!!!'
593
- }
594
- },
595
- //合同签订提交
596
- async contractSigningBefore() {
597
- let http = new HttpResetClass()
598
- let data = {
599
- tablename: 't_contract',
600
- condition: `f_process_id = '${this.selectdata.f_process_id}' and f_sign_state <> '签订完成'`
601
- }
602
- let res = await http.load(
603
- 'POST',
604
- `rs/sql/applySingleTable`,
605
- {data: data},
606
- {resolveMsg: null, rejectMsg: null}
607
- )
608
- if(res.data.length<=0){
609
- let data = {
610
- tablename: 't_files',
611
- condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fusetype = '纸质合同'`
612
- }
613
- let res = await http.load(
614
- 'POST',
615
- `rs/sql/applySingleTable`,
616
- {data: data},
617
- {resolveMsg: null, rejectMsg: null}
618
- )
619
- if (res.data.length <= 0) {
620
- this.$showMessage('纸质合同未上传,无法提交!')
621
- throw '纸质合同未上传,无法提交!'
622
- }
623
- }
624
- if (res.data.length > 0) {
625
- let data = {
626
- tablename: 't_files',
627
- condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fusetype = '纸质合同'`
628
- }
629
- let res = await http.load(
630
- 'POST',
631
- `rs/sql/applySingleTable`,
632
- {data: data},
633
- {resolveMsg: null, rejectMsg: null}
634
- )
635
- if (res.data.length <= 0) {
636
- this.$showMessage('合同未签订完成且纸质合同未上传,无法提交!!!')
637
- throw '合同未签订完成且纸质合同未上传,无法提交!!!'
638
- }
639
- }
640
- },
641
- async otherAuthentication() {
642
- console.log("当前数据", this.selectdata)
643
- this.$showMessage(`请确认是否进行重新认证,确认前请保证身份信息正确!!!`, ['confirm']).then(async (res) => {
644
- if (res === 'confirm') {
645
- let http = new HttpResetClass()
646
- let data = {
647
- apply: this.selectdata
648
- }
649
- let result = await http.load(
650
- 'POST',
651
- 'rs/logic/anotherLegalize',
652
- {data: data},
653
- {
654
- resolveMsg: '重新发起实名认证成功!',
655
- rejectMsg: '重新发起实名认证失败!'
656
- }).then((res)=>{
657
- if(res.data === 200){
658
- this.$dispatch('loadPage')
659
- }
660
- })
661
- }
662
- })
663
- throw '重新发起实名认证!!!'
664
- },
665
- async otherSigned() {
666
- console.log("当前数据", this.selectdata)
667
- this.$showMessage(`请确认是否进行重新发送签署短信!!!`, ['confirm']).then(async (res) => {
668
- if (res === 'confirm') {
669
- let http = new HttpResetClass()
670
- let data = {
671
- apply: this.selectdata
672
- }
673
- let result = await http.load(
674
- 'POST',
675
- 'rs/logic/anotherMAS',
676
- {data: data},
677
- {
678
- resolveMsg: '重新发送签署短信成功!',
679
- rejectMsg: '重新发送签署短信失败!'
680
- }).then((res)=>{
681
- if(res.data === 200){
682
- this.$dispatch('loadPage')
683
- }
684
- })
685
- }
686
- })
687
- throw '重新发送签署短信!!!'
688
- },
689
- // 施工前置
690
- async constructionBefore () {
691
- await this.userSignBefore()
692
- if (this.show_data.f_apply_nature !== '分户挂表') {
693
- let http = new HttpResetClass()
694
- let data = {
695
- condition: `ui.f_process_id = '${this.show_data.f_process_id}' and f_meternumber is null and f_gasbrand_id is not null `
696
- }
697
- let res = await http.load(
698
- 'POST',
699
- 'rs/sql/countApplyUserinfo',
700
- {data: data},
701
- {
702
- resolveMsg: null,
703
- rejectMsg: '安装明细查询失败!!!'
704
- })
705
- if (res.data[0].num > 0) {
706
- this.$showMessage(`还有${res.data[0].num}户未安装,无法提交`)
707
- throw `还有${res.data[0].num}户未安装,无法提交`
708
- }
709
- }
710
- },
711
- async userSignBefore() {
712
- let http = new HttpResetClass()
713
- let data = {
714
- tablename: 't_files',
715
- condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fremarks = '报装手机签字文件'`
716
- }
717
- let res = await http.load(
718
- 'POST',
719
- `rs/sql/applySingleTable`,
720
- {data: data},
721
- {resolveMsg: null, rejectMsg: null}
722
- )
723
- if (res.data.length <= 0) {
724
- this.$showMessage('用户未签字,无法提交!!!')
725
- throw '用户未签字,无法提交!'
726
- }
727
- },
728
- addressInitialization () {
729
- this.$getConfig(this, 'UserAddress')
730
-
731
- let f_address_type = this.show_data.f_address_type
732
-
733
- for (const item of this.show_data.fields) {
734
- if (f_address_type === '民用市区') {
735
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
736
- item.hidden = false
737
- item.required = true
738
- }
739
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
740
- item.hidden = false
741
- item.required = false
742
- }
743
- if (item.label === '地址') {
744
- item.readonly = true
745
- }
746
- }
747
- if (f_address_type === '民用乡镇') {
748
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
749
- item.hidden = false
750
- item.required = true
751
- }
752
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
753
- item.hidden = false
754
- item.required = false
755
- }
756
- if (item.label === '楼层') {
757
- item.hidden = true
758
- item.required = false
759
- }
760
- if (item.label === '地址') {
761
- item.readonly = true
762
- }
763
- }
764
- if (f_address_type === '特殊地址') {
765
- if (item.label === '区/县' || item.label === '街道/乡镇') {
766
- item.hidden = false
767
- item.required = true
768
- }
769
- if (item.label === '集收单位') {
770
- item.hidden = false
771
- item.required = false
772
- }
773
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
774
- item.hidden = true
775
- item.required = false
776
- }
777
- if (item.label === '地址') {
778
- item.readonly = false
779
- }
780
- }
781
-
782
- if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
783
- item.hidden = true
784
- }
785
- }
786
- },
787
- async streetChange () {
788
- if (isEmpty(this.show_data.f_street)) {
789
- return
790
- }
791
-
792
- let data = {
793
- tablename: 't_area',
794
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
795
- }
796
- let http = new HttpResetClass()
797
- let res = await http.load(
798
- 'POST',
799
- `rs/sql/applySingleTable`,
800
- {data: data},
801
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
802
- )
803
-
804
- this.setLabelOptions('集收单位', res.data.map(item => {
805
- return {
806
- label: item.f_residential_area,
807
- value: item.f_residential_area
808
- }
809
- }))
810
- },
811
- async pcdChange () {
812
- if (isEmpty(this.show_data.f_pcd)) {
813
- return
814
- }
815
-
816
- let data = {
817
- tablename: 't_street',
818
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
819
- }
820
- let f_address_type = this.getLableValue('地址类型')
821
-
822
- if (f_address_type === '民用市区') {
823
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
824
- }
825
- if (f_address_type === '民用乡镇') {
826
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
827
- }
828
-
829
- let http = new HttpResetClass()
830
- let res = await http.load(
831
- 'POST',
832
- `rs/sql/applySingleTable`,
833
- {data: data},
834
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
835
- )
836
-
837
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
838
- return {
839
- label: item.f_street,
840
- value: item.f_street
841
- }
842
- }))
843
- },
844
- //查询现场负责人
845
- async getConstructionWorker(){
846
- let data = {
847
- source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
848
- userid: this.$login.f.id
849
- }
850
- let http = new HttpResetClass()
851
- let res = await http.load(
852
- 'POST',
853
- `rs/search`,
854
- {data: data},
855
- {resolveMsg: null, rejectMsg: '现场负责人查询失败!!!'}
856
- )
857
- return res.data.map(item => {
858
- return {
859
- label: item.name,
860
- value: item.id
861
- }
862
- })
863
- },
864
- //获取下发人(当前操作人所属部门下的所有人)
865
- getSource () {
866
- return 'this.getParentByType($organization$).getChildByName($'+ this.$login.f.f_department_name + '$).getChildren()'
867
- },
868
- async getUserName() {
869
- if(this.selectdata.f_construction_unit_id){
870
- let data = {
871
- tablename: 't_user',
872
- condition: `id='${this.selectdata.f_construction_unit_id}'`
873
- }
874
- let http = new HttpResetClass()
875
- let res = await http.load(
876
- 'POST',
877
- `rs/sql/applySingleTable`,
878
- {data: data},
879
- {resolveMsg: null, rejectMsg: null}
880
- )
881
- return res.data.map(item => {
882
- return {
883
- label: item.name,
884
- value: item.id
885
- }
886
- })
887
- }
888
- return
889
- },
890
- // 安装单位签字人
891
- async getConstructionUnitId () {
892
- let data = {
893
- source: '',
894
- userid: this.$login.f.id
895
- }
896
- data.source = 'this.getParentByType($organization$).getChildByName($'+ this.$login.f.f_department_name + '$).getChildren()'
897
- let http = new HttpResetClass()
898
- let res = await http.load(
899
- 'POST',
900
- `rs/search`,
901
- {data: data},
902
- {resolveMsg: null, rejectMsg: '安装单位施工班组查询失败!!!'}
903
- )
904
- return res.data.map(item => {
905
- return {
906
- label: item.name,
907
- value: item.id
908
- }
909
- })
910
- },
911
- // 安装单位负责人
912
- async getConstructionUnit () {
913
- let data = {
914
- source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
915
- userid: this.$login.f.id
916
- }
917
- let http = new HttpResetClass()
918
- let res = await http.load(
919
- 'POST',
920
- `rs/search`,
921
- {data: data},
922
- {resolveMsg: null, rejectMsg: '安装单位负责人查询失败!!!'}
923
- )
924
- console.log("显示返回值",res)
925
- let constructionUnit = res.data.map(item => {
926
- return {
927
- label: item.name,
928
- value: item.id
929
- }
930
- })
931
- constructionUnit = constructionUnit.sort((a,b) => a.value - b.value)
932
- console.log("显示返回值1",constructionUnit)
933
- return constructionUnit
934
- },
935
- // 管线施工单位
936
- async getGuanXianBuildUnit () {
937
- let data = {
938
- source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
939
- userid: this.$login.f.id
940
- }
941
- let http = new HttpResetClass()
942
- let res = await http.load(
943
- 'POST',
944
- `rs/search`,
945
- {data: data},
946
- {resolveMsg: null, rejectMsg: '安装单位负责人查询失败!!!'}
947
- )
948
- return res.data.map(item => {
949
- return {
950
- label: item.name,
951
- value: item.name
952
- }
953
- })
954
- },
955
- // 建设单位
956
- async getConstructOperator () {
957
- let data = {
958
- source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
959
- userid: this.$login.f.id
960
- }
961
- let http = new HttpResetClass()
962
- let res = await http.load(
963
- 'POST',
964
- `rs/search`,
965
- {data: data},
966
- {resolveMsg: null, rejectMsg: '建设单位人员查询失败!!!'}
967
- )
968
- return res.data.map(item => {
969
- return {
970
- label: item.name,
971
- value: item.id
972
- }
973
- })
974
- },
975
- // 监理单位
976
- async getSupervisorOperator () {
977
- let data = {
978
- source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
979
- userid: this.$login.f.id
980
- }
981
- let http = new HttpResetClass()
982
- let res = await http.load(
983
- 'POST',
984
- `rs/search`,
985
- {data: data},
986
- {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
987
- )
988
- for (const item of this.selectdata.fields) {
989
- if (item.label === '监理单位') {
990
- item.value = res.data[0].id
991
- this.selectdata[item.field] = res.data[0].id
992
- }
993
- }
994
- return res.data.map(item => {
995
- return {
996
- label: item.name,
997
- value: item.id
998
- }
999
- })
1000
- },
1001
- // 管线监理单位
1002
- async getSupervisorName () {
1003
- let data = {
1004
- source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
1005
- userid: this.$login.f.id
1006
- }
1007
- let http = new HttpResetClass()
1008
- let res = await http.load(
1009
- 'POST',
1010
- `rs/search`,
1011
- {data: data},
1012
- {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
1013
- )
1014
- return res.data.map(item => {
1015
- return {
1016
- label: item.name,
1017
- value: item.name
1018
- }
1019
- })
1020
- },
1021
-
1022
- // 监理现场负责人
1023
- async getSupervisorOperatorId () {
1024
- let data = {
1025
- source: 'this.getParentByType($organization$).getChildByName($监理班组$).getChildren()',
1026
- userid: this.$login.f.id
1027
- }
1028
- let http = new HttpResetClass()
1029
- let res = await http.load(
1030
- 'POST',
1031
- `rs/search`,
1032
- {data: data},
1033
- {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
1034
- )
1035
- return res.data.map(item => {
1036
- return {
1037
- label: item.name,
1038
- value: item.id
1039
- }
1040
- })
1041
- },
1042
- // 土建单位
1043
- async getEngineeringOperator () {
1044
- let data = {
1045
- source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
1046
- userid: this.$login.f.id
1047
- }
1048
- let http = new HttpResetClass()
1049
- let res = await http.load(
1050
- 'POST',
1051
- `rs/search`,
1052
- {data: data},
1053
- {resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
1054
- )
1055
- let result = res.data.map(item => {
1056
- return {
1057
- label: item.name,
1058
- value: item.id
1059
- }
1060
- })
1061
- result.push({label:'用户自理',value:'用户自理'})
1062
- result.push({label:'无',value:'无'})
1063
- return result
1064
- },
1065
- // 管线土建单位
1066
- async getEngineeringName () {
1067
- let data = {
1068
- source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
1069
- userid: this.$login.f.id
1070
- }
1071
- let http = new HttpResetClass()
1072
- let res = await http.load(
1073
- 'POST',
1074
- `rs/search`,
1075
- {data: data},
1076
- {resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
1077
- )
1078
- let result = res.data.map(item => {
1079
- return {
1080
- label: item.name,
1081
- value: item.name
1082
- }
1083
- })
1084
- result.push({label:'用户自理',value:'用户自理'})
1085
- result.push({label:'无',value:'无'})
1086
- return result
1087
- },
1088
- // 检测单位
1089
- async getCheckOperator () {
1090
- let data = {
1091
- source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
1092
- userid: this.$login.f.id
1093
- }
1094
- let http = new HttpResetClass()
1095
- let res = await http.load(
1096
- 'POST',
1097
- `rs/search`,
1098
- {data: data},
1099
- {resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
1100
- )
1101
-
1102
- let result = res.data.map(item => {
1103
- return {
1104
- label: item.name,
1105
- value: item.id
1106
- }
1107
- })
1108
- result.push({label:'无',value:'无'})
1109
- return result
1110
- },
1111
- // 管线检测单位
1112
- async getCheckName () {
1113
- let data = {
1114
- source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
1115
- userid: this.$login.f.id
1116
- }
1117
- let http = new HttpResetClass()
1118
- let res = await http.load(
1119
- 'POST',
1120
- `rs/search`,
1121
- {data: data},
1122
- {resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
1123
- )
1124
-
1125
- let result = res.data.map(item => {
1126
- return {
1127
- label: item.name,
1128
- value: item.name
1129
- }
1130
- })
1131
- result.push({label:'无',value:'无'})
1132
- return result
1133
- },
1134
- // 获取气表品牌
1135
- async getMeterBrand () {
1136
- let data = {
1137
- }
1138
-
1139
- let http = new HttpResetClass()
1140
- let res = await http.load(
1141
- 'POST',
1142
- `rs/sql/getMeterBrand`,
1143
- {data: data},
1144
- {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
1145
- )
1146
-
1147
- return res.data
1148
- },
1149
- async stopApply () {
1150
- console.log('终止报建!!!!!')
1151
- if (this.show_data.defname === '报建受理') {
1152
- this.show_data.f_stop_reason = this.show_data.f_accept_result
1153
- }
1154
- if (this.show_data.defname === '现场勘察') {
1155
- this.show_data.f_stop_reason = this.show_data.f_prospecting_result
1156
- }
1157
-
1158
- let data = {
1159
- apply: this.show_data,
1160
- user: this.$login.f
1161
- }
1162
-
1163
- let res = await this.$resetpost(
1164
- `rs/logic/stopApply`,
1165
- {data: data},
1166
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
1167
- )
1168
-
1169
- this.$dispatch('loadPage')
1170
-
1171
- throw '终止报建!!!'
1172
- },
1173
- // 获取小区
1174
- async getResidentialArea () {
1175
- let data = {
1176
- tablename: 't_area_address',
1177
- condition: `f_filiale like '%${"榆林."+this.$login.f.orgs}%' and f_area_status = '启用'`
1178
- }
1179
- let http = new HttpResetClass()
1180
- let res = await http.load(
1181
- 'POST',
1182
- `rs/sql/applySingleTable`,
1183
- {data: data},
1184
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
1185
- )
1186
- return res.data.map(item => {
1187
- return {
1188
- label: item.f_residential_area,
1189
- value: item.id
1190
- }
1191
- })
1192
- },
1193
- //获取燃气公司内部签署人
1194
- async getContractSignatory () {
1195
- let data = {
1196
- condition: `asj.f_type = '内部' and asj.f_subject_type = '企业' and asj.f_state = '有效' and asj.f_auth_state = '审核通过' and asg.f_state = '有效' and asg.f_sign_state = '签章成功'`
1197
- }
1198
- let http = new HttpResetClass()
1199
- let res = await http.load(
1200
- 'POST',
1201
- `rs/sql/getAuthSubjectList`,
1202
- {data: data},
1203
- {resolveMsg: null, rejectMsg: '签署人查询失败!!!'}
1204
- )
1205
- return res.data.map(item => {
1206
- return {
1207
- label: item.f_subject_name,
1208
- value: `${item.id}`
1209
- }
1210
- })
1211
- },
1212
- async setContractSignatory () {
1213
- let data = {
1214
- condition: `asj.f_type = '内部' and asj.f_subject_type = '企业' and asj.f_state = '有效' and asj.f_auth_state = '审核通过' and asg.f_state = '有效' and asg.f_sign_state = '签章成功'`
1215
- }
1216
- let http = new HttpResetClass()
1217
- let res = await http.load(
1218
- 'POST',
1219
- `rs/sql/getAuthSubjectList`,
1220
- {data: data},
1221
- {resolveMsg: null, rejectMsg: '签署人查询失败!!!'}
1222
- )
1223
- this.setLabelOptions('签署人',res.data.map(item => {
1224
- return {
1225
- label: item.f_subject_name,
1226
- value: `${item.id}`
1227
- }
1228
- }))
1229
- this.setLabelValue('签署人',res.data[0].id)
1230
- },
1231
- // 地址拼接
1232
- addressSplicing () {
1233
- let f_area = this.getLableValue('区/县') ? this.getLableValue('区/县') + '-' : ''
1234
- let f_slice_area = this.getLableValue('片区') ? this.getLableValue('片区') + '-' : ''
1235
- let f_street = this.getLableValue('街道') || ''
1236
- let f_address_detail = this.getLableValue('详细地址') || ''
1237
-
1238
- let f_address = f_area + f_slice_area + f_street + f_address_detail
1239
- this.setLabelValue("地址", f_address)
1240
- },
1241
- // 小区地址拼接
1242
- areaAddressSplicing () {
1243
- let f_area = this.area.f_area || ''
1244
- let f_slice_area = this.area.f_slice_area || ''
1245
- let f_street = this.area.f_street || ''
1246
- let f_residential_area = this.area.f_residential_area || ''
1247
-
1248
- let f_address = f_area + f_slice_area + f_street + f_residential_area
1249
- this.setLabelValue("地址", f_address)
1250
- },
1251
- //分户挂表生成安检单
1252
- async getChecklist() {
1253
- let http = new HttpResetClass()
1254
- let data = {
1255
- f_process_id: this.selectdata.f_process_id,
1256
- f_userinfo_id: this.selectdata.f_userinfo_id,
1257
- user: this.$login.f.user
1258
- }
1259
- let res = await http.load(
1260
- 'POST',
1261
- `rs/logic/getChecklist`,
1262
- {data: data},
1263
- {resolveMsg: null, rejectMsg: null}
1264
- )
1265
- },
1266
- // 生成合同编号(已作废)
1267
- async getContractNumber() {
1268
- const nowDate = new Date()
1269
- let year = nowDate.getFullYear()
1270
- let nature = ''
1271
- if (this.show_data.f_apply_type === '民用报建') {
1272
- nature = 'J'
1273
- } else if (this.show_data.f_apply_type === '非民用报建') {
1274
- nature = 'F'
1275
- }
1276
- let shiGong = 'S'
1277
- let gongQi = 'G'
1278
-
1279
- let lastyYear = year - 1
1280
- let http = new HttpResetClass()
1281
- let data = {
1282
- user: this.$login.f.user,
1283
- startDate: year + '-01-01 00:00:00',
1284
- endDate: year + '-12-31 23:59:59'
1285
- }
1286
- let res = await http.load(
1287
- 'POST',
1288
- `rs/sql/getContractCount`,
1289
- {data: data},
1290
- {resolveMsg: null, rejectMsg: null}
1291
- )
1292
- let count = res.data[0].count + 1
1293
-
1294
-
1295
- let shiGongContractNumber = year + nature + shiGong + '-' + count
1296
- let gongQiContractNumber = year + nature + gongQi + '-' + count
1297
- if (!this.getLableValue('委托合同编号')){
1298
- this.setLabelValue('委托合同编号',shiGongContractNumber)
1299
- this.setLabelValue('供气合同编号',gongQiContractNumber)
1300
- }
1301
- },
1302
- //获取气价列表
1303
- async getPrice (index) {
1304
- if (isEmpty(this.show_data.f_gas_nature) || isEmpty(this.show_data.f_price_type)) {
1305
- return
1306
- }
1307
-
1308
- if (index) {
1309
- this.setLabelValue('气价名称', null)
1310
- }
1311
-
1312
- if (this.show_data.f_price_type === '混合气价') {
1313
- this.showLabels('比率')
1314
- } else {
1315
- this.setLabelValue('比率', null)
1316
- this.hideLabels('比率')
1317
- }
1318
-
1319
- let data = {
1320
- condition: `sp.f_filiale like '%${"榆林."+this.$login.f.orgs}%' and sp.f_price_type = '${this.show_data.f_price_type}' and f_gasproperties = '${this.show_data.f_gas_nature}'`
1321
- }
1322
-
1323
- if (this.show_data.f_apply_type === '民用报建') {
1324
- data.condition += `and f_user_type = '民用'`
1325
- }
1326
- if (this.show_data.f_apply_type === '非民用报建') {
1327
- data.condition += `and f_user_type = '非民用'`
1328
- }
1329
-
1330
-
1331
- let http = new HttpResetClass()
1332
- let res = await http.load(
1333
- 'POST',
1334
- `rs/sql/applyGetPrice`,
1335
- {data: data},
1336
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1337
- )
1338
- let priceLoptions = res.data.map(item => {
1339
- return {
1340
- label: item.f_price_name,
1341
- value: `${item.id}`
1342
- }
1343
- })
1344
- this.setLabelOptions('气价名称', priceLoptions)
1345
- },
1346
- // 单价失去焦点
1347
- async priceChange () {
1348
- if (isEmpty(this.show_data.f_price)) {
1349
- return
1350
- }
1351
- let data = {
1352
- operator: '*',
1353
- num1: this.show_data.f_price,
1354
- num2: this.show_data.f_install_count
1355
- }
1356
- let http = new HttpResetClass()
1357
- let res = await http.load(
1358
- 'POST',
1359
- `rs/logic/compute`,
1360
- {data: data},
1361
- {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
1362
- )
1363
-
1364
- this.setLabelValue('工程材料费', res.data)
1365
- },
1366
- //工商户验证表具类型是否需选择
1367
- async meterBrandCheck() {
1368
- let data = {
1369
- f_process_id: this.show_data.f_process_id,
1370
- orgid:this.$login.f.orgid
1371
- }
1372
- let http = new HttpResetClass()
1373
- let res = await http.load(
1374
- 'POST',
1375
- `rs/sql/meterCheck`,
1376
- {data: data},
1377
- {resolveMsg: null, rejectMsg: null}
1378
- )
1379
- if (res.data[0].num > 0){
1380
- this.$showMessage(`还有${res.data[0].num}处未选择表具,请选择后提交!`)
1381
- throw null
1382
- }
1383
- },
1384
- // 安装户数
1385
- async installCountCheck() {
1386
- let data = {
1387
- tablename: 't_userinfo',
1388
- condition: `f_process_id = '${this.show_data.f_process_id}' and f_user_state != '销户'`,
1389
- }
1390
-
1391
- let http = new HttpResetClass()
1392
- let res = await http.load(
1393
- 'POST',
1394
- `rs/sql/applySingleTable`,
1395
- {data: data},
1396
- {resolveMsg: null, rejectMsg: '用户数量查询失败'}
1397
- )
1398
- this.setLabelValue('安装户数',res.data.length)
1399
- },
1400
- // 户内出单日期
1401
- getOutdoorsTime () {
1402
- for (const item of this.selectdata.fields) {
1403
- console.log('是否进入')
1404
- if (item.label === '户内出单日期') {
1405
- item.value = this.selectdata.f_release_date
1406
- this.selectdata[item.field] = item.value
1407
- console.log('当前出单时间',item.value)
1408
- }else if(item.label === '庭院出单日期'){
1409
- item.value = this.selectdata.f_release_date
1410
- this.selectdata[item.field] = item.value
1411
- }else if(item.label === '出单日期'){
1412
- item.value = this.selectdata.f_release_date
1413
- this.selectdata[item.field] = item.value
1414
- }
1415
- }
1416
- },
1417
- //获取缴费日期
1418
- async getChargeDate() {
1419
- let data = {
1420
- tablename: 'activityins',
1421
- condition: `processid = '${this.selectdata.f_process_id}' and defname = '报装缴费'`,
1422
- }
1423
-
1424
- let http = new HttpResetClass()
1425
- let res = await http.load(
1426
- 'POST',
1427
- `rs/sql/applySingleTable`,
1428
- {data: data},
1429
- {resolveMsg: null, rejectMsg: null}
1430
- )
1431
- if (res.data[0]) {
1432
- for (const item of this.selectdata.fields) {
1433
- if (item.label === '缴费日期') {
1434
- item.value = res.data[0].finishtime
1435
- this.selectdata[item.field] = item.value
1436
- }
1437
- }
1438
- }
1439
- },
1440
- //获取工程施工时各部门当前签字环节
1441
- async getSingAct() {
1442
- let data = {
1443
- f_process_id: this.selectdata.f_process_id
1444
- }
1445
- let http = new HttpResetClass()
1446
- let res = await http.load(
1447
- 'POST',
1448
- `rs/sql/getSingAct`,
1449
- {data: data},
1450
- {resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
1451
- )
1452
- if (res.data.length > 0) {
1453
- for (const item of this.selectdata.fields) {
1454
- if (item.label === '签字所在环节') {
1455
- item.value = res.data[0].defname
1456
- this.selectdata[item.field] = item.value
1457
- }
1458
- }
1459
- }
1460
- },
1461
- //获取土建的乙方
1462
- getYiFang() {
1463
- return [{label: '榆林榆川天然气', value: '榆林榆川天然气'},
1464
- {label: this.selectdata.f_user_name, value: this.selectdata.f_user_name},
1465
- {label: '无', value: '无'}]
1466
- },
1467
- getGaiXianType () {
1468
- return [{label: "隐患整改", value: "隐患整改"},
1469
- {label: "改造工程", value: "改造工程"},
1470
- {label: "改线工程", value: "改线工程"},
1471
- {label: "老旧小区", value: "老旧小区"}]
1472
- },
1473
- async checkIsUser() {
1474
- let data = {
1475
- items: 'count(*) num' ,
1476
- tablename: 't_userinfo',
1477
- condition: `f_process_id = '${this.show_data.f_process_id}' and f_user_state <> '销户'`
1478
- }
1479
-
1480
- let http = new HttpResetClass()
1481
- let res = await http.load(
1482
- 'POST',
1483
- `rs/sql/applySingleTable`,
1484
- {data: data},
1485
- {resolveMsg: null, rejectMsg: '是否存在用户!!!'}
1486
- )
1487
- if (res.data[0].num <= 0){
1488
- this.$showMessage(`未添加设备,请添加后提交!`)
1489
- throw null
1490
- }
1491
- },
1492
- async repair() {
1493
- let data = {
1494
- f_process_id: this.show_data.f_process_id
1495
- }
1496
- let http = new HttpResetClass()
1497
- let res = await http.load(
1498
- 'POST',
1499
- `rs/logic/updateRepair`,
1500
- {data: data},
1501
- {resolveMsg: null, rejectMsg: '维修工单状态修改!!!'}
1502
- )
1503
- this.$dispatch('loadPage')
1504
- },
1505
- changeDispatch(value){
1506
- if (value === '维修安检中心'){
1507
- this.hideLabels('现场项目负责人', '安装单位', '安装单位现场负责人', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
1508
- , '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
1509
- this.hideButtons('签字')
1510
- this.electiveLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
1511
- , '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
1512
- }
1513
- if (value === '施工工队'){
1514
- this.showLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
1515
- , '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
1516
- this.requiredLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位', '现场项目负责人', '是否发起签字', '签字是否完成', '签字所在环节')
1517
- }
1518
- },
1519
- //拆除流程核对气量提交
1520
- async gasCheckBefore() {
1521
- let http = new HttpResetClass()
1522
- let data = {
1523
- tablename: 't_files',
1524
- condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fusetype = '气量核对单'`
1525
- }
1526
- let res = await http.load(
1527
- 'POST',
1528
- `rs/sql/applySingleTable`,
1529
- {data: data},
1530
- {resolveMsg: null, rejectMsg: null}
1531
- )
1532
- if (res.data.length <= 0) {
1533
- this.$showMessage('气量核对单未上传,无法提交!!!')
1534
- throw '气量核对单未上传,无法提交!'
1535
- }
1536
- },
1537
- },
1538
- events: {
1539
- // 强制开关阀
1540
- async 'onOffValve' () {
1541
- let data = {
1542
- condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
1543
- }
1544
- let http = new HttpResetClass()
1545
- let res = await http.load(
1546
- 'POST',
1547
- `rs/sql/getApplyUserinfo`,
1548
- {data: data},
1549
- {resolveMsg: null, rejectMsg: '档案获取失败!!!'}
1550
- )
1551
-
1552
- let userinfo = res.data[0]
1553
-
1554
- if (this.show_data.button.button_name !== '退出强制状态') {
1555
- data = {
1556
- condition: `t_userfiles.f_meternumber = '${userinfo.f_meternumber}'`,
1557
- contentData: {
1558
- isOpen: this.show_data.button.button_name === '强制开阀' ? 1 : 0
1559
- },
1560
- inputtor: this.$login.f.name,
1561
- instructTitle: this.show_data.button.button_name === '强制开阀' ? '开阀' : '关阀',
1562
- instructType: '阀门控制',
1563
- meterBrandName: userinfo.f_alias
1564
- }
1565
- res = await http.load(
1566
- 'POST',
1567
- `rs/logic/saveInstruct`,
1568
- {data: data},
1569
- {resolveMsg: null, rejectMsg: `${this.show_data.button.button_name}失败!!!`}
1570
- )
1571
- }
1572
-
1573
- data = {
1574
- f_user_id: userinfo.f_user_id,
1575
- f_userinfo_id: userinfo.f_userinfo_id,
1576
- record: {
1577
- f_filiale: "榆林."+this.$login.f.orgs,
1578
- f_instruct_meta_data: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
1579
- f_instruct_title: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
1580
- f_instruct_type: '阀门控制',
1581
- f_meternumber: userinfo.f_meternumber,
1582
- f_operator: this.$login.f.name,
1583
- f_outlets: userinfo.f_outlets,
1584
- f_reason: this.show_data.button.f_reason,
1585
- f_user_id: userinfo.f_user_id,
1586
- f_userinfo_id: userinfo.f_userinfo_id
1587
- },
1588
- state: this.show_data.button.button_name === '退出强制状态' ? 0 : 1
1589
- }
1590
-
1591
- res = await http.load(
1592
- 'POST',
1593
- `rs/logic/updateNetWorkValve`,
1594
- {data: data},
1595
- {resolveMsg: '执行成功!!!', rejectMsg: `执行失败!!!`}
1596
- )
1597
-
1598
- },
1599
- // 修改用户档案
1600
- async 'updateUserinfoState' () {
1601
- let data = {
1602
- f_userinfo_id: this.show_data.f_userinfo_id
1603
- }
1604
- let http = new HttpResetClass()
1605
- let res = await http.load(
1606
- 'POST',
1607
- `rs/logic/updateUserinfoState`,
1608
- {data: data},
1609
- {resolveMsg: '该用户档案已为正常档案,可进行开关阀操作!!!', rejectMsg: '档案状态修改失败!!!'}
1610
- )
1611
-
1612
- this.showButtons('强制开阀','强制关阀')
1613
- this.hideButtons('转正式档案')
1614
- },
1615
- // 选择用户
1616
- async 'selectUserinfo' (row) {
1617
- this.setLabelValue('用户编号', row.f_userinfo_id)
1618
- this.setLabelValue('用户名称', row.f_user_name)
1619
- this.setLabelValue('用户电话', row.f_user_phone)
1620
- this.setLabelValue('证件类型', row.f_credentials)
1621
- this.setLabelValue('证件号码', row.f_idnumber)
1622
- this.setLabelValue('地址', row.f_address)
1623
- this.setLabelValue('定位地址', row.f_location_address)
1624
- this.setLabelValue('购货单位识别号', row.f_taxpayer_id)
1625
- this.setLabelValue('购货单位名称', row.f_paper_name)
1626
- this.setLabelValue('购货单位开户行及银行账号', row.f_paper_account)
1627
- this.setLabelValue('购货单位地址电话', row.f_address_phone)
1628
- this.setLabelValue('联系人', row.f_petitionuser)
1629
- this.setLabelValue('区/县', row.f_area)
1630
- this.setLabelValue('片区', row.f_slice_area)
1631
- this.setLabelValue('街道', row.f_street)
1632
- if (row.f_address_detail){
1633
- this.setLabelValue('详细地址', row.f_address_detail)
1634
- }
1635
- if (this.show_data.f_apply_type === '改线业务'){
1636
- this.setLabelValue('工程名称', row.f_user_name)
1637
- this.setLabelValue('联系电话', row.f_user_phone)
1638
- }
1639
- this.show_data.f_address_detail = row.f_address_detail
1640
- this.show_data.f_residential_area = row.f_residential_area
1641
- this.show_data.unit = row.unit
1642
- this.show_data.f_building = row.f_building
1643
- this.show_data.f_floor = row.f_floor
1644
- this.show_data.f_taxpayer_id = row.f_taxpayer_id //购货单位识别号
1645
- this.show_data.f_address_phone = row.f_address_phone //购货单位地址电话
1646
- this.show_data.f_paper_name = row.f_paper_name //购货单位名称
1647
- this.show_data.f_paper_account = row.f_paper_account
1648
- this.show_data.f_userinfo_id = row.f_userinfo_id
1649
- console.log("当前数据",this.show_data)
1650
- if (this.show_data.f_apply_type === '设备拆除'){
1651
- let data = {
1652
- userinfo: row,
1653
- apply: this.show_data,
1654
- loginUser: this.$login.f
1655
- }
1656
- let res = await this.$resetpost(
1657
- `rs/logic/addChaiChuUser`,
1658
- {data: data},
1659
- {resolveMsg: '添加拆除用户成功!!!', rejectMsg: '添加拆除用户失败!!!'}
1660
- )
1661
- this.$dispatch('breakControl', this.show_data)
1662
- }
1663
- },
1664
- async 'priceReadEvent' (index) {
1665
- await this.setContractSignatory()
1666
- // await this.getContractNumber()
1667
- await this.getPrice(index)
1668
- await this.priceChange()
1669
- },
1670
- async 'getPrice' (index) {
1671
- if (isEmpty(this.show_data.f_gas_nature) || isEmpty(this.show_data.f_price_type)) {
1672
- return
1673
- }
1674
-
1675
- if (index) {
1676
- this.setLabelValue('气价名称', null)
1677
- }
1678
-
1679
- if (this.show_data.f_price_type === '混合气价') {
1680
- this.showLabels('比率')
1681
- } else {
1682
- this.setLabelValue('比率', null)
1683
- this.hideLabels('比率')
1684
- }
1685
-
1686
- let data = {
1687
- condition: `sp.f_filiale like '%${"榆林."+this.$login.f.orgs}%' and sp.f_price_type = '${this.show_data.f_price_type}' and f_gasproperties = '${this.show_data.f_gas_nature}'`
1688
- }
1689
-
1690
- if (this.show_data.f_apply_type === '民用报建') {
1691
- data.condition += `and f_user_type = '民用'`
1692
- }
1693
- if (this.show_data.f_apply_type === '非民用报建') {
1694
- data.condition += `and f_user_type = '非民用'`
1695
- }
1696
-
1697
-
1698
- let http = new HttpResetClass()
1699
- let res = await http.load(
1700
- 'POST',
1701
- `rs/sql/applyGetPrice`,
1702
- {data: data},
1703
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1704
- )
1705
-
1706
- let priceLoptions = res.data.map(item => {
1707
- return {
1708
- label: item.f_price_name,
1709
- value: `${item.id}`
1710
- }
1711
- })
1712
- this.setLabelOptions('气价名称',priceLoptions)
1713
- },
1714
- // 街道失去焦点
1715
- async changStreet () {
1716
- if (isEmpty(this.show_data.f_street)) {
1717
- return
1718
- }
1719
- this.addressSplicing()
1720
- },
1721
-
1722
- 'changAddressDetail'(){
1723
- if (isEmpty(this.show_data.f_address_detail)) {
1724
- return
1725
- }
1726
- this.addressSplicing()
1727
- },
1728
- 'changAddress'(){
1729
- if (isEmpty(this.show_data.f_address_detail)) {
1730
- return
1731
- }
1732
- let f_address = this.show_data.f_address + this.show_data.f_address_detail
1733
- this.setLabelValue("地址", f_address)
1734
- },
1735
- // 片区失去焦点
1736
- async 'changSliceArea' () {
1737
- if (isEmpty(this.show_data.f_area) || isEmpty(this.show_data.f_slice_area)) {
1738
- return
1739
- }
1740
-
1741
- let data = {
1742
- items: 'f_street label,f_street value',
1743
- tablename: 't_area_address',
1744
- condition: `f_area = '${this.show_data.f_area}' and f_slice_area = '${this.show_data.f_slice_area}'`,
1745
- groupitem: 'f_street'
1746
- }
1747
-
1748
- let http = new HttpResetClass()
1749
- let res = await http.load(
1750
- 'POST',
1751
- `rs/sql/applySingleTable`,
1752
- {data: data},
1753
- {resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
1754
- )
1755
- this.setLabelOptions('街道', res.data)
1756
-
1757
- this.addressSplicing()
1758
- },
1759
- // 区县失去焦点
1760
- 'changeArea' () {
1761
- if (isEmpty(this.show_data.f_area)) {
1762
- return
1763
- }
1764
- this.setLabelValue('片区', null)
1765
- this.setLabelValue('街道', null)
1766
- this.setLabelOptions('片区', this.$appdata.getParam(`${this.show_data.f_area}片区`))
1767
- this.setLabelOptions('街道', [])
1768
-
1769
- this.addressSplicing()
1770
- },
1771
- // 开启签字
1772
- async 'startSignActivity' () {
1773
- this.hideButtons('签字')
1774
- if(this.show_data.f_apply_type !== '管线建设'){
1775
- await this.constructionBefore()
1776
- }
1777
- let data = {
1778
- apply: this.show_data,
1779
- user: this.$login.f
1780
- }
1781
-
1782
- let res = await this.$resetpost(
1783
- `rs/logic/startSignActivity`,
1784
- {data: data},
1785
- {resolveMsg: '签字流程已发起!!!', rejectMsg: '签字发起失败!!!'}
1786
- )
1787
-
1788
- this.$dispatch('breakControl', this.show_data)
1789
- },
1790
- // 工程施工初始化
1791
- async 'buildReadyEvent' () {
1792
- // this.changeDispatch(this.getLableValue('派工类型'))
1793
- if(this.getLableValue('是否发起签字') === '是') {
1794
- this.hideButtons('签字')
1795
- }
1796
- let http = new HttpResetClass()
1797
- if (isEmpty(this.show_data.f_meter_brand)) {
1798
- return
1799
- }else {
1800
- if (this.show_data.f_meter_brand === 'null') {
1801
- this.setLabelOptions('气表型号', [{label: '无', value: 'null'}])
1802
- return
1803
- }
1804
- let data = {
1805
- f_gasbrand_id: this.show_data.f_meter_brand
1806
- }
1807
- let res = await http.load(
1808
- 'POST',
1809
- `rs/sql/getGasModel`,
1810
- {data: data},
1811
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
1812
- )
1813
- this.setLabelOptions('气表型号', res.data)
1814
- }
1815
-
1816
- if (this.show_data.f_apply_type === '分户挂表') {
1817
- let data = {
1818
- condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
1819
- }
1820
- let http = new HttpResetClass()
1821
- let res = await http.load(
1822
- 'POST',
1823
- `rs/sql/getApplyUserinfo`,
1824
- {data: data},
1825
- {resolveMsg: null, rejectMsg: '档案状态获取失败!!!'}
1826
- )
1827
- console.log("f_meter_classif11y",res.data[0].f_meter_classify)
1828
- if (!res.data[0].f_meter_brand.includes('物联网表')) {
1829
- return
1830
- }
1831
- console.log("f_user_state11",res.data[0].f_user_state)
1832
- if (res.data[0].f_user_state === '正常') {
1833
- this.showButtons('退出强制状态','强制关阀')
1834
- this.hideButtons('转正式档案')
1835
- } else {
1836
- this.showButtons('转正式档案')
1837
- this.hideButtons('退出强制状态','强制关阀')
1838
- }
1839
- }
1840
- },
1841
- // 工程派工初始化
1842
- async 'dispatchReadyEvent' () {
1843
- if (isEmpty(this.show_data.f_meter_brand)) {
1844
- return
1845
- }
1846
- let data = {
1847
- f_gasbrand_id: this.show_data.f_meter_brand
1848
- }
1849
- let http = new HttpResetClass()
1850
- let res = await http.load(
1851
- 'POST',
1852
- `rs/sql/getGasModel`,
1853
- {data: data},
1854
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
1855
- )
1856
-
1857
- this.setLabelOptions('气表型号', res.data)
1858
- },
1859
- // 气表品牌失去焦点
1860
- async 'meterBrandChenge' (index) {
1861
- if (isEmpty(this.show_data.f_meter_brand)) {
1862
- return
1863
- }
1864
- this.setLabelValue('气表型号', null)
1865
- let data = {
1866
- f_gasbrand_id: this.show_data.f_meter_brand
1867
- }
1868
- let http = new HttpResetClass()
1869
- let res = await http.load(
1870
- 'POST',
1871
- `rs/sql/getGasModel`,
1872
- {data: data},
1873
- {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
1874
- )
1875
-
1876
- this.setLabelOptions('气表型号', res.data)
1877
- },
1878
- // 单价失去焦点
1879
- async 'priceChange' (index) {
1880
- if (isEmpty(this.show_data.f_price)) {
1881
- return
1882
- }
1883
- let data = {
1884
- operator: '*',
1885
- num1: this.show_data.f_price,
1886
- num2: this.show_data.f_install_count
1887
- }
1888
- let http = new HttpResetClass()
1889
- let res = await http.load(
1890
- 'POST',
1891
- `rs/logic/compute`,
1892
- {data: data},
1893
- {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
1894
- )
1895
-
1896
- this.setLabelValue('工程材料费', res.data)
1897
- },
1898
- // 安装户数失去焦点
1899
- 'installCountChange' (index) {
1900
- if (isEmpty(this.show_data.f_install_count)) {
1901
- return
1902
- }
1903
- if (Number(this.show_data.f_install_count) > Number(this.show_data.f_apply_count)) {
1904
- this.$showMessage('安装数已超过申请数!!!')
1905
- // this.setLabelValue('安装户数', null)
1906
- // this.setLabelValue('安装点数', null)
1907
- // return
1908
- }
1909
-
1910
- if (Number(this.show_data.f_install_count) <= 0) {
1911
- this.$showMessage('至少有一个用户!!!')
1912
- this.setLabelValue('安装户数', null)
1913
- this.setLabelValue('安装点数', null)
1914
- return
1915
- }
1916
- },
1917
- // 土建单位失去焦点
1918
- 'judgmentEngineering' (index) {
1919
- if (this.show_data.f_engineering_operator_id === '无' && this.show_data.f_civil_engineering !== "无") {
1920
- this.$showMessage('土建工程派单与实际选择不符,请仔细核对后再次提交')
1921
- throw null
1922
- }
1923
- },
1924
- // 报建性质失去焦点
1925
- 'applyNatureChange' (index) {
1926
- if (this.show_data.f_apply_nature === '散户') {
1927
- //绑定票据类型为电子票
1928
- this.setLabelValue('票据类型', '电子票')
1929
- this.hideLabels('营业执照')
1930
- this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
1931
- }
1932
- if (this.show_data.f_apply_nature === '小区') {
1933
- //票据类型为专票
1934
- this.setLabelValue('票据类型', '专票')
1935
- this.showLabels('营业执照', '小区/巷道')
1936
- this.requiredLabels('小区/巷道')
1937
- }
1938
- },
1939
- // 票据类型失去焦点
1940
- 'applyPaperChange' (index) {
1941
- console.log("测试是否进入")
1942
- if (this.show_data.f_paper_type === '专票') {
1943
- this.requiredLabels('购货单位名称','购货单位识别号', '购货单位银行账号', '购货单位地址电话')
1944
- }else {
1945
- this.electiveLabels( '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
1946
- }
1947
- },
1948
- 'chargeAfter'(index){
1949
- if (this.show_data.f_surplus_money !== this.show_data.f_due_money){
1950
- this.hideButtons('退回')
1951
- }else {
1952
- this.showButtons('退回')
1953
- }
1954
- },
1955
- //购货单位识别号失去焦点
1956
- 'getAuthenticationMethod' (index){
1957
- if (isEmpty(this.show_data.f_taxpayer_id)) {
1958
- this.setLabelValue('认证类型','个人认证')
1959
- }else {
1960
- this.setLabelValue('认证类型','企业认证')
1961
- }
1962
- },
1963
- //搜索小区
1964
- 'selectArea' (val,index) {
1965
- let pcdText = `and f_residential_area like '%${val}%'`
1966
- let data = {
1967
- tablename: 't_area_address',
1968
- condition: `f_filiale like '%${"榆林."+this.$login.f.orgs}%' and f_area_status = '启用' ${pcdText}`
1969
- }
1970
- new HttpResetClass().load("POST", `rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
1971
- console.log('请求发送完成!!!!!'+JSON.stringify(res))
1972
- if(res.data.length>0){
1973
- this.setLabelOptions('小区/巷道', res.data.map(item => {
1974
- return {
1975
- label: item.f_residential_area,
1976
- value: item.id
1977
- }
1978
- }))
1979
- }
1980
- })
1981
- },
1982
- //身份证号码校验
1983
- 'checkIdnumber' (index) {
1984
- if(this.show_data.f_credentials === '身份证'){
1985
- var verify = /^[1-9]\d{5}(18|19|20|21)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
1986
- if (!verify.test(this.show_data.fields[index].value)){
1987
- this.show_data.fields[index].value = null
1988
- this.$showMessage('身份证号码格式错误请重新输入!!!')
1989
- }
1990
- }
1991
- },
1992
- //电话号码校验
1993
- 'checkPhone' (index) {
1994
- var verify = /^([1][0-9]{10})$/
1995
- if (!verify.test(this.show_data.fields[index].value)){
1996
- this.show_data.fields[index].value = null
1997
- this.$showMessage('电话号码格式错误请重新输入!!!')
1998
- }
1999
- },
2000
- 'changeDispatching'(index){
2001
- if (this.show_data.fields[index].value === '安检维修中心'){
2002
- this.hideLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2003
- this.electiveLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2004
- }else if (this.show_data.fields[index].value === '施工工队'){
2005
- this.showLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2006
- this.requiredLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2007
- }
2008
- },
2009
- 'getRefund'(index){
2010
- if (this.show_data.fields[index].value === '否'){
2011
- this.hideLabels('退费金额', '退款项')
2012
- this.electiveLabels('退费金额', '退款项')
2013
- }else if (this.show_data.fields[index].value === '是'){
2014
- this.showLabels('退费金额', '退款项')
2015
- this.requiredLabels('退费金额', '退款项')
2016
- }
2017
- },
2018
- 'hasTrouble'(index) {
2019
- if (this.show_data.fields[index].value === '有纠纷'){
2020
- this.hideButtons('提交', '签字', '图纸变更')
2021
- this.showLabels('纠纷原因')
2022
- }else {
2023
- this.showButtons('提交', '签字', '图纸变更')
2024
- this.hideLabels('纠纷原因')
2025
- }
2026
- },
2027
- //金额大小写转换
2028
- 'applyCapitalizedAmount' (index){
2029
- // 通过正则过滤小数点后两位
2030
- let money = (this.show_data.fields[index].value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
2031
- this.setLabelValue('应交金额大写',this.smalltoBIG(money))
2032
- },
2033
-
2034
- // ===========================================
2035
- 'initializtionView' () {
2036
- if (this.show_data.f_apply_nature === '散户') {
2037
- this.hideLabels('营业执照')
2038
- this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
2039
- }
2040
- if (this.show_data.f_apply_nature === '小区') {
2041
- this.showLabels('营业执照', '小区/巷道', '小区名称')
2042
- this.requiredLabels('小区/巷道')
2043
- // this.hideComponents('用户花名单')
2044
- }
2045
- },
2046
- // 检查重复
2047
- 'checkRepeat' (index) {
2048
- this.checkDuplicate(index)
2049
- },
2050
- async 'button'() {
2051
- if (this.show_data.button.before) {
2052
- await this[this.show_data.button.before]()
2053
- }
2054
- // 点击重置按钮就重置数据
2055
- if (this.show_data.button.button_name === '重置') {
2056
- this.$dispatch('breakControl', this.selectdata)
2057
- return
2058
- }
2059
- this.show_data.start_activity = this.$workflow_vue.start_activity
2060
- this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
2061
- let data = {
2062
- apply: this.show_data,
2063
- user: this.$login.f
2064
- }
2065
- let http = new HttpResetClass()
2066
- let res = await http.load(
2067
- 'POST',
2068
- `rs/logic/ApplyProductService`,
2069
- {data: data},
2070
- {resolveMsg: null, rejectMsg: '数据保存失败'}
2071
- )
2072
- if (this.show_data.button.after) {
2073
- this[this.show_data.button.after]()
2074
- }
2075
- this.$dispatch('loadPage')
2076
- },
2077
- // 失去焦点出触发事件
2078
- 'onchange' (index) {
2079
- },
2080
- selectSearch (val, index) {},
2081
- 'onblur' (index) {},
2082
- 'oninput' (index) {},
2083
- async 'onchangeModal' (index, fieldIndex) {
2084
- },
2085
- async 'onblurModal' (index, fieldIndex) {
2086
-
2087
- },
2088
- async 'oninputModal' (index, fieldIndex) {
2089
-
2090
- },
2091
- async 'onetomanydelete' (index, rowIndex) {
2092
-
2093
- let http = new HttpResetClass()
2094
-
2095
- let res = await http.load(
2096
- 'DELETE',
2097
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
2098
- null,
2099
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
2100
- )
2101
-
2102
- res = await this.$resetpost(
2103
- 'rs/entity/t_apply',
2104
- this.show_data
2105
- )
2106
-
2107
- this.$dispatch('breakControl', this.show_data)
2108
- },
2109
- async 'onetomanyupdate' (index, rowIndex) {
2110
- let data = this.show_data.onetomany[index].rows[rowIndex]
2111
-
2112
- this.show_data.onetomany[index].fields.forEach(item => {
2113
- data[item.field] = item.value
2114
- })
2115
- let res = await this.$resetpost(
2116
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
2117
- data
2118
- )
2119
-
2120
- res = await this.$resetpost(
2121
- 'rs/entity/t_apply',
2122
- this.show_data
2123
- )
2124
-
2125
- this.$dispatch('breakControl', this.show_data)
2126
- },
2127
- async 'onetomanyadd' (index) {
2128
- let data = {
2129
- f_process_id : this.show_data.f_process_id,
2130
- f_operator_id: this.$login.f.id,
2131
- f_operator: this.$login.f.name,
2132
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
2133
- f_orgid: this.$login.f.orgid,
2134
- f_orgname: "榆林."+this.$login.f.orgs
2135
- }
2136
- this.show_data.onetomany[index].fields.forEach(item => {
2137
- data[item.field] = item.value
2138
- })
2139
- let res = await this.$resetpost(
2140
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
2141
- data
2142
- )
2143
-
2144
- res = await this.$resetpost(
2145
- 'rs/entity/t_apply',
2146
- this.show_data
2147
- )
2148
-
2149
- this.$dispatch('breakControl', this.show_data)
2150
- },
2151
- 'complyInstallation' (index) {
2152
- if (this.show_data.defname === '报建受理'){
2153
- if (this.show_data.f_accept_install === '否') {
2154
- console.log("测试")
2155
- this.hideButtons('下发','提交')
2156
- this.showButtons('终止')
2157
- } else {
2158
- this.hideButtons('终止')
2159
- this.showButtons('下发','提交')
2160
- }
2161
- }
2162
- if (this.show_data.defname === '现场勘察'){
2163
- if (this.show_data.f_survey_opinion === '否') {
2164
- console.log("测试")
2165
- this.hideButtons('下发','提交')
2166
- this.showButtons('终止')
2167
- } else {
2168
- this.hideButtons('终止')
2169
- this.showButtons('下发','提交')
2170
- }
2171
- }
2172
- if (this.show_data.defname === '报建受理' || this.show_data.defname === '现场勘察'){
2173
- this.installCountCheck()
2174
- }
2175
- },
2176
- async 'saveData'(index) {
2177
- if (this.show_data.f_residential_area_id) {
2178
- let data = {
2179
- tablename: 't_area_address',
2180
- condition: `id = '${this.show_data.f_residential_area_id}'`
2181
- }
2182
- let http = new HttpResetClass()
2183
- let res = await http.load(
2184
- 'POST',
2185
- `rs/sql/applySingleTable`,
2186
- {data: data},
2187
- {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
2188
- )
2189
-
2190
- this.area = res.data[0]
2191
- }
2192
- this.areaAddressSplicing()
2193
- },
2194
- async 'importEvent' (index, table, configName, filepath) {
2195
- let data = {
2196
- selectdata: this.show_data,
2197
- table: table,
2198
- filepath: filepath,
2199
- configName: configName,
2200
- user: this.$login.f
2201
- }
2202
-
2203
- let res = await this.$resetpost(
2204
- `rs/logic/importEvent`,
2205
- data
2206
- )
2207
-
2208
- this.$dispatch('breakControl', this.show_data)
2209
- },
2210
- 'onbutchange' (index) {
2211
-
2212
- },
2213
- 'onbutblur' (index) {
2214
-
2215
- },
2216
- 'onbutinput' (index) {
2217
-
2218
- }
2219
- },
2220
- watch: {
2221
- }
2222
- }
2223
- </script>
2224
- <style scoped>
2225
- /*清除model中的浮动*/
2226
- .clearfix:after,.clearfix:before{
2227
- display: table;
2228
- }
2229
- .clearfix:after{
2230
- clear: both;
2231
- }
2232
- </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 {HttpResetClass} from 'vue-client'
9
+ import {isEmpty} from '../../../Util'
10
+ import Vue from "vue";
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
+ area: {}, // 小区详细
39
+ config: {}
40
+ }
41
+ },
42
+ ready () {
43
+ this.refurbish()
44
+ },
45
+ methods: {
46
+ // 组件初始化操作
47
+ async refurbish() {
48
+ this.json_datas = Vue.prototype.$workflow_vue
49
+ let sum = 0
50
+ let jsonData = {}
51
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
52
+ this.$showMessage("网络故障,请刷新页面")
53
+ return
54
+ }
55
+ this.json_datas.activitys.forEach(item => {
56
+ if (this.selectdata.defname === item.title) {
57
+ jsonData = item // 拿到当前节点的json配置信息
58
+ sum++ // 节点名一样的个数
59
+ }
60
+ })
61
+
62
+ if (sum === 0) {
63
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
64
+ return
65
+ }
66
+ if (sum > 1) {
67
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
68
+ return
69
+ }
70
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
71
+
72
+ // fields 字段填充值
73
+ for (const item of this.selectdata.fields) {
74
+ if (!item.value) {
75
+ item.value = null
76
+ }
77
+
78
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
79
+ if (item.eval) {
80
+ item.value = eval(item.default)
81
+ } else {
82
+ item.value = item.default
83
+ }
84
+ }
85
+
86
+ if (this.selectdata[item.field]) {
87
+ // 将json字符串格式化赋值给value
88
+ if (String(this.selectdata[item.field]).startsWith("{")) {
89
+ item.value = JSON.parse(this.selectdata[item.field])
90
+ } else {
91
+ item.value = this.selectdata[item.field]
92
+ }
93
+ }
94
+ if (this.selectdata[item.field] === 0) {
95
+ item.value = 0
96
+ }
97
+
98
+ // datepicker
99
+ if (item.type === 'datepicker' && !item.value && item.default) {
100
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
101
+ }
102
+
103
+ // 如果配置类型为select,优先从参数列表获取options
104
+ if (item.type === 'select' || item.type === 'checkbox') {
105
+ if (item.param) {
106
+ let temp = this.$appdata.getParam(item.label)
107
+
108
+ if (temp && temp.length > 0) {
109
+ item.options = temp
110
+ }
111
+
112
+ if (item.paramLabel) {
113
+ temp = this.$appdata.getParam(item.paramLabel)
114
+ if (temp && temp.length > 0) {
115
+ item.options = temp
116
+ }
117
+ }
118
+ }
119
+ }
120
+ if (item.ready) {
121
+ item.options = await this[item.ready]()
122
+ }
123
+ if (item.type === 'checkbox') {
124
+ if (this.selectdata[item.field]) {
125
+ item.value = JSON.parse(this.selectdata[item.field])
126
+ } else {
127
+ item.value = []
128
+ }
129
+ }
130
+ if(this.selectdata.state === '结束'){
131
+ item.readonly = true
132
+ item.disabled = true
133
+ console.log('当前defname'+this.selectdata.defname+'当前title'+this.selectdata.title)
134
+ }
135
+ this.selectdata[item.field] = item.value
136
+ }
137
+
138
+ // 控制组件
139
+ if (this.selectdata.components) {
140
+ this.selectdata.components.forEach(item => {
141
+ if (!item.mark) {
142
+ item.mark = 0
143
+ }
144
+ if(this.selectdata.state === '结束'){
145
+ item.mark = 1
146
+ }
147
+ })
148
+ }
149
+
150
+ // 初始化onetomany
151
+ if (this.selectdata.onetomany) {
152
+ for (const item of this.selectdata.onetomany) {
153
+ let res = null
154
+ if (item.queryEvent) {
155
+ res = this[item.queryEvent]()
156
+ } else {
157
+ let data = {
158
+ tablename: item.tables[0],
159
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
160
+ }
161
+ let http = new HttpResetClass()
162
+ res = await http.load(
163
+ 'POST',
164
+ 'rs/sql/applySingleTable',
165
+ {data: data},
166
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
167
+ )
168
+ }
169
+ item.rows = res.data
170
+ // 初始化onetomany中的fields
171
+ for (const field of item.fields) {
172
+ if (!field.value) {
173
+ if (field.value !== 0) {
174
+ field.value = null
175
+ }
176
+ }
177
+
178
+ if (field.default || field.default === 0) {
179
+ field.value = field.default
180
+ }
181
+
182
+ // datepicker
183
+ if (field.type === 'datepicker' && !field.value && field.default) {
184
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
185
+ }
186
+
187
+ if (field.type === 'select') {
188
+
189
+ let temp = this.$appdata.getParam(field.label)
190
+
191
+ if (temp && temp.length > 0) {
192
+ field.options = temp
193
+ }
194
+
195
+ if (field.paramLabel) {
196
+ temp = this.$appdata.getParam(field.paramLabel)
197
+ if (temp && temp.length > 0) {
198
+ item.options = temp
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+
206
+ // 初始化 buttons_fields
207
+ for (const item of this.selectdata.buttons) {
208
+ if (item.button_name === '下发' || item.button_name === '转派') {
209
+
210
+ let data = {
211
+ source: item.source,
212
+ userid: this.$login.f.id
213
+ }
214
+ if (item.sourceMethod) {
215
+ data.source = this[item.sourceMethod]()
216
+ }
217
+ if (!data.source) {
218
+ this.$showMessage("请配置获取人员表达式")
219
+ return
220
+ }
221
+ let http = new HttpResetClass()
222
+ let res = await http.load(
223
+ 'POST',
224
+ 'rs/search',
225
+ {data: data},
226
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
227
+ )
228
+ let options = res.data.map(source => {
229
+ return {
230
+ "label": source.name,
231
+ "value": source.id
232
+ }
233
+ })
234
+ if (item.button_fields.length !== 1) {
235
+ this.$showMessage("下发有且只能有一个字段!!!")
236
+ return
237
+ }
238
+ item.button_fields[0].options = options
239
+ }
240
+ if (item.button_fields) {
241
+ item.button_fields.forEach(x => {
242
+ // 如果配置类型为select,优先从参数列表获取options
243
+ if (x.type === 'select') {
244
+
245
+ if (x.param) {
246
+ let temp = this.$appdata.getParam(x.label)
247
+
248
+ if (temp && temp.length > 0) {
249
+ x.options = temp
250
+ }
251
+
252
+ if (x.paramLabel) {
253
+ temp = this.$appdata.getParam(x.paramLabel)
254
+ if (temp && temp.length > 0) {
255
+ x.options = temp
256
+ }
257
+ }
258
+ }
259
+
260
+ }
261
+ })
262
+ }
263
+ if(this.selectdata.state === '结束'){
264
+ item.hidden = true
265
+ }
266
+ }
267
+
268
+ if (this.selectdata.f_apply_nature === '散户' && this.selectdata.defname === '现场勘察') {
269
+ for (const item of this.selectdata.fields) {
270
+ if (item.label.includes('安装户数')) {
271
+ item.readonly = true
272
+ }
273
+ }
274
+ }
275
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
276
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
277
+ this.show_data = temp
278
+ if ((this.selectdata.f_apply_type =='非民用报建' || this.selectdata.f_apply_type =='民用报建' || this.selectdata.f_apply_type =='设备变更')&&this.selectdata.defname === '报装缴费'){
279
+ let num = Number(this.$appdata.getSingleValue('税率'))
280
+ let f_due_money =Number(this.selectdata.f_due_money)
281
+ let tem = ( f_due_money - (f_due_money/(1+num)).toFixed(2)).toFixed(2)
282
+ this.show_data.f_budget_money = tem
283
+ this.setLabelValue('税额',tem)
284
+ }
285
+ if ((this.selectdata.f_apply_type =='非民用报建' || this.selectdata.f_apply_type =='民用报建' || this.selectdata.f_apply_type =='设备变更')&&this.selectdata.defname === '收费标准'){
286
+ let str = '项目名称:天然气安装工程;项目地址:'+ this.show_data.f_address
287
+ this.show_data.f_paper_remarks = str
288
+ this.setLabelValue('发票备注',str)
289
+ }
290
+ if (this.show_data.f_apply_type === '改线业务' && this.show_data.defname === '报建受理'){
291
+ let str = '项目名称:天然气整改工程;项目地址:'+ this.show_data.f_address
292
+ this.show_data.f_paper_remarks = str
293
+ this.setLabelValue('发票备注',str)
294
+ }
295
+ this.$nextTick(() => {
296
+ this.showview = true
297
+ })
298
+
299
+ },
300
+ // 金额转大写
301
+ smalltoBIG(n) {
302
+ let fraction = ['角', '分'];
303
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
304
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
305
+ let head = n < 0 ? '欠' : '';
306
+ n = Math.abs(n);
307
+
308
+ let s = '';
309
+
310
+ for (var i = 0; i < fraction.length; i++) {
311
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
312
+ }
313
+ s = s || '整';
314
+ n = Math.floor(n);
315
+
316
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
317
+ let p = '';
318
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
319
+ p = digit[n % 10] + unit[1][j] + p;
320
+ n = Math.floor(n / 10);
321
+ }
322
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
323
+ }
324
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
325
+ },
326
+ getLableValue(label) {
327
+ for (const item of this.show_data.fields) {
328
+ if (item.label === label && item.type !== 'number') {
329
+ return item.value || ''
330
+ }
331
+ if (item.label === label && item.type === 'number') {
332
+ return item.value || 0
333
+ }
334
+ }
335
+ },
336
+ getLableOptions(label) {
337
+ for (const item of this.show_data.fields) {
338
+ if (item.label === label) {
339
+ return item.options
340
+ }
341
+ }
342
+ },
343
+ setLabelValue(label, value) {
344
+ for (const item of this.show_data.fields) {
345
+ if (item.label === label) {
346
+ item.value = value
347
+ this.show_data[item.field] = value
348
+ }
349
+ }
350
+ },
351
+ setLabelOptions(label, options) {
352
+ for (const item of this.show_data.fields) {
353
+ if (item.label === label) {
354
+ item.options = options
355
+ }
356
+ }
357
+ },
358
+ showLabels(...labels) {
359
+ for (const item of this.show_data.fields) {
360
+ if (labels.includes(item.label)) {
361
+ item.hidden = false
362
+ }
363
+ }
364
+ },
365
+ hideLabels(...labels) {
366
+ for (const item of this.show_data.fields) {
367
+ if (labels.includes(item.label)) {
368
+ item.hidden = true
369
+ }
370
+ }
371
+ },
372
+ showButtons(...buttons) {
373
+ for (const item of this.show_data.buttons) {
374
+ if (buttons.includes(item.button_name)) {
375
+ item.hidden = false
376
+ }
377
+ }
378
+ },
379
+ hideButtons(...buttons) {
380
+ for (const item of this.show_data.buttons) {
381
+ if (buttons.includes(item.button_name)) {
382
+ item.hidden = true
383
+ }
384
+ }
385
+ },
386
+ requiredLabels(...labels) {
387
+ for (const item of this.show_data.fields) {
388
+ if (labels.includes(item.label)) {
389
+ item.required = true
390
+ }
391
+ }
392
+ },
393
+ electiveLabels(...labels) {
394
+ for (const item of this.show_data.fields) {
395
+ if (labels.includes(item.label)) {
396
+ item.required = false
397
+ }
398
+ }
399
+ },
400
+ readonlyLabels(...labels) {
401
+ for (const item of this.show_data.fields) {
402
+ if (labels.includes(item.label)) {
403
+ item.readonly = true
404
+ item.disabled = true
405
+ }
406
+ }
407
+ },
408
+ readwriteLabels(...labels) {
409
+ for (const item of this.show_data.fields) {
410
+ if (labels.includes(item.label)) {
411
+ item.readonly = false
412
+ item.disabled = false
413
+ }
414
+ }
415
+ },
416
+ disabledButtons(...buttons) {
417
+ for (const item of this.show_data.buttons) {
418
+ if (buttons.includes(item.button_name)) {
419
+ item.disabled = true
420
+ }
421
+ }
422
+ },
423
+ enableButtons(...buttons) {
424
+ for (const item of this.show_data.buttons) {
425
+ if (buttons.includes(item.button_name)) {
426
+ item.disabled = false
427
+ }
428
+ }
429
+ },
430
+ showComponents(...titles) {
431
+ for (const item of this.show_data.components) {
432
+ if (titles.includes(item.title) && item.device === 'pc') {
433
+ item.hidden = false
434
+ }
435
+ }
436
+ },
437
+ hideComponents(...titles) {
438
+ for (const item of this.show_data.components) {
439
+ if (titles.includes(item.title) && item.device === 'pc') {
440
+ item.hidden = true
441
+ }
442
+ }
443
+ },
444
+ async checkDuplicate(index) {
445
+ let http = new HttpResetClass()
446
+ let data = {
447
+ tablename: 't_apply',
448
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
449
+ }
450
+ let res = await http.load('POST', 'rs/sql/applySingleTable', {data: data}, {
451
+ resolveMsg: null,
452
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
453
+ })
454
+ if (res.data.length > 0) {
455
+ this.show_data.fields[index].value = null
456
+ this.$showMessage(`${this.show_data.fields[index].label}已存在!!!`)
457
+ }
458
+ },
459
+ // 获取片区
460
+ async getSliceArea () {
461
+ let data = {
462
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
463
+ userid: this.$login.f.id
464
+ }
465
+
466
+ let http = new HttpResetClass()
467
+ let res = await http.load(
468
+ 'POST',
469
+ `rs/search`,
470
+ {data: data},
471
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
472
+ )
473
+
474
+ return res.data.map(item => {
475
+ return {
476
+ label: item.name,
477
+ value: item.name
478
+ }
479
+ })
480
+ },
481
+ // 获取区县
482
+ async getPcd () {
483
+ let data = {
484
+ tablename: 't_pcd',
485
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
486
+ }
487
+ let http = new HttpResetClass()
488
+ let res = await http.load(
489
+ 'POST',
490
+ `rs/sql/applySingleTable`,
491
+ {data: data},
492
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
493
+ )
494
+
495
+ return res.data.map(item => {
496
+ return {
497
+ label: item.f_pcd,
498
+ value: item.f_pcd
499
+ }
500
+ })
501
+ },
502
+ // 缴费前置
503
+ chargeBefore () {
504
+ if ((this.show_data.f_apply_type === '民用报建' && this.show_data.f_apply_nature === '小区') || this.show_data.f_apply_type === '非民用报建') {
505
+ return
506
+ }
507
+ if (this.show_data.f_house_type === '旧报建导入'){
508
+ return
509
+ }
510
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
511
+ this.$showMessage('费用未结清!!!')
512
+ throw null
513
+ }
514
+ },
515
+ // 缴费流程退回前置
516
+ async backBefore() {
517
+ let data = {
518
+ tablename: 't_apply',
519
+ condition: `f_process_id = '${this.selectdata.f_process_id}'`
520
+ }
521
+ let http = new HttpResetClass()
522
+ let res = await http.load(
523
+ 'POST',
524
+ `rs/sql/applySingleTable`,
525
+ {data: data},
526
+ {resolveMsg: null, rejectMsg: null}
527
+ )
528
+ if (res.data.length > 0 && res.data[0].f_surplus_money !== res.data[0].f_due_money) {
529
+ this.$showMessage('用户已缴费,无法退回!!!')
530
+ }
531
+ },
532
+ // 获取设计人员
533
+ async getDesignerPeople () {
534
+ let data = {
535
+ source: 'this.getParentByType($organization$).getChildByName($设计人员$).getChildren()',
536
+ userid: this.$login.f.id
537
+ }
538
+
539
+ let http = new HttpResetClass()
540
+ let res = await http.load(
541
+ 'POST',
542
+ 'rs/search',
543
+ {data: data},
544
+ {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
545
+ )
546
+ return res.data.map(item => {
547
+ return {
548
+ label: item.name,
549
+ value: item.name
550
+ }
551
+ })
552
+ },
553
+ //现场勘察
554
+ async prospectingBefore() {
555
+ let data = {
556
+ tablename: 't_files',
557
+ condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '现场勘察' and fremarks = '报装手机签字文件'`
558
+ }
559
+ let http = new HttpResetClass()
560
+ let res = await http.load(
561
+ 'POST',
562
+ `rs/sql/applySingleTable`,
563
+ {data: data},
564
+ {resolveMsg: null, rejectMsg: null}
565
+ )
566
+ if (res.data.length <= 0) {
567
+ this.$showMessage('现场勘察未签字,无法提交!!!')
568
+ throw '现场勘察未签字,无法提交!'
569
+ }
570
+ },
571
+ //报建受理下发,对基本信息进行校验
572
+ checkSpaces(){
573
+ let name=this.getLableValue('用户名称')
574
+ //如果用户名称中包含空格,提示用户名称中不能包含空格
575
+ if(name.indexOf(' ')>=0){
576
+ this.$showMessage('用户名称中不能包含空格!!!')
577
+ throw '用户名称中不能包含空格!!!'
578
+ }
579
+ let Contact= this.getLableValue('联系人')
580
+ if(Contact.indexOf(' ')>=0){
581
+ this.$showMessage('联系人中不能包含空格!!!')
582
+ throw '联系人中不能包含空格!!!'
583
+ }
584
+ let phone= this.getLableValue('用户电话')
585
+ if(phone.indexOf(' ')>=0){
586
+ this.$showMessage('用户电话中不能包含空格!!!')
587
+ throw '用户电话中不能包含空格!!!'
588
+ }
589
+ let ifnumber= this.getLableValue('证件号码')
590
+ if(ifnumber.indexOf(' ')>=0){
591
+ this.$showMessage('证件号码中不能包含空格!!!')
592
+ throw '证件号码中不能包含空格!!!'
593
+ }
594
+ },
595
+ //合同签订提交
596
+ async contractSigningBefore() {
597
+ let http = new HttpResetClass()
598
+ let data = {
599
+ tablename: 't_contract',
600
+ condition: `f_process_id = '${this.selectdata.f_process_id}' and f_sign_state <> '签订完成'`
601
+ }
602
+ let res = await http.load(
603
+ 'POST',
604
+ `rs/sql/applySingleTable`,
605
+ {data: data},
606
+ {resolveMsg: null, rejectMsg: null}
607
+ )
608
+ if(res.data.length<=0){
609
+ let data = {
610
+ tablename: 't_files',
611
+ condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fusetype = '纸质合同'`
612
+ }
613
+ let res = await http.load(
614
+ 'POST',
615
+ `rs/sql/applySingleTable`,
616
+ {data: data},
617
+ {resolveMsg: null, rejectMsg: null}
618
+ )
619
+ if (res.data.length <= 0) {
620
+ this.$showMessage('纸质合同未上传,无法提交!')
621
+ throw '纸质合同未上传,无法提交!'
622
+ }
623
+ }
624
+ if (res.data.length > 0) {
625
+ let data = {
626
+ tablename: 't_files',
627
+ condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fusetype = '纸质合同'`
628
+ }
629
+ let res = await http.load(
630
+ 'POST',
631
+ `rs/sql/applySingleTable`,
632
+ {data: data},
633
+ {resolveMsg: null, rejectMsg: null}
634
+ )
635
+ if (res.data.length <= 0) {
636
+ this.$showMessage('合同未签订完成且纸质合同未上传,无法提交!!!')
637
+ throw '合同未签订完成且纸质合同未上传,无法提交!!!'
638
+ }
639
+ }
640
+ },
641
+ async otherAuthentication() {
642
+ console.log("当前数据", this.selectdata)
643
+ this.$showMessage(`请确认是否进行重新认证,确认前请保证身份信息正确!!!`, ['confirm']).then(async (res) => {
644
+ if (res === 'confirm') {
645
+ let http = new HttpResetClass()
646
+ let data = {
647
+ apply: this.selectdata
648
+ }
649
+ let result = await http.load(
650
+ 'POST',
651
+ 'rs/logic/anotherLegalize',
652
+ {data: data},
653
+ {
654
+ resolveMsg: '重新发起实名认证成功!',
655
+ rejectMsg: '重新发起实名认证失败!'
656
+ }).then((res)=>{
657
+ if(res.data === 200){
658
+ this.$dispatch('loadPage')
659
+ }
660
+ })
661
+ }
662
+ })
663
+ throw '重新发起实名认证!!!'
664
+ },
665
+ async otherSigned() {
666
+ console.log("当前数据", this.selectdata)
667
+ this.$showMessage(`请确认是否进行重新发送签署短信!!!`, ['confirm']).then(async (res) => {
668
+ if (res === 'confirm') {
669
+ let http = new HttpResetClass()
670
+ let data = {
671
+ apply: this.selectdata
672
+ }
673
+ let result = await http.load(
674
+ 'POST',
675
+ 'rs/logic/anotherMAS',
676
+ {data: data},
677
+ {
678
+ resolveMsg: '重新发送签署短信成功!',
679
+ rejectMsg: '重新发送签署短信失败!'
680
+ }).then((res)=>{
681
+ if(res.data === 200){
682
+ this.$dispatch('loadPage')
683
+ }
684
+ })
685
+ }
686
+ })
687
+ throw '重新发送签署短信!!!'
688
+ },
689
+ // 施工前置
690
+ async constructionBefore () {
691
+ await this.userSignBefore()
692
+ if (this.show_data.f_apply_nature !== '分户挂表') {
693
+ let http = new HttpResetClass()
694
+ let data = {
695
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and f_meternumber is null and f_gasbrand_id is not null `
696
+ }
697
+ let res = await http.load(
698
+ 'POST',
699
+ 'rs/sql/countApplyUserinfo',
700
+ {data: data},
701
+ {
702
+ resolveMsg: null,
703
+ rejectMsg: '安装明细查询失败!!!'
704
+ })
705
+ if (res.data[0].num > 0) {
706
+ this.$showMessage(`还有${res.data[0].num}户未安装,无法提交`)
707
+ throw `还有${res.data[0].num}户未安装,无法提交`
708
+ }
709
+ }
710
+ },
711
+ async userSignBefore() {
712
+ let http = new HttpResetClass()
713
+ let data = {
714
+ tablename: 't_files',
715
+ condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fremarks = '报装手机签字文件'`
716
+ }
717
+ let res = await http.load(
718
+ 'POST',
719
+ `rs/sql/applySingleTable`,
720
+ {data: data},
721
+ {resolveMsg: null, rejectMsg: null}
722
+ )
723
+ if (res.data.length <= 0) {
724
+ this.$showMessage('用户未签字,无法提交!!!')
725
+ throw '用户未签字,无法提交!'
726
+ }
727
+ },
728
+ addressInitialization () {
729
+ this.$getConfig(this, 'UserAddress')
730
+
731
+ let f_address_type = this.show_data.f_address_type
732
+
733
+ for (const item of this.show_data.fields) {
734
+ if (f_address_type === '民用市区') {
735
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
736
+ item.hidden = false
737
+ item.required = true
738
+ }
739
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
740
+ item.hidden = false
741
+ item.required = false
742
+ }
743
+ if (item.label === '地址') {
744
+ item.readonly = true
745
+ }
746
+ }
747
+ if (f_address_type === '民用乡镇') {
748
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
749
+ item.hidden = false
750
+ item.required = true
751
+ }
752
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
753
+ item.hidden = false
754
+ item.required = false
755
+ }
756
+ if (item.label === '楼层') {
757
+ item.hidden = true
758
+ item.required = false
759
+ }
760
+ if (item.label === '地址') {
761
+ item.readonly = true
762
+ }
763
+ }
764
+ if (f_address_type === '特殊地址') {
765
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
766
+ item.hidden = false
767
+ item.required = true
768
+ }
769
+ if (item.label === '集收单位') {
770
+ item.hidden = false
771
+ item.required = false
772
+ }
773
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
774
+ item.hidden = true
775
+ item.required = false
776
+ }
777
+ if (item.label === '地址') {
778
+ item.readonly = false
779
+ }
780
+ }
781
+
782
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
783
+ item.hidden = true
784
+ }
785
+ }
786
+ },
787
+ async streetChange () {
788
+ if (isEmpty(this.show_data.f_street)) {
789
+ return
790
+ }
791
+
792
+ let data = {
793
+ tablename: 't_area',
794
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
795
+ }
796
+ let http = new HttpResetClass()
797
+ let res = await http.load(
798
+ 'POST',
799
+ `rs/sql/applySingleTable`,
800
+ {data: data},
801
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
802
+ )
803
+
804
+ this.setLabelOptions('集收单位', res.data.map(item => {
805
+ return {
806
+ label: item.f_residential_area,
807
+ value: item.f_residential_area
808
+ }
809
+ }))
810
+ },
811
+ async pcdChange () {
812
+ if (isEmpty(this.show_data.f_pcd)) {
813
+ return
814
+ }
815
+
816
+ let data = {
817
+ tablename: 't_street',
818
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
819
+ }
820
+ let f_address_type = this.getLableValue('地址类型')
821
+
822
+ if (f_address_type === '民用市区') {
823
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
824
+ }
825
+ if (f_address_type === '民用乡镇') {
826
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
827
+ }
828
+
829
+ let http = new HttpResetClass()
830
+ let res = await http.load(
831
+ 'POST',
832
+ `rs/sql/applySingleTable`,
833
+ {data: data},
834
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
835
+ )
836
+
837
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
838
+ return {
839
+ label: item.f_street,
840
+ value: item.f_street
841
+ }
842
+ }))
843
+ },
844
+ //查询现场负责人
845
+ async getConstructionWorker(){
846
+ let data = {
847
+ source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
848
+ userid: this.$login.f.id
849
+ }
850
+ let http = new HttpResetClass()
851
+ let res = await http.load(
852
+ 'POST',
853
+ `rs/search`,
854
+ {data: data},
855
+ {resolveMsg: null, rejectMsg: '现场负责人查询失败!!!'}
856
+ )
857
+ return res.data.map(item => {
858
+ return {
859
+ label: item.name,
860
+ value: item.id
861
+ }
862
+ })
863
+ },
864
+ //获取下发人(当前操作人所属部门下的所有人)
865
+ getSource () {
866
+ return 'this.getParentByType($organization$).getChildByName($'+ this.$login.f.f_department_name + '$).getChildren()'
867
+ },
868
+ async getUserName() {
869
+ if(this.selectdata.f_construction_unit_id){
870
+ let data = {
871
+ tablename: 't_user',
872
+ condition: `id='${this.selectdata.f_construction_unit_id}'`
873
+ }
874
+ let http = new HttpResetClass()
875
+ let res = await http.load(
876
+ 'POST',
877
+ `rs/sql/applySingleTable`,
878
+ {data: data},
879
+ {resolveMsg: null, rejectMsg: null}
880
+ )
881
+ return res.data.map(item => {
882
+ return {
883
+ label: item.name,
884
+ value: item.id
885
+ }
886
+ })
887
+ }
888
+ return
889
+ },
890
+ // 安装单位签字人
891
+ async getConstructionUnitId () {
892
+ let data = {
893
+ source: '',
894
+ userid: this.$login.f.id
895
+ }
896
+ data.source = 'this.getParentByType($organization$).getChildByName($'+ this.$login.f.f_department_name + '$).getChildren()'
897
+ let http = new HttpResetClass()
898
+ let res = await http.load(
899
+ 'POST',
900
+ `rs/search`,
901
+ {data: data},
902
+ {resolveMsg: null, rejectMsg: '安装单位施工班组查询失败!!!'}
903
+ )
904
+ return res.data.map(item => {
905
+ return {
906
+ label: item.name,
907
+ value: item.id
908
+ }
909
+ })
910
+ },
911
+ // 安装单位负责人
912
+ async getConstructionUnit () {
913
+ let data = {
914
+ source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
915
+ userid: this.$login.f.id
916
+ }
917
+ let http = new HttpResetClass()
918
+ let res = await http.load(
919
+ 'POST',
920
+ `rs/search`,
921
+ {data: data},
922
+ {resolveMsg: null, rejectMsg: '安装单位负责人查询失败!!!'}
923
+ )
924
+ console.log("显示返回值",res)
925
+ let constructionUnit = res.data.map(item => {
926
+ return {
927
+ label: item.name,
928
+ value: item.id
929
+ }
930
+ })
931
+ constructionUnit = constructionUnit.sort((a,b) => a.value - b.value)
932
+ console.log("显示返回值1",constructionUnit)
933
+ return constructionUnit
934
+ },
935
+ // 管线施工单位
936
+ async getGuanXianBuildUnit () {
937
+ let data = {
938
+ source: 'this.getParentByType($organization$).getChildByName($工程施工队$).getChildren()',
939
+ userid: this.$login.f.id
940
+ }
941
+ let http = new HttpResetClass()
942
+ let res = await http.load(
943
+ 'POST',
944
+ `rs/search`,
945
+ {data: data},
946
+ {resolveMsg: null, rejectMsg: '安装单位负责人查询失败!!!'}
947
+ )
948
+ return res.data.map(item => {
949
+ return {
950
+ label: item.name,
951
+ value: item.name
952
+ }
953
+ })
954
+ },
955
+ // 建设单位
956
+ async getConstructOperator () {
957
+ let data = {
958
+ source: 'this.getParentByType($organization$).getChildByName($建设单位$).getChildren()',
959
+ userid: this.$login.f.id
960
+ }
961
+ let http = new HttpResetClass()
962
+ let res = await http.load(
963
+ 'POST',
964
+ `rs/search`,
965
+ {data: data},
966
+ {resolveMsg: null, rejectMsg: '建设单位人员查询失败!!!'}
967
+ )
968
+ return res.data.map(item => {
969
+ return {
970
+ label: item.name,
971
+ value: item.id
972
+ }
973
+ })
974
+ },
975
+ // 监理单位
976
+ async getSupervisorOperator () {
977
+ let data = {
978
+ source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
979
+ userid: this.$login.f.id
980
+ }
981
+ let http = new HttpResetClass()
982
+ let res = await http.load(
983
+ 'POST',
984
+ `rs/search`,
985
+ {data: data},
986
+ {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
987
+ )
988
+ for (const item of this.selectdata.fields) {
989
+ if (item.label === '监理单位') {
990
+ item.value = res.data[0].id
991
+ this.selectdata[item.field] = res.data[0].id
992
+ }
993
+ }
994
+ return res.data.map(item => {
995
+ return {
996
+ label: item.name,
997
+ value: item.id
998
+ }
999
+ })
1000
+ },
1001
+ // 管线监理单位
1002
+ async getSupervisorName () {
1003
+ let data = {
1004
+ source: 'this.getParentByType($organization$).getChildByName($监理单位$).getChildren()',
1005
+ userid: this.$login.f.id
1006
+ }
1007
+ let http = new HttpResetClass()
1008
+ let res = await http.load(
1009
+ 'POST',
1010
+ `rs/search`,
1011
+ {data: data},
1012
+ {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
1013
+ )
1014
+ return res.data.map(item => {
1015
+ return {
1016
+ label: item.name,
1017
+ value: item.name
1018
+ }
1019
+ })
1020
+ },
1021
+
1022
+ // 监理现场负责人
1023
+ async getSupervisorOperatorId () {
1024
+ let data = {
1025
+ source: 'this.getParentByType($organization$).getChildByName($监理班组$).getChildren()',
1026
+ userid: this.$login.f.id
1027
+ }
1028
+ let http = new HttpResetClass()
1029
+ let res = await http.load(
1030
+ 'POST',
1031
+ `rs/search`,
1032
+ {data: data},
1033
+ {resolveMsg: null, rejectMsg: '监理单位人员查询失败!!!'}
1034
+ )
1035
+ return res.data.map(item => {
1036
+ return {
1037
+ label: item.name,
1038
+ value: item.id
1039
+ }
1040
+ })
1041
+ },
1042
+ // 土建单位
1043
+ async getEngineeringOperator () {
1044
+ let data = {
1045
+ source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
1046
+ userid: this.$login.f.id
1047
+ }
1048
+ let http = new HttpResetClass()
1049
+ let res = await http.load(
1050
+ 'POST',
1051
+ `rs/search`,
1052
+ {data: data},
1053
+ {resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
1054
+ )
1055
+ let result = res.data.map(item => {
1056
+ return {
1057
+ label: item.name,
1058
+ value: item.id
1059
+ }
1060
+ })
1061
+ result.push({label:'用户自理',value:'用户自理'})
1062
+ result.push({label:'无',value:'无'})
1063
+ return result
1064
+ },
1065
+ // 管线土建单位
1066
+ async getEngineeringName () {
1067
+ let data = {
1068
+ source: 'this.getParentByType($organization$).getChildByName($土建单位$).getChildren()',
1069
+ userid: this.$login.f.id
1070
+ }
1071
+ let http = new HttpResetClass()
1072
+ let res = await http.load(
1073
+ 'POST',
1074
+ `rs/search`,
1075
+ {data: data},
1076
+ {resolveMsg: null, rejectMsg: '土建单位人员查询失败!!!'}
1077
+ )
1078
+ let result = res.data.map(item => {
1079
+ return {
1080
+ label: item.name,
1081
+ value: item.name
1082
+ }
1083
+ })
1084
+ result.push({label:'用户自理',value:'用户自理'})
1085
+ result.push({label:'无',value:'无'})
1086
+ return result
1087
+ },
1088
+ // 检测单位
1089
+ async getCheckOperator () {
1090
+ let data = {
1091
+ source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
1092
+ userid: this.$login.f.id
1093
+ }
1094
+ let http = new HttpResetClass()
1095
+ let res = await http.load(
1096
+ 'POST',
1097
+ `rs/search`,
1098
+ {data: data},
1099
+ {resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
1100
+ )
1101
+
1102
+ let result = res.data.map(item => {
1103
+ return {
1104
+ label: item.name,
1105
+ value: item.id
1106
+ }
1107
+ })
1108
+ result.push({label:'无',value:'无'})
1109
+ return result
1110
+ },
1111
+ // 管线检测单位
1112
+ async getCheckName () {
1113
+ let data = {
1114
+ source: 'this.getParentByType($organization$).getChildByName($检测单位$).getChildren()',
1115
+ userid: this.$login.f.id
1116
+ }
1117
+ let http = new HttpResetClass()
1118
+ let res = await http.load(
1119
+ 'POST',
1120
+ `rs/search`,
1121
+ {data: data},
1122
+ {resolveMsg: null, rejectMsg: '检测单位人员查询失败!!!'}
1123
+ )
1124
+
1125
+ let result = res.data.map(item => {
1126
+ return {
1127
+ label: item.name,
1128
+ value: item.name
1129
+ }
1130
+ })
1131
+ result.push({label:'无',value:'无'})
1132
+ return result
1133
+ },
1134
+ // 获取气表品牌
1135
+ async getMeterBrand () {
1136
+ let data = {
1137
+ }
1138
+
1139
+ let http = new HttpResetClass()
1140
+ let res = await http.load(
1141
+ 'POST',
1142
+ `rs/sql/getMeterBrand`,
1143
+ {data: data},
1144
+ {resolveMsg: null, rejectMsg: '气表品牌查询失败!!!'}
1145
+ )
1146
+
1147
+ return res.data
1148
+ },
1149
+ async stopApply () {
1150
+ console.log('终止报建!!!!!')
1151
+ if (this.show_data.defname === '报建受理') {
1152
+ this.show_data.f_stop_reason = this.show_data.f_accept_result
1153
+ }
1154
+ if (this.show_data.defname === '现场勘察') {
1155
+ this.show_data.f_stop_reason = this.show_data.f_prospecting_result
1156
+ }
1157
+
1158
+ let data = {
1159
+ apply: this.show_data,
1160
+ user: this.$login.f
1161
+ }
1162
+
1163
+ let res = await this.$resetpost(
1164
+ `rs/logic/stopApply`,
1165
+ {data: data},
1166
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
1167
+ )
1168
+
1169
+ this.$dispatch('loadPage')
1170
+
1171
+ throw '终止报建!!!'
1172
+ },
1173
+ // 获取小区
1174
+ async getResidentialArea () {
1175
+ let data = {
1176
+ tablename: 't_area_address',
1177
+ condition: `f_filiale like '%${"榆林."+this.$login.f.orgs}%' and f_area_status = '启用'`
1178
+ }
1179
+ let http = new HttpResetClass()
1180
+ let res = await http.load(
1181
+ 'POST',
1182
+ `rs/sql/applySingleTable`,
1183
+ {data: data},
1184
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
1185
+ )
1186
+ return res.data.map(item => {
1187
+ return {
1188
+ label: item.f_residential_area,
1189
+ value: item.id
1190
+ }
1191
+ })
1192
+ },
1193
+ //获取燃气公司内部签署人
1194
+ async getContractSignatory () {
1195
+ let data = {
1196
+ condition: `asj.f_type = '内部' and asj.f_subject_type = '企业' and asj.f_state = '有效' and asj.f_auth_state = '审核通过' and asg.f_state = '有效' and asg.f_sign_state = '签章成功'`
1197
+ }
1198
+ let http = new HttpResetClass()
1199
+ let res = await http.load(
1200
+ 'POST',
1201
+ `rs/sql/getAuthSubjectList`,
1202
+ {data: data},
1203
+ {resolveMsg: null, rejectMsg: '签署人查询失败!!!'}
1204
+ )
1205
+ return res.data.map(item => {
1206
+ return {
1207
+ label: item.f_subject_name,
1208
+ value: `${item.id}`
1209
+ }
1210
+ })
1211
+ },
1212
+ async setContractSignatory () {
1213
+ let data = {
1214
+ condition: `asj.f_type = '内部' and asj.f_subject_type = '企业' and asj.f_state = '有效' and asj.f_auth_state = '审核通过' and asg.f_state = '有效' and asg.f_sign_state = '签章成功'`
1215
+ }
1216
+ let http = new HttpResetClass()
1217
+ let res = await http.load(
1218
+ 'POST',
1219
+ `rs/sql/getAuthSubjectList`,
1220
+ {data: data},
1221
+ {resolveMsg: null, rejectMsg: '签署人查询失败!!!'}
1222
+ )
1223
+ this.setLabelOptions('签署人',res.data.map(item => {
1224
+ return {
1225
+ label: item.f_subject_name,
1226
+ value: `${item.id}`
1227
+ }
1228
+ }))
1229
+ this.setLabelValue('签署人',res.data[0].id)
1230
+ },
1231
+ // 地址拼接
1232
+ addressSplicing () {
1233
+ let f_area = this.getLableValue('区/县') ? this.getLableValue('区/县') + '-' : ''
1234
+ let f_slice_area = this.getLableValue('片区') ? this.getLableValue('片区') + '-' : ''
1235
+ let f_street = this.getLableValue('街道') || ''
1236
+ let f_address_detail = this.getLableValue('详细地址') || ''
1237
+
1238
+ let f_address = f_area + f_slice_area + f_street + f_address_detail
1239
+ this.setLabelValue("地址", f_address)
1240
+ },
1241
+ // 小区地址拼接
1242
+ areaAddressSplicing () {
1243
+ let f_area = this.area.f_area || ''
1244
+ let f_slice_area = this.area.f_slice_area || ''
1245
+ let f_street = this.area.f_street || ''
1246
+ let f_residential_area = this.area.f_residential_area || ''
1247
+
1248
+ let f_address = f_area + f_slice_area + f_street + f_residential_area
1249
+ this.setLabelValue("地址", f_address)
1250
+ },
1251
+ //分户挂表生成安检单
1252
+ async getChecklist() {
1253
+ let http = new HttpResetClass()
1254
+ let data = {
1255
+ f_process_id: this.selectdata.f_process_id,
1256
+ f_userinfo_id: this.selectdata.f_userinfo_id,
1257
+ user: this.$login.f.user
1258
+ }
1259
+ let res = await http.load(
1260
+ 'POST',
1261
+ `rs/logic/getChecklist`,
1262
+ {data: data},
1263
+ {resolveMsg: null, rejectMsg: null}
1264
+ )
1265
+ },
1266
+ // 生成合同编号(已作废)
1267
+ async getContractNumber() {
1268
+ const nowDate = new Date()
1269
+ let year = nowDate.getFullYear()
1270
+ let nature = ''
1271
+ if (this.show_data.f_apply_type === '民用报建') {
1272
+ nature = 'J'
1273
+ } else if (this.show_data.f_apply_type === '非民用报建') {
1274
+ nature = 'F'
1275
+ }
1276
+ let shiGong = 'S'
1277
+ let gongQi = 'G'
1278
+
1279
+ let lastyYear = year - 1
1280
+ let http = new HttpResetClass()
1281
+ let data = {
1282
+ user: this.$login.f.user,
1283
+ startDate: year + '-01-01 00:00:00',
1284
+ endDate: year + '-12-31 23:59:59'
1285
+ }
1286
+ let res = await http.load(
1287
+ 'POST',
1288
+ `rs/sql/getContractCount`,
1289
+ {data: data},
1290
+ {resolveMsg: null, rejectMsg: null}
1291
+ )
1292
+ let count = res.data[0].count + 1
1293
+
1294
+
1295
+ let shiGongContractNumber = year + nature + shiGong + '-' + count
1296
+ let gongQiContractNumber = year + nature + gongQi + '-' + count
1297
+ if (!this.getLableValue('委托合同编号')){
1298
+ this.setLabelValue('委托合同编号',shiGongContractNumber)
1299
+ this.setLabelValue('供气合同编号',gongQiContractNumber)
1300
+ }
1301
+ },
1302
+ //获取气价列表
1303
+ async getPrice (index) {
1304
+ if (isEmpty(this.show_data.f_gas_nature) || isEmpty(this.show_data.f_price_type)) {
1305
+ return
1306
+ }
1307
+
1308
+ if (index) {
1309
+ this.setLabelValue('气价名称', null)
1310
+ }
1311
+
1312
+ if (this.show_data.f_price_type === '混合气价') {
1313
+ this.showLabels('比率')
1314
+ } else {
1315
+ this.setLabelValue('比率', null)
1316
+ this.hideLabels('比率')
1317
+ }
1318
+
1319
+ let data = {
1320
+ condition: `sp.f_filiale like '%${"榆林."+this.$login.f.orgs}%' and sp.f_price_type = '${this.show_data.f_price_type}' and f_gasproperties = '${this.show_data.f_gas_nature}'`
1321
+ }
1322
+
1323
+ if (this.show_data.f_apply_type === '民用报建') {
1324
+ data.condition += `and f_user_type = '民用'`
1325
+ }
1326
+ if (this.show_data.f_apply_type === '非民用报建') {
1327
+ data.condition += `and f_user_type = '非民用'`
1328
+ }
1329
+
1330
+
1331
+ let http = new HttpResetClass()
1332
+ let res = await http.load(
1333
+ 'POST',
1334
+ `rs/sql/applyGetPrice`,
1335
+ {data: data},
1336
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1337
+ )
1338
+ let priceLoptions = res.data.map(item => {
1339
+ return {
1340
+ label: item.f_price_name,
1341
+ value: `${item.id}`
1342
+ }
1343
+ })
1344
+ this.setLabelOptions('气价名称', priceLoptions)
1345
+ },
1346
+ // 单价失去焦点
1347
+ async priceChange () {
1348
+ if (isEmpty(this.show_data.f_price)) {
1349
+ return
1350
+ }
1351
+ let data = {
1352
+ operator: '*',
1353
+ num1: this.show_data.f_price,
1354
+ num2: this.show_data.f_install_count
1355
+ }
1356
+ let http = new HttpResetClass()
1357
+ let res = await http.load(
1358
+ 'POST',
1359
+ `rs/logic/compute`,
1360
+ {data: data},
1361
+ {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
1362
+ )
1363
+
1364
+ this.setLabelValue('工程材料费', res.data)
1365
+ },
1366
+ //工商户验证表具类型是否需选择
1367
+ async meterBrandCheck() {
1368
+ let data = {
1369
+ f_process_id: this.show_data.f_process_id,
1370
+ orgid:this.$login.f.orgid
1371
+ }
1372
+ let http = new HttpResetClass()
1373
+ let res = await http.load(
1374
+ 'POST',
1375
+ `rs/sql/meterCheck`,
1376
+ {data: data},
1377
+ {resolveMsg: null, rejectMsg: null}
1378
+ )
1379
+ if (res.data[0].num > 0){
1380
+ this.$showMessage(`还有${res.data[0].num}处未选择表具,请选择后提交!`)
1381
+ throw null
1382
+ }
1383
+ },
1384
+ // 安装户数
1385
+ async installCountCheck() {
1386
+ let data = {
1387
+ tablename: 't_userinfo',
1388
+ condition: `f_process_id = '${this.show_data.f_process_id}' and f_user_state != '销户'`,
1389
+ }
1390
+
1391
+ let http = new HttpResetClass()
1392
+ let res = await http.load(
1393
+ 'POST',
1394
+ `rs/sql/applySingleTable`,
1395
+ {data: data},
1396
+ {resolveMsg: null, rejectMsg: '用户数量查询失败'}
1397
+ )
1398
+ this.setLabelValue('安装户数',res.data.length)
1399
+ },
1400
+ // 户内出单日期
1401
+ getOutdoorsTime () {
1402
+ for (const item of this.selectdata.fields) {
1403
+ console.log('是否进入')
1404
+ if (item.label === '户内出单日期') {
1405
+ item.value = this.selectdata.f_release_date
1406
+ this.selectdata[item.field] = item.value
1407
+ console.log('当前出单时间',item.value)
1408
+ }else if(item.label === '庭院出单日期'){
1409
+ item.value = this.selectdata.f_release_date
1410
+ this.selectdata[item.field] = item.value
1411
+ }else if(item.label === '出单日期'){
1412
+ item.value = this.selectdata.f_release_date
1413
+ this.selectdata[item.field] = item.value
1414
+ }
1415
+ }
1416
+ },
1417
+ //获取缴费日期
1418
+ async getChargeDate() {
1419
+ let data = {
1420
+ tablename: 'activityins',
1421
+ condition: `processid = '${this.selectdata.f_process_id}' and defname = '报装缴费'`,
1422
+ }
1423
+
1424
+ let http = new HttpResetClass()
1425
+ let res = await http.load(
1426
+ 'POST',
1427
+ `rs/sql/applySingleTable`,
1428
+ {data: data},
1429
+ {resolveMsg: null, rejectMsg: null}
1430
+ )
1431
+ if (res.data[0]) {
1432
+ for (const item of this.selectdata.fields) {
1433
+ if (item.label === '缴费日期') {
1434
+ item.value = res.data[0].finishtime
1435
+ this.selectdata[item.field] = item.value
1436
+ }
1437
+ }
1438
+ }
1439
+ },
1440
+ //获取工程施工时各部门当前签字环节
1441
+ async getSingAct() {
1442
+ let data = {
1443
+ f_process_id: this.selectdata.f_process_id
1444
+ }
1445
+ let http = new HttpResetClass()
1446
+ let res = await http.load(
1447
+ 'POST',
1448
+ `rs/sql/getSingAct`,
1449
+ {data: data},
1450
+ {resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
1451
+ )
1452
+ if (res.data.length > 0) {
1453
+ for (const item of this.selectdata.fields) {
1454
+ if (item.label === '签字所在环节') {
1455
+ item.value = res.data[0].defname
1456
+ this.selectdata[item.field] = item.value
1457
+ }
1458
+ }
1459
+ }
1460
+ },
1461
+ //获取土建的乙方
1462
+ getYiFang() {
1463
+ return [{label: '榆林榆川天然气', value: '榆林榆川天然气'},
1464
+ {label: this.selectdata.f_user_name, value: this.selectdata.f_user_name},
1465
+ {label: '无', value: '无'}]
1466
+ },
1467
+ getGaiXianType () {
1468
+ return [{label: "隐患整改", value: "隐患整改"},
1469
+ {label: "改造工程", value: "改造工程"},
1470
+ {label: "改线工程", value: "改线工程"},
1471
+ {label: "老旧小区", value: "老旧小区"}]
1472
+ },
1473
+ async checkIsUser() {
1474
+ let data = {
1475
+ items: 'count(*) num' ,
1476
+ tablename: 't_userinfo',
1477
+ condition: `f_process_id = '${this.show_data.f_process_id}' and f_user_state <> '销户'`
1478
+ }
1479
+
1480
+ let http = new HttpResetClass()
1481
+ let res = await http.load(
1482
+ 'POST',
1483
+ `rs/sql/applySingleTable`,
1484
+ {data: data},
1485
+ {resolveMsg: null, rejectMsg: '是否存在用户!!!'}
1486
+ )
1487
+ if (res.data[0].num <= 0){
1488
+ this.$showMessage(`未添加设备,请添加后提交!`)
1489
+ throw null
1490
+ }
1491
+ },
1492
+ async repair() {
1493
+ let data = {
1494
+ f_process_id: this.show_data.f_process_id
1495
+ }
1496
+ let http = new HttpResetClass()
1497
+ let res = await http.load(
1498
+ 'POST',
1499
+ `rs/logic/updateRepair`,
1500
+ {data: data},
1501
+ {resolveMsg: null, rejectMsg: '维修工单状态修改!!!'}
1502
+ )
1503
+ this.$dispatch('loadPage')
1504
+ },
1505
+ changeDispatch(value){
1506
+ if (value === '维修安检中心'){
1507
+ this.hideLabels('现场项目负责人', '安装单位', '安装单位现场负责人', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
1508
+ , '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
1509
+ this.hideButtons('签字')
1510
+ this.electiveLabels('现场项目负责人', '安装单位', '建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
1511
+ , '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
1512
+ }
1513
+ if (value === '施工工队'){
1514
+ this.showLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位', '户内出单日期', '户内回单日期'
1515
+ , '户内施工备注', '庭院出单日期', '庭院回单日期', '庭院施工备注', '是否发起签字', '签字是否完成', '签字所在环节')
1516
+ this.requiredLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位', '现场项目负责人', '是否发起签字', '签字是否完成', '签字所在环节')
1517
+ }
1518
+ },
1519
+ //拆除流程核对气量提交
1520
+ async gasCheckBefore() {
1521
+ let http = new HttpResetClass()
1522
+ let data = {
1523
+ tablename: 't_files',
1524
+ condition: `f_blobid = '${this.selectdata.f_process_id}' and defname = '${this.selectdata.defname}' and fusetype = '气量核对单'`
1525
+ }
1526
+ let res = await http.load(
1527
+ 'POST',
1528
+ `rs/sql/applySingleTable`,
1529
+ {data: data},
1530
+ {resolveMsg: null, rejectMsg: null}
1531
+ )
1532
+ if (res.data.length <= 0) {
1533
+ this.$showMessage('气量核对单未上传,无法提交!!!')
1534
+ throw '气量核对单未上传,无法提交!'
1535
+ }
1536
+ },
1537
+ },
1538
+ events: {
1539
+ // 强制开关阀
1540
+ async 'onOffValve' () {
1541
+ let data = {
1542
+ condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
1543
+ }
1544
+ let http = new HttpResetClass()
1545
+ let res = await http.load(
1546
+ 'POST',
1547
+ `rs/sql/getApplyUserinfo`,
1548
+ {data: data},
1549
+ {resolveMsg: null, rejectMsg: '档案获取失败!!!'}
1550
+ )
1551
+
1552
+ let userinfo = res.data[0]
1553
+
1554
+ if (this.show_data.button.button_name !== '退出强制状态') {
1555
+ data = {
1556
+ condition: `t_userfiles.f_meternumber = '${userinfo.f_meternumber}'`,
1557
+ contentData: {
1558
+ isOpen: this.show_data.button.button_name === '强制开阀' ? 1 : 0
1559
+ },
1560
+ inputtor: this.$login.f.name,
1561
+ instructTitle: this.show_data.button.button_name === '强制开阀' ? '开阀' : '关阀',
1562
+ instructType: '阀门控制',
1563
+ meterBrandName: userinfo.f_alias
1564
+ }
1565
+ res = await http.load(
1566
+ 'POST',
1567
+ `rs/logic/saveInstruct`,
1568
+ {data: data},
1569
+ {resolveMsg: null, rejectMsg: `${this.show_data.button.button_name}失败!!!`}
1570
+ )
1571
+ }
1572
+
1573
+ data = {
1574
+ f_user_id: userinfo.f_user_id,
1575
+ f_userinfo_id: userinfo.f_userinfo_id,
1576
+ record: {
1577
+ f_filiale: "榆林."+this.$login.f.orgs,
1578
+ f_instruct_meta_data: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
1579
+ f_instruct_title: this.show_data.button.button_name === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
1580
+ f_instruct_type: '阀门控制',
1581
+ f_meternumber: userinfo.f_meternumber,
1582
+ f_operator: this.$login.f.name,
1583
+ f_outlets: userinfo.f_outlets,
1584
+ f_reason: this.show_data.button.f_reason,
1585
+ f_user_id: userinfo.f_user_id,
1586
+ f_userinfo_id: userinfo.f_userinfo_id
1587
+ },
1588
+ state: this.show_data.button.button_name === '退出强制状态' ? 0 : 1
1589
+ }
1590
+
1591
+ res = await http.load(
1592
+ 'POST',
1593
+ `rs/logic/updateNetWorkValve`,
1594
+ {data: data},
1595
+ {resolveMsg: '执行成功!!!', rejectMsg: `执行失败!!!`}
1596
+ )
1597
+
1598
+ },
1599
+ // 修改用户档案
1600
+ async 'updateUserinfoState' () {
1601
+ let data = {
1602
+ f_userinfo_id: this.show_data.f_userinfo_id
1603
+ }
1604
+ let http = new HttpResetClass()
1605
+ let res = await http.load(
1606
+ 'POST',
1607
+ `rs/logic/updateUserinfoState`,
1608
+ {data: data},
1609
+ {resolveMsg: '该用户档案已为正常档案,可进行开关阀操作!!!', rejectMsg: '档案状态修改失败!!!'}
1610
+ )
1611
+
1612
+ this.showButtons('强制开阀','强制关阀')
1613
+ this.hideButtons('转正式档案')
1614
+ },
1615
+ // 选择用户
1616
+ async 'selectUserinfo' (row) {
1617
+ this.setLabelValue('用户编号', row.f_userinfo_id)
1618
+ this.setLabelValue('用户名称', row.f_user_name)
1619
+ this.setLabelValue('用户电话', row.f_user_phone)
1620
+ this.setLabelValue('证件类型', row.f_credentials)
1621
+ this.setLabelValue('证件号码', row.f_idnumber)
1622
+ this.setLabelValue('地址', row.f_address)
1623
+ this.setLabelValue('定位地址', row.f_location_address)
1624
+ this.setLabelValue('购货单位识别号', row.f_taxpayer_id)
1625
+ this.setLabelValue('购货单位名称', row.f_paper_name)
1626
+ this.setLabelValue('购货单位开户行及银行账号', row.f_paper_account)
1627
+ this.setLabelValue('购货单位地址电话', row.f_address_phone)
1628
+ this.setLabelValue('联系人', row.f_petitionuser)
1629
+ this.setLabelValue('区/县', row.f_area)
1630
+ this.setLabelValue('片区', row.f_slice_area)
1631
+ this.setLabelValue('街道', row.f_street)
1632
+ if (row.f_address_detail){
1633
+ this.setLabelValue('详细地址', row.f_address_detail)
1634
+ }
1635
+ if (this.show_data.f_apply_type === '改线业务'){
1636
+ this.setLabelValue('工程名称', row.f_user_name)
1637
+ this.setLabelValue('联系电话', row.f_user_phone)
1638
+ }
1639
+ this.show_data.f_address_detail = row.f_address_detail
1640
+ this.show_data.f_residential_area = row.f_residential_area
1641
+ this.show_data.unit = row.unit
1642
+ this.show_data.f_building = row.f_building
1643
+ this.show_data.f_floor = row.f_floor
1644
+ this.show_data.f_taxpayer_id = row.f_taxpayer_id //购货单位识别号
1645
+ this.show_data.f_address_phone = row.f_address_phone //购货单位地址电话
1646
+ this.show_data.f_paper_name = row.f_paper_name //购货单位名称
1647
+ this.show_data.f_paper_account = row.f_paper_account
1648
+ this.show_data.f_userinfo_id = row.f_userinfo_id
1649
+ console.log("当前数据",this.show_data)
1650
+ if (this.show_data.f_apply_type === '设备拆除'){
1651
+ let data = {
1652
+ userinfo: row,
1653
+ apply: this.show_data,
1654
+ loginUser: this.$login.f
1655
+ }
1656
+ let res = await this.$resetpost(
1657
+ `rs/logic/addChaiChuUser`,
1658
+ {data: data},
1659
+ {resolveMsg: '添加拆除用户成功!!!', rejectMsg: '添加拆除用户失败!!!'}
1660
+ )
1661
+ this.$dispatch('breakControl', this.show_data)
1662
+ }
1663
+ },
1664
+ async 'priceReadEvent' (index) {
1665
+ await this.setContractSignatory()
1666
+ // await this.getContractNumber()
1667
+ await this.getPrice(index)
1668
+ await this.priceChange()
1669
+ },
1670
+ async 'getPrice' (index) {
1671
+ if (isEmpty(this.show_data.f_gas_nature) || isEmpty(this.show_data.f_price_type)) {
1672
+ return
1673
+ }
1674
+
1675
+ if (index) {
1676
+ this.setLabelValue('气价名称', null)
1677
+ }
1678
+
1679
+ if (this.show_data.f_price_type === '混合气价') {
1680
+ this.showLabels('比率')
1681
+ } else {
1682
+ this.setLabelValue('比率', null)
1683
+ this.hideLabels('比率')
1684
+ }
1685
+
1686
+ let data = {
1687
+ condition: `sp.f_filiale like '%${"榆林."+this.$login.f.orgs}%' and sp.f_price_type = '${this.show_data.f_price_type}' and f_gasproperties = '${this.show_data.f_gas_nature}'`
1688
+ }
1689
+
1690
+ if (this.show_data.f_apply_type === '民用报建') {
1691
+ data.condition += `and f_user_type = '民用'`
1692
+ }
1693
+ if (this.show_data.f_apply_type === '非民用报建') {
1694
+ data.condition += `and f_user_type = '非民用'`
1695
+ }
1696
+
1697
+
1698
+ let http = new HttpResetClass()
1699
+ let res = await http.load(
1700
+ 'POST',
1701
+ `rs/sql/applyGetPrice`,
1702
+ {data: data},
1703
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1704
+ )
1705
+
1706
+ let priceLoptions = res.data.map(item => {
1707
+ return {
1708
+ label: item.f_price_name,
1709
+ value: `${item.id}`
1710
+ }
1711
+ })
1712
+ this.setLabelOptions('气价名称',priceLoptions)
1713
+ },
1714
+ // 街道失去焦点
1715
+ async changStreet () {
1716
+ if (isEmpty(this.show_data.f_street)) {
1717
+ return
1718
+ }
1719
+ this.addressSplicing()
1720
+ },
1721
+
1722
+ 'changAddressDetail'(){
1723
+ if (isEmpty(this.show_data.f_address_detail)) {
1724
+ return
1725
+ }
1726
+ this.addressSplicing()
1727
+ },
1728
+ 'changAddress'(){
1729
+ if (isEmpty(this.show_data.f_address_detail)) {
1730
+ return
1731
+ }
1732
+ let f_address = this.show_data.f_address + this.show_data.f_address_detail
1733
+ this.setLabelValue("地址", f_address)
1734
+ },
1735
+ // 片区失去焦点
1736
+ async 'changSliceArea' () {
1737
+ if (isEmpty(this.show_data.f_area) || isEmpty(this.show_data.f_slice_area)) {
1738
+ return
1739
+ }
1740
+
1741
+ let data = {
1742
+ items: 'f_street label,f_street value',
1743
+ tablename: 't_area_address',
1744
+ condition: `f_area = '${this.show_data.f_area}' and f_slice_area = '${this.show_data.f_slice_area}'`,
1745
+ groupitem: 'f_street'
1746
+ }
1747
+
1748
+ let http = new HttpResetClass()
1749
+ let res = await http.load(
1750
+ 'POST',
1751
+ `rs/sql/applySingleTable`,
1752
+ {data: data},
1753
+ {resolveMsg: null, rejectMsg: '签字状态查询失败!!!'}
1754
+ )
1755
+ this.setLabelOptions('街道', res.data)
1756
+
1757
+ this.addressSplicing()
1758
+ },
1759
+ // 区县失去焦点
1760
+ 'changeArea' () {
1761
+ if (isEmpty(this.show_data.f_area)) {
1762
+ return
1763
+ }
1764
+ this.setLabelValue('片区', null)
1765
+ this.setLabelValue('街道', null)
1766
+ this.setLabelOptions('片区', this.$appdata.getParam(`${this.show_data.f_area}片区`))
1767
+ this.setLabelOptions('街道', [])
1768
+
1769
+ this.addressSplicing()
1770
+ },
1771
+ // 开启签字
1772
+ async 'startSignActivity' () {
1773
+ this.hideButtons('签字')
1774
+ if(this.show_data.f_apply_type !== '管线建设'){
1775
+ await this.constructionBefore()
1776
+ }
1777
+ let data = {
1778
+ apply: this.show_data,
1779
+ user: this.$login.f
1780
+ }
1781
+
1782
+ let res = await this.$resetpost(
1783
+ `rs/logic/startSignActivity`,
1784
+ {data: data},
1785
+ {resolveMsg: '签字流程已发起!!!', rejectMsg: '签字发起失败!!!'}
1786
+ )
1787
+
1788
+ this.$dispatch('breakControl', this.show_data)
1789
+ },
1790
+ // 工程施工初始化
1791
+ async 'buildReadyEvent' () {
1792
+ // this.changeDispatch(this.getLableValue('派工类型'))
1793
+ if(this.getLableValue('是否发起签字') === '是') {
1794
+ this.hideButtons('签字')
1795
+ }
1796
+ let http = new HttpResetClass()
1797
+ if (isEmpty(this.show_data.f_meter_brand)) {
1798
+ return
1799
+ }else {
1800
+ if (this.show_data.f_meter_brand === 'null') {
1801
+ this.setLabelOptions('气表型号', [{label: '无', value: 'null'}])
1802
+ return
1803
+ }
1804
+ let data = {
1805
+ f_gasbrand_id: this.show_data.f_meter_brand
1806
+ }
1807
+ let res = await http.load(
1808
+ 'POST',
1809
+ `rs/sql/getGasModel`,
1810
+ {data: data},
1811
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
1812
+ )
1813
+ this.setLabelOptions('气表型号', res.data)
1814
+ }
1815
+
1816
+ if (this.show_data.f_apply_type === '分户挂表') {
1817
+ let data = {
1818
+ condition: `ui.f_userinfo_id = '${this.show_data.f_userinfo_id}'`
1819
+ }
1820
+ let http = new HttpResetClass()
1821
+ let res = await http.load(
1822
+ 'POST',
1823
+ `rs/sql/getApplyUserinfo`,
1824
+ {data: data},
1825
+ {resolveMsg: null, rejectMsg: '档案状态获取失败!!!'}
1826
+ )
1827
+ console.log("f_meter_classif11y",res.data[0].f_meter_classify)
1828
+ if (!res.data[0].f_meter_brand.includes('物联网表')) {
1829
+ return
1830
+ }
1831
+ console.log("f_user_state11",res.data[0].f_user_state)
1832
+ if (res.data[0].f_user_state === '正常') {
1833
+ this.showButtons('退出强制状态','强制关阀')
1834
+ this.hideButtons('转正式档案')
1835
+ } else {
1836
+ this.showButtons('转正式档案')
1837
+ this.hideButtons('退出强制状态','强制关阀')
1838
+ }
1839
+ }
1840
+ },
1841
+ // 工程派工初始化
1842
+ async 'dispatchReadyEvent' () {
1843
+ if (isEmpty(this.show_data.f_meter_brand)) {
1844
+ return
1845
+ }
1846
+ let data = {
1847
+ f_gasbrand_id: this.show_data.f_meter_brand
1848
+ }
1849
+ let http = new HttpResetClass()
1850
+ let res = await http.load(
1851
+ 'POST',
1852
+ `rs/sql/getGasModel`,
1853
+ {data: data},
1854
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
1855
+ )
1856
+
1857
+ this.setLabelOptions('气表型号', res.data)
1858
+ },
1859
+ // 气表品牌失去焦点
1860
+ async 'meterBrandChenge' (index) {
1861
+ if (isEmpty(this.show_data.f_meter_brand)) {
1862
+ return
1863
+ }
1864
+ this.setLabelValue('气表型号', null)
1865
+ let data = {
1866
+ f_gasbrand_id: this.show_data.f_meter_brand
1867
+ }
1868
+ let http = new HttpResetClass()
1869
+ let res = await http.load(
1870
+ 'POST',
1871
+ `rs/sql/getGasModel`,
1872
+ {data: data},
1873
+ {resolveMsg: null, rejectMsg: '气表型号查询失败!!!'}
1874
+ )
1875
+
1876
+ this.setLabelOptions('气表型号', res.data)
1877
+ },
1878
+ // 单价失去焦点
1879
+ async 'priceChange' (index) {
1880
+ if (isEmpty(this.show_data.f_price)) {
1881
+ return
1882
+ }
1883
+ let data = {
1884
+ operator: '*',
1885
+ num1: this.show_data.f_price,
1886
+ num2: this.show_data.f_install_count
1887
+ }
1888
+ let http = new HttpResetClass()
1889
+ let res = await http.load(
1890
+ 'POST',
1891
+ `rs/logic/compute`,
1892
+ {data: data},
1893
+ {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
1894
+ )
1895
+
1896
+ this.setLabelValue('工程材料费', res.data)
1897
+ },
1898
+ // 安装户数失去焦点
1899
+ 'installCountChange' (index) {
1900
+ if (isEmpty(this.show_data.f_install_count)) {
1901
+ return
1902
+ }
1903
+ if (Number(this.show_data.f_install_count) > Number(this.show_data.f_apply_count)) {
1904
+ this.$showMessage('安装数已超过申请数!!!')
1905
+ // this.setLabelValue('安装户数', null)
1906
+ // this.setLabelValue('安装点数', null)
1907
+ // return
1908
+ }
1909
+
1910
+ if (Number(this.show_data.f_install_count) <= 0) {
1911
+ this.$showMessage('至少有一个用户!!!')
1912
+ this.setLabelValue('安装户数', null)
1913
+ this.setLabelValue('安装点数', null)
1914
+ return
1915
+ }
1916
+ },
1917
+ // 土建单位失去焦点
1918
+ 'judgmentEngineering' (index) {
1919
+ if (this.show_data.f_engineering_operator_id === '无' && this.show_data.f_civil_engineering !== "无") {
1920
+ this.$showMessage('土建工程派单与实际选择不符,请仔细核对后再次提交')
1921
+ throw null
1922
+ }
1923
+ },
1924
+ // 报建性质失去焦点
1925
+ 'applyNatureChange' (index) {
1926
+ if (this.show_data.f_apply_nature === '散户') {
1927
+ //绑定票据类型为电子票
1928
+ this.setLabelValue('票据类型', '电子票')
1929
+ this.hideLabels('营业执照')
1930
+ this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
1931
+ }
1932
+ if (this.show_data.f_apply_nature === '小区') {
1933
+ //票据类型为专票
1934
+ this.setLabelValue('票据类型', '专票')
1935
+ this.showLabels('营业执照', '小区/巷道')
1936
+ this.requiredLabels('小区/巷道')
1937
+ }
1938
+ },
1939
+ // 票据类型失去焦点
1940
+ 'applyPaperChange' (index) {
1941
+ console.log("测试是否进入")
1942
+ if (this.show_data.f_paper_type === '专票') {
1943
+ this.requiredLabels('购货单位名称','购货单位识别号', '购货单位银行账号', '购货单位地址电话')
1944
+ }else {
1945
+ this.electiveLabels( '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
1946
+ }
1947
+ },
1948
+ 'chargeAfter'(index){
1949
+ if (this.show_data.f_surplus_money !== this.show_data.f_due_money){
1950
+ this.hideButtons('退回')
1951
+ }else {
1952
+ this.showButtons('退回')
1953
+ }
1954
+ },
1955
+ //购货单位识别号失去焦点
1956
+ 'getAuthenticationMethod' (index){
1957
+ if (isEmpty(this.show_data.f_taxpayer_id)) {
1958
+ this.setLabelValue('认证类型','个人认证')
1959
+ }else {
1960
+ this.setLabelValue('认证类型','企业认证')
1961
+ }
1962
+ },
1963
+ //搜索小区
1964
+ 'selectArea' (val,index) {
1965
+ let pcdText = `and f_residential_area like '%${val}%'`
1966
+ let data = {
1967
+ tablename: 't_area_address',
1968
+ condition: `f_filiale like '%${"榆林."+this.$login.f.orgs}%' and f_area_status = '启用' ${pcdText}`
1969
+ }
1970
+ new HttpResetClass().load("POST", `rs/sql/applySingleTable`, {data:data}, {resolveMsg: null, rejectMsg: null}).then((res)=>{
1971
+ console.log('请求发送完成!!!!!'+JSON.stringify(res))
1972
+ if(res.data.length>0){
1973
+ this.setLabelOptions('小区/巷道', res.data.map(item => {
1974
+ return {
1975
+ label: item.f_residential_area,
1976
+ value: item.id
1977
+ }
1978
+ }))
1979
+ }
1980
+ })
1981
+ },
1982
+ //身份证号码校验
1983
+ 'checkIdnumber' (index) {
1984
+ if(this.show_data.f_credentials === '身份证'){
1985
+ var verify = /^[1-9]\d{5}(18|19|20|21)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
1986
+ if (!verify.test(this.show_data.fields[index].value)){
1987
+ this.show_data.fields[index].value = null
1988
+ this.$showMessage('身份证号码格式错误请重新输入!!!')
1989
+ }
1990
+ }
1991
+ },
1992
+ //电话号码校验
1993
+ 'checkPhone' (index) {
1994
+ var verify = /^([1][0-9]{10})$/
1995
+ if (!verify.test(this.show_data.fields[index].value)){
1996
+ this.show_data.fields[index].value = null
1997
+ this.$showMessage('电话号码格式错误请重新输入!!!')
1998
+ }
1999
+ },
2000
+ 'changeDispatching'(index){
2001
+ if (this.show_data.fields[index].value === '安检维修中心'){
2002
+ this.hideLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2003
+ this.electiveLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2004
+ }else if (this.show_data.fields[index].value === '施工工队'){
2005
+ this.showLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2006
+ this.requiredLabels('现场项目负责人', '安装单位', '安装单位现场负责人','建设单位', '监理单位', '土建单位', '检测单位')
2007
+ }
2008
+ },
2009
+ 'getRefund'(index){
2010
+ if (this.show_data.fields[index].value === '否'){
2011
+ this.hideLabels('退费金额', '退款项')
2012
+ this.electiveLabels('退费金额', '退款项')
2013
+ }else if (this.show_data.fields[index].value === '是'){
2014
+ this.showLabels('退费金额', '退款项')
2015
+ this.requiredLabels('退费金额', '退款项')
2016
+ }
2017
+ },
2018
+ 'hasTrouble'(index) {
2019
+ if (this.show_data.fields[index].value === '有纠纷'){
2020
+ this.hideButtons('提交', '签字', '图纸变更')
2021
+ this.showLabels('纠纷原因')
2022
+ }else {
2023
+ this.showButtons('提交', '签字', '图纸变更')
2024
+ this.hideLabels('纠纷原因')
2025
+ }
2026
+ },
2027
+ //金额大小写转换
2028
+ 'applyCapitalizedAmount' (index){
2029
+ // 通过正则过滤小数点后两位
2030
+ let money = (this.show_data.fields[index].value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
2031
+ this.setLabelValue('应交金额大写',this.smalltoBIG(money))
2032
+ },
2033
+
2034
+ // ===========================================
2035
+ 'initializtionView' () {
2036
+ if (this.show_data.f_apply_nature === '散户') {
2037
+ this.hideLabels('营业执照')
2038
+ this.electiveLabels('营业执照', '购货单位识别号', '购货单位银行账号', '购货单位地址电话')
2039
+ }
2040
+ if (this.show_data.f_apply_nature === '小区') {
2041
+ this.showLabels('营业执照', '小区/巷道', '小区名称')
2042
+ this.requiredLabels('小区/巷道')
2043
+ // this.hideComponents('用户花名单')
2044
+ }
2045
+ },
2046
+ // 检查重复
2047
+ 'checkRepeat' (index) {
2048
+ this.checkDuplicate(index)
2049
+ },
2050
+ async 'button'() {
2051
+ if (this.show_data.button.before) {
2052
+ await this[this.show_data.button.before]()
2053
+ }
2054
+ // 点击重置按钮就重置数据
2055
+ if (this.show_data.button.button_name === '重置') {
2056
+ this.$dispatch('breakControl', this.selectdata)
2057
+ return
2058
+ }
2059
+ this.show_data.start_activity = this.$workflow_vue.start_activity
2060
+ this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
2061
+ let data = {
2062
+ apply: this.show_data,
2063
+ user: this.$login.f
2064
+ }
2065
+ let http = new HttpResetClass()
2066
+ let res = await http.load(
2067
+ 'POST',
2068
+ `rs/logic/ApplyProductService`,
2069
+ {data: data},
2070
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
2071
+ )
2072
+ if (this.show_data.button.after) {
2073
+ this[this.show_data.button.after]()
2074
+ }
2075
+ this.$dispatch('loadPage')
2076
+ },
2077
+ // 失去焦点出触发事件
2078
+ 'onchange' (index) {
2079
+ },
2080
+ selectSearch (val, index) {},
2081
+ 'onblur' (index) {},
2082
+ 'oninput' (index) {},
2083
+ async 'onchangeModal' (index, fieldIndex) {
2084
+ },
2085
+ async 'onblurModal' (index, fieldIndex) {
2086
+
2087
+ },
2088
+ async 'oninputModal' (index, fieldIndex) {
2089
+
2090
+ },
2091
+ async 'onetomanydelete' (index, rowIndex) {
2092
+
2093
+ let http = new HttpResetClass()
2094
+
2095
+ let res = await http.load(
2096
+ 'DELETE',
2097
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
2098
+ null,
2099
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
2100
+ )
2101
+
2102
+ res = await this.$resetpost(
2103
+ 'rs/entity/t_apply',
2104
+ this.show_data
2105
+ )
2106
+
2107
+ this.$dispatch('breakControl', this.show_data)
2108
+ },
2109
+ async 'onetomanyupdate' (index, rowIndex) {
2110
+ let data = this.show_data.onetomany[index].rows[rowIndex]
2111
+
2112
+ this.show_data.onetomany[index].fields.forEach(item => {
2113
+ data[item.field] = item.value
2114
+ })
2115
+ let res = await this.$resetpost(
2116
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
2117
+ data
2118
+ )
2119
+
2120
+ res = await this.$resetpost(
2121
+ 'rs/entity/t_apply',
2122
+ this.show_data
2123
+ )
2124
+
2125
+ this.$dispatch('breakControl', this.show_data)
2126
+ },
2127
+ async 'onetomanyadd' (index) {
2128
+ let data = {
2129
+ f_process_id : this.show_data.f_process_id,
2130
+ f_operator_id: this.$login.f.id,
2131
+ f_operator: this.$login.f.name,
2132
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
2133
+ f_orgid: this.$login.f.orgid,
2134
+ f_orgname: "榆林."+this.$login.f.orgs
2135
+ }
2136
+ this.show_data.onetomany[index].fields.forEach(item => {
2137
+ data[item.field] = item.value
2138
+ })
2139
+ let res = await this.$resetpost(
2140
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
2141
+ data
2142
+ )
2143
+
2144
+ res = await this.$resetpost(
2145
+ 'rs/entity/t_apply',
2146
+ this.show_data
2147
+ )
2148
+
2149
+ this.$dispatch('breakControl', this.show_data)
2150
+ },
2151
+ 'complyInstallation' (index) {
2152
+ if (this.show_data.defname === '报建受理'){
2153
+ if (this.show_data.f_accept_install === '否') {
2154
+ console.log("测试")
2155
+ this.hideButtons('下发','提交')
2156
+ this.showButtons('终止')
2157
+ } else {
2158
+ this.hideButtons('终止')
2159
+ this.showButtons('下发','提交')
2160
+ }
2161
+ }
2162
+ if (this.show_data.defname === '现场勘察'){
2163
+ if (this.show_data.f_survey_opinion === '否') {
2164
+ console.log("测试")
2165
+ this.hideButtons('下发','提交')
2166
+ this.showButtons('终止')
2167
+ } else {
2168
+ this.hideButtons('终止')
2169
+ this.showButtons('下发','提交')
2170
+ }
2171
+ }
2172
+ if (this.show_data.defname === '报建受理' || this.show_data.defname === '现场勘察'){
2173
+ this.installCountCheck()
2174
+ }
2175
+ },
2176
+ async 'saveData'(index) {
2177
+ if (this.show_data.f_residential_area_id) {
2178
+ let data = {
2179
+ tablename: 't_area_address',
2180
+ condition: `id = '${this.show_data.f_residential_area_id}'`
2181
+ }
2182
+ let http = new HttpResetClass()
2183
+ let res = await http.load(
2184
+ 'POST',
2185
+ `rs/sql/applySingleTable`,
2186
+ {data: data},
2187
+ {resolveMsg: null, rejectMsg: '小区查询失败!!!'}
2188
+ )
2189
+
2190
+ this.area = res.data[0]
2191
+ }
2192
+ this.areaAddressSplicing()
2193
+ },
2194
+ async 'importEvent' (index, table, configName, filepath) {
2195
+ let data = {
2196
+ selectdata: this.show_data,
2197
+ table: table,
2198
+ filepath: filepath,
2199
+ configName: configName,
2200
+ user: this.$login.f
2201
+ }
2202
+
2203
+ let res = await this.$resetpost(
2204
+ `rs/logic/importEvent`,
2205
+ data
2206
+ )
2207
+
2208
+ this.$dispatch('breakControl', this.show_data)
2209
+ },
2210
+ 'onbutchange' (index) {
2211
+
2212
+ },
2213
+ 'onbutblur' (index) {
2214
+
2215
+ },
2216
+ 'onbutinput' (index) {
2217
+
2218
+ }
2219
+ },
2220
+ watch: {
2221
+ }
2222
+ }
2223
+ </script>
2224
+ <style scoped>
2225
+ /*清除model中的浮动*/
2226
+ .clearfix:after,.clearfix:before{
2227
+ display: table;
2228
+ }
2229
+ .clearfix:after{
2230
+ clear: both;
2231
+ }
2232
+ </style>