sale-client 4.2.30 → 4.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +48 -40
- 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/ComprehenOperation/newchangemeter/ChangeMeter.vue +9 -5
- 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/components/webMeter/meterinfo/NewMeterList.vue +7 -0
- package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
- package/src/filiale/bayan/ChargeList.vue +1010 -1010
- package/src/filiale/bayan/StockListmain.vue +543 -543
- package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
- package/src/filiale/jinhong/RecordCancel.vue +340 -0
- package/src/filiale/jinhong/sale.js +2 -0
- package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
- package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
- package/src/filiale/meihekou/MachineCharge.vue +1 -0
- package/src/filiale/meihekou/MachineMeterCenter.vue +715 -0
- package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
- package/src/filiale/meihekou/machineHand.vue +13 -0
- package/src/filiale/meihekou/sale.js +2 -0
- package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
- package/src/filiale/rongcheng/business/CardMeterCenter.vue +455 -455
- 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
- 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 +0 -2
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/.npmignore +0 -12
- package/src/.npmignore +0 -1
- package/yarn.lock +0 -12208
|
@@ -194,10 +194,10 @@
|
|
|
194
194
|
<div style="text-align:right; height: 25%">
|
|
195
195
|
<strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
|
|
196
196
|
<strong style="font-size: large">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
|
|
197
|
-
<!-- <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm"-->
|
|
198
|
-
<!-- :payment.sync="model.f_payment" :payment-data="paytype"-->
|
|
199
|
-
<!-- @confirm-payment="confirm()">-->
|
|
200
|
-
<!-- </payment-code-button>-->
|
|
197
|
+
<!-- <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm"-->
|
|
198
|
+
<!-- :payment.sync="model.f_payment" :payment-data="paytype"-->
|
|
199
|
+
<!-- @confirm-payment="confirm()">-->
|
|
200
|
+
<!-- </payment-code-button>-->
|
|
201
201
|
<button class="button_search btn-gn" type="submit" @click="confirm()"
|
|
202
202
|
:disabled='!$v.valid || validateOk || !islegal || clickConfirm'>确认
|
|
203
203
|
</button>
|
|
@@ -211,21 +211,21 @@
|
|
|
211
211
|
<upload :blodid="blodid" v-if="config.showupload" isremark="true" fusetype="卡表收费"></upload>
|
|
212
212
|
</template>
|
|
213
213
|
<script>
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
import {HttpResetClass} from 'vue-client'
|
|
215
|
+
import XML from '../../../plugins/ObjTree'
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
/**
|
|
218
|
+
*综合业务
|
|
219
|
+
*卡表收费组件
|
|
220
|
+
*/
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
// 输入金额,换算气量
|
|
223
|
+
let preamountGen = async function (self) {
|
|
224
224
|
let calFee = ((self.model.f_preamount - 0) + (self.model.f_balance - 0)).toFixed(4)
|
|
225
225
|
if (self.model.f_payment == '赠气') {
|
|
226
226
|
calFee = (self.model.f_preamount - 0).toFixed(4)
|
|
227
227
|
}
|
|
228
|
-
|
|
228
|
+
// 通过金额进行划价
|
|
229
229
|
let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
|
|
230
230
|
if (getGas.data.gas) {
|
|
231
231
|
if (self.row.f_isdecimal === '是') {
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
self.dymoney = (getGas.data.chargenum - 0).toFixed(4) - (dymoney2.data.chargenum - 0).toFixed(4)
|
|
242
242
|
}
|
|
243
243
|
} else {
|
|
244
|
-
|
|
244
|
+
// 如果不支持小数,将划价出的多余非整数气量进行划价为金额
|
|
245
245
|
let tempnum = Math.floor(getGas.data.gas - 0)
|
|
246
246
|
let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
|
|
247
247
|
self.dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
|
|
@@ -263,506 +263,506 @@
|
|
|
263
263
|
self.calText(getGas.data.chargeprice)
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
266
|
+
// 输入气量,换算金额
|
|
267
|
+
let pregasGen = async function (self) {
|
|
268
|
+
if (self.row.f_isdecimal === '是') {
|
|
269
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
|
|
270
|
+
} else {
|
|
271
|
+
self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
|
|
272
|
+
}
|
|
273
|
+
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
274
|
+
self.model.f_meter_type = self.row.f_meter_type
|
|
275
|
+
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
276
|
+
self.model.f_preamount = getAmount.data.chargenum
|
|
277
|
+
self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4))
|
|
278
|
+
Object.assign(self.model, self.model, getAmount.data)
|
|
279
|
+
self.model.chargeprice = getAmount.data.chargeprice
|
|
280
|
+
if (self.model.f_payment == '赠气') {
|
|
281
|
+
self.model.f_totalcost = getAmount.data.chargenum
|
|
282
|
+
self.model.f_collection = 0
|
|
270
283
|
} else {
|
|
271
|
-
self.model.
|
|
272
|
-
}
|
|
273
|
-
if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
|
|
274
|
-
self.model.f_meter_type = self.row.f_meter_type
|
|
275
|
-
let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
|
|
276
|
-
self.model.f_preamount = getAmount.data.chargenum
|
|
277
|
-
self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4))
|
|
278
|
-
Object.assign(self.model, self.model, getAmount.data)
|
|
279
|
-
self.model.chargeprice = getAmount.data.chargeprice
|
|
280
|
-
if (self.model.f_payment == '赠气') {
|
|
281
|
-
self.model.f_totalcost = getAmount.data.chargenum
|
|
282
|
-
self.model.f_collection = 0
|
|
283
|
-
} else {
|
|
284
|
-
self.model.f_collection = self.model.f_totalcost
|
|
285
|
-
}
|
|
286
|
-
self.calText(getAmount.data.chargeprice)
|
|
284
|
+
self.model.f_collection = self.model.f_totalcost
|
|
287
285
|
}
|
|
286
|
+
self.calText(getAmount.data.chargeprice)
|
|
288
287
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
288
|
+
}
|
|
289
|
+
// 执行保存逻辑
|
|
290
|
+
let sellgasGen = async function (self) {
|
|
291
|
+
try {
|
|
292
|
+
self.row.cardInfo = self.cardData
|
|
293
293
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
294
|
+
if (self.paymentModel.length === 0) {
|
|
295
|
+
self.paymentModel = [{
|
|
296
|
+
f_payment: self.model.f_payment[0],
|
|
297
|
+
f_money: self.model.f_preamount
|
|
298
|
+
}]
|
|
299
|
+
}
|
|
300
|
+
self.model.xiekamoney = self.model.f_preamount
|
|
301
|
+
if (self.row.f_price_type == '阶梯气价' && self.row.f_is_step == '否') {
|
|
302
|
+
self.model.xiekamoney = (self.model.f_pregas * self.model.chargeprice[0].f_price)
|
|
303
|
+
self.model.xiekamoney = self.model.xiekamoney.toFixed(4)
|
|
304
|
+
}
|
|
305
305
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
306
|
+
self.model.payments = self.paymentModel
|
|
307
|
+
// 加入扫码盒付款码支付流水号
|
|
308
|
+
self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
|
|
309
|
+
let res = await self.$CardService.sellgas(self.model, self.row)
|
|
310
|
+
console.log('----------------->卡表收费返回id', res)
|
|
311
|
+
let param = []
|
|
312
|
+
for (let row of self.resid) {
|
|
313
|
+
param.push({id: row.id})
|
|
314
|
+
}
|
|
315
|
+
let writeid
|
|
316
|
+
if (res.data && res.data.id) {
|
|
317
|
+
writeid = res.data.id
|
|
318
|
+
} else {
|
|
319
|
+
writeid = res
|
|
320
|
+
}
|
|
321
|
+
let data = {
|
|
322
|
+
param: param,
|
|
323
|
+
f_blobid: writeid
|
|
324
|
+
}
|
|
325
325
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
} else {
|
|
337
|
-
self.row.id = res
|
|
338
|
-
self.print = true
|
|
339
|
-
}
|
|
326
|
+
await self.$resetpost('rs/logic/updatefiles', data)
|
|
327
|
+
// 开始打票
|
|
328
|
+
if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
|
|
329
|
+
if (self.model.f_print.indexOf('电子发票') == -1) {
|
|
330
|
+
if (self.config.hasBillManage) {
|
|
331
|
+
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
332
|
+
self.row.id = res
|
|
333
|
+
self.row.f_bill_type = '卡表收费'
|
|
334
|
+
self.row.f_bill_style = self.model.f_print[0]
|
|
335
|
+
self.print = true
|
|
340
336
|
} else {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
self.row.id = res
|
|
344
|
-
self.print = true
|
|
345
|
-
}
|
|
337
|
+
self.row.id = res
|
|
338
|
+
self.print = true
|
|
346
339
|
}
|
|
347
340
|
} else {
|
|
348
|
-
self
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
if (error instanceof Object) {
|
|
354
|
-
self.$showAlert(error.data, 'danger', 0)
|
|
355
|
-
} else {
|
|
356
|
-
self.$showAlert(error, 'danger', 0)
|
|
341
|
+
if (self.model.f_print[0] === '电子发票') {
|
|
342
|
+
await self.$CommonService.openEticket(res, '售气收费')
|
|
343
|
+
self.row.id = res
|
|
344
|
+
self.print = true
|
|
345
|
+
}
|
|
357
346
|
}
|
|
358
|
-
|
|
359
|
-
self
|
|
347
|
+
} else {
|
|
348
|
+
self.$dispatch('success')
|
|
360
349
|
}
|
|
350
|
+
self.clickConfirm = false
|
|
351
|
+
} catch (error) {
|
|
352
|
+
console.log('捕获到异常', error)
|
|
353
|
+
if (error instanceof Object) {
|
|
354
|
+
self.$showAlert(error.data, 'danger', 0)
|
|
355
|
+
} else {
|
|
356
|
+
self.$showAlert(error, 'danger', 0)
|
|
357
|
+
}
|
|
358
|
+
self.$dispatch('refresh')
|
|
359
|
+
self.clickConfirm = false
|
|
361
360
|
}
|
|
361
|
+
}
|
|
362
362
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
363
|
+
let asyncCardMeterCenter = async function (self) {
|
|
364
|
+
await self.$getConfig(self, 'CardMeterCenter')
|
|
365
|
+
console.log('卡表收费config', self.config)
|
|
366
|
+
// 默认打印格式
|
|
367
|
+
self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
|
|
368
|
+
self.model.f_payment = [self.config.payment]
|
|
369
|
+
self.mulPrint = self.config.printType instanceof Array
|
|
370
370
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
371
|
+
// 获取当前票号用
|
|
372
|
+
self.model.f_use_type = self.config.billType
|
|
373
|
+
self.model.f_bill_type = self.model.f_print
|
|
374
|
+
self.hasValidateBill = self.config.hasBillManage
|
|
375
375
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
376
|
+
// 判断限购
|
|
377
|
+
let limit_param = {
|
|
378
|
+
f_userinfo_id: self.row.f_userinfo_id,
|
|
379
|
+
f_user_id: self.row.f_user_id,
|
|
380
|
+
f_stairprice_id: self.row.f_stairprice_id
|
|
381
|
+
}
|
|
382
|
+
let getLimit = await self.$resetpost('rs/logic/sale_getLimitGas', {data: limit_param}, {
|
|
383
|
+
resolveMsg: null,
|
|
384
|
+
rejectMsg: '获取限购值失败!!'
|
|
385
|
+
})
|
|
386
|
+
console.log('获取限购值', getLimit)
|
|
387
|
+
self.hasLimit = getLimit.data.hasLimit
|
|
388
|
+
if (self.hasLimit) {
|
|
389
|
+
if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
|
|
390
|
+
if (getLimit.data.f_limit_value < 0 && getLimit.data.f_limit_amount < 0) {
|
|
391
|
+
self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
|
|
392
|
+
self.$dispatch('refresh')
|
|
393
|
+
} else {
|
|
394
|
+
if (getLimit.data.f_limit_value) {
|
|
395
|
+
self.maxgas = (getLimit.data.f_limit_value - 0)
|
|
396
|
+
self.limitgas = true
|
|
397
|
+
}
|
|
398
|
+
if (getLimit.data.f_limit_amount) {
|
|
399
|
+
self.maxmoney = (getLimit.data.f_limit_amount - 0)
|
|
400
|
+
self.limitmoney = true
|
|
402
401
|
}
|
|
403
402
|
}
|
|
404
403
|
}
|
|
405
404
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
405
|
+
}
|
|
406
|
+
export default {
|
|
407
|
+
title: '卡表收费',
|
|
408
|
+
data () {
|
|
409
|
+
return {
|
|
410
|
+
mjshow: false,
|
|
411
|
+
serialShow: false,
|
|
412
|
+
resid: [], // 存放新增的f_files表中id
|
|
413
|
+
config: {
|
|
414
|
+
showupload: true, // 显示上传
|
|
415
|
+
hasPrint: false, // 默认打票
|
|
416
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
417
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
418
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
419
|
+
payment: '现金缴费'
|
|
420
|
+
},
|
|
421
|
+
model: {
|
|
422
|
+
f_purchase: 0,
|
|
423
|
+
f_payment: [],
|
|
424
|
+
f_pregas: '',
|
|
425
|
+
f_preamount: 0,
|
|
426
|
+
f_totalcost: 0,
|
|
427
|
+
f_curbalance: 0,
|
|
428
|
+
f_collection: '',
|
|
429
|
+
f_balance: 0,
|
|
430
|
+
f_print: [],
|
|
431
|
+
f_meter_type: '',
|
|
432
|
+
f_voucher_number: '',
|
|
433
|
+
f_banktransfer_person: '',
|
|
434
|
+
f_banktransfer_date: '',
|
|
435
|
+
f_privilege_id: 0,
|
|
436
|
+
f_privilege_money: 0,
|
|
437
|
+
f_after_discount: 0
|
|
438
|
+
},
|
|
439
|
+
calculatedetail: '',
|
|
440
440
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
// 启用发票管理需要对票号进行验证
|
|
442
|
+
hasValidateBill: false,
|
|
443
|
+
validateOk: false,
|
|
444
444
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
445
|
+
print: false,
|
|
446
|
+
billData: {
|
|
447
|
+
url: 'rs/report/card_bill',
|
|
448
|
+
billnumber: ''
|
|
449
|
+
},
|
|
450
|
+
hasLimit: false,
|
|
451
|
+
maxgas: 99999999, // 限购
|
|
452
|
+
maxmoney: 99999999,
|
|
453
|
+
limitmoney: false,
|
|
454
|
+
limitgas: false,
|
|
455
455
|
|
|
456
|
-
|
|
456
|
+
paymentModel: [], // 多笔付款方式
|
|
457
457
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
458
|
+
mulPrint: false,
|
|
459
|
+
clickConfirm: false, // 控制确认按钮只能点击一次
|
|
460
|
+
// 下拉框值
|
|
461
|
+
paytype: [],
|
|
462
|
+
printstyle: this.$appdata.getParam('打印格式'),
|
|
463
|
+
privilegeList: [{label: '无优惠', value: '0'}],
|
|
464
|
+
BankTransfer: false,
|
|
465
|
+
// 小数是否支持,导致划价产生的多余气量,金额
|
|
466
|
+
dymoney: 0
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
props: ['row', 'cardData'],
|
|
470
|
+
async ready () {
|
|
471
|
+
if (this.authArr.includes('余额写卡限定')) {
|
|
472
|
+
this.paytype = [{label: '余额写卡', value: '余额写卡'}]
|
|
473
|
+
} else {
|
|
474
|
+
this.paytype = await this.$appdata.getParam('付款方式') ? await this.$appdata.getParam('付款方式') : []
|
|
475
|
+
if (!this.$login.r.includes('免交充值付款')) {
|
|
476
|
+
this.paytype = this.paytype.filter((item) => {
|
|
477
|
+
return item.label != '免交'
|
|
478
|
+
})
|
|
467
479
|
}
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
480
|
+
}
|
|
481
|
+
// this.getPurchase()
|
|
482
|
+
this.model.f_price_id = this.row.f_price_id
|
|
483
|
+
this.model.f_user_id = this.row.f_user_id
|
|
484
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
485
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
486
|
+
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
487
|
+
if (this.row.f_collection_type == '按金额') {
|
|
488
|
+
this.model.f_preamount = ''
|
|
489
|
+
this.model.f_pregas = 0
|
|
490
|
+
}
|
|
491
|
+
asyncCardMeterCenter(this)
|
|
492
|
+
},
|
|
493
|
+
watch: {
|
|
494
|
+
'model.f_payment.length' (val) {
|
|
495
|
+
console.log('付款方式多选。。', val)
|
|
496
|
+
if (val > 1 && !this.model.f_preamount) {
|
|
497
|
+
this.model.f_payment = ['现金缴费']
|
|
498
|
+
this.$showAlert('请先计算付款金额', 'warning', 2000)
|
|
473
499
|
} else {
|
|
474
|
-
this.
|
|
475
|
-
if (!this.$login.r.includes('免交充值付款')) {
|
|
476
|
-
this.paytype = this.paytype.filter((item) => {
|
|
477
|
-
return item.label != '免交'
|
|
478
|
-
})
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
// this.getPurchase()
|
|
482
|
-
this.model.f_price_id = this.row.f_price_id
|
|
483
|
-
this.model.f_user_id = this.row.f_user_id
|
|
484
|
-
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
485
|
-
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
486
|
-
this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
|
|
487
|
-
if (this.row.f_collection_type == '按金额') {
|
|
488
|
-
this.model.f_preamount = ''
|
|
489
|
-
this.model.f_pregas = 0
|
|
490
|
-
}
|
|
491
|
-
asyncCardMeterCenter(this)
|
|
492
|
-
},
|
|
493
|
-
watch: {
|
|
494
|
-
'model.f_payment.length' (val) {
|
|
495
|
-
console.log('付款方式多选。。', val)
|
|
496
|
-
if (val > 1 && !this.model.f_preamount) {
|
|
497
|
-
this.model.f_payment = ['现金缴费']
|
|
498
|
-
this.$showAlert('请先计算付款金额', 'warning', 2000)
|
|
499
|
-
} else {
|
|
500
|
-
this.paymentModel = []
|
|
500
|
+
this.paymentModel = []
|
|
501
501
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
this.paymentModel.push(temp)
|
|
508
|
-
})
|
|
509
|
-
this.$resetValidation()
|
|
510
|
-
|
|
511
|
-
// 获取计算优惠
|
|
512
|
-
this.getPrivilegeList()
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
|
-
'model.f_payment' (val) {
|
|
516
|
-
if (val == '免交') {
|
|
517
|
-
this.mjshow = true
|
|
518
|
-
} else if (val == '赠气' && (this.model.f_preamount || this.model.f_preamount != '')) {
|
|
519
|
-
if (this.row.f_collection_type == '按气量') {
|
|
520
|
-
this.pregas()
|
|
521
|
-
} else {
|
|
522
|
-
this.preamount()
|
|
502
|
+
this.model.f_payment.forEach((res) => {
|
|
503
|
+
let temp = {
|
|
504
|
+
f_payment: res,
|
|
505
|
+
f_money: 0
|
|
523
506
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
// this.pregas();
|
|
529
|
-
// }else{
|
|
530
|
-
// this.preamount();
|
|
531
|
-
// }
|
|
532
|
-
},
|
|
533
|
-
'model.f_collection' (val) {
|
|
507
|
+
this.paymentModel.push(temp)
|
|
508
|
+
})
|
|
509
|
+
this.$resetValidation()
|
|
510
|
+
|
|
534
511
|
// 获取计算优惠
|
|
535
512
|
this.getPrivilegeList()
|
|
536
513
|
}
|
|
537
514
|
},
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
515
|
+
'model.f_payment' (val) {
|
|
516
|
+
if (val == '免交') {
|
|
517
|
+
this.mjshow = true
|
|
518
|
+
} else if (val == '赠气' && (this.model.f_preamount || this.model.f_preamount != '')) {
|
|
519
|
+
if (this.row.f_collection_type == '按气量') {
|
|
520
|
+
this.pregas()
|
|
521
|
+
} else {
|
|
522
|
+
this.preamount()
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
this.mjshow = false
|
|
547
526
|
}
|
|
527
|
+
// if(this.row.f_collection_type == '按气量'){
|
|
528
|
+
// this.pregas();
|
|
529
|
+
// }else{
|
|
530
|
+
// this.preamount();
|
|
531
|
+
// }
|
|
548
532
|
},
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
533
|
+
'model.f_collection' (val) {
|
|
534
|
+
// 获取计算优惠
|
|
535
|
+
this.getPrivilegeList()
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
events: {
|
|
539
|
+
// 删除Resid数组元素
|
|
540
|
+
'delResid' (val) {
|
|
541
|
+
this.resid.$remove({id: val, f_biobid: ''})
|
|
542
|
+
// this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
|
|
543
|
+
},
|
|
544
|
+
// 增加Resid数组元素
|
|
545
|
+
'resid' (val) {
|
|
546
|
+
this.resid.push({id: val, f_biobid: ''})
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
methods: {
|
|
550
|
+
confirm () {
|
|
551
|
+
if (this.model.f_payment.length > 0 && this.model.f_payment.includes('余额写卡')) {
|
|
552
|
+
if (this.model.f_collection > this.row.f_balance) {
|
|
553
|
+
this.$showAlert('请注意!您的账户余额小于当前写卡金额,无法进行余额写卡,请修改后重试', 'warning', 2000)
|
|
554
|
+
return
|
|
555
|
+
}
|
|
556
556
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
557
|
+
if (this.model.f_collection > 0) {
|
|
558
|
+
this.$showAlert('请注意!进行余额写卡,收款不能大于0', 'warning', 1000)
|
|
559
|
+
return
|
|
561
560
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
561
|
+
}
|
|
562
|
+
this.$showMessage(`确定对用户${this.row.f_user_name}进行卡表收费吗?`, ['confirm', 'cancel']).then(async (res) => {
|
|
563
|
+
if (res === 'confirm') {
|
|
564
|
+
// 先调用付款码支付组件流程
|
|
565
|
+
let ss = await this.$refs.paymentcode.flowPath()
|
|
566
|
+
this.$refs.paymentcode.paymentCodeShow = false
|
|
567
|
+
console.log('付款码操作返回', ss)
|
|
568
|
+
if (!ss.result) return
|
|
569
569
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
575
|
-
})
|
|
576
|
-
},
|
|
577
|
-
clean () {
|
|
578
|
-
this.$info('取消操作')
|
|
579
|
-
this.$dispatch('refresh', this.row)
|
|
580
|
-
},
|
|
581
|
-
validateBill (val) {
|
|
582
|
-
this.validateOk = !val.isOk
|
|
583
|
-
this.billData.bill = val.bill
|
|
584
|
-
},
|
|
585
|
-
printok () {
|
|
586
|
-
// 收据打完,判断是否还有其他票据进行请求
|
|
587
|
-
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
588
|
-
if (this.model.f_print[i] === '电子发票') {
|
|
589
|
-
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
590
|
-
}
|
|
570
|
+
this.clickConfirm = true
|
|
571
|
+
this.model.f_curbalance = this.curbalance
|
|
572
|
+
this.$dispatch('no-button')
|
|
573
|
+
sellgasGen(this)
|
|
591
574
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
this.$dispatch('error', '发卡售气', this.model, error)
|
|
608
|
-
}
|
|
609
|
-
} else {
|
|
610
|
-
this.model.f_pregas = null
|
|
575
|
+
})
|
|
576
|
+
},
|
|
577
|
+
clean () {
|
|
578
|
+
this.$info('取消操作')
|
|
579
|
+
this.$dispatch('refresh', this.row)
|
|
580
|
+
},
|
|
581
|
+
validateBill (val) {
|
|
582
|
+
this.validateOk = !val.isOk
|
|
583
|
+
this.billData.bill = val.bill
|
|
584
|
+
},
|
|
585
|
+
printok () {
|
|
586
|
+
// 收据打完,判断是否还有其他票据进行请求
|
|
587
|
+
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
588
|
+
if (this.model.f_print[i] === '电子发票') {
|
|
589
|
+
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
611
590
|
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
591
|
+
}
|
|
592
|
+
this.$dispatch('success')
|
|
593
|
+
},
|
|
594
|
+
pregas () {
|
|
595
|
+
this.dymoney = 0
|
|
596
|
+
if (this.model.f_pregas && this.model.f_pregas > 0) {
|
|
619
597
|
try {
|
|
620
|
-
|
|
598
|
+
// 对气量进行验证
|
|
599
|
+
if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
|
|
600
|
+
this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
|
|
601
|
+
this.model.f_pregas = null
|
|
602
|
+
} else {
|
|
603
|
+
pregasGen(this)
|
|
604
|
+
}
|
|
621
605
|
} catch (error) {
|
|
622
606
|
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
623
607
|
this.$dispatch('error', '发卡售气', this.model, error)
|
|
624
608
|
}
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
})
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
609
|
+
} else {
|
|
610
|
+
this.model.f_pregas = null
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
preamount () {
|
|
614
|
+
this.dymoney = 0
|
|
615
|
+
this.model.f_price_id = this.row.f_price_id
|
|
616
|
+
this.model.f_user_id = this.row.f_user_id
|
|
617
|
+
this.model.f_userfiles_id = this.row.f_userfiles_id
|
|
618
|
+
this.model.f_userinfo_id = this.row.f_userinfo_id
|
|
619
|
+
try {
|
|
620
|
+
preamountGen(this)
|
|
621
|
+
} catch (error) {
|
|
622
|
+
this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
|
|
623
|
+
this.$dispatch('error', '发卡售气', this.model, error)
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
calText (val) {
|
|
627
|
+
let str = ''
|
|
628
|
+
let num = 0
|
|
629
|
+
val.forEach((item) => {
|
|
630
|
+
if (item.f_gas > 0) {
|
|
631
|
+
num = num + 1
|
|
643
632
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
this.print = false
|
|
647
|
-
this.clean()
|
|
648
|
-
},
|
|
649
|
-
paymentchange () {
|
|
650
|
-
console.log('model.f_payment', this.model.f_payment[0])
|
|
651
|
-
if (JSON.stringify(this.model.f_payment).indexOf('转账') !== -1) {
|
|
652
|
-
// 进入转账筛选条件
|
|
653
|
-
this.model.f_banktransfer_person = ''
|
|
654
|
-
this.model.f_banktransfer_date = ''
|
|
655
|
-
this.BankTransfer = true
|
|
633
|
+
if (this.row.f_isdecimal === '是') {
|
|
634
|
+
str = str + item.f_price + ' x ' + item.f_gas + '+'
|
|
656
635
|
} else {
|
|
657
|
-
|
|
658
|
-
this.model.f_banktransfer_date = ''
|
|
659
|
-
this.BankTransfer = false
|
|
636
|
+
str = str + item.f_price + ' x ' + Math.floor(item.f_gas) + '+'
|
|
660
637
|
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
this
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
638
|
+
})
|
|
639
|
+
str = str.slice(0, str.length - 1)
|
|
640
|
+
this.calculatedetail = str
|
|
641
|
+
if (num > 1) {
|
|
642
|
+
this.$showAlert('友好提示:本次购气已跨阶梯', 'warning', 3000)
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
close () {
|
|
646
|
+
this.print = false
|
|
647
|
+
this.clean()
|
|
648
|
+
},
|
|
649
|
+
paymentchange () {
|
|
650
|
+
console.log('model.f_payment', this.model.f_payment[0])
|
|
651
|
+
if (JSON.stringify(this.model.f_payment).indexOf('转账') !== -1) {
|
|
652
|
+
// 进入转账筛选条件
|
|
653
|
+
this.model.f_banktransfer_person = ''
|
|
654
|
+
this.model.f_banktransfer_date = ''
|
|
655
|
+
this.BankTransfer = true
|
|
656
|
+
} else {
|
|
657
|
+
this.model.f_banktransfer_person = ''
|
|
658
|
+
this.model.f_banktransfer_date = ''
|
|
659
|
+
this.BankTransfer = false
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
// 根据选择的付款方式 获取优惠列表
|
|
663
|
+
async getPrivilegeList () {
|
|
664
|
+
// 初始化下拉选择列表
|
|
665
|
+
this.privilegeList = [{label: '无优惠', value: '0'}]
|
|
666
|
+
// 初始为无优惠
|
|
667
|
+
this.model.f_privilege_id = '0'
|
|
668
|
+
if (this.model.f_payment && this.model.f_payment.length) {
|
|
669
|
+
// 查询条件
|
|
670
|
+
let payments = JSON.stringify(this.model.f_payment)
|
|
671
|
+
payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
|
|
672
|
+
let HttpReset = new HttpResetClass()
|
|
673
|
+
let privilege = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
|
|
674
|
+
data: {
|
|
675
|
+
items: 'id,f_privilege_name,f_privilege_type',
|
|
676
|
+
tablename: 't_privilege',
|
|
677
|
+
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 = '有效'`,
|
|
678
|
+
orderitem: 'id'
|
|
684
679
|
}
|
|
685
|
-
|
|
680
|
+
}, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
|
|
681
|
+
// 查询结果放到下拉列表
|
|
682
|
+
for (let p of privilege.data) {
|
|
683
|
+
this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
|
|
686
684
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
685
|
+
this.privilegeCalculate()
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
// 优惠计算
|
|
689
|
+
async privilegeCalculate () {
|
|
690
|
+
// 初始化减免金额
|
|
691
|
+
this.model.f_privilege_money = 0
|
|
692
|
+
this.model.f_after_discount = this.model.f_collection
|
|
693
|
+
// 判断是否是自定义优惠
|
|
694
|
+
if (this.model.f_privilege_id != null && parseInt(this.model.f_privilege_id)) {
|
|
695
|
+
for (let p of this.privilegeList) {
|
|
696
|
+
if (p.value == this.model.f_privilege_id && p.type == '自定义') {
|
|
697
|
+
this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
|
|
698
|
+
if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
|
|
699
|
+
this.$showMessage('金额输入格式不正确!')
|
|
700
|
+
this.model.f_privilege_money = 0
|
|
701
|
+
return
|
|
702
|
+
}
|
|
703
|
+
if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
|
|
704
|
+
this.$showMessage('减免金额不能大于等于收款金额')
|
|
705
|
+
this.model.f_privilege_money = 0
|
|
706
|
+
return
|
|
708
707
|
}
|
|
709
708
|
}
|
|
710
709
|
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
let privilegeData = await this.$resetpost('api/af-revenue/logic/calculatePrivilege', c, {
|
|
719
|
-
resolveMsg: null,
|
|
720
|
-
rejectMsg: '计算优惠金额出错'
|
|
721
|
-
})
|
|
722
|
-
// 减免金额
|
|
723
|
-
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
724
|
-
// 减免后收款金额
|
|
725
|
-
this.model.f_after_discount = privilegeData.data.f_collection
|
|
710
|
+
}
|
|
711
|
+
// 优惠方式, 收款 缺一不计算
|
|
712
|
+
if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
|
|
713
|
+
let c = {
|
|
714
|
+
f_privilege_id: this.model.f_privilege_id,
|
|
715
|
+
f_collection: this.model.f_collection,
|
|
716
|
+
f_privilege_money: this.data.f_privilege_money
|
|
726
717
|
}
|
|
718
|
+
let privilegeData = await this.$resetpost('rs/logic/calculatePrivilege', c, {
|
|
719
|
+
resolveMsg: null,
|
|
720
|
+
rejectMsg: '计算优惠金额出错'
|
|
721
|
+
})
|
|
722
|
+
// 减免金额
|
|
723
|
+
this.model.f_privilege_money = privilegeData.data.f_privilege_money
|
|
724
|
+
// 减免后收款金额
|
|
725
|
+
this.model.f_after_discount = privilegeData.data.f_collection
|
|
727
726
|
}
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
computed: {
|
|
730
|
+
authArr () {
|
|
731
|
+
return this.$login.r ? this.$login.r : []
|
|
728
732
|
},
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
return this
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
if (this.
|
|
735
|
-
|
|
736
|
-
}
|
|
737
|
-
if (this.model.f_preamount) {
|
|
738
|
-
|
|
739
|
-
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
740
|
-
} else {
|
|
741
|
-
// if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
742
|
-
// return ((this.row.f_balance - 0) - (this.model.f_preamount - 0) + (this.model.f_collection - 0) ).toFixed(4)
|
|
743
|
-
// } else {
|
|
744
|
-
// return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
745
|
-
// }
|
|
746
|
-
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
747
|
-
}
|
|
748
|
-
} else {
|
|
749
|
-
return 0
|
|
750
|
-
}
|
|
751
|
-
},
|
|
752
|
-
'islegal' () {
|
|
753
|
-
console.log('支付分离。。。', this.paymentModel.length, this.model.f_collection)
|
|
754
|
-
if (this.paymentModel.length > 1 && this.model.f_collection) {
|
|
755
|
-
let sum = 0
|
|
756
|
-
this.paymentModel.forEach((res) => {
|
|
757
|
-
sum += (res.f_money - 0)
|
|
758
|
-
})
|
|
759
|
-
return (this.model.f_collection - 0) === (sum - 0)
|
|
733
|
+
'curbalance' () {
|
|
734
|
+
if (this.model.f_payment == '赠气') {
|
|
735
|
+
return this.model.f_balance
|
|
736
|
+
}
|
|
737
|
+
if (this.model.f_preamount) {
|
|
738
|
+
// if (this.row.f_collection_type === '按金额') {
|
|
739
|
+
// return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
740
|
+
// } else {
|
|
741
|
+
if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
|
|
742
|
+
return ((this.row.f_balance - 0) - (this.model.f_preamount - 0) + (this.model.f_collection - 0)).toFixed(4)
|
|
760
743
|
} else {
|
|
761
|
-
return
|
|
744
|
+
return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
762
745
|
}
|
|
746
|
+
// return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
|
|
747
|
+
// }
|
|
748
|
+
} else {
|
|
749
|
+
return 0
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
'islegal' () {
|
|
753
|
+
console.log('支付分离。。。', this.paymentModel.length, this.model.f_collection)
|
|
754
|
+
if (this.paymentModel.length > 1 && this.model.f_collection) {
|
|
755
|
+
let sum = 0
|
|
756
|
+
this.paymentModel.forEach((res) => {
|
|
757
|
+
sum += (res.f_money - 0)
|
|
758
|
+
})
|
|
759
|
+
return (this.model.f_collection - 0) === (sum - 0)
|
|
760
|
+
} else {
|
|
761
|
+
return true
|
|
763
762
|
}
|
|
764
763
|
}
|
|
765
764
|
}
|
|
765
|
+
}
|
|
766
766
|
</script>
|
|
767
767
|
|
|
768
768
|
<style>
|