telephone-clients 4.0.0-1-80 → 4.0.0-1-81
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
CHANGED
|
@@ -161,459 +161,459 @@
|
|
|
161
161
|
</template>
|
|
162
162
|
|
|
163
163
|
<script>
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
import Vue from 'vue'
|
|
165
|
+
import {HttpResetClass} from "vue-client";
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
export default {
|
|
168
|
+
title: "购气缴费",
|
|
169
|
+
prop:['row'],
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
model: {
|
|
184
|
-
f_unitprice: 0,
|
|
185
|
-
f_number: 0,
|
|
186
|
-
f_collection: 0,//付款额
|
|
187
|
-
f_brand_spec: '',// 类型
|
|
188
|
-
f_typename: '',// 品名
|
|
189
|
-
f_typenumber: '',// 型号
|
|
190
|
-
f_comments: '',
|
|
191
|
-
f_payment: '建行支付',
|
|
192
|
-
otherdetail: [{
|
|
193
|
-
f_brand_spec: '',
|
|
194
|
-
f_typename: '',
|
|
195
|
-
f_typenumber: '',
|
|
196
|
-
f_unitprice: '',
|
|
197
|
-
f_number: ''
|
|
198
|
-
}]
|
|
199
|
-
},
|
|
200
|
-
config:{
|
|
201
|
-
printType:'普通收据'
|
|
202
|
-
},
|
|
203
|
-
filiale: '', // 支付的分公司
|
|
204
|
-
othercharge_id: ''
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
ready() {
|
|
209
|
-
//tag
|
|
210
|
-
this.paytype = this.$appdata.getParam('支付方式')
|
|
211
|
-
this.chargesize = this.$appdata.getParam('其他收费类型')
|
|
212
|
-
if(Vue.config.mobileReadMeter){
|
|
213
|
-
if(Vue.config.mobileReadMeter.EticketJson && Vue.config.mobileReadMeter.EticketJson.printType){
|
|
214
|
-
this.config.printType=Vue.config.mobileReadMeter.EticketJson.printType
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
this.loadOptions()
|
|
218
|
-
},
|
|
219
|
-
methods: {
|
|
220
|
-
loadOptions () {
|
|
221
|
-
const data = {
|
|
222
|
-
tablename: 't_material_management',
|
|
223
|
-
condition: `1=1 and f_orgid='${Vue.user.orgid}'`
|
|
224
|
-
}
|
|
225
|
-
this.$resetpost(this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data}, {
|
|
226
|
-
resolveMsg: null,
|
|
227
|
-
rejectMsg: '获取数据失败'
|
|
228
|
-
}).then((res) => {
|
|
229
|
-
const categories = []
|
|
230
|
-
const types = []
|
|
231
|
-
for (let material of res.data) {
|
|
232
|
-
if (material.f_material_stype == '分类') {
|
|
233
|
-
categories.push(material)
|
|
234
|
-
} else if (material.f_material_stype == '型号') {
|
|
235
|
-
types.push(material)
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
this.category.typeoptions = []
|
|
239
|
-
const seen = new Set(); // 用于记录已出现的 f_material_type
|
|
240
|
-
for (let category of categories) {
|
|
241
|
-
const type = category.f_material_type;
|
|
242
|
-
if (!seen.has(type)) {
|
|
243
|
-
seen.add(type);
|
|
244
|
-
this.category.typeoptions.push({
|
|
245
|
-
label: type,
|
|
246
|
-
value: type
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
this.originalOptions = []
|
|
251
|
-
for (let category of categories) {
|
|
252
|
-
this.originalOptions.push({
|
|
253
|
-
key: category.f_material_type,
|
|
254
|
-
label: category.f_material_name,
|
|
255
|
-
value: category.f_material_name
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
this.category.children = {}
|
|
260
|
-
for (let category of categories) {
|
|
261
|
-
this.category.children[category.f_material_name] = {
|
|
262
|
-
options: [],
|
|
263
|
-
children: {}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
for (let type of types) {
|
|
267
|
-
if (type.parent_id == category.id) {
|
|
268
|
-
this.category.children[category.f_material_name].options.push({
|
|
269
|
-
label: type.f_material_name,
|
|
270
|
-
value: type.f_material_name
|
|
271
|
-
})
|
|
272
|
-
this.category.children[category.f_material_name].children[type.f_material_name] = type
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
})
|
|
171
|
+
data() {
|
|
172
|
+
return {
|
|
173
|
+
isDetermine:false,
|
|
174
|
+
paytype: [{label: "现金缴费", value: "现金缴费"}, {label: "建行支付", value: "建行支付"}],
|
|
175
|
+
chargesize: [{label: "三通费", value: "三通费"}, {label: "报警器", value: "报警器"}, {label: "材料费", value: "材料费"}, {label: "其他费用", value: "其他费用"}],
|
|
176
|
+
shuclass: 'col-xs-12 col-sm-12 col-md-12 form-input-group mg8 css_div',
|
|
177
|
+
originalOptions: [], // 用于保存原始数据
|
|
178
|
+
category: {
|
|
179
|
+
typeoptions: [],
|
|
180
|
+
options: [],
|
|
181
|
+
children: {}
|
|
277
182
|
},
|
|
278
|
-
|
|
279
|
-
|
|
183
|
+
model: {
|
|
184
|
+
f_unitprice: 0,
|
|
185
|
+
f_number: 0,
|
|
186
|
+
f_collection: 0,//付款额
|
|
187
|
+
f_brand_spec: '',// 类型
|
|
188
|
+
f_typename: '',// 品名
|
|
189
|
+
f_typenumber: '',// 型号
|
|
190
|
+
f_comments: '',
|
|
191
|
+
f_payment: '建行支付',
|
|
192
|
+
otherdetail: [{
|
|
280
193
|
f_brand_spec: '',
|
|
281
194
|
f_typename: '',
|
|
282
195
|
f_typenumber: '',
|
|
283
196
|
f_unitprice: '',
|
|
284
|
-
f_number: '
|
|
285
|
-
}
|
|
286
|
-
console.log(JSON.stringify(this.model.otherdetail))
|
|
197
|
+
f_number: ''
|
|
198
|
+
}]
|
|
287
199
|
},
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
this.model.otherdetail.splice(index, 1)
|
|
291
|
-
this.getcollection()
|
|
292
|
-
}
|
|
200
|
+
config:{
|
|
201
|
+
printType:'普通收据'
|
|
293
202
|
},
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
203
|
+
filiale: '', // 支付的分公司
|
|
204
|
+
othercharge_id: ''
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
ready() {
|
|
209
|
+
//tag
|
|
210
|
+
this.paytype = this.$appdata.getParam('支付方式')
|
|
211
|
+
this.chargesize = this.$appdata.getParam('其他收费类型')
|
|
212
|
+
if(Vue.config.mobileReadMeter){
|
|
213
|
+
if(Vue.config.mobileReadMeter.EticketJson && Vue.config.mobileReadMeter.EticketJson.printType){
|
|
214
|
+
this.config.printType=Vue.config.mobileReadMeter.EticketJson.printType
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
this.loadOptions()
|
|
218
|
+
},
|
|
219
|
+
methods: {
|
|
220
|
+
loadOptions () {
|
|
221
|
+
const data = {
|
|
222
|
+
tablename: 't_material_management',
|
|
223
|
+
condition: `1=1 and f_orgid='${Vue.user.orgid}'`
|
|
224
|
+
}
|
|
225
|
+
this.$resetpost(this.$androidUtil.getProxyUrl() + '/af-telephone/rs/sql/tel_singleTable', {data}, {
|
|
226
|
+
resolveMsg: null,
|
|
227
|
+
rejectMsg: '获取数据失败'
|
|
228
|
+
}).then((res) => {
|
|
229
|
+
const categories = []
|
|
230
|
+
const types = []
|
|
231
|
+
for (let material of res.data) {
|
|
232
|
+
if (material.f_material_stype == '分类') {
|
|
233
|
+
categories.push(material)
|
|
234
|
+
} else if (material.f_material_stype == '型号') {
|
|
235
|
+
types.push(material)
|
|
305
236
|
}
|
|
306
|
-
})
|
|
307
|
-
if (money != 0) {
|
|
308
|
-
console.log(money)
|
|
309
|
-
this.model.f_collection = money.toFixed(2)
|
|
310
237
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
this.model.otherdetail[val].f_unitprice = this.category.children[materialName].children[typeNumber].f_material_price;
|
|
322
|
-
}
|
|
238
|
+
this.category.typeoptions = []
|
|
239
|
+
const seen = new Set(); // 用于记录已出现的 f_material_type
|
|
240
|
+
for (let category of categories) {
|
|
241
|
+
const type = category.f_material_type;
|
|
242
|
+
if (!seen.has(type)) {
|
|
243
|
+
seen.add(type);
|
|
244
|
+
this.category.typeoptions.push({
|
|
245
|
+
label: type,
|
|
246
|
+
value: type
|
|
247
|
+
});
|
|
323
248
|
}
|
|
324
249
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
250
|
+
this.originalOptions = []
|
|
251
|
+
for (let category of categories) {
|
|
252
|
+
this.originalOptions.push({
|
|
253
|
+
key: category.f_material_type,
|
|
254
|
+
label: category.f_material_name,
|
|
255
|
+
value: category.f_material_name
|
|
256
|
+
})
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
this.category.children = {}
|
|
260
|
+
for (let category of categories) {
|
|
261
|
+
this.category.children[category.f_material_name] = {
|
|
262
|
+
options: [],
|
|
263
|
+
children: {}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
for (let type of types) {
|
|
267
|
+
if (type.parent_id == category.id) {
|
|
268
|
+
this.category.children[category.f_material_name].options.push({
|
|
269
|
+
label: type.f_material_name,
|
|
270
|
+
value: type.f_material_name
|
|
340
271
|
})
|
|
272
|
+
this.category.children[category.f_material_name].children[type.f_material_name] = type
|
|
341
273
|
}
|
|
342
274
|
}
|
|
343
275
|
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
276
|
+
})
|
|
277
|
+
},
|
|
278
|
+
addChargeDetail () {
|
|
279
|
+
this.$set(`model.otherdetail[${this.model.otherdetail.length}]`, {
|
|
280
|
+
f_brand_spec: '',
|
|
281
|
+
f_typename: '',
|
|
282
|
+
f_typenumber: '',
|
|
283
|
+
f_unitprice: '',
|
|
284
|
+
f_number: '1'
|
|
285
|
+
})
|
|
286
|
+
console.log(JSON.stringify(this.model.otherdetail))
|
|
287
|
+
},
|
|
288
|
+
deleteChargeDetail (index) {
|
|
289
|
+
if (this.model.otherdetail.length > 1) {
|
|
290
|
+
this.model.otherdetail.splice(index, 1)
|
|
291
|
+
this.getcollection()
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
getcollection () {
|
|
295
|
+
let money = 0
|
|
296
|
+
let flag = true
|
|
297
|
+
this.model.otherdetail.forEach((item) => {
|
|
298
|
+
if (!item.f_number || item.f_number == '0') flag = false
|
|
299
|
+
if (!item.f_unitprice || item.f_unitprice == '0') flag = false
|
|
300
|
+
if (item.f_unitprice && item.f_number) {
|
|
301
|
+
money += ((item.f_unitprice - 0) * (item.f_number - 0)) - 0
|
|
302
|
+
} else {
|
|
303
|
+
flag = false
|
|
304
|
+
this.model.f_collection = 0
|
|
305
|
+
}
|
|
306
|
+
})
|
|
307
|
+
if (money != 0) {
|
|
308
|
+
console.log(money)
|
|
309
|
+
this.model.f_collection = money.toFixed(2)
|
|
310
|
+
}
|
|
311
|
+
if (!flag) this.model.f_collection = ''
|
|
312
|
+
},
|
|
313
|
+
setTypeprice (val) {
|
|
314
|
+
console.log('单价变化:', val)
|
|
315
|
+
if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber) {
|
|
316
|
+
if(this.model.otherdetail[val].f_typename){
|
|
317
|
+
const materialName = this.model.otherdetail[val].f_typename;
|
|
318
|
+
const typeNumber = this.model.otherdetail[val].f_typenumber;
|
|
319
|
+
if(this.category.children[materialName] &&
|
|
320
|
+
this.category.children[materialName].children[typeNumber]) {
|
|
321
|
+
this.model.otherdetail[val].f_unitprice = this.category.children[materialName].children[typeNumber].f_material_price;
|
|
362
322
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
setTypenumber (val, index) {
|
|
327
|
+
this.model.otherdetail[index].f_typenumber = undefined
|
|
328
|
+
this.model.otherdetail[index].f_unitprice = ''
|
|
329
|
+
},
|
|
330
|
+
materialChange (typename) {
|
|
331
|
+
this.category.options=[]
|
|
332
|
+
if(!typename || typename === ''){
|
|
333
|
+
this.category.options=[]
|
|
334
|
+
}else{
|
|
335
|
+
for (let i = 0; i < this.originalOptions.length; i++) {
|
|
336
|
+
if (this.originalOptions[i].key === typename) {
|
|
337
|
+
this.category.options.push({
|
|
338
|
+
label: this.originalOptions[i].label,
|
|
339
|
+
value: this.originalOptions[i].value
|
|
340
|
+
})
|
|
366
341
|
}
|
|
367
342
|
}
|
|
368
|
-
|
|
369
|
-
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
async setTypename (val, index) {
|
|
346
|
+
console.log('111', val)
|
|
347
|
+
this.model.otherdetail[index].f_typenumber = ''
|
|
348
|
+
this.materialChange(val.f_brand_spec)
|
|
349
|
+
this.model.otherdetail[index].f_unitprice = ''
|
|
350
|
+
},
|
|
351
|
+
myverify () {
|
|
352
|
+
let flag = false
|
|
353
|
+
for(let i = 0; i < this.model.otherdetail.length; i++) {
|
|
354
|
+
console.log('===========>', this.model.otherdetail[i])
|
|
355
|
+
if (!this.model.otherdetail[i].f_brand_spec || this.model.otherdetail[i].f_brand_spec == '') {
|
|
356
|
+
this.$showMessage(`类型${i + 1}请选择收费类型`)
|
|
357
|
+
return flag
|
|
358
|
+
}
|
|
359
|
+
if (!this.model.otherdetail[i].f_unitprice || this.model.otherdetail[i].f_unitprice <= 0) {
|
|
360
|
+
this.$showMessage(`类型${i + 1}单价异常!`)
|
|
370
361
|
return flag
|
|
371
362
|
}
|
|
372
|
-
if (!this.model.
|
|
373
|
-
this.$showMessage(
|
|
363
|
+
if (!this.model.otherdetail[i].f_number || this.model.otherdetail[i].f_number <= 0) {
|
|
364
|
+
this.$showMessage(`类型${i + 1}数量异常!`)
|
|
374
365
|
return flag
|
|
375
366
|
}
|
|
376
|
-
|
|
367
|
+
}
|
|
368
|
+
if (!this.model.f_collection || this.model.f_collection <= 0) {
|
|
369
|
+
this.$showMessage('收款异常!')
|
|
377
370
|
return flag
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
this.
|
|
371
|
+
}
|
|
372
|
+
if (!this.model.f_payment || this.model.f_payment == '') {
|
|
373
|
+
this.$showMessage('请选择收费类型!')
|
|
374
|
+
return flag
|
|
375
|
+
}
|
|
376
|
+
flag = true
|
|
377
|
+
return flag
|
|
378
|
+
},
|
|
379
|
+
f_collection() {
|
|
380
|
+
//tag;
|
|
381
|
+
//tag;
|
|
382
|
+
return this.model.f_collection = this.model.f_number * this.model.f_unitprice;
|
|
383
|
+
},
|
|
384
|
+
async confirm() {
|
|
385
|
+
//tag
|
|
386
|
+
if (this.myverify()) {
|
|
387
|
+
this.$showMessage(`确定对客户${this.row.f_user_name}进行其他收费吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
388
|
+
if (res === 'confirm') {
|
|
389
|
+
if (this.model.f_payment == '建行支付') {
|
|
390
|
+
this.isDetermine = true
|
|
391
|
+
// 去支付界面
|
|
392
|
+
let _this = this
|
|
393
|
+
let pardate = {
|
|
394
|
+
_this: _this,
|
|
395
|
+
title: '二维码收款',
|
|
396
|
+
safe: true
|
|
397
|
+
}
|
|
398
|
+
_this.$dispatch('gotoson', pardate)
|
|
399
|
+
//tag
|
|
400
|
+
let parameter = {
|
|
401
|
+
money: this.model.f_collection
|
|
402
|
+
}
|
|
403
|
+
//tag)
|
|
404
|
+
_this.$goto('create_qrcode', {row: parameter}, 'self', _this.payback)
|
|
405
|
+
} else {
|
|
406
|
+
this.isDetermine = true
|
|
407
|
+
//tag
|
|
408
|
+
this.saveCharges()
|
|
409
409
|
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
})
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
415
|
+
},
|
|
416
|
+
payback(msg) {
|
|
417
|
+
//tag
|
|
418
|
+
//tag
|
|
419
|
+
if (msg) {
|
|
418
420
|
//tag
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
this.saveCharges()
|
|
423
|
-
}else {
|
|
424
|
-
//tag
|
|
425
|
-
this.$showMessage('支付失败!')
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
saveCharges () {
|
|
421
|
+
this.model.f_serial_id = msg
|
|
422
|
+
this.saveCharges()
|
|
423
|
+
}else {
|
|
429
424
|
//tag
|
|
425
|
+
this.$showMessage('支付失败!')
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
saveCharges () {
|
|
429
|
+
//tag
|
|
430
|
+
//tag
|
|
431
|
+
let data = {
|
|
432
|
+
f_userfiles_id: this.row.f_userfiles_id, // id
|
|
433
|
+
f_user_id: this.row.f_user_id,
|
|
434
|
+
f_userinfo_id: this.row.f_userinfo_id,
|
|
435
|
+
f_collection: this.model.f_collection,
|
|
436
|
+
f_comments: this.model.f_comments,
|
|
437
|
+
f_payment: this.model.f_payment,
|
|
438
|
+
f_user_name: this.row.f_user_name,
|
|
439
|
+
f_depname: Vue.user.deps,
|
|
440
|
+
f_depid : Vue.user.depids,
|
|
441
|
+
f_orgid : Vue.user.orgid,
|
|
442
|
+
f_orgname : Vue.user.orgs,
|
|
443
|
+
f_operator: Vue.user.name,
|
|
444
|
+
f_operatorid: Vue.user.id,
|
|
445
|
+
otherdetail: this.model.otherdetail
|
|
446
|
+
}
|
|
447
|
+
//tag)
|
|
448
|
+
let http4 = new HttpResetClass()
|
|
449
|
+
// http4.load('POST',`/af-telephone/rs/logic/wxthirdothercharge`, data, {}
|
|
450
|
+
http4.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/wxthirdothercharge`, data, {}
|
|
451
|
+
).then(res => {
|
|
430
452
|
//tag
|
|
431
|
-
let data = {
|
|
432
|
-
f_userfiles_id: this.row.f_userfiles_id, // id
|
|
433
|
-
f_user_id: this.row.f_user_id,
|
|
434
|
-
f_userinfo_id: this.row.f_userinfo_id,
|
|
435
|
-
f_collection: this.model.f_collection,
|
|
436
|
-
f_comments: this.model.f_comments,
|
|
437
|
-
f_payment: this.model.f_payment,
|
|
438
|
-
f_user_name: this.row.f_user_name,
|
|
439
|
-
f_depname: Vue.user.deps,
|
|
440
|
-
f_depid : Vue.user.depids,
|
|
441
|
-
f_orgid : Vue.user.orgid,
|
|
442
|
-
f_orgname : Vue.user.orgs,
|
|
443
|
-
f_operator: Vue.user.name,
|
|
444
|
-
f_operatorid: Vue.user.id,
|
|
445
|
-
otherdetail: this.model.otherdetail
|
|
446
|
-
}
|
|
447
453
|
//tag)
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
},
|
|
468
|
-
f_invoice_type:0
|
|
469
|
-
},{aoteEncrypt:'无',encryKey:'无'}).then((res) => {
|
|
470
|
-
this.$showMessage('电子票开具成功,请联系用户使用微信公众号查看发票', ['confirm']).then((res) => {
|
|
471
|
-
console.log("===res,开票失败",res)
|
|
472
|
-
this.$dispatch('confirm')
|
|
473
|
-
})
|
|
474
|
-
}).catch(e=>{
|
|
475
|
-
this.$showMessage('缴费成功,电子票开具失败,请联系用户使用微信公众号尝试开票,或者前往营业厅!', ['confirm']).then((res) => {
|
|
476
|
-
console.log("===e,开票失败",e)
|
|
477
|
-
this.$dispatch('confirm')
|
|
478
|
-
})
|
|
454
|
+
this.othercharge_id = res
|
|
455
|
+
if (res) {
|
|
456
|
+
if (this.config.printType === '电子发票' && this.model.isOpen === '是') {
|
|
457
|
+
this.$resetpost(`${this.$androidUtil.getProxyUrl()}/invoice/rs/logic/getInvoice`, {
|
|
458
|
+
id:res.data.othercharge_id,
|
|
459
|
+
f_charge_type:'其他收费',
|
|
460
|
+
loginInfo: {
|
|
461
|
+
operator:Vue.user.name,
|
|
462
|
+
operator_id: Vue.user.id,
|
|
463
|
+
org_id: Vue.user.orgid,
|
|
464
|
+
orgname: Vue.user.orgs,
|
|
465
|
+
dep_id: Vue.user.depids,
|
|
466
|
+
depname: Vue.user.deps
|
|
467
|
+
},
|
|
468
|
+
f_invoice_type:0
|
|
469
|
+
},{aoteEncrypt:'无',encryKey:'无'}).then((res) => {
|
|
470
|
+
this.$showMessage('电子票开具成功,请联系用户使用微信公众号查看发票', ['confirm']).then((res) => {
|
|
471
|
+
console.log("===res,开票失败",res)
|
|
472
|
+
this.$dispatch('confirm')
|
|
479
473
|
})
|
|
480
|
-
}
|
|
481
|
-
this.$showMessage('
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}else {
|
|
485
|
-
this.$dispatch('confirm')
|
|
486
|
-
// //tag
|
|
487
|
-
// this.$back(this.othercharge_id)
|
|
488
|
-
}
|
|
474
|
+
}).catch(e=>{
|
|
475
|
+
this.$showMessage('缴费成功,电子票开具失败,请联系用户使用微信公众号尝试开票,或者前往营业厅!', ['confirm']).then((res) => {
|
|
476
|
+
console.log("===e,开票失败",e)
|
|
477
|
+
this.$dispatch('confirm')
|
|
489
478
|
})
|
|
490
|
-
}
|
|
479
|
+
})
|
|
491
480
|
}else {
|
|
492
|
-
this.$showMessage('
|
|
493
|
-
|
|
481
|
+
this.$showMessage('购气缴费成功!是否打印小票?', ['confirm', 'cancel']).then((res) => {
|
|
482
|
+
if (res === 'confirm') {
|
|
483
|
+
this.PrintReceipt()
|
|
484
|
+
}else {
|
|
485
|
+
this.$dispatch('confirm')
|
|
486
|
+
// //tag
|
|
487
|
+
// this.$back(this.othercharge_id)
|
|
488
|
+
}
|
|
489
|
+
})
|
|
494
490
|
}
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
//tag
|
|
499
|
-
// 清空打印内容
|
|
500
|
-
let printContent = []
|
|
501
|
-
// 抬头
|
|
502
|
-
var comName = '梅河口天然气'
|
|
503
|
-
printContent.push({type: 3, text: comName, fontsize: 3, isbold: true, align: 'center'})
|
|
504
|
-
printContent.push({type: 3, text: '手 持 POS 其 他 收 费 凭 证', fontsize: 3, isbold: true, align: 'center'})
|
|
505
|
-
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
506
|
-
// 小票信息
|
|
507
|
-
printContent.push({type: 3, text: '用户编号:' + this.row.f_userinfo_code, fontsize: 2, isbold: true, align: 'left'})
|
|
508
|
-
// 卡表用户显示卡号
|
|
509
|
-
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表') {
|
|
510
|
-
printContent.push({type: 3, text: '用户卡号:' + this.row.f_card_id, fontsize: 2, isbold: true, align: 'left'})
|
|
491
|
+
}else {
|
|
492
|
+
this.$showMessage('购气缴费失败!!!')
|
|
493
|
+
// 是否进行退费
|
|
511
494
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
495
|
+
})
|
|
496
|
+
},
|
|
497
|
+
PrintReceipt() {
|
|
498
|
+
//tag
|
|
499
|
+
// 清空打印内容
|
|
500
|
+
let printContent = []
|
|
501
|
+
// 抬头
|
|
502
|
+
var comName = '梅河口天然气'
|
|
503
|
+
printContent.push({type: 3, text: comName, fontsize: 3, isbold: true, align: 'center'})
|
|
504
|
+
printContent.push({type: 3, text: '手 持 POS 其 他 收 费 凭 证', fontsize: 3, isbold: true, align: 'center'})
|
|
505
|
+
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
506
|
+
// 小票信息
|
|
507
|
+
printContent.push({type: 3, text: '用户编号:' + this.row.f_userinfo_code, fontsize: 2, isbold: true, align: 'left'})
|
|
508
|
+
// 卡表用户显示卡号
|
|
509
|
+
if (this.row.f_meter_type !== '机表' && this.row.f_meter_type !== '物联网表') {
|
|
510
|
+
printContent.push({type: 3, text: '用户卡号:' + this.row.f_card_id, fontsize: 2, isbold: true, align: 'left'})
|
|
511
|
+
}
|
|
512
|
+
printContent.push({type: 3, text: '用户姓名:' + this.row.f_user_name, fontsize: 2, isbold: true, align: 'left'})
|
|
513
|
+
printContent.push({type: 3, text: '用户地址:' + this.row.f_address, fontsize: 2, isbold: true, align: 'left'})
|
|
514
|
+
// 机表物联网表显示购买金额
|
|
515
|
+
printContent.push({type: 3, text: '收费类型:'+ this.model.f_brand_spec , fontsize: 2, isbold: true, align: 'left'})
|
|
516
|
+
printContent.push({type: 3, text: '本次缴费:' + this.model.f_collection + '元', fontsize: 2, isbold: true, align: 'left'})
|
|
517
|
+
printContent.push({type: 3, text: '大写金额:' + Vue.PosUtil.convertCurrency(this.model.f_collection), fontsize: 2, isbold: true, align: 'left'})
|
|
518
|
+
printContent.push({type: 3, text: '支付日期:' + Vue.PosUtil.getNowDate('yyyy-MM-dd'), fontsize: 2, isbold: true, align: 'left'})
|
|
519
|
+
printContent.push({type: 3, text: '支付流水号:' + this.model.f_serial_id, fontsize: 2, isbold: true, align: 'left'})
|
|
520
|
+
printContent.push({type: 3, text: '----------------------------', fontsize: 3, isbold: true, align: 'center'})
|
|
521
|
+
printContent.push({type: 3, text: '', fontsize: 3, isbold: true, align: 'center'})
|
|
522
|
+
// 走纸
|
|
523
|
+
printContent.push({type: 4, value: 5, unit: 'pixel'})
|
|
524
|
+
// 打印
|
|
525
|
+
let print = HostApp.print(JSON.stringify(printContent))
|
|
526
|
+
if (print.code === 200) {
|
|
527
|
+
this.$showMessage('打印成功!是否返回上一层?', ['confirm', 'cancel']).then((res) => {
|
|
528
|
+
if (res === 'confirm') {
|
|
529
|
+
//tag
|
|
530
|
+
this.$dispatch('confirm')
|
|
531
|
+
// //tag
|
|
532
|
+
// this.$back(this.othercharge_id)
|
|
533
|
+
}
|
|
534
|
+
})
|
|
535
|
+
|
|
536
|
+
}else {
|
|
537
|
+
this.$showMessage('打印失败!请检查POS纸张、电量等,确认无误点击确认再次打印', ['confirm', 'cancel']).then((res) => {
|
|
538
|
+
if (res === 'confirm') {
|
|
539
|
+
//tag
|
|
540
|
+
let print2 = HostApp.print(JSON.stringify(printContent))
|
|
541
|
+
if (print2.code === 200) {
|
|
542
|
+
this.$showMessage('打印成功!')
|
|
530
543
|
this.$dispatch('confirm')
|
|
531
544
|
// //tag
|
|
532
545
|
// this.$back(this.othercharge_id)
|
|
546
|
+
}else {
|
|
547
|
+
this.$showMessage('打印失败!')
|
|
533
548
|
}
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
this.$showMessage('打印失败!请检查POS纸张、电量等,确认无误点击确认再次打印', ['confirm', 'cancel']).then((res) => {
|
|
538
|
-
if (res === 'confirm') {
|
|
539
|
-
//tag
|
|
540
|
-
let print2 = HostApp.print(JSON.stringify(printContent))
|
|
541
|
-
if (print2.code === 200) {
|
|
542
|
-
this.$showMessage('打印成功!')
|
|
543
|
-
this.$dispatch('confirm')
|
|
544
|
-
// //tag
|
|
545
|
-
// this.$back(this.othercharge_id)
|
|
546
|
-
}else {
|
|
547
|
-
this.$showMessage('打印失败!')
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
})
|
|
551
|
-
}
|
|
552
|
-
},
|
|
553
|
-
clean() {
|
|
554
|
-
//tag
|
|
555
|
-
this.model.f_brand_spec = '请选择';
|
|
556
|
-
this.model.f_payment = '微信支付';
|
|
557
|
-
this.model.f_number = '';
|
|
558
|
-
this.model.f_unitprice = '';
|
|
559
|
-
this.model.f_collection = '';
|
|
560
|
-
this.model.f_comments = '';
|
|
561
|
-
},
|
|
549
|
+
}
|
|
550
|
+
})
|
|
551
|
+
}
|
|
562
552
|
},
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
553
|
+
clean() {
|
|
554
|
+
//tag
|
|
555
|
+
this.model.f_brand_spec = '请选择';
|
|
556
|
+
this.model.f_payment = '微信支付';
|
|
557
|
+
this.model.f_number = '';
|
|
558
|
+
this.model.f_unitprice = '';
|
|
559
|
+
this.model.f_collection = '';
|
|
560
|
+
this.model.f_comments = '';
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
computed:{
|
|
564
|
+
specification (){
|
|
565
|
+
return this.$appdata.getParam(this.model.f_brand_spec)?this.$appdata.getParam(this.model.f_brand_spec):[]
|
|
566
|
+
},
|
|
567
|
+
modeltype (){
|
|
568
|
+
return this.$appdata.getParam(this.model.f_typename)?this.$appdata.getParam(this.model.f_typename):[]
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
watch: {
|
|
572
|
+
'model.f_number' (val) {
|
|
573
|
+
if (val) {
|
|
574
|
+
//tag;
|
|
575
|
+
//tag;
|
|
576
|
+
this.model.f_collection = this.model.f_number * this.model.f_unitprice;
|
|
569
577
|
}
|
|
570
578
|
},
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
this.model.f_collection = this.model.f_number * this.model.f_unitprice;
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
'model.f_unitprice' (val) {
|
|
580
|
-
if (val) {
|
|
581
|
-
//tag;
|
|
582
|
-
//tag;
|
|
583
|
-
this.model.f_collection = this.model.f_number * this.model.f_unitprice;
|
|
584
|
-
}
|
|
579
|
+
'model.f_unitprice' (val) {
|
|
580
|
+
if (val) {
|
|
581
|
+
//tag;
|
|
582
|
+
//tag;
|
|
583
|
+
this.model.f_collection = this.model.f_number * this.model.f_unitprice;
|
|
585
584
|
}
|
|
586
585
|
}
|
|
587
586
|
}
|
|
587
|
+
}
|
|
588
588
|
|
|
589
589
|
</script>
|
|
590
590
|
|
|
591
591
|
<style scoped>
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
592
|
+
.app-row {
|
|
593
|
+
background-color: white;
|
|
594
|
+
padding: 10px 10px 0 10px;
|
|
595
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.7);
|
|
596
|
+
}
|
|
597
|
+
.search_input {
|
|
598
|
+
border: 0;
|
|
599
|
+
outline: none;
|
|
600
|
+
}
|
|
601
|
+
.font{
|
|
602
|
+
font: 15px PingFang-SC-Medium;
|
|
603
|
+
color: #666666;
|
|
604
|
+
}
|
|
605
|
+
.input-font{
|
|
606
|
+
font: 15px PingFang-SC-Medium;
|
|
607
|
+
color: #333333;
|
|
608
|
+
}
|
|
609
|
+
.btn-color{
|
|
610
|
+
background-color: #FFFFFF;
|
|
611
|
+
border-radius: 10px ;
|
|
612
|
+
border: 1px solid #499EDF;
|
|
613
|
+
}
|
|
614
|
+
.btn-font{
|
|
615
|
+
font:600 16px PingFang-SC-Bold;
|
|
616
|
+
color: #499EDF;
|
|
617
|
+
}
|
|
618
618
|
</style>
|
|
619
619
|
|