sale-client 4.2.76 → 4.2.78

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