优化自定义结束时间优惠bug

Signed-off-by: java110 <928255095@qq.com>
This commit is contained in:
java110 2024-06-14 08:44:15 +00:00 committed by Gitee
parent 8749a41721
commit 099ce05556
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -58,14 +58,7 @@
_listFeeDiscounts: function (_page, _rows) {
let _cycles = $that.payFeeDiscountInfo.cycles;
//todo 自定义缴费周期
if (_cycles == '103' && $that.payFeeDiscountInfo.custEndTime) {
let _customEndTime = vc.dateAdd($that.payFeeDiscountInfo.custEndTime);
const timeDiff = Math.abs(new Date(_customEndTime) - new Date($that.payFeeDiscountInfo.endTime));
_cycles =timeDiff / (1000 * 3600 * 24 * 30);
_cycles = _cycles.toFixed(2)
}
let param = {
params: {
@ -76,7 +69,8 @@
cycles: _cycles,
payerObjId: $that.payFeeDiscountInfo.payerObjId,
payerObjType: $that.payFeeDiscountInfo.payerObjType,
endTime: $that.payFeeDiscountInfo.endTime
endTime: $that.payFeeDiscountInfo.endTime,
custEndTime:vc.dateAdd($that.payFeeDiscountInfo.custEndTime)
}
};
//发送get请求