apply-clients 7.1.36-yuchuan-12 → 7.1.36-yuchuan-13

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