sale-client 4.0.30-preview → 4.0.32-preview

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.0.30-preview",
3
+ "version": "4.0.32-preview",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,21 +9,18 @@
9
9
  <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
10
  condition="info.f_userinfo_code = '{}'" @keyup.enter="search()">
11
11
  </div>
12
-
13
12
  <div class="form-group col-sm-4 button-range" >
14
-
15
13
  <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
16
14
  <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.autoMeterBookSort()">表箱号排序</button>
17
15
  <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.saveSort()">保存当前顺序</button>
18
- <button class="button_search" v-if="$parent.$parent.editsort==false" @click="$parent.$parent.editsort=true" v-el:cba>调整顺序</button>
19
- <button class="button_search" v-if="$parent.$parent.editsort==true" @click="$parent.$parent.saveEditSort" v-el:cba>保存顺序</button>
16
+ <button class="button_search" v-if="$parent.$parent.editsort == false" @click="$parent.$parent.editsort=true" v-el:cba>调整顺序</button>
17
+ <button class="button_search" v-if="$parent.$parent.editsort == true" @click="$parent.$parent.saveEditSort" v-el:cba>保存顺序</button>
20
18
  <export-excel
21
19
  :data="{condition: $parent.$parent.condition,orderitem: $parent.$parent.orderitem}"
22
20
  :field="$parent.$parent.getfield"
23
21
  sqlurl="api/af-revenue/logic/saleExport" sql-name="getMeterBookUser" :template-name="$parent.$parent.model.rows[0].f_book_name+'抄表册名'"
24
22
  :choose-col="true"></export-excel>
25
23
  <button class="button_export button_spacing" @click="$parent.$parent.importFile">导入</button>
26
-
27
24
  <div
28
25
  :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
29
26
  @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"
@@ -150,7 +147,8 @@
150
147
  <data-grid :model="model" class="table_sy" partial='list' v-ref:grid>
151
148
  <template partial='head' >
152
149
  <tr>
153
- <th v-if="$parent.$parent.$parent.editsort"><nobr>操作</nobr></th>
150
+ <th v-if="$parent.$parent.$parent.editsort"><nobr>排序</nobr></th>
151
+ <th v-if="$parent.$parent.$parent.removebook"><nobr>移出</nobr></th>
154
152
  <th><nobr>客户编号</nobr></th>
155
153
  <th><nobr>客户名称</nobr></th>
156
154
  <th>
@@ -181,7 +179,6 @@
181
179
  <data-order field="f_room" name="房间号"
182
180
  :order.sync="$parent.$parent.$parent.orderFields.f_room"></data-order>
183
181
  </th>
184
-
185
182
  <th><nobr>客户电话</nobr></th>
186
183
  <th><nobr>表号</nobr></th>
187
184
  <th>
@@ -201,10 +198,18 @@
201
198
  </tr>
202
199
  </template>
203
200
  <template partial='body' >
204
- <tr >
205
- <td style="text-align:center" v-if="$parent.$parent.$parent.editsort"><nobr>
206
- <span class="glyphicon glyphicon-arrow-up" @click="$parent.$parent.$parent.sortUp($index, row)" v-el:cba></span></nobr>
207
- <span class="glyphicon glyphicon-arrow-down" @click="$parent.$parent.$parent.sortDown($index, row)" v-el:cba></span></nobr>
201
+ <tr>
202
+ <td style="text-align:center" v-if="$parent.$parent.$parent.editsort">
203
+ <nobr>
204
+ <span class="glyphicon glyphicon-arrow-up" @click="$parent.$parent.$parent.sortUp($index, row)" v-el:cba></span>
205
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
206
+ <span class="glyphicon glyphicon-arrow-down" @click="$parent.$parent.$parent.sortDown($index, row)" v-el:cba></span>
207
+ </nobr>
208
+ </td>
209
+ <td style="text-align:center" v-if="$parent.$parent.$parent.removebook">
210
+ <nobr>
211
+ <span title="移出表册" class="glyphicon glyphicon-paste" style="font-size: 20px" @click="$parent.$parent.$parent.delete($index, row)" v-el:cba></span>
212
+ </nobr>
208
213
  </td>
209
214
  <td style="text-align:center"><nobr><span @click="$parent.$parent.$parent.dealmsg(row)"><a><b>{{row.f_userinfo_code}}</b></a></span></nobr></td>
210
215
  <td style="text-align:center"><nobr>{{row.f_user_name}}</nobr></td>
