sale-client 4.2.75 → 4.2.76

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 (73) hide show
  1. package/build/dev-server.js +52 -30
  2. package/index.html +7 -2
  3. package/package.json +1 -1
  4. package/src/App.vue +1 -1
  5. package/src/components/charge/business/IOTMeterCenter.vue +3 -2
  6. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  7. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  8. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  9. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  10. package/src/filiale/alashan/business/IOTMeterCenter.vue +1 -1
  11. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  12. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  13. package/src/filiale/bayan/StockListmain.vue +543 -543
  14. package/src/filiale/bazhong/UserInfoDetailManageNew.vue +245 -245
  15. package/src/filiale/bazhong/ic_detail/ChangeMeterQueryUser.vue +370 -370
  16. package/src/filiale/bazhong/sale.js +8 -8
  17. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  18. package/src/filiale/fugou/IOTMeterCenter.vue +904 -0
  19. package/src/filiale/fugou/sale.js +2 -0
  20. package/src/filiale/jiaxian/IOTMeterCenter.vue +1 -1
  21. package/src/filiale/jingyang/charge/IOTMeterCenter.vue +1 -1
  22. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  23. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  24. package/src/filiale/lixianV3/components/charge/IOTMeterCenter.vue +1 -1
  25. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  26. package/src/filiale/qianneng/machine/IOTMeterCenter.vue +1 -1
  27. package/src/filiale/qingtongxia/IOTMeterCenter.vue +1 -1
  28. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  29. package/src/filiale/ronghao/CardService.js +2144 -2144
  30. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  31. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  32. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  33. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  34. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  35. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  36. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  37. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  38. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  39. package/src/filiale/ronghao/Upload.vue +654 -654
  40. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  41. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  42. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  43. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  44. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  45. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  46. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  47. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  48. package/src/filiale/ronghao/specificInformation.vue +537 -537
  49. package/src/filiale/ruihua/IOTMeterCenter.vue +1 -1
  50. package/src/filiale/shimen/IOTMeterCenter.vue +1 -1
  51. package/src/filiale/shiquan/charge/IOTMeterCenter.vue +1 -1
  52. package/src/filiale/xihu/IOTMeterCenter.vue +1 -1
  53. package/src/filiale/yangchun/ChargeList.vue +954 -954
  54. package/src/filiale/yangchun/IOTMeterCenter.vue +1 -1
  55. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  56. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  57. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  58. package/src/main.js +3 -3
  59. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  60. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  61. package/.gradle/5.2.1/gc.properties +0 -0
  62. package/.gradle/8.10/checksums/checksums.lock +0 -0
  63. package/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
  64. package/.gradle/8.10/executionHistory/executionHistory.bin +0 -0
  65. package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
  66. package/.gradle/8.10/fileChanges/last-build.bin +0 -0
  67. package/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
  68. package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
  69. package/.gradle/8.10/gc.properties +0 -0
  70. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  71. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  72. package/.gradle/file-system.probe +0 -0
  73. package/.gradle/vcs-1/gc.properties +0 -0
