telephone-clients 4.0.0-1-60 → 4.0.0-1-62
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/CHANGELOG.md +37 -37
- package/README.md +38 -38
- package/package.json +1 -1
- package/release.bat +5 -5
- package/src/components/android/PhoneWriteCard.vue +476 -476
- package/src/components/sendsingle/CardChangeFill.vue +338 -338
- package/src/components/sendsingle/PosMakeGas.vue +342 -342
- package/src/components/sendsingle/onlineBuyGas.vue +632 -632
- package/src/filiale/jiaocheng/android/onlineBuyGas.vue +637 -637
- package/src/filiale/meihekou/android/onlineBuyGas.vue +727 -727
- package/src/filiale/rongcheng/onlineBuyGas.vue +798 -798
- package/src/filiale/yuncheng/pc/TelLossList.vue +285 -285
- package/src/filiale/zhoukou/android/onlineBuyGas.vue +804 -804
|
@@ -1,804 +1,804 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: auto;width: 100%;padding: 10px">
|
|
3
|
-
<div partial>
|
|
4
|
-
<div class="row app-row">
|
|
5
|
-
<div class="col-xs-4">
|
|
6
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
7
|
-
<label class="font text-left">预购气量:</label>
|
|
8
|
-
</div><div class="col-xs-8">
|
|
9
|
-
<input type="number" class ="input_search input_ys" placeholder="请输入预存气量..." @change="pregasChange" v-model="model.f_pregas"></div>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="row app-row">
|
|
12
|
-
<div class="col-xs-4">
|
|
13
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
14
|
-
<label class="font text-left">预购金额:</label>
|
|
15
|
-
</div><div class="col-xs-8">
|
|
16
|
-
<input type="number" class ="input_search input_ys" placeholder="请输入预购金额..." @change="preamountChange" v-model="model.f_preamount"></div>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="row app-row" v-if="hasLimit">
|
|
19
|
-
<div class="col-xs-4">
|
|
20
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
21
|
-
<label class="font text-left">购气上限:</label>
|
|
22
|
-
</div><div class="col-xs-8">
|
|
23
|
-
<input type="number" class ="input_search input_ys" placeholder="请输入购气上限..." readonly v-model="maxgas"></div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="row app-row">
|
|
26
|
-
<div class="col-xs-4">
|
|
27
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
28
|
-
<label class="font text-left" style="color: #a51212">本次缴费:</label>
|
|
29
|
-
</div><div class="col-xs-8">
|
|
30
|
-
<!--<input type="text" class ="input_search input_ys" placeholder="请输入缴费金额..."
|
|
31
|
-
@blur="preamount()"
|
|
32
|
-
v-model="model.f_totalcost"></div>-->
|
|
33
|
-
<input type="number" class ="input_search input_ys" placeholder="请输入缴费金额..." readonly
|
|
34
|
-
v-model="model.f_totalcost"></div>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="row app-row">
|
|
37
|
-
<div class="col-xs-4">
|
|
38
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
39
|
-
<label class="font text-left">付款方式:</label>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="col-xs-8">
|
|
42
|
-
<!--<input type="text" class ="input_search input_ys" placeholder="请选择付款方式..." readonly v-model="model.f_payment"></div>-->
|
|
43
|
-
<v-select
|
|
44
|
-
:value.sync="model.f_payment"
|
|
45
|
-
:options='Paytypes'
|
|
46
|
-
placeholder='请选择付款方式...'
|
|
47
|
-
close-on-select
|
|
48
|
-
:search="false"
|
|
49
|
-
value-single
|
|
50
|
-
disabled
|
|
51
|
-
style="margin-bottom: 10px;"
|
|
52
|
-
width="78%"
|
|
53
|
-
v-model="model.f_payment"
|
|
54
|
-
></v-select>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="row app-row">
|
|
58
|
-
<div class="col-xs-4">
|
|
59
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
60
|
-
<label class="font text-left">打印格式:</label>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="col-xs-8">
|
|
63
|
-
<!--<input type="text" class ="input_search input_ys" placeholder="请输入打印格式..." readonly v-model="model.f_print"></div>-->
|
|
64
|
-
<v-select
|
|
65
|
-
:value.sync="model.f_print"
|
|
66
|
-
:options='Printtypes'
|
|
67
|
-
placeholder='请输入打印格式...'
|
|
68
|
-
close-on-select
|
|
69
|
-
value-single
|
|
70
|
-
style="margin-bottom: 10px;"
|
|
71
|
-
width="78%"
|
|
72
|
-
v-model="model.f_print"
|
|
73
|
-
></v-select>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div class="row app-row" v-if="model.f_payment[0].includes('POS')">
|
|
78
|
-
<div class="col-xs-4">
|
|
79
|
-
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
80
|
-
<label class="font text-left"> 凭证号:</label>
|
|
81
|
-
</div><div class="col-xs-8">
|
|
82
|
-
<input type="text" class ="input_search input_ys" placeholder="请输入缴费金额..."
|
|
83
|
-
v-model="model.f_voucher_number"></div>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div class="row" style="margin-top: 10px;">
|
|
87
|
-
<label class="font_normal_body"><b> 选择{{matertype2}} </b></label>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="row" style="text-align: center">
|
|
90
|
-
<button class="button_btn" @click="selectmoney(btnmoney)" v-for=" btnmoney in btnmoneys"> {{btnmoney}}{{matertype}}</button>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="row app-row" style="padding-top: 0.5em;">
|
|
93
|
-
<div class="col-sm-12">
|
|
94
|
-
<label for="f_comments" class="font_normal_body"> 备注 </label>
|
|
95
|
-
<input class="input_search input_ys" style="width:60%" v-model="model.f_comments" rows="1" placeholder="备注">
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
<div style="text-align:right; height: 20%;margin-top: 15px;">
|
|
99
|
-
<strong v-show="!isMax" style="font-size: large" >计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
|
|
100
|
-
<strong v-show="isMax" style="font-size: large;color: #d9534f" >已经达到购气上限</strong><br/>
|
|
101
|
-
|
|
102
|
-
</div>
|
|
103
|
-
<div class="row text-center" style="margin-top: 25px;">
|
|
104
|
-
<button class="btn btn-lg btn-font btn-color" style="width: 28%;" type="button" @click="confirm()" :disabled="clickConfirm" >确认</button>
|
|
105
|
-
<!--<button class="btn btn-lg btn-font btn-color" @click="clean()" style="font-size: 15px;">取消</button>-->
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
<work-busy :is-busy="isworking"></work-busy>
|
|
109
|
-
</div>
|
|
110
|
-
</template>
|
|
111
|
-
<script>
|
|
112
|
-
/**
|
|
113
|
-
*综合业务
|
|
114
|
-
*收费组件
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
import {HttpResetClass} from 'vue-client'
|
|
118
|
-
import Vue from 'vue'
|
|
119
|
-
import * as Util from '../../../components/Util'
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
export default {
|
|
123
|
-
title: '物联网表收费',
|
|
124
|
-
data() {
|
|
125
|
-
return {
|
|
126
|
-
config: {
|
|
127
|
-
showupload:false, //默认不显示附件上传组件
|
|
128
|
-
hasPrint : false, //默认打票
|
|
129
|
-
hasBillManage : false, //默认不启用发票管理
|
|
130
|
-
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
131
|
-
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
132
|
-
payment: '现金缴费'
|
|
133
|
-
},
|
|
134
|
-
isMax:false,
|
|
135
|
-
isWrited: '未写卡',
|
|
136
|
-
model: {
|
|
137
|
-
f_userfiles_id: '', // 表编号 方式一: 针对微信查询
|
|
138
|
-
f_userinfo_code: '', // 用户编号 卡表标识
|
|
139
|
-
f_filialeids: '', // 用户分公司
|
|
140
|
-
f_overdue: 0, // 机表滞纳金减免
|
|
141
|
-
f_card_id: '', // 卡表缴费标识 卡号
|
|
142
|
-
f_user_id: '', // 卡表缴费标识 用户id
|
|
143
|
-
f_serial_id: '', // 流水号
|
|
144
|
-
f_pregas: 0, // 预购气量 购气量
|
|
145
|
-
f_preamount: 0, // 预购金额 购气金额
|
|
146
|
-
f_totalcost: 0, // 本次缴费金额 应交气费
|
|
147
|
-
f_collection: 0, // 收款
|
|
148
|
-
// f_terminal_num: 'POS设备号', // 这个不能传 终端号/设备号
|
|
149
|
-
f_payment: '工行支付', // 付款方式
|
|
150
|
-
f_bank_name :'',
|
|
151
|
-
f_print: '普通收据', // 打印格式card
|
|
152
|
-
f_unit: 'yuan', // yuan/fen,如果不传按分处理
|
|
153
|
-
f_operate_date: '', //操作时间
|
|
154
|
-
f_operator: '' // 第三方渠道(微信,支付宝,等)
|
|
155
|
-
},
|
|
156
|
-
btnmoneys: [50,100,200,300,500,1000], // 默认气量或者金额
|
|
157
|
-
// 下拉框值
|
|
158
|
-
// Paytypes: this.$appdata.getParam('POS支付方式'),
|
|
159
|
-
Paytypes: [{label: "现金缴费", value: "现金缴费"}, {label: "微信付款", value: "微信付款"}, {label: "银行支付", value: "银行支付"}],
|
|
160
|
-
Printtypes: [{label: "普通收据", value: "普通收据"}],
|
|
161
|
-
calculatedetail: '', // 计算公式
|
|
162
|
-
|
|
163
|
-
mulPrint: false,
|
|
164
|
-
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
165
|
-
// 下拉框值
|
|
166
|
-
printstyle: this.$appdata.getParam('打印格式'),
|
|
167
|
-
privilegeList: [{label: '无优惠', value: '0'}],
|
|
168
|
-
matertype: '元',
|
|
169
|
-
matertype2: '金额',
|
|
170
|
-
timer:null,
|
|
171
|
-
timer2:null,
|
|
172
|
-
sellinggasId:'',
|
|
173
|
-
writeparams: {},
|
|
174
|
-
isworking: false,
|
|
175
|
-
filiale: '' // 支付的分公司
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
props: ['row'],
|
|
180
|
-
ready() {
|
|
181
|
-
//tag
|
|
182
|
-
this.Paytypes = this.$appdata.getParam('支付方式')
|
|
183
|
-
//tag)
|
|
184
|
-
//tag)
|
|
185
|
-
if (this.row.f_filialeid == '10101') {
|
|
186
|
-
//tag
|
|
187
|
-
this.filiale = 'zhoukou'
|
|
188
|
-
}else if (this.row.f_filialeid == '35520') {
|
|
189
|
-
//tag
|
|
190
|
-
this.filiale = 'xiangcheng'
|
|
191
|
-
}else if (this.row.f_filialeid == '35532') {
|
|
192
|
-
//tag
|
|
193
|
-
this.filiale = 'luyi'
|
|
194
|
-
}else if (this.row.f_filialeid == '35538') {
|
|
195
|
-
//tag
|
|
196
|
-
this.filiale = 'dancheng'
|
|
197
|
-
}else if (this.row.f_filialeid == '35526') {
|
|
198
|
-
//tag
|
|
199
|
-
this.filiale = 'xihua'
|
|
200
|
-
}else {
|
|
201
|
-
this.$showMessage('分公司异常,请联系管理员!')
|
|
202
|
-
}
|
|
203
|
-
this.matertype = this.row.f_collection_type == '按金额' ? '元' : '方'
|
|
204
|
-
this.matertype2 = this.row.f_collection_type == '按金额' ? '金额' : '气量'
|
|
205
|
-
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
206
|
-
this.model.f_userinfo_code = this.row.f_userinfo_code
|
|
207
|
-
this.model.f_user_id = this.row.f_user_id
|
|
208
|
-
this.model.f_card_id = this.row.f_card_id
|
|
209
|
-
this.model.f_total_gas=this.row.f_total_gas
|
|
210
|
-
|
|
211
|
-
// this.model.f_operator= "手机测试"
|
|
212
|
-
// this.model.f_operatorid= "42118"
|
|
213
|
-
// this.model.f_orgid= "21142"
|
|
214
|
-
// this.model.f_orgname= "测试公司(一)"
|
|
215
|
-
// this.model.f_depid= "21160"
|
|
216
|
-
// this.model.f_depname= "安检部"
|
|
217
|
-
|
|
218
|
-
this.model.f_operator = Vue.user.name
|
|
219
|
-
this.model.f_operatorid = Vue.user.id
|
|
220
|
-
this.model.f_orgid = Vue.user.orgid
|
|
221
|
-
this.model.f_orgname = Vue.user.orgs
|
|
222
|
-
this.model.f_depid = Vue.user.depids
|
|
223
|
-
this.model.f_depname = Vue.user.deps
|
|
224
|
-
|
|
225
|
-
// this.getcardid()
|
|
226
|
-
},
|
|
227
|
-
watch: {
|
|
228
|
-
/*'model.f_preamount' () {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
},
|
|
232
|
-
'model.f_pregas' () {
|
|
233
|
-
|
|
234
|
-
}*/
|
|
235
|
-
},
|
|
236
|
-
methods: {
|
|
237
|
-
preamountChange(){
|
|
238
|
-
//tag
|
|
239
|
-
if (this.row.f_collection_type == '按金额') {
|
|
240
|
-
this.countprice()
|
|
241
|
-
}else {
|
|
242
|
-
//tag
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
pregasChange(){
|
|
246
|
-
//tag
|
|
247
|
-
if (this.row.f_collection_type == '按气量') {
|
|
248
|
-
this.countprice()
|
|
249
|
-
}else {
|
|
250
|
-
//tag
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
updatewritecard(msg) {
|
|
254
|
-
//tag)
|
|
255
|
-
let http11 = new HttpResetClass()
|
|
256
|
-
let sqldata = `update t_sellinggas set f_write_card = '${msg}' where id = '${this.sellinggasId}'`
|
|
257
|
-
//tag)
|
|
258
|
-
http11.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/runSQL`, {data:{sql:sqldata}}, {resolveMsg: null, rejectMsg: null})
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
aa() {
|
|
262
|
-
//tag
|
|
263
|
-
this.isworking = false
|
|
264
|
-
clearTimeout(this.timer);
|
|
265
|
-
clearTimeout(this.timer2);
|
|
266
|
-
},
|
|
267
|
-
selectmoney (money) {
|
|
268
|
-
//tag
|
|
269
|
-
//tag
|
|
270
|
-
if (this.row.f_collection_type == '按金额') {
|
|
271
|
-
this.model.f_preamount = money
|
|
272
|
-
}else {
|
|
273
|
-
this.model.f_pregas = money
|
|
274
|
-
}
|
|
275
|
-
this.countprice()
|
|
276
|
-
},
|
|
277
|
-
isLimit(gas,fee){
|
|
278
|
-
if (this.hasLimit) {
|
|
279
|
-
if (this.limitDetial.f_limit_type ==='气量'){
|
|
280
|
-
if (gas > this.maxgas){
|
|
281
|
-
this.$showAlert(`预购气量大于购气气量上限,上限为:${this.maxgas}`, 'warning', 5000)
|
|
282
|
-
return false
|
|
283
|
-
}
|
|
284
|
-
}else {
|
|
285
|
-
if (fee > this.maxgas){
|
|
286
|
-
this.$showAlert(`预购气量大于购气金额上限,上限为:${this.maxgas}`, 'warning', 5000)
|
|
287
|
-
return false
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
return true
|
|
291
|
-
}
|
|
292
|
-
return true
|
|
293
|
-
},
|
|
294
|
-
// 化价
|
|
295
|
-
async countprice () {
|
|
296
|
-
//tag
|
|
297
|
-
/*let parameter = {
|
|
298
|
-
model: {
|
|
299
|
-
'f_userfiles_id': 21142,
|
|
300
|
-
'f_card_id': null,
|
|
301
|
-
'f_meternumber': '123123123'
|
|
302
|
-
},
|
|
303
|
-
value: '',
|
|
304
|
-
isGasValue: '1'
|
|
305
|
-
}*/
|
|
306
|
-
let parameter = {
|
|
307
|
-
model: {
|
|
308
|
-
f_userfiles_id: this.row.f_userfiles_id,
|
|
309
|
-
f_card_id: this.row.f_card_id,
|
|
310
|
-
f_meternumber: this.row.f_meternumber // 表编号
|
|
311
|
-
},
|
|
312
|
-
value: this.row.f_collection_type == '按金额'? this.model.f_preamount : this.model.f_pregas, // 传入气量或者金额
|
|
313
|
-
isGasValue: this.row.f_collection_type == '按金额'? 1 : 0 // 0表示气量,1表示金额
|
|
314
|
-
}
|
|
315
|
-
try {
|
|
316
|
-
//tag)
|
|
317
|
-
let http = new HttpResetClass()
|
|
318
|
-
// let gasParams = await http.load('POST',`/api/af-revenue/logic/commonCal`, {data: parameter}, {})
|
|
319
|
-
let gasParams = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/commonCal`, {data: parameter}, {resolveMsg: null, rejectMsg: null})
|
|
320
|
-
//tag)
|
|
321
|
-
if (gasParams.data) {
|
|
322
|
-
// 本次缴费 = 预存金额
|
|
323
|
-
this.model.f_totalcost = this.model.f_preamount = gasParams.data.chargenum?gasParams.data.chargenum:this.model.f_preamount
|
|
324
|
-
// 预存气量
|
|
325
|
-
this.model.f_pregas = gasParams.data.oughtamount?gasParams.data.oughtamount:this.model.f_pregas
|
|
326
|
-
}
|
|
327
|
-
} catch (e) {
|
|
328
|
-
//tag)
|
|
329
|
-
this.$showMessage('获取化价信息错误!')
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
},
|
|
333
|
-
myverify () {
|
|
334
|
-
let flag = false
|
|
335
|
-
if (!this.model.f_totalcost || this.model.f_totalcost < 0 ) {
|
|
336
|
-
this.$showMessage('本次缴费金额异常')
|
|
337
|
-
return flag
|
|
338
|
-
}
|
|
339
|
-
if (!this.model.f_pregas || this.model.f_pregas < 0 ) {
|
|
340
|
-
this.$showMessage('预购气量异常')
|
|
341
|
-
return flag
|
|
342
|
-
}
|
|
343
|
-
if (!this.model.f_preamount || this.model.f_preamount < 0 ) {
|
|
344
|
-
this.$showMessage('预购金额异常')
|
|
345
|
-
return flag
|
|
346
|
-
}
|
|
347
|
-
if (!this.model.f_payment) {
|
|
348
|
-
this.$showMessage('请选择支付方式')
|
|
349
|
-
return flag
|
|
350
|
-
}
|
|
351
|
-
flag = true
|
|
352
|
-
return flag
|
|
353
|
-
},
|
|
354
|
-
async confirm() {
|
|
355
|
-
this.clickConfirm = true
|
|
356
|
-
//tag
|
|
357
|
-
let fengongsi = this.$appdata.getSingleValue('分公司')
|
|
358
|
-
if (!fengongsi) {
|
|
359
|
-
this.$showMessage('分公司获取失败!')
|
|
360
|
-
this.clickConfirm = false
|
|
361
|
-
return
|
|
362
|
-
}
|
|
363
|
-
let posinfo2 = HostApp.read(fengongsi)
|
|
364
|
-
if(posinfo2.code == 200){
|
|
365
|
-
//tag
|
|
366
|
-
if(posinfo2.msg.Gas > 0){
|
|
367
|
-
this.$showMessage('卡上有气,请告知客户接表后再来充值!')
|
|
368
|
-
this.clickConfirm = false
|
|
369
|
-
return
|
|
370
|
-
}
|
|
371
|
-
}else {
|
|
372
|
-
this.$showMessage(posinfo2.msg)
|
|
373
|
-
this.clickConfirm = false
|
|
374
|
-
return
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
this.$showMessage(`确定对客户${this.row.f_user_name}进行缴费吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
378
|
-
if (res === 'confirm') {
|
|
379
|
-
//tag
|
|
380
|
-
// 校验
|
|
381
|
-
if (this.myverify()) {
|
|
382
|
-
this.clickConfirm = true
|
|
383
|
-
//tag
|
|
384
|
-
// 1.调用收款接口
|
|
385
|
-
if (this.model.f_payment == '微信付款') {
|
|
386
|
-
//tag
|
|
387
|
-
// 去支付界面
|
|
388
|
-
let _this = this
|
|
389
|
-
let pardate = {
|
|
390
|
-
_this:this,
|
|
391
|
-
title:'二维码收款',
|
|
392
|
-
safe:true
|
|
393
|
-
}
|
|
394
|
-
_this.$dispatch('gotoson',pardate)
|
|
395
|
-
//tag
|
|
396
|
-
let parameter = {
|
|
397
|
-
money: this.model.f_totalcost,
|
|
398
|
-
f_userfiles_id: this.row.f_userfiles_id,
|
|
399
|
-
f_userinfo_id: this.row.f_userinfo_id,
|
|
400
|
-
type: '燃气缴费',
|
|
401
|
-
filiale: this.filiale
|
|
402
|
-
}
|
|
403
|
-
_this.$goto('create_qrcode', {row: parameter,type: this.model.f_payment}, 'self',_this.payback)
|
|
404
|
-
|
|
405
|
-
}else if (this.model.f_payment == '工行支付') {
|
|
406
|
-
//tag
|
|
407
|
-
// 去支付界面
|
|
408
|
-
let _this = this
|
|
409
|
-
let pardate = {
|
|
410
|
-
_this:_this,
|
|
411
|
-
title:'二维码收款',
|
|
412
|
-
safe:true
|
|
413
|
-
}
|
|
414
|
-
_this.$dispatch('gotoson',pardate)
|
|
415
|
-
//tag
|
|
416
|
-
let parameter = {
|
|
417
|
-
money: this.model.f_totalcost,
|
|
418
|
-
filiale: this.filiale
|
|
419
|
-
}
|
|
420
|
-
//tag)
|
|
421
|
-
_this.$goto('create_qrcode', {row: parameter,type: this.model.f_payment}, 'self',_this.payback)
|
|
422
|
-
|
|
423
|
-
} else {
|
|
424
|
-
//tag
|
|
425
|
-
this.$showMessage('此功能正在维护中!')
|
|
426
|
-
return
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
})
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
},
|
|
435
|
-
payback (msg) {
|
|
436
|
-
if (msg) {
|
|
437
|
-
//tag)
|
|
438
|
-
this.model.f_serial_id = msg
|
|
439
|
-
//tag
|
|
440
|
-
this.saveCharges()
|
|
441
|
-
}else {
|
|
442
|
-
//tag
|
|
443
|
-
this.$showMessage('支付失败!')
|
|
444
|
-
}
|
|
445
|
-
},
|
|
446
|
-
async getcardid () {
|
|
447
|
-
//tag
|
|
448
|
-
let http = new HttpResetClass()
|
|
449
|
-
let row = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/getCardNumber`, {data: {id: this.row.brand_id}}, {
|
|
450
|
-
// this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/getCardNumber`, {data: {id: this.row.brand_id}}, {
|
|
451
|
-
resolveMsg: null,
|
|
452
|
-
rejectMsg: null
|
|
453
|
-
})
|
|
454
|
-
//tag)
|
|
455
|
-
let cardId = row.data.cardNumber + ''
|
|
456
|
-
this.row.f_card_id = this.model.cardNumber = cardId
|
|
457
|
-
//tag)
|
|
458
|
-
//tag)
|
|
459
|
-
},
|
|
460
|
-
async saveCharges() {
|
|
461
|
-
//tag
|
|
462
|
-
// 操作时间
|
|
463
|
-
this.model.f_operate_date = Util.toStandardTimeString()
|
|
464
|
-
// 收款等于本次缴费
|
|
465
|
-
this.model.f_collection = this.model.f_totalcost
|
|
466
|
-
//tag)
|
|
467
|
-
let http1 = new HttpResetClass()
|
|
468
|
-
let resp = ''
|
|
469
|
-
if (this.row.f_meter_type.includes('物联网表')) {
|
|
470
|
-
//tag
|
|
471
|
-
// resp = await http1.load('POST',`/af-telephone/rs/logic/iotPay`, {data: this.model},{
|
|
472
|
-
resp = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/iotPay`, {data: this.model},{
|
|
473
|
-
resolveMsg: null,
|
|
474
|
-
rejectMsg: null
|
|
475
|
-
})
|
|
476
|
-
}else if (this.row.f_meter_type.includes('机表')) {
|
|
477
|
-
//tag
|
|
478
|
-
let par =
|
|
479
|
-
{
|
|
480
|
-
f_userinfo_code: this.model.f_userinfo_code,
|
|
481
|
-
f_filialeids: this.model.f_filialeids,
|
|
482
|
-
f_payment: this.model.f_payment,
|
|
483
|
-
f_print: this.model.f_print,
|
|
484
|
-
f_collection: this.model.f_collection,
|
|
485
|
-
f_overdue: this.model.f_overdue,
|
|
486
|
-
f_serial_id: this.model.f_serial_id, // 流水号
|
|
487
|
-
f_unit: this.model.f_unit, // yuan/fen,如果不传按分处理
|
|
488
|
-
f_operate_date: this.model.f_operate_date,
|
|
489
|
-
f_operator: this.model.f_operator, // 第三方渠道(微信,支付宝,等)
|
|
490
|
-
f_comments: this.model.f_comments //备注
|
|
491
|
-
}
|
|
492
|
-
//tag)
|
|
493
|
-
// resp = await http1.load('POST',`/af-telephone/rs/logic/machinePay`, {data: this.model},{
|
|
494
|
-
resp = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/machinePay`, {data: par},{
|
|
495
|
-
resolveMsg: null,
|
|
496
|
-
rejectMsg: null
|
|
497
|
-
})
|
|
498
|
-
|
|
499
|
-
}else if (this.row.f_meter_type.includes('卡表')) {
|
|
500
|
-
//tag
|
|
501
|
-
// resp = await http1.load('POST',`/af-telephone/rs/logic/thirdPay`, {data: this.model},{
|
|
502
|
-
resp = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/thirdPay`, {data: this.model},{
|
|
503
|
-
resolveMsg: null,
|
|
504
|
-
rejectMsg: null
|
|
505
|
-
})
|
|
506
|
-
this.sellinggasId = resp.data.id
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
//tag)
|
|
510
|
-
/*{"data":{"id":"175860728"}}*/
|
|
511
|
-
if (resp.data) {
|
|
512
|
-
//tag
|
|
513
|
-
// 判断是否是手机
|
|
514
|
-
//tag)
|
|
515
|
-
if (Vue.config.telephone.ApproveConfig.ispos) {
|
|
516
|
-
//tag
|
|
517
|
-
if (this.row.f_meter_type.includes('卡表')) {
|
|
518
|
-
//tag
|
|
519
|
-
this.$showMessage('售气成功!是否现在现在进行写卡?', ['confirm', 'cancel']).then((res) => {
|
|
520
|
-
if (res === 'confirm') {
|
|
521
|
-
//tag
|
|
522
|
-
this.writeCard()
|
|
523
|
-
}else {
|
|
524
|
-
//tag
|
|
525
|
-
this.updatewritecard('未写卡')
|
|
526
|
-
}
|
|
527
|
-
})
|
|
528
|
-
}else {
|
|
529
|
-
// 打印收据
|
|
530
|
-
//tag
|
|
531
|
-
this.$showMessage('售气成功!是否打印收据?', ['confirm', 'cancel']).then((res) => {
|
|
532
|
-
if (res === 'confirm') {
|
|
533
|
-
//tag
|
|
534
|
-
this.PrintReceipt()
|
|
535
|
-
}
|
|
536
|
-
})
|
|
537
|
-
}
|
|
538
|
-
}else {
|
|
539
|
-
this.$showMessage('该设备暂不支持打印小票!')
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
}else {
|
|
543
|
-
this.$showMessage('保存收费记录失败!')
|
|
544
|
-
//tag
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
},
|
|
548
|
-
clean() {
|
|
549
|
-
this.$info('取消操作')
|
|
550
|
-
},
|
|
551
|
-
PrintReceipt() {
|
|
552
|
-
//tag
|
|
553
|
-
// 清空打印内容
|
|
554
|
-
let printContent = []
|
|
555
|
-
// 抬头
|
|
556
|
-
// var comName = '周口天然气'
|
|
557
|
-
// printContent.push({type: 3, text: comName, fontsize: 3, isbold: true, align: 'center'})
|
|
558
|
-
//tag)
|
|
559
|
-
printContent.push({type: 3, text: '自 助 购 气 凭 证', fontsize: 3, isbold: true, align: 'center'})
|
|
560
|
-
//tag)
|
|
561
|
-
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
562
|
-
// 小票信息
|
|
563
|
-
//tag)
|
|
564
|
-
printContent.push({type: 3, text: '用户编号:' + this.model.f_userinfo_code, fontsize: 2, isbold: true, align: 'left'})
|
|
565
|
-
// 卡表用户显示卡号
|
|
566
|
-
//tag)
|
|
567
|
-
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表') {
|
|
568
|
-
//tag)
|
|
569
|
-
printContent.push({type: 3, text: '用户卡号:' + this.model.f_card_id, fontsize: 2, isbold: true, align: 'left'})
|
|
570
|
-
}
|
|
571
|
-
//tag)
|
|
572
|
-
printContent.push({type: 3, text: '用户姓名:' + this.row.f_user_name, fontsize: 2, isbold: true, align: 'left'})
|
|
573
|
-
//tag)
|
|
574
|
-
printContent.push({type: 3, text: '用户地址:' + this.row.f_address, fontsize: 2, isbold: true, align: 'left'})
|
|
575
|
-
// 机表物联网表显示购买金额
|
|
576
|
-
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表' && this.row.f_collection_type !== '按金额') {
|
|
577
|
-
//tag)
|
|
578
|
-
printContent.push({type: 3, text: '购 气 量:' + this.model.f_pregas + '方', fontsize: 2, isbold: true, align: 'left'})
|
|
579
|
-
}
|
|
580
|
-
printContent.push({type: 3, text: '本次缴费:' + this.model.f_collection + '元', fontsize: 2, isbold: true, align: 'left'})
|
|
581
|
-
//tag)
|
|
582
|
-
printContent.push({type: 3, text: '大 写:' + Vue.PosUtil.convertCurrency(this.model.f_collection), fontsize: 2, isbold: true, align: 'left'})
|
|
583
|
-
//tag)
|
|
584
|
-
printContent.push({type: 3, text: '购气日期:' + Vue.PosUtil.getNowDate('yyyy-MM-dd'), fontsize: 2, isbold: true, align: 'left'})
|
|
585
|
-
//tag)
|
|
586
|
-
printContent.push({type: 3, text: '支付流水号:' + this.model.f_serial_id, fontsize: 2, isbold: true, align: 'left'})
|
|
587
|
-
//tag)
|
|
588
|
-
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表') {
|
|
589
|
-
//tag)
|
|
590
|
-
printContent.push({type: 3, text: '写卡结果:' + this.isWrited, fontsize: 2, isbold: true, align: 'left'})
|
|
591
|
-
}
|
|
592
|
-
//tag)
|
|
593
|
-
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
594
|
-
//tag)
|
|
595
|
-
printContent.push({type: 3, text: '', fontsize: 3, isbold: true, align: 'center'})
|
|
596
|
-
//tag)
|
|
597
|
-
// 走纸
|
|
598
|
-
printContent.push({type: 4, value: 5, unit: 'pixel'})
|
|
599
|
-
//tag)
|
|
600
|
-
// 打印
|
|
601
|
-
let print = HostApp.print(JSON.stringify(printContent))
|
|
602
|
-
if (print.code === 200) {
|
|
603
|
-
this.$showMessage('打印成功!')
|
|
604
|
-
|
|
605
|
-
}else {
|
|
606
|
-
this.$showMessage('打印失败!请检查POS纸张、电量等,确认无误点击确认再次打印', ['confirm', 'cancel']).then((res) => {
|
|
607
|
-
if (res === 'confirm') {
|
|
608
|
-
//tag
|
|
609
|
-
let print2 = HostApp.print(JSON.stringify(printContent))
|
|
610
|
-
if (print2.code === 200) {
|
|
611
|
-
this.$showMessage('打印成功!')
|
|
612
|
-
}else {
|
|
613
|
-
this.$showMessage('打印失败!')
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
})
|
|
617
|
-
}
|
|
618
|
-
},
|
|
619
|
-
async writeCard() {
|
|
620
|
-
//tag
|
|
621
|
-
|
|
622
|
-
let fengongsi = this.$appdata.getSingleValue('分公司')
|
|
623
|
-
if (!fengongsi) {
|
|
624
|
-
this.$showMessage('分公司获取失败!')
|
|
625
|
-
return
|
|
626
|
-
}
|
|
627
|
-
let posinfo2 = HostApp.read(fengongsi)
|
|
628
|
-
//tag)
|
|
629
|
-
let cardNumber = ''
|
|
630
|
-
let Times = 1
|
|
631
|
-
if(posinfo2.code == 200){
|
|
632
|
-
//tag
|
|
633
|
-
this.row.f_card_id = this.model.cardNumber = cardNumber = posinfo2.msg.CardID
|
|
634
|
-
Times = posinfo2.msg.Times
|
|
635
|
-
// this.$showMessage('写卡次数+++' + (Times + 1))
|
|
636
|
-
}else {
|
|
637
|
-
this.$showMessage('读卡失败!')
|
|
638
|
-
}
|
|
639
|
-
if (!cardNumber || cardNumber == '') {
|
|
640
|
-
this.$showMessage('卡号异常!写卡失败!')
|
|
641
|
-
return
|
|
642
|
-
}
|
|
643
|
-
let params = {
|
|
644
|
-
AREA:'ZhouKou', // 分公司
|
|
645
|
-
ulen: 0, // 判断版本
|
|
646
|
-
factory: this.row.f_alias,
|
|
647
|
-
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
648
|
-
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
649
|
-
kh: cardNumber, // 卡号
|
|
650
|
-
yhh: this.row.f_meterid ? this.row.f_meterid : 0, // 用户号,档案中自己输
|
|
651
|
-
ql: this.model.writeCard_gas ? this.model.writeCard_gas : this.model.f_pregas, // 预购气量
|
|
652
|
-
csql: '0', // 上次购气量,新开户为0
|
|
653
|
-
ccsql: '0', // 上上次购气量,新开户为0
|
|
654
|
-
cs: Times ? Times + 1 : '1', // 求购气次数,先开户为1
|
|
655
|
-
ljgql: this.model.f_total_gas + this.model.f_pregas, // 当前累计购气量
|
|
656
|
-
bkcs: '0', // 新开户卡,为0
|
|
657
|
-
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
658
|
-
bjql: this.row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
659
|
-
czsx: this.row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
660
|
-
tzed: this.row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
661
|
-
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
662
|
-
meterid: this.row.f_meternumber, // 表号
|
|
663
|
-
money: this.model.writeCard_fee ? this.model.writeCard_fee : this.model.f_preamount, // 购气金额
|
|
664
|
-
dqdm: this.row.f_area_code, // 精益工业地区代码
|
|
665
|
-
klx: this.row.f_coding
|
|
666
|
-
}
|
|
667
|
-
// 获取写卡参数
|
|
668
|
-
let data = {
|
|
669
|
-
f_card_id: this.row.f_card_id + '',
|
|
670
|
-
f_alias: this.row.f_alias,
|
|
671
|
-
f_user_id: this.row.f_user_id,
|
|
672
|
-
f_userfiles_id: this.row.f_userfiles_id
|
|
673
|
-
}
|
|
674
|
-
//tag)
|
|
675
|
-
let http = new HttpResetClass()
|
|
676
|
-
let cardParams = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/af-
|
|
677
|
-
//tag)
|
|
678
|
-
// 拼接参数
|
|
679
|
-
params = await Object.assign({}, await this.writeCardParams(cardParams), params)
|
|
680
|
-
//tag)
|
|
681
|
-
this.writeparams = params
|
|
682
|
-
this.isworking = true
|
|
683
|
-
// 写卡定时器
|
|
684
|
-
this.timer = setTimeout(this.aa,"5000")
|
|
685
|
-
this.timer2 = setTimeout(this.writecard2,"2000")
|
|
686
|
-
|
|
687
|
-
},
|
|
688
|
-
async writecard2() {
|
|
689
|
-
let params = this.writeparams
|
|
690
|
-
//tag)
|
|
691
|
-
let writres = await HostApp.sell(JSON.stringify(params))
|
|
692
|
-
//tag)
|
|
693
|
-
this.isworking = false
|
|
694
|
-
let msg = '写卡失败'
|
|
695
|
-
if(writres.code =='200') {
|
|
696
|
-
this.isWrited = '已写卡'
|
|
697
|
-
// 写卡成功,修改状态 已写卡 调用打票
|
|
698
|
-
await this.updatewritecard('已写卡')
|
|
699
|
-
this.$showMessage('写卡成功!是否打印小票?', ['confirm', 'cancel']).then((res) => {
|
|
700
|
-
if (res === 'confirm') {
|
|
701
|
-
//tag
|
|
702
|
-
this.PrintReceipt()
|
|
703
|
-
}
|
|
704
|
-
})
|
|
705
|
-
}else {
|
|
706
|
-
this.isWrited = '未写卡'
|
|
707
|
-
await this.updatewritecard('未写卡')
|
|
708
|
-
this.$showMessage('写卡失败!是否打印小票?', ['confirm', 'cancel']).then((res) => {
|
|
709
|
-
if (res === 'confirm') {
|
|
710
|
-
//tag
|
|
711
|
-
this.PrintReceipt()
|
|
712
|
-
}
|
|
713
|
-
})
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
writeCardParams (cardParams) {
|
|
717
|
-
//tag)
|
|
718
|
-
let result = {
|
|
719
|
-
csql: cardParams.data.sc,
|
|
720
|
-
lastmoney: cardParams.data.scje,
|
|
721
|
-
ccsql: cardParams.data.ssc,
|
|
722
|
-
lastlastmoney: cardParams.data.sscje,
|
|
723
|
-
ljgql: cardParams.data.f_pregas,
|
|
724
|
-
ljyql: cardParams.data.f_pregasall,
|
|
725
|
-
yhh: cardParams.data.f_meterid,
|
|
726
|
-
sxrq: cardParams.data.f_perform_date,
|
|
727
|
-
totalmoney: cardParams.data.f_collection,
|
|
728
|
-
stairversion: cardParams.data.f_stairversion,
|
|
729
|
-
pricedate: cardParams.data.pricedate,
|
|
730
|
-
pricetype: cardParams.data.pricetype
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
// 对阶梯进行处理
|
|
734
|
-
if (cardParams.data.stairprice.includes(';') && cardParams.data.stairamount.includes(';')) {
|
|
735
|
-
let gases = cardParams.data.stairamount.split(';')
|
|
736
|
-
let prices = cardParams.data.stairprice.split(';')
|
|
737
|
-
if (gases.length >= 2) {
|
|
738
|
-
result.stairgas1 = gases[0] !== '' ? gases[0] : 0
|
|
739
|
-
result.stairgas2 = gases[1] !== '' ? gases[1] : 0
|
|
740
|
-
result.stairgas3 = '99999999'
|
|
741
|
-
}
|
|
742
|
-
if (prices.length >= 2) {
|
|
743
|
-
result.stairprice1 = prices[0] !== '' ? prices[0] : 0
|
|
744
|
-
result.stairprice2 = prices[1] !== '' ? prices[1] : 0
|
|
745
|
-
result.stairprice3 = prices[2] !== '' ? prices[2] : 0
|
|
746
|
-
}
|
|
747
|
-
} else {
|
|
748
|
-
// 从固定气价的表换金额表的时候,气量随便写,金额用之前的固定单价
|
|
749
|
-
result.stairgas1 = '77777777'
|
|
750
|
-
result.stairgas2 = '88888888'
|
|
751
|
-
result.stairgas3 = '99999999'
|
|
752
|
-
|
|
753
|
-
result.stairprice1 = cardParams.data.stairprice
|
|
754
|
-
result.stairprice2 = cardParams.data.stairprice
|
|
755
|
-
result.stairprice3 = cardParams.data.stairprice
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
return result
|
|
759
|
-
}
|
|
760
|
-
},
|
|
761
|
-
computed: {
|
|
762
|
-
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
</script>
|
|
766
|
-
|
|
767
|
-
<style scoped>
|
|
768
|
-
.app-row {
|
|
769
|
-
background-color: white;
|
|
770
|
-
padding: 10px 10px 0 10px;
|
|
771
|
-
border-bottom: 1px solid rgba(235, 235, 235, 0.7);
|
|
772
|
-
}
|
|
773
|
-
.input_ys {
|
|
774
|
-
/*border: 1px solid #93B2D3 !important;*/
|
|
775
|
-
border: none !important;
|
|
776
|
-
width: 220px;
|
|
777
|
-
height: 35px;
|
|
778
|
-
text-align: center;
|
|
779
|
-
}
|
|
780
|
-
.button_btn {
|
|
781
|
-
width: 27%;
|
|
782
|
-
height: 45px;
|
|
783
|
-
background-color: #4b93da;
|
|
784
|
-
border-radius: 6px;
|
|
785
|
-
border: none;
|
|
786
|
-
font-family: PingFang;
|
|
787
|
-
font-size: 18px;
|
|
788
|
-
color: #ffffff;
|
|
789
|
-
margin: 3% 2%;
|
|
790
|
-
}
|
|
791
|
-
.font_normal_body {
|
|
792
|
-
font-size: 16px !important;
|
|
793
|
-
line-height: 10px;
|
|
794
|
-
}
|
|
795
|
-
.btn-color{
|
|
796
|
-
background-color: #FFFFFF;
|
|
797
|
-
border-radius: 10px ;
|
|
798
|
-
border: 1px solid #499EDF;
|
|
799
|
-
}
|
|
800
|
-
.btn-font{
|
|
801
|
-
font:600 16px PingFang-SC-Bold;
|
|
802
|
-
color: #499EDF;
|
|
803
|
-
}
|
|
804
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height: auto;width: 100%;padding: 10px">
|
|
3
|
+
<div partial>
|
|
4
|
+
<div class="row app-row">
|
|
5
|
+
<div class="col-xs-4">
|
|
6
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
7
|
+
<label class="font text-left">预购气量:</label>
|
|
8
|
+
</div><div class="col-xs-8">
|
|
9
|
+
<input type="number" class ="input_search input_ys" placeholder="请输入预存气量..." @change="pregasChange" v-model="model.f_pregas"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="row app-row">
|
|
12
|
+
<div class="col-xs-4">
|
|
13
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
14
|
+
<label class="font text-left">预购金额:</label>
|
|
15
|
+
</div><div class="col-xs-8">
|
|
16
|
+
<input type="number" class ="input_search input_ys" placeholder="请输入预购金额..." @change="preamountChange" v-model="model.f_preamount"></div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="row app-row" v-if="hasLimit">
|
|
19
|
+
<div class="col-xs-4">
|
|
20
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
21
|
+
<label class="font text-left">购气上限:</label>
|
|
22
|
+
</div><div class="col-xs-8">
|
|
23
|
+
<input type="number" class ="input_search input_ys" placeholder="请输入购气上限..." readonly v-model="maxgas"></div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="row app-row">
|
|
26
|
+
<div class="col-xs-4">
|
|
27
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
28
|
+
<label class="font text-left" style="color: #a51212">本次缴费:</label>
|
|
29
|
+
</div><div class="col-xs-8">
|
|
30
|
+
<!--<input type="text" class ="input_search input_ys" placeholder="请输入缴费金额..."
|
|
31
|
+
@blur="preamount()"
|
|
32
|
+
v-model="model.f_totalcost"></div>-->
|
|
33
|
+
<input type="number" class ="input_search input_ys" placeholder="请输入缴费金额..." readonly
|
|
34
|
+
v-model="model.f_totalcost"></div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="row app-row">
|
|
37
|
+
<div class="col-xs-4">
|
|
38
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
39
|
+
<label class="font text-left">付款方式:</label>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="col-xs-8">
|
|
42
|
+
<!--<input type="text" class ="input_search input_ys" placeholder="请选择付款方式..." readonly v-model="model.f_payment"></div>-->
|
|
43
|
+
<v-select
|
|
44
|
+
:value.sync="model.f_payment"
|
|
45
|
+
:options='Paytypes'
|
|
46
|
+
placeholder='请选择付款方式...'
|
|
47
|
+
close-on-select
|
|
48
|
+
:search="false"
|
|
49
|
+
value-single
|
|
50
|
+
disabled
|
|
51
|
+
style="margin-bottom: 10px;"
|
|
52
|
+
width="78%"
|
|
53
|
+
v-model="model.f_payment"
|
|
54
|
+
></v-select>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="row app-row">
|
|
58
|
+
<div class="col-xs-4">
|
|
59
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
60
|
+
<label class="font text-left">打印格式:</label>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="col-xs-8">
|
|
63
|
+
<!--<input type="text" class ="input_search input_ys" placeholder="请输入打印格式..." readonly v-model="model.f_print"></div>-->
|
|
64
|
+
<v-select
|
|
65
|
+
:value.sync="model.f_print"
|
|
66
|
+
:options='Printtypes'
|
|
67
|
+
placeholder='请输入打印格式...'
|
|
68
|
+
close-on-select
|
|
69
|
+
value-single
|
|
70
|
+
style="margin-bottom: 10px;"
|
|
71
|
+
width="78%"
|
|
72
|
+
v-model="model.f_print"
|
|
73
|
+
></v-select>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="row app-row" v-if="model.f_payment[0].includes('POS')">
|
|
78
|
+
<div class="col-xs-4">
|
|
79
|
+
<img src="../../../assets/购气缴费.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
80
|
+
<label class="font text-left"> 凭证号:</label>
|
|
81
|
+
</div><div class="col-xs-8">
|
|
82
|
+
<input type="text" class ="input_search input_ys" placeholder="请输入缴费金额..."
|
|
83
|
+
v-model="model.f_voucher_number"></div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="row" style="margin-top: 10px;">
|
|
87
|
+
<label class="font_normal_body"><b> 选择{{matertype2}} </b></label>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="row" style="text-align: center">
|
|
90
|
+
<button class="button_btn" @click="selectmoney(btnmoney)" v-for=" btnmoney in btnmoneys"> {{btnmoney}}{{matertype}}</button>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="row app-row" style="padding-top: 0.5em;">
|
|
93
|
+
<div class="col-sm-12">
|
|
94
|
+
<label for="f_comments" class="font_normal_body"> 备注 </label>
|
|
95
|
+
<input class="input_search input_ys" style="width:60%" v-model="model.f_comments" rows="1" placeholder="备注">
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div style="text-align:right; height: 20%;margin-top: 15px;">
|
|
99
|
+
<strong v-show="!isMax" style="font-size: large" >计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
|
|
100
|
+
<strong v-show="isMax" style="font-size: large;color: #d9534f" >已经达到购气上限</strong><br/>
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
<div class="row text-center" style="margin-top: 25px;">
|
|
104
|
+
<button class="btn btn-lg btn-font btn-color" style="width: 28%;" type="button" @click="confirm()" :disabled="clickConfirm" >确认</button>
|
|
105
|
+
<!--<button class="btn btn-lg btn-font btn-color" @click="clean()" style="font-size: 15px;">取消</button>-->
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<work-busy :is-busy="isworking"></work-busy>
|
|
109
|
+
</div>
|
|
110
|
+
</template>
|
|
111
|
+
<script>
|
|
112
|
+
/**
|
|
113
|
+
*综合业务
|
|
114
|
+
*收费组件
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
import {HttpResetClass} from 'vue-client'
|
|
118
|
+
import Vue from 'vue'
|
|
119
|
+
import * as Util from '../../../components/Util'
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
export default {
|
|
123
|
+
title: '物联网表收费',
|
|
124
|
+
data() {
|
|
125
|
+
return {
|
|
126
|
+
config: {
|
|
127
|
+
showupload:false, //默认不显示附件上传组件
|
|
128
|
+
hasPrint : false, //默认打票
|
|
129
|
+
hasBillManage : false, //默认不启用发票管理
|
|
130
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
131
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
132
|
+
payment: '现金缴费'
|
|
133
|
+
},
|
|
134
|
+
isMax:false,
|
|
135
|
+
isWrited: '未写卡',
|
|
136
|
+
model: {
|
|
137
|
+
f_userfiles_id: '', // 表编号 方式一: 针对微信查询
|
|
138
|
+
f_userinfo_code: '', // 用户编号 卡表标识
|
|
139
|
+
f_filialeids: '', // 用户分公司
|
|
140
|
+
f_overdue: 0, // 机表滞纳金减免
|
|
141
|
+
f_card_id: '', // 卡表缴费标识 卡号
|
|
142
|
+
f_user_id: '', // 卡表缴费标识 用户id
|
|
143
|
+
f_serial_id: '', // 流水号
|
|
144
|
+
f_pregas: 0, // 预购气量 购气量
|
|
145
|
+
f_preamount: 0, // 预购金额 购气金额
|
|
146
|
+
f_totalcost: 0, // 本次缴费金额 应交气费
|
|
147
|
+
f_collection: 0, // 收款
|
|
148
|
+
// f_terminal_num: 'POS设备号', // 这个不能传 终端号/设备号
|
|
149
|
+
f_payment: '工行支付', // 付款方式
|
|
150
|
+
f_bank_name :'',
|
|
151
|
+
f_print: '普通收据', // 打印格式card
|
|
152
|
+
f_unit: 'yuan', // yuan/fen,如果不传按分处理
|
|
153
|
+
f_operate_date: '', //操作时间
|
|
154
|
+
f_operator: '' // 第三方渠道(微信,支付宝,等)
|
|
155
|
+
},
|
|
156
|
+
btnmoneys: [50,100,200,300,500,1000], // 默认气量或者金额
|
|
157
|
+
// 下拉框值
|
|
158
|
+
// Paytypes: this.$appdata.getParam('POS支付方式'),
|
|
159
|
+
Paytypes: [{label: "现金缴费", value: "现金缴费"}, {label: "微信付款", value: "微信付款"}, {label: "银行支付", value: "银行支付"}],
|
|
160
|
+
Printtypes: [{label: "普通收据", value: "普通收据"}],
|
|
161
|
+
calculatedetail: '', // 计算公式
|
|
162
|
+
|
|
163
|
+
mulPrint: false,
|
|
164
|
+
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
165
|
+
// 下拉框值
|
|
166
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
167
|
+
privilegeList: [{label: '无优惠', value: '0'}],
|
|
168
|
+
matertype: '元',
|
|
169
|
+
matertype2: '金额',
|
|
170
|
+
timer:null,
|
|
171
|
+
timer2:null,
|
|
172
|
+
sellinggasId:'',
|
|
173
|
+
writeparams: {},
|
|
174
|
+
isworking: false,
|
|
175
|
+
filiale: '' // 支付的分公司
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
props: ['row'],
|
|
180
|
+
ready() {
|
|
181
|
+
//tag
|
|
182
|
+
this.Paytypes = this.$appdata.getParam('支付方式')
|
|
183
|
+
//tag)
|
|
184
|
+
//tag)
|
|
185
|
+
if (this.row.f_filialeid == '10101') {
|
|
186
|
+
//tag
|
|
187
|
+
this.filiale = 'zhoukou'
|
|
188
|
+
}else if (this.row.f_filialeid == '35520') {
|
|
189
|
+
//tag
|
|
190
|
+
this.filiale = 'xiangcheng'
|
|
191
|
+
}else if (this.row.f_filialeid == '35532') {
|
|
192
|
+
//tag
|
|
193
|
+
this.filiale = 'luyi'
|
|
194
|
+
}else if (this.row.f_filialeid == '35538') {
|
|
195
|
+
//tag
|
|
196
|
+
this.filiale = 'dancheng'
|
|
197
|
+
}else if (this.row.f_filialeid == '35526') {
|
|
198
|
+
//tag
|
|
199
|
+
this.filiale = 'xihua'
|
|
200
|
+
}else {
|
|
201
|
+
this.$showMessage('分公司异常,请联系管理员!')
|
|
202
|
+
}
|
|
203
|
+
this.matertype = this.row.f_collection_type == '按金额' ? '元' : '方'
|
|
204
|
+
this.matertype2 = this.row.f_collection_type == '按金额' ? '金额' : '气量'
|
|
205
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
206
|
+
this.model.f_userinfo_code = this.row.f_userinfo_code
|
|
207
|
+
this.model.f_user_id = this.row.f_user_id
|
|
208
|
+
this.model.f_card_id = this.row.f_card_id
|
|
209
|
+
this.model.f_total_gas=this.row.f_total_gas
|
|
210
|
+
|
|
211
|
+
// this.model.f_operator= "手机测试"
|
|
212
|
+
// this.model.f_operatorid= "42118"
|
|
213
|
+
// this.model.f_orgid= "21142"
|
|
214
|
+
// this.model.f_orgname= "测试公司(一)"
|
|
215
|
+
// this.model.f_depid= "21160"
|
|
216
|
+
// this.model.f_depname= "安检部"
|
|
217
|
+
|
|
218
|
+
this.model.f_operator = Vue.user.name
|
|
219
|
+
this.model.f_operatorid = Vue.user.id
|
|
220
|
+
this.model.f_orgid = Vue.user.orgid
|
|
221
|
+
this.model.f_orgname = Vue.user.orgs
|
|
222
|
+
this.model.f_depid = Vue.user.depids
|
|
223
|
+
this.model.f_depname = Vue.user.deps
|
|
224
|
+
|
|
225
|
+
// this.getcardid()
|
|
226
|
+
},
|
|
227
|
+
watch: {
|
|
228
|
+
/*'model.f_preamount' () {
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
},
|
|
232
|
+
'model.f_pregas' () {
|
|
233
|
+
|
|
234
|
+
}*/
|
|
235
|
+
},
|
|
236
|
+
methods: {
|
|
237
|
+
preamountChange(){
|
|
238
|
+
//tag
|
|
239
|
+
if (this.row.f_collection_type == '按金额') {
|
|
240
|
+
this.countprice()
|
|
241
|
+
}else {
|
|
242
|
+
//tag
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
pregasChange(){
|
|
246
|
+
//tag
|
|
247
|
+
if (this.row.f_collection_type == '按气量') {
|
|
248
|
+
this.countprice()
|
|
249
|
+
}else {
|
|
250
|
+
//tag
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
updatewritecard(msg) {
|
|
254
|
+
//tag)
|
|
255
|
+
let http11 = new HttpResetClass()
|
|
256
|
+
let sqldata = `update t_sellinggas set f_write_card = '${msg}' where id = '${this.sellinggasId}'`
|
|
257
|
+
//tag)
|
|
258
|
+
http11.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/runSQL`, {data:{sql:sqldata}}, {resolveMsg: null, rejectMsg: null})
|
|
259
|
+
|
|
260
|
+
},
|
|
261
|
+
aa() {
|
|
262
|
+
//tag
|
|
263
|
+
this.isworking = false
|
|
264
|
+
clearTimeout(this.timer);
|
|
265
|
+
clearTimeout(this.timer2);
|
|
266
|
+
},
|
|
267
|
+
selectmoney (money) {
|
|
268
|
+
//tag
|
|
269
|
+
//tag
|
|
270
|
+
if (this.row.f_collection_type == '按金额') {
|
|
271
|
+
this.model.f_preamount = money
|
|
272
|
+
}else {
|
|
273
|
+
this.model.f_pregas = money
|
|
274
|
+
}
|
|
275
|
+
this.countprice()
|
|
276
|
+
},
|
|
277
|
+
isLimit(gas,fee){
|
|
278
|
+
if (this.hasLimit) {
|
|
279
|
+
if (this.limitDetial.f_limit_type ==='气量'){
|
|
280
|
+
if (gas > this.maxgas){
|
|
281
|
+
this.$showAlert(`预购气量大于购气气量上限,上限为:${this.maxgas}`, 'warning', 5000)
|
|
282
|
+
return false
|
|
283
|
+
}
|
|
284
|
+
}else {
|
|
285
|
+
if (fee > this.maxgas){
|
|
286
|
+
this.$showAlert(`预购气量大于购气金额上限,上限为:${this.maxgas}`, 'warning', 5000)
|
|
287
|
+
return false
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return true
|
|
291
|
+
}
|
|
292
|
+
return true
|
|
293
|
+
},
|
|
294
|
+
// 化价
|
|
295
|
+
async countprice () {
|
|
296
|
+
//tag
|
|
297
|
+
/*let parameter = {
|
|
298
|
+
model: {
|
|
299
|
+
'f_userfiles_id': 21142,
|
|
300
|
+
'f_card_id': null,
|
|
301
|
+
'f_meternumber': '123123123'
|
|
302
|
+
},
|
|
303
|
+
value: '',
|
|
304
|
+
isGasValue: '1'
|
|
305
|
+
}*/
|
|
306
|
+
let parameter = {
|
|
307
|
+
model: {
|
|
308
|
+
f_userfiles_id: this.row.f_userfiles_id,
|
|
309
|
+
f_card_id: this.row.f_card_id,
|
|
310
|
+
f_meternumber: this.row.f_meternumber // 表编号
|
|
311
|
+
},
|
|
312
|
+
value: this.row.f_collection_type == '按金额'? this.model.f_preamount : this.model.f_pregas, // 传入气量或者金额
|
|
313
|
+
isGasValue: this.row.f_collection_type == '按金额'? 1 : 0 // 0表示气量,1表示金额
|
|
314
|
+
}
|
|
315
|
+
try {
|
|
316
|
+
//tag)
|
|
317
|
+
let http = new HttpResetClass()
|
|
318
|
+
// let gasParams = await http.load('POST',`/api/af-revenue/logic/commonCal`, {data: parameter}, {})
|
|
319
|
+
let gasParams = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/commonCal`, {data: parameter}, {resolveMsg: null, rejectMsg: null})
|
|
320
|
+
//tag)
|
|
321
|
+
if (gasParams.data) {
|
|
322
|
+
// 本次缴费 = 预存金额
|
|
323
|
+
this.model.f_totalcost = this.model.f_preamount = gasParams.data.chargenum?gasParams.data.chargenum:this.model.f_preamount
|
|
324
|
+
// 预存气量
|
|
325
|
+
this.model.f_pregas = gasParams.data.oughtamount?gasParams.data.oughtamount:this.model.f_pregas
|
|
326
|
+
}
|
|
327
|
+
} catch (e) {
|
|
328
|
+
//tag)
|
|
329
|
+
this.$showMessage('获取化价信息错误!')
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
},
|
|
333
|
+
myverify () {
|
|
334
|
+
let flag = false
|
|
335
|
+
if (!this.model.f_totalcost || this.model.f_totalcost < 0 ) {
|
|
336
|
+
this.$showMessage('本次缴费金额异常')
|
|
337
|
+
return flag
|
|
338
|
+
}
|
|
339
|
+
if (!this.model.f_pregas || this.model.f_pregas < 0 ) {
|
|
340
|
+
this.$showMessage('预购气量异常')
|
|
341
|
+
return flag
|
|
342
|
+
}
|
|
343
|
+
if (!this.model.f_preamount || this.model.f_preamount < 0 ) {
|
|
344
|
+
this.$showMessage('预购金额异常')
|
|
345
|
+
return flag
|
|
346
|
+
}
|
|
347
|
+
if (!this.model.f_payment) {
|
|
348
|
+
this.$showMessage('请选择支付方式')
|
|
349
|
+
return flag
|
|
350
|
+
}
|
|
351
|
+
flag = true
|
|
352
|
+
return flag
|
|
353
|
+
},
|
|
354
|
+
async confirm() {
|
|
355
|
+
this.clickConfirm = true
|
|
356
|
+
//tag
|
|
357
|
+
let fengongsi = this.$appdata.getSingleValue('分公司')
|
|
358
|
+
if (!fengongsi) {
|
|
359
|
+
this.$showMessage('分公司获取失败!')
|
|
360
|
+
this.clickConfirm = false
|
|
361
|
+
return
|
|
362
|
+
}
|
|
363
|
+
let posinfo2 = HostApp.read(fengongsi)
|
|
364
|
+
if(posinfo2.code == 200){
|
|
365
|
+
//tag
|
|
366
|
+
if(posinfo2.msg.Gas > 0){
|
|
367
|
+
this.$showMessage('卡上有气,请告知客户接表后再来充值!')
|
|
368
|
+
this.clickConfirm = false
|
|
369
|
+
return
|
|
370
|
+
}
|
|
371
|
+
}else {
|
|
372
|
+
this.$showMessage(posinfo2.msg)
|
|
373
|
+
this.clickConfirm = false
|
|
374
|
+
return
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
this.$showMessage(`确定对客户${this.row.f_user_name}进行缴费吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
378
|
+
if (res === 'confirm') {
|
|
379
|
+
//tag
|
|
380
|
+
// 校验
|
|
381
|
+
if (this.myverify()) {
|
|
382
|
+
this.clickConfirm = true
|
|
383
|
+
//tag
|
|
384
|
+
// 1.调用收款接口
|
|
385
|
+
if (this.model.f_payment == '微信付款') {
|
|
386
|
+
//tag
|
|
387
|
+
// 去支付界面
|
|
388
|
+
let _this = this
|
|
389
|
+
let pardate = {
|
|
390
|
+
_this:this,
|
|
391
|
+
title:'二维码收款',
|
|
392
|
+
safe:true
|
|
393
|
+
}
|
|
394
|
+
_this.$dispatch('gotoson',pardate)
|
|
395
|
+
//tag
|
|
396
|
+
let parameter = {
|
|
397
|
+
money: this.model.f_totalcost,
|
|
398
|
+
f_userfiles_id: this.row.f_userfiles_id,
|
|
399
|
+
f_userinfo_id: this.row.f_userinfo_id,
|
|
400
|
+
type: '燃气缴费',
|
|
401
|
+
filiale: this.filiale
|
|
402
|
+
}
|
|
403
|
+
_this.$goto('create_qrcode', {row: parameter,type: this.model.f_payment}, 'self',_this.payback)
|
|
404
|
+
|
|
405
|
+
}else if (this.model.f_payment == '工行支付') {
|
|
406
|
+
//tag
|
|
407
|
+
// 去支付界面
|
|
408
|
+
let _this = this
|
|
409
|
+
let pardate = {
|
|
410
|
+
_this:_this,
|
|
411
|
+
title:'二维码收款',
|
|
412
|
+
safe:true
|
|
413
|
+
}
|
|
414
|
+
_this.$dispatch('gotoson',pardate)
|
|
415
|
+
//tag
|
|
416
|
+
let parameter = {
|
|
417
|
+
money: this.model.f_totalcost,
|
|
418
|
+
filiale: this.filiale
|
|
419
|
+
}
|
|
420
|
+
//tag)
|
|
421
|
+
_this.$goto('create_qrcode', {row: parameter,type: this.model.f_payment}, 'self',_this.payback)
|
|
422
|
+
|
|
423
|
+
} else {
|
|
424
|
+
//tag
|
|
425
|
+
this.$showMessage('此功能正在维护中!')
|
|
426
|
+
return
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
}
|
|
431
|
+
})
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
},
|
|
435
|
+
payback (msg) {
|
|
436
|
+
if (msg) {
|
|
437
|
+
//tag)
|
|
438
|
+
this.model.f_serial_id = msg
|
|
439
|
+
//tag
|
|
440
|
+
this.saveCharges()
|
|
441
|
+
}else {
|
|
442
|
+
//tag
|
|
443
|
+
this.$showMessage('支付失败!')
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
async getcardid () {
|
|
447
|
+
//tag
|
|
448
|
+
let http = new HttpResetClass()
|
|
449
|
+
let row = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/getCardNumber`, {data: {id: this.row.brand_id}}, {
|
|
450
|
+
// this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/getCardNumber`, {data: {id: this.row.brand_id}}, {
|
|
451
|
+
resolveMsg: null,
|
|
452
|
+
rejectMsg: null
|
|
453
|
+
})
|
|
454
|
+
//tag)
|
|
455
|
+
let cardId = row.data.cardNumber + ''
|
|
456
|
+
this.row.f_card_id = this.model.cardNumber = cardId
|
|
457
|
+
//tag)
|
|
458
|
+
//tag)
|
|
459
|
+
},
|
|
460
|
+
async saveCharges() {
|
|
461
|
+
//tag
|
|
462
|
+
// 操作时间
|
|
463
|
+
this.model.f_operate_date = Util.toStandardTimeString()
|
|
464
|
+
// 收款等于本次缴费
|
|
465
|
+
this.model.f_collection = this.model.f_totalcost
|
|
466
|
+
//tag)
|
|
467
|
+
let http1 = new HttpResetClass()
|
|
468
|
+
let resp = ''
|
|
469
|
+
if (this.row.f_meter_type.includes('物联网表')) {
|
|
470
|
+
//tag
|
|
471
|
+
// resp = await http1.load('POST',`/af-telephone/rs/logic/iotPay`, {data: this.model},{
|
|
472
|
+
resp = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/iotPay`, {data: this.model},{
|
|
473
|
+
resolveMsg: null,
|
|
474
|
+
rejectMsg: null
|
|
475
|
+
})
|
|
476
|
+
}else if (this.row.f_meter_type.includes('机表')) {
|
|
477
|
+
//tag
|
|
478
|
+
let par =
|
|
479
|
+
{
|
|
480
|
+
f_userinfo_code: this.model.f_userinfo_code,
|
|
481
|
+
f_filialeids: this.model.f_filialeids,
|
|
482
|
+
f_payment: this.model.f_payment,
|
|
483
|
+
f_print: this.model.f_print,
|
|
484
|
+
f_collection: this.model.f_collection,
|
|
485
|
+
f_overdue: this.model.f_overdue,
|
|
486
|
+
f_serial_id: this.model.f_serial_id, // 流水号
|
|
487
|
+
f_unit: this.model.f_unit, // yuan/fen,如果不传按分处理
|
|
488
|
+
f_operate_date: this.model.f_operate_date,
|
|
489
|
+
f_operator: this.model.f_operator, // 第三方渠道(微信,支付宝,等)
|
|
490
|
+
f_comments: this.model.f_comments //备注
|
|
491
|
+
}
|
|
492
|
+
//tag)
|
|
493
|
+
// resp = await http1.load('POST',`/af-telephone/rs/logic/machinePay`, {data: this.model},{
|
|
494
|
+
resp = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/machinePay`, {data: par},{
|
|
495
|
+
resolveMsg: null,
|
|
496
|
+
rejectMsg: null
|
|
497
|
+
})
|
|
498
|
+
|
|
499
|
+
}else if (this.row.f_meter_type.includes('卡表')) {
|
|
500
|
+
//tag
|
|
501
|
+
// resp = await http1.load('POST',`/af-telephone/rs/logic/thirdPay`, {data: this.model},{
|
|
502
|
+
resp = await http1.load('POST',`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/thirdPay`, {data: this.model},{
|
|
503
|
+
resolveMsg: null,
|
|
504
|
+
rejectMsg: null
|
|
505
|
+
})
|
|
506
|
+
this.sellinggasId = resp.data.id
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
//tag)
|
|
510
|
+
/*{"data":{"id":"175860728"}}*/
|
|
511
|
+
if (resp.data) {
|
|
512
|
+
//tag
|
|
513
|
+
// 判断是否是手机
|
|
514
|
+
//tag)
|
|
515
|
+
if (Vue.config.telephone.ApproveConfig.ispos) {
|
|
516
|
+
//tag
|
|
517
|
+
if (this.row.f_meter_type.includes('卡表')) {
|
|
518
|
+
//tag
|
|
519
|
+
this.$showMessage('售气成功!是否现在现在进行写卡?', ['confirm', 'cancel']).then((res) => {
|
|
520
|
+
if (res === 'confirm') {
|
|
521
|
+
//tag
|
|
522
|
+
this.writeCard()
|
|
523
|
+
}else {
|
|
524
|
+
//tag
|
|
525
|
+
this.updatewritecard('未写卡')
|
|
526
|
+
}
|
|
527
|
+
})
|
|
528
|
+
}else {
|
|
529
|
+
// 打印收据
|
|
530
|
+
//tag
|
|
531
|
+
this.$showMessage('售气成功!是否打印收据?', ['confirm', 'cancel']).then((res) => {
|
|
532
|
+
if (res === 'confirm') {
|
|
533
|
+
//tag
|
|
534
|
+
this.PrintReceipt()
|
|
535
|
+
}
|
|
536
|
+
})
|
|
537
|
+
}
|
|
538
|
+
}else {
|
|
539
|
+
this.$showMessage('该设备暂不支持打印小票!')
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
}else {
|
|
543
|
+
this.$showMessage('保存收费记录失败!')
|
|
544
|
+
//tag
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
},
|
|
548
|
+
clean() {
|
|
549
|
+
this.$info('取消操作')
|
|
550
|
+
},
|
|
551
|
+
PrintReceipt() {
|
|
552
|
+
//tag
|
|
553
|
+
// 清空打印内容
|
|
554
|
+
let printContent = []
|
|
555
|
+
// 抬头
|
|
556
|
+
// var comName = '周口天然气'
|
|
557
|
+
// printContent.push({type: 3, text: comName, fontsize: 3, isbold: true, align: 'center'})
|
|
558
|
+
//tag)
|
|
559
|
+
printContent.push({type: 3, text: '自 助 购 气 凭 证', fontsize: 3, isbold: true, align: 'center'})
|
|
560
|
+
//tag)
|
|
561
|
+
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
562
|
+
// 小票信息
|
|
563
|
+
//tag)
|
|
564
|
+
printContent.push({type: 3, text: '用户编号:' + this.model.f_userinfo_code, fontsize: 2, isbold: true, align: 'left'})
|
|
565
|
+
// 卡表用户显示卡号
|
|
566
|
+
//tag)
|
|
567
|
+
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表') {
|
|
568
|
+
//tag)
|
|
569
|
+
printContent.push({type: 3, text: '用户卡号:' + this.model.f_card_id, fontsize: 2, isbold: true, align: 'left'})
|
|
570
|
+
}
|
|
571
|
+
//tag)
|
|
572
|
+
printContent.push({type: 3, text: '用户姓名:' + this.row.f_user_name, fontsize: 2, isbold: true, align: 'left'})
|
|
573
|
+
//tag)
|
|
574
|
+
printContent.push({type: 3, text: '用户地址:' + this.row.f_address, fontsize: 2, isbold: true, align: 'left'})
|
|
575
|
+
// 机表物联网表显示购买金额
|
|
576
|
+
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表' && this.row.f_collection_type !== '按金额') {
|
|
577
|
+
//tag)
|
|
578
|
+
printContent.push({type: 3, text: '购 气 量:' + this.model.f_pregas + '方', fontsize: 2, isbold: true, align: 'left'})
|
|
579
|
+
}
|
|
580
|
+
printContent.push({type: 3, text: '本次缴费:' + this.model.f_collection + '元', fontsize: 2, isbold: true, align: 'left'})
|
|
581
|
+
//tag)
|
|
582
|
+
printContent.push({type: 3, text: '大 写:' + Vue.PosUtil.convertCurrency(this.model.f_collection), fontsize: 2, isbold: true, align: 'left'})
|
|
583
|
+
//tag)
|
|
584
|
+
printContent.push({type: 3, text: '购气日期:' + Vue.PosUtil.getNowDate('yyyy-MM-dd'), fontsize: 2, isbold: true, align: 'left'})
|
|
585
|
+
//tag)
|
|
586
|
+
printContent.push({type: 3, text: '支付流水号:' + this.model.f_serial_id, fontsize: 2, isbold: true, align: 'left'})
|
|
587
|
+
//tag)
|
|
588
|
+
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表') {
|
|
589
|
+
//tag)
|
|
590
|
+
printContent.push({type: 3, text: '写卡结果:' + this.isWrited, fontsize: 2, isbold: true, align: 'left'})
|
|
591
|
+
}
|
|
592
|
+
//tag)
|
|
593
|
+
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
594
|
+
//tag)
|
|
595
|
+
printContent.push({type: 3, text: '', fontsize: 3, isbold: true, align: 'center'})
|
|
596
|
+
//tag)
|
|
597
|
+
// 走纸
|
|
598
|
+
printContent.push({type: 4, value: 5, unit: 'pixel'})
|
|
599
|
+
//tag)
|
|
600
|
+
// 打印
|
|
601
|
+
let print = HostApp.print(JSON.stringify(printContent))
|
|
602
|
+
if (print.code === 200) {
|
|
603
|
+
this.$showMessage('打印成功!')
|
|
604
|
+
|
|
605
|
+
}else {
|
|
606
|
+
this.$showMessage('打印失败!请检查POS纸张、电量等,确认无误点击确认再次打印', ['confirm', 'cancel']).then((res) => {
|
|
607
|
+
if (res === 'confirm') {
|
|
608
|
+
//tag
|
|
609
|
+
let print2 = HostApp.print(JSON.stringify(printContent))
|
|
610
|
+
if (print2.code === 200) {
|
|
611
|
+
this.$showMessage('打印成功!')
|
|
612
|
+
}else {
|
|
613
|
+
this.$showMessage('打印失败!')
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
})
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
async writeCard() {
|
|
620
|
+
//tag
|
|
621
|
+
|
|
622
|
+
let fengongsi = this.$appdata.getSingleValue('分公司')
|
|
623
|
+
if (!fengongsi) {
|
|
624
|
+
this.$showMessage('分公司获取失败!')
|
|
625
|
+
return
|
|
626
|
+
}
|
|
627
|
+
let posinfo2 = HostApp.read(fengongsi)
|
|
628
|
+
//tag)
|
|
629
|
+
let cardNumber = ''
|
|
630
|
+
let Times = 1
|
|
631
|
+
if(posinfo2.code == 200){
|
|
632
|
+
//tag
|
|
633
|
+
this.row.f_card_id = this.model.cardNumber = cardNumber = posinfo2.msg.CardID
|
|
634
|
+
Times = posinfo2.msg.Times
|
|
635
|
+
// this.$showMessage('写卡次数+++' + (Times + 1))
|
|
636
|
+
}else {
|
|
637
|
+
this.$showMessage('读卡失败!')
|
|
638
|
+
}
|
|
639
|
+
if (!cardNumber || cardNumber == '') {
|
|
640
|
+
this.$showMessage('卡号异常!写卡失败!')
|
|
641
|
+
return
|
|
642
|
+
}
|
|
643
|
+
let params = {
|
|
644
|
+
AREA:'ZhouKou', // 分公司
|
|
645
|
+
ulen: 0, // 判断版本
|
|
646
|
+
factory: this.row.f_alias,
|
|
647
|
+
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
648
|
+
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
649
|
+
kh: cardNumber, // 卡号
|
|
650
|
+
yhh: this.row.f_meterid ? this.row.f_meterid : 0, // 用户号,档案中自己输
|
|
651
|
+
ql: this.model.writeCard_gas ? this.model.writeCard_gas : this.model.f_pregas, // 预购气量
|
|
652
|
+
csql: '0', // 上次购气量,新开户为0
|
|
653
|
+
ccsql: '0', // 上上次购气量,新开户为0
|
|
654
|
+
cs: Times ? Times + 1 : '1', // 求购气次数,先开户为1
|
|
655
|
+
ljgql: this.model.f_total_gas + this.model.f_pregas, // 当前累计购气量
|
|
656
|
+
bkcs: '0', // 新开户卡,为0
|
|
657
|
+
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
658
|
+
bjql: this.row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
659
|
+
czsx: this.row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
660
|
+
tzed: this.row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
661
|
+
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
662
|
+
meterid: this.row.f_meternumber, // 表号
|
|
663
|
+
money: this.model.writeCard_fee ? this.model.writeCard_fee : this.model.f_preamount, // 购气金额
|
|
664
|
+
dqdm: this.row.f_area_code, // 精益工业地区代码
|
|
665
|
+
klx: this.row.f_coding
|
|
666
|
+
}
|
|
667
|
+
// 获取写卡参数
|
|
668
|
+
let data = {
|
|
669
|
+
f_card_id: this.row.f_card_id + '',
|
|
670
|
+
f_alias: this.row.f_alias,
|
|
671
|
+
f_user_id: this.row.f_user_id,
|
|
672
|
+
f_userfiles_id: this.row.f_userfiles_id
|
|
673
|
+
}
|
|
674
|
+
//tag)
|
|
675
|
+
let http = new HttpResetClass()
|
|
676
|
+
let cardParams = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/stairCard`, {data: data}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
|
|
677
|
+
//tag)
|
|
678
|
+
// 拼接参数
|
|
679
|
+
params = await Object.assign({}, await this.writeCardParams(cardParams), params)
|
|
680
|
+
//tag)
|
|
681
|
+
this.writeparams = params
|
|
682
|
+
this.isworking = true
|
|
683
|
+
// 写卡定时器
|
|
684
|
+
this.timer = setTimeout(this.aa,"5000")
|
|
685
|
+
this.timer2 = setTimeout(this.writecard2,"2000")
|
|
686
|
+
|
|
687
|
+
},
|
|
688
|
+
async writecard2() {
|
|
689
|
+
let params = this.writeparams
|
|
690
|
+
//tag)
|
|
691
|
+
let writres = await HostApp.sell(JSON.stringify(params))
|
|
692
|
+
//tag)
|
|
693
|
+
this.isworking = false
|
|
694
|
+
let msg = '写卡失败'
|
|
695
|
+
if(writres.code =='200') {
|
|
696
|
+
this.isWrited = '已写卡'
|
|
697
|
+
// 写卡成功,修改状态 已写卡 调用打票
|
|
698
|
+
await this.updatewritecard('已写卡')
|
|
699
|
+
this.$showMessage('写卡成功!是否打印小票?', ['confirm', 'cancel']).then((res) => {
|
|
700
|
+
if (res === 'confirm') {
|
|
701
|
+
//tag
|
|
702
|
+
this.PrintReceipt()
|
|
703
|
+
}
|
|
704
|
+
})
|
|
705
|
+
}else {
|
|
706
|
+
this.isWrited = '未写卡'
|
|
707
|
+
await this.updatewritecard('未写卡')
|
|
708
|
+
this.$showMessage('写卡失败!是否打印小票?', ['confirm', 'cancel']).then((res) => {
|
|
709
|
+
if (res === 'confirm') {
|
|
710
|
+
//tag
|
|
711
|
+
this.PrintReceipt()
|
|
712
|
+
}
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
writeCardParams (cardParams) {
|
|
717
|
+
//tag)
|
|
718
|
+
let result = {
|
|
719
|
+
csql: cardParams.data.sc,
|
|
720
|
+
lastmoney: cardParams.data.scje,
|
|
721
|
+
ccsql: cardParams.data.ssc,
|
|
722
|
+
lastlastmoney: cardParams.data.sscje,
|
|
723
|
+
ljgql: cardParams.data.f_pregas,
|
|
724
|
+
ljyql: cardParams.data.f_pregasall,
|
|
725
|
+
yhh: cardParams.data.f_meterid,
|
|
726
|
+
sxrq: cardParams.data.f_perform_date,
|
|
727
|
+
totalmoney: cardParams.data.f_collection,
|
|
728
|
+
stairversion: cardParams.data.f_stairversion,
|
|
729
|
+
pricedate: cardParams.data.pricedate,
|
|
730
|
+
pricetype: cardParams.data.pricetype
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
// 对阶梯进行处理
|
|
734
|
+
if (cardParams.data.stairprice.includes(';') && cardParams.data.stairamount.includes(';')) {
|
|
735
|
+
let gases = cardParams.data.stairamount.split(';')
|
|
736
|
+
let prices = cardParams.data.stairprice.split(';')
|
|
737
|
+
if (gases.length >= 2) {
|
|
738
|
+
result.stairgas1 = gases[0] !== '' ? gases[0] : 0
|
|
739
|
+
result.stairgas2 = gases[1] !== '' ? gases[1] : 0
|
|
740
|
+
result.stairgas3 = '99999999'
|
|
741
|
+
}
|
|
742
|
+
if (prices.length >= 2) {
|
|
743
|
+
result.stairprice1 = prices[0] !== '' ? prices[0] : 0
|
|
744
|
+
result.stairprice2 = prices[1] !== '' ? prices[1] : 0
|
|
745
|
+
result.stairprice3 = prices[2] !== '' ? prices[2] : 0
|
|
746
|
+
}
|
|
747
|
+
} else {
|
|
748
|
+
// 从固定气价的表换金额表的时候,气量随便写,金额用之前的固定单价
|
|
749
|
+
result.stairgas1 = '77777777'
|
|
750
|
+
result.stairgas2 = '88888888'
|
|
751
|
+
result.stairgas3 = '99999999'
|
|
752
|
+
|
|
753
|
+
result.stairprice1 = cardParams.data.stairprice
|
|
754
|
+
result.stairprice2 = cardParams.data.stairprice
|
|
755
|
+
result.stairprice3 = cardParams.data.stairprice
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
return result
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
computed: {
|
|
762
|
+
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
</script>
|
|
766
|
+
|
|
767
|
+
<style scoped>
|
|
768
|
+
.app-row {
|
|
769
|
+
background-color: white;
|
|
770
|
+
padding: 10px 10px 0 10px;
|
|
771
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.7);
|
|
772
|
+
}
|
|
773
|
+
.input_ys {
|
|
774
|
+
/*border: 1px solid #93B2D3 !important;*/
|
|
775
|
+
border: none !important;
|
|
776
|
+
width: 220px;
|
|
777
|
+
height: 35px;
|
|
778
|
+
text-align: center;
|
|
779
|
+
}
|
|
780
|
+
.button_btn {
|
|
781
|
+
width: 27%;
|
|
782
|
+
height: 45px;
|
|
783
|
+
background-color: #4b93da;
|
|
784
|
+
border-radius: 6px;
|
|
785
|
+
border: none;
|
|
786
|
+
font-family: PingFang;
|
|
787
|
+
font-size: 18px;
|
|
788
|
+
color: #ffffff;
|
|
789
|
+
margin: 3% 2%;
|
|
790
|
+
}
|
|
791
|
+
.font_normal_body {
|
|
792
|
+
font-size: 16px !important;
|
|
793
|
+
line-height: 10px;
|
|
794
|
+
}
|
|
795
|
+
.btn-color{
|
|
796
|
+
background-color: #FFFFFF;
|
|
797
|
+
border-radius: 10px ;
|
|
798
|
+
border: 1px solid #499EDF;
|
|
799
|
+
}
|
|
800
|
+
.btn-font{
|
|
801
|
+
font:600 16px PingFang-SC-Bold;
|
|
802
|
+
color: #499EDF;
|
|
803
|
+
}
|
|
804
|
+
</style>
|