sale-client 4.2.174 → 4.2.175
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/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/5.2.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/package.json +1 -1
- package/src/components/charge/business/CardMeterCenter.vue +38 -4
- package/src/components/charge/business/NoCardMeterCenter.vue +169 -11
- package/src/components/charge/business/ShowCardSellGas.vue +40 -3
- package/src/plugins/CardService.js +8 -0
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -152,8 +152,8 @@
|
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
154
154
|
|
|
155
|
-
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
|
|
156
|
-
<div class="col-sm-4">
|
|
155
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')|| hasDisCount">
|
|
156
|
+
<div class="col-sm-4" v-if="!hasDisCount">
|
|
157
157
|
<label class="font_normal_body">优惠方式</label>
|
|
158
158
|
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
159
159
|
placeholder='请选择'
|
|
@@ -466,6 +466,7 @@
|
|
|
466
466
|
}
|
|
467
467
|
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {
|
|
468
468
|
resolveMsg: null,
|
|
469
|
+
newly: true,
|
|
469
470
|
rejectMsg: '获取限购值失败!!'
|
|
470
471
|
})
|
|
471
472
|
console.log('获取限购值', getLimit)
|
|
@@ -516,6 +517,18 @@
|
|
|
516
517
|
}
|
|
517
518
|
})
|
|
518
519
|
}
|
|
520
|
+
// 获取优惠信息
|
|
521
|
+
if (self.config.newDiscount) {
|
|
522
|
+
let getDiscount = await self.$resetpost('api/af-revenue/logic/getDiscountInfo', {data: nowrite_param}, {
|
|
523
|
+
resolveMsg: null,
|
|
524
|
+
newly: true,
|
|
525
|
+
rejectMsg: '获取优惠信息失败!!'
|
|
526
|
+
})
|
|
527
|
+
if (getDiscount.data.leftDiscount > 0) {
|
|
528
|
+
self.disCountInfo = getDiscount.data
|
|
529
|
+
self.hasDisCount = true
|
|
530
|
+
}
|
|
531
|
+
}
|
|
519
532
|
}
|
|
520
533
|
export default {
|
|
521
534
|
title: '卡表收费',
|
|
@@ -524,12 +537,15 @@
|
|
|
524
537
|
mjshow: false,
|
|
525
538
|
serialShow: false,
|
|
526
539
|
randomBusinessId: '',
|
|
540
|
+
hasDisCount: false,
|
|
541
|
+
disCountInfo: {},
|
|
527
542
|
resid: [], // 存放新增的f_files表中id
|
|
528
543
|
config: {
|
|
529
544
|
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
530
545
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
531
546
|
autoCollection: true, // 自动填写收款
|
|
532
547
|
quickSale: false,
|
|
548
|
+
newDiscount: false, // 新优惠
|
|
533
549
|
showupload: true, // 显示上传
|
|
534
550
|
hasPrint: true, // 默认打票
|
|
535
551
|
MinSellGas: 0,
|
|
@@ -561,6 +577,7 @@
|
|
|
561
577
|
f_banktransfer_person: '',
|
|
562
578
|
f_banktransfer_date: '',
|
|
563
579
|
f_privilege_id: 0,
|
|
580
|
+
f_privilege_gas: 0,
|
|
564
581
|
f_privilege_money: 0,
|
|
565
582
|
f_after_discount: 0,
|
|
566
583
|
getDeduct: 0
|
|
@@ -705,8 +722,8 @@
|
|
|
705
722
|
this.model.getDeduct = 0
|
|
706
723
|
if (this.row.f_project_money && this.row.f_project_money > 0) {
|
|
707
724
|
this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
|
|
708
|
-
this.model.f_totalcost = (this.model.f_totalcost - 0
|
|
709
|
-
this.model.f_collection = (this.model.f_collection - 0
|
|
725
|
+
this.model.f_totalcost = (this.model.f_totalcost - 0) + (this.model.getDeduct - 0)
|
|
726
|
+
this.model.f_collection = (this.model.f_collection - 0) + (this.model.getDeduct - 0)
|
|
710
727
|
}
|
|
711
728
|
this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
|
|
712
729
|
} catch (error) {
|
|
@@ -899,6 +916,23 @@
|
|
|
899
916
|
}
|
|
900
917
|
this.privilegeCalculate()
|
|
901
918
|
}
|
|
919
|
+
if (this.hasDisCount) {
|
|
920
|
+
this.calDisCount()
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
async calDisCount () {
|
|
924
|
+
// 初始化减免金额
|
|
925
|
+
this.model.f_privilege_money = 0
|
|
926
|
+
this.model.f_after_discount = this.model.f_collection
|
|
927
|
+
let param = this.disCountInfo
|
|
928
|
+
param.f_collection = this.model.f_collection
|
|
929
|
+
param.f_pregas = this.model.f_pregas
|
|
930
|
+
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculateDiscount', param, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
931
|
+
// 减免金额
|
|
932
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
933
|
+
this.model.f_privilege_gas = privilegeData.data.f_privilege_gas
|
|
934
|
+
// 减免后收款金额
|
|
935
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
902
936
|
},
|
|
903
937
|
// 优惠计算
|
|
904
938
|
async privilegeCalculate () {
|
|
@@ -128,6 +128,26 @@
|
|
|
128
128
|
<span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
131
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')|| hasDisCount">
|
|
132
|
+
<div class="col-sm-4" v-if="!hasDisCount">
|
|
133
|
+
<label class="font_normal_body">优惠方式</label>
|
|
134
|
+
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
135
|
+
placeholder='请选择'
|
|
136
|
+
:value.sync="model.f_privilege_id"
|
|
137
|
+
:options='privilegeList' clear-button value-single>
|
|
138
|
+
</v-select>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="col-sm-4">
|
|
141
|
+
<label for="f_preamount" class=" font_normal_body"> 优惠金额</label>
|
|
142
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_privilege_money"
|
|
143
|
+
v-scale="[model.f_privilege_money, row.f_fee_decimal||4]" placeholder="优惠金额" disabled>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="col-sm-4">
|
|
146
|
+
<label for="f_preamount" class=" font_normal_body"> 实际收款</label>
|
|
147
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_after_discount"
|
|
148
|
+
v-scale="[model.f_after_discount, row.f_fee_decimal||4]" placeholder="优惠后收款" disabled>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
131
151
|
<div class="row" v-if="model.f_payment[0].includes('POS')">
|
|
132
152
|
<div class="col-sm-4">
|
|
133
153
|
<label for="f_voucher_number" class="font_normal_body">凭证号</label>
|
|
@@ -159,18 +179,19 @@
|
|
|
159
179
|
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
160
180
|
</div>
|
|
161
181
|
</validator>
|
|
162
|
-
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.
|
|
182
|
+
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_after_discount"></payment-code>
|
|
163
183
|
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="无卡收费"></upload>
|
|
164
184
|
</div>
|
|
165
185
|
</div>
|
|
166
186
|
</template>
|
|
167
187
|
<script>
|
|
168
|
-
|
|
188
|
+
/**
|
|
169
189
|
*综合业务
|
|
170
190
|
*卡表收费组件
|
|
171
|
-
|
|
191
|
+
*/
|
|
192
|
+
import {HttpResetClass} from 'vue-client'
|
|
172
193
|
|
|
173
|
-
|
|
194
|
+
// 输入金额,换算气量
|
|
174
195
|
let preamountGen = async function (self) {
|
|
175
196
|
let dymoney = 0
|
|
176
197
|
let calFee = (self.model.f_totalcost - 0) + (self.row.f_balance - 0)
|
|
@@ -194,8 +215,8 @@
|
|
|
194
215
|
Object.assign(self.model, self.model, getGas.data)
|
|
195
216
|
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (dymoney - 0)).toFixed(4)
|
|
196
217
|
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
197
|
-
if(self.config.floor){
|
|
198
|
-
self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
218
|
+
if (self.config.floor) {
|
|
219
|
+
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
199
220
|
}
|
|
200
221
|
self.calText(getGas.data.chargeprice)
|
|
201
222
|
}
|
|
@@ -215,8 +236,8 @@
|
|
|
215
236
|
Object.assign(self.model, self.model, getAmount.data)
|
|
216
237
|
self.model.chargeprice = getAmount.data.chargeprice
|
|
217
238
|
self.model.f_collection = self.model.f_totalcost
|
|
218
|
-
if(self.config.floor){
|
|
219
|
-
self.model.f_collection=Math.ceil(self.model.f_collection)
|
|
239
|
+
if (self.config.floor) {
|
|
240
|
+
self.model.f_collection = Math.ceil(self.model.f_collection)
|
|
220
241
|
}
|
|
221
242
|
self.calText(getAmount.data.chargeprice)
|
|
222
243
|
}
|
|
@@ -294,7 +315,7 @@
|
|
|
294
315
|
f_user_id: self.row.f_user_id,
|
|
295
316
|
f_stairprice_id: self.row.f_stairprice_id
|
|
296
317
|
}
|
|
297
|
-
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
318
|
+
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, newly: true, rejectMsg: '获取限购值失败!!'})
|
|
298
319
|
console.log('获取限购值', getLimit)
|
|
299
320
|
self.hasLimit = getLimit.data.hasLimit
|
|
300
321
|
if (self.hasLimit) {
|
|
@@ -314,6 +335,21 @@
|
|
|
314
335
|
}
|
|
315
336
|
}
|
|
316
337
|
}
|
|
338
|
+
// 获取优惠信息
|
|
339
|
+
if (self.config.newDiscount) {
|
|
340
|
+
let nowrite_param = {
|
|
341
|
+
f_userfiles_id: self.row.f_userfiles_id
|
|
342
|
+
}
|
|
343
|
+
let getDiscount = await self.$resetpost('api/af-revenue/logic/getDiscountInfo', {data: nowrite_param}, {
|
|
344
|
+
resolveMsg: null,
|
|
345
|
+
newly: true,
|
|
346
|
+
rejectMsg: '获取优惠信息失败!!'
|
|
347
|
+
})
|
|
348
|
+
if (getDiscount.data.leftDiscount > 0) {
|
|
349
|
+
self.disCountInfo = getDiscount.data
|
|
350
|
+
self.hasDisCount = true
|
|
351
|
+
}
|
|
352
|
+
}
|
|
317
353
|
}
|
|
318
354
|
export default {
|
|
319
355
|
title: '无卡收费',
|
|
@@ -321,10 +357,13 @@
|
|
|
321
357
|
return {
|
|
322
358
|
serialShow: false,
|
|
323
359
|
resid: [], // 存放新增的f_files表中id
|
|
360
|
+
hasDisCount: false,
|
|
361
|
+
disCountInfo: {},
|
|
324
362
|
config: {
|
|
325
363
|
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
326
364
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
327
365
|
hasPrint: true, // 默认打票
|
|
366
|
+
newDiscount: false,
|
|
328
367
|
hasBillManage: false, // 默认不启用发票管理
|
|
329
368
|
floor: false, // 是否取整收费
|
|
330
369
|
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
@@ -340,6 +379,11 @@
|
|
|
340
379
|
f_preamount: 0,
|
|
341
380
|
f_totalcost: 0,
|
|
342
381
|
f_curbalance: 0,
|
|
382
|
+
f_privilege_id: 0,
|
|
383
|
+
f_privilege_gas: 0,
|
|
384
|
+
f_privilege_money: 0,
|
|
385
|
+
f_after_discount: 0,
|
|
386
|
+
getDeduct: 0,
|
|
343
387
|
f_collection: '',
|
|
344
388
|
f_balance: 0,
|
|
345
389
|
f_print: [],
|
|
@@ -363,7 +407,7 @@
|
|
|
363
407
|
// 下拉框值
|
|
364
408
|
paytype: this.$appdata.getParam('付款方式'),
|
|
365
409
|
printstyle: this.$appdata.getParam('打印格式'),
|
|
366
|
-
writecard: [{label: '写卡',value:'写卡'},{label: '不写卡',value:'不写卡'}],
|
|
410
|
+
writecard: [{label: '写卡', value: '写卡'}, {label: '不写卡', value: '不写卡'}],
|
|
367
411
|
mjshow: false
|
|
368
412
|
}
|
|
369
413
|
},
|
|
@@ -443,6 +487,86 @@
|
|
|
443
487
|
}
|
|
444
488
|
})
|
|
445
489
|
},
|
|
490
|
+
// 根据选择的付款方式 获取优惠列表
|
|
491
|
+
async getPrivilegeList () {
|
|
492
|
+
// 初始化下拉选择列表
|
|
493
|
+
this.privilegeList = [{label: '无优惠', value: '0'}]
|
|
494
|
+
// 初始为无优惠
|
|
495
|
+
this.model.f_privilege_id = '0'
|
|
496
|
+
if (this.model.f_payment && this.model.f_payment.length) {
|
|
497
|
+
// 查询条件
|
|
498
|
+
let payments = JSON.stringify(this.model.f_payment)
|
|
499
|
+
payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
|
|
500
|
+
let HttpReset = new HttpResetClass()
|
|
501
|
+
let privilege = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
|
|
502
|
+
data: {
|
|
503
|
+
items: 'id,f_privilege_name,f_privilege_type',
|
|
504
|
+
tablename: 't_privilege',
|
|
505
|
+
condition: `f_payment in ${payments} and f_gasproperties = '${this.row.f_gasproperties}' and f_user_type = '${this.row.f_user_type}' and f_perform_date <= GETDATE() and f_end_date >= GETDATE() and f_state = '有效'`,
|
|
506
|
+
orderitem: 'id'
|
|
507
|
+
}
|
|
508
|
+
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
509
|
+
// 查询结果放到下拉列表
|
|
510
|
+
for (let p of privilege.data) {
|
|
511
|
+
this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
|
|
512
|
+
}
|
|
513
|
+
this.privilegeCalculate()
|
|
514
|
+
}
|
|
515
|
+
if (this.hasDisCount) {
|
|
516
|
+
this.calDisCount()
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
async calDisCount () {
|
|
520
|
+
// 初始化减免金额
|
|
521
|
+
this.model.f_privilege_money = 0
|
|
522
|
+
this.model.f_after_discount = this.model.f_collection
|
|
523
|
+
let param = this.disCountInfo
|
|
524
|
+
param.f_collection = this.model.f_collection
|
|
525
|
+
param.f_pregas = this.model.f_pregas
|
|
526
|
+
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculateDiscount', param, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
527
|
+
// 减免金额
|
|
528
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
529
|
+
this.model.f_privilege_gas = privilegeData.data.f_privilege_gas
|
|
530
|
+
// 减免后收款金额
|
|
531
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
532
|
+
},
|
|
533
|
+
// 优惠计算
|
|
534
|
+
async privilegeCalculate () {
|
|
535
|
+
// 初始化减免金额
|
|
536
|
+
this.model.f_privilege_money = 0
|
|
537
|
+
this.model.f_after_discount = this.model.f_collection
|
|
538
|
+
// 判断是否是自定义优惠
|
|
539
|
+
if (parseInt(this.model.f_privilege_id)) {
|
|
540
|
+
for (let p of this.privilegeList) {
|
|
541
|
+
if (p.value == this.model.f_privilege_id && p.type == '自定义') {
|
|
542
|
+
this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
|
|
543
|
+
if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
|
|
544
|
+
this.$showMessage('金额输入格式不正确!')
|
|
545
|
+
this.model.f_privilege_money = 0
|
|
546
|
+
return
|
|
547
|
+
}
|
|
548
|
+
if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
|
|
549
|
+
this.$showMessage('减免金额不能大于等于收款金额')
|
|
550
|
+
this.model.f_privilege_money = 0
|
|
551
|
+
return
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
// 优惠方式, 收款 缺一不计算
|
|
557
|
+
if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
|
|
558
|
+
let c = {
|
|
559
|
+
f_privilege_id: this.model.f_privilege_id,
|
|
560
|
+
f_collection: this.model.f_collection,
|
|
561
|
+
f_privilege_money: this.model.f_privilege_money
|
|
562
|
+
}
|
|
563
|
+
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculatePrivilege', c, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
564
|
+
// 减免金额
|
|
565
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
566
|
+
// 减免后收款金额
|
|
567
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
568
|
+
}
|
|
569
|
+
},
|
|
446
570
|
clean () {
|
|
447
571
|
this.$info('取消操作')
|
|
448
572
|
this.$dispatch('refresh', this.row)
|
|
@@ -496,15 +620,49 @@
|
|
|
496
620
|
}
|
|
497
621
|
},
|
|
498
622
|
watch: {
|
|
623
|
+
'model.f_payment.length' (val) {
|
|
624
|
+
console.log('付款方式多选。。', val)
|
|
625
|
+
if (val > 1 && !this.model.f_preamount) {
|
|
626
|
+
this.model.f_payment = ['现金缴费']
|
|
627
|
+
this.$showAlert('请先计算付款金额', 'warning', 2000)
|
|
628
|
+
} else {
|
|
629
|
+
this.paymentModel = []
|
|
630
|
+
|
|
631
|
+
this.model.f_payment.forEach((res) => {
|
|
632
|
+
let temp = {
|
|
633
|
+
f_payment: res,
|
|
634
|
+
f_money: 0
|
|
635
|
+
}
|
|
636
|
+
this.paymentModel.push(temp)
|
|
637
|
+
})
|
|
638
|
+
this.$resetValidation()
|
|
639
|
+
|
|
640
|
+
// 获取计算优惠
|
|
641
|
+
this.getPrivilegeList()
|
|
642
|
+
}
|
|
643
|
+
},
|
|
499
644
|
'model.f_payment' (val) {
|
|
500
|
-
|
|
645
|
+
let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
|
|
646
|
+
if (val == '免交' || _payment.includes(val)) {
|
|
501
647
|
this.mjshow = true
|
|
502
648
|
} else {
|
|
503
649
|
this.mjshow = false
|
|
504
650
|
}
|
|
651
|
+
// if(this.row.f_collection_type == '按气量'){
|
|
652
|
+
// this.pregas();
|
|
653
|
+
// }else{
|
|
654
|
+
// this.preamount();
|
|
655
|
+
// }
|
|
656
|
+
},
|
|
657
|
+
'model.f_collection' (val) {
|
|
658
|
+
// 获取计算优惠
|
|
659
|
+
this.getPrivilegeList()
|
|
505
660
|
}
|
|
506
661
|
},
|
|
507
662
|
computed: {
|
|
663
|
+
authArr () {
|
|
664
|
+
return this.$login.r ? this.$login.r : []
|
|
665
|
+
},
|
|
508
666
|
'curbalance' () {
|
|
509
667
|
if (this.model.f_preamount) {
|
|
510
668
|
if (this.config.calculatePreByCollection) {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
v-ref:givechange></give-change>
|
|
110
110
|
</div>
|
|
111
111
|
</div>
|
|
112
|
-
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
|
|
112
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限') || hasDisCount">
|
|
113
113
|
<div class="col-sm-4 form-group">
|
|
114
114
|
<label class="font_normal_body">优惠方式</label>
|
|
115
115
|
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
@@ -318,7 +318,7 @@ let preamountGen = async function (self) {
|
|
|
318
318
|
}
|
|
319
319
|
self.model.f_preamount = (calFee - (self.dymoney - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
320
320
|
self.calText(getGas.data.chargeprice)
|
|
321
|
-
self.pricetext = getGas.data.chargeprice[0].pricetext ? getGas.data.chargeprice[0].pricetext:null
|
|
321
|
+
self.pricetext = getGas.data.chargeprice[0].pricetext ? getGas.data.chargeprice[0].pricetext : null
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
// 输入气量,换算金额
|
|
@@ -339,7 +339,7 @@ let pregasGen = async function (self) {
|
|
|
339
339
|
if (self.config.floor) {
|
|
340
340
|
self.model.f_collection = Math.ceil(self.model.f_collection)
|
|
341
341
|
}
|
|
342
|
-
self.pricetext = getAmount.data.chargeprice[0].pricetext?getAmount.data.chargeprice[0].pricetext:null
|
|
342
|
+
self.pricetext = getAmount.data.chargeprice[0].pricetext ? getAmount.data.chargeprice[0].pricetext : null
|
|
343
343
|
self.calText(getAmount.data.chargeprice)
|
|
344
344
|
}
|
|
345
345
|
}
|
|
@@ -447,6 +447,7 @@ let asyncShowCardSellGas = async function (self) {
|
|
|
447
447
|
let http = new HttpResetClass()
|
|
448
448
|
let getLimit = await http.load('POST', 'api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {
|
|
449
449
|
resolveMsg: null,
|
|
450
|
+
newly: true,
|
|
450
451
|
rejectMsg: '获取限购值失败!!'
|
|
451
452
|
})
|
|
452
453
|
console.log('获取限购值', getLimit)
|
|
@@ -472,6 +473,21 @@ let asyncShowCardSellGas = async function (self) {
|
|
|
472
473
|
}
|
|
473
474
|
}
|
|
474
475
|
}
|
|
476
|
+
// 获取优惠信息
|
|
477
|
+
if (self.config.newDiscount) {
|
|
478
|
+
let nowrite_param = {
|
|
479
|
+
f_userfiles_id: self.row.f_userfiles_id
|
|
480
|
+
}
|
|
481
|
+
let getDiscount = await self.$resetpost('api/af-revenue/logic/getDiscountInfo', {data: nowrite_param}, {
|
|
482
|
+
resolveMsg: null,
|
|
483
|
+
newly: true,
|
|
484
|
+
rejectMsg: '获取优惠信息失败!!'
|
|
485
|
+
})
|
|
486
|
+
if (getDiscount.data.leftDiscount > 0) {
|
|
487
|
+
self.disCountInfo = getDiscount.data
|
|
488
|
+
self.hasDisCount = true
|
|
489
|
+
}
|
|
490
|
+
}
|
|
475
491
|
}
|
|
476
492
|
|
|
477
493
|
export default {
|
|
@@ -480,12 +496,15 @@ export default {
|
|
|
480
496
|
return {
|
|
481
497
|
serialShow: false,
|
|
482
498
|
pricetext: null,
|
|
499
|
+
hasDisCount: false,
|
|
500
|
+
disCountInfo: {},
|
|
483
501
|
resid: [],
|
|
484
502
|
config: {
|
|
485
503
|
notShowFormula: false, // 不显示计算公式,默认显示
|
|
486
504
|
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
487
505
|
showupload: true, // 默认不显示上传附件
|
|
488
506
|
hasPrint: false, // 默认打票
|
|
507
|
+
newDiscount: false,
|
|
489
508
|
floor: true, // 是否取整收费
|
|
490
509
|
hasBillManage: false, // 默认不启用发票管理
|
|
491
510
|
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
@@ -506,6 +525,7 @@ export default {
|
|
|
506
525
|
f_meter_type: '',
|
|
507
526
|
f_voucher_number: '',
|
|
508
527
|
f_privilege_id: 0,
|
|
528
|
+
f_privilege_gas: 0,
|
|
509
529
|
f_privilege_money: 0,
|
|
510
530
|
f_after_discount: 0
|
|
511
531
|
},
|
|
@@ -842,6 +862,23 @@ export default {
|
|
|
842
862
|
}
|
|
843
863
|
this.privilegeCalculate()
|
|
844
864
|
}
|
|
865
|
+
if (this.hasDisCount) {
|
|
866
|
+
this.calDisCount()
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
async calDisCount () {
|
|
870
|
+
// 初始化减免金额
|
|
871
|
+
this.model.f_privilege_money = 0
|
|
872
|
+
this.model.f_after_discount = this.model.f_collection
|
|
873
|
+
let param = this.disCountInfo
|
|
874
|
+
param.f_collection = this.model.f_collection
|
|
875
|
+
param.f_pregas = this.model.f_pregas
|
|
876
|
+
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculateDiscount', param, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
877
|
+
// 减免金额
|
|
878
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
879
|
+
this.model.f_privilege_gas = privilegeData.data.f_privilege_gas
|
|
880
|
+
// 减免后收款金额
|
|
881
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
845
882
|
},
|
|
846
883
|
// 优惠计算
|
|
847
884
|
async privilegeCalculate () {
|
|
@@ -455,6 +455,7 @@ let CardService = {
|
|
|
455
455
|
// 无卡收费
|
|
456
456
|
noCardSellGas (model, row) {
|
|
457
457
|
let f_serial_number = ''
|
|
458
|
+
let f_privilege_gas = 0
|
|
458
459
|
if (model.f_serial_number) {
|
|
459
460
|
f_serial_number = model.f_serial_number
|
|
460
461
|
}
|
|
@@ -462,6 +463,9 @@ let CardService = {
|
|
|
462
463
|
if (model.f_write_card) {
|
|
463
464
|
f_write_card = model.f_write_card
|
|
464
465
|
}
|
|
466
|
+
if (model.f_privilege_gas) {
|
|
467
|
+
f_privilege_gas = model.f_privilege_gas
|
|
468
|
+
}
|
|
465
469
|
let param = {
|
|
466
470
|
f_userinfo_id: row.f_userinfo_id,
|
|
467
471
|
f_serial_number: f_serial_number,
|
|
@@ -470,6 +474,10 @@ let CardService = {
|
|
|
470
474
|
f_pregas: model.f_pregas,
|
|
471
475
|
f_write_money: model.f_write_money,
|
|
472
476
|
f_balance: row.f_balance,
|
|
477
|
+
// 优惠金额
|
|
478
|
+
f_privilege_money: model.f_privilege_money,
|
|
479
|
+
f_privilege_gas: f_privilege_gas,
|
|
480
|
+
f_after_discount: model.f_after_discount,
|
|
473
481
|
f_preamount: model.f_preamount,
|
|
474
482
|
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
475
483
|
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|