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
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author System
|
|
5
|
+
* @date 2024/01/26
|
|
6
|
+
* 垃圾费轮询数据库服务,默认不启用,直接跳过该服务
|
|
7
|
+
*/
|
|
8
|
+
export default class GarbageScanNative {
|
|
9
|
+
constructor () {
|
|
10
|
+
console.log('GarbageScanNative.js被初始化')
|
|
11
|
+
// 承诺函数助记符
|
|
12
|
+
this.resolve = null
|
|
13
|
+
// 拒绝函数助记符
|
|
14
|
+
this.reject = null
|
|
15
|
+
// 是否为扫码支付的方式进入该服务
|
|
16
|
+
this.isQR = false
|
|
17
|
+
// 计时器
|
|
18
|
+
this.timer1 = null
|
|
19
|
+
this.timer2 = null
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
doAction () {
|
|
23
|
+
console.log('GarbageScanNative.js被启动')
|
|
24
|
+
// 在进入该服务之前,如果为扫码支付的话,需要在上一个服务把该服务的isQR值修改为true
|
|
25
|
+
if (this.isQR) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
this.resolve = resolve
|
|
28
|
+
this.reject = reject
|
|
29
|
+
})
|
|
30
|
+
} else {
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
commit () {
|
|
36
|
+
console.log('GarbageScanNative.js被提交')
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
rollback () {
|
|
40
|
+
console.log('GarbageScanNative.js被回滚')
|
|
41
|
+
window.clearInterval(this.timer1)
|
|
42
|
+
window.clearInterval(this.timer2)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
setComponents (components) {
|
|
46
|
+
this.self = components
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
startService () {
|
|
50
|
+
this.timer1 = window.setInterval(() => {
|
|
51
|
+
this.outOfPage(this, this.self)
|
|
52
|
+
}, 1000)
|
|
53
|
+
this.timer2 = window.setInterval(() => {
|
|
54
|
+
this.setRemainTime(this, this.self)
|
|
55
|
+
}, 5000)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
outOfPage (obj, components) {
|
|
59
|
+
// 调用定时器
|
|
60
|
+
if (components.countDown > 16 && !components.isTimeout && components.second > 0) {
|
|
61
|
+
--components.second
|
|
62
|
+
--components.countDown
|
|
63
|
+
components.isTimeout = false
|
|
64
|
+
} else if (components.countDown > 1 && !components.isTimeout) {
|
|
65
|
+
--components.countDown
|
|
66
|
+
--components.second
|
|
67
|
+
components.isTimeout = true
|
|
68
|
+
components.setAddress()
|
|
69
|
+
} else if (components.countDown > 0 && components.isTimeout) {
|
|
70
|
+
--components.countDown
|
|
71
|
+
--components.second
|
|
72
|
+
window.clearInterval(obj.timer2)
|
|
73
|
+
} else {
|
|
74
|
+
// 超时 停止计时器
|
|
75
|
+
window.clearInterval(obj.timer1)
|
|
76
|
+
if (components.iserro) {
|
|
77
|
+
obj.resolve(false)
|
|
78
|
+
components.$back('error')
|
|
79
|
+
} else {
|
|
80
|
+
obj.resolve(false)
|
|
81
|
+
components.$back('timeOut')
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
setRemainTime (obj, components) {
|
|
87
|
+
obj.getOrderInfo(obj, components)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
getOrderInfo(obj, self) {
|
|
91
|
+
// if (!Vue.AndroidPlugin.isAndroid && !Vue.AndroidPlugin.isPc) {
|
|
92
|
+
// self.$showNewMessage('提示', '缴费完成,点击"确认"返回主界面重新读卡购气', ['confirm'], 'newmgs').then(() => {
|
|
93
|
+
// window.setInterval(self.callBack('toMain'),6000)
|
|
94
|
+
// })
|
|
95
|
+
// this.resolve(true)
|
|
96
|
+
// }
|
|
97
|
+
|
|
98
|
+
let data = {
|
|
99
|
+
f_serial_id: self.payInfo.f_serial_id
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
self.$pospost(Vue.ProxyUrl + 'rs/logic/' + Vue.PosUtil.posParam.revenue + 'getSellGasInfo', { data: data }, {
|
|
103
|
+
resolveMsg: null, rejectMsg: null
|
|
104
|
+
}).then((ret) => {
|
|
105
|
+
if (ret.data.length === 1) {
|
|
106
|
+
self.$showNewMessage('提示', '缴费完成,点击"确认"返回主界面重新读卡购气', ['confirm'], 'newmgs').then(() => {
|
|
107
|
+
self.callBack('toMain')
|
|
108
|
+
})
|
|
109
|
+
this.resolve(true)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
).catch((ret) => {
|
|
113
|
+
self.hasError(ret)
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author GaoChengLong
|
|
5
|
+
* @date 2018/12/7 16:56
|
|
6
|
+
* 通过HTTP请求获取属于该卡的用户信息档案后跳转到index页面中去
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export default class GetCardInfo {
|
|
10
|
+
constructor(components) {
|
|
11
|
+
this.self = components
|
|
12
|
+
// 承诺函数助记符
|
|
13
|
+
this.resolve = null
|
|
14
|
+
// 拒绝函数助记符
|
|
15
|
+
this.reject = null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
doAction() {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
this.resolve = resolve
|
|
21
|
+
this.reject = reject
|
|
22
|
+
this.getInfoGen(this.self)
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
commit() {
|
|
27
|
+
this.self.$goto('card-user-info', {
|
|
28
|
+
cardInfo: this.self.cardInfo,
|
|
29
|
+
userInfo: this.self.userInfo,
|
|
30
|
+
stairPrices: this.self.stairPrices
|
|
31
|
+
, garbage: this.self.garbage
|
|
32
|
+
}, 'self', this.self.back)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
rollback() {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async getInfoGen (self) {
|
|
39
|
+
let condition = `f_card_id = '${self.cardInfo.CardID}' and f_alias = '${self.cardInfo.Factory}'`
|
|
40
|
+
if (Vue.PosUtil.posParam.filiale.hasFiliale) {
|
|
41
|
+
condition = condition + Vue.PosUtil.posParam.filiale.condition
|
|
42
|
+
}
|
|
43
|
+
let param = {
|
|
44
|
+
condition: condition
|
|
45
|
+
}
|
|
46
|
+
console.log('logic: getUserfile传入的参数为: ', param)
|
|
47
|
+
await self.$resetpost(Vue.ProxyUrl + 'rs/logic/' + Vue.PosUtil.posParam.revenue + 'getUserfile', param, {
|
|
48
|
+
resolveMsg: null,
|
|
49
|
+
rejectMsg: null
|
|
50
|
+
}).then((ret) => {
|
|
51
|
+
console.log('logic: getUserfile返回的数据为: ', ret.data)
|
|
52
|
+
if (ret.data.userInfo.f_alias !== self.cardInfo.Factory) {
|
|
53
|
+
self.$back('卡信息与档案不符不能购气,请核对燃气卡或联系工作人员')
|
|
54
|
+
this.resolve(false)
|
|
55
|
+
} else if (ret.data.userInfo.f_user_state && ret.data.userInfo.f_user_state !== '正常') {
|
|
56
|
+
self.$back('该用户状态为"' + ret.data.userInfo.f_user_state + '"不能购气,请联系工作人员')
|
|
57
|
+
this.resolve(false)
|
|
58
|
+
} else if (ret.data.userInfo.f_table_state !== '正常') {
|
|
59
|
+
self.$back('该表状态为"' + ret.data.userInfo.f_table_state + '"不能购气,请联系工作人员')
|
|
60
|
+
this.resolve(false)
|
|
61
|
+
} else {
|
|
62
|
+
// 该用户为正常可用状态,开始进入跳转页面
|
|
63
|
+
self.userInfo = ret.data.userInfo
|
|
64
|
+
// 预写卡信息
|
|
65
|
+
self.stairPrices = ret.data.sells
|
|
66
|
+
|
|
67
|
+
self.garbage = ret.data.garbage
|
|
68
|
+
console.log('self.stairPrices:', self.stairPrices)
|
|
69
|
+
this.resolve(true)
|
|
70
|
+
}
|
|
71
|
+
}).catch((ret) => {
|
|
72
|
+
console.log(ret)
|
|
73
|
+
let msg
|
|
74
|
+
if (ret.status === 404) {
|
|
75
|
+
msg = '连接后台服务失败,请检查网络连接或联系工作人员!'
|
|
76
|
+
} else if (ret.status === 501) {
|
|
77
|
+
msg = ret.data + ',请确认是否为正确的燃气卡!'
|
|
78
|
+
} else if (ret.status === 611) {
|
|
79
|
+
msg = ret.data + ',请检查网络连接或联系工作人员!'
|
|
80
|
+
} else {
|
|
81
|
+
msg = '查询不到该档案,请联系工作人员!'
|
|
82
|
+
}
|
|
83
|
+
self.$back(msg)
|
|
84
|
+
this.resolve(false)
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import co from 'co'
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
|
|
4
|
+
export default class PayWay {
|
|
5
|
+
constructor (components) {
|
|
6
|
+
console.log('PayWay.js被初始化')
|
|
7
|
+
this.self = components
|
|
8
|
+
// 承诺函数助记符
|
|
9
|
+
this.resolve = null
|
|
10
|
+
// 拒绝函数助记符
|
|
11
|
+
this.reject = null
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 该服务为异步服务,故此doAction中只返回Promise对象,并不对其进行执行操作
|
|
15
|
+
doAction () {
|
|
16
|
+
this.self.$goto('pay-way', {
|
|
17
|
+
userInfo: this.self.userInfo,
|
|
18
|
+
cardInfo: this.self.cardInfo,
|
|
19
|
+
stairPrice: this.self.chargePrice,
|
|
20
|
+
obj: this
|
|
21
|
+
}, 'self', this.self.back)
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
// 只要不执行承诺或者拒绝函数该服务就永远不会切换到下一个服务
|
|
24
|
+
this.resolve = resolve
|
|
25
|
+
this.reject = reject
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
commit () {
|
|
30
|
+
console.log('PayWay.js被提交')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
rollback () {
|
|
34
|
+
console.log('PayWay.js被回滚')
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
setComponents (components) {
|
|
38
|
+
this.self = components
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
getQR () {
|
|
42
|
+
let attach = this.getAttach()
|
|
43
|
+
let gen = this.generateScan(this.self, attach)
|
|
44
|
+
return co(gen)
|
|
45
|
+
}
|
|
46
|
+
// 组织attach
|
|
47
|
+
getAttach () {
|
|
48
|
+
let attach = {}
|
|
49
|
+
// 用户编号
|
|
50
|
+
attach.f_userinfo_code = this.self.userInfo.f_userinfo_code
|
|
51
|
+
attach.f_userinfo_id = this.self.userInfo.f_userinfo_id
|
|
52
|
+
attach.f_userfiles_id = this.self.userInfo.f_userfiles_id
|
|
53
|
+
attach.f_user_name = this.self.userInfo.f_user_name
|
|
54
|
+
attach.f_address = this.self.userInfo.f_address
|
|
55
|
+
attach.f_pregas = this.self.stairPrice.f_pregas
|
|
56
|
+
// 应交金额
|
|
57
|
+
attach.f_preamount = this.self.stairPrice.f_preamount
|
|
58
|
+
attach.f_payment = this.self.stairPrice.f_payment
|
|
59
|
+
attach.f_terminal_num = Vue.PosUtil.Sn
|
|
60
|
+
// 实交金额
|
|
61
|
+
attach.f_collection = (this.self.stairPrice.f_collection - 0).toFixed(2)
|
|
62
|
+
// 实交金额(如果存在账户余额)
|
|
63
|
+
attach.f_totalcost = attach.f_collection
|
|
64
|
+
|
|
65
|
+
// 特殊参数
|
|
66
|
+
if (this.self.userInfo.f_meter_type === '机表') {
|
|
67
|
+
// 区分气表类型
|
|
68
|
+
attach.isHand = 1
|
|
69
|
+
// 实际缴纳滞纳金
|
|
70
|
+
attach.f_overdue = this.self.stairPrice.f_delaypay
|
|
71
|
+
// 抄表记录编号
|
|
72
|
+
attach.hand_ids = this.self.stairPrice.hand_ids
|
|
73
|
+
} else if (this.self.userInfo.f_meter_type === '物联网表') {
|
|
74
|
+
attach.isHand = -1
|
|
75
|
+
} else {
|
|
76
|
+
// 卡表
|
|
77
|
+
attach.isHand = 0
|
|
78
|
+
attach.isGasValue = this.self.userInfo.f_collection_type === '按金额' ? 1 : 0
|
|
79
|
+
attach.f_card_id = this.self.cardInfo.CardID
|
|
80
|
+
attach.f_times = this.self.cardInfo.Times + 1
|
|
81
|
+
}
|
|
82
|
+
return attach
|
|
83
|
+
}
|
|
84
|
+
// 支付下单
|
|
85
|
+
* generateScan (self, attach) {
|
|
86
|
+
// 支付金额元转分(测试环境支付金额统一改为1分)
|
|
87
|
+
let money = Vue.PosUtil.posParam.isTest ? 1 : Vue.PosUtil.yuan2fen(this.self.stairPrice.f_collection)
|
|
88
|
+
// post去后台给微信下单并生成二维码和流水号
|
|
89
|
+
self.$pospost(Vue.ProxyUrl + 'rs/logic/' + Vue.PosUtil.posParam.module + 'GetCode', {
|
|
90
|
+
config: self.$PosUtil.posParam.config,
|
|
91
|
+
f_revenue: Vue.PosUtil.posParam.revenue,
|
|
92
|
+
pay_way: self.stairPrice.pay_way,
|
|
93
|
+
money: money + '',
|
|
94
|
+
attach: attach
|
|
95
|
+
}, {resolveMsg: null, rejectMsg: null}).then((ret) => {
|
|
96
|
+
// 下单成功
|
|
97
|
+
if (ret.data.code === 200) {
|
|
98
|
+
self.stairPrice.url = ret.data.url
|
|
99
|
+
self.stairPrice.f_serial_id = ret.data.f_out_trade_no
|
|
100
|
+
self.$goto('scannative', {
|
|
101
|
+
userInfo: self.userInfo,
|
|
102
|
+
cardInfo: self.cardInfo,
|
|
103
|
+
stairPrice: self.stairPrice,
|
|
104
|
+
obj: this.next
|
|
105
|
+
}, 'self', self.back)
|
|
106
|
+
// 设置下一个服务状态为扫码支付,开始需要去轮询数据库
|
|
107
|
+
this.next.isQR = true
|
|
108
|
+
this.resolve(true)
|
|
109
|
+
} else {
|
|
110
|
+
// 下单失败
|
|
111
|
+
self.$back('getBillError')
|
|
112
|
+
this.resolve(false)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
).catch((ret) => {
|
|
116
|
+
console.log('下单异常,异常返回==>', ret)
|
|
117
|
+
self.$back('getBillError')
|
|
118
|
+
this.resolve(false)
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @author GaoChengLong Waki
|
|
5
|
+
* @date 2018/12/10 18:12
|
|
6
|
+
* 轮询数据库服务,默认不启用,直接跳过该服务
|
|
7
|
+
*/
|
|
8
|
+
export default class ScanNative {
|
|
9
|
+
constructor () {
|
|
10
|
+
console.log('ScanNative.js被初始化')
|
|
11
|
+
// 承诺函数助记符
|
|
12
|
+
this.resolve = null
|
|
13
|
+
// 拒绝函数助记符
|
|
14
|
+
this.reject = null
|
|
15
|
+
// 是否为扫码支付的方式进入该服务
|
|
16
|
+
this.isQR = false
|
|
17
|
+
// 计时器
|
|
18
|
+
this.timer1 = null
|
|
19
|
+
this.timer2 = null
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
doAction () {
|
|
23
|
+
console.log('ScanNative.js被启动')
|
|
24
|
+
// 在进入该服务之前,如果为扫码支付的话,需要在上一个服务把该服务的isQR值修改为true
|
|
25
|
+
if (this.isQR) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
this.resolve = resolve
|
|
28
|
+
this.reject = reject
|
|
29
|
+
})
|
|
30
|
+
} else {
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
commit () {
|
|
36
|
+
console.log('ScanNative.js被提交')
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
rollback () {
|
|
40
|
+
console.log('ScanNative.js被回滚')
|
|
41
|
+
window.clearInterval(this.timer1)
|
|
42
|
+
window.clearInterval(this.timer2)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
setComponents (components) {
|
|
46
|
+
this.self = components
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
startService () {
|
|
50
|
+
this.timer1 = window.setInterval(() => {
|
|
51
|
+
this.outOfPage(this, this.self)
|
|
52
|
+
}, 1000)
|
|
53
|
+
this.timer2 = window.setInterval(() => {
|
|
54
|
+
this.setRemainTime(this, this.self)
|
|
55
|
+
}, 5000)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
outOfPage (obj, components) {
|
|
59
|
+
// 调用定时器
|
|
60
|
+
if (components.countDown > 16 && !components.isTimeout && components.second > 0) {
|
|
61
|
+
--components.second
|
|
62
|
+
--components.countDown
|
|
63
|
+
components.isTimeout = false
|
|
64
|
+
} else if (components.countDown > 1 && !components.isTimeout) {
|
|
65
|
+
--components.countDown
|
|
66
|
+
--components.second
|
|
67
|
+
components.isTimeout = true
|
|
68
|
+
components.setAddress()
|
|
69
|
+
} else if (components.countDown > 0 && components.isTimeout) {
|
|
70
|
+
--components.countDown
|
|
71
|
+
--components.second
|
|
72
|
+
window.clearInterval(obj.timer2)
|
|
73
|
+
} else {
|
|
74
|
+
// 超时 停止计时器
|
|
75
|
+
window.clearInterval(obj.timer1)
|
|
76
|
+
if (components.iserro) {
|
|
77
|
+
obj.resolve(false)
|
|
78
|
+
components.$back('error')
|
|
79
|
+
} else {
|
|
80
|
+
obj.resolve(false)
|
|
81
|
+
components.$back('timeOut')
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
setRemainTime (obj, components) {
|
|
87
|
+
obj.getOrderInfo(obj, components)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
getOrderInfo (obj, self) {
|
|
91
|
+
let condition = 'f_serial_id = \'' + self.stairPrice.f_serial_id + '\''
|
|
92
|
+
// 查询语句参数
|
|
93
|
+
let param = {
|
|
94
|
+
condition: condition
|
|
95
|
+
}
|
|
96
|
+
self.$pospost(Vue.ProxyUrl + 'rs/sql/getSellGasInfo', {data: param}, {
|
|
97
|
+
resolveMsg: null, rejectMsg: null
|
|
98
|
+
}).then((ret) => {
|
|
99
|
+
if (ret.data.length === 1) {
|
|
100
|
+
self.stairPrice.id = ret.data[0].id
|
|
101
|
+
// 停止计时器
|
|
102
|
+
window.clearInterval(obj.timer1)
|
|
103
|
+
window.clearInterval(obj.timer2)
|
|
104
|
+
self.$goto('order-info', {
|
|
105
|
+
userInfo: self.userInfo,
|
|
106
|
+
cardInfo: self.cardInfo,
|
|
107
|
+
status: 3,
|
|
108
|
+
stairPrice: self.stairPrice,
|
|
109
|
+
obj: obj.next
|
|
110
|
+
}, 'self', self.callBack)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
).catch((ret) => {
|
|
114
|
+
self.hasError(ret)
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
}
|