manage-client 3.3.97 → 3.3.99-sx

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.
@@ -54,6 +54,12 @@
54
54
  :defaultfield="$parent.$parent.defaultfield"
55
55
  titletable="缴费记录报表" :starthead="$parent.$parent.getstart"
56
56
  :sumsmodel="$parent.$parent.sumsmodel"></print-data>
57
+ <button
58
+ class="button_export button_spacing"
59
+ @click="$parent.$parent.batchPrintBill(null,'批量票据补打')"
60
+ v-if="$parent.$parent.authArr.includes('批量补打票据')">
61
+ 批量补打票据
62
+ </button>
57
63
  <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
58
64
 
59
65
  </div>
@@ -547,6 +553,9 @@
547
553
  <th>
548
554
  <nobr>三阶气费</nobr>
549
555
  </th>
556
+ <th v-show="$parent.$parent.$parent.authArr.includes('收费查询票据补打')">
557
+ <nobr>操作</nobr>
558
+ </th>
550
559
 
551
560
  <th><nobr>附件</nobr></th>
552
561
  </tr>
@@ -755,6 +764,9 @@
755
764
  <td style="text-align: center;">
756
765
  <nobr>{{(row.f_stair3fee - 0).toFixed(2)}}</nobr>
757
766
  </td>
767
+ <td style="text-align: center;" v-if="$parent.$parent.$parent.authArr.includes('收费查询票据补打')" ><nobr>
768
+ <button style=" height: 28px;line-height: 16px;" class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.batchPrintBill(row,'票据补打')">票据补打</button>
769
+ </nobr></td>
758
770
  <td style="text-align: center;"><nobr>
759
771
  <button style=" height: 28px;line-height: 16px;" class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.view(row)">查看</button>
760
772
  </nobr></td>
@@ -823,6 +835,12 @@
823
835
  </modal>
824
836
  </div>
825
837
  <high-meter-idcard :show.sync="false" v-ref:highcard ></high-meter-idcard>
838
+ <manage-batch-print-bill
839
+ v-if="batchPrintBillShow"
840
+ :show="batchPrintBillShow"
841
+ :data="batchPrintData"
842
+ :type="operate_type">
843
+ </manage-batch-print-bill>
826
844
  </template>
827
845
 
828
846
  <script>
@@ -912,6 +930,9 @@
912
930
  f_stair3amount:0,
913
931
  f_stair3fee:0,
914
932
  }),
933
+ batchPrintData: [],
934
+ batchPrintBillShow: false,
935
+ operate_type: '',
915
936
  criteriaShow: false,
916
937
  orgCondtionStr: '',
917
938
  // 下拉框
@@ -968,6 +989,31 @@
968
989
  })
969
990
  },
970
991
  methods: {
992
+ async batchPrintBill(row, type){
993
+ this.operate_type = type
994
+ if (this.$refs.paged.$refs.cri.model.f_state.length === 1 && this.$refs.paged.$refs.cri.model.f_state[0] === '有效') {
995
+ if (type === '票据补打') {
996
+ this.batchPrintData.push(row)
997
+ this.$showMessage(`您确定补打本张票据吗???`, ['confirm', 'cancel']).then(async (res) => {
998
+ if (res === 'confirm') {
999
+ this.batchPrintBillShow = true
1000
+ }
1001
+ })
1002
+ } else {
1003
+ this.batchPrintData = this.$refs.paged.$refs.grid.model.rows
1004
+ if (this.batchPrintData.length > 0) {
1005
+ this.$showMessage(`您确定补打本页${this.batchPrintData.length}张票据吗???`, ['confirm', 'cancel']).then(async (res) => {
1006
+ if (res === 'confirm') {
1007
+ this.batchPrintBillShow = true
1008
+ }
1009
+ })
1010
+ } else {
1011
+ this.$showMessage(`请先查询数据!!!`, ['confirm'])
1012
+ }
1013
+ }
1014
+ this.$showMessage(`请选择有效的收费记录进行票据补打!!!`, ['confirm'])
1015
+ }
1016
+ },
971
1017
  async pricetypechanged(){
972
1018
  this.$refs.paged.$refs.cri.model.f_price_name = []
973
1019
  this.pricenames = []
@@ -1215,6 +1261,10 @@
1215
1261
  'getidcard'(IdCard){
1216
1262
  // console.log(param)
1217
1263
  this.$refs.paged.$refs.cri.model.f_info_idnumber=IdCard.strID
1264
+ },
1265
+ 'print-cancel' () {
1266
+ this.batchPrintBillShow = false
1267
+ this.batchPrintData = []
1218
1268
  }
1219
1269
  },
1220
1270
  watch: {
@@ -1267,6 +1317,11 @@
1267
1317
  }
1268
1318
  },
