sale-client 4.2.21 → 4.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +52 -32
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
- package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
- package/src/components/revenue/comprehen/ComprehenOperation/newchangemeter/ChangeMeter.vue +2 -0
- package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
- package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
- package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +970 -970
- package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
- package/src/filiale/bayan/ChargeList.vue +1010 -1010
- package/src/filiale/bayan/StockListmain.vue +543 -543
- package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
- package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
- package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
- package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
- package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
- package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
- package/src/filiale/ronghao/CardService.js +2144 -2144
- package/src/filiale/ronghao/InsuranceManage.vue +58 -58
- package/src/filiale/ronghao/MachineChargeService.js +149 -149
- package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
- package/src/filiale/ronghao/PaymentCode.vue +174 -174
- package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
- package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
- package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
- package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
- package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
- package/src/filiale/ronghao/Upload.vue +654 -654
- package/src/filiale/ronghao/cardDown.vue +1141 -1141
- package/src/filiale/ronghao/changemeterOperate.vue +315 -315
- package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
- package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
- package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
- package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
- package/src/filiale/ronghao/machineDown.vue +1176 -1176
- package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
- package/src/filiale/ronghao/specificInformation.vue +537 -537
- package/src/filiale/yangchun/ChargeList.vue +954 -954
- package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
- package/src/filiale/zhongsheng/BlackListList.vue +293 -293
- package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
- package/src/main.js +1 -1
- package/src/plugins/CardService.js +2217 -2217
- package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/5.2.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/.gradle/vcs-1/gc.properties +0 -0
|
@@ -1,534 +1,534 @@
|
|
|
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 for="f_paytype" class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
|
|
9
|
-
<v-select id="f_payment"
|
|
10
|
-
v-model="f_payment"
|
|
11
|
-
placeholder='请选择'
|
|
12
|
-
:value.sync="model.f_payment"
|
|
13
|
-
:options='paytype'
|
|
14
|
-
close-on-select clear-button></v-select>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="col-sm-4"
|
|
17
|
-
:class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
|
|
18
|
-
<label for="f_pregas" class=" font_normal_body">预购气量</label>
|
|
19
|
-
<input class="input_search" style="width:60%" type="number"
|
|
20
|
-
@blur="pregas()" v-model="model.f_pregas" id="fpregas"
|
|
21
|
-
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
22
|
-
v-next-el='sk' >
|
|
23
|
-
</div>
|
|
24
|
-
<!-- <div class="col-sm-4" v-if="row.f_collection_type == '按金额'">
|
|
25
|
-
<label for="f_pregas" class=" font_normal_body">预购气量</label>
|
|
26
|
-
<input class="input_search" style="width:60%" type="number"
|
|
27
|
-
@blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
|
|
28
|
-
v-next-el='sk' disabled>
|
|
29
|
-
</div>-->
|
|
30
|
-
|
|
31
|
-
<div class="col-sm-4">
|
|
32
|
-
<label for="f_preamount" class=" font_normal_body">预购金额</label>
|
|
33
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
|
|
34
|
-
v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ] }'
|
|
35
|
-
v-scale="[model.f_preamount, 4]" placeholder="预购金额" disabled>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="row" style="margin-top:6px;">
|
|
39
|
-
|
|
40
|
-
<div class="col-sm-4">
|
|
41
|
-
<label for="f_print" class="font_normal_body">打印格式</label>
|
|
42
|
-
<v-select id="print"
|
|
43
|
-
v-model="f_print"
|
|
44
|
-
placeholder='请选择'
|
|
45
|
-
:multiple="mulPrint"
|
|
46
|
-
:value.sync="model.f_print"
|
|
47
|
-
:options='printstyle'
|
|
48
|
-
close-on-select clear-button></v-select>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="col-sm-4" v-if="hasLimit&&limitgas">
|
|
51
|
-
<label class="font_normal_body">购气上限</label>
|
|
52
|
-
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxgas"
|
|
53
|
-
v-scale="[maxgas, 2]" placeholder='限购余气' disabled>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="col-sm-4 form-group" v-if="hasLimit&&limitmoney">
|
|
56
|
-
<label class="font_normal_body">金额上限</label>
|
|
57
|
-
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
|
|
58
|
-
v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
|
|
59
|
-
</div>
|
|
60
|
-
<div class="col-sm-4" v-if="!hasLimit">
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<div class="col-sm-4"
|
|
64
|
-
:class="[$v.f_totalcost.required || $v.f_totalcost.dctest ? 'has-error' : 'has-success']">
|
|
65
|
-
<label for="f_temp_amount" v-if="row.f_collection_type === '按气量'"
|
|
66
|
-
class=" font_normal_body">应收金额</label>
|
|
67
|
-
<label for="f_temp_amount" v-if="row.f_collection_type === '按金额'"
|
|
68
|
-
class=" font_normal_body">本次缴费</label>
|
|
69
|
-
<input class="input_search" style="width:60%" type="number"
|
|
70
|
-
@blur="preamount()" v-model="model.f_totalcost"
|
|
71
|
-
v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
|
|
72
|
-
v-next-el='sk' v-scale="[model.f_totalcost, 4]" >
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="row">
|
|
76
|
-
<div class="col-sm-4">
|
|
77
|
-
<label for="f_balance" class="font_normal_body">上期结余</label>
|
|
78
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
|
|
79
|
-
v-scale="[model.f_balance, 4]" placeholder="上期结余" disabled>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="col-sm-4">
|
|
82
|
-
<label for="f_curbalance" class="font_normal_body">本期结余</label>
|
|
83
|
-
<input class="input_search" style="width:60%" type="number" v-model="curbalance"
|
|
84
|
-
v-scale="[model.f_curbalance, 4]" placeholder="本期结余" disabled>
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<div class="col-sm-4" v-if="row.f_collection_type === '按气量'"
|
|
88
|
-
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
89
|
-
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
90
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
91
|
-
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
92
|
-
v-validate:f_collection='{required: true, dctest: [model.f_totalcost, ">=" ] }'
|
|
93
|
-
v-el:sk v-scale="[model.f_totalcost, 2]">
|
|
94
|
-
</div>
|
|
95
|
-
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
96
|
-
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
97
|
-
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
98
|
-
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
99
|
-
v-el:sk v-scale="[model.f_collection, 4]" disabled>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="row" style="margin-top:5px;">
|
|
103
|
-
<div class="col-sm-4" v-if="!mjshow" >
|
|
104
|
-
<label for="f_serial_number" class=" font_normal_body">业务单号</label>
|
|
105
|
-
<input class="input_search" style="width:60%" type="text"
|
|
106
|
-
v-model="model.f_serial_number" placeholder="业务单号">
|
|
107
|
-
</div>
|
|
108
|
-
<div class="col-sm-4" v-if="mjshow" :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
|
|
109
|
-
<label for="f_serial_number" class=" font_normal_body">业务单号</label>
|
|
110
|
-
<input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
|
|
111
|
-
v-model="model.f_serial_number" placeholder="业务单号">
|
|
112
|
-
</div>
|
|
113
|
-
<div class="col-sm-4">
|
|
114
|
-
<label for="f_write_card" style="color: red" class=" font_normal_body">是否写卡</label>
|
|
115
|
-
<v-select id="f_write_card"
|
|
116
|
-
v-model="model.f_write_card"
|
|
117
|
-
placeholder='是否写卡'
|
|
118
|
-
value-single
|
|
119
|
-
:value.sync="model.f_write_card"
|
|
120
|
-
:options='writecard'
|
|
121
|
-
close-on-select clear-button></v-select>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="row" style="margin-top:5px;">
|
|
125
|
-
<div class="col-sm-9">
|
|
126
|
-
</div>
|
|
127
|
-
<div class="col-sm-3">
|
|
128
|
-
<span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="row" v-if="model.f_payment[0].includes('POS')">
|
|
132
|
-
<div class="col-sm-4">
|
|
133
|
-
<label for="f_voucher_number" class="font_normal_body">凭证号</label>
|
|
134
|
-
<input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number" placeholder="凭证号">
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
<div class="row" v-if="!config.notShowFormula">
|
|
138
|
-
<div class="col-sm-4 col-sm-offset-8">
|
|
139
|
-
<strong>计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
<div class="row">
|
|
143
|
-
<div class="col-sm-5" v-if="row.f_collection_type === '按气量'">
|
|
144
|
-
<strong style="color:blue">温馨提示: 此气表品牌是按气量收费!!</strong>
|
|
145
|
-
</div>
|
|
146
|
-
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
147
|
-
<strong style="color:blue">温馨提示: 此气表品牌是按金额收费!!</strong>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</form>
|
|
151
|
-
<print-bill :show="print" :bill-config='config' v-ref:printbill :bill-data='billData' :data='row'
|
|
152
|
-
v-on:toggle="close" @printok="printok" :data='row'></print-bill>
|
|
153
|
-
<div style="text-align:right;height: 25%;">
|
|
154
|
-
<payment-code-button :clickable="!$v.valid || clickConfirm"
|
|
155
|
-
:payment.sync="model.f_payment" :payment-data="paytype"
|
|
156
|
-
@confirm-payment="confirm()">
|
|
157
|
-
</payment-code-button>
|
|
158
|
-
<button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
|
|
159
|
-
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
160
|
-
</div>
|
|
161
|
-
</validator>
|
|
162
|
-
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
|
|
163
|
-
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="无卡收费"></upload>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
</template>
|
|
167
|
-
<script>
|
|
168
|
-
/**
|
|
169
|
-
*综合业务
|
|
170
|
-
*卡表收费组件
|
|
171
|
-
*/
|
|
172
|
-
|
|
173
|
-
// 输入金额,换算气量
|
|
174
|
-
let preamountGen = async function (self) {
|
|
175
|
-
let dymoney = 0
|
|
176
|
-
let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
|
|
177
|
-
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
178
|
-
if (getGas.data.gas) {
|
|
179
|
-
if (self.row.f_isdecimal === '是') {
|
|
180
|
-
if (self.row.f_alias === 'QiaoSong') {
|
|
181
|
-
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
182
|
-
} else {
|
|
183
|
-
self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
|
|
184
|
-
}
|
|
185
|
-
} else {
|
|
186
|
-
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
187
|
-
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
188
|
-
dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
|
|
189
|
-
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
self.model.f_preamount = calFee - (dymoney - 0)
|
|
193
|
-
self.model.chargeprice = getGas.data.chargeprice
|
|
194
|
-
Object.assign(self.model, self.model, getGas.data)
|
|
195
|
-
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
|
|
196
|
-
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
197
|
-
if(self.config.floor){
|
|
198
|
-
self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
199
|
-
}
|
|
200
|
-
self.calText(getGas.data.chargeprice)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// 输入气量,换算金额
|
|
204
|
-
let pregasGen = async function (self) {
|
|
205
|
-
if (self.row.f_isdecimal === '是') {
|
|
206
|
-
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
|
|
207
|
-
} else {
|
|
208
|
-
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
209
|
-
}
|
|
210
|
-
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
211
|
-
self.model.f_meter_type = self.row.f_meter_type
|
|
212
|
-
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
213
|
-
self.model.f_preamount = getAmount.data.chargenum
|
|
214
|
-
self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4))
|
|
215
|
-
Object.assign(self.model, self.model, getAmount.data)
|
|
216
|
-
self.model.chargeprice = getAmount.data.chargeprice
|
|
217
|
-
self.model.f_collection = self.model.f_totalcost
|
|
218
|
-
if(self.config.floor){
|
|
219
|
-
self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
220
|
-
}
|
|
221
|
-
self.calText(getAmount.data.chargeprice)
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// 执行保存逻辑
|
|
226
|
-
let sellgasGen = async function (self) {
|
|
227
|
-
try {
|
|
228
|
-
self.model.f_write_money = self.model.f_preamount
|
|
229
|
-
if (self.row.f_price_type == '阶梯气价' && self.row.f_is_step == '否') {
|
|
230
|
-
self.model.f_write_money = (self.model.f_pregas * self.model.chargeprice[0].f_price)
|
|
231
|
-
self.model.f_write_money = self.model.f_write_money.toFixed(2)
|
|
232
|
-
}
|
|
233
|
-
// 加入扫码盒付款码支付流水号
|
|
234
|
-
self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
|
|
235
|
-
|
|
236
|
-
let res = await self.$CardService.noCardSellGas(self.model, self.row, self.cardallot)
|
|
237
|
-
console.log('卡表收费返回id', res, self.model)
|
|
238
|
-
if (self.config.showupload) {
|
|
239
|
-
let param = []
|
|
240
|
-
for (let row of self.resid) {
|
|
241
|
-
param.push({id: row.id})
|
|
242
|
-
}
|
|
243
|
-
let data = {
|
|
244
|
-
param: param,
|
|
245
|
-
f_blobid: res
|
|
246
|
-
}
|
|
247
|
-
await self.$resetpost('api/af-revenue/logic/updatefiles', data)
|
|
248
|
-
}
|
|
249
|
-
// 开始打票
|
|
250
|
-
if (self.config.hasPrint) {
|
|
251
|
-
if (self.model.f_print.indexOf('电子发票') == -1) {
|
|
252
|
-
if (self.config.hasBillManage) {
|
|
253
|
-
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
254
|
-
self.row.id = res
|
|
255
|
-
self.row.f_bill_type = '卡表收费'
|
|
256
|
-
self.row.f_bill_style = self.model.f_print[0]
|
|
257
|
-
self.row.f_preamount = self.model.f_preamount
|
|
258
|
-
self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
|
|
259
|
-
self.row.f_collection = self.model.f_collection
|
|
260
|
-
self.print = true
|
|
261
|
-
} else {
|
|
262
|
-
self.row.id = res
|
|
263
|
-
self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
|
|
264
|
-
self.print = true
|
|
265
|
-
}
|
|
266
|
-
} else {
|
|
267
|
-
if (self.model.f_print[0] === '电子发票') {
|
|
268
|
-
await self.$CommonService.openEticket(res, '售气收费')
|
|
269
|
-
self.row.id = res
|
|
270
|
-
self.print = true
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
} else {
|
|
274
|
-
self.$dispatch('success')
|
|
275
|
-
}
|
|
276
|
-
self.clickConfirm = false
|
|
277
|
-
} catch (error) {
|
|
278
|
-
self.$showAlert(error, 'danger', 0)
|
|
279
|
-
self.$dispatch('refresh')
|
|
280
|
-
self.clickConfirm = false
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
let asyncCardMeterCenter = async function (self) {
|
|
285
|
-
await self.$getConfig(self, 'CardMeterCenter')
|
|
286
|
-
console.log('卡表收费config', self.config)
|
|
287
|
-
// 默认打印格式
|
|
288
|
-
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
289
|
-
self.model.f_payment = [self.config.payment]
|
|
290
|
-
self.mulPrint = self.config.printType instanceof Array
|
|
291
|
-
// 判断限购
|
|
292
|
-
let limit_param = {
|
|
293
|
-
f_userinfo_id: self.row.f_userinfo_id,
|
|
294
|
-
f_user_id: self.row.f_user_id,
|
|
295
|
-
f_stairprice_id: self.row.f_stairprice_id
|
|
296
|
-
}
|
|
297
|
-
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
298
|
-
console.log('获取限购值', getLimit)
|
|
299
|
-
self.hasLimit = getLimit.data.hasLimit
|
|
300
|
-
if (self.hasLimit) {
|
|
301
|
-
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
302
|
-
if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
|
|
303
|
-
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
304
|
-
self.$dispatch('refresh')
|
|
305
|
-
} else {
|
|
306
|
-
if (getLimit.data.f_limit_value) {
|
|
307
|
-
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
308
|
-
self.limitgas = true
|
|
309
|
-
}
|
|
310
|
-
if (getLimit.data.f_limit_amount) {
|
|
311
|
-
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
312
|
-
self.limitmoney = true
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
export default {
|
|
319
|
-
title: '无卡收费',
|
|
320
|
-
data () {
|
|
321
|
-
return {
|
|
322
|
-
serialShow: false,
|
|
323
|
-
resid: [], // 存放新增的f_files表中id
|
|
324
|
-
config: {
|
|
325
|
-
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
326
|
-
notShowFormula: false, // 不显示计算公式,默认显示
|
|
327
|
-
hasPrint: true, // 默认打票
|
|
328
|
-
hasBillManage: false, // 默认不启用发票管理
|
|
329
|
-
floor: false, // 是否取整收费
|
|
330
|
-
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
331
|
-
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
332
|
-
showupload: true,
|
|
333
|
-
payment: '现金缴费'
|
|
334
|
-
},
|
|
335
|
-
model: {
|
|
336
|
-
f_purchase: 0,
|
|
337
|
-
f_write_card: '不写卡',
|
|
338
|
-
f_payment: '',
|
|
339
|
-
f_pregas: '',
|
|
340
|
-
f_preamount: 0,
|
|
341
|
-
f_totalcost: 0,
|
|
342
|
-
f_curbalance: 0,
|
|
343
|
-
f_collection: '',
|
|
344
|
-
f_balance: 0,
|
|
345
|
-
f_print: [],
|
|
346
|
-
f_meter_type: '',
|
|
347
|
-
f_voucher_number: ''
|
|
348
|
-
},
|
|
349
|
-
calculatedetail: '',
|
|
350
|
-
print: false,
|
|
351
|
-
billData: {
|
|
352
|
-
url: 'api/af-revenue/report/card_bill',
|
|
353
|
-
billnumber: ''
|
|
354
|
-
},
|
|
355
|
-
randomBusinessId: '',
|
|
356
|
-
hasLimit: false,
|
|
357
|
-
maxgas: 99999999, // 限购
|
|
358
|
-
maxmoney: 99999999,
|
|
359
|
-
limitmoney: false,
|
|
360
|
-
limitgas: false,
|
|
361
|
-
mulPrint: false,
|
|
362
|
-
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
363
|
-
// 下拉框值
|
|
364
|
-
paytype: this.$appdata.getParam('付款方式'),
|
|
365
|
-
printstyle: this.$appdata.getParam('打印格式'),
|
|
366
|
-
writecard: [{label: '写卡',value:'写卡'},{label: '不写卡',value:'不写卡'}],
|
|
367
|
-
mjshow: false
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
props: ['row'],
|
|
371
|
-
ready () {
|
|
372
|
-
// this.getPurchase()
|
|
373
|
-
this.model.f_price_id = this.row.f_price_id
|
|
374
|
-
this.model.f_user_id = this.row.f_user_id
|
|
375
|
-
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
376
|
-
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
377
|
-
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
378
|
-
if (this.row.f_collection_type == '按金额') {
|
|
379
|
-
this.model.f_totalcost = ''
|
|
380
|
-
this.model.f_pregas = 0
|
|
381
|
-
}
|
|
382
|
-
document.getElementById('fpregas').focus()
|
|
383
|
-
asyncCardMeterCenter(this)
|
|
384
|
-
this.getRandomId()
|
|
385
|
-
},
|
|
386
|
-
events: {
|
|
387
|
-
// 删除Resid数组元素
|
|
388
|
-
'delResid' (val) {
|
|
389
|
-
this.resid.$remove({id: val, f_biobid: ''})
|
|
390
|
-
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
391
|
-
},
|
|
392
|
-
// 增加Resid数组元素
|
|
393
|
-
'resid' (val) {
|
|
394
|
-
this.resid.push({id: val, f_biobid: ''})
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
methods: {
|
|
398
|
-
// 根据收款金额计算划价信息
|
|
399
|
-
// 需要配置 calculatePreByCollection = true
|
|
400
|
-
async calculatePreByCollection () {
|
|
401
|
-
try {
|
|
402
|
-
console.log('看看走了没', this.model)
|
|
403
|
-
this.model.f_collection = (this.model.f_collection - 0)
|
|
404
|
-
let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
|
|
405
|
-
// 通过收款进行划价
|
|
406
|
-
let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
|
|
407
|
-
this.model.f_pregas = parseInt(getGas.data.gas)
|
|
408
|
-
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
409
|
-
this.model.chargeprice = dymoney2.data.chargeprice
|
|
410
|
-
Object.assign(this.model, this.model, dymoney2.data)
|
|
411
|
-
this.model.f_totalcost = dymoney2.data.chargenum
|
|
412
|
-
this.model.f_preamount = dymoney2.data.chargenum
|
|
413
|
-
this.model.getDeduct = 0
|
|
414
|
-
if (this.row.f_project_money && this.row.f_project_money > 0) {
|
|
415
|
-
this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
|
|
416
|
-
this.model.f_totalcost = (this.model.f_totalcost - 0) + (this.model.getDeduct - 0)
|
|
417
|
-
this.model.f_collection = (this.model.f_collection - 0) + (this.model.getDeduct - 0)
|
|
418
|
-
}
|
|
419
|
-
this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
|
|
420
|
-
} catch (error) {
|
|
421
|
-
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
422
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
getRandomId () {
|
|
426
|
-
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
427
|
-
let res = Math.random() * 16 | 0
|
|
428
|
-
let v = c == 'x' ? res : (res & 0x3 | 0x8)
|
|
429
|
-
return v.toString(16)
|
|
430
|
-
})
|
|
431
|
-
},
|
|
432
|
-
confirm () {
|
|
433
|
-
this.$showMessage(`对客户${this.row.f_user_name}进行收费。该操作只做收费,不做写卡,确定要进行该操作吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
434
|
-
if (res === 'confirm') {
|
|
435
|
-
let ss = await this.$refs.paymentcode.flowPath()
|
|
436
|
-
this.$refs.paymentcode.paymentCodeShow = false
|
|
437
|
-
console.log('付款码操作返回', ss)
|
|
438
|
-
if (!ss.result) {
|
|
439
|
-
this.clickConfirm = false
|
|
440
|
-
return
|
|
441
|
-
}
|
|
442
|
-
this.clickConfirm = true
|
|
443
|
-
this.model.f_curbalance = this.curbalance
|
|
444
|
-
this.$dispatch('no-button')
|
|
445
|
-
sellgasGen(this)
|
|
446
|
-
}
|
|
447
|
-
})
|
|
448
|
-
},
|
|
449
|
-
clean () {
|
|
450
|
-
this.$info('取消操作')
|
|
451
|
-
this.$dispatch('refresh', this.row)
|
|
452
|
-
},
|
|
453
|
-
printok () {
|
|
454
|
-
// 收据打完,判断是否还有其他票据进行请求
|
|
455
|
-
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
456
|
-
if (this.model.f_print[i] === '电子发票') {
|
|
457
|
-
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
this.$dispatch('success')
|
|
461
|
-
},
|
|
462
|
-
pregas () {
|
|
463
|
-
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
464
|
-
try {
|
|
465
|
-
// 对气量进行验证
|
|
466
|
-
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
467
|
-
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
468
|
-
this.model.f_pregas = null
|
|
469
|
-
} else {
|
|
470
|
-
pregasGen(this)
|
|
471
|
-
}
|
|
472
|
-
} catch (error) {
|
|
473
|
-
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
474
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
preamount () {
|
|
479
|
-
if ((this.model.f_totalcost && this.model.f_totalcost > 0) || this.row.f_balance > 0) {
|
|
480
|
-
try {
|
|
481
|
-
preamountGen(this)
|
|
482
|
-
} catch (error) {
|
|
483
|
-
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
484
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
},
|
|
488
|
-
calText (val) {
|
|
489
|
-
let str = ''
|
|
490
|
-
val.forEach((item) => {
|
|
491
|
-
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
492
|
-
})
|
|
493
|
-
str = str.slice(0, str.length - 1)
|
|
494
|
-
this.calculatedetail = str
|
|
495
|
-
},
|
|
496
|
-
close () {
|
|
497
|
-
this.print = false
|
|
498
|
-
this.clean()
|
|
499
|
-
}
|
|
500
|
-
},
|
|
501
|
-
watch: {
|
|
502
|
-
'model.f_payment' (val) {
|
|
503
|
-
if (val == '免交') {
|
|
504
|
-
this.mjshow = true
|
|
505
|
-
} else {
|
|
506
|
-
this.mjshow = false
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
computed: {
|
|
511
|
-
'curbalance' () {
|
|
512
|
-
if (this.model.f_preamount) {
|
|
513
|
-
if (this.config.calculatePreByCollection) {
|
|
514
|
-
return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
|
|
515
|
-
}
|
|
516
|
-
if (this.row.f_collection_type === '按金额') {
|
|
517
|
-
return ((this.model.f_totalcost - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
518
|
-
} else {
|
|
519
|
-
if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
520
|
-
return ((this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
521
|
-
} else {
|
|
522
|
-
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
} else {
|
|
526
|
-
return 0
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
</script>
|
|
532
|
-
|
|
533
|
-
<style>
|
|
534
|
-
</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 for="f_paytype" class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
|
|
9
|
+
<v-select id="f_payment"
|
|
10
|
+
v-model="f_payment"
|
|
11
|
+
placeholder='请选择'
|
|
12
|
+
:value.sync="model.f_payment"
|
|
13
|
+
:options='paytype'
|
|
14
|
+
close-on-select clear-button></v-select>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-sm-4"
|
|
17
|
+
:class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
|
|
18
|
+
<label for="f_pregas" class=" font_normal_body">预购气量</label>
|
|
19
|
+
<input class="input_search" style="width:60%" type="number"
|
|
20
|
+
@blur="pregas()" v-model="model.f_pregas" id="fpregas"
|
|
21
|
+
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
22
|
+
v-next-el='sk' >
|
|
23
|
+
</div>
|
|
24
|
+
<!-- <div class="col-sm-4" v-if="row.f_collection_type == '按金额'">
|
|
25
|
+
<label for="f_pregas" class=" font_normal_body">预购气量</label>
|
|
26
|
+
<input class="input_search" style="width:60%" type="number"
|
|
27
|
+
@blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
|
|
28
|
+
v-next-el='sk' disabled>
|
|
29
|
+
</div>-->
|
|
30
|
+
|
|
31
|
+
<div class="col-sm-4">
|
|
32
|
+
<label for="f_preamount" class=" font_normal_body">预购金额</label>
|
|
33
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
|
|
34
|
+
v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ] }'
|
|
35
|
+
v-scale="[model.f_preamount, 4]" placeholder="预购金额" disabled>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="row" style="margin-top:6px;">
|
|
39
|
+
|
|
40
|
+
<div class="col-sm-4">
|
|
41
|
+
<label for="f_print" class="font_normal_body">打印格式</label>
|
|
42
|
+
<v-select id="print"
|
|
43
|
+
v-model="f_print"
|
|
44
|
+
placeholder='请选择'
|
|
45
|
+
:multiple="mulPrint"
|
|
46
|
+
:value.sync="model.f_print"
|
|
47
|
+
:options='printstyle'
|
|
48
|
+
close-on-select clear-button></v-select>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="col-sm-4" v-if="hasLimit&&limitgas">
|
|
51
|
+
<label class="font_normal_body">购气上限</label>
|
|
52
|
+
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxgas"
|
|
53
|
+
v-scale="[maxgas, 2]" placeholder='限购余气' disabled>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="col-sm-4 form-group" v-if="hasLimit&&limitmoney">
|
|
56
|
+
<label class="font_normal_body">金额上限</label>
|
|
57
|
+
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
|
|
58
|
+
v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="col-sm-4" v-if="!hasLimit">
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="col-sm-4"
|
|
64
|
+
:class="[$v.f_totalcost.required || $v.f_totalcost.dctest ? 'has-error' : 'has-success']">
|
|
65
|
+
<label for="f_temp_amount" v-if="row.f_collection_type === '按气量'"
|
|
66
|
+
class=" font_normal_body">应收金额</label>
|
|
67
|
+
<label for="f_temp_amount" v-if="row.f_collection_type === '按金额'"
|
|
68
|
+
class=" font_normal_body">本次缴费</label>
|
|
69
|
+
<input class="input_search" style="width:60%" type="number"
|
|
70
|
+
@blur="preamount()" v-model="model.f_totalcost"
|
|
71
|
+
v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
|
|
72
|
+
v-next-el='sk' v-scale="[model.f_totalcost, 4]" >
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="row">
|
|
76
|
+
<div class="col-sm-4">
|
|
77
|
+
<label for="f_balance" class="font_normal_body">上期结余</label>
|
|
78
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
|
|
79
|
+
v-scale="[model.f_balance, 4]" placeholder="上期结余" disabled>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="col-sm-4">
|
|
82
|
+
<label for="f_curbalance" class="font_normal_body">本期结余</label>
|
|
83
|
+
<input class="input_search" style="width:60%" type="number" v-model="curbalance"
|
|
84
|
+
v-scale="[model.f_curbalance, 4]" placeholder="本期结余" disabled>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="col-sm-4" v-if="row.f_collection_type === '按气量'"
|
|
88
|
+
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
89
|
+
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
90
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
91
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
92
|
+
v-validate:f_collection='{required: true, dctest: [model.f_totalcost, ">=" ] }'
|
|
93
|
+
v-el:sk v-scale="[model.f_totalcost, 2]">
|
|
94
|
+
</div>
|
|
95
|
+
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
96
|
+
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
97
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
98
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
99
|
+
v-el:sk v-scale="[model.f_collection, 4]" disabled>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="row" style="margin-top:5px;">
|
|
103
|
+
<div class="col-sm-4" v-if="!mjshow" >
|
|
104
|
+
<label for="f_serial_number" class=" font_normal_body">业务单号</label>
|
|
105
|
+
<input class="input_search" style="width:60%" type="text"
|
|
106
|
+
v-model="model.f_serial_number" placeholder="业务单号">
|
|
107
|
+
</div>
|
|
108
|
+
<div class="col-sm-4" v-if="mjshow" :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
|
|
109
|
+
<label for="f_serial_number" class=" font_normal_body">业务单号</label>
|
|
110
|
+
<input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
|
|
111
|
+
v-model="model.f_serial_number" placeholder="业务单号">
|
|
112
|
+
</div>
|
|
113
|
+
<div class="col-sm-4">
|
|
114
|
+
<label for="f_write_card" style="color: red" class=" font_normal_body">是否写卡</label>
|
|
115
|
+
<v-select id="f_write_card"
|
|
116
|
+
v-model="model.f_write_card"
|
|
117
|
+
placeholder='是否写卡'
|
|
118
|
+
value-single
|
|
119
|
+
:value.sync="model.f_write_card"
|
|
120
|
+
:options='writecard'
|
|
121
|
+
close-on-select clear-button></v-select>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="row" style="margin-top:5px;">
|
|
125
|
+
<div class="col-sm-9">
|
|
126
|
+
</div>
|
|
127
|
+
<div class="col-sm-3">
|
|
128
|
+
<span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="row" v-if="model.f_payment[0].includes('POS')">
|
|
132
|
+
<div class="col-sm-4">
|
|
133
|
+
<label for="f_voucher_number" class="font_normal_body">凭证号</label>
|
|
134
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number" placeholder="凭证号">
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<div class="row" v-if="!config.notShowFormula">
|
|
138
|
+
<div class="col-sm-4 col-sm-offset-8">
|
|
139
|
+
<strong>计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="row">
|
|
143
|
+
<div class="col-sm-5" v-if="row.f_collection_type === '按气量'">
|
|
144
|
+
<strong style="color:blue">温馨提示: 此气表品牌是按气量收费!!</strong>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="col-sm-4" v-if="row.f_collection_type === '按金额'">
|
|
147
|
+
<strong style="color:blue">温馨提示: 此气表品牌是按金额收费!!</strong>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</form>
|
|
151
|
+
<print-bill :show="print" :bill-config='config' v-ref:printbill :bill-data='billData' :data='row'
|
|
152
|
+
v-on:toggle="close" @printok="printok" :data='row'></print-bill>
|
|
153
|
+
<div style="text-align:right;height: 25%;">
|
|
154
|
+
<payment-code-button :clickable="!$v.valid || clickConfirm"
|
|
155
|
+
:payment.sync="model.f_payment" :payment-data="paytype"
|
|
156
|
+
@confirm-payment="confirm()">
|
|
157
|
+
</payment-code-button>
|
|
158
|
+
<button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || clickConfirm'>确认</button>
|
|
159
|
+
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
160
|
+
</div>
|
|
161
|
+
</validator>
|
|
162
|
+
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
|
|
163
|
+
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="无卡收费"></upload>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</template>
|
|
167
|
+
<script>
|
|
168
|
+
/**
|
|
169
|
+
*综合业务
|
|
170
|
+
*卡表收费组件
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
// 输入金额,换算气量
|
|
174
|
+
let preamountGen = async function (self) {
|
|
175
|
+
let dymoney = 0
|
|
176
|
+
let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
|
|
177
|
+
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
178
|
+
if (getGas.data.gas) {
|
|
179
|
+
if (self.row.f_isdecimal === '是') {
|
|
180
|
+
if (self.row.f_alias === 'QiaoSong') {
|
|
181
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
182
|
+
} else {
|
|
183
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
187
|
+
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
188
|
+
dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
|
|
189
|
+
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
self.model.f_preamount = calFee - (dymoney - 0)
|
|
193
|
+
self.model.chargeprice = getGas.data.chargeprice
|
|
194
|
+
Object.assign(self.model, self.model, getGas.data)
|
|
195
|
+
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
|
|
196
|
+
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
197
|
+
if(self.config.floor){
|
|
198
|
+
self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
199
|
+
}
|
|
200
|
+
self.calText(getGas.data.chargeprice)
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// 输入气量,换算金额
|
|
204
|
+
let pregasGen = async function (self) {
|
|
205
|
+
if (self.row.f_isdecimal === '是') {
|
|
206
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
|
|
207
|
+
} else {
|
|
208
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
209
|
+
}
|
|
210
|
+
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
211
|
+
self.model.f_meter_type = self.row.f_meter_type
|
|
212
|
+
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
213
|
+
self.model.f_preamount = getAmount.data.chargenum
|
|
214
|
+
self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4))
|
|
215
|
+
Object.assign(self.model, self.model, getAmount.data)
|
|
216
|
+
self.model.chargeprice = getAmount.data.chargeprice
|
|
217
|
+
self.model.f_collection = self.model.f_totalcost
|
|
218
|
+
if(self.config.floor){
|
|
219
|
+
self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
220
|
+
}
|
|
221
|
+
self.calText(getAmount.data.chargeprice)
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// 执行保存逻辑
|
|
226
|
+
let sellgasGen = async function (self) {
|
|
227
|
+
try {
|
|
228
|
+
self.model.f_write_money = self.model.f_preamount
|
|
229
|
+
if (self.row.f_price_type == '阶梯气价' && self.row.f_is_step == '否') {
|
|
230
|
+
self.model.f_write_money = (self.model.f_pregas * self.model.chargeprice[0].f_price)
|
|
231
|
+
self.model.f_write_money = self.model.f_write_money.toFixed(2)
|
|
232
|
+
}
|
|
233
|
+
// 加入扫码盒付款码支付流水号
|
|
234
|
+
self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
|
|
235
|
+
|
|
236
|
+
let res = await self.$CardService.noCardSellGas(self.model, self.row, self.cardallot)
|
|
237
|
+
console.log('卡表收费返回id', res, self.model)
|
|
238
|
+
if (self.config.showupload) {
|
|
239
|
+
let param = []
|
|
240
|
+
for (let row of self.resid) {
|
|
241
|
+
param.push({id: row.id})
|
|
242
|
+
}
|
|
243
|
+
let data = {
|
|
244
|
+
param: param,
|
|
245
|
+
f_blobid: res
|
|
246
|
+
}
|
|
247
|
+
await self.$resetpost('api/af-revenue/logic/updatefiles', data)
|
|
248
|
+
}
|
|
249
|
+
// 开始打票
|
|
250
|
+
if (self.config.hasPrint) {
|
|
251
|
+
if (self.model.f_print.indexOf('电子发票') == -1) {
|
|
252
|
+
if (self.config.hasBillManage) {
|
|
253
|
+
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
254
|
+
self.row.id = res
|
|
255
|
+
self.row.f_bill_type = '卡表收费'
|
|
256
|
+
self.row.f_bill_style = self.model.f_print[0]
|
|
257
|
+
self.row.f_preamount = self.model.f_preamount
|
|
258
|
+
self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
|
|
259
|
+
self.row.f_collection = self.model.f_collection
|
|
260
|
+
self.print = true
|
|
261
|
+
} else {
|
|
262
|
+
self.row.id = res
|
|
263
|
+
self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
|
|
264
|
+
self.print = true
|
|
265
|
+
}
|
|
266
|
+
} else {
|
|
267
|
+
if (self.model.f_print[0] === '电子发票') {
|
|
268
|
+
await self.$CommonService.openEticket(res, '售气收费')
|
|
269
|
+
self.row.id = res
|
|
270
|
+
self.print = true
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
} else {
|
|
274
|
+
self.$dispatch('success')
|
|
275
|
+
}
|
|
276
|
+
self.clickConfirm = false
|
|
277
|
+
} catch (error) {
|
|
278
|
+
self.$showAlert(error, 'danger', 0)
|
|
279
|
+
self.$dispatch('refresh')
|
|
280
|
+
self.clickConfirm = false
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
let asyncCardMeterCenter = async function (self) {
|
|
285
|
+
await self.$getConfig(self, 'CardMeterCenter')
|
|
286
|
+
console.log('卡表收费config', self.config)
|
|
287
|
+
// 默认打印格式
|
|
288
|
+
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
289
|
+
self.model.f_payment = [self.config.payment]
|
|
290
|
+
self.mulPrint = self.config.printType instanceof Array
|
|
291
|
+
// 判断限购
|
|
292
|
+
let limit_param = {
|
|
293
|
+
f_userinfo_id: self.row.f_userinfo_id,
|
|
294
|
+
f_user_id: self.row.f_user_id,
|
|
295
|
+
f_stairprice_id: self.row.f_stairprice_id
|
|
296
|
+
}
|
|
297
|
+
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
298
|
+
console.log('获取限购值', getLimit)
|
|
299
|
+
self.hasLimit = getLimit.data.hasLimit
|
|
300
|
+
if (self.hasLimit) {
|
|
301
|
+
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
302
|
+
if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
|
|
303
|
+
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
304
|
+
self.$dispatch('refresh')
|
|
305
|
+
} else {
|
|
306
|
+
if (getLimit.data.f_limit_value) {
|
|
307
|
+
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
308
|
+
self.limitgas = true
|
|
309
|
+
}
|
|
310
|
+
if (getLimit.data.f_limit_amount) {
|
|
311
|
+
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
312
|
+
self.limitmoney = true
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
export default {
|
|
319
|
+
title: '无卡收费',
|
|
320
|
+
data () {
|
|
321
|
+
return {
|
|
322
|
+
serialShow: false,
|
|
323
|
+
resid: [], // 存放新增的f_files表中id
|
|
324
|
+
config: {
|
|
325
|
+
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
326
|
+
notShowFormula: false, // 不显示计算公式,默认显示
|
|
327
|
+
hasPrint: true, // 默认打票
|
|
328
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
329
|
+
floor: false, // 是否取整收费
|
|
330
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
331
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
332
|
+
showupload: true,
|
|
333
|
+
payment: '现金缴费'
|
|
334
|
+
},
|
|
335
|
+
model: {
|
|
336
|
+
f_purchase: 0,
|
|
337
|
+
f_write_card: '不写卡',
|
|
338
|
+
f_payment: '',
|
|
339
|
+
f_pregas: '',
|
|
340
|
+
f_preamount: 0,
|
|
341
|
+
f_totalcost: 0,
|
|
342
|
+
f_curbalance: 0,
|
|
343
|
+
f_collection: '',
|
|
344
|
+
f_balance: 0,
|
|
345
|
+
f_print: [],
|
|
346
|
+
f_meter_type: '',
|
|
347
|
+
f_voucher_number: ''
|
|
348
|
+
},
|
|
349
|
+
calculatedetail: '',
|
|
350
|
+
print: false,
|
|
351
|
+
billData: {
|
|
352
|
+
url: 'api/af-revenue/report/card_bill',
|
|
353
|
+
billnumber: ''
|
|
354
|
+
},
|
|
355
|
+
randomBusinessId: '',
|
|
356
|
+
hasLimit: false,
|
|
357
|
+
maxgas: 99999999, // 限购
|
|
358
|
+
maxmoney: 99999999,
|
|
359
|
+
limitmoney: false,
|
|
360
|
+
limitgas: false,
|
|
361
|
+
mulPrint: false,
|
|
362
|
+
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
363
|
+
// 下拉框值
|
|
364
|
+
paytype: this.$appdata.getParam('付款方式'),
|
|
365
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
366
|
+
writecard: [{label: '写卡',value:'写卡'},{label: '不写卡',value:'不写卡'}],
|
|
367
|
+
mjshow: false
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
props: ['row'],
|
|
371
|
+
ready () {
|
|
372
|
+
// this.getPurchase()
|
|
373
|
+
this.model.f_price_id = this.row.f_price_id
|
|
374
|
+
this.model.f_user_id = this.row.f_user_id
|
|
375
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
376
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
377
|
+
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
378
|
+
if (this.row.f_collection_type == '按金额') {
|
|
379
|
+
this.model.f_totalcost = ''
|
|
380
|
+
this.model.f_pregas = 0
|
|
381
|
+
}
|
|
382
|
+
document.getElementById('fpregas').focus()
|
|
383
|
+
asyncCardMeterCenter(this)
|
|
384
|
+
this.getRandomId()
|
|
385
|
+
},
|
|
386
|
+
events: {
|
|
387
|
+
// 删除Resid数组元素
|
|
388
|
+
'delResid' (val) {
|
|
389
|
+
this.resid.$remove({id: val, f_biobid: ''})
|
|
390
|
+
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
391
|
+
},
|
|
392
|
+
// 增加Resid数组元素
|
|
393
|
+
'resid' (val) {
|
|
394
|
+
this.resid.push({id: val, f_biobid: ''})
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
methods: {
|
|
398
|
+
// 根据收款金额计算划价信息
|
|
399
|
+
// 需要配置 calculatePreByCollection = true
|
|
400
|
+
async calculatePreByCollection () {
|
|
401
|
+
try {
|
|
402
|
+
console.log('看看走了没', this.model)
|
|
403
|
+
this.model.f_collection = (this.model.f_collection - 0)
|
|
404
|
+
let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
|
|
405
|
+
// 通过收款进行划价
|
|
406
|
+
let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
|
|
407
|
+
this.model.f_pregas = parseInt(getGas.data.gas)
|
|
408
|
+
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
409
|
+
this.model.chargeprice = dymoney2.data.chargeprice
|
|
410
|
+
Object.assign(this.model, this.model, dymoney2.data)
|
|
411
|
+
this.model.f_totalcost = dymoney2.data.chargenum
|
|
412
|
+
this.model.f_preamount = dymoney2.data.chargenum
|
|
413
|
+
this.model.getDeduct = 0
|
|
414
|
+
if (this.row.f_project_money && this.row.f_project_money > 0) {
|
|
415
|
+
this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
|
|
416
|
+
this.model.f_totalcost = (this.model.f_totalcost - 0) + (this.model.getDeduct - 0)
|
|
417
|
+
this.model.f_collection = (this.model.f_collection - 0) + (this.model.getDeduct - 0)
|
|
418
|
+
}
|
|
419
|
+
this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
|
|
420
|
+
} catch (error) {
|
|
421
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
422
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
getRandomId () {
|
|
426
|
+
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
427
|
+
let res = Math.random() * 16 | 0
|
|
428
|
+
let v = c == 'x' ? res : (res & 0x3 | 0x8)
|
|
429
|
+
return v.toString(16)
|
|
430
|
+
})
|
|
431
|
+
},
|
|
432
|
+
confirm () {
|
|
433
|
+
this.$showMessage(`对客户${this.row.f_user_name}进行收费。该操作只做收费,不做写卡,确定要进行该操作吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
434
|
+
if (res === 'confirm') {
|
|
435
|
+
let ss = await this.$refs.paymentcode.flowPath()
|
|
436
|
+
this.$refs.paymentcode.paymentCodeShow = false
|
|
437
|
+
console.log('付款码操作返回', ss)
|
|
438
|
+
if (!ss.result) {
|
|
439
|
+
this.clickConfirm = false
|
|
440
|
+
return
|
|
441
|
+
}
|
|
442
|
+
this.clickConfirm = true
|
|
443
|
+
this.model.f_curbalance = this.curbalance
|
|
444
|
+
this.$dispatch('no-button')
|
|
445
|
+
sellgasGen(this)
|
|
446
|
+
}
|
|
447
|
+
})
|
|
448
|
+
},
|
|
449
|
+
clean () {
|
|
450
|
+
this.$info('取消操作')
|
|
451
|
+
this.$dispatch('refresh', this.row)
|
|
452
|
+
},
|
|
453
|
+
printok () {
|
|
454
|
+
// 收据打完,判断是否还有其他票据进行请求
|
|
455
|
+
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
456
|
+
if (this.model.f_print[i] === '电子发票') {
|
|
457
|
+
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
this.$dispatch('success')
|
|
461
|
+
},
|
|
462
|
+
pregas () {
|
|
463
|
+
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
464
|
+
try {
|
|
465
|
+
// 对气量进行验证
|
|
466
|
+
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
467
|
+
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
468
|
+
this.model.f_pregas = null
|
|
469
|
+
} else {
|
|
470
|
+
pregasGen(this)
|
|
471
|
+
}
|
|
472
|
+
} catch (error) {
|
|
473
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
474
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
preamount () {
|
|
479
|
+
if ((this.model.f_totalcost && this.model.f_totalcost > 0) || this.row.f_balance > 0) {
|
|
480
|
+
try {
|
|
481
|
+
preamountGen(this)
|
|
482
|
+
} catch (error) {
|
|
483
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
484
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
calText (val) {
|
|
489
|
+
let str = ''
|
|
490
|
+
val.forEach((item) => {
|
|
491
|
+
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
492
|
+
})
|
|
493
|
+
str = str.slice(0, str.length - 1)
|
|
494
|
+
this.calculatedetail = str
|
|
495
|
+
},
|
|
496
|
+
close () {
|
|
497
|
+
this.print = false
|
|
498
|
+
this.clean()
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
watch: {
|
|
502
|
+
'model.f_payment' (val) {
|
|
503
|
+
if (val == '免交') {
|
|
504
|
+
this.mjshow = true
|
|
505
|
+
} else {
|
|
506
|
+
this.mjshow = false
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
computed: {
|
|
511
|
+
'curbalance' () {
|
|
512
|
+
if (this.model.f_preamount) {
|
|
513
|
+
if (this.config.calculatePreByCollection) {
|
|
514
|
+
return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
|
|
515
|
+
}
|
|
516
|
+
if (this.row.f_collection_type === '按金额') {
|
|
517
|
+
return ((this.model.f_totalcost - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
518
|
+
} else {
|
|
519
|
+
if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
520
|
+
return ((this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
|
|
521
|
+
} else {
|
|
522
|
+
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
} else {
|
|
526
|
+
return 0
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
</script>
|
|
532
|
+
|
|
533
|
+
<style>
|
|
534
|
+
</style>
|