sale-client 4.2.44 → 4.2.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/5.2.1/gc.properties +0 -0
- package/.gradle/8.10/checksums/checksums.lock +0 -0
- package/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
- package/.gradle/8.10/fileChanges/last-build.bin +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
- package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- package/.gradle/8.10/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/.gradle/file-system.probe +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/build/dev-server.js +31 -50
- package/index.html +2 -7
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
- 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/machineHandManage/ArrearsQuery.vue +938 -938
- 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/bazhong/UserInfoDetailManageNew.vue +245 -245
- package/src/filiale/bazhong/ic_detail/ChangeMeterQueryUser.vue +370 -370
- package/src/filiale/bazhong/sale.js +8 -8
- package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
- package/src/filiale/jinhong/CardMeterCenterInner.vue +5 -0
- package/src/filiale/jinhong/IOTMeterCenterInner.vue +597 -592
- package/src/filiale/jinhong/InsuranceTemp.vue +2 -3
- package/src/filiale/jinhong/MachineMeterCenter.vue +5 -0
- package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
- package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
- package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
- package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
- package/src/filiale/qingjian/FileUserFiles.vue +5 -2
- package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
- package/src/filiale/ronghao/CardService.js +2144 -2144
- 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/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/replacementSingleInfoOperation.vue +315 -315
- package/src/filiale/ronghao/specificInformation.vue +537 -537
- package/src/filiale/yangchun/ChargeList.vue +954 -954
- package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
- package/src/filiale/zhongsheng/BlackListList.vue +293 -293
- package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
- package/src/main.js +1 -1
- package/src/plugins/CardService.js +2217 -2217
|
@@ -230,706 +230,711 @@ import {HttpResetClass} from 'vue-client'
|
|
|
230
230
|
self.model.f_preamount = calFee
|
|
231
231
|
self.model.f_collection = self.model.f_totalcost
|
|
232
232
|
} */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
} else {
|
|
241
|
-
self.model.f_pregas = (getGas.data.gas - 0).toFixed(self.row.f_gas_decimal || 4)
|
|
242
|
-
}
|
|
243
|
-
self.dymoney = 0
|
|
233
|
+
let preamountGen = async function (self) {
|
|
234
|
+
let calFee = self.model.f_preamount
|
|
235
|
+
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
236
|
+
if (getGas.data.gas) {
|
|
237
|
+
if (self.row.f_isdecimal === '是') {
|
|
238
|
+
if (self.row.f_alias === 'QiaoSong') {
|
|
239
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
|
|
244
240
|
} else {
|
|
241
|
+
self.model.f_pregas = (getGas.data.gas - 0).toFixed(self.row.f_gas_decimal || 4)
|
|
242
|
+
}
|
|
243
|
+
self.dymoney = 0
|
|
244
|
+
} else {
|
|
245
245
|
// 如果不支持小数,将划价出的多余非整数气量进行划价为金额
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
253
|
-
self.dymoney = 0
|
|
246
|
+
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
247
|
+
if (getGas.data.gas > tempnum) { // getGas.data.gas-tempnum-0
|
|
248
|
+
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
249
|
+
if (dymoney1.data.money) {
|
|
250
|
+
self.dymoney = (getGas.data.money - 0).toFixed(2) - (dymoney1.data.money - 0).toFixed(2)
|
|
254
251
|
}
|
|
255
|
-
|
|
252
|
+
} else {
|
|
253
|
+
self.dymoney = 0
|
|
256
254
|
}
|
|
255
|
+
self.model.f_pregas = Math.floor(getGas.data.gas - 0)
|
|
257
256
|
}
|
|
257
|
+
}
|
|
258
258
|
// 不划气量,归零
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
if (self.config.priceCalculation) {
|
|
260
|
+
self.model.f_pregas = 0
|
|
261
|
+
}
|
|
262
|
+
self.model.f_totalcost = ((self.row.f_balance - 0) > (self.model.f_preamount - 0) ? 0 : ((self.model.f_preamount - 0) - (self.row.f_balance - 0)).toFixed(self.row.f_fee_decimal || 4))
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
self.model.chargeprice = getGas.data.chargeprice
|
|
265
|
+
Object.assign(self.model, self.model, getGas.data)
|
|
266
|
+
self.model.f_totalcost = ((self.model.f_totalcost - 0) - (self.dymoney - 0) + (self.alldue_fee - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
267
|
+
if (self.config.floor) {
|
|
268
|
+
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
269
|
+
}
|
|
270
|
+
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
271
|
+
self.model.f_collection = self.model.f_totalcost
|
|
272
|
+
self.model.f_preamount = ((getGas.data.chargenum - 0) - (self.dymoney - 0))
|
|
273
|
+
if (self.model.f_payment == '赠气') {
|
|
274
|
+
self.model.f_totalcost = self.model.f_preamount
|
|
275
|
+
self.model.f_collection = 0
|
|
276
|
+
}
|
|
277
|
+
self.calText(getGas.data.chargeprice)
|
|
278
|
+
}
|
|
279
|
+
// 输入气量,换算金额
|
|
280
|
+
let pregasGen = async function (self) {
|
|
281
|
+
if (self.row.f_isdecimal === '是') {
|
|
282
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(self.row.f_gas_decimal || 4)
|
|
283
|
+
} else {
|
|
284
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
285
|
+
}
|
|
286
|
+
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
287
|
+
self.model.f_meter_type = self.row.f_meter_type
|
|
288
|
+
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
289
|
+
self.model.f_preamount = getAmount.data.chargenum
|
|
290
|
+
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)
|
|
291
|
+
self.model.f_totalcost = ((self.model.f_totalcost - 0) + (self.alldue_fee - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
292
|
+
Object.assign(self.model, self.model, getAmount.data)
|
|
293
|
+
self.model.chargeprice = getAmount.data.chargeprice
|
|
267
294
|
if (self.config.floor) {
|
|
268
295
|
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
269
296
|
}
|
|
270
|
-
// self.model.f_totalcost=Math.ceil(self.model.f_totalcost)
|
|
271
297
|
self.model.f_collection = self.model.f_totalcost
|
|
272
|
-
self.model.f_preamount = ((getGas.data.chargenum - 0) - (self.dymoney - 0))
|
|
273
298
|
if (self.model.f_payment == '赠气') {
|
|
274
|
-
self.model.f_totalcost =
|
|
299
|
+
self.model.f_totalcost = getAmount.data.chargenum
|
|
275
300
|
self.model.f_collection = 0
|
|
276
|
-
}
|
|
277
|
-
self.calText(getGas.data.chargeprice)
|
|
278
|
-
}
|
|
279
|
-
// 输入气量,换算金额
|
|
280
|
-
let pregasGen = async function (self) {
|
|
281
|
-
if (self.row.f_isdecimal === '是') {
|
|
282
|
-
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(self.row.f_gas_decimal || 4)
|
|
283
|
-
} else {
|
|
284
|
-
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
285
|
-
}
|
|
286
|
-
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
287
|
-
self.model.f_meter_type = self.row.f_meter_type
|
|
288
|
-
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
289
|
-
self.model.f_preamount = getAmount.data.chargenum
|
|
290
|
-
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)
|
|
291
|
-
self.model.f_totalcost = ((self.model.f_totalcost - 0) + (self.alldue_fee - 0)).toFixed(self.row.f_fee_decimal || 4)
|
|
292
|
-
Object.assign(self.model, self.model, getAmount.data)
|
|
293
|
-
self.model.chargeprice = getAmount.data.chargeprice
|
|
294
|
-
if (self.config.floor) {
|
|
295
|
-
self.model.f_totalcost = Math.ceil(self.model.f_totalcost)
|
|
296
|
-
}
|
|
297
|
-
self.model.f_collection = self.model.f_totalcost
|
|
298
|
-
if (self.model.f_payment == '赠气') {
|
|
299
|
-
self.model.f_totalcost = getAmount.data.chargenum
|
|
300
|
-
self.model.f_collection = 0
|
|
301
|
-
}
|
|
302
|
-
self.calText(getAmount.data.chargeprice)
|
|
303
301
|
}
|
|
302
|
+
self.calText(getAmount.data.chargeprice)
|
|
304
303
|
}
|
|
304
|
+
}
|
|
305
305
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
306
|
+
let IOTChargeGen = async function (self) {
|
|
307
|
+
try {
|
|
308
|
+
if (self.paymentModel.length === 0) {
|
|
309
|
+
self.paymentModel = [{
|
|
310
|
+
f_payment: self.model.f_payment[0],
|
|
311
|
+
f_money: self.model.f_preamount
|
|
312
|
+
}]
|
|
313
|
+
}
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
self.model.payments = self.paymentModel
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
317
|
+
let param = Object.assign({}, {}, self.model)
|
|
318
|
+
param.f_payment = self.model.f_payment.toString()
|
|
319
|
+
param.alldue_fee = self.alldue_fee
|
|
320
|
+
param.f_print = self.model.f_print.toString()
|
|
321
|
+
param.f_serial_number = self.model.f_serial_number ? self.model.f_serial_number : ''
|
|
322
322
|
// 加入扫码盒付款码支付流水号
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
323
|
+
param.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
|
|
324
|
+
if (self.insurance && self.insurance.f_money_all > 0) {
|
|
325
|
+
self.model.f_total_ins_charge = self.model.f_total_ins_charge == null ? 0 : self.model.f_total_ins_charge
|
|
326
|
+
self.model.f_operat_type = '保险'
|
|
327
|
+
self.model.f_fee_type = '保险收费'
|
|
328
|
+
self.model.f_last_insexpiration_date = self.model.f_ins_stop_date
|
|
329
|
+
self.model.f_insurance_type = self.insurance.f_insurance_type
|
|
330
|
+
self.model.f_ins_start_date = self.insurance.f_ins_start_date
|
|
331
|
+
self.model.f_expiration_date = self.insurance.f_expiration_date
|
|
332
|
+
self.model.f_salecount = self.insurance.f_salecount
|
|
333
|
+
self.model.f_money = self.insurance.f_money_all
|
|
334
|
+
self.model.f_insurance_company = self.insurance.f_insurance_company
|
|
335
|
+
self.model.f_insurance_number = self.insurance.f_insurance_number
|
|
336
|
+
param.insurance = Object.assign({}, {}, self.model)
|
|
337
|
+
param.insurance.f_payment = self.model.f_payment[0]
|
|
338
|
+
param.insurance.f_userinfo_code = self.row.f_userinfo_code
|
|
339
|
+
param.insurance.f_idnumber = self.row.f_idnumber
|
|
340
|
+
param.insurance.f_user_phone = self.row.f_user_phone
|
|
341
|
+
param.insurance.f_state = '有效'
|
|
342
|
+
param.insurance.f_receivable = self.insurance.f_money_all
|
|
343
|
+
param.insurance.f_user_name = self.row.f_user_name
|
|
344
|
+
param.insurance.f_opreator = self.$login.f.name
|
|
345
345
|
// await self.$resetpost('api/af-revenue/logic/saveInsInfo', {data: self.model})
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
}
|
|
347
|
+
if (self.garbagelist && self.garbagefee > 0) {
|
|
348
|
+
param.garbagelist = self.garbagelist
|
|
349
|
+
param.money = self.garbagefee
|
|
350
350
|
// console.log(self.garbagelist,self.garbagefee)
|
|
351
351
|
// await self.$resetpost('api/af-revenue/logic/savegarbageFee', {model:self.model, garbage:self.garbagelist, money:self.garbagefee})
|
|
352
|
+
}
|
|
353
|
+
let res = await self.$resetpost('api/af-revenue/logic/sale_IOTCharge_logic', {data: param}, {
|
|
354
|
+
resolveMsg: '物联网收费成功!!',
|
|
355
|
+
rejectMsg: '物联网收费出错!!!'
|
|
356
|
+
})
|
|
357
|
+
let localeSustainMoney = window.localStorage.getItem('sustainMoney')
|
|
358
|
+
if (localeSustainMoney != null) {
|
|
359
|
+
localeSustainMoney = (localeSustainMoney - 0) + (param.f_collection - 0)
|
|
360
|
+
window.localStorage.setItem('sustainMoney', localeSustainMoney)
|
|
361
|
+
}
|
|
362
|
+
if (self.config.showupload) {
|
|
363
|
+
let param1 = []
|
|
364
|
+
for (let row of self.resid) {
|
|
365
|
+
param1.push({id: row.id})
|
|
352
366
|
}
|
|
353
|
-
let
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
})
|
|
357
|
-
let localeSustainMoney = window.localStorage.getItem('sustainMoney')
|
|
358
|
-
if (localeSustainMoney != null) {
|
|
359
|
-
localeSustainMoney = (localeSustainMoney - 0) + (param.f_collection - 0)
|
|
360
|
-
window.localStorage.setItem('sustainMoney', localeSustainMoney)
|
|
361
|
-
}
|
|
362
|
-
if (self.config.showupload) {
|
|
363
|
-
let param1 = []
|
|
364
|
-
for (let row of self.resid) {
|
|
365
|
-
param1.push({id: row.id})
|
|
366
|
-
}
|
|
367
|
-
let data = {
|
|
368
|
-
param: param1,
|
|
369
|
-
f_blobid: res.data.id
|
|
370
|
-
}
|
|
371
|
-
await self.$resetpost('api/af-revenue/logic/updatefiles', data)
|
|
367
|
+
let data = {
|
|
368
|
+
param: param1,
|
|
369
|
+
f_blobid: res.data.id
|
|
372
370
|
}
|
|
371
|
+
await self.$resetpost('api/af-revenue/logic/updatefiles', data)
|
|
372
|
+
}
|
|
373
373
|
// 开始打票
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
374
|
+
console.log('开始打票', self.config)
|
|
375
|
+
if (self.config.hasPrint) {
|
|
376
|
+
if (self.printInvoiceType.indexOf(self.model.f_print) === -1) {
|
|
377
|
+
console.log('self.config.hasBillManage', self.config.hasBillManage)
|
|
378
|
+
if (self.$login.r.includes('非民用纸质票据拆分')) {
|
|
379
|
+
if (self.row.f_user_type === '非民用') {
|
|
380
|
+
self.billData.url = 'api/af-revenue/report/fmy_iot_bill'
|
|
382
381
|
}
|
|
383
|
-
|
|
382
|
+
}
|
|
383
|
+
if (self.config.hasBillManage) {
|
|
384
384
|
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
385
|
+
self.row.id = res.data.id
|
|
386
|
+
self.row.f_bill_type = '物联网收费'
|
|
387
|
+
self.row.f_bill_style = self.model.f_print[0]
|
|
388
|
+
self.print = true
|
|
389
|
+
} else {
|
|
390
|
+
self.row.id = res.data.id
|
|
391
|
+
self.print = true
|
|
392
|
+
}
|
|
393
|
+
} else if (self.config.printType === '国税发票') {
|
|
394
394
|
// TODO
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
} else if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
|
|
396
|
+
self.eticket_show = true
|
|
397
|
+
self.row.f_print = self.model.f_print[0]
|
|
398
|
+
await self.$refs.eticketbill.openETicket(res.data.id, self.row, '物联网收费', '征税', self.model.f_print[0])
|
|
399
399
|
// self.$CommonService.openEticket(res.data.id, '其他收费')
|
|
400
400
|
// self.$dispatch('success')
|
|
401
|
-
}
|
|
402
|
-
} else {
|
|
403
|
-
self.$dispatch('success', '物联网收费', self.row)
|
|
404
401
|
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
self.$showAlert(error, 'danger', 0)
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
402
|
+
} else {
|
|
403
|
+
self.$dispatch('success', '物联网收费', self.row)
|
|
404
|
+
}
|
|
405
|
+
} catch (error) {
|
|
406
|
+
if (error.status === 301) {
|
|
414
407
|
self.$dispatch('refresh')
|
|
408
|
+
} else {
|
|
409
|
+
if (error) {
|
|
410
|
+
self.$showAlert(error, 'danger', 0)
|
|
411
|
+
}
|
|
415
412
|
}
|
|
413
|
+
|
|
414
|
+
self.$dispatch('refresh')
|
|
416
415
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
416
|
+
}
|
|
417
|
+
let asyncCardMeterCenter = async function (self) {
|
|
418
|
+
await self.$getConfig(self, 'ChangeMeter')
|
|
419
|
+
await self.$getConfig(self, 'IOTMeterCenter')
|
|
420
420
|
|
|
421
421
|
// 添加 “系统余额透支” 付款方式
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}
|
|
422
|
+
let i = -1
|
|
423
|
+
for (const index in self.paytype) {
|
|
424
|
+
if (self.paytype[index].value == '系统余额透支') {
|
|
425
|
+
i = index
|
|
426
|
+
break
|
|
428
427
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
} else {
|
|
437
|
-
if (i != -1) {
|
|
438
|
-
self.paytype.splice(i, 1)
|
|
439
|
-
}
|
|
428
|
+
}
|
|
429
|
+
if (self.canOverdraftBalance()) {
|
|
430
|
+
if (i == -1) {
|
|
431
|
+
self.paytype.push({
|
|
432
|
+
label: '系统余额透支',
|
|
433
|
+
value: '系统余额透支'
|
|
434
|
+
})
|
|
440
435
|
}
|
|
436
|
+
} else {
|
|
437
|
+
if (i != -1) {
|
|
438
|
+
self.paytype.splice(i, 1)
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
441
|
|
|
442
442
|
// 默认打印格式
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
443
|
+
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
444
|
+
self.model.f_payment = [self.config.payment]
|
|
445
|
+
self.mulPrint = self.config.printType instanceof Array
|
|
446
446
|
|
|
447
447
|
// 获取当前票号用
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
448
|
+
self.model.f_use_type = self.config.billType
|
|
449
|
+
self.model.f_bill_type = self.model.f_print
|
|
450
|
+
self.hasValidateBill = self.config.hasBillManage
|
|
451
451
|
|
|
452
452
|
// 判断限购
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
453
|
+
let limit_param = {
|
|
454
|
+
f_userinfo_id: self.row.f_userinfo_id,
|
|
455
|
+
f_user_id: self.row.f_user_id,
|
|
456
|
+
f_stairprice_id: self.row.f_stairprice_id
|
|
457
|
+
}
|
|
458
|
+
let getLimit = await self.$resetpost('api/af-revenue/logic/sale_getLimitGas', {data: limit_param}, {resolveMsg: null, rejectMsg: '获取限购值失败!!'})
|
|
459
|
+
console.log('获取限购值', getLimit)
|
|
460
|
+
self.hasLimit = getLimit.data.hasLimit
|
|
461
|
+
if (self.hasLimit) {
|
|
462
|
+
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
463
|
+
if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
|
|
464
|
+
self.maxmoney = 0
|
|
465
|
+
self.limitmoney = true
|
|
466
|
+
console.log(self.maxmoney, self.limitmoney)
|
|
467
|
+
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
468
468
|
|
|
469
469
|
// self.$dispatch('refresh')
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
}
|
|
470
|
+
} else {
|
|
471
|
+
if (getLimit.data.f_limit_value) {
|
|
472
|
+
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
473
|
+
self.limitgas = true
|
|
474
|
+
}
|
|
475
|
+
if (getLimit.data.f_limit_amount) {
|
|
476
|
+
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
477
|
+
self.limitmoney = true
|
|
479
478
|
}
|
|
480
479
|
}
|
|
481
480
|
}
|
|
481
|
+
}
|
|
482
482
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
483
|
+
if (self.config.hasArrearsChange) {
|
|
484
|
+
let http = new HttpResetClass()
|
|
485
|
+
let res = await http.load('POST', 'api/af-revenue/logic/sale_getOwe', {data: {f_userinfo_id: self.row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: '获取欠费出错!!'})
|
|
486
|
+
let owes = []
|
|
487
|
+
for (let i = 0; i < res.data.length; i++) {
|
|
488
|
+
for (let j = 0; j < res.data[i].rows.length; j++) {
|
|
489
|
+
owes.push(res.data[i].rows[j])
|
|
491
490
|
}
|
|
492
|
-
console.log('获取到的欠费记录', owes)
|
|
493
|
-
self.alldue_fee = owes.reduce((total, item) => {
|
|
494
|
-
return total + (item.f_oughtfee + item.overdue - item.f_debt_money)
|
|
495
|
-
}, 0)
|
|
496
|
-
console.log('总欠费金额为', self.alldue_fee)
|
|
497
|
-
self.owes = res.data
|
|
498
491
|
}
|
|
492
|
+
console.log('获取到的欠费记录', owes)
|
|
493
|
+
self.alldue_fee = owes.reduce((total, item) => {
|
|
494
|
+
return total + (item.f_oughtfee + item.overdue - item.f_debt_money)
|
|
495
|
+
}, 0)
|
|
496
|
+
console.log('总欠费金额为', self.alldue_fee)
|
|
497
|
+
self.owes = res.data
|
|
499
498
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
499
|
+
}
|
|
500
|
+
export default {
|
|
501
|
+
title: '物联网收费',
|
|
502
|
+
data () {
|
|
503
|
+
return {
|
|
504
|
+
resid: [], // 存放新增的f_files表中id
|
|
505
|
+
config: {
|
|
506
|
+
notShowFormula: false, // 不显示计算公式,默认显示
|
|
507
|
+
priceCalculation: false, // 划气量控制
|
|
508
|
+
showupload: true, // 默认显示附件上传组件
|
|
509
|
+
hasPrint: false, // 默认打票
|
|
510
|
+
quickSale: false, // enter键快捷收费
|
|
511
|
+
taxforidnumber: true, // 身份证号同步到纳税人识别号
|
|
512
|
+
floor: true, // 是否取整收费
|
|
513
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
514
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
515
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
516
|
+
payment: '',
|
|
517
|
+
hasArrearsChange: false, // 是否可以有欠费换表 收费时用来判断是否查询旧表欠费
|
|
518
|
+
overdraftBalance: false, // 是否支持系统余额透支
|
|
519
|
+
calculatePreByCollection: false // 可以更具收款来反向计算预购
|
|
520
|
+
},
|
|
521
|
+
model: {
|
|
522
|
+
f_purchase: 0,
|
|
523
|
+
f_payment: [],
|
|
524
|
+
f_pregas: 0,
|
|
525
|
+
f_preamount: 0,
|
|
526
|
+
f_totalcost: 0,
|
|
527
|
+
f_curbalance: 0,
|
|
528
|
+
f_collection: '',
|
|
529
|
+
f_balance: 0,
|
|
530
|
+
f_print: [],
|
|
531
|
+
f_meter_type: '',
|
|
532
|
+
f_voucher_number: '',
|
|
533
|
+
f_privilege_id: 0,
|
|
534
|
+
f_privilege_money: 0,
|
|
535
|
+
f_after_discount: 0,
|
|
536
|
+
f_sys_balance: 0
|
|
537
|
+
},
|
|
538
|
+
randomBusinessId: '',
|
|
539
|
+
eticket_msg: false,
|
|
540
|
+
eticket_show: false,
|
|
541
|
+
invoice_is_pax: '不征税',
|
|
542
|
+
is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
|
|
543
543
|
|
|
544
|
-
|
|
545
|
-
|
|
544
|
+
sumCollection: 0,
|
|
545
|
+
calculatedetail: '',
|
|
546
546
|
// 启用发票管理需要对票号进行验证
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
547
|
+
hasValidateBill: false,
|
|
548
|
+
validateOk: false,
|
|
549
|
+
alldue_fee: 0, // 欠费金额
|
|
550
|
+
owes: [], // 欠费未交记录
|
|
551
|
+
print: false,
|
|
552
|
+
billData: {
|
|
553
|
+
url: 'api/af-revenue/report/iot_bill',
|
|
554
|
+
operator: this.$login.f.name,
|
|
555
|
+
billnumber: ''
|
|
556
|
+
},
|
|
557
|
+
hasLimit: false,
|
|
558
|
+
maxgas: 99999999, // 限购
|
|
559
|
+
maxmoney: 99999999,
|
|
560
|
+
limitmoney: false,
|
|
561
|
+
limitgas: false,
|
|
562
|
+
paymentModel: [], // 多笔付款方式
|
|
563
563
|
|
|
564
|
-
|
|
565
|
-
|
|
564
|
+
mulPrint: false,
|
|
565
|
+
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
566
566
|
// 下拉框值
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
567
|
+
paytype: this.$appdata.getParam('付款方式'),
|
|
568
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
569
|
+
printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
|
|
570
|
+
privilegeList: [{label: '无优惠', value: '0'}],
|
|
571
|
+
showfiles: false,
|
|
572
|
+
serialShow: false,
|
|
573
|
+
mjshow: false,
|
|
574
|
+
dymoney: 0
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
components: {OweList},
|
|
578
|
+
props: ['row', 'garbagelist', 'garbagefee', 'insurance'],
|
|
579
|
+
mounted () {
|
|
580
|
+
this.$refs.email.focus()
|
|
581
|
+
},
|
|
582
|
+
ready () {
|
|
583
|
+
this.paytype = this.$appdata.getParam('付款方式')
|
|
584
|
+
if (!this.$login.r.includes('免交充值付款')) {
|
|
585
|
+
this.paytype = this.paytype.filter((item) => {
|
|
586
|
+
return item.label != '免交'
|
|
587
|
+
})
|
|
588
|
+
}
|
|
589
589
|
// this.getPurchase()
|
|
590
|
+
this.sumCollection = (this.model.f_collection - 0) + (this.insurance.f_money_all - 0) + (this.garbagefee - 0)
|
|
591
|
+
this.model.f_price_id = this.row.f_price_id
|
|
592
|
+
this.model.f_user_id = this.row.f_user_id
|
|
593
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
594
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
595
|
+
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
596
|
+
this.model.f_preamount = ''
|
|
597
|
+
this.model.f_pregas = ''
|
|
598
|
+
document.getElementById('f_preamount').focus()
|
|
599
|
+
asyncCardMeterCenter(this)
|
|
600
|
+
this.getRandomId()
|
|
601
|
+
},
|
|
602
|
+
watch: {
|
|
603
|
+
'insurance.f_money_all' () {
|
|
604
|
+
// 获取计算优惠
|
|
605
|
+
this.getPrivilegeList()
|
|
590
606
|
this.sumCollection = (this.model.f_collection - 0) + (this.insurance.f_money_all - 0) + (this.garbagefee - 0)
|
|
591
|
-
this.model.f_price_id = this.row.f_price_id
|
|
592
|
-
this.model.f_user_id = this.row.f_user_id
|
|
593
|
-
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
594
|
-
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
595
|
-
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
596
|
-
this.model.f_preamount = ''
|
|
597
|
-
this.model.f_pregas = ''
|
|
598
|
-
document.getElementById('f_preamount').focus()
|
|
599
|
-
asyncCardMeterCenter(this)
|
|
600
|
-
this.getRandomId()
|
|
601
607
|
},
|
|
602
|
-
|
|
603
|
-
'insurance.f_money_all'(){
|
|
604
|
-
// 获取计算优惠
|
|
605
|
-
this.getPrivilegeList()
|
|
606
|
-
this.sumCollection = (this.model.f_collection - 0) + (this.insurance.f_money_all - 0) + (this.garbagefee - 0)
|
|
607
|
-
},
|
|
608
|
-
'garbagefee'(){
|
|
608
|
+
'garbagefee' () {
|
|
609
609
|
// 获取计算优惠
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
610
|
+
this.getPrivilegeList()
|
|
611
|
+
this.sumCollection = (this.model.f_collection - 0) + (this.insurance.f_money_all - 0) + (this.garbagefee - 0)
|
|
612
|
+
},
|
|
613
|
+
'model.f_payment.length' (val) {
|
|
614
|
+
console.log('付款方式多选。。', val)
|
|
615
|
+
if (val > 1 && !this.model.f_preamount) {
|
|
616
|
+
this.model.f_payment = ['现金缴费']
|
|
617
|
+
this.$showAlert('请先计算付款金额', 'warning', 2000)
|
|
618
|
+
} else {
|
|
619
|
+
this.paymentModel = []
|
|
620
|
+
console.log(this.model.f_payment)
|
|
621
|
+
this.model.f_payment.forEach((res) => {
|
|
622
|
+
let temp = {
|
|
623
|
+
f_payment: res,
|
|
624
|
+
f_money: 0
|
|
625
|
+
}
|
|
626
|
+
this.paymentModel.push(temp)
|
|
627
|
+
})
|
|
628
|
+
this.$resetValidation()
|
|
629
629
|
|
|
630
630
|
// 获取计算优惠
|
|
631
|
-
this.getPrivilegeList()
|
|
632
|
-
}
|
|
633
|
-
},
|
|
634
|
-
'model.f_collection' (val) {
|
|
635
|
-
// 获取计算优惠
|
|
636
631
|
this.getPrivilegeList()
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
} else {
|
|
650
|
-
this.mjshow = false
|
|
651
|
-
}
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
'model.f_collection' (val) {
|
|
635
|
+
// 获取计算优惠
|
|
636
|
+
this.getPrivilegeList()
|
|
637
|
+
this.sumCollection = (this.model.f_collection - 0) + (this.insurance.f_money_all - 0) + (this.garbagefee - 0)
|
|
638
|
+
},
|
|
639
|
+
'model.f_payment' (val) {
|
|
640
|
+
let _payment = this.$appdata.getSingleValue('需要输入业务单号的付款方式') || ''
|
|
641
|
+
if (val == '免交' || _payment.includes(val)) {
|
|
642
|
+
this.mjshow = true
|
|
643
|
+
} else if (val == '赠气' && (this.model.f_preamount || this.model.f_preamount != '')) {
|
|
652
644
|
if (this.row.f_collection_type == '按气量') {
|
|
653
645
|
this.pregas()
|
|
654
646
|
} else {
|
|
655
647
|
this.preamount()
|
|
656
648
|
}
|
|
649
|
+
} else {
|
|
650
|
+
this.mjshow = false
|
|
657
651
|
}
|
|
658
|
-
|
|
659
|
-
|
|
652
|
+
if (this.row.f_collection_type == '按气量') {
|
|
653
|
+
this.pregas()
|
|
654
|
+
} else {
|
|
655
|
+
this.preamount()
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
events: {
|
|
660
660
|
// 删除Resid数组元素
|
|
661
|
-
|
|
662
|
-
|
|
661
|
+
'delResid' (val) {
|
|
662
|
+
this.resid.$remove({id: val, f_biobid: ''})
|
|
663
663
|
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
664
|
-
|
|
664
|
+
},
|
|
665
665
|
// 增加Resid数组元素
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
666
|
+
'resid' (val) {
|
|
667
|
+
console.log('-=', val)
|
|
668
|
+
this.resid.push({id: val, f_biobid: ''})
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
methods: {
|
|
672
|
+
calculateCollection () {
|
|
673
|
+
if (!isNaN(this.sumCollection) && this.sumCollection > 0) {
|
|
674
|
+
let tempFee = this.sumCollection
|
|
675
|
+
if ((this.garbagefee - 0) > 0) {
|
|
676
|
+
tempFee = (tempFee - 0) - (this.garbagefee - 0)
|
|
677
|
+
}
|
|
678
|
+
if ((this.insurance.f_money_all - 0) > 0) {
|
|
679
|
+
tempFee = (tempFee - 0) - (this.insurance.f_money_all - 0)
|
|
680
|
+
}
|
|
681
|
+
this.model.f_collection = tempFee
|
|
682
|
+
this.calculatePreByCollection()
|
|
669
683
|
}
|
|
670
684
|
},
|
|
671
|
-
methods: {
|
|
672
|
-
calculateCollection () {
|
|
673
|
-
if (!isNaN(this.sumCollection) && this.sumCollection > 0) {
|
|
674
|
-
let tempFee = this.sumCollection
|
|
675
|
-
if ((this.garbagefee - 0) > 0) {
|
|
676
|
-
tempFee = (tempFee - 0) - (this.garbagefee - 0)
|
|
677
|
-
}
|
|
678
|
-
if ((this.insurance.f_money_all - 0) > 0) {
|
|
679
|
-
tempFee = (tempFee - 0) - (this.insurance.f_money_all - 0)
|
|
680
|
-
}
|
|
681
|
-
this.model.f_collection = tempFee
|
|
682
|
-
this.calculatePreByCollection()
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
685
|
// 根据收款金额计算划价信息
|
|
686
686
|
// 需要配置 calculatePreByCollection = true
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
687
|
+
async calculatePreByCollection () {
|
|
688
|
+
if (this.alldue_fee > ((this.model.f_collection - 0) + (this.row.f_balance - 0))) {
|
|
689
|
+
this.$showAlert('收款不能小于旧表机表欠费,请重新输入', 'danger', 5000)
|
|
690
|
+
this.model.f_collection = undefined
|
|
691
|
+
return
|
|
692
|
+
}
|
|
693
|
+
try {
|
|
694
|
+
this.model.f_collection = (this.model.f_collection - 0)
|
|
695
|
+
let calFee = ((this.model.f_collection - 0) + (this.row.f_balance) - (this.alldue_fee)).toFixed(4)
|
|
696
696
|
// 通过收款进行划价
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
704
|
-
this.model.chargeprice = dymoney2.data.chargeprice
|
|
705
|
-
Object.assign(this.model, this.model, dymoney2.data)
|
|
706
|
-
this.model.f_totalcost = dymoney2.data.chargenum
|
|
707
|
-
this.model.f_preamount = dymoney2.data.chargenum
|
|
708
|
-
this.calText(dymoney2.data.chargeprice)
|
|
709
|
-
} catch (error) {
|
|
710
|
-
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
711
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
697
|
+
let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
|
|
698
|
+
if (this.row.f_isdecimal === '是') {
|
|
699
|
+
this.model.f_pregas = (getGas.data.gas - 0).toFixed(this.row.f_gas_decimal || 4)
|
|
700
|
+
} else {
|
|
701
|
+
this.model.f_pregas = parseInt(getGas.data.gas)
|
|
712
702
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
this.
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
703
|
+
let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
|
|
704
|
+
this.model.chargeprice = dymoney2.data.chargeprice
|
|
705
|
+
Object.assign(this.model, this.model, dymoney2.data)
|
|
706
|
+
this.model.f_totalcost = dymoney2.data.chargenum
|
|
707
|
+
this.model.f_preamount = dymoney2.data.chargenum
|
|
708
|
+
this.calText(dymoney2.data.chargeprice)
|
|
709
|
+
} catch (error) {
|
|
710
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
711
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
getRandomId () {
|
|
715
|
+
this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
716
|
+
let res = Math.random() * 16 | 0
|
|
717
|
+
let v = c == 'x' ? res : (res & 0x3 | 0x8)
|
|
718
|
+
return v.toString(16)
|
|
719
|
+
})
|
|
720
|
+
},
|
|
721
721
|
// 校验发票信息
|
|
722
|
-
|
|
723
|
-
|
|
722
|
+
checkInvoiceMsg (flag) {
|
|
723
|
+
if (flag) return
|
|
724
724
|
// 校验是否超出最大透支余额
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
this.model.f_sys_balance = curSysBalance
|
|
725
|
+
if (this.model.f_payment == '系统余额透支') {
|
|
726
|
+
const maxOverdraftBalance = -(((this.$appdata.getSingleValue('最大透支余额') - 0) || 1000) - 0)
|
|
727
|
+
const curSysBalance = ((this.row.f_sys_balance || 0) - 0) - (this.model.f_totalcost - 0)
|
|
728
|
+
if (curSysBalance < maxOverdraftBalance) {
|
|
729
|
+
this.$showAlert('您的系统余额将超出最大透支余额,请使用别的付款方式!', 'danger', 5000)
|
|
730
|
+
return
|
|
733
731
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
this.row.f_paper_name = this.row.f_user_name
|
|
740
|
-
}
|
|
741
|
-
if (!this.row.f_address_phone) {
|
|
742
|
-
this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
|
|
743
|
-
}
|
|
744
|
-
this.eticket_msg = true
|
|
745
|
-
} else {
|
|
746
|
-
this.confirm()
|
|
732
|
+
this.model.f_sys_balance = curSysBalance
|
|
733
|
+
}
|
|
734
|
+
if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
|
|
735
|
+
if (!this.row.f_taxpayer_id && this.config.taxforidnumber) {
|
|
736
|
+
this.row.f_taxpayer_id = this.row.f_idnumber
|
|
747
737
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
this
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
738
|
+
if (!this.row.f_paper_name) {
|
|
739
|
+
this.row.f_paper_name = this.row.f_user_name
|
|
740
|
+
}
|
|
741
|
+
if (!this.row.f_address_phone) {
|
|
742
|
+
this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
|
|
743
|
+
}
|
|
744
|
+
this.eticket_msg = true
|
|
745
|
+
} else {
|
|
746
|
+
this.confirm()
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
eticket_toggle () {
|
|
750
|
+
this.eticket_show = false
|
|
751
|
+
this.$dispatch('success', '物联网收费')
|
|
752
|
+
},
|
|
753
|
+
async confirm () {
|
|
754
|
+
if (this.insurance && this.insurance.f_money_all > 0) {
|
|
755
|
+
if (!this.insurance.f_insurance_company) {
|
|
756
|
+
return this.$showMessage('请填写保险公司')
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
let res = await this.$showMessage(`确定对客户${this.row.f_user_name}进行物联网表缴费吗?`, ['confirm', 'cancel'])
|
|
760
|
+
if (res != 'confirm') return
|
|
756
761
|
// 先调用付款码支付组件流程
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
} else {
|
|
802
|
-
this.model.f_pregas = null
|
|
762
|
+
this.clickConfirm = true
|
|
763
|
+
let ss = await this.$refs.paymentcode.flowPath()
|
|
764
|
+
this.$refs.paymentcode.paymentCodeShow = false
|
|
765
|
+
console.log('付款码操作返回', ss)
|
|
766
|
+
if (!ss.result) return
|
|
767
|
+
this.eticket_msg = false
|
|
768
|
+
this.model.f_curbalance = this.curbalance
|
|
769
|
+
this.$dispatch('no-button')
|
|
770
|
+
console.log('model and row', this.model, this.row)
|
|
771
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
772
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
773
|
+
this.model.f_user_id = this.row.f_user_id
|
|
774
|
+
this.model.userinfo_version = this.row.userinfo_version
|
|
775
|
+
this.model.version = this.row.version
|
|
776
|
+
this.model.f_total_fee = (this.row.f_total_fee - 0) + (this.model.f_preamount - 0)
|
|
777
|
+
this.model.f_total_gas = (this.row.f_total_gas - 0) + (this.model.f_pregas - 0)
|
|
778
|
+
this.model.f_operator = this.$login.f.name
|
|
779
|
+
this.model.f_operatorid = this.$login.f.id
|
|
780
|
+
this.model.f_orgid = this.$login.f.orgid
|
|
781
|
+
this.model.f_orgname = this.$login.f.orgs
|
|
782
|
+
this.model.f_depid = this.$login.f.depids
|
|
783
|
+
this.model.f_depname = this.$login.f.deps
|
|
784
|
+
IOTChargeGen(this)
|
|
785
|
+
},
|
|
786
|
+
clean () {
|
|
787
|
+
this.$info('取消操作')
|
|
788
|
+
this.$dispatch('refresh', this.row)
|
|
789
|
+
},
|
|
790
|
+
validateBill (val) {
|
|
791
|
+
this.validateOk = !val.isOk
|
|
792
|
+
this.billData.bill = val.bill
|
|
793
|
+
},
|
|
794
|
+
printok () {
|
|
795
|
+
this.$dispatch('success', '物联网收费')
|
|
796
|
+
},
|
|
797
|
+
pregas () {
|
|
798
|
+
this.dymoney = 0
|
|
799
|
+
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
800
|
+
try {
|
|
801
|
+
pregasGen(this)
|
|
802
|
+
} catch (error) {
|
|
803
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
804
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
803
805
|
}
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
806
|
+
} else {
|
|
807
|
+
this.model.f_pregas = null
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
preamount () {
|
|
811
|
+
if (this.model.f_preamount && this.model.f_preamount > 0) {
|
|
812
|
+
try {
|
|
813
|
+
preamountGen(this).then((res) => {
|
|
814
|
+
if (this.config.quickSale) {
|
|
815
|
+
this.checkInvoiceMsg((!this.$v.valid || this.validateOk || !this.islegal || this.clickConfirm))
|
|
811
816
|
// this.$els.sk.focus()
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
}
|
|
818
|
-
} else {
|
|
819
|
-
this.model.f_preamount = null
|
|
817
|
+
}
|
|
818
|
+
})
|
|
819
|
+
} catch (error) {
|
|
820
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
821
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
820
822
|
}
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
823
|
+
} else {
|
|
824
|
+
this.model.f_preamount = null
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
calText (val) {
|
|
828
|
+
let str = ''
|
|
829
|
+
let num = 0
|
|
830
|
+
val.forEach((item) => {
|
|
831
|
+
if (item.f_gas > 0) {
|
|
832
|
+
num = num + 1
|
|
833
|
+
}
|
|
834
|
+
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
835
|
+
})
|
|
836
|
+
str = str.slice(0, str.length - 1)
|
|
837
|
+
this.calculatedetail = str
|
|
838
|
+
},
|
|
839
|
+
close () {
|
|
840
|
+
this.print = false
|
|
841
|
+
this.clean()
|
|
842
|
+
},
|
|
838
843
|
// 根据选择的付款方式 获取优惠列表
|
|
839
|
-
|
|
844
|
+
async getPrivilegeList () {
|
|
840
845
|
// 初始化下拉选择列表
|
|
841
|
-
|
|
846
|
+
this.privilegeList = [{label: '无优惠', value: '0'}]
|
|
842
847
|
// 初始为无优惠
|
|
843
|
-
|
|
844
|
-
|
|
848
|
+
this.model.f_privilege_id = '0'
|
|
849
|
+
if (this.model.f_payment && this.model.f_payment.length) {
|
|
845
850
|
// 查询条件
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
}
|
|
856
|
-
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
857
|
-
// 查询结果放到下拉列表
|
|
858
|
-
for (let p of privilege.data) {
|
|
859
|
-
this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
|
|
851
|
+
let payments = JSON.stringify(this.model.f_payment)
|
|
852
|
+
payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
|
|
853
|
+
let HttpReset = new HttpResetClass()
|
|
854
|
+
let privilege = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
|
|
855
|
+
data: {
|
|
856
|
+
items: 'id,f_privilege_name,f_privilege_type',
|
|
857
|
+
tablename: 't_privilege',
|
|
858
|
+
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 = '有效'`,
|
|
859
|
+
orderitem: 'id'
|
|
860
860
|
}
|
|
861
|
-
|
|
861
|
+
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
862
|
+
// 查询结果放到下拉列表
|
|
863
|
+
for (let p of privilege.data) {
|
|
864
|
+
this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
|
|
862
865
|
}
|
|
863
|
-
|
|
866
|
+
this.privilegeCalculate()
|
|
867
|
+
}
|
|
868
|
+
},
|
|
864
869
|
// 优惠计算
|
|
865
|
-
|
|
870
|
+
async privilegeCalculate () {
|
|
866
871
|
// 初始化减免金额
|
|
867
|
-
|
|
868
|
-
|
|
872
|
+
this.model.f_privilege_money = 0
|
|
873
|
+
this.model.f_after_discount = this.sumCollection ? this.sumCollection : this.model.f_collection
|
|
869
874
|
// 判断是否是自定义优惠
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
}
|
|
875
|
+
if (parseInt(this.model.f_privilege_id)) {
|
|
876
|
+
for (let p of this.privilegeList) {
|
|
877
|
+
if (p.value == this.model.f_privilege_id && p.type == '自定义') {
|
|
878
|
+
this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
|
|
879
|
+
if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
|
|
880
|
+
this.$showMessage('金额输入格式不正确!')
|
|
881
|
+
this.model.f_privilege_money = 0
|
|
882
|
+
return
|
|
883
|
+
}
|
|
884
|
+
if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
|
|
885
|
+
this.$showMessage('减免金额不能大于等于收款金额')
|
|
886
|
+
this.model.f_privilege_money = 0
|
|
887
|
+
return
|
|
884
888
|
}
|
|
885
889
|
}
|
|
886
890
|
}
|
|
891
|
+
}
|
|
887
892
|
// 优惠方式, 收款 缺一不计算
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
893
|
+
if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
|
|
894
|
+
let c = {
|
|
895
|
+
f_privilege_id: this.model.f_privilege_id,
|
|
896
|
+
f_collection: this.model.f_after_discount,
|
|
897
|
+
f_privilege_money: this.model.f_privilege_money
|
|
898
|
+
}
|
|
899
|
+
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculatePrivilege', c, {resolveMsg: null, rejectMsg: '计算优惠金额出错'})
|
|
895
900
|
// 减免金额
|
|
896
|
-
|
|
901
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
897
902
|
// 减免后收款金额
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
903
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
904
|
+
}
|
|
905
|
+
},
|
|
901
906
|
// 判断当前用户是否可以使用系统余额透支
|
|
902
|
-
|
|
903
|
-
|
|
907
|
+
canOverdraftBalance () {
|
|
908
|
+
return this.config.overdraftBalance && this.row.f_user_type != '民用'
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
computed: {
|
|
912
|
+
authArr () {
|
|
913
|
+
return this.$login.r ? this.$login.r : []
|
|
914
|
+
},
|
|
915
|
+
'curbalance' () {
|
|
916
|
+
if (this.model.f_payment == '赠气') {
|
|
917
|
+
return this.row.f_balance
|
|
918
|
+
}
|
|
919
|
+
if (this.model.f_preamount) {
|
|
920
|
+
return ((this.model.f_collection - 0) - (this.model.f_preamount - 0) + (this.row.f_balance - 0) - this.alldue_fee).toFixed(this.row.f_gas_decimal || 4) - 0
|
|
921
|
+
} else {
|
|
922
|
+
return 0
|
|
904
923
|
}
|
|
905
924
|
},
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
return ((this.model.f_collection - 0) - (this.model.f_preamount - 0) + (this.row.f_balance - 0) - this.alldue_fee).toFixed(this.row.f_gas_decimal || 4) - 0
|
|
916
|
-
} else {
|
|
917
|
-
return 0
|
|
918
|
-
}
|
|
919
|
-
},
|
|
920
|
-
'islegal' () {
|
|
921
|
-
if (this.paymentModel.length > 1 && this.model.f_collection) {
|
|
922
|
-
let sum = 0
|
|
923
|
-
this.paymentModel.forEach((res) => {
|
|
924
|
-
sum += (res.f_money - 0)
|
|
925
|
-
})
|
|
926
|
-
return (this.model.f_collection - 0) === (sum - 0)
|
|
927
|
-
} else {
|
|
928
|
-
return true
|
|
929
|
-
}
|
|
925
|
+
'islegal' () {
|
|
926
|
+
if (this.paymentModel.length > 1 && this.model.f_collection) {
|
|
927
|
+
let sum = 0
|
|
928
|
+
this.paymentModel.forEach((res) => {
|
|
929
|
+
sum += (res.f_money - 0)
|
|
930
|
+
})
|
|
931
|
+
return (this.model.f_collection - 0) === (sum - 0)
|
|
932
|
+
} else {
|
|
933
|
+
return true
|
|
930
934
|
}
|
|
931
935
|
}
|
|
932
936
|
}
|
|
937
|
+
}
|
|
933
938
|
</script>
|
|
934
939
|
|
|
935
940
|
<style>
|