apply-clients 3.4.18 → 3.4.19

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