handpos-client 1.0.1 → 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/package.json +1 -1
- package/src/aotePos-android.js +49 -0
- package/src/components/Init.vue +212 -208
- package/src/components/main/CardMain.vue +47 -47
- package/src/service/GetCardInfo.js +88 -88
package/package.json
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
export default function (filiale) {
|
|
4
|
+
// 参数加载页面
|
|
5
|
+
Vue.component('init', (resolve) => { require(['./components/Init'], resolve) })
|
|
6
|
+
// 主页面
|
|
7
|
+
Vue.component('main', (resolve) => { require(['./components/Main'], resolve) })
|
|
8
|
+
|
|
9
|
+
// 卡表收费
|
|
10
|
+
Vue.component('card-main', (resolve) => { require(['./components/main/CardMain'], resolve) })
|
|
11
|
+
// 无卡收费
|
|
12
|
+
Vue.component('machine-main', (resolve) => { require(['./components/main/MachineMain'], resolve) })
|
|
13
|
+
|
|
14
|
+
// 垃圾费相关
|
|
15
|
+
// 垃圾费信息
|
|
16
|
+
Vue.component('garbage-info', (resolve) => { require(['./components/garbage/GarbageInfo'], resolve) })
|
|
17
|
+
// 垃圾费支付方式选择
|
|
18
|
+
Vue.component('garbage-pay-way', (resolve) => { require(['./components/garbage/GarbagePayWay'], resolve) })
|
|
19
|
+
// 垃圾费二维码扫描
|
|
20
|
+
Vue.component('garbage-scan-native', (resolve) => { require(['./components/garbage/GarbageScanNative'], resolve) })
|
|
21
|
+
|
|
22
|
+
// 卡表用户信息
|
|
23
|
+
Vue.component('card-user-info', (resolve) => { require(['./components/sellgas/CardSellGas'], resolve) })
|
|
24
|
+
// 物联网表信息
|
|
25
|
+
Vue.component('iot-user-info', (resolve) => { require(['./components/sellgas/IotSellGas'], resolve) })
|
|
26
|
+
// 机表用户信息-gas
|
|
27
|
+
Vue.component('machine-user-info-gas', (resolve) => { require(['./components/sellgas/MachineSellGasGas'], resolve) })
|
|
28
|
+
// 机表用户信息-money(常用)
|
|
29
|
+
Vue.component('machine-user-info', (resolve) => { require(['./components/sellgas/MachineSellGasMoney'], resolve) })
|
|
30
|
+
|
|
31
|
+
// 支付
|
|
32
|
+
// 选择支付方式
|
|
33
|
+
Vue.component('pay-way', (resolve) => { require(['./components/pay/PayWay'], resolve) })
|
|
34
|
+
// 二维码展示界面
|
|
35
|
+
Vue.component('scannative', (resolve) => { require(['./components/pay/ScanNative'], resolve) })
|
|
36
|
+
// 写卡界面
|
|
37
|
+
Vue.component('order-info', (resolve) => { require(['./components/pay/WriteCard'], resolve) })
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
// 公共组件
|
|
42
|
+
// 历史收费记录
|
|
43
|
+
Vue.component('history-sell-list', (resolve) => { require(['./components/public/HistorySellList'], resolve) })
|
|
44
|
+
// 预写卡信息
|
|
45
|
+
Vue.component('write-card-info', (resolve) => { require(['./components/public/WritecardInfo'], resolve) })
|
|
46
|
+
// 购气
|
|
47
|
+
Vue.component('buy-gas', (resolve) => { require(['./components/public/BuyGas'], resolve) })
|
|
48
|
+
|
|
49
|
+
}
|
package/src/components/Init.vue
CHANGED
|
@@ -1,208 +1,212 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div >
|
|
3
|
-
<div class="mhead">
|
|
4
|
-
<ul>
|
|
5
|
-
<li>
|
|
6
|
-
<text>自助缴费机</text>
|
|
7
|
-
</li>
|
|
8
|
-
</ul>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="loadview">
|
|
11
|
-
<div class="auto">
|
|
12
|
-
<div class="loading-text-style">
|
|
13
|
-
<span class="text-style span-height-center">{{loading_text}}{{dots}}</span>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="ErrorBtnLocation">
|
|
16
|
-
<button class="InitErrorBtn btn btn-danger" v-if="errorShow" @click="start">重试</button>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="foot">
|
|
21
|
-
<text >返回</text>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
import Vue from 'vue'
|
|
28
|
-
let getConfig = self => {
|
|
29
|
-
console.group('getConfigParam')
|
|
30
|
-
let param = {
|
|
31
|
-
device_num: self.$PosUtil.Sn
|
|
32
|
-
}
|
|
33
|
-
console.log('getConfigParam参数: ', param)
|
|
34
|
-
self.$resetpost(Vue.ProxyUrl +'rs/logic/getConfigParam', param, {resolveMsg: null, rejectMsg: null}).then(res => {
|
|
35
|
-
self.loading_text = "初始化成功"
|
|
36
|
-
self.clearThisInterval()
|
|
37
|
-
// 设置从后台拿过来的参数值
|
|
38
|
-
Object.assign(self.$PosUtil.posParam, res.data)
|
|
39
|
-
|
|
40
|
-
console.log(self.$PosUtil.posParam)
|
|
41
|
-
|
|
42
|
-
// 验证通过
|
|
43
|
-
self.$goto('main', {}, 'self')
|
|
44
|
-
}).catch(res => {
|
|
45
|
-
console.log('res.status:', res.status)
|
|
46
|
-
if (res.status === 501) {
|
|
47
|
-
self.loading_text = "该设备未注册,请注册后点击重试"
|
|
48
|
-
} else if (res.status === 404) {
|
|
49
|
-
self.loading_text = "设备网络故障或连接服务器异常"
|
|
50
|
-
} else if (res.status === 500) {
|
|
51
|
-
self.loading_text = "服务器内部错误"
|
|
52
|
-
} else {
|
|
53
|
-
self.loading_text = "未知错误"
|
|
54
|
-
}
|
|
55
|
-
self.errorShow = true
|
|
56
|
-
self.clearThisInterval()
|
|
57
|
-
})
|
|
58
|
-
console.groupEnd()
|
|
59
|
-
}
|
|
60
|
-
export default {
|
|
61
|
-
title: '初始化',
|
|
62
|
-
name: "Init",
|
|
63
|
-
data() {
|
|
64
|
-
return {
|
|
65
|
-
loading_text: '正在对机器进行初始化操作,请稍等',
|
|
66
|
-
dots: '',
|
|
67
|
-
timeOut: undefined,
|
|
68
|
-
timeIndex: 0,
|
|
69
|
-
errorShow: false
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
ready() {
|
|
73
|
-
this.start()
|
|
74
|
-
},
|
|
75
|
-
methods: {
|
|
76
|
-
//判断当前运行环境
|
|
77
|
-
isAndroidDevice() {
|
|
78
|
-
try {
|
|
79
|
-
console.log('android环境')
|
|
80
|
-
HostApp
|
|
81
|
-
this.$AndroidPlugin.isAndroid = true
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
this.$AndroidPlugin.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.div-
|
|
156
|
-
height:
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.div-
|
|
160
|
-
height:
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.div-
|
|
164
|
-
height:
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.div-
|
|
168
|
-
height:
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.div-
|
|
172
|
-
height:
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.div-
|
|
176
|
-
height:
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.div-
|
|
180
|
-
height:
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.div-
|
|
184
|
-
height:
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.div-
|
|
188
|
-
height:
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div >
|
|
3
|
+
<div class="mhead">
|
|
4
|
+
<ul>
|
|
5
|
+
<li>
|
|
6
|
+
<text>自助缴费机</text>
|
|
7
|
+
</li>
|
|
8
|
+
</ul>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="loadview">
|
|
11
|
+
<div class="auto">
|
|
12
|
+
<div class="loading-text-style">
|
|
13
|
+
<span class="text-style span-height-center">{{loading_text}}{{dots}}</span>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="ErrorBtnLocation">
|
|
16
|
+
<button class="InitErrorBtn btn btn-danger" v-if="errorShow" @click="start">重试</button>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="foot">
|
|
21
|
+
<text >返回</text>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import Vue from 'vue'
|
|
28
|
+
let getConfig = self => {
|
|
29
|
+
console.group('getConfigParam')
|
|
30
|
+
let param = {
|
|
31
|
+
device_num: self.$PosUtil.Sn
|
|
32
|
+
}
|
|
33
|
+
console.log('getConfigParam参数: ', param)
|
|
34
|
+
self.$resetpost(Vue.ProxyUrl +'rs/logic/getConfigParam', param, {resolveMsg: null, rejectMsg: null}).then(res => {
|
|
35
|
+
self.loading_text = "初始化成功"
|
|
36
|
+
self.clearThisInterval()
|
|
37
|
+
// 设置从后台拿过来的参数值
|
|
38
|
+
Object.assign(self.$PosUtil.posParam, res.data)
|
|
39
|
+
|
|
40
|
+
console.log(self.$PosUtil.posParam)
|
|
41
|
+
|
|
42
|
+
// 验证通过
|
|
43
|
+
self.$goto('main', {}, 'self')
|
|
44
|
+
}).catch(res => {
|
|
45
|
+
console.log('res.status:', res.status)
|
|
46
|
+
if (res.status === 501) {
|
|
47
|
+
self.loading_text = "该设备未注册,请注册后点击重试"
|
|
48
|
+
} else if (res.status === 404) {
|
|
49
|
+
self.loading_text = "设备网络故障或连接服务器异常"
|
|
50
|
+
} else if (res.status === 500) {
|
|
51
|
+
self.loading_text = "服务器内部错误"
|
|
52
|
+
} else {
|
|
53
|
+
self.loading_text = "未知错误"
|
|
54
|
+
}
|
|
55
|
+
self.errorShow = true
|
|
56
|
+
self.clearThisInterval()
|
|
57
|
+
})
|
|
58
|
+
console.groupEnd()
|
|
59
|
+
}
|
|
60
|
+
export default {
|
|
61
|
+
title: '初始化',
|
|
62
|
+
name: "Init",
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
loading_text: '正在对机器进行初始化操作,请稍等',
|
|
66
|
+
dots: '',
|
|
67
|
+
timeOut: undefined,
|
|
68
|
+
timeIndex: 0,
|
|
69
|
+
errorShow: false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
ready() {
|
|
73
|
+
this.start()
|
|
74
|
+
},
|
|
75
|
+
methods: {
|
|
76
|
+
//判断当前运行环境
|
|
77
|
+
isAndroidDevice() {
|
|
78
|
+
try {
|
|
79
|
+
console.log('android环境')
|
|
80
|
+
HostApp
|
|
81
|
+
this.$AndroidPlugin.isAndroid = true
|
|
82
|
+
let url = this.$AndroidPlugin.getProxyURL() + '/'
|
|
83
|
+
if (Vue.phoneBuild){
|
|
84
|
+
url = this.$AndroidPlugin.getProxyURL() + '/pos/'
|
|
85
|
+
}
|
|
86
|
+
Vue.ProxyUrl = url
|
|
87
|
+
} catch (e) {
|
|
88
|
+
console.log('PC测试环境')
|
|
89
|
+
Vue.AndroidPlugin.isAndroid = false
|
|
90
|
+
//如果是非安卓环境,config中配置的链接地址肯定是不能用的,所以改成空的即可
|
|
91
|
+
Vue.ProxyUrl = ''
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
back(){
|
|
95
|
+
this.$back()
|
|
96
|
+
},
|
|
97
|
+
getSn() {
|
|
98
|
+
this.Sn = this.$AndroidPlugin.getSN()
|
|
99
|
+
Vue.PosUtil.Sn = this.Sn
|
|
100
|
+
},
|
|
101
|
+
home() {
|
|
102
|
+
this.$AndroidPlugin.back_home()
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* 给等待条添加一个点
|
|
106
|
+
* */
|
|
107
|
+
addDots() {
|
|
108
|
+
this.timeIndex++
|
|
109
|
+
this.dots += '.'
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* 结束本组件内的计时器
|
|
113
|
+
* */
|
|
114
|
+
clearThisInterval() {
|
|
115
|
+
window.clearInterval(this.timeOut)
|
|
116
|
+
this.initDots()
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* 清空等待条中的点
|
|
120
|
+
* */
|
|
121
|
+
initDots() {
|
|
122
|
+
this.timeIndex = 0
|
|
123
|
+
this.dots = ''
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* 启动计时器
|
|
127
|
+
* */
|
|
128
|
+
async start() {
|
|
129
|
+
await this.isAndroidDevice()
|
|
130
|
+
await this.getSn()
|
|
131
|
+
this.errorShow = false
|
|
132
|
+
this.loading_text = '正在进行初始化操作,请稍等...'
|
|
133
|
+
this.timeOut = window.setInterval(this.setTimeOutMethod, 1000)
|
|
134
|
+
getConfig(this)
|
|
135
|
+
},
|
|
136
|
+
// 判断增加一个点还是清空点
|
|
137
|
+
setTimeOutMethod() {
|
|
138
|
+
this.timeIndex >= 3 ? this.initDots() : this.addDots()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
</script>
|
|
143
|
+
<style>
|
|
144
|
+
.span-height-center {
|
|
145
|
+
position: relative;
|
|
146
|
+
top: 35%;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.text-style {
|
|
150
|
+
font-size: 30px;
|
|
151
|
+
color: black;
|
|
152
|
+
font-weight: bolder;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.div-height10 {
|
|
156
|
+
height: 10%
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.div-height20 {
|
|
160
|
+
height: 20%
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.div-height30 {
|
|
164
|
+
height: 30%
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.div-height40 {
|
|
168
|
+
height: 40%
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.div-height50 {
|
|
172
|
+
height: 50%
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.div-height60 {
|
|
176
|
+
height: 60%
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.div-height70 {
|
|
180
|
+
height: 70%
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.div-height80 {
|
|
184
|
+
height: 80%
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.div-height90 {
|
|
188
|
+
height: 90%
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.div-height100 {
|
|
192
|
+
height: 100%
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.loading-text-style {
|
|
196
|
+
margin: 0 10% 0 10%;
|
|
197
|
+
height: 30%;
|
|
198
|
+
border-radius: 10px;
|
|
199
|
+
text-align: center
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.InitErrorBtn {
|
|
203
|
+
width: 150px;
|
|
204
|
+
height: 60px;
|
|
205
|
+
font-size: 20px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.ErrorBtnLocation {
|
|
209
|
+
position: relative;
|
|
210
|
+
height: 0;
|
|
211
|
+
}
|
|
212
|
+
</style>
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="mhead">
|
|
4
|
-
<ul>
|
|
5
|
-
<li>
|
|
6
|
-
<text>自助缴费机</text>
|
|
7
|
-
</li>
|
|
8
|
-
</ul>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="body" style="background: #f0f0f0;padding: 20%;margin: 0 auto">
|
|
11
|
-
<div>
|
|
12
|
-
<h5>请插好燃气卡,等待自动读卡</h5>
|
|
13
|
-
<img src="../image/readCard.gif">
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="foot" @click="back('toMain')">
|
|
17
|
-
<text>返回</text>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import CheckCard from '../../service/CheckCard'
|
|
24
|
-
import GetCardInfo from '../../service/GetCardInfo'
|
|
25
|
-
import Vue from 'vue'
|
|
26
|
-
export default {
|
|
27
|
-
title: '读卡',
|
|
28
|
-
name: 'CardMain',
|
|
29
|
-
data () {
|
|
30
|
-
return {
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
methods: {
|
|
34
|
-
back(param) {
|
|
35
|
-
this.$back(param)
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
ready () {
|
|
39
|
-
// 用户进入该组件后,轮询检查卡,如果检查到卡就读卡并查询卡信息后返回用户档案
|
|
40
|
-
let service = [new CheckCard(this), new GetCardInfo(this)]
|
|
41
|
-
service = this.$PosUtil.buildLinked(service)
|
|
42
|
-
Vue.eventBack(service)
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
46
|
-
<style>
|
|
47
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="mhead">
|
|
4
|
+
<ul>
|
|
5
|
+
<li>
|
|
6
|
+
<text>自助缴费机</text>
|
|
7
|
+
</li>
|
|
8
|
+
</ul>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="body" style="background: #f0f0f0;padding: 20%;margin: 0 auto">
|
|
11
|
+
<div>
|
|
12
|
+
<h5>请插好燃气卡,等待自动读卡</h5>
|
|
13
|
+
<img src="../image/readCard.gif">
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="foot" @click="back('toMain')">
|
|
17
|
+
<text>返回</text>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import CheckCard from '../../service/CheckCard'
|
|
24
|
+
import GetCardInfo from '../../service/GetCardInfo'
|
|
25
|
+
import Vue from 'vue'
|
|
26
|
+
export default {
|
|
27
|
+
title: '读卡',
|
|
28
|
+
name: 'CardMain',
|
|
29
|
+
data () {
|
|
30
|
+
return {
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
back(param) {
|
|
35
|
+
this.$back(param)
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
ready () {
|
|
39
|
+
// 用户进入该组件后,轮询检查卡,如果检查到卡就读卡并查询卡信息后返回用户档案
|
|
40
|
+
let service = [new CheckCard(this), new GetCardInfo(this)]
|
|
41
|
+
service = this.$PosUtil.buildLinked(service)
|
|
42
|
+
Vue.eventBack(service)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
<style>
|
|
47
|
+
</style>
|
|
@@ -1,88 +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.$
|
|
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
|
-
|
|
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
|
-
}
|
|
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
|
+
}
|