租电套餐中按天租的租赁时长*30

This commit is contained in:
majian314
2025-09-24 17:39:49 +08:00
parent 53cb688448
commit 08fb39db7e
2 changed files with 7 additions and 3 deletions

View File

@ -121,7 +121,7 @@ public class ZcRentCarRuleController extends BaseController
.toArray(String[]::new);
List<ZcRentBatteyRule> batteyRuleList = zcRentBatteyRuleService.selectZcRentBatteyRuleByIds(stringArray);
for (ZcRentBatteyRule batteyRule : batteyRuleList) {
if(!String.valueOf(batteyRule.getDuration()).equals(String.valueOf(zcRentCarRule.getRentalDays()))){
if(!String.valueOf(batteyRule.getDuration()*30).equals(String.valueOf(zcRentCarRule.getRentalDays()))){
return error("选择租电套餐的租赁天数与租车套餐的租赁天数不一致。");
}
}

View File

@ -167,8 +167,12 @@
$.modal.alert("未找到与租赁类型相同的租电套餐");
}
data.forEach(function(rule) {
html += `<div class="checkbox"><label><input type="checkbox" id="batteryRules" name="batteryRules" value="${rule.id}"> ${rule.title},电压${rule.voltage},电容${rule.ah},租赁${rule.duration}天</label></div>`;
});
if(newRentalType === '3'){
html += `<div class="checkbox"><label><input type="checkbox" id="batteryRules" name="batteryRules" value="${rule.id}"> ${rule.title},电压${rule.voltage},电容${rule.ah},租赁${rule.duration*30}天</label></div>`;
}else{
html += `<div class="checkbox"><label><input type="checkbox" id="batteryRules" name="batteryRules" value="${rule.id}"> ${rule.title},电压${rule.voltage},电容${rule.ah},租赁${rule.duration}天</label></div>`;
}
});
$('#batteryRuleList').html(html);
});
}