1269
1319
  computed: {
1320
+ authArr () {
1321
+ console.log('this.$login.r:',this.$login.r)
1322
+ console.log('this.$login.r.includes:',this.$login.r.includes('批量打印票据'))
1323
+ return this.$login.r ? this.$login.r : []
1324
+ },
1270
1325
  getstart(){
1271
1326
  return `开始时间:${this.$refs.paged.$refs.cri.model.startDate} 结束时间:${this.$refs.paged.$refs.cri.model.endDate}`
1272
1327
  },
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <div class="auto">
3
+ <modal :show.sync="show" v-ref:modal large backdrop="false" style="overflow-y: auto !important;">
4
+ <header slot="modal-header" class="modal-header" style="text-align: center;">
5
+ <h4 class="modal-title" v-if="type === '票据补打'">{{ data[0].f_type }}票据明细</h4>
6
+ <h4 class="modal-title" v-else>{{ data.type }}票据明细</h4>
7
+ </header>
8
+ <article slot="modal-body" class="modal-body">
9
+ <validator name='v'>
10
+ <form class="form-horizontal select-overspread">
11
+ <div class="row" style="display: flex;justify-content: center;" id='reissue-bill' v-if="type === '票据补打'">
12
+ {{{bill2.data}}}
13
+ </div>
14
+ <div class="row" style="display: flex;justify-content: center;" id='reissue-bill' v-show="false">
15
+ {{{bill.data}}}
16
+ </div>
17
+ </form>
18
+ </validator>
19
+ </article>
20
+ <footer slot="modal-footer" class="modal-footer">
21
+ <button type="button" class="btn btn-success" @click='print()' >打印</button>
22
+ <report-print id='reissue-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="false"
23
+ :showbtn="false" v-ref:reportprint></report-print>
24
+ <button class="btn btn-default" @click="clean()">取消</button>
25
+ </footer>
26
+ </modal>
27
+ </div>
28
+ </template>
29
+ <script>
30
+ import {DataModel} from "vue-client";
31
+
32
+ let getBillData = async function (self) {
33
+ console.log('看看执行了吗?')
34
+ // 显示票据
35
+ let billurl = self.getBillUrl(self.data[0].f_type)
36
+ self.bill2 = new DataModel(billurl, {reprint: "'补打'"})
37
+ await self.bill2.search(self.data[0].id)
38
+ }
39
+
40
+ export default {
41
+ title: '批量打印票据',
42
+ data() {
43
+ return {
44
+ messText: '',
45
+ bill: {data: ''},
46
+ bill2: Object,
47
+ sellingData: [],
48
+ timeOut: this.$appdata.getSingleValue('打印票据间隔时间') ? this.$appdata.getSingleValue('打印票据间隔时间') : 1000,
49
+ printControl: null
50
+ }
51
+ },
52
+ props: ['show', 'data', 'type'],
53
+ ready() {
54
+ this.$nextTick(function () {
55
+ if (this.type === '票据补打') {
56
+ getBillData(this)
57
+ }
58
+ })
59
+ },
60
+ methods: {
61
+ clean() {
62
+ this.$dispatch('print-cancel', '票据补打', this.row)
63
+ },
64
+ async print (select) {
65
+ console.log('select', select)
66
+ let self = this
67
+ // 进行补打
68
+ try {
69
+ if (self.type === '票据补打') {
70
+ self.$refs.reportprint.print()
71
+ } else {
72
+ console.log('走的批量补打')
73
+ for (let row of self.data) {
74
+ let billUrl = await self.getBillUrl(row.f_type)
75
+ let bill = await self.$resetpost(billUrl, {
76
+ data: {
77
+ condition: row.id,
78
+ reprint: "'补打'"
79
+ }
80
+ }, {resolveMsg: null})
81
+ self.bill.data = bill.data
82
+ self.$nextTick(function () {
83
+ setTimeout(function () {
84
+ self.asyncPrint(select)
85
+ }, parseInt(self.timeOut))
86
+ })
87
+ self.printControl = null
88
+ }
89
+ self.$dispatch('reissue-success')
90
+ }
91
+ } catch (error) {
92
+ self.$dispatch('refresh')
93
+ }
94
+ },
95
+ getBillUrl (type) {
96
+ let name = ''
97
+ // 根据type数据 选择调用的Logic
98
+ if (type === '过户') {
99
+ name = 'rs/report/transfer_bill'
100
+ } else if (type === '换表') {
101
+ name = 'rs/report/change_meter'
102
+ } else if (type === '机表收费') {
103
+ name = 'rs/report/machine_bill'
104
+ } else if (type === '物联网收费' || type === '物联网开户' || type === '物联网赠气') {
105
+ name = 'rs/report/iot_bill'
106
+ } else if (type === '物联网补费' || type === '物联网扣费' || type === '物联网补气' || type === '物联网扣气' || type === '机表补费' || type === '机表扣费') {
107
+ name = 'rs/report/MakeUp'
108
+ } else if (type === '超用收费') {
109
+ name = 'rs/report/overuse_bill'
110
+ } else if (type === '其他收费') {
111
+ name = 'rs/report/otherCharge_bill'
112
+ } else if (type === '补卡') {
113
+ name = 'rs/report/replace_sell'
114
+ } else if (type === '发卡售气') {
115
+ name = 'rs/report/sendCard_bill'
116
+ } else if (type === '卡表收费' || type === '卡表赠气' || type === '卡表收费撤销') {
117
+ name = 'rs/report/card_bill'
118
+ } else if (type === '预存缴费') {
119
+ name = 'rs/report/pre_sell'
120
+ } else if (type === '退费') {
121
+ name = 'rs/report/refund_sell'
122
+ } else if (type === '调价补费') {
123
+ name = 'rs/report/compensation_bill'
124
+ } else if (type === '数码表收费') {
125
+ name = 'rs/report/digtial_bill'
126
+ }
127
+ return name
128
+ },
129
+ async asyncPrint (select) {
130
+ return new Promise(async (resolve) => {
131
+ this.printControl = resolve
132
+ this.$refs.reportprint.print(select)
133
+ })
134
+ }
135
+ },
136
+ events: {
137
+ 'print'() {
138
+ this.printControl('打印完成')
139
+ },
140
+ 'print-error'() {
141
+ this.$showAlert('打印失败,若有需要,请补打发票', 'error', 3)
142
+ this.$dispatch('error', '票据补打', this.data, null)
143
+ }
144
+ }
145
+ }
146
+ </script>
147
+
148
+ <style>
149
+ </style>
@@ -70,7 +70,7 @@
70
70
  close-on-select></v-select>
71
71
  </div>
72
72
  <div class="col-sm-2 form-group">
73
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人数&nbsp;&nbsp;&nbsp;</label>
73
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;人数&nbsp;&nbsp;&nbsp;&nbsp;</label>
74
74
  <input type="text" style="width:60%" class="input_search" v-model="model.f_people_num"
75
75
  condition="f_people_num = '{}'" placeholder="人数">
76
76
  </div>
@@ -143,7 +143,7 @@
143
143
  <!-- </div>-->
144
144
 
145
145
  <div class="col-sm-2 form-group">
146
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;</label>
146
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;小区&nbsp;&nbsp;&nbsp;&nbsp;</label>
147
147
  <v-select :value.sync="model.f_residential_area"
148
148
  class="select_list select"
149
149
  enter-push
@@ -156,17 +156,17 @@
156
156
  </v-select>
157
157
  </div>
158
158
  <div class="col-sm-2 form-group">
159
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;楼栋&nbsp;&nbsp;&nbsp;</label>
159
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;楼栋&nbsp;&nbsp;&nbsp;&nbsp;</label>
160
160
  <input type="text" style="width:60%" class="input_search" v-model="model.f_building"
161
161
  condition="f_building like '%{}%'" placeholder="楼栋"/>
162
162
  </div>
163
163
  <div class="col-sm-2 form-group">
164
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;单元&nbsp;&nbsp;&nbsp;</label>
164
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;单元&nbsp;&nbsp;&nbsp;&nbsp;</label>
165
165
  <input type="text" style="width:60%" class="input_search" v-model="model.f_unit"
166
166
  condition="f_unit like '%{}%'" placeholder="单元"/>
167
167
  </div>
168
168
  <div class="col-sm-2 form-group">
169
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;楼层&nbsp;&nbsp;</label>
169
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;楼层&nbsp;&nbsp;&nbsp;&nbsp;</label>
170
170
  <input type="text" style="width:60%" class="input_search" v-model="model.f_floor"
171
171
  condition="f_floor like '%{}%'" placeholder="楼层"/>
172
172
  </div>
@@ -181,12 +181,12 @@
181
181
  condition="f_balance >= '{}'" placeholder="最小值">
182
182
  </div>
183
183
  <div class="col-sm-2 form-group">
184
- <label class="font_normal_body">&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;</label>
184
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
185
185
  <input type="text" style="width:60%" class="input_search" v-model="model.balance2"
186
186
  condition="f_balance <= '{}'" placeholder="最大值">
187
187
  </div>
188
188
  <div class="col-sm-2 form-group">
189
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;抄表员</label>
189
+ <label class="font_normal_body">&nbsp;&nbsp;抄表员&nbsp;</label>
190
190
  <v-select :value.sync="model.f_inputtor"
191
191
  v-model="model.f_inputtor" condition="f_inputtor = '{}'"
192
192
  :options='$parent.$parent.inputtores' placeholder='请选择'
@@ -289,7 +289,7 @@
289
289
  </datepicker>
290
290
  </div>
291
291
  <div class="col-sm-2 form-group">
292
- <label for="endDate" class="font_normal_body" title="开户结束日期">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
292
+ <label for="endDate" class="font_normal_body" title="开户结束日期">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
293
293
  <datepicker id="endDate" placeholder="开户结束日期" style="width:60%"
294
294
  v-model="model.endOpenDate"
295
295
  :value.sync="model.endOpenDate"