From 08fb39db7e84d71bfb0b23e8a95dd6e4a6094e1f Mon Sep 17 00:00:00 2001 From: majian314 Date: Wed, 24 Sep 2025 17:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E7=94=B5=E5=A5=97=E9=A4=90=E4=B8=AD?= =?UTF-8?q?=E6=8C=89=E5=A4=A9=E7=A7=9F=E7=9A=84=E7=A7=9F=E8=B5=81=E6=97=B6?= =?UTF-8?q?=E9=95=BF*30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operation/controller/ZcRentCarRuleController.java | 2 +- .../resources/templates/operation/rentCarRule/add.html | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/operation/controller/ZcRentCarRuleController.java b/ruoyi-admin/src/main/java/com/ruoyi/operation/controller/ZcRentCarRuleController.java index bc223a1..c6eb4f3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/operation/controller/ZcRentCarRuleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/operation/controller/ZcRentCarRuleController.java @@ -121,7 +121,7 @@ public class ZcRentCarRuleController extends BaseController .toArray(String[]::new); List 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("选择租电套餐的租赁天数与租车套餐的租赁天数不一致。"); } } diff --git a/ruoyi-admin/src/main/resources/templates/operation/rentCarRule/add.html b/ruoyi-admin/src/main/resources/templates/operation/rentCarRule/add.html index 785e115..ac615fb 100644 --- a/ruoyi-admin/src/main/resources/templates/operation/rentCarRule/add.html +++ b/ruoyi-admin/src/main/resources/templates/operation/rentCarRule/add.html @@ -167,8 +167,12 @@ $.modal.alert("未找到与租赁类型相同的租电套餐"); } data.forEach(function(rule) { - html += `
`; - }); + if(newRentalType === '3'){ + html += `
`; + }else{ + html += `
`; + } + }); $('#batteryRuleList').html(html); }); }