@@ -0,0 +1,904 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: auto;">
4
+ <div class="auto" style="height: auto; overflow: auto" v-if="owes.length">
5
+ <div v-for="owe of owes">
6
+ <owe-list :row='owe' :floor="config.floor" :charge="true"></owe-list>
7
+ </div>
8
+ </div>
9
+ <validator name='v'>
10
+ <form novalidate class="form-horizontal">
11
+ <div class="row">
12
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
13
+ <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
14
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
15
+ v-validate:payment='{required: true }'>
16
+ <v-select v-model="f_payment"
17
+ placeholder='请选择'
18
+ :value.sync="model.f_payment"
19
+ close-on-select
20
+ :options='paytype' clear-button v-ref:payment></v-select>
21
+ </div>
22
+
23
+ <div class="col-sm-4 form-group"
24
+ :class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
25
+ <label for="f_pregas" class=" font_normal_body">预购气量</label>
26
+ <input class="input_search" style="width:60%" type="number" id="pregasFocue"
27
+ @blur="pregas()" v-model="model.f_pregas"
28
+ :disabled="true"
29
+ v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
30
+ v-next-el='sk'>
31
+ </div>
32
+ <!-- <div class="col-sm-4 form-group" v-if="row.f_collection_type == '按金额'">
33
+ <label for="f_pregas" class=" font_normal_body">预购气量</label>
34
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_pregas" placeholder="预购气量" disabled>
35
+ </div>-->
36
+
37
+ <div class="col-sm-4 form-group"
38
+ :class="[$v.f_preamount.required || $v.f_preamount.dctest? 'has-error' : 'has-success']">
39
+ <label for="f_preamount" class=" font_normal_body">预购金额</label>
40
+ <input class="input_search" style="width:60%"
41
+ @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm)),preamount()"
42
+ @blur="preamount()" type="number" v-model="model.f_preamount" id="f_preamount"
43
+ v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ] }'
44
+ :disabled="config.calculatePreByCollection"
45
+ v-scale="[model.f_preamount, row.f_fee_decimal||4]" placeholder="预购金额">
46
+ </div>
47
+ </div>
48
+ <div class="row" style="margin-top:6px;">
49
+ <div class="col-sm-4 form-group" :class="[$v.printstyle.required ? 'select-error' : '']">
50
+ <label for="f_print" class="font_normal_body">打印格式</label>
51
+ <input type="text" v-show="false" v-model="$refs.printstyle.selectedItems"
52
+ v-validate:printstyle='{required: true }'>
53
+ <v-select id="print"
54
+ v-model="f_print"
55
+ placeholder='请选择'
56
+ :multiple="false"
57
+ :value.sync="model.f_print"
58
+ :options='printstyle'
59
+ close-on-select clear-button v-ref:printstyle>
60
+ </v-select>
61
+ </div>
62
+ <div class="col-sm-4 form-group" v-if="hasLimit&&limitgas">
63
+ <label class="font_normal_body">购气上限</label>
64
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxgas"
65
+ v-scale="[maxgas, 2]" placeholder='限购余气' disabled>
66
+ </div>
67
+ <div class="col-sm-4 form-group" v-if="hasLimit&&limitmoney">
68
+ <label class="font_normal_body">金额上限</label>
69
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
70
+ v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
71
+ </div>
72
+ <div class="col-sm-4 form-group" v-if="!hasLimit">
73
+ </div>
74
+
75
+ <div class="col-sm-4 form-group"
76
+ :class="[$v.f_totalcost.required || $v.f_totalcost.dctest ? 'has-error' : 'has-success']">
77
+ <label for="f_temp_amount" v-if="row.f_collection_type === '按气量'"
78
+ class=" font_normal_body">应收金额</label>
79
+ <label for="f_temp_amount" v-if="row.f_collection_type === '按金额'"
80
+ class=" font_normal_body">本次缴费</label>
81
+ <input class="input_search" style="width:60%" type="number"
82
+ @blur="preamount()" v-model="model.f_totalcost"
83
+ v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
84
+ v-next-el='sk' v-scale="[model.f_totalcost, row.f_fee_decimal||4]" disabled>
85
+ </div>
86
+ </div>
87
+ <div class="row">
88
+ <div class="col-sm-4 form-group">
89
+ <label for="f_balance" class="font_normal_body">上期结余</label>
90
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
91
+ v-scale="[model.f_balance, row.f_fee_decimal||4]" placeholder="上期结余" disabled>
92
+ </div>
93
+
94
+ <div class="col-sm-4 form-group">
95
+ <label for="f_curbalance" class="font_normal_body">本期结余</label>
96
+ <input class="input_search" style="width:60%" type="number" v-model="curbalance"
97
+ v-scale="[model.f_curbalance, row.f_fee_decimal||4]" placeholder="本期结余" disabled>
98
+ </div>
99
+
100
+ <!-- <div class="col-sm-3 form-group" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气'"-->
101
+ <!-- :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">-->
102
+ <!-- <label for="f_collection" class=" font_normal_body">&nbsp;&nbsp;&nbsp;收款&nbsp;&nbsp;&nbsp;</label>-->
103
+ <!-- <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"-->
104
+ <!-- v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0), ">=" ] }'-->
105
+ <!-- v-el:sk v-scale="[model.f_totalcost, 2]" :disabled="$refs.givechange.promptText != ''">-->
106
+ <!-- </div>-->
107
+ <!-- <div class="col-sm-3 form-group" v-if="row.f_collection_type === '按气量' && model.f_payment=='赠气'"-->
108
+ <!-- :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">-->
109
+ <!-- <label for="f_collection" class=" font_normal_body">&nbsp;&nbsp;&nbsp;收款&nbsp;&nbsp;&nbsp;</label>-->
110
+ <!-- <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"-->
111
+ <!-- v-el:sk v-scale="[model.f_totalcost, 2]" :disabled="$refs.givechange.promptText != ''">-->
112
+ <!-- </div>-->
113
+ <div class="col-sm-3 form-group">
114
+ <label for="f_collection" class=" font_normal_body">&nbsp;&nbsp;&nbsp;收款&nbsp;&nbsp;&nbsp;</label>
115
+ <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
116
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
117
+ @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
118
+ v-el:sk v-scale="[model.f_collection, row.f_fee_decimal||4]"
119
+ :disabled="!config.calculatePreByCollection ">
120
+ </div>
121
+ <div class="col-sm-1 form-group">
122
+ <give-change :curbalance="curbalance" :collection.sync="model.f_collection"
123
+ v-ref:givechange></give-change>
124
+ </div>
125
+ </div>
126
+ <div class="row" style="margin-top:5px;">
127
+ <div class="col-sm-9">
128
+ </div>
129
+ <div class="col-sm-3">
130
+ <span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
131
+ </div>
132
+ </div>
133
+ <div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
134
+ <div class="col-sm-4 form-group">
135
+ <label class="font_normal_body">优惠方式</label>
136
+ <v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
137
+ placeholder='请选择'
138
+ :value.sync="model.f_privilege_id"
139
+ :options='privilegeList' clear-button value-single>
140
+ </v-select>
141
+ </div>
142
+ <div class="col-sm-4 form-group">
143
+ <label for="f_preamount" class=" font_normal_body">&nbsp;优惠金额</label>
144
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_privilege_money"
145
+ v-scale="[model.f_privilege_money, row.f_fee_decimal||4]" placeholder="优惠金额" disabled>
146
+ </div>
147
+ <div class="col-sm-4 form-group">
148
+ <label for="f_preamount" class=" font_normal_body">&nbsp;实际收款</label>
149
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_after_discount"
150
+ v-scale="[model.f_after_discount, row.f_fee_decimal||4]" placeholder="优惠后收款" disabled>
151
+ </div>
152
+ </div>
153
+ <div class="row" v-if="model.f_payment[0].includes('POS')">
154
+ <div class="col-sm-4 form-group">
155
+ <label for="f_voucher_number" class="font_normal_body">凭证号</label>
156
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
157
+ placeholder="凭证号">
158
+ </div>
159
+ </div>
160
+ <div class="row" style="padding-top: 0.5em;">
161
+ <div class="col-sm-4" v-if="!mjshow">
162
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
163
+ <input class="input_search" style="width:60%" type="text"
164
+ v-model="model.f_serial_number" placeholder="业务单号">
165
+ </div>
166
+ <div class="col-sm-4" v-if="mjshow"
167
+ :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
168
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
169
+ <input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
170
+ v-model="model.f_serial_number" placeholder="业务单号">
171
+ </div>
172
+
173
+ <div class="col-sm-8">
174
+ <label for="f_comments" class="font_normal_body">&nbsp;&nbsp;&nbsp;备&nbsp;注&nbsp;&nbsp;&nbsp;</label>
175
+ <input class="input_search" style="width:77%" v-model="model.f_comments" rows="1" placeholder="备注">
176
+ </div>
177
+ </div>
178
+
179
+ <div v-if="paymentModel.length >1">
180
+ <div class="row" style="margin-top:10px;">
181
+ <p class="col-sm-2 text-left" style="padding: 10px;"><img src="../../../static/juxing.png"/><strong
182
+ style="margin-left: 4%">付款明细</strong></p>
183
+ </div>
184
+ <div class="row" style="margin-top:10px;">
185
+ <div class="col-sm-4 form-group " v-for="pay in paymentModel">
186
+ <label class="font_normal_body">{{ pay.f_payment }}:</label>
187
+ <input id="f_money" type="text" class="input_search" style="width:60%" v-model="pay.f_money">
188
+ </div>
189
+ <div class="col-sm-4 form-group ">
190
+ <strong v-if="!islegal" style="color: red">所输入的金额必须等于收款金额</strong>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </form>
195
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
196
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close"
197
+ @printok="printok" v-ref:printbill></print-bill>
198
+ <div style="text-align:right; height: 25%">
199
+ <strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
200
+ <strong style="font-size: large"
201
+ v-if="!config.notShowFormula">计算公式:{{ calculatedetail ? calculatedetail : ' 暂无' }}</strong><br/>
202
+ <strong style="font-size: large" v-if="alldue_fee>0">旧表机表欠费:{{ alldue_fee }} 元</strong><br/>
203
+ <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm"
204
+ :payment.sync="model.f_payment" :payment-data="paytype"
205
+ @confirm-payment="confirm()">
206
+ </payment-code-button>
207
+ <button class="button_search btn-gn" type="submit" @click="checkInvoiceMsg()"
208
+ :disabled='!$v.valid || validateOk || !islegal || clickConfirm'>确认
209
+ </button>
210
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
211
+ </div>
212
+ </validator>
213
+ </div>
214
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row"
215
+ :money="model.f_after_discount"></payment-code>
216
+ </div>
217
+ <eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row"
218
+ @confirm="confirm"></eticket-modal>
219
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
220
+ <upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true"
221
+ fusetype="物联网表收费"></upload>
222
+ <!-- <modal :show.sync="showfiles" width="80%"style="width:auto;" v-ref:modal middle backdrop="false">-->
223
+ <!-- <article slot="modal-body">-->
224
+ <!-- <upload :blodid="row.f_userinfo_id" v-ref:upload :fusetype="uploadText" isremark="true" style="width:auto" ></upload>-->
225
+ <!-- </article>-->
226
+ <!-- <footer slot="modal-footer" class="modal-footer">-->
227
+ <!-- </footer>-->
228
+ <!-- </modal>-->
229
+
230
+ </template>
231
+ <script>
232
+ import OweList from '../../components/charge/business/machine/OweList'
233
+ /**
234
+ *综合业务
235
+ *卡表收费组件
236
+ */
237
+
238
+ import {HttpResetClass} from 'vue-client'
239
+
240
+ // 输入金额,换算气量
241
+ /* let preamountGen = async function (self) {
242
+ let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
243
+ self.model.f_preamount = calFee
244
+ self.model.f_collection = self.model.f_totalcost
245
+ } */
246
+ let preamountGen = async function (self) {
247
+ let calFee = self.model.f_preamount
248
+ let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
249
+ if (getGas.data.gas) {
250
+ if (self.row.f_isdecimal === '是') {
251
+ if (self.row.f_alias === 'QiaoSong') {
252
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
253
+ } else {
254
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(self.row.f_gas_decimal || 4)
255
+ }
256
+ self.dymoney = 0
257
+ } else {
258
+ // 如果不支持小数,将划价出的多余非整数气量进行划价为金额
259
+ let tempnum = Math.floor(getGas.data.gas - 0)
260
+ if (getGas.data.gas > tempnum) { // getGas.data.gas-tempnum-0
261
+ let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
262
+ if (dymoney1.data.money) {
263
+ self.dymoney = (getGas.data.money - 0).toFixed(2) - (dymoney1.data.money - 0).toFixed(2)
264
+ }
265
+ } else {
266
+ self.dymoney = 0
267
+ }
268
+ self.model.f_pregas = Math.floor(getGas.data.gas - 0)
269
+ }
270
+ }
271
+ // 不划气量,归零
272
+ if (self.config.priceCalculation) {
273
+ self.model.f_pregas = 0
274
+ }
275
+ self.model.f_totalcost = ((self.row.f_balance - 0) > (self.model.f_preamount - 0) ? 0 : ((self.model.f_preamount - 0) - (self.row.f_balance - 0)).toFixed(self.row.f_fee_decimal || 4))
276
+
277
+ self.model.chargeprice = getGas.data.chargeprice
278
+ Object.assign(self.model, self.model, getGas.data)
279
+ self.model.f_totalcost = ((self.model.f_totalcost - 0) - (self.dymoney - 0) + (self.alldue_fee - 0)).toFixed(self.row.f_fee_decimal || 4)
280
+ if (self.config.floor) {
281
+ self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
282
+ }
283
+ // self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
284
+ self.model.f_collection = self.model.f_totalcost
285
+ self.model.f_preamount = ((getGas.data.chargenum - 0) - (self.dymoney - 0))
286
+ if (self.model.f_payment == '赠气') {
287
+ self.model.f_totalcost = self.model.f_preamount
288
+ self.model.f_collection = 0
289
+ }
290
+ self.calText(getGas.data.chargeprice)
291
+ }
292
+ // 输入气量,换算金额
293
+ let pregasGen = async function (self) {
294
+ if (self.row.f_isdecimal === '是') {
295
+ self.model.f_pregas = (self.model.f_pregas - 0).toFixed(self.row.f_gas_decimal || 4)
296
+ } else {
297
+ self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
298
+ }
299
+ if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
300
+ self.model.f_meter_type = self.row.f_meter_type
301
+ let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
302
+ self.model.f_preamount = getAmount.data.chargenum
303
+ self.model.f_totalcost = (self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(self.row.f_fee_decimal || 4)
304
+ self.model.f_totalcost = ((self.model.f_totalcost - 0) + (self.alldue_fee - 0)).toFixed(self.row.f_fee_decimal || 4)
305
+ Object.assign(self.model, self.model, getAmount.data)
306
+ self.model.chargeprice = getAmount.data.chargeprice
307
+ if (self.config.floor) {
308
+ self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
309
+ }
310
+ self.model.f_collection = self.model.f_totalcost
311
+ if (self.model.f_payment == '赠气') {
312
+ self.model.f_totalcost = getAmount.data.chargenum
313
+ self.model.f_collection = 0
314
+ }
315
+ self.calText(getAmount.data.chargeprice)
316
+ }
317
+ }
318
+
319
+ let IOTChargeGen = async function (self) {
320
+ try {
321
+ if (self.paymentModel.length === 0) {
322
+ self.paymentModel = [{
323
+ f_payment: self.model.f_payment[0],
324
+ f_money: self.model.f_preamount
325
+ }]
326
+ }
327
+
328
+ self.model.payments = self.paymentModel
329
+
330
+ let param = Object.assign({}, {}, self.model)
331
+ param.f_payment = self.model.f_payment.toString()
332
+ param.alldue_fee = self.alldue_fee
333
+ param.f_print = self.model.f_print.toString()
334
+ param.f_serial_number = self.model.f_serial_number ? self.model.f_serial_number : ''
335
+ // 加入扫码盒付款码支付流水号
336
+ param.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.transactionId
337
+ let res = await self.$resetpost('api/af-revenue/logic/sale_IOTCharge_logic', {data: param}, {
338
+ resolveMsg: '物联网收费成功!!',
339
+ rejectMsg: '物联网收费出错!!!'
340
+ })
341
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
342
+ if (localeSustainMoney != null) {
343
+ localeSustainMoney = (localeSustainMoney - 0) + (param.f_collection - 0)
344
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
345
+ }
346
+ if (self.config.showupload) {
347
+ let param1 = []
348
+ for (let row of self.resid) {
349
+ param1.push({id: row.id})
350
+ }
351
+ let data = {
352
+ param: param1,
353
+ f_blobid: res.data.id
354
+ }
355
+ await self.$resetpost('api/af-revenue/logic/updatefiles', data)
356
+ }
357
+ // 开始打票
358
+ console.log('开始打票', self.config)
359
+ if (self.config.hasPrint) {
360
+ if (self.printInvoiceType.indexOf(self.model.f_print) === -1) {
361
+ console.log('self.config.hasBillManage', self.config.hasBillManage)
362
+ if (self.$login.r.includes('非民用纸质票据拆分')) {
363
+ if (self.row.f_user_type === '非民用') {
364
+ self.billData.url = 'api/af-revenue/report/fmy_iot_bill'
365
+ }
366
+ }
367
+ if (self.config.hasBillManage) {
368
+ // 启用发票管理,获取票据管理中的票号并存储记录
369
+ self.row.id = res.data.id
370
+ self.row.f_bill_type = '物联网收费'
371
+ self.row.f_bill_style = self.model.f_print[0]
372
+ self.print = true
373
+ } else {
374
+ self.row.id = res.data.id
375
+ self.print = true
376
+ }
377
+ } else if (self.config.printType === '国税发票') {
378
+ // TODO
379
+ } else if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
380
+ self.eticket_show = true
381
+ self.row.f_print = self.model.f_print[0]
382
+ await self.$refs.eticketbill.openETicket(res.data.id, self.row, '物联网收费', '征税', self.model.f_print[0])
383
+ // self.$CommonService.openEticket(res.data.id, '其他收费')
384
+ // self.$dispatch('success')
385
+ }
386
+ } else {
387
+ self.$dispatch('success', '物联网收费', self.row)
388
+ }
389
+ } catch (error) {
390
+ if (error.status === 301) {
391
+ self.$dispatch('refresh')
392
+ } else {
393
+ if (error) {
394
+ self.$showAlert(error, 'danger', 0)
395
+ }
396
+ }
397
+
398
+ self.$dispatch('refresh')
399
+ }
400
+ }
401
+ let asyncCardMeterCenter = async function (self) {
402
+ await self.$getConfig(self, 'ChangeMeter')
403
+ await self.$getConfig(self, 'IOTMeterCenter')
404
+
405
+ // 添加 “系统余额透支” 付款方式
406
+ let i = -1
407
+ for (const index in self.paytype) {
408
+ if (self.paytype[index].value == '系统余额透支') {
409
+ i = index
410
+ break
411
+ }
412
+ }
413
+ if (self.canOverdraftBalance()) {
414
+ if (i == -1) {
415
+ self.paytype.push({
416
+ label: '系统余额透支',
417
+ value: '系统余额透支'
418
+ })
419
+ }
420
+ } else {
421
+ if (i != -1) {
422
+ self.paytype.splice(i, 1)
423
+ }
424
+ }
425
+
426
+ // 默认打印格式
427
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
428
+ self.model.f_payment = [self.config.payment]
429
+ self.mulPrint = self.config.printType instanceof Array
430
+
431
+ // 获取当前票号用
432
+ self.model.f_use_type = self.config.billType
433
+ self.model.f_bill_type = self.model.f_print
434
+ self.hasValidateBill = self.config.hasBillManage
435
+
436
+ // 判断限购
437
+ let limit_param = {
438
+ f_userinfo_id: self.row.f_userinfo_id,
439
+ f_user_id: self.row.f_user_id,
440
+ f_stairprice_id: self.row.f_stairprice_id
441
+ }
442
+ let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {
443
+ resolveMsg: null,
444
+ rejectMsg: '获取限购值失败!!'
445
+ })
446
+ console.log('获取限购值', getLimit)
447
+ self.hasLimit = getLimit.data.hasLimit
448
+ if (self.hasLimit) {
449
+ if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
450
+ if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
451
+ self.maxmoney = 0
452
+ self.limitmoney = true
453
+ console.log(self.maxmoney, self.limitmoney)
454
+ self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
455
+
456
+ // self.$dispatch('refresh')
457
+ } else {
458
+ if (getLimit.data.f_limit_value) {
459
+ self.maxgas = (getLimit.data.f_limit_value - 0)
460
+ self.limitgas = true
461
+ }
462
+ if (getLimit.data.f_limit_amount) {
463
+ self.maxmoney = (getLimit.data.f_limit_amount - 0)
464
+ self.limitmoney = true
465
+ }
466
+ }
467
+ }
468
+ }
469
+
470
+ if (self.config.hasArrearsChange) {
471
+ let http = new HttpResetClass()
472
+ let res = await http.load('POST', 'api/af-revenue/logic/sale_getOwe', {data: {f_userinfo_id: self.row.f_userinfo_id}}, {
473
+ resolveMsg: null,
474
+ rejectMsg: '获取欠费出错!!'
475
+ })
476
+ let owes = []
477
+ for (let i = 0; i < res.data.length; i++) {
478
+ for (let j = 0; j < res.data[i].rows.length; j++) {
479
+ owes.push(res.data[i].rows[j])
480
+ }
481
+ }
482
+ console.log('获取到的欠费记录', owes)
483
+ self.alldue_fee = owes.reduce((total, item) => {
484
+ return total + (item.f_oughtfee + item.overdue - item.f_debt_money)
485
+ }, 0)
486
+ console.log('总欠费金额为', self.alldue_fee)
487
+ self.owes = res.data
488
+ }
489
+ }
490
+ export default {
491
+ title: '物联网收费',
492
+ data () {
493
+ return {
494
+ resid: [], // 存放新增的f_files表中id
495
+ config: {
496
+ notShowFormula: false, // 不显示计算公式,默认显示
497
+ priceCalculation: false, // 划气量控制
498
+ showupload: true, // 默认显示附件上传组件
499
+ hasPrint: false, // 默认打票
500
+ quickSale: false, // enter键快捷收费
501
+ taxforidnumber: true, // 身份证号同步到纳税人识别号
502
+ floor: true, // 是否取整收费
503
+ hasBillManage: false, // 默认不启用发票管理
504
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
505
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
506
+ payment: '',
507
+ hasArrearsChange: false, // 是否可以有欠费换表 收费时用来判断是否查询旧表欠费
508
+ overdraftBalance: false, // 是否支持系统余额透支
509
+ calculatePreByCollection: false // 可以更具收款来反向计算预购
510
+ },
511
+ model: {
512
+ f_purchase: 0,
513
+ f_payment: [],
514
+ f_pregas: 0,
515
+ f_preamount: 0,
516
+ f_totalcost: 0,
517
+ f_curbalance: 0,
518
+ f_collection: '',
519
+ f_balance: 0,
520
+ f_print: [],
521
+ f_meter_type: '',
522
+ f_voucher_number: '',
523
+ f_privilege_id: 0,
524
+ f_privilege_money: 0,
525
+ f_after_discount: 0,
526
+ f_sys_balance: 0
527
+ },
528
+ randomBusinessId: '',
529
+ eticket_msg: false,
530
+ eticket_show: false,
531
+ invoice_is_pax: '不征税',
532
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
533
+
534
+ calculatedetail: '',
535
+ // 启用发票管理需要对票号进行验证
536
+ hasValidateBill: false,
537
+ validateOk: false,
538
+ alldue_fee: 0, // 欠费金额
539
+ owes: [], // 欠费未交记录
540
+ print: false,
541
+ billData: {
542
+ url: 'api/af-revenue/report/iot_bill',
543
+ operator: this.$login.f.name,
544
+ billnumber: ''
545
+ },
546
+ hasLimit: false,
547
+ maxgas: 99999999, // 限购
548
+ maxmoney: 99999999,
549
+ limitmoney: false,
550
+ limitgas: false,
551
+ paymentModel: [], // 多笔付款方式
552
+
553
+ mulPrint: false,
554
+ clickConfirm: false, // 控制确认按钮只能点击一次
555
+ // 下拉框值
556
+ paytype: this.$appdata.getParam('付款方式'),
557
+ printstyle: this.$appdata.getParam('打印格式'),
558
+ printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
559
+ privilegeList: [{label: '无优惠', value: '0'}],
560
+ showfiles: false,
561
+ serialShow: false,
562
+ mjshow: false,
563
+ dymoney: 0
564
+ }
565
+ },
566
+ components: {OweList},
567
+ props: ['row'],
568
+ mounted () {
569
+ this.$refs.email.focus()
570
+ },
571
+ ready () {
572
+ this.paytype = this.$appdata.getParam('付款方式')
573
+ if (!this.$login.r.includes('免交充值付款')) {
574
+ this.paytype = this.paytype.filter((item) => {
575
+ return item.label != '免交'
576
+ })
577
+ }
578
+ // this.getPurchase()
579
+ this.model.f_price_id = this.row.f_price_id
580
+ this.model.f_user_id = this.row.f_user_id
581
+ this.model.f_userfiles_id = this.row.f_userfiles_id
582
+ this.model.f_userinfo_id = this.row.f_userinfo_id
583
+ this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
584
+ this.model.f_preamount = ''
585
+ this.model.f_pregas = ''
586
+ document.getElementById('f_preamount').focus()
587
+ asyncCardMeterCenter(this)
588
+ this.getRandomId()
589
+ },
590
+ watch: {
591
+ 'model.f_payment.length' (val) {
592
+ console.log('付款方式多选。。', val)
593
+ if (val > 1 && !this.model.f_preamount) {
594
+ this.model.f_payment = ['现金缴费']
595
+ this.$showAlert('请先计算付款金额', 'warning', 2000)
596
+ } else {
597
+ this.paymentModel = []
598
+
599
+ this.model.f_payment.forEach((res) => {
600
+ let temp = {
601
+ f_payment: res,
602
+ f_money: 0
603
+ }
604
+ this.paymentModel.push(temp)
605
+ })
606
+ this.$resetValidation()
607
+
608
+ // 获取计算优惠
609
+ this.getPrivilegeList()
610
+ }
611
+ },
612
+ 'model.f_collection' (val) {
613
+ // 获取计算优惠
614
+ this.getPrivilegeList()
615
+ },
616
+ 'model.f_payment' (val) {
617
+ let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
618
+ if (val == '免交' || _payment.includes(val)) {
619
+ this.mjshow = true
620
+ } else if (val == '赠气' && (this.model.f_preamount || this.model.f_preamount != '')) {
621
+ if (this.row.f_collection_type == '按气量') {
622
+ this.pregas()
623
+ } else {
624
+ this.preamount()
625
+ }
626
+ } else {
627
+ this.mjshow = false
628
+ }
629
+ if (this.row.f_collection_type == '按气量') {
630
+ this.pregas()
631
+ } else {
632
+ this.preamount()
633
+ }
634
+ }
635
+ },
636
+ events: {
637
+ // 删除Resid数组元素
638
+ 'delResid' (val) {
639
+ this.resid.$remove({id: val, f_biobid: ''})
640
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
641
+ },
642
+ // 增加Resid数组元素
643
+ 'resid' (val) {
644
+ console.log('-=', val)
645
+ this.resid.push({id: val, f_biobid: ''})
646
+ }
647
+ },
648
+ methods: {
649
+ // 根据收款金额计算划价信息
650
+ // 需要配置 calculatePreByCollection = true
651
+ async calculatePreByCollection () {
652
+ if (this.alldue_fee > ((this.model.f_collection - 0) + (this.row.f_balance - 0))) {
653
+ this.$showAlert('收款不能小于旧表机表欠费,请重新输入', 'danger', 5000)
654
+ this.model.f_collection = undefined
655
+ return
656
+ }
657
+ try {
658
+ this.model.f_collection = (this.model.f_collection - 0)
659
+ let calFee = ((this.model.f_collection - 0) + (this.row.f_balance) - (this.alldue_fee)).toFixed(4)
660
+ // 通过收款进行划价
661
+ let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
662
+ if (this.row.f_isdecimal === '是') {
663
+ this.model.f_pregas = (getGas.data.gas - 0).toFixed(this.row.f_gas_decimal || 4)
664
+ } else {
665
+ this.model.f_pregas = parseInt(getGas.data.gas)
666
+ }
667
+ let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
668
+ this.model.chargeprice = dymoney2.data.chargeprice
669
+ Object.assign(this.model, this.model, dymoney2.data)
670
+ this.model.f_totalcost = dymoney2.data.chargenum
671
+ this.model.f_preamount = dymoney2.data.chargenum
672
+ this.calText(dymoney2.data.chargeprice)
673
+ } catch (error) {
674
+ console.error(error)
675
+ this.$showAlert(`划价错误,错误类型:${error}`, 'danger', 0)
676
+ this.$dispatch('error', '发卡售气', this.model, error)
677
+ }
678
+ },
679
+ getRandomId () {
680
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
681
+ let res = Math.random() * 16 | 0
682
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
683
+ return v.toString(16)
684
+ })
685
+ },
686
+ // 校验发票信息
687
+ checkInvoiceMsg (flag) {
688
+ if (flag) return
689
+ // 校验是否超出最大透支余额
690
+ if (this.model.f_payment == '系统余额透支') {
691
+ const maxOverdraftBalance = -(((this.$appdata.getSingleValue('最大透支余额') - 0) || 1000) - 0)
692
+ const curSysBalance = ((this.row.f_sys_balance || 0) - 0) - (this.model.f_totalcost - 0)
693
+ if (curSysBalance < maxOverdraftBalance) {
694
+ this.$showAlert('您的系统余额将超出最大透支余额,请使用别的付款方式!', 'danger', 5000)
695
+ return
696
+ }
697
+ this.model.f_sys_balance = curSysBalance
698
+ }
699
+ if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
700
+ if (!this.row.f_taxpayer_id && this.config.taxforidnumber) {
701
+ this.row.f_taxpayer_id = this.row.f_idnumber
702
+ }
703
+ if (!this.row.f_paper_name) {
704
+ this.row.f_paper_name = this.row.f_user_name
705
+ }
706
+ if (!this.row.f_address_phone) {
707
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
708
+ }
709
+ this.eticket_msg = true
710
+ } else {
711
+ this.confirm()
712
+ }
713
+ },
714
+ eticket_toggle () {
715
+ this.eticket_show = false
716
+ this.$dispatch('success', '物联网收费')
717
+ },
718
+ async confirm () {
719
+ let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行物联网表缴费吗?`, ['confirm', 'cancel'])
720
+ if (res != 'confirm') return
721
+ // 先调用付款码支付组件流程
722
+ this.clickConfirm = true
723
+ let ss = await this.$refs.paymentcode.flowPath()
724
+ this.$refs.paymentcode.paymentCodeShow = false
725
+ console.log('付款码操作返回', ss)
726
+ if (!ss.result) return
727
+ this.eticket_msg = false
728
+ this.model.f_curbalance = this.curbalance
729
+ this.$dispatch('no-button')
730
+ console.log('model and row', this.model, this.row)
731
+ this.model.f_userinfo_id = this.row.f_userinfo_id
732
+ this.model.f_userfiles_id = this.row.f_userfiles_id
733
+ this.model.f_user_id = this.row.f_user_id
734
+ this.model.userinfo_version = this.row.userinfo_version
735
+ this.model.version = this.row.version
736
+ this.model.f_total_fee = (this.row.f_total_fee - 0) + (this.model.f_preamount - 0)
737
+ this.model.f_total_gas = (this.row.f_total_gas - 0) + (this.model.f_pregas - 0)
738
+ this.model.f_operator = this.$login.f.name
739
+ this.model.f_operatorid = this.$login.f.id
740
+ this.model.f_orgid = this.$login.f.orgid
741
+ this.model.f_orgname = this.$login.f.orgs
742
+ this.model.f_depid = this.$login.f.depids
743
+ this.model.f_depname = this.$login.f.deps
744
+ IOTChargeGen(this)
745
+ },
746
+ clean () {
747
+ this.$info('取消操作')
748
+ this.$dispatch('refresh', this.row)
749
+ },
750
+ validateBill (val) {
751
+ this.validateOk = !val.isOk
752
+ this.billData.bill = val.bill
753
+ },
754
+ printok () {
755
+ this.$dispatch('success', '物联网收费')
756
+ },
757
+ pregas () {
758
+ this.dymoney = 0
759
+ if (this.model.f_pregas && this.model.f_pregas > 0) {
760
+ try {
761
+ pregasGen(this)
762
+ } catch (error) {
763
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
764
+ this.$dispatch('error', '发卡售气', this.model, error)
765
+ }
766
+ } else {
767
+ this.model.f_pregas = null
768
+ }
769
+ },
770
+ preamount () {
771
+ if (this.model.f_preamount && this.model.f_preamount > 0) {
772
+ try {
773
+ preamountGen(this).then((res) => {
774
+ if (this.config.quickSale) {
775
+ this.checkInvoiceMsg((!this.$v.valid || this.validateOk || !this.islegal || this.clickConfirm))
776
+ // this.$els.sk.focus()
777
+ }
778
+ })
779
+ } catch (error) {
780
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
781
+ this.$dispatch('error', '发卡售气', this.model, error)
782
+ }
783
+ } else {
784
+ this.model.f_preamount = null
785
+ }
786
+ },
787
+ calText (val) {
788
+ let str = ''
789
+ let num = 0
790
+ val.forEach((item) => {
791
+ if (item.f_gas > 0) {
792
+ num = num + 1
793
+ }
794
+ str = str + item.f_price + ' x ' + item.f_gas + '+'
795
+ })
796
+ str = str.slice(0, str.length - 1)
797
+ this.calculatedetail = str
798
+ },
799
+ close () {
800
+ this.print = false
801
+ this.clean()
802
+ },
803
+ // 根据选择的付款方式 获取优惠列表
804
+ async getPrivilegeList () {
805
+ // 初始化下拉选择列表
806
+ this.privilegeList = [{label: '无优惠', value: '0'}]
807
+ // 初始为无优惠
808
+ this.model.f_privilege_id = '0'
809
+ if (this.model.f_payment && this.model.f_payment.length) {
810
+ // 查询条件
811
+ let payments = JSON.stringify(this.model.f_payment)
812
+ payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
813
+ let HttpReset = new HttpResetClass()
814
+ let privilege = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
815
+ data: {
816
+ items: 'id,f_privilege_name,f_privilege_type',
817
+ tablename: 't_privilege',
818
+ condition: `f_payment in ${payments} and f_gasproperties = '${this.row.f_gasproperties}' and f_user_type = '${this.row.f_user_type}' and f_perform_date <= GETDATE() and f_end_date >= GETDATE() and f_state = '有效'`,
819
+ orderitem: 'id'
820
+ }
821
+ }, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
822
+ // 查询结果放到下拉列表
823
+ for (let p of privilege.data) {
824
+ this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
825
+ }
826
+ this.privilegeCalculate()
827
+ }
828
+ },
829
+ // 优惠计算
830
+ async privilegeCalculate () {
831
+ // 初始化减免金额
832
+ this.model.f_privilege_money = 0
833
+ this.model.f_after_discount = this.model.f_collection
834
+ // 判断是否是自定义优惠
835
+ if (parseInt(this.model.f_privilege_id)) {
836
+ for (let p of this.privilegeList) {
837
+ if (p.value == this.model.f_privilege_id && p.type == '自定义') {
838
+ this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
839
+ if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
840
+ this.$showMessage('金额输入格式不正确!')
841
+ this.model.f_privilege_money = 0
842
+ return
843
+ }
844
+ if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
845
+ this.$showMessage('减免金额不能大于等于收款金额')
846
+ this.model.f_privilege_money = 0
847
+ return
848
+ }
849
+ }
850
+ }
851
+ }
852
+ // 优惠方式, 收款 缺一不计算
853
+ if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
854
+ let c = {
855
+ f_privilege_id: this.model.f_privilege_id,
856
+ f_collection: this.model.f_collection,
857
+ f_privilege_money: this.model.f_privilege_money
858
+ }
859
+ let privilegeData = await this.$resetpost('api/af-revenue/logic/calculatePrivilege', c, {
860
+ resolveMsg: null,
861
+ rejectMsg: '计算优惠金额出错'
862
+ })
863
+ // 减免金额
864
+ this.model.f_privilege_money = privilegeData.data.f_privilege_money
865
+ // 减免后收款金额
866
+ this.model.f_after_discount = privilegeData.data.f_collection
867
+ }
868
+ },
869
+ // 判断当前用户是否可以使用系统余额透支
870
+ canOverdraftBalance () {
871
+ return this.config.overdraftBalance && this.row.f_user_type != '民用'
872
+ }
873
+ },
874
+ computed: {
875
+ authArr () {
876
+ return this.$login.r ? this.$login.r : []
877
+ },
878
+ 'curbalance' () {
879
+ if (this.model.f_payment == '赠气') {
880
+ return this.row.f_balance
881
+ }
882
+ if (this.model.f_preamount) {
883
+ return ((this.model.f_collection - 0) - (this.model.f_preamount - 0) + (this.row.f_balance - 0) - this.alldue_fee).toFixed(this.row.f_gas_decimal || 4) - 0
884
+ } else {
885
+ return 0
886
+ }
887
+ },
888
+ 'islegal' () {
889
+ if (this.paymentModel.length > 1 && this.model.f_collection) {
890
+ let sum = 0
891
+ this.paymentModel.forEach((res) => {
892
+ sum += (res.f_money - 0)
893
+ })
894
+ return (this.model.f_collection - 0) === (sum - 0)
895
+ } else {
896
+ return true
897
+ }
898
+ }
899
+ }
900
+ }
901
+ </script>
902
+
903
+ <style>
904
+ </style>