apply-clients 7.1.36-yuchuan-58 → 7.1.36-yuchuan-60

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