handpos-client 1.0.0 → 1.0.2
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 +9 -9
- package/README.md +3 -3
- package/build/dev-android.js +80 -82
- package/build/dev-server.js +0 -7
- package/build/webpack.base.conf.js +6 -6
- package/build/webpack.baseandroid.conf.js +87 -83
- package/index.html +1 -1
- package/oa.iml +9 -0
- package/package.json +7 -4
- package/src/App.vue +0 -2
- package/src/aotePos-android.js +49 -0
- package/src/aotePos.js +66 -70
- package/src/bootstrap/less/navs.less +1 -1
- package/src/components/Init.vue +114 -108
- package/src/components/Main.vue +81 -80
- package/src/components/css/garbage.less +80 -0
- package/src/components/css/style.less +119 -51
- package/src/components/garbage/GarbageInfo.vue +212 -0
- package/src/components/garbage/GarbagePayWay.vue +199 -0
- package/src/components/garbage/GarbageScanNative.vue +87 -0
- package/src/components/image/Payway.png +0 -0
- package/src/components/image/cardSale.png +0 -0
- package/src/components/image/ccbpay.png +0 -0
- package/src/components/image/code.jpg +0 -0
- package/src/components/image/guangda190603.jpg +0 -0
- package/src/components/image/machineSale.png +0 -0
- package/src/components/image/select.png +0 -0
- package/src/components/image/xxxk.png +0 -0
- package/src/components/main/CardMain.vue +47 -0
- package/src/components/main/MachineMain.vue +143 -0
- package/src/components/pay/PayWay.vue +173 -0
- package/src/components/pay/ScanNative.vue +87 -0
- package/src/components/pay/WriteCard.vue +141 -0
- package/src/components/public/BuyGas.vue +306 -0
- package/src/components/public/HistorySellList.vue +65 -0
- package/src/components/public/WritecardInfo.vue +114 -0
- package/src/components/sellgas/CardSellGas.vue +437 -0
- package/src/components/sellgas/IotSellGas.vue +155 -0
- package/src/components/sellgas/MachineSellGasGas.vue +145 -0
- package/src/components/sellgas/MachineSellGasMoney.vue +174 -0
- package/src/components/userinfo/UserInfo.vue +145 -0
- package/src/main.js +18 -23
- package/src/plugin/AndroidPlugin-/346/274/224/347/244/272/347/263/273/347/273/237.js +102 -0
- package/src/plugin/AndroidPlugin.js +107 -0
- package/src/plugin/DateUtil.js +32 -0
- package/src/plugin/HttpReset.js +124 -0
- package/src/plugin/Httputil.js +39 -0
- package/src/{Plugin → plugin}/PosUtil.js +21 -19
- package/src/service/CheckCard.js +103 -0
- package/src/service/GarbagePayWay.js +101 -0
- package/src/service/GarbageScanNative.js +116 -0
- package/src/service/GetCardInfo.js +88 -0
- package/src/service/PayWay.js +121 -0
- package/src/service/ScanNative.js +118 -0
- package/src/service/WriteCard.js +262 -0
- package/src/Plugin/AndroidPlugin.js +0 -141
- package/src/components/charge/card/CardInfo.vue +0 -43
- package/src/components/charge/card/ReadCardInter.vue +0 -176
- package/src/components/charge/card/ReadCardToBuy.vue +0 -174
- package/src/components/charge/machine/MachineSearch.Vue +0 -124
- package/src/components/charge/payment/OrderInfo.vue +0 -283
- package/src/components/charge/payment/ScanNative.vue +0 -162
- package/src/components/charge/sellgas/CardSellGas.vue +0 -365
- package/src/components/charge/sellgas/ChoosePayWay.vue +0 -275
- package/src/components/charge/sellgas/GudingPrice.vue +0 -38
- package/src/components/charge/sellgas/JietiPrice.vue +0 -54
- package/src/components/charge/sellgas/ScanQrcode.vue +0 -171
- package/src/components/charge/sellgas/WriteCard.vue +0 -283
- package/src/components/charge/userinfo/ChangeMeterList.vue +0 -43
- package/src/components/charge/userinfo/FillGasList.vue +0 -43
- package/src/components/charge/userinfo/HistorySellList.vue +0 -93
- package/src/components/charge/userinfo/OtherList.vue +0 -43
- package/src/components/charge/userinfo/SellList.vue +0 -43
- package/src/components/charge/userinfo/TransList.vue +0 -43
- package/src/components/charge/userinfo/UserInfo.vue +0 -201
- package/src/components/charge/userinfo/WritecardInfo.vue +0 -44
- package/src/components/ztprint.js +0 -26
- /package/src/components/image/{card.gif → readCard.gif} +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="container-fluid toppanel auto">
|
|
4
|
-
<div class="container">
|
|
5
|
-
<div class="row margin15">
|
|
6
|
-
<div class="col-md-6"><img :src="logo()" class="img-responsive" alt=""/></div>
|
|
7
|
-
<div class="col-md-6 text-right titlebtn">
|
|
8
|
-
</div>
|
|
9
|
-
<!-- <div class="col-md-6 text-right titlebtn">
|
|
10
|
-
<a href="#" class="topmenu3" @click="cancel('nok')">取消交易</a>
|
|
11
|
-
<a href="#" @click="cancel()" class="topmenu3">退出</a>
|
|
12
|
-
</div> -->
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<div class="container contentpanel auto">
|
|
18
|
-
<div class="row qrpanel">
|
|
19
|
-
<h4>请扫描下方二维码进行购气<p>订单号:{{stairPrice.f_serial_id}}</p></h4>
|
|
20
|
-
<h3 v-if="!isTimeout">支付倒计时<span style="color: red;font-size: 24px;">{{second}}</span></h3>
|
|
21
|
-
<h3 v-if="isTimeout"><span style="color: red;font-size: 24px;">订单已关闭,数据刷新中...{{countDown}}秒返回购气界面</span></h3>
|
|
22
|
-
<div class="qrbg">
|
|
23
|
-
<img :src="address" id = "scan" width="211" height="211" alt="订单已关闭" style = "color: red;font-size: 48px;"/>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<!--audio id="audioPlay" src="../audio/04.mp3"></audio -->
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
<script>
|
|
32
|
-
import co from 'co'
|
|
33
|
-
// import QRCode from 'qrcodejs2'
|
|
34
|
-
import Vue from 'vue'
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export default {
|
|
38
|
-
title: '二维码扫码',
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
// userInfo: {},
|
|
42
|
-
// stairPrice: {},
|
|
43
|
-
deviceInfo: {},
|
|
44
|
-
scanway: '',
|
|
45
|
-
address: '',
|
|
46
|
-
iserro: false,
|
|
47
|
-
isTimeout: false,
|
|
48
|
-
countDown: 121,
|
|
49
|
-
second: 105,
|
|
50
|
-
// cardInfo: {},
|
|
51
|
-
isMachine: false,
|
|
52
|
-
resolve: undefined,
|
|
53
|
-
reject: undefined,
|
|
54
|
-
obj: undefined,
|
|
55
|
-
timer1: null,
|
|
56
|
-
timer2: null
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
props: ['userInfo', 'cardInfo','stairPrice'],
|
|
60
|
-
methods: {
|
|
61
|
-
logo() {
|
|
62
|
-
return Vue.ProxyUrl + '/res/'+this.$PosUtil.posParam.imgpath+'/sublogo.png'
|
|
63
|
-
},
|
|
64
|
-
//
|
|
65
|
-
callBack(para) {
|
|
66
|
-
this.$back(para)
|
|
67
|
-
},
|
|
68
|
-
//
|
|
69
|
-
haserro() {
|
|
70
|
-
this.iserro = true
|
|
71
|
-
// this.$showAlert('查询异常', 'info', 5000)
|
|
72
|
-
},
|
|
73
|
-
//
|
|
74
|
-
setAddress(){
|
|
75
|
-
this.address = require('../../image/qrcode_no.png')
|
|
76
|
-
},
|
|
77
|
-
//
|
|
78
|
-
startService() {
|
|
79
|
-
this.timer1 = window.setInterval(() => {
|
|
80
|
-
this.outOfPage()
|
|
81
|
-
}, 1000);
|
|
82
|
-
this.timer2 = window.setInterval(() => {
|
|
83
|
-
this.setRemainTime()
|
|
84
|
-
}, 5000)
|
|
85
|
-
},
|
|
86
|
-
//
|
|
87
|
-
outOfPage() {
|
|
88
|
-
// console.log(this)
|
|
89
|
-
// 调用定时器
|
|
90
|
-
if (this.countDown > 16) {
|
|
91
|
-
--this.second
|
|
92
|
-
--this.countDown
|
|
93
|
-
this.isTimeout = false
|
|
94
|
-
} else if (this.countDown > 0) {
|
|
95
|
-
--this.countDown
|
|
96
|
-
this.isTimeout = true
|
|
97
|
-
this.setAddress()
|
|
98
|
-
} else {
|
|
99
|
-
//超时
|
|
100
|
-
window.clearInterval(this.timer1) // 停止计时器
|
|
101
|
-
window.clearInterval(this.timer2)
|
|
102
|
-
// console.log(obj)
|
|
103
|
-
if (this.iserro) {
|
|
104
|
-
// obj.resolve(false)
|
|
105
|
-
this.$back('erro')// 错误,重新读卡
|
|
106
|
-
} else {
|
|
107
|
-
// obj.resolve(false)
|
|
108
|
-
this.$back('timeout') // 超时重新购气
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
//
|
|
113
|
-
setRemainTime() {
|
|
114
|
-
this.getOrderInfo()
|
|
115
|
-
},
|
|
116
|
-
//
|
|
117
|
-
getOrderInfo() {
|
|
118
|
-
// let condition = 'f_serial_id = \'' + this.stairPrice.f_serial_id + '\' and '+this.$PosUtil.posParam.f_user_id+' = ' + this.userInfo.f_user_id
|
|
119
|
-
let condition = "f_serial_id = 'd25c6969ec1640bfb8d8417383c48694'"
|
|
120
|
-
console.log("condition==>",condition)
|
|
121
|
-
let data = {items: '*', tablename: 't_sellinggas', condition: condition, orderitem: this.$PosUtil.posParam.f_delivery_date}
|
|
122
|
-
this.$resetpost(Vue.ProxyUrl + '/rs/sql/pos_singleTable_OrderBy', {data: data}, {resolveMsg: null, rejectMsg: null
|
|
123
|
-
}).then((ret) => {
|
|
124
|
-
console.log("ret===",ret)
|
|
125
|
-
if (ret.data.length === 1) {
|
|
126
|
-
this.stairPrice.id = ret.data[0].id
|
|
127
|
-
this.stairPrice.writemark = true
|
|
128
|
-
window.clearInterval(this.timer1)
|
|
129
|
-
window.clearInterval(this.timer2) // 停止计时器
|
|
130
|
-
console.log('stair',this.stairPrice)
|
|
131
|
-
this.$goto('order-info', {userInfo: this.userInfo, cardInfo: this.cardInfo, status:3, stairPrice: this.stairPrice}, 'self', this.callBack)
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
).catch((ret) => {
|
|
135
|
-
this.haserro(ret)
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
ready() {
|
|
140
|
-
this.cardInfo = this.cardInfo
|
|
141
|
-
this.userInfo = this.userInfo
|
|
142
|
-
this.stairPrice = this.stairPrice
|
|
143
|
-
let url = this.stairPrice.url.replace(/&/g,'|')
|
|
144
|
-
console.log('url',url)
|
|
145
|
-
this.address = Vue.ProxyUrl + '/rs/pay/paintCode?url=' + url
|
|
146
|
-
|
|
147
|
-
// this.obj = this.obj
|
|
148
|
-
// this.obj.setComponents(this)
|
|
149
|
-
this.startService()
|
|
150
|
-
},
|
|
151
|
-
destroyed() {
|
|
152
|
-
window.clearInterval(this.timer1) // 停止计时器
|
|
153
|
-
window.clearInterval(this.timer2) // 停止计时器
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
</script>
|
|
157
|
-
<style>
|
|
158
|
-
#qrcode img {
|
|
159
|
-
left: 112px;
|
|
160
|
-
top: 75px;
|
|
161
|
-
}
|
|
162
|
-
</style>
|
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="cardsellgas">
|
|
4
|
-
<!--<div class="mhead">-->
|
|
5
|
-
<!--<ul>-->
|
|
6
|
-
<!--<li>-->
|
|
7
|
-
<!--<a href="#" class="back" @click="back()"> </a>-->
|
|
8
|
-
<!--<a href="#" class="tomain" @click="back('tomain')"></a>-->
|
|
9
|
-
<!--</li>-->
|
|
10
|
-
<!--</ul>-->
|
|
11
|
-
<!--</div>-->
|
|
12
|
-
<div class="mhead" v-if="!hideHead">
|
|
13
|
-
<ul>
|
|
14
|
-
<li>
|
|
15
|
-
<text>购气写卡</text>
|
|
16
|
-
</li>
|
|
17
|
-
</ul>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="body">
|
|
20
|
-
<div class="selectview" >
|
|
21
|
-
<h5>请选择购气{{type}} </h5>
|
|
22
|
-
<ul class="selectbuy1" v-for="row in rows" >
|
|
23
|
-
<li><a href="#" v-bind:class="{ getfocus: row.isActive }" @click="fastBuy()" ><span>{{row.para}}</span></a></li>
|
|
24
|
-
</ul>
|
|
25
|
-
</div>
|
|
26
|
-
<table class="tabprice" >
|
|
27
|
-
<tr>
|
|
28
|
-
<td class="lab">预购金额:</td>
|
|
29
|
-
<td ><input type="number" v-model="stairPrice.f_preamount" readonly/></td>
|
|
30
|
-
<td class="lab" align="right">预购气量:</td>
|
|
31
|
-
<td ><input type="number" v-model="stairPrice.f_pregas"
|
|
32
|
-
@blur="pregas()" placeholder="请输入气量" :readonly="userInfo.f_collection_type === '按金额'||isReadOnly"/></td>
|
|
33
|
-
<td class="lab" align="right">本次缴费:</td>
|
|
34
|
-
<td ><input type="number" v-model="stairPrice.f_temp_amount"
|
|
35
|
-
@blur="preamount()" placeholder="请输入金额" :readonly="userInfo.f_collection_type !== '按金额'||isReadOnly"/></td>
|
|
36
|
-
</tr>
|
|
37
|
-
</table>
|
|
38
|
-
<div class="stairview">
|
|
39
|
-
<guding-price v-if="isguding" :stair="stair"> </guding-price>
|
|
40
|
-
<jieti-price v-if="!isguding" :stair="stair"> </jieti-price>
|
|
41
|
-
</div>
|
|
42
|
-
<div class="buybtn" style="margin-top: -10%;">
|
|
43
|
-
<button type="button" class="btn btn-success" @click="maffrim()" :disabled="!canbuy"> 确认订单 </button>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div class="foot" style="margin-top: -18%;" @click="back('tomain')">
|
|
48
|
-
<text>返回</text>
|
|
49
|
-
</div>
|
|
50
|
-
<!--<choose-pay-way v-if="isaffrimed" :userinfo="userinfo" :cardinfo="cardinfo" :stair="stair" :payinfo="payinfo"></choose-pay-way>-->
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
<script>
|
|
54
|
-
|
|
55
|
-
import Vue from 'vue'
|
|
56
|
-
import co from 'co'
|
|
57
|
-
|
|
58
|
-
let gasCalculate = function* (self, gas) { //气量划价
|
|
59
|
-
return self.$resetpost(Vue.ProxyUrl + '/rs/logic/'+self.$PosUtil.posParam.revenue+'commonCal', {data: {model: self.stairPrice, isGasValue: 0, value: gas}}, {resolveMsg: null, rejectMsg: null})
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let feeCalculate = function* (self, preamount) { //金额划价
|
|
63
|
-
return self.$resetpost(Vue.ProxyUrl + '/rs/logic/'+self.$PosUtil.posParam.revenue+'commonCal', {data: {model: self.stairPrice, isGasValue: 1, value: preamount}}, {resolveMsg: null, rejectMsg: null})
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
let pregasGen = function* (self) {
|
|
67
|
-
if (self.userInfo.f_isdecimal === '是') {
|
|
68
|
-
// console.log(self.stairPrice.f_pregas)
|
|
69
|
-
self.stairPrice.f_pregas = Number((self.stairPrice.f_pregas - 0).toFixed(2))
|
|
70
|
-
} else {
|
|
71
|
-
self.stairPrice.f_pregas = Number((self.stairPrice.f_pregas - 0).toFixed(0))
|
|
72
|
-
}
|
|
73
|
-
try {
|
|
74
|
-
let ret = yield co(gasCalculate(self, self.stairPrice.f_pregas))
|
|
75
|
-
console.log(ret)
|
|
76
|
-
if (ret) {
|
|
77
|
-
//返回值为字符串可能导致显示错误以及划价错误,保持这些值的转换。请勿删除
|
|
78
|
-
ret.data.f_stair1fee = Number(ret.data.f_stair1fee)
|
|
79
|
-
ret.data.f_stair2fee = Number(ret.data.f_stair2fee)
|
|
80
|
-
ret.data.f_stair3fee = Number(ret.data.f_stair3fee)
|
|
81
|
-
self.stair = ret.data
|
|
82
|
-
self.stairPrice.f_preamount = Number(Number(ret.data.chargenum).toFixed(2))
|
|
83
|
-
Object.assign(self.stairPrice, self.stairPrice, ret.data)
|
|
84
|
-
self.stairPrice.f_temp_amount = Number((self.stairPrice.f_preamount - 0) - (self.stairPrice.f_balance - 0))
|
|
85
|
-
self.stairPrice.f_collection = Number(self.stairPrice.f_temp_amount)
|
|
86
|
-
}
|
|
87
|
-
} catch (ret) {
|
|
88
|
-
console.log(ret.stack)
|
|
89
|
-
self.clearNum()
|
|
90
|
-
if (ret.status === 404) {
|
|
91
|
-
self.$showMessage('连接后台服务器失败,请重新划价')
|
|
92
|
-
} else if (ret.status === 501) {
|
|
93
|
-
self.$showMessage(ret.data + ',请重新划价')
|
|
94
|
-
} else {
|
|
95
|
-
self.$showMessage('划价错误,请重新划价')
|
|
96
|
-
}
|
|
97
|
-
self.iserro = true
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
let preamountGen = function* (self) {
|
|
102
|
-
try {
|
|
103
|
-
var f_temp_amount = 0
|
|
104
|
-
if (!self.stairPrice.f_temp_amount) {
|
|
105
|
-
f_temp_amount = 0
|
|
106
|
-
} else {
|
|
107
|
-
f_temp_amount = self.stairPrice.f_temp_amount
|
|
108
|
-
}
|
|
109
|
-
let temp = (f_temp_amount - 0) + (self.userInfo.f_balance - 0)
|
|
110
|
-
let getGas = yield co(feeCalculate(self, temp))
|
|
111
|
-
let getAmount = null
|
|
112
|
-
if(Vue.PosUtil.posParam.gasAfterFee){
|
|
113
|
-
if (getGas.data.gas) {
|
|
114
|
-
if (self.userInfo.f_isdecimal === '是') {
|
|
115
|
-
// self.payinfo.f_preamount = temp
|
|
116
|
-
self.stairPrice.f_pregas = (getGas.data.gas - 0).toFixed(2)
|
|
117
|
-
getAmount = yield co(gasCalculate(self, getGas.data.gas))
|
|
118
|
-
getAmount.data.f_stair1fee = Number(getAmount.data.f_stair1fee)
|
|
119
|
-
getAmount.data.f_stair2fee = Number(getAmount.data.f_stair2fee)
|
|
120
|
-
getAmount.data.f_stair3fee = Number(getAmount.data.f_stair3fee)
|
|
121
|
-
getAmount.data.chargenum = Number(getAmount.data.chargenum)
|
|
122
|
-
self.stairPrice.f_preamount = Number((getAmount.data.chargenum - 0).toFixed(2))
|
|
123
|
-
} else {
|
|
124
|
-
self.stairPrice.f_pregas = parseInt(getGas.data.gas - 0)
|
|
125
|
-
getAmount = yield co(gasCalculate(self, self.stairPrice.f_pregas))
|
|
126
|
-
getAmount.data.f_stair1fee = Number(getAmount.data.f_stair1fee)
|
|
127
|
-
getAmount.data.f_stair2fee = Number(getAmount.data.f_stair2fee)
|
|
128
|
-
getAmount.data.f_stair3fee = Number(getAmount.data.f_stair3fee)
|
|
129
|
-
getAmount.data.chargenum = Number(getAmount.data.chargenum)
|
|
130
|
-
self.stairPrice.f_preamount = Number(getAmount.data.chargenum.toFixed(2))
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}else {
|
|
134
|
-
getAmount=getGas
|
|
135
|
-
self.stairPrice.f_pregas = (getGas.data.gas - 0).toFixed(2)
|
|
136
|
-
self.stairPrice.f_preamount = Number(getAmount.data.chargenum.toFixed(2))
|
|
137
|
-
// Object.assign(getAmount, getAmount, getGas)
|
|
138
|
-
}
|
|
139
|
-
self.stair = getAmount.data
|
|
140
|
-
Object.assign(self.stairPrice, self.stairPrice, getAmount.data)
|
|
141
|
-
self.stairPrice.f_collection = Number(self.stairPrice.f_temp_amount)
|
|
142
|
-
self.iserro = false
|
|
143
|
-
} catch (error) {
|
|
144
|
-
self.clearNum()
|
|
145
|
-
console.log()
|
|
146
|
-
if (error.status === 404) {
|
|
147
|
-
self.$showMessage('连接后台服务器失败,请重新划价或联系管理人员')
|
|
148
|
-
} else if (error.status === 501) {
|
|
149
|
-
self.$showMessage(error.data + ',请重新划价或联系管理人员')
|
|
150
|
-
} else {
|
|
151
|
-
self.$showMessage('划价错误,请重新划价或联系管理人员')
|
|
152
|
-
}
|
|
153
|
-
console.log(error)
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
export default {
|
|
157
|
-
title: '划价',
|
|
158
|
-
data () {
|
|
159
|
-
return {
|
|
160
|
-
isguding:false,
|
|
161
|
-
hideHead: false,
|
|
162
|
-
sInfos: {
|
|
163
|
-
gas: [
|
|
164
|
-
{'para': '40方', isActive: false},
|
|
165
|
-
{'para': '60方', isActive: false},
|
|
166
|
-
{'para': '80方', isActive: false},
|
|
167
|
-
{'para': '100方', isActive: false},
|
|
168
|
-
{'para': '150方', isActive: false},
|
|
169
|
-
{'para': '200方', isActive: false},
|
|
170
|
-
{'para': '其他', isActive: false}
|
|
171
|
-
],
|
|
172
|
-
money: [
|
|
173
|
-
{'para': '50元', isActive: false},
|
|
174
|
-
{'para': '100元', isActive: false},
|
|
175
|
-
{'para': '150元', isActive: false},
|
|
176
|
-
{'para': '200元', isActive: false},
|
|
177
|
-
{'para': '250元', isActive: false},
|
|
178
|
-
{'para': '300元', isActive: false}
|
|
179
|
-
]
|
|
180
|
-
},
|
|
181
|
-
stairPrice: {
|
|
182
|
-
f_preamount: 0,
|
|
183
|
-
f_pregas: 0,
|
|
184
|
-
f_price_id: 0,
|
|
185
|
-
f_balance: 0,
|
|
186
|
-
f_curbalance: 0,
|
|
187
|
-
f_temp_amount: 0,
|
|
188
|
-
f_collection: 0,
|
|
189
|
-
f_delaypay: 0,
|
|
190
|
-
hand_ids: []
|
|
191
|
-
},
|
|
192
|
-
canbuy: false,
|
|
193
|
-
rows: [],
|
|
194
|
-
type: '',
|
|
195
|
-
stair: {
|
|
196
|
-
f_stair1fee: 0,
|
|
197
|
-
f_stair2fee: 0,
|
|
198
|
-
f_stair3fee: 0
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
props: ['userInfo', 'cardInfo'],
|
|
203
|
-
methods: {
|
|
204
|
-
back (param) {
|
|
205
|
-
if(param === 'tosell'){
|
|
206
|
-
return
|
|
207
|
-
}else{
|
|
208
|
-
this.$back(param)
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
verifyCard() {
|
|
212
|
-
if(this.userInfo.f_meter_type !=='物联网表'){
|
|
213
|
-
this.$goto('choose-pay-way',
|
|
214
|
-
{userInfo:this.userInfo,cardInfo:this.cardInfo,stairPrice: this.stairPrice},'self',this.callBack)
|
|
215
|
-
}
|
|
216
|
-
let readinfo = this.$AndroidPlugin.read()
|
|
217
|
-
this.$closeAlert()
|
|
218
|
-
this.gotoComponents(readinfo)
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
gotoComponents(readinfo) {
|
|
222
|
-
if (readinfo.code === 200 && readinfo.msg.CardID === this.cardInfo.CardID) {
|
|
223
|
-
this.stairPrice.f_curbalance = Number(this.curbalance).toFixed(2)
|
|
224
|
-
this.$goto('choose-pay-way',
|
|
225
|
-
{userInfo:this.userInfo,cardInfo:this.cardInfo,stairPrice: this.stairPrice},'self',this.callBack)
|
|
226
|
-
} else {
|
|
227
|
-
this.$back('卡号不一致,请重新读卡购气!')
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
maffrim () {
|
|
231
|
-
// console.log('quernnnnnnnn')
|
|
232
|
-
this.verifyCard()
|
|
233
|
-
},
|
|
234
|
-
gasfeecalculate () {
|
|
235
|
-
let gen = feecalculateGen(this)
|
|
236
|
-
return co(gen)
|
|
237
|
-
},
|
|
238
|
-
clearNum () {
|
|
239
|
-
this.stairPrice.f_temp_amount = this.userInfo.f_collection_type === '按金额' ? null : 0
|
|
240
|
-
this.stairPrice.f_pregas = this.userInfo.f_collection_type === '按金额' ? 0 : null
|
|
241
|
-
this.stairPrice.f_preamount = 0
|
|
242
|
-
this.stairPrice.f_collection = 0
|
|
243
|
-
this.stair = {}
|
|
244
|
-
},
|
|
245
|
-
pregas() {
|
|
246
|
-
if(this.userInfo.f_collection_type !== '按金额') {
|
|
247
|
-
if (this.stairPrice.f_pregas && this.stairPrice.f_pregas >0) {
|
|
248
|
-
// console.log('remain', this.stairPrice.f_pregas > this.userInfo.f_remain_gas)
|
|
249
|
-
if (this.stairPrice.f_pregas > this.userInfo.f_remain_gas) {
|
|
250
|
-
this.$showMessage(this.userInfo.f_cycle_start + '至' + this.userInfo.f_cycle_end + '限购气量为' + this.userInfo.limit_gas + '方,剩余可购气量为' + this.userInfo.f_remain_gas + '方,请重新选择购气量且不要大于' +
|
|
251
|
-
this.userInfo.f_remain_gas + '方')
|
|
252
|
-
this.clearNum()
|
|
253
|
-
return
|
|
254
|
-
}
|
|
255
|
-
co(pregasGen(this))
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
preamount() {
|
|
260
|
-
if(this.userInfo.f_collection_type === '按金额'){
|
|
261
|
-
if (this.stairPrice.f_temp_amount && this.stairPrice.f_temp_amount >0) {
|
|
262
|
-
this.stairPrice.f_temp_amount = (this.stairPrice.f_temp_amount - 0).toFixed(2)
|
|
263
|
-
co(preamountGen(this))
|
|
264
|
-
} else {
|
|
265
|
-
this.clearNum()
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
fastBuy () {
|
|
270
|
-
let nodes = event.currentTarget
|
|
271
|
-
console.log("nodes",nodes)
|
|
272
|
-
console.log("this.rows",this.rows)
|
|
273
|
-
for (let i = 0; i < this.rows.length; i++) {
|
|
274
|
-
this.rows[i].isActive = false
|
|
275
|
-
if (this.rows[i].para === nodes.innerText) {
|
|
276
|
-
this.rows[i].isActive = true
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
if (nodes.innerText !== '其他') {
|
|
280
|
-
this.isReadOnly = true
|
|
281
|
-
if (this.userInfo.f_collection_type === '按金额') {
|
|
282
|
-
this.stairPrice.f_temp_amount = parseInt(nodes.innerText.substr(0, nodes.innerText.length - 1))
|
|
283
|
-
this.preamount()
|
|
284
|
-
} else {
|
|
285
|
-
this.stairPrice.f_pregas = parseInt(nodes.innerText.substr(0, nodes.innerText.length - 1))
|
|
286
|
-
this.pregas()
|
|
287
|
-
}
|
|
288
|
-
} else {
|
|
289
|
-
this.isReadOnly = false
|
|
290
|
-
this.clearNum()
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
callBack(orderInfo) {
|
|
295
|
-
// console.log(orderInfo)
|
|
296
|
-
if (orderInfo === 'getbillerro') {
|
|
297
|
-
this.$showMessage('下单失败,请重新确认订单!')
|
|
298
|
-
} else if (orderInfo === 'timeout') {
|
|
299
|
-
this.$showMessage('未查询到支付记录请重新确认订单!(已支付用户请等待自动退款再重新购气,如未退款请联系工作人员)')
|
|
300
|
-
} else {
|
|
301
|
-
this.back(orderInfo)
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
computed: {
|
|
306
|
-
'curbalance'() {
|
|
307
|
-
if (this.stairPrice.f_preamount !== '' && this.stairPrice.f_temp_amount !== '') {
|
|
308
|
-
if (this.userInfo.f_collection_type === '按金额') {
|
|
309
|
-
return ((this.stairPrice.f_collection - 0) + (this.stairPrice.f_balance - 0) - (this.stairPrice.f_preamount - 0)).toFixed(2)
|
|
310
|
-
} else {
|
|
311
|
-
return ((this.stairPrice.f_collection - 0) - (this.stairPrice.f_temp_amount - 0)).toFixed(2)
|
|
312
|
-
}
|
|
313
|
-
} else {
|
|
314
|
-
return 0
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
events: {
|
|
319
|
-
'checkbillerro' () {
|
|
320
|
-
this.payinfo.billnum = Util.getBillNum(this.userinfo.f_userinfo_id)
|
|
321
|
-
this.$showMessage('查询支付情况失败,请重新下单支付!(如已支付请到营业厅办理)')
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
watch: {
|
|
325
|
-
'stairPrice.f_temp_amount'(val) {
|
|
326
|
-
if (this.stairPrice.f_temp_amount && this.stairPrice.f_preamount > 0) {
|
|
327
|
-
this.canbuy = true
|
|
328
|
-
} else {
|
|
329
|
-
this.canbuy = false
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
'stairPrice.f_preamount'(val) {
|
|
333
|
-
if (val > 0 && this.stairPrice.f_temp_amount) {
|
|
334
|
-
this.canbuy = true
|
|
335
|
-
} else {
|
|
336
|
-
this.canbuy = false
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
ready () {
|
|
341
|
-
console.log('进入购气划价界面')
|
|
342
|
-
console.log('userinfo和cardinfo', this.userInfo, this.cardInfo)
|
|
343
|
-
// this.payinfo.billnum = this.$PosUtil.getBillNum(this.userinfo.f_userinfo_id)
|
|
344
|
-
// console.log(this.stairPrice.billnum)
|
|
345
|
-
|
|
346
|
-
this.stairPrice.f_price_id = this.userInfo.f_price_id
|
|
347
|
-
this.stairPrice.f_user_id = this.userInfo.f_user_id
|
|
348
|
-
this.stairPrice.f_meter_type = this.userInfo.f_meter_type
|
|
349
|
-
this.stairPrice.f_balance = this.userInfo.f_balance
|
|
350
|
-
console.log('this.userInfo.f_collection_type', this.userInfo.f_collection_type)
|
|
351
|
-
if (this.userInfo.f_collection_type === '按金额') {
|
|
352
|
-
this.type = '金额'
|
|
353
|
-
this.rows = this.sInfos.money
|
|
354
|
-
} else {
|
|
355
|
-
this.type = '气量'
|
|
356
|
-
this.rows = this.sInfos.gas
|
|
357
|
-
}
|
|
358
|
-
if (this.userInfo.f_price_type === '阶梯气价') {
|
|
359
|
-
this.isguding = false
|
|
360
|
-
} else if (this.userInfo.f_price_type === '固定气价') {
|
|
361
|
-
this.isguding = true
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
</script>
|