sale-client 4.2.21 → 4.2.23

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 (52) hide show
  1. package/build/dev-server.js +45 -25
  2. package/package.json +1 -1
  3. package/src/App.vue +1 -1
  4. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  5. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  6. package/src/components/revenue/comprehen/ComprehenOperation/newchangemeter/ChangeMeter.vue +2 -0
  7. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  8. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  9. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +970 -970
  10. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  11. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  12. package/src/filiale/bayan/StockListmain.vue +543 -543
  13. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  14. package/src/filiale/jinhong/machineDown.vue +7 -8
  15. package/src/filiale/jinhong/plugins/LoadParams.js +1 -1
  16. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  17. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  18. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  19. package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
  20. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  21. package/src/filiale/ronghao/CardService.js +2144 -2144
  22. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  23. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  24. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  25. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  26. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  27. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  28. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  29. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  30. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  31. package/src/filiale/ronghao/Upload.vue +654 -654
  32. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  33. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  34. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  35. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  36. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  37. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  38. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  39. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  40. package/src/filiale/ronghao/specificInformation.vue +537 -537
  41. package/src/filiale/yangchun/ChargeList.vue +954 -954
  42. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  43. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  44. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  45. package/src/main.js +1 -1
  46. package/src/plugins/CardService.js +2217 -2217
  47. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  48. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  49. package/.gradle/5.2.1/gc.properties +0 -0
  50. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  51. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  52. package/.gradle/vcs-1/gc.properties +0 -0
