handpos-client 1.0.6-lekai → 1.0.8-lekai
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 -49
- package/src/components/Init.vue +2 -2
- package/src/components/garbage/GarbageInfo.vue +241 -212
- package/src/components/garbage/GarbagePayWay.vue +233 -233
- package/src/service/GarbagePayWay.js +101 -101
- package/src/service/GarbageScanNative.js +116 -116
- package/src/service/GetCardInfo.js +3 -0
- package/src/service/PayWay.js +121 -121
- package/src/service/ScanNative.js +118 -118
- package/src/service/WriteCard.js +262 -262
- package/src/service/util.js +84 -84
package/package.json
CHANGED
package/src/aotePos-android.js
CHANGED
|
@@ -1,49 +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
|
-
}
|
|
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
|
@@ -79,9 +79,9 @@ export default {
|
|
|
79
79
|
console.log('android环境')
|
|
80
80
|
HostApp
|
|
81
81
|
this.$AndroidPlugin.isAndroid = true
|
|
82
|
-
let url =
|
|
82
|
+
let url = Vue.AndroidPlugin.getProxyURL() + '/'
|
|
83
83
|
if (Vue.phoneBuild){
|
|
84
|
-
url =
|
|
84
|
+
url = Vue.AndroidPlugin.getProxyURL() + '/pos/'
|
|
85
85
|
}
|
|
86
86
|
Vue.ProxyUrl = url
|
|
87
87
|
} catch (e) {
|
|
@@ -1,212 +1,241 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="overflow: hidden">
|
|
3
|
-
<div class="mhead" style="height: 8%;padding-top: 2%;">
|
|
4
|
-
<ul>
|
|
5
|
-
<li>
|
|
6
|
-
<text>垃圾费信息</text>
|
|
7
|
-
</li>
|
|
8
|
-
</ul>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="body">
|
|
12
|
-
<div class="searchview auto">
|
|
13
|
-
<!-- 垃圾费信息显示 -->
|
|
14
|
-
<div class="form-group row auto" style="margin-top:10px;">
|
|
15
|
-
<div class="col-xs-12">
|
|
16
|
-
<div class="panel panel-default">
|
|
17
|
-
<div class="panel-heading">
|
|
18
|
-
<h4 class="panel-title">垃圾费详情</h4>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="panel-body">
|
|
21
|
-
<!-- 用户信息展示(两行,地址单独一行) -->
|
|
22
|
-
<div class="garbage-userinfo">
|
|
23
|
-
<div class="row">
|
|
24
|
-
<div class="col-xs-6">
|
|
25
|
-
<strong>用户编号:</strong>{{ userInfo.f_userinfo_code }}
|
|
26
|
-
</div>
|
|
27
|
-
<div class="col-xs-6">
|
|
28
|
-
<strong>用户名称:</strong>{{ userInfo.f_user_name }}
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="row" style="margin-top: 6px;">
|
|
32
|
-
<div class="col-xs-12">
|
|
33
|
-
<strong>用户地址:</strong>{{ userInfo.f_address || userInfo.address }}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<div class="row" style="margin-top: 10px;">
|
|
39
|
-
<div class="col-xs-6">
|
|
40
|
-
<strong>账期:</strong>{{ garbage.accountperiod }}
|
|
41
|
-
</div>
|
|
42
|
-
<div class="col-xs-6">
|
|
43
|
-
<strong>总金额:</strong><span style="color: red;">¥{{ garbage.money }}</span>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="row" style="margin-top: 15px;">
|
|
48
|
-
<div class="col-xs-12">
|
|
49
|
-
<strong>缴费明细:</strong>
|
|
50
|
-
<div class="garbage-detail-table">
|
|
51
|
-
<table class="table table-striped table-bordered" style="margin-top: 10px;">
|
|
52
|
-
<thead>
|
|
53
|
-
<tr>
|
|
54
|
-
<th style="text-align: center;">月份</th>
|
|
55
|
-
<th style="text-align: center;">金额(元)</th>
|
|
56
|
-
</tr>
|
|
57
|
-
</thead>
|
|
58
|
-
<tbody>
|
|
59
|
-
<tr v-for="item in garbage.list" :key="item.f_hand_date">
|
|
60
|
-
<td style="text-align: center;">{{ formatDate(item.f_hand_date) }}</td>
|
|
61
|
-
<td style="text-align: center; color: red;">¥{{ item.f_money }}</td>
|
|
62
|
-
</tr>
|
|
63
|
-
</tbody>
|
|
64
|
-
</table>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<!-- 操作按钮 -->
|
|
74
|
-
<div class="form-group row auto" style="margin-top: 20px;">
|
|
75
|
-
<div class="col-xs-6 col-xs-offset-3">
|
|
76
|
-
<button type="button" class="btn btn-success btn-lg btn-block" @click="payGarbageFee()">
|
|
77
|
-
<i class="fa fa-credit-card"></i> 缴费
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<!-- 返回按钮 -->
|
|
85
|
-
<div class="foot" @click="back('toMain')">
|
|
86
|
-
<text>返回</text>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</template>
|
|
90
|
-
|
|
91
|
-
<script>
|
|
92
|
-
import Vue from 'vue'
|
|
93
|
-
import GarbagePayWay from '../../service/GarbagePayWay'
|
|
94
|
-
import GarbageScanNative from '../../service/GarbageScanNative'
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
this
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
.garbage
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div style="overflow: hidden">
|
|
3
|
+
<div class="mhead" style="height: 8%;padding-top: 2%;">
|
|
4
|
+
<ul>
|
|
5
|
+
<li>
|
|
6
|
+
<text>垃圾费信息</text>
|
|
7
|
+
</li>
|
|
8
|
+
</ul>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="body">
|
|
12
|
+
<div class="searchview auto">
|
|
13
|
+
<!-- 垃圾费信息显示 -->
|
|
14
|
+
<div class="form-group row auto" style="margin-top:10px;">
|
|
15
|
+
<div class="col-xs-12">
|
|
16
|
+
<div class="panel panel-default">
|
|
17
|
+
<div class="panel-heading">
|
|
18
|
+
<h4 class="panel-title">垃圾费详情</h4>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="panel-body">
|
|
21
|
+
<!-- 用户信息展示(两行,地址单独一行) -->
|
|
22
|
+
<div class="garbage-userinfo">
|
|
23
|
+
<div class="row">
|
|
24
|
+
<div class="col-xs-6">
|
|
25
|
+
<strong>用户编号:</strong>{{ userInfo.f_userinfo_code }}
|
|
26
|
+
</div>
|
|
27
|
+
<div class="col-xs-6">
|
|
28
|
+
<strong>用户名称:</strong>{{ userInfo.f_user_name }}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="row" style="margin-top: 6px;">
|
|
32
|
+
<div class="col-xs-12">
|
|
33
|
+
<strong>用户地址:</strong>{{ userInfo.f_address || userInfo.address }}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="row" style="margin-top: 10px;">
|
|
39
|
+
<div class="col-xs-6">
|
|
40
|
+
<strong>账期:</strong>{{ garbage.accountperiod }}
|
|
41
|
+
</div>
|
|
42
|
+
<div class="col-xs-6">
|
|
43
|
+
<strong>总金额:</strong><span style="color: red;">¥{{ garbage.money }}</span>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="row" style="margin-top: 15px;">
|
|
48
|
+
<div class="col-xs-12">
|
|
49
|
+
<strong>缴费明细:</strong>
|
|
50
|
+
<div class="garbage-detail-table">
|
|
51
|
+
<table class="table table-striped table-bordered" style="margin-top: 10px;">
|
|
52
|
+
<thead>
|
|
53
|
+
<tr>
|
|
54
|
+
<th style="text-align: center;">月份</th>
|
|
55
|
+
<th style="text-align: center;">金额(元)</th>
|
|
56
|
+
</tr>
|
|
57
|
+
</thead>
|
|
58
|
+
<tbody>
|
|
59
|
+
<tr v-for="item in garbage.list" :key="item.f_hand_date">
|
|
60
|
+
<td style="text-align: center;">{{ formatDate(item.f_hand_date) }}</td>
|
|
61
|
+
<td style="text-align: center; color: red;">¥{{ item.f_money }}</td>
|
|
62
|
+
</tr>
|
|
63
|
+
</tbody>
|
|
64
|
+
</table>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<!-- 操作按钮 -->
|
|
74
|
+
<div class="form-group row auto" style="margin-top: 20px;">
|
|
75
|
+
<div class="col-xs-6 col-xs-offset-3">
|
|
76
|
+
<button type="button" class="btn btn-success btn-lg btn-block" @click="payGarbageFee()">
|
|
77
|
+
<i class="fa fa-credit-card"></i> 缴费
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<!-- 返回按钮 -->
|
|
85
|
+
<div class="foot" @click="back('toMain')">
|
|
86
|
+
<text>返回</text>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<script>
|
|
92
|
+
import Vue from 'vue'
|
|
93
|
+
import GarbagePayWay from '../../service/GarbagePayWay'
|
|
94
|
+
import GarbageScanNative from '../../service/GarbageScanNative'
|
|
95
|
+
import * as util from "../../service/util";
|
|
96
|
+
import {getDate} from "../../service/util";
|
|
97
|
+
|
|
98
|
+
export default {
|
|
99
|
+
title: '垃圾费信息',
|
|
100
|
+
name: 'GarbageInfo',
|
|
101
|
+
data () {
|
|
102
|
+
return {
|
|
103
|
+
userInfo: {},
|
|
104
|
+
garbage: {}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
methods: {
|
|
108
|
+
// 格式化日期显示
|
|
109
|
+
formatDate(dateStr) {
|
|
110
|
+
if (!dateStr) return ''
|
|
111
|
+
// 假设日期格式为 "2025-10",转换为 "2025年10月"
|
|
112
|
+
const parts = dateStr.split('-')
|
|
113
|
+
if (parts.length === 2) {
|
|
114
|
+
return `${parts[0]}年${parts[1]}月`
|
|
115
|
+
}
|
|
116
|
+
return dateStr
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
// 缴费功能
|
|
120
|
+
payGarbageFee() {
|
|
121
|
+
// 跳转到垃圾费专用支付页面
|
|
122
|
+
this.$showNewMessage('确认', `确认支付垃圾费 ¥${this.garbage.money} 元?`, [ 'confirm'], 'newmgs').then((res) => {
|
|
123
|
+
console.log('result', res)
|
|
124
|
+
if (res === 'confirm') {
|
|
125
|
+
// 创建垃圾费支付服务链
|
|
126
|
+
let services = [new GarbagePayWay(this), new GarbageScanNative()]
|
|
127
|
+
// 构建服务引用链
|
|
128
|
+
this.$PosUtil.buildLinked(services)
|
|
129
|
+
// 开启事务
|
|
130
|
+
Vue.eventBack(services)
|
|
131
|
+
}
|
|
132
|
+
}).catch((res) => {
|
|
133
|
+
console.log('res', res)
|
|
134
|
+
})
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
// 返回主页
|
|
138
|
+
back(param) {
|
|
139
|
+
this.$back(param)
|
|
140
|
+
},
|
|
141
|
+
print() {
|
|
142
|
+
let printContent = []
|
|
143
|
+
let templatename = '山西华新科莱天然气有限公司垃圾费收费单'
|
|
144
|
+
printContent.push({type: 3, text: templatename, fontsize: 3, isbold: true, align: 'center'})
|
|
145
|
+
printContent.push({type: 4, value: 2, unit: 'line'})
|
|
146
|
+
printContent.push({type: 3, text: '收费日期:' + Vue.PosUtil.getNowDate('yyyy-MM-dd'), fontsize: 2, isbold: false, align: 'left'})
|
|
147
|
+
printContent.push({type: 3, text: '用户编号:' + this.userInfo.f_userinfo_code, fontsize: 2, isbold: false, align: 'left'})
|
|
148
|
+
printContent.push({type: 3, text: '用户姓名:' + this.userInfo.f_user_name, fontsize: 2, isbold: false, align: 'left'})
|
|
149
|
+
printContent.push({type: 3, text: '用气地址:' + this.userInfo.f_address, fontsize: 2, isbold: false, align: 'left'})
|
|
150
|
+
printContent.push({type: 3, text: '收费项目:' + '垃圾处理费', fontsize: 2, isbold: false, align: 'left'})
|
|
151
|
+
printContent.push({type: 3, text: '垃圾处理费:' + this.garbage.money, fontsize: 2, isbold: false, align: 'left'})
|
|
152
|
+
printContent.push({type: 3, text: '实收金额(大写):' + util.numberToChinese(this.garbage.money), fontsize: 2, isbold: false, align: 'left'})
|
|
153
|
+
printContent.push({type: 3, text: '打票时间:' + util.getDate(), fontsize: 2, isbold: false, align: 'left'})
|
|
154
|
+
printContent.push({type: 3, text: '收费员:' + Vue.user.name, fontsize: 2, isbold: false, align: 'left'})
|
|
155
|
+
printContent.push({type: 4, value: 4, unit: 'line'})
|
|
156
|
+
this.$androidUtil.print(JSON.stringify(printContent))
|
|
157
|
+
},
|
|
158
|
+
// 回调函数
|
|
159
|
+
callBack(param) {
|
|
160
|
+
if (param === 'success') {
|
|
161
|
+
this.$showNewMessage('提示', '垃圾费缴费成功!', ['confirm'], 'newmgs')
|
|
162
|
+
this.$showMessage('确认', `垃圾费缴费成功!是否打印收费单?`, ['confirm', 'cancel'], 'newmgs').then((res) => {
|
|
163
|
+
console.log('result', res)
|
|
164
|
+
if (res === 'confirm') {
|
|
165
|
+
try {
|
|
166
|
+
this.print()
|
|
167
|
+
} catch (e) {
|
|
168
|
+
console.log('打印失败')
|
|
169
|
+
console.log(JSON.stringify(e))
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
this.back('toMain')
|
|
173
|
+
})
|
|
174
|
+
} else if (param === 'fail') {
|
|
175
|
+
this.$showNewMessage('提示', '缴费失败,请重试', ['confirm'], 'newmgs')
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
ready () {
|
|
181
|
+
// 从路由参数或全局状态获取用户信息中的垃圾费信息
|
|
182
|
+
// 这里假设用户信息已经通过某种方式传递过来
|
|
183
|
+
this.userInfo = this.userInfo
|
|
184
|
+
this.garbage = this.garbage
|
|
185
|
+
console.log('this.userInfo', this.userInfo)
|
|
186
|
+
console.log('this.garbage', this.garbage)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
</script>
|
|
190
|
+
|
|
191
|
+
<style scoped>
|
|
192
|
+
.panel {
|
|
193
|
+
border: 1px solid #ddd;
|
|
194
|
+
border-radius: 4px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.panel-heading {
|
|
198
|
+
background-color: #f5f5f5;
|
|
199
|
+
border-bottom: 1px solid #ddd;
|
|
200
|
+
padding: 10px 15px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.panel-title {
|
|
204
|
+
margin: 0;
|
|
205
|
+
font-size: 16px;
|
|
206
|
+
text-align: center;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.panel-body {
|
|
210
|
+
padding: 15px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.garbage-userinfo {
|
|
214
|
+
margin-bottom: 10px;
|
|
215
|
+
font-size: 14px;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.garbage-detail-table {
|
|
219
|
+
max-height: 220px;
|
|
220
|
+
overflow-y: auto;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.table {
|
|
224
|
+
margin-bottom: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.btn-lg {
|
|
228
|
+
padding: 12px 24px;
|
|
229
|
+
font-size: 16px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.btn-success {
|
|
233
|
+
background-color: #5cb85c;
|
|
234
|
+
border-color: #4cae4c;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.btn-success:hover {
|
|
238
|
+
background-color: #449d44;
|
|
239
|
+
border-color: #398439;
|
|
240
|
+
}
|
|
241
|
+
</style>
|