sale-client 4.1.230 → 4.2.1-ronghao
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 +29 -46
- package/package.json +2 -2
- package/src/App.vue +3 -3
- package/src/components/FilesManage/UserGeneralInfoTest.vue +4 -4
- package/src/components/FilesManageNew/FileUserFiles.vue +2 -4
- package/src/components/FilesManageNew/MeterinfoTest.vue +9 -9
- package/src/components/FilesManageNew/UserEssentialInfoTest.vue +201 -227
- package/src/components/FilesManageNew/UserGeneralInfoTest.vue +0 -2
- package/src/components/charge/business/CardMeterCenter.vue +1 -1
- package/src/components/charge/business/FilesComplete.vue +3 -3
- package/src/components/charge/business/IOTMeterCenter.vue +1 -1
- package/src/components/charge/business/OtherChargeNew.vue +68 -48
- package/src/components/common/userinfo_detail/UserInfoDetailManageNew.vue +10 -1
- package/src/components/common/userinfo_detail/ic_detail/CardHandRecord.vue +1 -1
- package/src/components/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +1 -1
- package/src/components/common/userinfo_detail/ic_detail/GarbageRecordList.vue +69 -0
- package/src/components/common/userinfo_detail/ic_detail/InsuranceChargesRecord.vue +384 -0
- package/src/components/common/userinfo_detail/ic_detail/WebHandQueryUser.vue +1 -1
- package/src/components/revenue/Common/MeterMessage.vue +1 -1
- package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
- package/src/components/revenue/HandManager/WebHand.vue +7 -4
- package/src/components/revenue/base/leftview/SafeCheck.vue +41 -3
- package/src/components/revenue/base/leftview/UserFeeInfo.vue +76 -0
- package/src/components/revenue/base/leftview/otherinfo.vue +1 -0
- package/src/components/revenue/base/rightview/CardList.vue +7 -3
- package/src/components/revenue/batchDeduction/batchDeductionList.vue +1 -1
- package/src/components/revenue/cardHandManage/cardDown.vue +18 -0
- package/src/components/revenue/changeInsurance/InsuranceAdd.vue +1 -0
- package/src/components/revenue/changeInsurance/InsuranceRecord.vue +2 -1
- package/src/components/revenue/comprehen/ComprehenOperation/BankPayment/BankPayment.vue +1 -1
- package/src/components/revenue/comprehen/ComprehenOperation/GiftFee/icTable.vue +4 -2
- package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
- package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
- package/src/components/revenue/comprehen/Maintenance/revenue/MeterOperatemain.vue +2 -2
- package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
- package/src/components/revenue/machineHandManage/HandplanQuery.vue +1 -1
- package/src/components/revenue/machineHandManage/machineHand.vue +3 -2
- package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +970 -970
- package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
- package/src/filiale/bayan/ChargeList.vue +1010 -1010
- package/src/filiale/bayan/StockListmain.vue +543 -543
- package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
- package/src/filiale/dexin/MeterinfoTest.vue +1239 -0
- package/src/filiale/dexin/UserEssentialInfoTest.vue +602 -0
- package/src/filiale/dexin/sale.js +5 -0
- package/src/filiale/fugou/MeterinfoTest.vue +1 -1
- package/src/filiale/jiaxian/AutomaticPurse.vue +349 -0
- package/src/filiale/jiaxian/ChangeMeterQueryUser.vue +303 -0
- package/src/filiale/jiaxian/ChangeRecord.vue +44 -2
- package/src/filiale/jiaxian/FillCardQueryUser.vue +250 -0
- package/src/filiale/jiaxian/FillGasQueryUser.vue +270 -0
- package/src/filiale/jiaxian/OtherChargeQueryUser.vue +305 -0
- package/src/filiale/jiaxian/PriceAdjustmentQueryUser.vue +368 -0
- package/src/filiale/jiaxian/PriceChangeQueryUser.vue +243 -0
- package/src/filiale/jiaxian/QueryInstruct.vue +436 -0
- package/src/filiale/jiaxian/RecordQueryUser.vue +321 -0
- package/src/filiale/jiaxian/Repurchase.vue +181 -0
- package/src/filiale/jiaxian/TransferQueryUser.vue +274 -0
- package/src/filiale/jiaxian/UserInfoDetailManageNew.vue +11 -11
- package/src/filiale/jiaxian/Userinfo.vue +426 -0
- package/src/filiale/jiaxian/WatchCollection.vue +54 -1
- package/src/filiale/jiaxian/WebAutomaticPurse.vue +348 -0
- package/src/filiale/jiaxian/contractSigningList.vue +149 -0
- package/src/filiale/jiaxian/sale.js +5 -0
- package/src/filiale/jinhong/AutoAccountsDetail.vue +63 -0
- package/src/filiale/jinhong/CardList.vue +572 -0
- package/src/filiale/jinhong/CardMeterCenter.vue +1 -1
- package/src/filiale/jinhong/CardMeterCenterInner.vue +61 -22
- package/src/filiale/jinhong/GarbageCharge.vue +1 -1
- package/src/filiale/jinhong/HandplanQuery.vue +1430 -0
- package/src/filiale/jinhong/IOTMeterCenterInner.vue +42 -14
- package/src/filiale/jinhong/InsuranceAdd.vue +27 -5
- package/src/filiale/jinhong/InsuranceChargesDetails.vue +11 -5
- package/src/filiale/jinhong/InsuranceRecord.vue +4 -5
- package/src/filiale/jinhong/InsuranceTemp.vue +33 -5
- package/src/filiale/jinhong/MachineChargeService.js +8 -0
- package/src/filiale/jinhong/MachineMeterCenter.vue +38 -11
- package/src/filiale/jinhong/ShowCardSellGasInner.vue +46 -14
- package/src/filiale/jinhong/Userinfo.vue +75 -1
- package/src/filiale/jinhong/insuranceGuanL.vue +349 -0
- package/src/filiale/jinhong/machineDown.vue +1205 -0
- package/src/filiale/jinhong/sale.js +9 -0
- package/src/filiale/jinhuang/UserInfoDetailManageNew.vue +259 -0
- package/src/filiale/jinhuang/WebHand.vue +1026 -0
- package/src/filiale/jinhuang/WebHandQueryUser.vue +413 -0
- package/src/filiale/jinhuang/cardsHand.vue +911 -0
- package/src/filiale/jinhuang/sale.js +8 -0
- package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
- package/src/filiale/lixianV3/InsuranceAdd.vue +1 -0
- package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
- package/src/filiale/meihekou/CardMeterCenter.vue +991 -0
- package/src/filiale/meihekou/ChargeManage.vue +3 -2
- package/src/filiale/meihekou/ChargeOper.vue +279 -169
- package/src/filiale/meihekou/HandManager.vue +57 -2
- package/src/filiale/meihekou/NoCardMeterCenter.vue +542 -0
- package/src/filiale/meihekou/OverUseCharge.vue +1 -1
- package/src/filiale/meihekou/PrintBill.vue +48 -41
- package/src/filiale/meihekou/ReissueBill.vue +4 -1
- package/src/filiale/meihekou/ShowCardSellGas.vue +935 -0
- package/src/filiale/meihekou/TransferManage.vue +704 -0
- package/src/filiale/meihekou/Userinfo.vue +233 -5
- package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
- package/src/filiale/meihekou/icTable.vue +233 -0
- package/src/filiale/meihekou/machineHand.vue +2158 -0
- package/src/filiale/meihekou/manualChargeCenter.vue +394 -0
- package/src/filiale/meihekou/meterTable.vue +220 -0
- package/src/filiale/meihekou/sale.js +15 -0
- package/src/filiale/qianneng/MeterMessage.vue +1 -1
- package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
- package/src/filiale/rizhao/InsuranceAdd.vue +1 -0
- package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
- package/src/filiale/ronghao/CardList.vue +19 -17
- package/src/filiale/ronghao/CardMeterChargeCancel.vue +5 -0
- package/src/filiale/ronghao/CardService.js +2144 -2144
- package/src/filiale/ronghao/ChangeMeterService.js +1 -1
- package/src/filiale/ronghao/ChargeList.vue +17 -17
- package/src/filiale/ronghao/ChargeManage.vue +325 -0
- package/src/filiale/ronghao/ChargeOper.vue +330 -0
- package/src/filiale/ronghao/FilesManageNew/UserEssentialInfoTest.vue +457 -0
- package/src/filiale/ronghao/FilesManageNew/UserGeneralInfoTest.vue +690 -0
- package/src/filiale/ronghao/HandplanQuery.vue +13 -14
- package/src/filiale/ronghao/IOTMeterCenter.vue +15 -6
- package/src/filiale/ronghao/InsuranceAdd.vue +1 -0
- package/src/filiale/ronghao/InsuranceManage.vue +58 -58
- package/src/filiale/ronghao/MachineChargeService.js +149 -149
- package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
- package/src/filiale/ronghao/PaymentCode.vue +174 -174
- package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
- package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
- package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
- package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
- package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
- package/src/filiale/ronghao/Upload.vue +654 -654
- package/src/filiale/ronghao/Userinfo.vue +18 -18
- package/src/filiale/ronghao/cardDown.vue +1141 -1141
- package/src/filiale/ronghao/changemeterOperate.vue +315 -315
- package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
- package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
- package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
- package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
- package/src/filiale/ronghao/machineDown.vue +1176 -1176
- package/src/filiale/ronghao/machineRefund.vue +3 -1
- package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
- package/src/filiale/ronghao/sale.js +11 -0
- package/src/filiale/ronghao/specificInformation.vue +537 -537
- package/src/filiale/ronghao/uploadFilesHistory.vue +214 -0
- package/src/filiale/ruihua/FilesManage/MeterinfoTest.vue +10 -0
- package/src/filiale/shanxian/components/revenue/InsuranceAdd.vue +1 -0
- package/src/filiale/wuan/MeterMessage.vue +1 -1
- package/src/filiale/yangchun/BasicLivingList.vue +281 -0
- package/src/filiale/yangchun/BlackList/BlackRecordQuery.vue +1 -0
- package/src/filiale/yangchun/CardChangeFill.vue +1 -1
- package/src/filiale/yangchun/ChargeList.vue +954 -954
- package/src/filiale/yangchun/FilesManage/UserPaperInfoTest.vue +3 -3
- package/src/filiale/yangchun/NewMeterList.vue +742 -0
- package/src/filiale/yangchun/sale.js +3 -0
- package/src/filiale/yuncheng/CardList.vue +1 -1
- package/src/filiale/yuncheng/IndustryCommerceHand.vue +1145 -0
- package/src/filiale/yuncheng/IndustryCommerceHandAudit.vue +794 -0
- package/src/filiale/yuncheng/IndustryCommerceHandManager.vue +64 -0
- package/src/filiale/yuncheng/InsuranceAdd.vue +1 -0
- package/src/filiale/yuncheng/MeterBookUser.vue +781 -0
- package/src/filiale/yuncheng/UserDeviceInfoTest.vue +2 -2
- package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
- package/src/filiale/yuncheng/industryDown.vue +1118 -0
- package/src/filiale/yuncheng/sale.js +11 -0
- package/src/filiale/yuncheng/uploadFilesHistory.vue +185 -0
- package/src/filiale/zhongsheng/BlackListList.vue +293 -293
- package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
- package/src/plugins/CardService.js +2217 -2217
- package/src/sale.js +3 -1
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-row">
|
|
3
|
+
<div class="span" style="overflow-y: hidden">
|
|
4
|
+
<validator name='v'>
|
|
5
|
+
<form novalidate class="form-horizontal">
|
|
6
|
+
<div class="row">
|
|
7
|
+
<div class="col-sm-4" :class="[$v.payment.required ? 'has-error' : '']">
|
|
8
|
+
<label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
|
|
9
|
+
<input type="text" v-show="false" v-model="$refs.payment.selectedItems"
|
|
10
|
+
v-validate:payment='{required: true }'>
|
|
11
|
+
<v-select v-model="f_payment"
|
|
12
|
+
placeholder='请选择'
|
|
13
|
+
:value.sync="model.f_payment"
|
|
14
|
+
:options='paytype' clear-button v-ref:payment></v-select>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="col-sm-4" v-if="row.f_collection_type == '按气量'"
|
|
18
|
+
:class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
|
|
19
|
+
<label for="f_pregas" class=" font_normal_body">*预购气量</label>
|
|
20
|
+
<input class="input_search" style="width:60%" type="number" :disabled="config.calculatePreByCollection"
|
|
21
|
+
@blur="pregas()" v-model="model.f_pregas" v-el:fpregas
|
|
22
|
+
v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
|
|
23
|
+
v-scale="[model.f_pregas, row.f_gas_decimal||4 ]"
|
|
24
|
+
v-next-el='fcollection'>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="col-sm-4" v-if="row.f_collection_type == '按金额'">
|
|
27
|
+
<label for="f_pregas" class=" font_normal_body">*预购气量</label>
|
|
28
|
+
<input class="input_search" style="width:60%" type="number" v-el:fpregas
|
|
29
|
+
@keyup.enter="pregas('enter')" @blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
|
|
30
|
+
v-scale="[model.f_pregas, row.f_gas_decimal||4 ]"
|
|
31
|
+
v-next-el='fcollection' :disabled="config.calculatePreByCollection"/>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="col-sm-4"
|
|
34
|
+
:class="[$v.f_preamount.required || $v.f_preamount.dctest || model.f_preamount === 0 ? 'has-error' : 'has-success']">
|
|
35
|
+
<label for="f_pregas" class=" font_normal_body">*预购金额</label>
|
|
36
|
+
<input class="input_search" style="width:60%" type="number"
|
|
37
|
+
@blur="preamount()" v-model="model.f_preamount"
|
|
38
|
+
:disabled="config.calculatePreByCollection"
|
|
39
|
+
v-scale="[model.f_preamount, row.f_fee_decimal||4 ]"
|
|
40
|
+
v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ]}' placeholder="预购金额">
|
|
41
|
+
</div><!--
|
|
42
|
+
<div class="col-sm-4" v-if="row.f_collection_type == '按气量'">
|
|
43
|
+
<label for="f_preamount" class=" font_normal_body"> 预购金额</label>
|
|
44
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
|
|
45
|
+
v-scale="[model.f_preamount, 4]" placeholder="预购金额" disabled>
|
|
46
|
+
</div>-->
|
|
47
|
+
|
|
48
|
+
</div>
|
|
49
|
+
<div class="row" style="margin-top:6px;">
|
|
50
|
+
<div class="col-sm-4" :class="[$v.printstyle.required ? 'has-error' : '']">
|
|
51
|
+
<label for="f_print" class="font_normal_body">打印格式</label>
|
|
52
|
+
<input type="text" v-show="false" v-model="$refs.printstyle.selectedItems"
|
|
53
|
+
v-validate:printstyle='{required: true }'>
|
|
54
|
+
<v-select id="print"
|
|
55
|
+
v-model="f_print"
|
|
56
|
+
placeholder='请选择'
|
|
57
|
+
:multiple="mulPrint"
|
|
58
|
+
:value.sync="model.f_print"
|
|
59
|
+
:options='printstyle'
|
|
60
|
+
close-on-select clear-button v-ref:printstyle>
|
|
61
|
+
</v-select>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="col-sm-4 " v-if="hasLimit&&limitgas">
|
|
64
|
+
<label class="font_normal_body"> 购气上限</label>
|
|
65
|
+
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxgas"
|
|
66
|
+
v-scale="[maxgas, 4]" placeholder='限购余气' disabled>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="col-sm-4 form-group" v-if="hasLimit&&limitmoney">
|
|
69
|
+
<label class="font_normal_body">金额上限</label>
|
|
70
|
+
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
|
|
71
|
+
v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="col-sm-4" v-if="mingas > 0 ">
|
|
74
|
+
<label class="font_normal_body"> 购气下限</label>
|
|
75
|
+
<input class="input_search" style="width:60%" style="width:60%" type="number" v-model="mingas"
|
|
76
|
+
v-scale="[mingas, 4]" placeholder='最低购气量' disabled>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="col-sm-4"
|
|
80
|
+
:class="[$v.f_totalcost.required || $v.f_totalcost.dctest ? 'has-error' : 'has-success']">
|
|
81
|
+
<label for="f_temp_amount"
|
|
82
|
+
class=" font_normal_body"> 应收金额</label>
|
|
83
|
+
<input class="input_search" style="width:60%" type="number"
|
|
84
|
+
@blur="preamount()" v-model="model.f_totalcost"
|
|
85
|
+
v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
|
|
86
|
+
v-next-el='fcollection' v-scale="[model.f_totalcost, row.f_fee_decimal||4]" disabled>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="row">
|
|
90
|
+
|
|
91
|
+
<div class="col-sm-4">
|
|
92
|
+
<label for="f_balance" class="font_normal_body">上期结余</label>
|
|
93
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
|
|
94
|
+
v-scale="[model.f_balance, row.f_fee_decimal||4]" placeholder="上期结余" disabled>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div class="col-sm-4">
|
|
98
|
+
<label for="f_curbalance" class="font_normal_body"> 本期结余</label>
|
|
99
|
+
<input class="input_search" style="width:60%" type="number" v-model="curbalance"
|
|
100
|
+
v-scale="[curbalance, row.f_fee_decimal||4]" placeholder="本期结余" disabled>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气' && row.f_meter_type.includes('卡表') && !config.calculatePreByCollection"
|
|
104
|
+
:class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
|
|
105
|
+
<label for="f_collection" class=" font_normal_body">*收  款</label>
|
|
106
|
+
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
107
|
+
v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0), ">=" ] }'
|
|
108
|
+
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
|
|
109
|
+
v-scale="[model.f_collection, row.f_fee_decimal||4]" :disabled="$refs.givechange.promptText != ''"/>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气' && row.f_meter_type.includes('卡表') && config.calculatePreByCollection"
|
|
112
|
+
:class="[$v.f_collection.required ? 'has-error' : 'has-success']">
|
|
113
|
+
<label for="f_collection" class=" font_normal_body">*收  款</label>
|
|
114
|
+
<input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
|
|
115
|
+
v-validate:f_collection='{required: true }'
|
|
116
|
+
@blur="calculatePreByCollection()"
|
|
117
|
+
v-el:fcollection
|
|
118
|
+
@keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"/>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment=='赠气' && row.f_meter_type.includes('卡表')"
|
|
121
|
+
:class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
|
|
122
|
+
<label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收 款</font></label>
|
|
123
|
+
<input id="f_collection" class="input_search" style="width:60%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
|
|
124
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
125
|
+
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_totalcost, row.f_fee_decimal||4]" :disabled="$refs.givechange.promptText != ''">
|
|
126
|
+
</div>
|
|
127
|
+
<div class="col-sm-3" v-if="row.f_collection_type === '按金额' && row.f_meter_type.includes('卡表')">
|
|
128
|
+
<label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收 款</font></label>
|
|
129
|
+
<input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
|
|
130
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
131
|
+
v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_collection, row.f_fee_decimal||4]" :disabled="$refs.givechange.promptText != ''">
|
|
132
|
+
</div>
|
|
133
|
+
<div class="col-sm-4" v-if="!row.f_meter_type.includes('卡表')">
|
|
134
|
+
<label for="f_collection" class=" font_normal_body"><font size="4px"
|
|
135
|
+
style="font-weight:bold">*收 款</font></label>
|
|
136
|
+
<input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;"
|
|
137
|
+
type="number" v-model="model.f_collection"
|
|
138
|
+
v-el:fcollection
|
|
139
|
+
@blur="config.calculatePreByCollection && calculatePreByCollection()"
|
|
140
|
+
@keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
|
|
141
|
+
v-scale="[model.f_collection, row.f_fee_decimal||4]">
|
|
142
|
+
</div>
|
|
143
|
+
<div class="col-sm-1 form-group" v-show=" row.f_meter_type.includes('卡表')">
|
|
144
|
+
<give-change :curbalance="curbalance" :collection.sync="model.f_collection" v-ref:givechange></give-change>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="row" style="margin-top:5px;" v-if="!config.calculatePreByCollection">
|
|
148
|
+
<div class="col-sm-9">
|
|
149
|
+
</div>
|
|
150
|
+
<div class="col-sm-3">
|
|
151
|
+
<span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
|
|
156
|
+
<div class="col-sm-4">
|
|
157
|
+
<label class="font_normal_body">优惠方式</label>
|
|
158
|
+
<v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
|
|
159
|
+
placeholder='请选择'
|
|
160
|
+
:value.sync="model.f_privilege_id"
|
|
161
|
+
:options='privilegeList' clear-button value-single>
|
|
162
|
+
</v-select>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="col-sm-4">
|
|
165
|
+
<label for="f_preamount" class=" font_normal_body"> 优惠金额</label>
|
|
166
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_privilege_money"
|
|
167
|
+
v-scale="[model.f_privilege_money, row.f_fee_decimal||4]" placeholder="优惠金额" disabled>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="col-sm-4">
|
|
170
|
+
<label for="f_preamount" class=" font_normal_body"> 实际收款</label>
|
|
171
|
+
<input class="input_search" style="width:60%" type="number" v-model="model.f_after_discount"
|
|
172
|
+
v-scale="[model.f_after_discount, row.f_fee_decimal||4]" placeholder="优惠后收款" disabled>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<div class="row" v-if="model.f_payment[0].includes('POS')">
|
|
177
|
+
<div class="col-sm-4">
|
|
178
|
+
<label for="f_voucher_number" class="font_normal_body">凭证号</label>
|
|
179
|
+
<input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
|
|
180
|
+
placeholder="凭证号">
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="row" style="padding-top: 0.5em;">
|
|
184
|
+
<div class="col-sm-4" v-if="!mjshow">
|
|
185
|
+
<label for="f_serial_number" class=" font_normal_body">业务单号</label>
|
|
186
|
+
<input class="input_search" style="width:60%" type="text"
|
|
187
|
+
v-model="model.f_serial_number" placeholder="业务单号">
|
|
188
|
+
</div>
|
|
189
|
+
<div class="col-sm-4" v-if="mjshow"
|
|
190
|
+
:class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
|
|
191
|
+
<label for="f_serial_number" class=" font_normal_body">业务单号</label>
|
|
192
|
+
<input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
|
|
193
|
+
v-model="model.f_serial_number" placeholder="业务单号">
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
<div class="col-sm-8">
|
|
198
|
+
<label for="f_comments" class="font_normal_body"> 备  注</label>
|
|
199
|
+
<input class="input_search" style="width:77%" v-model="model.f_comments" rows="1" placeholder="备注">
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<div v-if="paymentModel.length >1">
|
|
204
|
+
<div class="row" style="margin-top:10px;">
|
|
205
|
+
<p class="col-sm-2 text-left" style="padding: 10px;"><img src="../../../static/juxing.png"/><strong
|
|
206
|
+
style="margin-left: 4%">付款明细</strong></p>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="row" style="margin-top:10px;">
|
|
209
|
+
<div class="col-sm-4 " v-for="pay in paymentModel">
|
|
210
|
+
<label class="font_normal_body">{{pay.f_payment}}:</label>
|
|
211
|
+
<input id="f_money" type="text" class="input_search" style="width:60%" v-model="pay.f_money">
|
|
212
|
+
</div>
|
|
213
|
+
<div class="col-sm-4 ">
|
|
214
|
+
<strong v-if="!islegal" style="color: red">所输入的金额必须等于收款金额</strong>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</form>
|
|
219
|
+
<validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
|
|
220
|
+
<print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close"
|
|
221
|
+
@printok="printok" v-ref:printbill></print-bill>
|
|
222
|
+
<div style="text-align:right; height: 25%">
|
|
223
|
+
<strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
|
|
224
|
+
<strong style="font-size: large" v-if="!config.notShowFormula">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
|
|
225
|
+
<strong style="font-size: large" v-if="deductdetail">{{deductdetail ? deductdetail : ' 暂无'}}</strong><br/>
|
|
226
|
+
<payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm|| model.f_preamount === 0"
|
|
227
|
+
:payment.sync="model.f_payment" :payment-data="paytype"
|
|
228
|
+
@confirm-payment="confirm()">
|
|
229
|
+
</payment-code-button>
|
|
230
|
+
<button class="button_search btn-gn" type="submit" @click="checkInvoiceMsg()"
|
|
231
|
+
:disabled='!$v.valid || validateOk || !islegal || clickConfirm || model.f_preamount === 0'>确认
|
|
232
|
+
</button>
|
|
233
|
+
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
234
|
+
</div>
|
|
235
|
+
</validator>
|
|
236
|
+
<eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
|
|
237
|
+
<ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
|
|
238
|
+
<payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_after_discount"></payment-code>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
<upload :blodid="row.f_userinfo_id" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="卡表收费"></upload>
|
|
242
|
+
</template>
|
|
243
|
+
<script>
|
|
244
|
+
import {HttpResetClass} from 'vue-client'
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
*综合业务
|
|
248
|
+
*卡表收费组件
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
// 输入金额,换算气量
|
|
252
|
+
let preamountGen = async function (self) {
|
|
253
|
+
let calFee = ((self.model.f_preamount - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
254
|
+
if (self.model.f_payment == '赠气') {
|
|
255
|
+
calFee = (self.model.f_preamount - 0).toFixed(self.row.f_fee_decimal || 4)
|
|
256
|
+
}
|
|
257
|
+
// 通过金额进行划价
|
|
258
|
+
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
259
|
+
if (getGas.data.gas) {
|
|
260
|
+
if (self.row.f_isdecimal === '是') {
|
|
261
|
+
if (self.row.f_alias === 'QiaoSong') {
|
|
262
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
263
|
+
} else {
|
|
264
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(self.row.f_gas_decimal || 4)
|
|
265
|
+
}
|
|
266
|
+
if (self.row.f_collection_type === '按金额') {
|
|
267
|
+
self.dymoney = 0
|
|
268
|
+
} else {
|
|
269
|
+
let dymoney2 = await self.$CommonService.gasCalculate(self.model, (getGas.data.gas - 0).toFixed(self.row.f_gas_decimal || 4))
|
|
270
|
+
self.dymoney = (getGas.data.chargenum - 0).toFixed(4) - (dymoney2.data.chargenum - 0).toFixed(self.row.f_fee_decimal || 4)
|
|
271
|
+
}
|
|
272
|
+
} else {
|
|
273
|
+
// 如果不支持小数,将划价出的多余非整数气量进行划价为金额
|
|
274
|
+
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
275
|
+
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(self.row.f_fee_decimal || 4))
|
|
276
|
+
self.dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(self.row.f_fee_decimal || 4)
|
|
277
|
+
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
self.model.getDeduct = 0
|
|
281
|
+
// 计算抵扣包间费用抵扣金额
|
|
282
|
+
if (self.row.f_project_money && self.row.f_project_money > 0) {
|
|
283
|
+
self.model.getDeduct = (self.$CommonService.getDeduct(self.row, self.model.f_pregas) - 0)
|
|
284
|
+
}
|
|
285
|
+
// end
|
|
286
|
+
self.model.f_totalcost = ((self.row.f_balance - 0) >= ((self.model.f_preamount - 0) + self.model.getDeduct) ? 0 : ((self.model.f_preamount - 0) + self.model.getDeduct) - self.row.f_balance)
|
|
287
|
+
|
|
288
|
+
self.model.chargeprice = getGas.data.chargeprice
|
|
289
|
+
Object.assign(self.model, self.model, getGas.data)
|
|
290
|
+
if (self.model.f_payment == '赠气') {
|
|
291
|
+
self.model.f_totalcost = self.model.f_preamount
|
|
292
|
+
self.model.f_collection = 0
|
|
293
|
+
} else {
|
|
294
|
+
self.model.f_collection = self.config.autoCollection ? self.model.f_totalcost : 0
|
|
295
|
+
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (self.dymoney - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
296
|
+
}
|
|
297
|
+
self.model.f_preamount = (calFee - (self.dymoney - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
298
|
+
self.calText(getGas.data.chargeprice, self.model.getDeduct)
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// 输入气量,换算金额
|
|
302
|
+
let pregasGen = async function (self) {
|
|
303
|
+
if (self.row.f_isdecimal === '是') {
|
|
304
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(self.row.f_gas_decimal || 4)
|
|
305
|
+
} else {
|
|
306
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
307
|
+
}
|
|
308
|
+
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0 || (self.model.f_pregas - 0) - (self.mingas - 0) >= 0) {
|
|
309
|
+
self.model.f_meter_type = self.row.f_meter_type
|
|
310
|
+
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
311
|
+
self.model.getDeduct = 0
|
|
312
|
+
// 计算抵扣包间费用抵扣金额
|
|
313
|
+
if (self.row.f_project_money && self.row.f_project_money > 0) {
|
|
314
|
+
self.model.getDeduct = (self.$CommonService.getDeduct(self.row, self.model.f_pregas) - 0)
|
|
315
|
+
}
|
|
316
|
+
self.model.f_preamount = (getAmount.data.chargenum - 0).toFixed(self.row.f_fee_decimal || 4)
|
|
317
|
+
self.model.f_totalcost = ((self.row.f_balance - 0) > ((getAmount.data.chargenum - 0) + self.model.getDeduct - 0) ? 0 : (((getAmount.data.chargenum - 0) + self.model.getDeduct - 0) - (self.row.f_balance - 0)).toFixed(self.row.f_fee_decimal || 4))
|
|
318
|
+
Object.assign(self.model, self.model, getAmount.data)
|
|
319
|
+
self.model.chargeprice = getAmount.data.chargeprice
|
|
320
|
+
if (self.model.f_payment == '赠气') {
|
|
321
|
+
self.model.f_totalcost = getAmount.data.chargenum
|
|
322
|
+
self.model.f_collection = 0
|
|
323
|
+
} else {
|
|
324
|
+
self.model.f_collection = self.config.autoCollection ? self.model.f_totalcost : 0
|
|
325
|
+
if (self.config.floor) {
|
|
326
|
+
self.model.f_collection = Math.ceil(self.model.f_collection)
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
self.calText(getAmount.data.chargeprice, self.model.getDeduct)
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
// 执行保存逻辑
|
|
333
|
+
let sellgasGen = async function (self) {
|
|
334
|
+
try {
|
|
335
|
+
self.row.cardInfo = self.cardData
|
|
336
|
+
|
|
337
|
+
if (self.paymentModel.length === 0) {
|
|
338
|
+
self.paymentModel = [{
|
|
339
|
+
f_payment: self.model.f_payment[0],
|
|
340
|
+
f_money: self.model.f_preamount
|
|
341
|
+
}]
|
|
342
|
+
}
|
|
343
|
+
self.model.xiekamoney = self.model.f_preamount
|
|
344
|
+
if (self.row.f_price_type == '阶梯气价' && self.row.f_is_step == '否' && self.row.f_collection_type == '按金额') {
|
|
345
|
+
self.model.xiekamoney = (self.model.f_pregas * self.model.chargeprice[0].f_price)
|
|
346
|
+
self.model.xiekamoney = self.model.xiekamoney.toFixed(4)
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
self.model.payments = self.paymentModel
|
|
350
|
+
// 加入扫码盒付款码支付流水号
|
|
351
|
+
self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.transactionId
|
|
352
|
+
let res = await self.$CardService.sellgas(self.model, self.row)
|
|
353
|
+
let localeSustainMoney = window.localStorage.getItem('sustainMoney')
|
|
354
|
+
if (localeSustainMoney != null) {
|
|
355
|
+
localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
|
|
356
|
+
window.localStorage.setItem('sustainMoney', localeSustainMoney)
|
|
357
|
+
}
|
|
358
|
+
if (self.config.showupload) {
|
|
359
|
+
let param = []
|
|
360
|
+
for (let row of self.resid) {
|
|
361
|
+
param.push({id: row.id})
|
|
362
|
+
}
|
|
363
|
+
let writeid
|
|
364
|
+
if (res.data && res.data.id) {
|
|
365
|
+
writeid = res.data.id
|
|
366
|
+
} else {
|
|
367
|
+
writeid = res
|
|
368
|
+
}
|
|
369
|
+
let data = {
|
|
370
|
+
param: param,
|
|
371
|
+
f_blobid: writeid
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
await self.$resetpost('api/af-revenue/logic/updatefiles', data)
|
|
375
|
+
}
|
|
376
|
+
console.log(self.config, self.config.hasPrint && !self.$login.r.includes('不打印发票'))
|
|
377
|
+
// 开始打票
|
|
378
|
+
if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
|
|
379
|
+
if (self.printInvoiceType.indexOf(self.model.f_print) === -1) {
|
|
380
|
+
if (self.$login.r.includes('非民用纸质票据拆分')) {
|
|
381
|
+
if (self.row.f_user_type === '非民用') {
|
|
382
|
+
self.billData.url = 'api/af-revenue/report/fmy_card_bill'
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
if (self.row.f_meter_type === '金额卡表' && self.$appdata.getSingleValue('金额气量区分卡表票据')) {
|
|
386
|
+
self.billData.url = 'api/af-revenue/report/fee_card_bill'
|
|
387
|
+
}
|
|
388
|
+
if (self.config.hasBillManage) {
|
|
389
|
+
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
390
|
+
self.row.id = res
|
|
391
|
+
self.row.f_bill_type = '卡表收费'
|
|
392
|
+
self.row.f_bill_style = self.model.f_print[0]
|
|
393
|
+
self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
|
|
394
|
+
self.print = true
|
|
395
|
+
} else {
|
|
396
|
+
self.row.id = res
|
|
397
|
+
self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
|
|
398
|
+
self.print = true
|
|
399
|
+
}
|
|
400
|
+
} else {
|
|
401
|
+
if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
|
|
402
|
+
self.row.id = res
|
|
403
|
+
self.eticket_show = true
|
|
404
|
+
self.row.f_print = self.model.f_print[0]
|
|
405
|
+
// 应铜川需要卡表显示
|
|
406
|
+
await self.$refs.eticketbill.openETicket(res, self.row, '卡表收费')
|
|
407
|
+
// await self.$CommonService.openEticket(res, '售气收费')
|
|
408
|
+
// self.print = true
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
} else {
|
|
412
|
+
self.$dispatch('success', '卡表收费', self.row)
|
|
413
|
+
}
|
|
414
|
+
self.clickConfirm = false
|
|
415
|
+
} catch (error) {
|
|
416
|
+
console.log('捕获到异常', error)
|
|
417
|
+
if (error instanceof Object) {
|
|
418
|
+
self.$showAlert(error.data, 'danger', 0)
|
|
419
|
+
} else {
|
|
420
|
+
self.$showAlert(error, 'danger', 0)
|
|
421
|
+
}
|
|
422
|
+
self.$dispatch('refresh')
|
|
423
|
+
self.clickConfirm = false
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
let asyncCardMeterCenter = async function (self) {
|
|
428
|
+
await self.$getConfig(self, 'CardMeterCenter')
|
|
429
|
+
console.log('卡表收费config', self.config)
|
|
430
|
+
// 添加 “系统余额透支” 付款方式
|
|
431
|
+
let i = -1
|
|
432
|
+
for (const index in self.paytype) {
|
|
433
|
+
if (self.paytype[index].value == '系统余额透支') {
|
|
434
|
+
i = index
|
|
435
|
+
break
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
if (self.canOverdraftBalance()) {
|
|
439
|
+
if (i == -1) {
|
|
440
|
+
self.paytype.push({
|
|
441
|
+
label: '系统余额透支',
|
|
442
|
+
value: '系统余额透支'
|
|
443
|
+
})
|
|
444
|
+
}
|
|
445
|
+
} else {
|
|
446
|
+
if (i != -1) {
|
|
447
|
+
self.paytype.splice(i, 1)
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// 默认打印格式
|
|
452
|
+
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
453
|
+
self.model.f_payment = [self.config.payment]
|
|
454
|
+
self.mulPrint = self.config.printType instanceof Array
|
|
455
|
+
|
|
456
|
+
// 获取当前票号用
|
|
457
|
+
self.model.f_use_type = self.config.billType
|
|
458
|
+
self.model.f_bill_type = self.model.f_print
|
|
459
|
+
self.hasValidateBill = self.config.hasBillManage
|
|
460
|
+
self.mingas = self.config.MinSellGas
|
|
461
|
+
// 判断限购
|
|
462
|
+
let limit_param = {
|
|
463
|
+
f_userinfo_id: self.row.f_userinfo_id,
|
|
464
|
+
f_user_id: self.row.f_user_id,
|
|
465
|
+
f_stairprice_id: self.row.f_stairprice_id
|
|
466
|
+
}
|
|
467
|
+
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {
|
|
468
|
+
resolveMsg: null,
|
|
469
|
+
rejectMsg: '获取限购值失败!!'
|
|
470
|
+
})
|
|
471
|
+
console.log('获取限购值', getLimit)
|
|
472
|
+
self.hasLimit = getLimit.data.hasLimit
|
|
473
|
+
if (self.hasLimit) {
|
|
474
|
+
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
475
|
+
if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
|
|
476
|
+
self.maxmoney = 0
|
|
477
|
+
self.limitmoney = true
|
|
478
|
+
console.log(self.maxmoney, self.limitmoney)
|
|
479
|
+
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
480
|
+
|
|
481
|
+
// self.$dispatch('refresh')
|
|
482
|
+
} else {
|
|
483
|
+
if (getLimit.data.f_limit_value) {
|
|
484
|
+
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
485
|
+
self.limitgas = true
|
|
486
|
+
}
|
|
487
|
+
if (getLimit.data.f_limit_amount) {
|
|
488
|
+
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
489
|
+
self.limitmoney = true
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
let nowrite_param = {
|
|
495
|
+
f_userfiles_id: self.row.f_userfiles_id
|
|
496
|
+
}
|
|
497
|
+
let getNoWriteCard = await self.$resetpost('api/af-revenue/sql/getnowritecard', {data: nowrite_param}, {
|
|
498
|
+
resolveMsg: null,
|
|
499
|
+
rejectMsg: '获取最近卡表收费记录失败!!'
|
|
500
|
+
})
|
|
501
|
+
if (getNoWriteCard.data.length > 0) {
|
|
502
|
+
self.$showMessage(`三小时内存在写卡失败的记录,是否重新写卡?`, ['confirm', 'cancel']).then(async (res) => {
|
|
503
|
+
if (res === 'confirm') {
|
|
504
|
+
let url = 'http://127.0.0.1:8003/' + getNoWriteCard.data[0].f_cardpost
|
|
505
|
+
let param = JSON.parse(getNoWriteCard.data[0].f_cardparam)
|
|
506
|
+
let cardRes = await self.$resetpost(url, param, {resolveMsg: null, rejectMsg: '重新写卡失败'})
|
|
507
|
+
if (cardRes.data.Err || cardRes.data.Exception) {
|
|
508
|
+
self.$showAlert(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`, 'danger', 3000)
|
|
509
|
+
self.$dispatch('refresh', self.row)
|
|
510
|
+
} else {
|
|
511
|
+
self.$resetpost('api/af-revenue/logic/writeCardAgin', getNoWriteCard.data[0], {resolveMsg: '重新写卡成功', rejectMsg: '重新写卡失败'})
|
|
512
|
+
self.$dispatch('success', '卡表收费', self.row)
|
|
513
|
+
}
|
|
514
|
+
} else {
|
|
515
|
+
self.$dispatch('refresh', self.row)
|
|
516
|
+
}
|
|
517
|
+
})
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
export default {
|
|
521
|
+
title: '卡表收费',
|
|
522
|
+
data () {
|
|
523
|
+
return {
|
|
524
|
+
mjshow: false,
|
|
525
|
+
serialShow: false,
|
|
526
|
+
randomBusinessId: '',
|
|
527
|
+
resid: [], // 存放新增的f_files表中id
|
|
528
|
+
config: {
|
|
529
|
+
calculatePreByCollection: false, // 可以更具收款来反向计算预购
|
|
530
|
+
notShowFormula: false, // 不显示计算公式,默认显示
|
|
531
|
+
autoCollection: true, // 自动填写收款
|
|
532
|
+
quickSale: false,
|
|
533
|
+
showupload: true, // 显示上传
|
|
534
|
+
hasPrint: true, // 默认打票
|
|
535
|
+
MinSellGas: 0,
|
|
536
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
537
|
+
taxforidnumber: true, // 身份证号同步到纳税人识别号
|
|
538
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
539
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
540
|
+
payment: '',
|
|
541
|
+
floor: false,
|
|
542
|
+
overdraftBalance: false // 是否支持系统余额透支
|
|
543
|
+
},
|
|
544
|
+
mingas: 0,
|
|
545
|
+
eticket_msg: false,
|
|
546
|
+
eticket_show: false,
|
|
547
|
+
invoice_is_pax: '不征税',
|
|
548
|
+
is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
|
|
549
|
+
model: {
|
|
550
|
+
f_purchase: 0,
|
|
551
|
+
f_payment: [],
|
|
552
|
+
f_pregas: '',
|
|
553
|
+
f_preamount: 0,
|
|
554
|
+
f_totalcost: 0,
|
|
555
|
+
f_curbalance: 0,
|
|
556
|
+
f_collection: '',
|
|
557
|
+
f_balance: 0,
|
|
558
|
+
f_print: [],
|
|
559
|
+
f_meter_type: '',
|
|
560
|
+
f_voucher_number: '',
|
|
561
|
+
f_banktransfer_person: '',
|
|
562
|
+
f_banktransfer_date: '',
|
|
563
|
+
f_privilege_id: 0,
|
|
564
|
+
f_privilege_money: 0,
|
|
565
|
+
f_after_discount: 0,
|
|
566
|
+
getDeduct: 0
|
|
567
|
+
},
|
|
568
|
+
calculatedetail: '',
|
|
569
|
+
deductdetail: '',
|
|
570
|
+
|
|
571
|
+
// 启用发票管理需要对票号进行验证
|
|
572
|
+
hasValidateBill: false,
|
|
573
|
+
validateOk: false,
|
|
574
|
+
|
|
575
|
+
print: false,
|
|
576
|
+
billData: {
|
|
577
|
+
url: 'api/af-revenue/report/card_bill',
|
|
578
|
+
billnumber: ''
|
|
579
|
+
},
|
|
580
|
+
hasLimit: false,
|
|
581
|
+
maxgas: 99999999, // 限购
|
|
582
|
+
maxmoney: 99999999,
|
|
583
|
+
limitmoney: false,
|
|
584
|
+
limitgas: false,
|
|
585
|
+
|
|
586
|
+
paymentModel: [], // 多笔付款方式
|
|
587
|
+
|
|
588
|
+
mulPrint: false,
|
|
589
|
+
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
590
|
+
// 下拉框值
|
|
591
|
+
paytype: [],
|
|
592
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
593
|
+
printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
|
|
594
|
+
privilegeList: [{label: '无优惠', value: '0'}],
|
|
595
|
+
BankTransfer: false,
|
|
596
|
+
// 小数是否支持,导致划价产生的多余气量,金额
|
|
597
|
+
dymoney: 0
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
props: ['row', 'cardData'],
|
|
601
|
+
async ready () {
|
|
602
|
+
if (this.authArr.includes('余额写卡限定')) {
|
|
603
|
+
this.paytype = [{label: '余额写卡', value: '余额写卡'}]
|
|
604
|
+
} else {
|
|
605
|
+
this.paytype = await this.$appdata.getParam('付款方式') ? await this.$appdata.getParam('付款方式') : []
|
|
606
|
+
if (!this.$login.r.includes('免交充值付款')) {
|
|
607
|
+
this.paytype = this.paytype.filter((item) => {
|
|
608
|
+
return item.label != '免交'
|
|
609
|
+
})
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
// this.getPurchase()
|
|
613
|
+
this.model.f_price_id = this.row.f_price_id
|
|
614
|
+
this.model.f_user_id = this.row.f_user_id
|
|
615
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
616
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
617
|
+
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
618
|
+
if (this.row.f_collection_type == '按金额') {
|
|
619
|
+
this.model.f_preamount = ''
|
|
620
|
+
this.model.f_pregas = 0
|
|
621
|
+
}
|
|
622
|
+
this.$els.fpregas.focus()
|
|
623
|
+
this.getRandomId()
|
|
624
|
+
asyncCardMeterCenter(this)
|
|
625
|
+
},
|
|
626
|
+
watch: {
|
|
627
|
+
'model.f_payment.length' (val) {
|
|
628
|
+
console.log('付款方式多选。。', val)
|
|
629
|
+
if (val > 1 && !this.model.f_preamount) {
|
|
630
|
+
this.model.f_payment = ['现金缴费']
|
|
631
|
+
this.$showAlert('请先计算付款金额', 'warning', 2000)
|
|
632
|
+
} else {
|
|
633
|
+
this.paymentModel = []
|
|
634
|
+
|
|
635
|
+
this.model.f_payment.forEach((res) => {
|
|
636
|
+
let temp = {
|
|
637
|
+
f_payment: res,
|
|
638
|
+
f_money: 0
|
|
639
|
+
}
|
|
640
|
+
this.paymentModel.push(temp)
|
|
641
|
+
})
|
|
642
|
+
this.$resetValidation()
|
|
643
|
+
|
|
644
|
+
// 获取计算优惠
|
|
645
|
+
this.getPrivilegeList()
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
'model.f_payment' (val) {
|
|
649
|
+
let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
|
|
650
|
+
if (val == '免交' || _payment.includes(val)) {
|
|
651
|
+
this.mjshow = true
|
|
652
|
+
} else if (val == '赠气' && (this.model.f_preamount || this.model.f_preamount != '')) {
|
|
653
|
+
if (this.row.f_collection_type == '按气量') {
|
|
654
|
+
this.pregas()
|
|
655
|
+
} else {
|
|
656
|
+
this.preamount()
|
|
657
|
+
}
|
|
658
|
+
} else {
|
|
659
|
+
this.mjshow = false
|
|
660
|
+
}
|
|
661
|
+
// if(this.row.f_collection_type == '按气量'){
|
|
662
|
+
// this.pregas();
|
|
663
|
+
// }else{
|
|
664
|
+
// this.preamount();
|
|
665
|
+
// }
|
|
666
|
+
},
|
|
667
|
+
'model.f_collection' (val) {
|
|
668
|
+
// 获取计算优惠
|
|
669
|
+
this.getPrivilegeList()
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
events: {
|
|
673
|
+
// 删除Resid数组元素
|
|
674
|
+
'delResid' (val) {
|
|
675
|
+
this.resid.$remove({id: val, f_biobid: ''})
|
|
676
|
+
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
677
|
+
},
|
|
678
|
+
// 增加Resid数组元素
|
|
679
|
+
'resid' (val) {
|
|
680
|
+
this.resid.push({id: val, f_biobid: ''})
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
methods: {
|
|
684
|
+
getRandomId () {
|
|
685
|
+
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
686
|
+
let res = Math.random() * 16 | 0
|
|
687
|
+
let v = c == 'x' ? res : (res & 0x3 | 0x8)
|
|
688
|
+
return v.toString(16)
|
|
689
|
+
})
|
|
690
|
+
},
|
|
691
|
+
// 根据收款金额计算划价信息
|
|
692
|
+
// 需要配置 calculatePreByCollection = true
|
|
693
|
+
async calculatePreByCollection () {
|
|
694
|
+
try {
|
|
695
|
+
this.model.f_collection = (this.model.f_collection - 0)
|
|
696
|
+
let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
|
|
697
|
+
// 通过收款进行划价
|
|
698
|
+
let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
|
|
699
|
+
this.model.f_pregas = parseInt(getGas.data.gas)
|
|
700
|
+
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
701
|
+
this.model.chargeprice = dymoney2.data.chargeprice
|
|
702
|
+
Object.assign(this.model, this.model, dymoney2.data)
|
|
703
|
+
this.model.f_totalcost = dymoney2.data.chargenum
|
|
704
|
+
this.model.f_preamount = dymoney2.data.chargenum
|
|
705
|
+
this.model.getDeduct = 0
|
|
706
|
+
if (this.row.f_project_money && this.row.f_project_money > 0) {
|
|
707
|
+
this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
|
|
708
|
+
this.model.f_totalcost = (this.model.f_totalcost - 0 ) + (this.model.getDeduct- 0 )
|
|
709
|
+
this.model.f_collection = (this.model.f_collection - 0 ) + (this.model.getDeduct- 0 )
|
|
710
|
+
}
|
|
711
|
+
this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
|
|
712
|
+
} catch (error) {
|
|
713
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
714
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
// 校验发票信息
|
|
718
|
+
checkInvoiceMsg (flag) {
|
|
719
|
+
// 校验是否超出最大透支余额
|
|
720
|
+
if (this.model.f_payment == '系统余额透支') {
|
|
721
|
+
const maxOverdraftBalance = -(this.$appdata.getSingleValue('最大透支余额') - 0)
|
|
722
|
+
const curSysBalance = (this.row.f_sys_balance - 0) - (this.model.f_totalcost - 0)
|
|
723
|
+
if (curSysBalance < maxOverdraftBalance) {
|
|
724
|
+
this.$showAlert('您的系统余额将超出最大透支余额,请使用别的付款方式!', 'danger', 5000)
|
|
725
|
+
return
|
|
726
|
+
}
|
|
727
|
+
this.model.f_sys_balance = curSysBalance
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
// 收款回车时, 如果确认按钮是灰色不进行任何操作
|
|
731
|
+
if (flag) return
|
|
732
|
+
console.log(this.model.f_print[0])
|
|
733
|
+
if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
|
|
734
|
+
if (!this.row.f_taxpayer_id && this.config.taxforidnumber) {
|
|
735
|
+
this.row.f_taxpayer_id = this.row.f_idnumber
|
|
736
|
+
}
|
|
737
|
+
if (!this.row.f_paper_name) {
|
|
738
|
+
this.row.f_paper_name = this.row.f_user_name
|
|
739
|
+
}
|
|
740
|
+
if (!this.row.f_address_phone) {
|
|
741
|
+
this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
|
|
742
|
+
}
|
|
743
|
+
if (!this.row.f_email) {
|
|
744
|
+
this.row.f_email = this.row.f_email
|
|
745
|
+
}
|
|
746
|
+
this.eticket_msg = true
|
|
747
|
+
} else {
|
|
748
|
+
this.confirm()
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
confirm () {
|
|
752
|
+
this.eticket_msg = false
|
|
753
|
+
if (this.model.f_payment.length > 0 && this.model.f_payment.includes('余额写卡')) {
|
|
754
|
+
if (this.model.f_collection > this.row.f_balance) {
|
|
755
|
+
this.$showAlert('请注意!您的账户余额小于当前写卡金额,无法进行余额写卡,请修改后重试', 'warning', 2000)
|
|
756
|
+
return
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
if (this.model.f_collection > 0) {
|
|
760
|
+
this.$showAlert('请注意!进行余额写卡,收款不能大于0', 'warning', 1000)
|
|
761
|
+
return
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
this.$showMessage(`确定对用户${this.row.f_user_name}进行卡表收费吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
765
|
+
if (res === 'confirm') {
|
|
766
|
+
this.clickConfirm = true
|
|
767
|
+
// 先调用付款码支付组件流程
|
|
768
|
+
let ss = await this.$refs.paymentcode.flowPath()
|
|
769
|
+
this.$refs.paymentcode.paymentCodeShow = false
|
|
770
|
+
console.log('付款码操作返回', ss)
|
|
771
|
+
if (!ss.result) return
|
|
772
|
+
|
|
773
|
+
this.model.f_curbalance = this.curbalance
|
|
774
|
+
this.$dispatch('no-button')
|
|
775
|
+
sellgasGen(this)
|
|
776
|
+
}
|
|
777
|
+
})
|
|
778
|
+
},
|
|
779
|
+
eticket_toggle () {
|
|
780
|
+
this.eticket_show = false
|
|
781
|
+
this.$dispatch('success', '卡表收费')
|
|
782
|
+
},
|
|
783
|
+
clean () {
|
|
784
|
+
this.$info('取消操作')
|
|
785
|
+
this.$dispatch('refresh', this.row)
|
|
786
|
+
},
|
|
787
|
+
validateBill (val) {
|
|
788
|
+
this.validateOk = !val.isOk
|
|
789
|
+
this.billData.bill = val.bill
|
|
790
|
+
},
|
|
791
|
+
printok () {
|
|
792
|
+
this.$dispatch('success', '卡表收费')
|
|
793
|
+
},
|
|
794
|
+
pregas (val) {
|
|
795
|
+
this.dymoney = 0
|
|
796
|
+
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
797
|
+
try {
|
|
798
|
+
// 对气量进行验证
|
|
799
|
+
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
800
|
+
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
801
|
+
this.model.f_pregas = null
|
|
802
|
+
} else if ((this.model.f_pregas - 0) - (this.mingas - 0) < 0) {
|
|
803
|
+
this.$showAlert(`注意:购气量最少为:${this.mingas}m³`, 'warning', 3000)
|
|
804
|
+
} else {
|
|
805
|
+
pregasGen(this)
|
|
806
|
+
if (this.config.quickSale) {
|
|
807
|
+
this.$els.fcollection.focus()
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
} catch (error) {
|
|
811
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
812
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
813
|
+
}
|
|
814
|
+
} else {
|
|
815
|
+
this.model.f_pregas = null
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
preamount () {
|
|
819
|
+
this.dymoney = 0
|
|
820
|
+
this.model.f_price_id = this.row.f_price_id
|
|
821
|
+
this.model.f_user_id = this.row.f_user_id
|
|
822
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
823
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
824
|
+
try {
|
|
825
|
+
preamountGen(this)
|
|
826
|
+
} catch (error) {
|
|
827
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
828
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
calText (val, getDeduct = 0) {
|
|
832
|
+
let str = ''
|
|
833
|
+
let num = 0
|
|
834
|
+
val.forEach((item) => {
|
|
835
|
+
if (item.f_gas > 0) {
|
|
836
|
+
num = num + 1
|
|
837
|
+
}
|
|
838
|
+
if (this.row.f_isdecimal === '是') {
|
|
839
|
+
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
840
|
+
} else {
|
|
841
|
+
str = str + item.f_price + ' x ' + Math.floor(item.f_gas) + '+'
|
|
842
|
+
}
|
|
843
|
+
})
|
|
844
|
+
if (getDeduct > 0) {
|
|
845
|
+
if ((this.model.f_pregas * this.row.f_gas_type) > this.row.f_project_money) {
|
|
846
|
+
this.deductdetail = '当前未结金额' + this.row.f_project_money + '元,不足抵扣,以未结金额为准'
|
|
847
|
+
} else {
|
|
848
|
+
this.deductdetail = '未结金额计算公式:' + this.row.f_gas_type + ' x ' + this.model.f_pregas + '=' + getDeduct
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
str = str.slice(0, str.length - 1)
|
|
852
|
+
this.calculatedetail = str
|
|
853
|
+
if (num > 1) {
|
|
854
|
+
if (this.$login.r.find(item => item == '阶梯提示无按钮')) {
|
|
855
|
+
this.$showAlert('友好提示:本次购气已跨阶梯 计算公式:' + (this.calculatedetail ? this.calculatedetail : ' 暂无'), 'warning', 3000)
|
|
856
|
+
} else {
|
|
857
|
+
this.$showMessage('友好提示:本次购气已跨阶梯 计算公式:' + (this.calculatedetail ? this.calculatedetail : ' 暂无'), ['confirm', 'cancel'])
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
close () {
|
|
862
|
+
this.print = false
|
|
863
|
+
this.clean()
|
|
864
|
+
},
|
|
865
|
+
paymentchange () {
|
|
866
|
+
if (JSON.stringify(this.model.f_payment).indexOf('转账') !== -1) {
|
|
867
|
+
// 进入转账筛选条件
|
|
868
|
+
this.model.f_banktransfer_person = ''
|
|
869
|
+
this.model.f_banktransfer_date = ''
|
|
870
|
+
this.BankTransfer = true
|
|
871
|
+
} else {
|
|
872
|
+
this.model.f_banktransfer_person = ''
|
|
873
|
+
this.model.f_banktransfer_date = ''
|
|
874
|
+
this.BankTransfer = false
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
// 根据选择的付款方式 获取优惠列表
|
|
878
|
+
async getPrivilegeList () {
|
|
879
|
+
// 初始化下拉选择列表
|
|
880
|
+
this.privilegeList = [{label: '无优惠', value: '0'}]
|
|
881
|
+
// 初始为无优惠
|
|
882
|
+
this.model.f_privilege_id = '0'
|
|
883
|
+
if (this.model.f_payment && this.model.f_payment.length) {
|
|
884
|
+
// 查询条件
|
|
885
|
+
let payments = JSON.stringify(this.model.f_payment)
|
|
886
|
+
payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
|
|
887
|
+
let HttpReset = new HttpResetClass()
|
|
888
|
+
let privilege = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
|
|
889
|
+
data: {
|
|
890
|
+
items: 'id,f_privilege_name,f_privilege_type',
|
|
891
|
+
tablename: 't_privilege',
|
|
892
|
+
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 = '有效'`,
|
|
893
|
+
orderitem: 'id'
|
|
894
|
+
}
|
|
895
|
+
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
896
|
+
// 查询结果放到下拉列表
|
|
897
|
+
for (let p of privilege.data) {
|
|
898
|
+
this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
|
|
899
|
+
}
|
|
900
|
+
this.privilegeCalculate()
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
// 优惠计算
|
|
904
|
+
async privilegeCalculate () {
|
|
905
|
+
// 初始化减免金额
|
|
906
|
+
this.model.f_privilege_money = 0
|
|
907
|
+
this.model.f_after_discount = this.model.f_collection
|
|
908
|
+
// 判断是否是自定义优惠
|
|
909
|
+
if (parseInt(this.model.f_privilege_id)) {
|
|
910
|
+
for (let p of this.privilegeList) {
|
|
911
|
+
if (p.value == this.model.f_privilege_id && p.type == '自定义') {
|
|
912
|
+
this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
|
|
913
|
+
if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
|
|
914
|
+
this.$showMessage('金额输入格式不正确!')
|
|
915
|
+
this.model.f_privilege_money = 0
|
|
916
|
+
return
|
|
917
|
+
}
|
|
918
|
+
if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
|
|
919
|
+
this.$showMessage('减免金额不能大于等于收款金额')
|
|
920
|
+
this.model.f_privilege_money = 0
|
|
921
|
+
return
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
// 优惠方式, 收款 缺一不计算
|
|
927
|
+
if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
|
|
928
|
+
let c = {
|
|
929
|
+
f_privilege_id: this.model.f_privilege_id,
|
|
930
|
+
f_collection: this.model.f_collection,
|
|
931
|
+
f_privilege_money: this.model.f_privilege_money
|
|
932
|
+
}
|
|
933
|
+
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculatePrivilege', c, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
934
|
+
// 减免金额
|
|
935
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
936
|
+
// 减免后收款金额
|
|
937
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
// 判断当前用户是否可以使用系统余额透支
|
|
941
|
+
canOverdraftBalance () {
|
|
942
|
+
return this.config.overdraftBalance && this.row.f_user_type != '民用'
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
computed: {
|
|
946
|
+
authArr () {
|
|
947
|
+
return this.$login.r ? this.$login.r : []
|
|
948
|
+
},
|
|
949
|
+
'curbalance' () {
|
|
950
|
+
if (this.model.f_payment == '赠气') {
|
|
951
|
+
return this.model.f_balance
|
|
952
|
+
}
|
|
953
|
+
if (this.model.f_preamount) {
|
|
954
|
+
if (this.config.calculatePreByCollection) {
|
|
955
|
+
return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
|
|
956
|
+
}
|
|
957
|
+
// if (this.row.f_collection_type === '按金额') {
|
|
958
|
+
// return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
959
|
+
// } else {
|
|
960
|
+
if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
961
|
+
return ((this.row.f_balance - 0) - (this.model.f_preamount - 0) + (this.model.f_collection - 0)).toFixed(4)
|
|
962
|
+
} else {
|
|
963
|
+
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
964
|
+
}
|
|
965
|
+
// return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
966
|
+
// }
|
|
967
|
+
} else {
|
|
968
|
+
return this.row.f_balance
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
'invoice_show_gas' () {
|
|
972
|
+
return this.row.f_collection_type === '按气量' ? '是' : '否'
|
|
973
|
+
},
|
|
974
|
+
'islegal' () {
|
|
975
|
+
console.log('支付分离。。。', this.paymentModel.length, this.model.f_collection)
|
|
976
|
+
if (this.paymentModel.length > 1 && this.model.f_collection) {
|
|
977
|
+
let sum = 0
|
|
978
|
+
this.paymentModel.forEach((res) => {
|
|
979
|
+
sum += (res.f_money - 0)
|
|
980
|
+
})
|
|
981
|
+
return (this.model.f_collection - 0) === (sum - 0)
|
|
982
|
+
} else {
|
|
983
|
+
return true
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
</script>
|
|
989
|
+
|
|
990
|
+
<style>
|
|
991
|
+
</style>
|