@@ -1,343 +1,343 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="span" style="overflow-y: auto;">
4
- <validator name='v'>
5
- <form novalidate class="form-horizontal">
6
- <div class="row">
7
- <div class="col-sm-4">
8
- <label class=" font_normal_body">调价补差</label>
9
- <v-select v-model="f_compensation_type"
10
- placeholder='请选择'
11
- :value-single="true"
12
- :value.sync="model.f_compensation_type"
13
- :options='compensationTypes'
14
- close-on-select clear-button></v-select>
15
- </div>
16
- <div class="col-sm-4">
17
- <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
18
- <v-select v-model="f_payment"
19
- placeholder='请选择'
20
- :value.sync="model.f_payment"
21
- :options='paytype'
22
- close-on-select clear-button></v-select>
23
- </div>
24
- <div class="col-sm-4" :class="[$v.printstyle.required ? 'select-error' : '']">
25
- <label for="f_print" class="font_normal_body">打印格式</label>
26
- <input type="text" v-show="false" v-model="$refs.printstyle.selectedItems" v-validate:printstyle='{required: true }'>
27
- <v-select id="print"
28
- v-model="f_print"
29
- placeholder='请选择'
30
- :multiple="mulPrint"
31
- :value.sync="model.f_print"
32
- :options='printstyle'
33
- close-on-select clear-button v-ref:printstyle>
34
- </v-select>
35
- </div>
36
- </div>
37
- <div class="row" style="margin-top:6px;">
38
- <div class="col-sm-8">
39
- <label for="f_comments" class="font_normal_body">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
40
- <input class="input_search" style="width:80%" v-model="model.f_comments" rows="1" placeholder="备注">
41
- </div>
42
- <div class="col-sm-4" :class="[$v.f_preamount.required || $v.f_preamount.dctest ? 'has-error' : 'has-success']">
43
- <label for="f_collection" class="font_normal_body" v-if="model.f_compensation_type == '调价补费'">应补金额</label>
44
- <label for="f_collection" class="font_normal_body" v-else>应退金额</label>
45
- <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
46
- readonly
47
- v-scale="[model.f_preamount, 4]" v-validate:f_preamount='{required: true, dctest: [(model.f_preamount - 0), ">=" ] }' placeholder="补费金额">
48
- </div>
49
-
50
- </div>
51
- <div class="row" style="margin-top:6px;">
52
- <div class="col-sm-4">
53
- <label for="f_balance" class="font_normal_body">上期结余</label>
54
- <input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
55
- v-scale="[model.f_balance, 4]" placeholder="上期结余" disabled>
56
- </div>
57
-
58
- <div class="col-sm-4">
59
- <label for="f_curbalance" class="font_normal_body">本期结余</label>
60
- <input class="input_search" style="width:60%" type="number" v-model="curbalance"
61
- v-scale="[curbalance, 2]" placeholder="本期结余" disabled>
62
- </div>
63
- <div class="col-sm-4" :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
64
- <label for="f_collection" class=" font_normal_body">实际收款</label>
65
- <input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
66
- v-scale="[model.f_collection, 4]" v-validate:f_preamount='{required: true, dctest: [(model.f_preamount - 0), ">=" ] }'
67
- placeholder="实际收款" >
68
- </div>
69
- <div class="row" style="margin-top:6px;">
70
- <!--<div class="col-sm-4">-->
71
- <!--<label for="f_change_price" class="font_normal_body">补差单价</label>-->
72
- <!--<input class="input_search" style="width:60%" type="number" v-model="model.f_change_price"-->
73
- <!--v-scale="[model.f_change_price, 4]" placeholder="补差单价" readonly>-->
74
- <!--</div>-->
75
- <div class="col-sm-4">
76
- <label for="f_real_amount" class="font_normal_body">补差气量</label>
77
- <input class="input_search" style="width:60%" type="number" v-model="model.f_real_amount"
78
- v-scale="[model.f_real_amount, 4]" placeholder="补差气量" readonly>
79
- </div>
80
- <div class="col-sm-4" :class="[$v.f_surplus_fee.required ? 'has-error' : 'has-success']">
81
- <label for="f_surplus_fee" class="font_normal_body">补差金额</label>
82
- <input class="input_search" style="width:60%" type="number" v-model="model.f_surplus_fee"
83
- v-scale="[model.f_surplus_fee, 4]" placeholder="补差金额" v-validate:f_surplus_fee='{required: true}' >
84
- </div>
85
- </div>
86
- </div>
87
- </form>
88
- <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
89
- <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
90
- <div style="text-align:right; height: 25%">
91
- <strong style="font-size: large" v-if="!config.notShowFormula">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
92
- <payment-code-button :clickable="!$v.valid || clickConfirm"
93
- :payment.sync="model.f_payment" :payment-data="paytype"
94
- @confirm-payment="confirm()">
95
- </payment-code-button>
96
- <button class="button_search btn-gn" type="submit" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
97
- <button class="button_clear btn-gn" @click="clean()">取消</button>
98
- </div>
99
- </validator>
100
- </div>
101
- </div>
102
- <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
103
- <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="调价补差"></upload>
104
- </template>
105
- <script>
106
- import {HttpResetClass} from 'vue-client'
107
-
108
- /**
109
- *综合业务
110
- *调价补差收费组件
111
- */
112
-
113
- let compensationChargeGen = async function (self) {
114
- try {
115
- if (self.paymentModel.length === 0) {
116
- self.paymentModel = [{
117
- f_payment: self.model.f_payment[0],
118
- f_money: self.model.f_preamount
119
- }]
120
- }
121
- self.model.payments = self.paymentModel
122
-
123
- let param = Object.assign({}, {}, self.model)
124
- param.f_payment = self.model.f_payment.toString()
125
- param.f_print = self.model.f_print.toString()
126
- // 加入扫码盒付款码支付流水号
127
- param.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
128
- let res = await self.$resetpost('api/af-revenue/logic/sale_compensationJB_logic', {data: param}, {
129
- warnMsg: `确定对客户${self.row.f_user_name}进行调价补差吗?`,
130
- resolveMsg: '调价补差成功!!',
131
- rejectMsg: '调价补差出错!!!'
132
- })
133
- // 开始打票
134
- console.log('开始打票', self.config)
135
- if (self.config.hasPrint) {
136
- if (self.config.printType != '电子发票') {
137
- if (self.config.hasBillManage) {
138
- // 启用发票管理,获取票据管理中的票号并存储记录
139
- self.row.id = res.data.id
140
- self.row.f_bill_type = '调价补差'
141
- self.row.f_bill_style = self.model.f_print[0]
142
- self.print = true
143
- } else {
144
- self.row.id = res.data.id
145
- self.print = true
146
- }
147
- } else if (self.config.printType === '国税发票') {
148
- // TODO
149
- } else if (self.config.printType === '电子发票') {
150
- // TODO
151
- }
152
- } else {
153
- self.$dispatch('success')
154
- }
155
- } catch (error) {
156
- if (error.status === 301) {
157
- self.$dispatch('refresh')
158
- } else {
159
- if (error) {
160
- self.$showAlert(error, 'danger', 0)
161
- }
162
- }
163
-
164
- self.$dispatch('refresh')
165
- }
166
- }
167
- let asyncCardMeterCenter = async function (self) {
168
- await self.$getConfig(self, 'JbCompensation')
169
- console.log('卡表收费config', self.config)
170
- self.blodid = self.row.f_userinfo_id
171
- // 默认打印格式
172
- self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
173
- self.model.f_payment = [self.config.payment]
174
- self.mulPrint = self.config.printType instanceof Array
175
- let http = new HttpResetClass()
176
- let getSurplus = await http.load('POST', 'api/af-revenue/sql/singleTable_OrderBy',
177
- {data: {items: 'min(id) minid,f_user_id,sum(f_real_amount) f_real_amount,f_userinfo_id,sum(f_surplus_fee) f_surplus_fee',
178
- tablename: 't_surplus_detail',
179
- condition: `f_userinfo_id = '${self.row.f_userinfo_id}' and f_state='有效' and f_whether_pay = '否' GROUP BY f_user_id,f_userinfo_id`,
180
- orderitem: 'f_userinfo_id'}},
181
- {resolveMsg: null, rejectMsg: null})
182
- if (getSurplus.data.length > 0) {
183
- self.row.f_surplus_id = getSurplus.data[0].minid
184
- self.model.f_preamount = getSurplus.data[0].f_surplus_fee
185
- self.model.f_collection = getSurplus.data[0].f_surplus_fee
186
- self.model.f_surplus_fee = getSurplus.data[0].f_surplus_fee
187
- self.model.f_real_amount = getSurplus.data[0].f_real_amount
188
- // self.model.f_change_price=getSurplus.data[0].f_change_price
189
- }
190
- // self.model.f_price = getPrice.data[0].f_price
191
- // 获取当前票号用
192
- self.model.f_use_type = self.config.billType
193
- self.model.f_bill_type = self.model.f_print
194
- self.hasValidateBill = self.config.hasBillManage
195
- }
196
- export default {
197
- title: '机表调价补差收费',
198
- data () {
199
- return {
200
- config: {
201
- notShowFormula: false, // 不显示计算公式,默认显示
202
- // 控制附件显示
203
- showupload: false,
204
- hasPrint: false, // 默认打票
205
- hasBillManage: false, // 默认不启用发票管理
206
- billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
207
- printType: '普通收据', // 收据/电子票/专用发票/国税发票
208
- payment: '现金缴费'
209
- },
210
- model: {
211
- f_compensation_type: '调价补费',
212
- f_print: '',
213
- f_balance: '',
214
- f_preamount: '',
215
- f_payment: '',
216
- f_collection: '',
217
- f_surplus_fee: '',
218
- f_real_amount: ''
219
- // f_change_price:''
220
- },
221
- blodid: '',
222
- // 启用发票管理需要对票号进行验证
223
- hasValidateBill: false,
224
- validateOk: false,
225
- print: false,
226
- billData: {
227
- url: 'api/af-revenue/report/compensation_bill',
228
- billnumber: ''
229
- },
230
- paymentModel: [],
231
- mulPrint: false,
232
- clickConfirm: false, // 控制确认按钮只能点击一次
233
- // 下拉框值
234
- paytype: this.$appdata.getParam('付款方式'),
235
- printstyle: this.$appdata.getParam('打印格式'),
236
- compensationTypes: [{label: '调价补费', value: '调价补费'}]
237
- }
238
- },
239
- props: ['row'],
240
- ready () {
241
- this.model.f_balance = this.row.f_balance
242
- asyncCardMeterCenter(this)
243
- },
244
- watch: {
245
- 'model.f_payment.length' (val) {
246
- console.log('付款方式多选。。', val)
247
- if (val > 1 && !this.model.f_preamount) {
248
- this.model.f_payment = ['现金缴费']
249
- this.$showAlert('请先计算付款金额', 'warning', 2000)
250
- } else {
251
- this.paymentModel = []
252
-
253
- this.model.f_payment.forEach((res) => {
254
- let temp = {
255
- f_payment: res,
256
- f_money: 0
257
- }
258
- this.paymentModel.push(temp)
259
- })
260
- this.$resetValidation()
261
- }
262
- }
263
- },
264
- methods: {
265
- async confirm () {
266
- this.clickConfirm = true
267
- this.$dispatch('no-button')
268
- this.model.f_userinfo_id = this.row.f_userinfo_id
269
- this.model.f_userfiles_id = this.row.f_userfiles_id
270
- this.model.version = this.row.version
271
- this.model.f_surplus_id = this.row.f_surplus_id
272
- this.model.f_user_id = this.row.f_user_id
273
- this.model.f_total_fee = ((this.row.f_total_fee - 0) + (this.model.f_collection - 0)).toFixed(2)
274
- this.model.f_total_usegas_amount = ((this.row.f_total_usegas_amount - 0) + (this.model.f_collection - 0)).toFixed(2)
275
- this.model.f_total_gas = (this.row.f_total_gas - 0)
276
- this.model.f_balance = this.row.f_balance - 0
277
- this.model.f_curbalance = this.row.f_balance - 0
278
- this.model.f_user_name = this.row.f_user_name
279
- this.model.f_user_type = this.row.f_user_type
280
- this.model.f_meter_type = this.row.f_meter_type
281
- this.model.f_price_id = this.row.f_price_id
282
- this.model.f_meter_brand = this.row.f_meter_brand
283
- this.model.f_meter_style = this.row.f_meter_style
284
- this.model.f_stairprice_id = this.row.f_stairprice_id
285
- this.model.f_gasproperties = this.row.f_gasproperties
286
- this.model.f_address = this.row.f_address
287
- this.model.f_collection2 = (this.model.f_collection - 0) - (this.model.f_preamount - 0)
288
- this.model.f_curbalance2 = this.curbalance
289
- this.model.f_collection = (this.model.f_compensation_type == '调价补费' ? this.model.f_preamount : (0 - this.model.f_preamount))
290
- this.model.f_times = this.row.f_times
291
- this.model.f_type = this.model.f_compensation_type
292
- this.model.f_state = '有效'
293
- this.model.f_operat_type = this.model.f_compensation_type
294
- this.model.f_describe = `${this.$login.f.name}对${this.row.f_user_name}进行${this.model.f_compensation_type}操作`
295
- this.model.f_operator = this.$login.f.name
296
- this.model.f_operatorid = this.$login.f.id
297
- this.model.f_orgid = this.row.f_orgid
298
- this.model.f_orgname = this.row.f_orgname
299
- this.model.f_depid = this.$login.f.depids
300
- this.model.f_depname = this.$login.f.deps
301
- // 先调用付款码支付组件流程
302
- let ss = await this.$refs.paymentcode.flowPath()
303
- this.$refs.paymentcode.paymentCodeShow = false
304
- console.log('付款码操作返回', ss)
305
- if (!ss.result) return
306
- compensationChargeGen(this)
307
- },
308
- clean () {
309
- this.$info('取消操作')
310
- this.$dispatch('refresh', this.row)
311
- },
312
- validateBill (val) {
313
- this.validateOk = !val.isOk
314
- this.billData.bill = val.bill
315
- },
316
- printok () {
317
- // 收据打完,判断是否还有其他票据进行请求
318
- // for (let i = 0; i < this.model.f_print.length; i++) {
319
- // if (this.model.f_print[i] === '电子发票') {
320
- // this.$CommonService.openEticket(this.row.id, '售气收费')
321
- // }
322
- // }
323
- this.$dispatch('success')
324
- },
325
- close () {
326
- this.print = false
327
- this.clean()
328
- }
329
- },
330
- computed: {
331
- 'curbalance' () {
332
- if (this.model.f_collection) {
333
- return ((this.row.f_balance - 0) + ((this.model.f_collection - 0) - (this.model.f_preamount - 0))).toFixed(2)
334
- } else {
335
- return this.row.f_balance
336
- }
337
- }
338
- }
339
- }
340
- </script>
341
-
342
- <style>
343
- </style>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: auto;">
4
+ <validator name='v'>
5
+ <form novalidate class="form-horizontal">
6
+ <div class="row">
7
+ <div class="col-sm-4">
8
+ <label class=" font_normal_body">调价补差</label>
9
+ <v-select v-model="f_compensation_type"
10
+ placeholder='请选择'
11
+ :value-single="true"
12
+ :value.sync="model.f_compensation_type"
13
+ :options='compensationTypes'
14
+ close-on-select clear-button></v-select>
15
+ </div>
16
+ <div class="col-sm-4">
17
+ <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
18
+ <v-select v-model="f_payment"
19
+ placeholder='请选择'
20
+ :value.sync="model.f_payment"
21
+ :options='paytype'
22
+ close-on-select clear-button></v-select>
23
+ </div>
24
+ <div class="col-sm-4" :class="[$v.printstyle.required ? 'select-error' : '']">
25
+ <label for="f_print" class="font_normal_body">打印格式</label>
26
+ <input type="text" v-show="false" v-model="$refs.printstyle.selectedItems" v-validate:printstyle='{required: true }'>
27
+ <v-select id="print"
28
+ v-model="f_print"
29
+ placeholder='请选择'
30
+ :multiple="mulPrint"
31
+ :value.sync="model.f_print"
32
+ :options='printstyle'
33
+ close-on-select clear-button v-ref:printstyle>
34
+ </v-select>
35
+ </div>
36
+ </div>
37
+ <div class="row" style="margin-top:6px;">
38
+ <div class="col-sm-8">
39
+ <label for="f_comments" class="font_normal_body">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
40
+ <input class="input_search" style="width:80%" v-model="model.f_comments" rows="1" placeholder="备注">
41
+ </div>
42
+ <div class="col-sm-4" :class="[$v.f_preamount.required || $v.f_preamount.dctest ? 'has-error' : 'has-success']">
43
+ <label for="f_collection" class="font_normal_body" v-if="model.f_compensation_type == '调价补费'">应补金额</label>
44
+ <label for="f_collection" class="font_normal_body" v-else>应退金额</label>
45
+ <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
46
+ readonly
47
+ v-scale="[model.f_preamount, 4]" v-validate:f_preamount='{required: true, dctest: [(model.f_preamount - 0), ">=" ] }' placeholder="补费金额">
48
+ </div>
49
+
50
+ </div>
51
+ <div class="row" style="margin-top:6px;">
52
+ <div class="col-sm-4">
53
+ <label for="f_balance" class="font_normal_body">上期结余</label>
54
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
55
+ v-scale="[model.f_balance, 4]" placeholder="上期结余" disabled>
56
+ </div>
57
+
58
+ <div class="col-sm-4">
59
+ <label for="f_curbalance" class="font_normal_body">本期结余</label>
60
+ <input class="input_search" style="width:60%" type="number" v-model="curbalance"
61
+ v-scale="[curbalance, 2]" placeholder="本期结余" disabled>
62
+ </div>
63
+ <div class="col-sm-4" :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
64
+ <label for="f_collection" class=" font_normal_body">实际收款</label>
65
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
66
+ v-scale="[model.f_collection, 4]" v-validate:f_preamount='{required: true, dctest: [(model.f_preamount - 0), ">=" ] }'
67
+ placeholder="实际收款" >
68
+ </div>
69
+ <div class="row" style="margin-top:6px;">
70
+ <!--<div class="col-sm-4">-->
71
+ <!--<label for="f_change_price" class="font_normal_body">补差单价</label>-->
72
+ <!--<input class="input_search" style="width:60%" type="number" v-model="model.f_change_price"-->
73
+ <!--v-scale="[model.f_change_price, 4]" placeholder="补差单价" readonly>-->
74
+ <!--</div>-->
75
+ <div class="col-sm-4">
76
+ <label for="f_real_amount" class="font_normal_body">补差气量</label>
77
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_real_amount"
78
+ v-scale="[model.f_real_amount, 4]" placeholder="补差气量" readonly>
79
+ </div>
80
+ <div class="col-sm-4" :class="[$v.f_surplus_fee.required ? 'has-error' : 'has-success']">
81
+ <label for="f_surplus_fee" class="font_normal_body">补差金额</label>
82
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_surplus_fee"
83
+ v-scale="[model.f_surplus_fee, 4]" placeholder="补差金额" v-validate:f_surplus_fee='{required: true}' >
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </form>
88
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
89
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
90
+ <div style="text-align:right; height: 25%">
91
+ <strong style="font-size: large" v-if="!config.notShowFormula">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
92
+ <payment-code-button :clickable="!$v.valid || clickConfirm"
93
+ :payment.sync="model.f_payment" :payment-data="paytype"
94
+ @confirm-payment="confirm()">
95
+ </payment-code-button>
96
+ <button class="button_search btn-gn" type="submit" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
97
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
98
+ </div>
99
+ </validator>
100
+ </div>
101
+ </div>
102
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
103
+ <upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="调价补差"></upload>
104
+ </template>
105
+ <script>
106
+ import {HttpResetClass} from 'vue-client'
107
+
108
+ /**
109
+ *综合业务
110
+ *调价补差收费组件
111
+ */
112
+
113
+ let compensationChargeGen = async function (self) {
114
+ try {
115
+ if (self.paymentModel.length === 0) {
116
+ self.paymentModel = [{
117
+ f_payment: self.model.f_payment[0],
118
+ f_money: self.model.f_preamount
119
+ }]
120
+ }
121
+ self.model.payments = self.paymentModel
122
+
123
+ let param = Object.assign({}, {}, self.model)
124
+ param.f_payment = self.model.f_payment.toString()
125
+ param.f_print = self.model.f_print.toString()
126
+ // 加入扫码盒付款码支付流水号
127
+ param.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
128
+ let res = await self.$resetpost('api/af-revenue/logic/sale_compensationJB_logic', {data: param}, {
129
+ warnMsg: `确定对客户${self.row.f_user_name}进行调价补差吗?`,
130
+ resolveMsg: '调价补差成功!!',
131
+ rejectMsg: '调价补差出错!!!'
132
+ })
133
+ // 开始打票
134
+ console.log('开始打票', self.config)
135
+ if (self.config.hasPrint) {
136
+ if (self.config.printType != '电子发票') {
137
+ if (self.config.hasBillManage) {
138
+ // 启用发票管理,获取票据管理中的票号并存储记录
139
+ self.row.id = res.data.id
140
+ self.row.f_bill_type = '调价补差'
141
+ self.row.f_bill_style = self.model.f_print[0]
142
+ self.print = true
143
+ } else {
144
+ self.row.id = res.data.id
145
+ self.print = true
146
+ }
147
+ } else if (self.config.printType === '国税发票') {
148
+ // TODO
149
+ } else if (self.config.printType === '电子发票') {
150
+ // TODO
151
+ }
152
+ } else {
153
+ self.$dispatch('success')
154
+ }
155
+ } catch (error) {
156
+ if (error.status === 301) {
157
+ self.$dispatch('refresh')
158
+ } else {
159
+ if (error) {
160
+ self.$showAlert(error, 'danger', 0)
161
+ }
162
+ }
163
+
164
+ self.$dispatch('refresh')
165
+ }
166
+ }
167
+ let asyncCardMeterCenter = async function (self) {
168
+ await self.$getConfig(self, 'JbCompensation')
169
+ console.log('卡表收费config', self.config)
170
+ self.blodid = self.row.f_userinfo_id
171
+ // 默认打印格式
172
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
173
+ self.model.f_payment = [self.config.payment]
174
+ self.mulPrint = self.config.printType instanceof Array
175
+ let http = new HttpResetClass()
176
+ let getSurplus = await http.load('POST', 'api/af-revenue/sql/singleTable_OrderBy',
177
+ {data: {items: 'min(id) minid,f_user_id,sum(f_real_amount) f_real_amount,f_userinfo_id,sum(f_surplus_fee) f_surplus_fee',
178
+ tablename: 't_surplus_detail',
179
+ condition: `f_userinfo_id = '${self.row.f_userinfo_id}' and f_state='有效' and f_whether_pay = '否' GROUP BY f_user_id,f_userinfo_id`,
180
+ orderitem: 'f_userinfo_id'}},
181
+ {resolveMsg: null, rejectMsg: null})
182
+ if (getSurplus.data.length > 0) {
183
+ self.row.f_surplus_id = getSurplus.data[0].minid
184
+ self.model.f_preamount = getSurplus.data[0].f_surplus_fee
185
+ self.model.f_collection = getSurplus.data[0].f_surplus_fee
186
+ self.model.f_surplus_fee = getSurplus.data[0].f_surplus_fee
187
+ self.model.f_real_amount = getSurplus.data[0].f_real_amount
188
+ // self.model.f_change_price=getSurplus.data[0].f_change_price
189
+ }
190
+ // self.model.f_price = getPrice.data[0].f_price
191
+ // 获取当前票号用
192
+ self.model.f_use_type = self.config.billType
193
+ self.model.f_bill_type = self.model.f_print
194
+ self.hasValidateBill = self.config.hasBillManage
195
+ }
196
+ export default {
197
+ title: '机表调价补差收费',
198
+ data () {
199
+ return {
200
+ config: {
201
+ notShowFormula: false, // 不显示计算公式,默认显示
202
+ // 控制附件显示
203
+ showupload: false,
204
+ hasPrint: false, // 默认打票
205
+ hasBillManage: false, // 默认不启用发票管理
206
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
207
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
208
+ payment: '现金缴费'
209
+ },
210
+ model: {
211
+ f_compensation_type: '调价补费',
212
+ f_print: '',
213
+ f_balance: '',
214
+ f_preamount: '',
215
+ f_payment: '',
216
+ f_collection: '',
217
+ f_surplus_fee: '',
218
+ f_real_amount: ''
219
+ // f_change_price:''
220
+ },
221
+ blodid: '',
222
+ // 启用发票管理需要对票号进行验证
223
+ hasValidateBill: false,
224
+ validateOk: false,
225
+ print: false,
226
+ billData: {
227
+ url: 'api/af-revenue/report/compensation_bill',
228
+ billnumber: ''
229
+ },
230
+ paymentModel: [],
231
+ mulPrint: false,
232
+ clickConfirm: false, // 控制确认按钮只能点击一次
233
+ // 下拉框值
234
+ paytype: this.$appdata.getParam('付款方式'),
235
+ printstyle: this.$appdata.getParam('打印格式'),
236
+ compensationTypes: [{label: '调价补费', value: '调价补费'}]
237
+ }
238
+ },
239
+ props: ['row'],
240
+ ready () {
241
+ this.model.f_balance = this.row.f_balance
242
+ asyncCardMeterCenter(this)
243
+ },
244
+ watch: {
245
+ 'model.f_payment.length' (val) {
246
+ console.log('付款方式多选。。', val)
247
+ if (val > 1 && !this.model.f_preamount) {
248
+ this.model.f_payment = ['现金缴费']
249
+ this.$showAlert('请先计算付款金额', 'warning', 2000)
250
+ } else {
251
+ this.paymentModel = []
252
+
253
+ this.model.f_payment.forEach((res) => {
254
+ let temp = {
255
+ f_payment: res,
256
+ f_money: 0
257
+ }
258
+ this.paymentModel.push(temp)
259
+ })
260
+ this.$resetValidation()
261
+ }
262
+ }
263
+ },
264
+ methods: {
265
+ async confirm () {
266
+ this.clickConfirm = true
267
+ this.$dispatch('no-button')
268
+ this.model.f_userinfo_id = this.row.f_userinfo_id
269
+ this.model.f_userfiles_id = this.row.f_userfiles_id
270
+ this.model.version = this.row.version
271
+ this.model.f_surplus_id = this.row.f_surplus_id
272
+ this.model.f_user_id = this.row.f_user_id
273
+ this.model.f_total_fee = ((this.row.f_total_fee - 0) + (this.model.f_collection - 0)).toFixed(2)
274
+ this.model.f_total_usegas_amount = ((this.row.f_total_usegas_amount - 0) + (this.model.f_collection - 0)).toFixed(2)
275
+ this.model.f_total_gas = (this.row.f_total_gas - 0)
276
+ this.model.f_balance = this.row.f_balance - 0
277
+ this.model.f_curbalance = this.row.f_balance - 0
278
+ this.model.f_user_name = this.row.f_user_name
279
+ this.model.f_user_type = this.row.f_user_type
280
+ this.model.f_meter_type = this.row.f_meter_type
281
+ this.model.f_price_id = this.row.f_price_id
282
+ this.model.f_meter_brand = this.row.f_meter_brand
283
+ this.model.f_meter_style = this.row.f_meter_style
284
+ this.model.f_stairprice_id = this.row.f_stairprice_id
285
+ this.model.f_gasproperties = this.row.f_gasproperties
286
+ this.model.f_address = this.row.f_address
287
+ this.model.f_collection2 = (this.model.f_collection - 0) - (this.model.f_preamount - 0)
288
+ this.model.f_curbalance2 = this.curbalance
289
+ this.model.f_collection = (this.model.f_compensation_type == '调价补费' ? this.model.f_preamount : (0 - this.model.f_preamount))
290
+ this.model.f_times = this.row.f_times
291
+ this.model.f_type = this.model.f_compensation_type
292
+ this.model.f_state = '有效'
293
+ this.model.f_operat_type = this.model.f_compensation_type
294
+ this.model.f_describe = `${this.$login.f.name}对${this.row.f_user_name}进行${this.model.f_compensation_type}操作`
295
+ this.model.f_operator = this.$login.f.name
296
+ this.model.f_operatorid = this.$login.f.id
297
+ this.model.f_orgid = this.row.f_orgid
298
+ this.model.f_orgname = this.row.f_orgname
299
+ this.model.f_depid = this.$login.f.depids
300
+ this.model.f_depname = this.$login.f.deps
301
+ // 先调用付款码支付组件流程
302
+ let ss = await this.$refs.paymentcode.flowPath()
303
+ this.$refs.paymentcode.paymentCodeShow = false
304
+ console.log('付款码操作返回', ss)
305
+ if (!ss.result) return
306
+ compensationChargeGen(this)
307
+ },
308
+ clean () {
309
+ this.$info('取消操作')
310
+ this.$dispatch('refresh', this.row)
311
+ },
312
+ validateBill (val) {
313
+ this.validateOk = !val.isOk
314
+ this.billData.bill = val.bill
315
+ },
316
+ printok () {
317
+ // 收据打完,判断是否还有其他票据进行请求
318
+ // for (let i = 0; i < this.model.f_print.length; i++) {
319
+ // if (this.model.f_print[i] === '电子发票') {
320
+ // this.$CommonService.openEticket(this.row.id, '售气收费')
321
+ // }
322
+ // }
323
+ this.$dispatch('success')
324
+ },
325
+ close () {
326
+ this.print = false
327
+ this.clean()
328
+ }
329
+ },
330
+ computed: {
331
+ 'curbalance' () {
332
+ if (this.model.f_collection) {
333
+ return ((this.row.f_balance - 0) + ((this.model.f_collection - 0) - (this.model.f_preamount - 0))).toFixed(2)
334
+ } else {
335
+ return this.row.f_balance
336
+ }
337
+ }
338
+ }
339
+ }
340
+ </script>
341
+
342
+ <style>
343
+ </style>