apply-clients 7.1.36-yuchuan-41 → 7.1.36-yuchuan-42

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