@@ -291,19 +296,20 @@
291
296
  title: '',
292
297
  data () {
293
298
  return {
294
- model: new PagedList('api/af-revenue/sql/getMeterBookUser', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_meter_book_sort asc'`}),
299
+ model: new PagedList('api/af-revenue/sql/getMeterBookUser', 20, {orderitem: this.orderitem ? '"' + this.orderitem + ' "' : `'f_meter_book_sort asc'`}),
295
300
  condition: '',
296
301
  getfield: {},
297
302
  show: false,
298
- row:null,
299
- sortShow:false,
303
+ removebook: true,
304
+ row: null,
305
+ sortShow: false,
300
306
  fileinfo: {
301
- code:null,
302
- meterbook:null,
303
- booknum:null,
304
- sort:null,
305
- fileid:null,
306
- infoid:null
307
+ code: null,
308
+ meterbook: null,
309
+ booknum: null,
310
+ sort: null,
311
+ fileid: null,
312
+ infoid: null
307
313
  },
308
314
  gasproperties: [],
309
315
  f_filialeid: this.$login.f.orgid,
@@ -318,11 +324,11 @@
318
324
  adjustables: [],
319
325
  meterstyle: {},
320
326
  criteriaShow: false,
321
- editsort:false,
322
- //排序
323
- sortitem:'f_meter_book_sort',
324
- rule:'asc',
325
- orderitem:'f_meter_book_sort asc',
327
+ editsort: false,
328
+ // 排序
329
+ sortitem: 'f_meter_book_sort',
330
+ rule: 'asc',
331
+ orderitem: 'f_meter_book_sort asc',
326
332
  orderFields: {
327
333
  f_meter_book_sort: 'no'
328
334
  },
@@ -348,7 +354,7 @@
348
354
  }
349
355
  }
350
356
  },
351
- props: ['f_meterbook_num','usercount'],
357
+ props: ['f_meterbook_num', 'usercount'],
352
358
  async ready () {
353
359
  readyGen(this)
354
360
  },
@@ -365,38 +371,38 @@
365
371
  // 如果新规则不排序,还原为默认排序
366
372
  if (rule === 'no') {
367
373
  this.model.paramSource.orderitem = `'f_meter_book_sort asc'`
368
- this.rule= 'asc'
369
- this.sortitem='f_meter_book_sort'
374
+ this.rule = 'asc'
375
+ this.sortitem = 'f_meter_book_sort'
370
376
  } else {
371
377
  this.model.paramSource.orderitem = `'${field} ${rule}'`
372
378
  this.orderitem = this.model.paramSource.orderitem
373
- this.rule= rule
374
- this.sortitem=field
379
+ this.rule = rule
380
+ this.sortitem = field
375
381
  }
376
382
  this.search()
377
383
  },
