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