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,342 +1,342 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!--<div class="flex-row">
|
|
3
|
-
<div class="span" style="overflow-y: auto;">
|
|
4
|
-
<form novalidate class="form-horizontal">
|
|
5
|
-
<div class="row" style="padding: 10px 10px;">
|
|
6
|
-
<!–v-if='row.f_meter_type==="气量卡表"'–>
|
|
7
|
-
<div class="col-sm-12 form-group" >
|
|
8
|
-
<label class=" font_normal_body">应补气量</label>
|
|
9
|
-
<input class="input_search" style="width:60%" type="number"
|
|
10
|
-
v-model="model.f_pregas"
|
|
11
|
-
placeholder="应补气量" >
|
|
12
|
-
</div>
|
|
13
|
-
<!–v-if='row.f_meter_type==="金额卡表"'–>
|
|
14
|
-
<div class="col-sm-12 form-group" >
|
|
15
|
-
<label class=" font_normal_body">应补金额</label>
|
|
16
|
-
<input class="input_search" style="width:60%" type="number"
|
|
17
|
-
v-model="model.f_fillamount"
|
|
18
|
-
placeholder="应补金额" >
|
|
19
|
-
</div>
|
|
20
|
-
<div class="col-sm-12 form-group" style="margin-top:10px;">
|
|
21
|
-
<label class=" font_normal_body">备  注</label>
|
|
22
|
-
<input class="input_search" style="width:60%" v-model="model.f_reason" placeholder="备注">
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="col-sm-12 form-group">
|
|
26
|
-
<label for="f_add_gas" class="font_normal_body">是否累计</label>
|
|
27
|
-
<v-select id="f_add_gas"
|
|
28
|
-
v-model="model.f_add_gas"
|
|
29
|
-
placeholder='请选择'
|
|
30
|
-
:value-single="true"
|
|
31
|
-
:value.sync="model.f_add_gas"
|
|
32
|
-
:options='addGas'
|
|
33
|
-
close-on-select clear-button>
|
|
34
|
-
</v-select>
|
|
35
|
-
</div>
|
|
36
|
-
</form>
|
|
37
|
-
<div style="height: 50px;margin-top: 10px">
|
|
38
|
-
<button class="btn_cz" @click="confirm()">确认</button>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
</div>-->
|
|
43
|
-
<div style="height: auto;width: 100%">
|
|
44
|
-
<div partial>
|
|
45
|
-
<div class="row app-row">
|
|
46
|
-
<div class="col-xs-4">
|
|
47
|
-
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
48
|
-
<label class="font text-left">应补气量:</label>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="col-xs-8" >
|
|
51
|
-
<input class="search_input input-font" readonly v-model="model.f_pregas" />
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="row app-row">
|
|
55
|
-
<div class="col-xs-4">
|
|
56
|
-
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
57
|
-
<label class="font text-left">应补金额:</label>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="col-xs-8" >
|
|
60
|
-
<input class="search_input input-font" readonly v-model="model.f_fillamount" />
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="row app-row">
|
|
64
|
-
<div class="col-xs-4">
|
|
65
|
-
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
66
|
-
<label class="font text-left">备  注:</label>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="col-xs-8" >
|
|
69
|
-
<input class="search_input input-font" v-model="model.f_comments" />
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="row app-row">
|
|
73
|
-
<div class="col-xs-4">
|
|
74
|
-
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
75
|
-
<label class="font text-left">是否累计</label>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="col-xs-8" >
|
|
78
|
-
<v-select
|
|
79
|
-
v-model="model.f_add_gas"
|
|
80
|
-
placeholder='请选择'
|
|
81
|
-
:value-single="true"
|
|
82
|
-
:value.sync="model.f_add_gas"
|
|
83
|
-
:options='addGas'
|
|
84
|
-
close-on-select clear-button>
|
|
85
|
-
</v-select>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div class="row text-center" style="margin-top: 25px;">
|
|
90
|
-
<button type="button" class="btn btn-lg btn-font btn-color" style="width: 28%;" @click="confirm()">确认</button>
|
|
91
|
-
<!--<button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="clean()">取消</button>-->
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</template>
|
|
96
|
-
<script>
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
*卡表补气组件
|
|
100
|
-
*/
|
|
101
|
-
import Vue from 'vue'
|
|
102
|
-
import { HttpResetClass } from 'vue-client'
|
|
103
|
-
|
|
104
|
-
export default {
|
|
105
|
-
title: '掉气补气',
|
|
106
|
-
data() {
|
|
107
|
-
return {
|
|
108
|
-
model: {
|
|
109
|
-
f_pregas: '',
|
|
110
|
-
f_add_gas: '不计入',
|
|
111
|
-
f_lastremain_fillgas: '',
|
|
112
|
-
f_fillamount: '',
|
|
113
|
-
f_theremain_fillgas: '',
|
|
114
|
-
f_reason: '',
|
|
115
|
-
f_meter_brand: '',
|
|
116
|
-
f_card_id: ''
|
|
117
|
-
},
|
|
118
|
-
cardId: '', // 卡号
|
|
119
|
-
addGasReason:[{label: "掉气补气", value: "掉气补气"},{label: "其他原因", value: "其他原因"}],
|
|
120
|
-
addGas:[{label: '计入', value: '计入'},{label: '不计入', value: '不计入'}]
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
props: ['row'],
|
|
125
|
-
ready() {
|
|
126
|
-
//tag
|
|
127
|
-
},
|
|
128
|
-
watch: {},
|
|
129
|
-
methods: {
|
|
130
|
-
confirm() {
|
|
131
|
-
if (this.row.f_meter_type==="气量卡表") {
|
|
132
|
-
if (this.model.f_pregas) {
|
|
133
|
-
this.$showMessage(`对客户${this.row.f_user_name}进行掉气补气操作。请确保你已经插入了${this.row.f_meter_brand}的卡?`, ['confirm', 'cancel']).then(async (res) => {
|
|
134
|
-
if (res === 'confirm') {
|
|
135
|
-
// 1.判断是否是新卡 2.补气存库 3.写卡
|
|
136
|
-
await this.isnewcard()
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
}else {
|
|
140
|
-
this.$showMessage('请输入应补气量')
|
|
141
|
-
}
|
|
142
|
-
}else if (this.row.f_meter_type==="金额卡表") {
|
|
143
|
-
if (this.model.f_fillamount) {
|
|
144
|
-
this.$showMessage(`对客户${this.row.f_user_name}进行掉气补气操作。请确保你已经插入了${this.row.f_meter_brand}的卡?`, ['confirm', 'cancel']).then(async (res) => {
|
|
145
|
-
if (res === 'confirm') {
|
|
146
|
-
// 1.判断是否是新卡 2.补气存库 3.写卡
|
|
147
|
-
await this.isnewcard()
|
|
148
|
-
}
|
|
149
|
-
})
|
|
150
|
-
}else {
|
|
151
|
-
this.$showMessage('请输入应补金额')
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
},
|
|
157
|
-
async isnewcard() {
|
|
158
|
-
//tag
|
|
159
|
-
let fengongsi = this.$appdata.getSingleValue('分公司')
|
|
160
|
-
if (!fengongsi) {
|
|
161
|
-
this.$showMessage('分公司获取失败!')
|
|
162
|
-
return
|
|
163
|
-
}
|
|
164
|
-
let posinfo = HostApp.read(fengongsi)
|
|
165
|
-
// let posinfo = HostApp.read("XianYang")
|
|
166
|
-
//tag)
|
|
167
|
-
if (posinfo.code == 200) {
|
|
168
|
-
// 补卡肯定有卡号
|
|
169
|
-
this.cardId = posinfo.msg.CardID
|
|
170
|
-
if (posinfo.msg.Gas>0 || posinfo.msg.Money > 0 ) {
|
|
171
|
-
this.$showMessage('卡上有余额是否继续写卡!', ['confirm', 'cancel']).then( async (res) => {
|
|
172
|
-
if (res === 'confirm') {
|
|
173
|
-
//tag
|
|
174
|
-
// 写卡
|
|
175
|
-
await this.writcard(this.model, this.row)
|
|
176
|
-
}
|
|
177
|
-
})
|
|
178
|
-
}else {
|
|
179
|
-
//tag
|
|
180
|
-
// 写卡
|
|
181
|
-
await this.writcard(this.model, this.row)
|
|
182
|
-
}
|
|
183
|
-
}else {
|
|
184
|
-
this.$showMessage(posinfo.msg)
|
|
185
|
-
//tag
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
async compensategas(model,row) {
|
|
189
|
-
//tag
|
|
190
|
-
// //tag)
|
|
191
|
-
// //tag)
|
|
192
|
-
let data = {
|
|
193
|
-
f_card_id: row.f_card_id,
|
|
194
|
-
f_pregas: model.f_pregas,
|
|
195
|
-
f_preamount: model.f_fillamount,
|
|
196
|
-
f_lastremain_fillgas: model.f_lastremain_fillgas,
|
|
197
|
-
f_theremain_fillgas: model.f_theremain_fillgas,
|
|
198
|
-
f_total_gas: row.f_total_gas,
|
|
199
|
-
f_total_fee: row.f_total_fee,
|
|
200
|
-
f_address: row.f_address,
|
|
201
|
-
f_meter_brand: row.f_meter_brand,
|
|
202
|
-
f_comments: model.f_reason,
|
|
203
|
-
f_add_gas: model.f_add_gas,
|
|
204
|
-
f_type: '掉气补气',
|
|
205
|
-
f_state: '有效',
|
|
206
|
-
f_user_id: row.f_user_id,
|
|
207
|
-
f_userfiles_id: model.f_userfiles_id,
|
|
208
|
-
record_userinfo: row.f_userinfo_id,
|
|
209
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
210
|
-
f_user_name: row.f_user_name,
|
|
211
|
-
f_user_type: row.f_user_type,
|
|
212
|
-
f_gasproperties: row.f_gasproperties,
|
|
213
|
-
f_meter_type: row.f_meter_type,
|
|
214
|
-
f_operat_type: '掉气补气',
|
|
215
|
-
f_describe: `${Vue.user.name}对客户${row.f_user_name}进行掉气补气操作`,
|
|
216
|
-
f_depname: Vue.user.deps,
|
|
217
|
-
f_depid : Vue.user.depids,
|
|
218
|
-
f_orgid : Vue.user.orgid,
|
|
219
|
-
f_orgname : Vue.user.orgs,
|
|
220
|
-
f_operator: Vue.user.name,
|
|
221
|
-
f_operatorid: Vue.user.id
|
|
222
|
-
}
|
|
223
|
-
//tag)
|
|
224
|
-
//tag
|
|
225
|
-
await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/sale_fillGas`, data, {}).then( async (row) => {
|
|
226
|
-
//tag)
|
|
227
|
-
this.$showMessage('补气成功!!!')
|
|
228
|
-
this.$dispatch('confirm')
|
|
229
|
-
// this.$back()
|
|
230
|
-
}).catch((e) => {
|
|
231
|
-
this.$showMessage('补气失败!!!')
|
|
232
|
-
//tag)
|
|
233
|
-
})
|
|
234
|
-
},
|
|
235
|
-
async writcard(model, row) {
|
|
236
|
-
//tag
|
|
237
|
-
let cardId = row.f_card_id
|
|
238
|
-
if (row.f_tag && row.f_tag !== 'null') {
|
|
239
|
-
// 截取用户编号后四位
|
|
240
|
-
cardId = row.f_tag + row.f_card_id
|
|
241
|
-
model.f_userfiles_id = {
|
|
242
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
243
|
-
f_user_id: row.f_user_id,
|
|
244
|
-
f_total_gas: model.f_add_gas === '计入' ? (row.f_total_gas - 0) + (model.f_pregas - 0) : (row.f_total_gas - 0),
|
|
245
|
-
f_total_fee: model.f_add_gas === '计入' ? (row.f_total_fee - 0) + (model.f_fillamount - 0) : (row.f_total_fee - 0),
|
|
246
|
-
f_card_id: cardId,
|
|
247
|
-
f_tag: null,
|
|
248
|
-
version: row.version
|
|
249
|
-
}
|
|
250
|
-
} else {
|
|
251
|
-
model.f_user_id = row.f_user_id
|
|
252
|
-
model.f_userfiles_id = {
|
|
253
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
254
|
-
f_user_id: row.f_user_id,
|
|
255
|
-
f_total_gas: model.f_add_gas === '计入' ? (row.f_total_gas - 0) + (model.f_pregas - 0) : (row.f_total_gas - 0),
|
|
256
|
-
f_total_fee: model.f_add_gas === '计入' ? (row.f_total_fee - 0) + (model.f_fillamount - 0) : (row.f_total_fee - 0),
|
|
257
|
-
f_card_id: cardId,
|
|
258
|
-
version: row.version
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
let params = {
|
|
262
|
-
AREA:'XianYang', // 分公司
|
|
263
|
-
ulen: 0, // 判断版本
|
|
264
|
-
factory: row.f_alias, // 气表厂家
|
|
265
|
-
kh: cardId, // 卡号
|
|
266
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
267
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
268
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
269
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
270
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
271
|
-
ql: model.f_pregas, // 预购气量
|
|
272
|
-
cs: row.f_times, // 求购气次数,先开户为1
|
|
273
|
-
money: model.f_fillamount, // 购气金额
|
|
274
|
-
klx: row.f_coding,
|
|
275
|
-
kzt: '1',
|
|
276
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
277
|
-
meterid: row.f_meternumber, // 表号
|
|
278
|
-
meternumber: row.f_meternumber
|
|
279
|
-
}
|
|
280
|
-
// 获取写卡参数
|
|
281
|
-
let data = {
|
|
282
|
-
f_card_id: this.row.f_card_id + '',
|
|
283
|
-
f_alias: this.row.alias,
|
|
284
|
-
f_user_id: this.row.f_user_id,
|
|
285
|
-
f_userfiles_id: this.row.f_userfiles_id
|
|
286
|
-
}
|
|
287
|
-
//tag)
|
|
288
|
-
let http = new HttpResetClass()
|
|
289
|
-
let cardParams = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/af-
|
|
290
|
-
//tag)
|
|
291
|
-
// 拼接参数
|
|
292
|
-
params = await Object.assign({}, await this.writeCardParams(cardParams), params)
|
|
293
|
-
//tag)
|
|
294
|
-
let writres = await HostApp.issue(JSON.stringify(params))
|
|
295
|
-
//tag)
|
|
296
|
-
if(writres.code =='200') {
|
|
297
|
-
//tag
|
|
298
|
-
// 存库
|
|
299
|
-
await this.compensategas(this.model,this.row)
|
|
300
|
-
}else {
|
|
301
|
-
this.$showMessage('写卡失败!!!')
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
clean() {
|
|
305
|
-
//tag
|
|
306
|
-
this.$dispatch('refresh', this.row)
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
computed: {
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
</script>
|
|
314
|
-
|
|
315
|
-
<style scoped>
|
|
316
|
-
.app-row {
|
|
317
|
-
background-color: white;
|
|
318
|
-
padding: 10px 10px 0 10px;
|
|
319
|
-
border-bottom: 1px solid rgba(235, 235, 235, 0.7);
|
|
320
|
-
}
|
|
321
|
-
.search_input {
|
|
322
|
-
border: 0;
|
|
323
|
-
outline: none;
|
|
324
|
-
}
|
|
325
|
-
.font{
|
|
326
|
-
font: 15px PingFang-SC-Medium;
|
|
327
|
-
color: #666666;
|
|
328
|
-
}
|
|
329
|
-
.input-font{
|
|
330
|
-
font: 15px PingFang-SC-Medium;
|
|
331
|
-
color: #333333;
|
|
332
|
-
}
|
|
333
|
-
.btn-font{
|
|
334
|
-
font:600 16px PingFang-SC-Bold;
|
|
335
|
-
color: #499EDF;
|
|
336
|
-
}
|
|
337
|
-
.btn-color{
|
|
338
|
-
background-color: #FFFFFF;
|
|
339
|
-
border-radius: 10px ;
|
|
340
|
-
border: 1px solid #499EDF;
|
|
341
|
-
}
|
|
342
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<!--<div class="flex-row">
|
|
3
|
+
<div class="span" style="overflow-y: auto;">
|
|
4
|
+
<form novalidate class="form-horizontal">
|
|
5
|
+
<div class="row" style="padding: 10px 10px;">
|
|
6
|
+
<!–v-if='row.f_meter_type==="气量卡表"'–>
|
|
7
|
+
<div class="col-sm-12 form-group" >
|
|
8
|
+
<label class=" font_normal_body">应补气量</label>
|
|
9
|
+
<input class="input_search" style="width:60%" type="number"
|
|
10
|
+
v-model="model.f_pregas"
|
|
11
|
+
placeholder="应补气量" >
|
|
12
|
+
</div>
|
|
13
|
+
<!–v-if='row.f_meter_type==="金额卡表"'–>
|
|
14
|
+
<div class="col-sm-12 form-group" >
|
|
15
|
+
<label class=" font_normal_body">应补金额</label>
|
|
16
|
+
<input class="input_search" style="width:60%" type="number"
|
|
17
|
+
v-model="model.f_fillamount"
|
|
18
|
+
placeholder="应补金额" >
|
|
19
|
+
</div>
|
|
20
|
+
<div class="col-sm-12 form-group" style="margin-top:10px;">
|
|
21
|
+
<label class=" font_normal_body">备  注</label>
|
|
22
|
+
<input class="input_search" style="width:60%" v-model="model.f_reason" placeholder="备注">
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="col-sm-12 form-group">
|
|
26
|
+
<label for="f_add_gas" class="font_normal_body">是否累计</label>
|
|
27
|
+
<v-select id="f_add_gas"
|
|
28
|
+
v-model="model.f_add_gas"
|
|
29
|
+
placeholder='请选择'
|
|
30
|
+
:value-single="true"
|
|
31
|
+
:value.sync="model.f_add_gas"
|
|
32
|
+
:options='addGas'
|
|
33
|
+
close-on-select clear-button>
|
|
34
|
+
</v-select>
|
|
35
|
+
</div>
|
|
36
|
+
</form>
|
|
37
|
+
<div style="height: 50px;margin-top: 10px">
|
|
38
|
+
<button class="btn_cz" @click="confirm()">确认</button>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
</div>-->
|
|
43
|
+
<div style="height: auto;width: 100%">
|
|
44
|
+
<div partial>
|
|
45
|
+
<div class="row app-row">
|
|
46
|
+
<div class="col-xs-4">
|
|
47
|
+
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
48
|
+
<label class="font text-left">应补气量:</label>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="col-xs-8" >
|
|
51
|
+
<input class="search_input input-font" readonly v-model="model.f_pregas" />
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="row app-row">
|
|
55
|
+
<div class="col-xs-4">
|
|
56
|
+
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
57
|
+
<label class="font text-left">应补金额:</label>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="col-xs-8" >
|
|
60
|
+
<input class="search_input input-font" readonly v-model="model.f_fillamount" />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="row app-row">
|
|
64
|
+
<div class="col-xs-4">
|
|
65
|
+
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
66
|
+
<label class="font text-left">备  注:</label>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="col-xs-8" >
|
|
69
|
+
<input class="search_input input-font" v-model="model.f_comments" />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="row app-row">
|
|
73
|
+
<div class="col-xs-4">
|
|
74
|
+
<img src="../../assets/补卡.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
75
|
+
<label class="font text-left">是否累计</label>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="col-xs-8" >
|
|
78
|
+
<v-select
|
|
79
|
+
v-model="model.f_add_gas"
|
|
80
|
+
placeholder='请选择'
|
|
81
|
+
:value-single="true"
|
|
82
|
+
:value.sync="model.f_add_gas"
|
|
83
|
+
:options='addGas'
|
|
84
|
+
close-on-select clear-button>
|
|
85
|
+
</v-select>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="row text-center" style="margin-top: 25px;">
|
|
90
|
+
<button type="button" class="btn btn-lg btn-font btn-color" style="width: 28%;" @click="confirm()">确认</button>
|
|
91
|
+
<!--<button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="clean()">取消</button>-->
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
<script>
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
*卡表补气组件
|
|
100
|
+
*/
|
|
101
|
+
import Vue from 'vue'
|
|
102
|
+
import { HttpResetClass } from 'vue-client'
|
|
103
|
+
|
|
104
|
+
export default {
|
|
105
|
+
title: '掉气补气',
|
|
106
|
+
data() {
|
|
107
|
+
return {
|
|
108
|
+
model: {
|
|
109
|
+
f_pregas: '',
|
|
110
|
+
f_add_gas: '不计入',
|
|
111
|
+
f_lastremain_fillgas: '',
|
|
112
|
+
f_fillamount: '',
|
|
113
|
+
f_theremain_fillgas: '',
|
|
114
|
+
f_reason: '',
|
|
115
|
+
f_meter_brand: '',
|
|
116
|
+
f_card_id: ''
|
|
117
|
+
},
|
|
118
|
+
cardId: '', // 卡号
|
|
119
|
+
addGasReason:[{label: "掉气补气", value: "掉气补气"},{label: "其他原因", value: "其他原因"}],
|
|
120
|
+
addGas:[{label: '计入', value: '计入'},{label: '不计入', value: '不计入'}]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
props: ['row'],
|
|
125
|
+
ready() {
|
|
126
|
+
//tag
|
|
127
|
+
},
|
|
128
|
+
watch: {},
|
|
129
|
+
methods: {
|
|
130
|
+
confirm() {
|
|
131
|
+
if (this.row.f_meter_type==="气量卡表") {
|
|
132
|
+
if (this.model.f_pregas) {
|
|
133
|
+
this.$showMessage(`对客户${this.row.f_user_name}进行掉气补气操作。请确保你已经插入了${this.row.f_meter_brand}的卡?`, ['confirm', 'cancel']).then(async (res) => {
|
|
134
|
+
if (res === 'confirm') {
|
|
135
|
+
// 1.判断是否是新卡 2.补气存库 3.写卡
|
|
136
|
+
await this.isnewcard()
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
}else {
|
|
140
|
+
this.$showMessage('请输入应补气量')
|
|
141
|
+
}
|
|
142
|
+
}else if (this.row.f_meter_type==="金额卡表") {
|
|
143
|
+
if (this.model.f_fillamount) {
|
|
144
|
+
this.$showMessage(`对客户${this.row.f_user_name}进行掉气补气操作。请确保你已经插入了${this.row.f_meter_brand}的卡?`, ['confirm', 'cancel']).then(async (res) => {
|
|
145
|
+
if (res === 'confirm') {
|
|
146
|
+
// 1.判断是否是新卡 2.补气存库 3.写卡
|
|
147
|
+
await this.isnewcard()
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
}else {
|
|
151
|
+
this.$showMessage('请输入应补金额')
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
},
|
|
157
|
+
async isnewcard() {
|
|
158
|
+
//tag
|
|
159
|
+
let fengongsi = this.$appdata.getSingleValue('分公司')
|
|
160
|
+
if (!fengongsi) {
|
|
161
|
+
this.$showMessage('分公司获取失败!')
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
let posinfo = HostApp.read(fengongsi)
|
|
165
|
+
// let posinfo = HostApp.read("XianYang")
|
|
166
|
+
//tag)
|
|
167
|
+
if (posinfo.code == 200) {
|
|
168
|
+
// 补卡肯定有卡号
|
|
169
|
+
this.cardId = posinfo.msg.CardID
|
|
170
|
+
if (posinfo.msg.Gas>0 || posinfo.msg.Money > 0 ) {
|
|
171
|
+
this.$showMessage('卡上有余额是否继续写卡!', ['confirm', 'cancel']).then( async (res) => {
|
|
172
|
+
if (res === 'confirm') {
|
|
173
|
+
//tag
|
|
174
|
+
// 写卡
|
|
175
|
+
await this.writcard(this.model, this.row)
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
}else {
|
|
179
|
+
//tag
|
|
180
|
+
// 写卡
|
|
181
|
+
await this.writcard(this.model, this.row)
|
|
182
|
+
}
|
|
183
|
+
}else {
|
|
184
|
+
this.$showMessage(posinfo.msg)
|
|
185
|
+
//tag
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
async compensategas(model,row) {
|
|
189
|
+
//tag
|
|
190
|
+
// //tag)
|
|
191
|
+
// //tag)
|
|
192
|
+
let data = {
|
|
193
|
+
f_card_id: row.f_card_id,
|
|
194
|
+
f_pregas: model.f_pregas,
|
|
195
|
+
f_preamount: model.f_fillamount,
|
|
196
|
+
f_lastremain_fillgas: model.f_lastremain_fillgas,
|
|
197
|
+
f_theremain_fillgas: model.f_theremain_fillgas,
|
|
198
|
+
f_total_gas: row.f_total_gas,
|
|
199
|
+
f_total_fee: row.f_total_fee,
|
|
200
|
+
f_address: row.f_address,
|
|
201
|
+
f_meter_brand: row.f_meter_brand,
|
|
202
|
+
f_comments: model.f_reason,
|
|
203
|
+
f_add_gas: model.f_add_gas,
|
|
204
|
+
f_type: '掉气补气',
|
|
205
|
+
f_state: '有效',
|
|
206
|
+
f_user_id: row.f_user_id,
|
|
207
|
+
f_userfiles_id: model.f_userfiles_id,
|
|
208
|
+
record_userinfo: row.f_userinfo_id,
|
|
209
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
210
|
+
f_user_name: row.f_user_name,
|
|
211
|
+
f_user_type: row.f_user_type,
|
|
212
|
+
f_gasproperties: row.f_gasproperties,
|
|
213
|
+
f_meter_type: row.f_meter_type,
|
|
214
|
+
f_operat_type: '掉气补气',
|
|
215
|
+
f_describe: `${Vue.user.name}对客户${row.f_user_name}进行掉气补气操作`,
|
|
216
|
+
f_depname: Vue.user.deps,
|
|
217
|
+
f_depid : Vue.user.depids,
|
|
218
|
+
f_orgid : Vue.user.orgid,
|
|
219
|
+
f_orgname : Vue.user.orgs,
|
|
220
|
+
f_operator: Vue.user.name,
|
|
221
|
+
f_operatorid: Vue.user.id
|
|
222
|
+
}
|
|
223
|
+
//tag)
|
|
224
|
+
//tag
|
|
225
|
+
await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/af-telephone/rs/logic/sale_fillGas`, data, {}).then( async (row) => {
|
|
226
|
+
//tag)
|
|
227
|
+
this.$showMessage('补气成功!!!')
|
|
228
|
+
this.$dispatch('confirm')
|
|
229
|
+
// this.$back()
|
|
230
|
+
}).catch((e) => {
|
|
231
|
+
this.$showMessage('补气失败!!!')
|
|
232
|
+
//tag)
|
|
233
|
+
})
|
|
234
|
+
},
|
|
235
|
+
async writcard(model, row) {
|
|
236
|
+
//tag
|
|
237
|
+
let cardId = row.f_card_id
|
|
238
|
+
if (row.f_tag && row.f_tag !== 'null') {
|
|
239
|
+
// 截取用户编号后四位
|
|
240
|
+
cardId = row.f_tag + row.f_card_id
|
|
241
|
+
model.f_userfiles_id = {
|
|
242
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
243
|
+
f_user_id: row.f_user_id,
|
|
244
|
+
f_total_gas: model.f_add_gas === '计入' ? (row.f_total_gas - 0) + (model.f_pregas - 0) : (row.f_total_gas - 0),
|
|
245
|
+
f_total_fee: model.f_add_gas === '计入' ? (row.f_total_fee - 0) + (model.f_fillamount - 0) : (row.f_total_fee - 0),
|
|
246
|
+
f_card_id: cardId,
|
|
247
|
+
f_tag: null,
|
|
248
|
+
version: row.version
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
model.f_user_id = row.f_user_id
|
|
252
|
+
model.f_userfiles_id = {
|
|
253
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
254
|
+
f_user_id: row.f_user_id,
|
|
255
|
+
f_total_gas: model.f_add_gas === '计入' ? (row.f_total_gas - 0) + (model.f_pregas - 0) : (row.f_total_gas - 0),
|
|
256
|
+
f_total_fee: model.f_add_gas === '计入' ? (row.f_total_fee - 0) + (model.f_fillamount - 0) : (row.f_total_fee - 0),
|
|
257
|
+
f_card_id: cardId,
|
|
258
|
+
version: row.version
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
let params = {
|
|
262
|
+
AREA:'XianYang', // 分公司
|
|
263
|
+
ulen: 0, // 判断版本
|
|
264
|
+
factory: row.f_alias, // 气表厂家
|
|
265
|
+
kh: cardId, // 卡号
|
|
266
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
267
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
268
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
269
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
270
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
271
|
+
ql: model.f_pregas, // 预购气量
|
|
272
|
+
cs: row.f_times, // 求购气次数,先开户为1
|
|
273
|
+
money: model.f_fillamount, // 购气金额
|
|
274
|
+
klx: row.f_coding,
|
|
275
|
+
kzt: '1',
|
|
276
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
277
|
+
meterid: row.f_meternumber, // 表号
|
|
278
|
+
meternumber: row.f_meternumber
|
|
279
|
+
}
|
|
280
|
+
// 获取写卡参数
|
|
281
|
+
let data = {
|
|
282
|
+
f_card_id: this.row.f_card_id + '',
|
|
283
|
+
f_alias: this.row.alias,
|
|
284
|
+
f_user_id: this.row.f_user_id,
|
|
285
|
+
f_userfiles_id: this.row.f_userfiles_id
|
|
286
|
+
}
|
|
287
|
+
//tag)
|
|
288
|
+
let http = new HttpResetClass()
|
|
289
|
+
let cardParams = await http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/stairCard`, {data: data}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
|
|
290
|
+
//tag)
|
|
291
|
+
// 拼接参数
|
|
292
|
+
params = await Object.assign({}, await this.writeCardParams(cardParams), params)
|
|
293
|
+
//tag)
|
|
294
|
+
let writres = await HostApp.issue(JSON.stringify(params))
|
|
295
|
+
//tag)
|
|
296
|
+
if(writres.code =='200') {
|
|
297
|
+
//tag
|
|
298
|
+
// 存库
|
|
299
|
+
await this.compensategas(this.model,this.row)
|
|
300
|
+
}else {
|
|
301
|
+
this.$showMessage('写卡失败!!!')
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
clean() {
|
|
305
|
+
//tag
|
|
306
|
+
this.$dispatch('refresh', this.row)
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
computed: {
|
|
310
|
+
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
</script>
|
|
314
|
+
|
|
315
|
+
<style scoped>
|
|
316
|
+
.app-row {
|
|
317
|
+
background-color: white;
|
|
318
|
+
padding: 10px 10px 0 10px;
|
|
319
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.7);
|
|
320
|
+
}
|
|
321
|
+
.search_input {
|
|
322
|
+
border: 0;
|
|
323
|
+
outline: none;
|
|
324
|
+
}
|
|
325
|
+
.font{
|
|
326
|
+
font: 15px PingFang-SC-Medium;
|
|
327
|
+
color: #666666;
|
|
328
|
+
}
|
|
329
|
+
.input-font{
|
|
330
|
+
font: 15px PingFang-SC-Medium;
|
|
331
|
+
color: #333333;
|
|
332
|
+
}
|
|
333
|
+
.btn-font{
|
|
334
|
+
font:600 16px PingFang-SC-Bold;
|
|
335
|
+
color: #499EDF;
|
|
336
|
+
}
|
|
337
|
+
.btn-color{
|
|
338
|
+
background-color: #FFFFFF;
|
|
339
|
+
border-radius: 10px ;
|
|
340
|
+
border: 1px solid #499EDF;
|
|
341
|
+
}
|
|
342
|
+
</style>
|