sale-client 3.6.125 → 3.6.127
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/build/dev-server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var path = require('path')
|
|
2
|
-
const [serverRul, localUrl ] = ['http://192.168.50.4:8400/', 'http://
|
|
2
|
+
const [serverRul, localUrl ] = ['http://192.168.50.4:8400/', 'http://192.168.50.4:8400/']
|
|
3
3
|
var merge = require('webpack-merge')
|
|
4
4
|
var baseConfig = require('./webpack.dev.conf')
|
|
5
5
|
var devConfig = {
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
<label for="f_pregas" class=" font_normal_body">预购气量</label>
|
|
25
25
|
<input class="input_search" style="width:60%" type="number" id="pregasFocue"
|
|
26
26
|
@blur="pregas()" v-model="model.f_pregas"
|
|
27
|
+
:disabled="config.calculatePreByCollection"
|
|
27
28
|
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
28
29
|
v-next-el='sk' >
|
|
29
30
|
</div>
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
<label for="f_preamount" class=" font_normal_body">预购金额</label>
|
|
38
39
|
<input class="input_search" style="width:60%" @blur="preamount()" type="number" v-model="model.f_preamount"
|
|
39
40
|
v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ] }'
|
|
41
|
+
:disabled="config.calculatePreByCollection"
|
|
40
42
|
v-scale="[model.f_preamount, row.f_fee_decimal||4]" placeholder="预购金额" >
|
|
41
43
|
</div>
|
|
42
44
|
</div>
|
|
@@ -107,7 +109,8 @@
|
|
|
107
109
|
<div class="col-sm-3 form-group">
|
|
108
110
|
<label for="f_collection" class=" font_normal_body"> 收款 </label>
|
|
109
111
|
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
110
|
-
|
|
112
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
113
|
+
v-el:sk v-scale="[model.f_collection, row.f_fee_decimal||4]" :disabled="!config.calculatePreByCollection">
|
|
111
114
|
</div>
|
|
112
115
|
<div class="col-sm-1 form-group">
|
|
113
116
|
<give-change :curbalance="curbalance" :collection.sync="model.f_collection" v-ref:givechange></give-change>
|
|
@@ -474,7 +477,8 @@
|
|
|
474
477
|
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
475
478
|
payment: '',
|
|
476
479
|
hasArrearsChange: false, // 是否可以有欠费换表 收费时用来判断是否查询旧表欠费
|
|
477
|
-
overdraftBalance: false // 是否支持系统余额透支
|
|
480
|
+
overdraftBalance: false, // 是否支持系统余额透支
|
|
481
|
+
calculatePreByCollection: false // 可以更具收款来反向计算预购
|
|
478
482
|
},
|
|
479
483
|
model: {
|
|
480
484
|
f_purchase: 0,
|
|
@@ -612,6 +616,31 @@
|
|
|
612
616
|
}
|
|
613
617
|
},
|
|
614
618
|
methods: {
|
|
619
|
+
// 根据收款金额计算划价信息
|
|
620
|
+
// 需要配置 calculatePreByCollection = true
|
|
621
|
+
async calculatePreByCollection () {
|
|
622
|
+
if (this.alldue_fee > this.model.f_collection) {
|
|
623
|
+
this.$showAlert('收款不能小于旧表机表欠费,请重新输入', 'danger', 5000)
|
|
624
|
+
this.model.f_collection = undefined
|
|
625
|
+
return
|
|
626
|
+
}
|
|
627
|
+
try {
|
|
628
|
+
this.model.f_collection = (this.model.f_collection - 0)
|
|
629
|
+
let calFee = ((this.model.f_collection - 0) + (this.row.f_balance) - (this.alldue_fee)).toFixed(4)
|
|
630
|
+
// 通过收款进行划价
|
|
631
|
+
let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
|
|
632
|
+
this.model.f_pregas = parseInt(getGas.data.gas)
|
|
633
|
+
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
634
|
+
this.model.chargeprice = dymoney2.data.chargeprice
|
|
635
|
+
Object.assign(this.model, this.model, dymoney2.data)
|
|
636
|
+
this.model.f_totalcost = dymoney2.data.chargenum
|
|
637
|
+
this.model.f_preamount = dymoney2.data.chargenum
|
|
638
|
+
this.calText(dymoney2.data.chargeprice)
|
|
639
|
+
} catch (error) {
|
|
640
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
641
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
642
|
+
}
|
|
643
|
+
},
|
|
615
644
|
getRandomId () {
|
|
616
645
|
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
617
646
|
let res = Math.random() * 16 | 0
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
130
130
|
config: {
|
|
131
131
|
showupload: true, // 显示上传
|
|
132
132
|
hasPrint: true, // 默认打票
|
|
133
|
-
postAsync: false, // 是否异步请求
|
|
133
|
+
postAsync: false, // 是否异步请求 存完主记录再存明细
|
|
134
134
|
hasBillManage: false, // 默认不启用发票管理
|
|
135
135
|
hasfindaReail: true, // 默认开启找零功能
|
|
136
136
|
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
@@ -284,50 +284,61 @@ export default {
|
|
|
284
284
|
if (this.civill) {
|
|
285
285
|
param = Object.assign(this.civill, param)
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
287
|
+
let batchId = ''
|
|
288
|
+
// 如果配置了异步请求
|
|
289
|
+
if (this.config.postAsync) {
|
|
290
|
+
// 插入主收费记录
|
|
291
|
+
let batch = await this.$resetpost('rs/logic/asyncbatchPaymentSellinggas', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
|
|
292
|
+
batchId = param.f_batch_id = batch.data.f_batch_id
|
|
293
|
+
// 处理记录明细抄表明细
|
|
294
|
+
await this.$resetpost('rs/logic/async/asyncbatchPaymentFiles', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
|
|
295
|
+
} else {
|
|
296
|
+
try {
|
|
297
|
+
await this.$resetpost('rs/logic/batchPayment', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
|
|
298
|
+
} catch (e) {}
|
|
299
|
+
// this.$showMessage(`正在批量处理中, 请耐心等待...`, [])
|
|
300
|
+
this.show = true
|
|
301
|
+
// 启动定时器定时查询处理结果
|
|
302
|
+
this.timer = setInterval(async () => {
|
|
303
|
+
let res = await this.HttpReset.load('POST', 'rs/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
|
|
304
|
+
if (res.data.percent) {
|
|
305
|
+
this.percent = res.data.percent
|
|
305
306
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
this.row.f_bill_type = '物联网收费'
|
|
314
|
-
this.row.f_bill_style = this.model.f_print[0]
|
|
315
|
-
this.print = true
|
|
316
|
-
} else {
|
|
317
|
-
this.data.id = res.data.id
|
|
318
|
-
this.print = true
|
|
319
|
-
}
|
|
320
|
-
} else if (this.config.printType === '国税发票') {
|
|
321
|
-
// TODO
|
|
322
|
-
} else if (this.model.f_print[0] === '电子发票') {
|
|
323
|
-
this.eticket_show = true
|
|
324
|
-
await this.$refs.eticketbill.openETicket([res.data.id], this.row, this.invoice_show_gas, this.invoice_is_pax, '物联网收费')
|
|
307
|
+
if (res.data.msg || res.data.error) {
|
|
308
|
+
this.show = false
|
|
309
|
+
clearInterval(this.timer)
|
|
310
|
+
this.$closeMessage()
|
|
311
|
+
if (res.data.error) {
|
|
312
|
+
this.$showAlert(`${res.data.error}`, 'danger')
|
|
313
|
+
return
|
|
325
314
|
}
|
|
315
|
+
await this.$showMessage(res.data.msg)
|
|
316
|
+
batchId = res.data.id
|
|
317
|
+
}
|
|
318
|
+
}, 1500)
|
|
319
|
+
}
|
|
320
|
+
if (this.config.hasPrint) {
|
|
321
|
+
if (this.data.f_print.indexOf('电子发票') == -1) {
|
|
322
|
+
console.log('this.config.hasBillManage', this.config.hasBillManage)
|
|
323
|
+
if (this.config.hasBillManage) {
|
|
324
|
+
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
325
|
+
this.row.id = batchId
|
|
326
|
+
this.row.f_bill_type = '物联网收费'
|
|
327
|
+
this.row.f_bill_style = this.model.f_print[0]
|
|
328
|
+
this.print = true
|
|
326
329
|
} else {
|
|
327
|
-
this.
|
|
330
|
+
this.data.id = batchId
|
|
331
|
+
this.print = true
|
|
328
332
|
}
|
|
333
|
+
} else if (this.config.printType === '国税发票') {
|
|
334
|
+
// TODO
|
|
335
|
+
} else if (this.model.f_print[0] === '电子发票') {
|
|
336
|
+
this.eticket_show = true
|
|
337
|
+
await this.$refs.eticketbill.openETicket([batchId], this.row, this.invoice_show_gas, this.invoice_is_pax, '物联网收费')
|
|
329
338
|
}
|
|
330
|
-
}
|
|
339
|
+
} else {
|
|
340
|
+
this.clean()
|
|
341
|
+
}
|
|
331
342
|
},
|
|
332
343
|
clean () {
|
|
333
344
|
this.$dispatch('success')
|