378
- async saveSort(){
384
+ async saveSort () {
379
385
  if (!this.$login.r.find(value => value == '册内用户排序')) {
380
386
  this.$showMessage('你没有【册内用户排序】的权限,请联系管理员!')
381
387
  return
382
388
  }
383
- if(this.model.count<this.usercount){
384
- this.$showAlert('该功能适用于给表册内所有用户排序的情况,请去掉查询条件', 'warning', 3000)
385
- }else{
386
- this.$showMessage('此操作会将表册内用户按照现有查询结果的顺序排序,是否继续', ['confirm', 'cancel']).then((res) => {
387
- if (res == 'confirm') {
388
- this.$resetpost('api/af-revenue/logic/changeBookSort',
389
- {
390
- data: {
391
- f_meter_book_num: this.f_meterbook_num,
392
- sortitem: this.sortitem,
393
- rule: this.rule
394
- }
395
- }, {resolveMsg: '已成功修改册内排序!!', rejectMsg: '册内排序修改失败!!'})
396
- this.search()
397
- }
398
- })
399
- }
389
+ if (this.model.count < this.usercount) {
390
+ this.$showAlert('该功能适用于给表册内所有用户排序的情况,请去掉查询条件', 'warning', 3000)
391
+ } else {
392
+ this.$showMessage('此操作会将表册内用户按照现有查询结果的顺序排序,是否继续', ['confirm', 'cancel']).then((res) => {
393
+ if (res == 'confirm') {
394
+ this.$resetpost('api/af-revenue/logic/changeBookSort',
395
+ {
396
+ data: {
397
+ f_meter_book_num: this.f_meterbook_num,
398
+ sortitem: this.sortitem,
399
+ rule: this.rule
400
+ }
401
+ }, {resolveMsg: '已成功修改册内排序!!', rejectMsg: '册内排序修改失败!!'})
402
+ this.search()
403
+ }
404
+ })
405
+ }
400
406
  },
401
407
  async autoMeterBookSort () {
402
408
  if (!this.$login.r.find(value => value == '册内用户排序')) {
@@ -424,131 +430,140 @@
424
430
  }
425
431
  this.show = true
426
432
  },
427
- async sortEdit(position){
428
- if(!this.fileinfo.code){
433
+ async sortEdit (position) {
434
+ if (!this.fileinfo.code) {
429
435
  this.$showMessage('请输入目标用户编号')
430
436
  return
431
437
  }
432
438
  // position:
433
439
  // 0--将改用户的表册顺序排到目标用户前
434
440
  // 1--将改用户的表册顺序排到目标用户后
435
- if((!this.fileinfo.sort) ||(!this.fileinfo.booknum) ){
441
+ if ((!this.fileinfo.sort) || (!this.fileinfo.booknum)) {
436
442
  this.$showMessage('目标用户无表册或在表册内无排序')
437
443
  return
438
444
  }
439
445
  let http = new HttpResetClass()
440
- await http.load('POST', 'api/af-revenue/logic/sale_editBookSort', {data: {fileinfo: this.fileinfo,position:position,userfilesid:this.row.f_userfiles_id}}, {resolveMsg: '已成功将改表移到指定的表册位置', rejectMsg: '移动册内位置失败'})
441
- this.fileinfo= {
442
- code:null,
443
- fileid:null,
444
- booknum:null,
445
- meterbook:null,
446
- infoid:null,
447
- sort:null
446
+ await http.load('POST', 'api/af-revenue/logic/sale_editBookSort', {data: {fileinfo: this.fileinfo, position: position, userfilesid: this.row.f_userfiles_id}}, {resolveMsg: '已成功将改表移到指定的表册位置', rejectMsg: '移动册内位置失败'})
447
+ this.fileinfo = {
448
+ code: null,
449
+ fileid: null,
450
+ booknum: null,
451
+ meterbook: null,
452
+ infoid: null,
453
+ sort: null
448
454
  }
449
- this.sortShow=false
455
+ this.sortShow = false
450
456
  this.search()
451
457
  },
452
- async getBook(){
453
- if(this.fileinfo.code){
458
+ async getBook () {
459
+ if (this.fileinfo.code) {
454
460
  let http = new HttpResetClass()
455
461
  let res = await http.load('POST', 'api/af-revenue/sql/sale_getUserMeterBook', {
456
462
  data: {
457
463
  condition: `i.f_userinfo_code='${this.fileinfo.code}'`
458
464
  }
459
465
  }, {resolveMsg: null, rejectMsg: null})
460
- console.log("-------------------res:",res.data)
461
- if(res.data.length===1){
462
- if((!res.data[0].f_meter_book_sort )||(!res.data[0].f_meter_book_num) ){
466
+ console.log('-------------------res:', res.data)
467
+ if (res.data.length === 1) {
468
+ if ((!res.data[0].f_meter_book_sort) || (!res.data[0].f_meter_book_num)) {
463
469
  this.$showMessage('该用户不在表册内或在表册内无排序')
464
- this.fileinfo= {
465
- code:this.fileinfo.code,
466
- fileid:null,
467
- booknum:null,
468
- meterbook:null,
469
- infoid:null,
470
- sort:null
470
+ this.fileinfo = {
471
+ code: this.fileinfo.code,
472
+ fileid: null,
473
+ booknum: null,
474
+ meterbook: null,
475
+ infoid: null,
476
+ sort: null
471
477
  }
472
478
  return
473
479
  }
474
- this.fileinfo.meterbook=res.data[0].f_book_name
475
- this.fileinfo.sort=res.data[0].f_meter_book_sort
476
- this.fileinfo.fileid=res.data[0].f_userfiles_id
477
- this.fileinfo.infoid=res.data[0].f_userinfo_id
478
- this.fileinfo.booknum=res.data[0].f_meter_book_num
479
- }else{
480
+ this.fileinfo.meterbook = res.data[0].f_book_name
481
+ this.fileinfo.sort = res.data[0].f_meter_book_sort
482
+ this.fileinfo.fileid = res.data[0].f_userfiles_id
483
+ this.fileinfo.infoid = res.data[0].f_userinfo_id
484
+ this.fileinfo.booknum = res.data[0].f_meter_book_num
485
+ } else {
480
486
  this.$showMessage('请核对输入的用户编号')
481
- this.fileinfo= {
482
- code:this.fileinfo.code,
483
- fileid:null,
484
- booknum:null,
485
- meterbook:null,
486
- infoid:null,
487
- sort:null
487
+ this.fileinfo = {
488
+ code: this.fileinfo.code,
489
+ fileid: null,
490
+ booknum: null,
491
+ meterbook: null,
492
+ infoid: null,
493
+ sort: null
488
494
  }
489
495
  }
490
496
  }
491
-
492
497
  },
493
498
  // dblclick(obj){
494
499
  // console.log("-------------------------row",obj)
495
500
  // this.row=obj
496
501
  // this.sortShow=true
497
502
  // },
498
- async saveEditSort (){
503
+ async saveEditSort () {
499
504
  for (let item of this.$refs.paged.$refs.grid.model.rows) {
500
- let param={
501
- f_userfiles_id:item.f_userfiles_id,
502
- version:item.fileversion,
503
- f_meter_book_sort:item.f_meter_book_sort
504
- }
505
- let http = new HttpResetClass()
506
- await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
505
+ let param = {
506
+ f_userfiles_id: item.f_userfiles_id,
507
+ version: item.fileversion,
508
+ f_meter_book_sort: item.f_meter_book_sort
509
+ }
510
+ let http = new HttpResetClass()
511
+ await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
507
512
  param,
508
- {resolveMsg: null, rejectMsg: "保存失败"})
513
+ {resolveMsg: null, rejectMsg: '保存失败'})
509
514
  }
510
- this.editsort=false
515
+ this.editsort = false
511
516
  },
512
517
  // 下移按钮
513
518
  sortDown (index, row) {
514
519
  if (index === (this.model.rows.length - 1)) {
515
520
  this.$showAlert('已经是本页最后一个了', 'warning', 2000)
516
521
  } else {
517
- let rows=this.$refs.paged.$refs.grid.model.rows
518
- this.$refs.paged.$refs.grid.model.rows=[]
522
+ let rows = this.$refs.paged.$refs.grid.model.rows
523
+ this.$refs.paged.$refs.grid.model.rows = []
519
524
  let temp = rows[index + 1]
520
- rows[index+1]=rows[index]
521
- rows[index]=temp
525
+ rows[index + 1] = rows[index]
526
+ rows[index] = temp
522
527
 
523
- let tempsort=rows[index + 1].f_meter_book_sort
524
- rows[index+1].f_meter_book_sort=rows[index].f_meter_book_sort
525
- rows[index].f_meter_book_sort=tempsort
526
-
527
- this.$refs.paged.$refs.grid.model.rows=rows
528
+ let tempsort = rows[index + 1].f_meter_book_sort
529
+ rows[index + 1].f_meter_book_sort = rows[index].f_meter_book_sort
530
+ rows[index].f_meter_book_sort = tempsort
528
531
 
532
+ this.$refs.paged.$refs.grid.model.rows = rows
529
533
  }
530
534
  },
531
535
  // 上移按钮
532
536
  sortUp (index, row) {
533
-
534
537
  if (index === 0) {
535
538
  this.$showAlert('已经是本页第一个了', 'warning', 2000)
536
539
  } else {
540
+ let rows = this.$refs.paged.$refs.grid.model.rows
537
541
 
538
-
539
- let rows=this.$refs.paged.$refs.grid.model.rows
540
-
541
- this.$refs.paged.$refs.grid.model.rows=[]
542
+ this.$refs.paged.$refs.grid.model.rows = []
542
543
  let temp = rows[index - 1]
543
- rows[index-1]=rows[index]
544
- rows[index]=temp
545
- console.log("--------------this.$refs.paged.$refs.grid.model.rows,",rows)
544
+ rows[index - 1] = rows[index]
545
+ rows[index] = temp
546
+ console.log('--------------this.$refs.paged.$refs.grid.model.rows,', rows)
546
547
 
547
- let tempsort=rows[index - 1].f_meter_book_sort
548
- rows[index-1].f_meter_book_sort=rows[index].f_meter_book_sort
549
- rows[index].f_meter_book_sort=tempsort
550
- this.$refs.paged.$refs.grid.model.rows=rows
548
+ let tempsort = rows[index - 1].f_meter_book_sort
549
+ rows[index - 1].f_meter_book_sort = rows[index].f_meter_book_sort
550
+ rows[index].f_meter_book_sort = tempsort
551
+ this.$refs.paged.$refs.grid.model.rows = rows
552
+ }
553
+ },
554
+ // 移出表册
555
+ async delete (index, row) {
556
+ let param = {
557
+ f_userfiles_id: row.f_userfiles_id,
558
+ version: row.fileversion,
559
+ f_meter_book_sort: '',
560
+ f_meter_book_num: ''
551
561
  }
562
+ let http = new HttpResetClass()
563
+ await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
564
+ param,
565
+ {resolveMsg: null, rejectMsg: '保存失败'})
566
+ this.$refs.paged.$refs.criteria.search()
552
567
  },
553
568
  close () {
554
569
  this.show = false
@@ -626,7 +641,7 @@
626
641
  },
627
642
 
628
643
  selfSearch (args) {
629
- this.editsort=false
644
+ this.editsort = false
630
645
  args.condition = `${args.condition} and f_meter_book_num = '${this.f_meterbook_num}'`
631
646
  this.condition = args.condition
632
647
  this.model.search(args.condition, args.model)
@@ -649,15 +664,15 @@
649
664
  // res.f_downloadpath.replace('\\','/')
650
665
  this.$resetpost('api/af-revenue/logic/upLoadBookFile',
651
666
  {data: {
652
- condition: this.condition,
653
- filepath: res.f_downloadpath
654
- }
667
+ condition: this.condition,
668
+ filepath: res.f_downloadpath
669
+ }
655
670
  },
656
671
  {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
657
- this.show = false
658
- this.$showAlert(`导入成功`, 'success', 2000)
659
- this.search()
660
- })
672
+ this.show = false
673
+ this.$showAlert(`导入成功`, 'success', 2000)
674
+ this.search()
675
+ })
661
676
  }
662
677
  },
663
678
  computed: {
@@ -100,12 +100,6 @@ let otherGasGen = async function (self) {
100
100
  throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
101
101
  } else {
102
102
  await self.$CommonService.updatePassword(self.row, cardRes)
103
- if (self.config.hasPrint) {
104
- self.row.id = result.data.id
105
- self.row.f_bill_type = self.isGas ? '卡表赠气' : '卡表赠费'
106
- self.row.f_bill_style = '普通收据'
107
- self.print = true
108
- }
109
103
  self.$showAlert('赠气成功', 'success', 2000)
110
104
  return result.data.id
111
105
  }
@@ -122,8 +116,8 @@ let otherGasGen = async function (self) {
122
116
  }
123
117
  }
124
118
  let asyncIcTable = async function (self) {
125
- await self.$getConfig(self, 'iotTable')
126
- console.log('机表补费扣费config', self.config)
119
+ await self.$getConfig(self, 'icTable')
120
+ console.log('卡表赠气赠费config', self.config)
127
121
  }
128
122
 
129
123
  export default {
@@ -201,7 +195,14 @@ export default {
201
195
  }
202
196
  this.$resetpost('api/af-revenue/logic/updatefiles', data)
203
197
 
204
- this.$dispatch('success')
198
+ if (this.config.hasPrint) {
199
+ this.row.id = res
200
+ this.row.f_bill_type = this.isGas ? '卡表赠气' : '卡表赠费'
201
+ this.row.f_bill_style = '普通收据'
202
+ this.print = true
203
+ } else {
204
+ this.$dispatch('success')
205
+ }
205
206
  })
206
207
  },
207
208
  pregas () {
@@ -62,7 +62,7 @@
62
62
  import Vue from 'vue'
63
63
  let asyncIotTable = async function (self) {
64
64
  await self.$getConfig(self, 'iotTable')
65
- console.log('机表补费扣费config', self.config)
65
+ console.log('赠气赠费config', self.config)
66
66
  }
67
67
  export default {
68
68
  title: '赠气赠费',
@@ -99,13 +99,10 @@ export default {
99
99
  asyncIotTable(this)
100
100
  if (this.row.f_collection_type === '按气量') {
101
101
  this.model.f_operat_type = ['物联网赠气']
102
+ this.billData.url = 'rs/report/iotGiftGas'
102
103
  } else {
103
104
  this.model.f_operat_type = ['物联网赠费']
104
- }
105
- if (this.row.f_collection_type === '按气量') {
106
- this.billData.url = 'api/af-revenue/report/iotGiftGas'
107
- } else {
108
- this.billData.url = 'api/af-revenue/report/iotGiftFee'
105
+ this.billData.url = 'rs/report/iotGiftFee'
109
106
  }
110
107
  },
111
108
  events: {
@@ -0,0 +1,120 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4 form-group">
7
+ <label for="f_reason" class="font_normal_body">停用原因</label>
8
+ <v-select v-model="model.f_reason"
9
+ placeholder='停用原因'
10
+ :value.sync="model.f_reason"
11
+ :options='reason'
12
+ v-ref:reason
13
+ close-on-select ></v-select>
14
+ </div>
15
+ <div class="col-sm-4 form-group">
16
+ <input type="checkbox" class="large-checkbox" id="f_valveState" v-model="valveStateChecked">
17
+ <label for="f_operator" class="font-size-large">立即关阀</label>
18
+ </div>
19
+ </div>
20
+ <div class="row" style="margin-top:1px;">
21
+ <div class="col-sm-8 form-group">
22
+ <label for="f_reason" class="font_normal_body">备&emsp;&emsp;注</label>
23
+ <input class="input_search" style="width:80%" v-model="model.f_othereason" placeholder="备注"/>
24
+ </div>
25
+ </div>
26
+ </form>
27
+ <div style="text-align:right;">
28
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>确认</button>
29
+ <button class="button_clear" @click="clean()" >取消</button>
30
+ </div>
31
+ </validator>
32
+ </div>
33
+ <upload :blodid="blodid" v-if="false" isremark="true" fusetype="表具停用"></upload>
34
+ </template>
35
+ <script>
36
+ /**
37
+ *综合业务
38
+ 表具停用组件
39
+ */
40
+ export default {
41
+ title: '表具停用',
42
+ props: ['row'],
43
+ data () {
44
+ return {
45
+ valveStateChecked: false,
46
+ blodid: '',
47
+ showupload: true,
48
+ model: {},
49
+ reason: this.$appdata.getParam('停用原因')
50
+ }
51
+ },
52
+ ready () {
53
+ this.blodid = this.row.f_userinfo_id
54
+ },
55
+ methods: {
56
+ async confirm () {
57
+ await this.$LogicService.meterDisable(this.model, this.row)
58
+ let array = [{
59
+ f_user_id: this.row.f_user_id,
60
+ f_userfiles_id: this.row.f_userfiles_id,
61
+ f_alias: this.row.f_alias,
62
+ f_userinfo_id: this.row.f_userinfo_id,
63
+ f_orgname: this.$login.f.orgs,
64
+ f_orgid: this.$login.f.orgid,
65
+ f_meternumber: this.row.f_meternumber
66
+ }]
67
+ if (this.row.f_meter_type === '物联网表' && this.valveStateChecked) {
68
+ let data1 = {
69
+ f_apply_type: '阀门控制',
70
+ userid: array,
71
+ nowDate: new Date(),
72
+ f_apply_value: '关阀',
73
+ f_apply_beizhu: '表具停用自动关阀',
74
+ f_apply_operator: this.$login.f.name
75
+ }
76
+ // 根据复选框的状态添加条件
77
+ if (this.valveStateChecked) {
78
+ data1.f_valveState = 1
79
+ }
80
+ let data2 = {
81
+ userid: array,
82
+ instructtype: '阀门控制',
83
+ isOpen: '关阀',
84
+ instructTitle: '手动关阀',
85
+ reasonInfo: '表具停用自动关阀',
86
+ f_instruct_state: '待发送',
87
+ inputtor: this.$login.f.name
88
+ }
89
+ await this.$resetpost('rs/logic/iot_instructUpdateAndDelect',
90
+ {
91
+ data: {
92
+ data1: data1,
93
+ data2: data2
94
+ }
95
+ })
96
+ }
97
+ this.$dispatch('success')
98
+ },
99
+ clean () {
100
+ this.$dispatch('refresh')
101
+ }
102
+ }
103
+ }
104
+ </script>
105
+
106
+ <style>
107
+ .large-checkbox {
108
+ width: 20px;
109
+ height: 20px;
110
+ transform: scale(1.4);
111
+ margin-right: 14px;
112
+ margin-top: 15px;
113
+ }
114
+
115
+ .font-size-large {
116
+ padding-top: 10px;
117
+ padding-left: 10px;
118
+ font-size: 16px;
119
+ }
120
+ </style>