订单列表完善
This commit is contained in:
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
@ -142,6 +143,18 @@ public class ZcRentCarRuleController extends BaseController
|
||||
|
||||
ZcRentCarRule zcRentCarRule = zcRentCarRuleService.selectZcRentCarRuleById(id);
|
||||
mmap.put("zcRentCarRule", zcRentCarRule);
|
||||
|
||||
Company company = companyList.stream()
|
||||
.filter(c -> c.getId() != null && c.getId().equals(zcRentCarRule.getOperatingCompanyId()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
mmap.put("company", company);
|
||||
// 查询已绑定的电池规则
|
||||
List<String> batteryRules = zcRentCarRuleBatteryService.selectModelRuleByCarRuleId(id);
|
||||
String modelRuleNames = batteryRules.stream()
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.joining(","));
|
||||
mmap.put("modelRuleNames", modelRuleNames);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,8 @@ public interface ZcRentCarRuleBatteryMapper
|
||||
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery);
|
||||
|
||||
List<Long> selectBatteryRuleIdsByCarRuleId(Long carRuleId);
|
||||
|
||||
List<String> selectModelRuleByCarRuleId(Long carRuleId);
|
||||
/**
|
||||
* 新增租车规则租电规则关联
|
||||
*
|
||||
|
||||
@ -28,6 +28,8 @@ public interface IZcRentCarRuleBatteryService
|
||||
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery);
|
||||
|
||||
List<Long> selectBatteryRuleIdsByCarRuleId(Long carRuleId);
|
||||
|
||||
List<String> selectModelRuleByCarRuleId(Long carRuleId);
|
||||
/**
|
||||
* 新增租车规则租电规则关联
|
||||
*
|
||||
|
||||
@ -50,7 +50,10 @@ public class ZcRentCarRuleBatteryServiceImpl implements IZcRentCarRuleBatterySer
|
||||
public List<Long> selectBatteryRuleIdsByCarRuleId(Long carRuleId) {
|
||||
return zcRentCarRuleBatteryMapper.selectBatteryRuleIdsByCarRuleId(carRuleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> selectModelRuleByCarRuleId(Long carRuleId) {
|
||||
return zcRentCarRuleBatteryMapper.selectModelRuleByCarRuleId(carRuleId);
|
||||
}
|
||||
/**
|
||||
* 新增租车规则租电规则关联
|
||||
*
|
||||
|
||||
@ -53,6 +53,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
|
||||
private Long vehicleId;
|
||||
|
||||
/** 车辆型号ID */
|
||||
private Long carModelId;
|
||||
|
||||
/** 客户id */
|
||||
private Long customerId;
|
||||
|
||||
@ -64,6 +67,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "客户联系电话")
|
||||
private String customerPhone;
|
||||
|
||||
/** 电池类型 */
|
||||
private String batteryType;
|
||||
|
||||
/** 租赁类型(时租/日租/按天数/以租代售) */
|
||||
@Excel(name = "租赁类型",dictType = "key_order_rental_type")
|
||||
private String rentalType;
|
||||
@ -84,6 +90,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "逾期金额(元)")
|
||||
private BigDecimal overdueFee;
|
||||
|
||||
@Excel(name = "逾期计费类型")
|
||||
private String overdueType;
|
||||
|
||||
/** 是否开通免押 */
|
||||
@Excel(name = "是否开通免押")
|
||||
private Integer isDepositFree;
|
||||
@ -97,11 +106,27 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "首次下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date firstOrderTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "取车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pickCarTime;
|
||||
|
||||
/** 开始计费时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开始计费时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startRentTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endRentTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "申请还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date reqEndRentTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "实际还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date actEndRentTime;
|
||||
|
||||
/** 逾期天数 */
|
||||
@Excel(name = "逾期天数")
|
||||
private Long overdueDays;
|
||||
@ -120,6 +145,14 @@ public class ZcOrderMain extends BaseEntity
|
||||
/** 租电套餐id */
|
||||
private Long rentBatteyRuleId;
|
||||
|
||||
/** 订单总金额 */
|
||||
private BigDecimal orderAmount;
|
||||
/** 订单结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "订单结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endOrderTime;
|
||||
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
@ -377,36 +410,118 @@ public class ZcOrderMain extends BaseEntity
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public Long getCarModelId() {
|
||||
return carModelId;
|
||||
}
|
||||
|
||||
public void setCarModelId(Long carModelId) {
|
||||
this.carModelId = carModelId;
|
||||
}
|
||||
|
||||
public String getBatteryType() {
|
||||
return batteryType;
|
||||
}
|
||||
|
||||
public void setBatteryType(String batteryType) {
|
||||
this.batteryType = batteryType;
|
||||
}
|
||||
|
||||
public Date getPickCarTime() {
|
||||
return pickCarTime;
|
||||
}
|
||||
|
||||
public void setPickCarTime(Date pickCarTime) {
|
||||
this.pickCarTime = pickCarTime;
|
||||
}
|
||||
|
||||
public Date getEndRentTime() {
|
||||
return endRentTime;
|
||||
}
|
||||
|
||||
public void setEndRentTime(Date endRentTime) {
|
||||
this.endRentTime = endRentTime;
|
||||
}
|
||||
|
||||
public Date getReqEndRentTime() {
|
||||
return reqEndRentTime;
|
||||
}
|
||||
|
||||
public void setReqEndRentTime(Date reqEndRentTime) {
|
||||
this.reqEndRentTime = reqEndRentTime;
|
||||
}
|
||||
|
||||
public Date getActEndRentTime() {
|
||||
return actEndRentTime;
|
||||
}
|
||||
|
||||
public void setActEndRentTime(Date actEndRentTime) {
|
||||
this.actEndRentTime = actEndRentTime;
|
||||
}
|
||||
|
||||
public BigDecimal getOrderAmount() {
|
||||
return orderAmount;
|
||||
}
|
||||
|
||||
public void setOrderAmount(BigDecimal orderAmount) {
|
||||
this.orderAmount = orderAmount;
|
||||
}
|
||||
|
||||
public Date getEndOrderTime() {
|
||||
return endOrderTime;
|
||||
}
|
||||
|
||||
public void setEndOrderTime(Date endOrderTime) {
|
||||
this.endOrderTime = endOrderTime;
|
||||
}
|
||||
|
||||
public String getOverdueType() {
|
||||
return overdueType;
|
||||
}
|
||||
|
||||
public void setOverdueType(String overdueType) {
|
||||
this.overdueType = overdueType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("orderStatus", getOrderStatus())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("storeId", getStoreId())
|
||||
.append("vehicleId", getVehicleId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("customerPhone", getCustomerPhone())
|
||||
.append("rentalType", getRentalType())
|
||||
.append("rentalDays", getRentalDays())
|
||||
.append("rentalPrice", getRentalPrice())
|
||||
.append("depositPrice", getDepositPrice())
|
||||
.append("overdueFee", getOverdueFee())
|
||||
.append("isDepositFree", getIsDepositFree())
|
||||
.append("isAutoDeduct", getIsAutoDeduct())
|
||||
.append("firstOrderTime", getFirstOrderTime())
|
||||
.append("startRentTime", getStartRentTime())
|
||||
.append("overdueDays", getOverdueDays())
|
||||
.append("renewalTimes", getRenewalTimes())
|
||||
.append("chargeTimes", getChargeTimes())
|
||||
.append("rentCarRuleId", getRentCarRuleId())
|
||||
.append("rentBatteyRuleId", getRentBatteyRuleId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("zcOrderSubList", getZcOrderSubList())
|
||||
.toString();
|
||||
return new ToStringBuilder(this)
|
||||
.append("orderId", orderId)
|
||||
.append("orderNo", orderNo)
|
||||
.append("orderStatus", orderStatus)
|
||||
.append("operatorId", operatorId)
|
||||
.append("operatorName", operatorName)
|
||||
.append("storeName", storeName)
|
||||
.append("storeId", storeId)
|
||||
.append("licensePlate", licensePlate)
|
||||
.append("vehicleId", vehicleId)
|
||||
.append("carModelId", carModelId)
|
||||
.append("customerId", customerId)
|
||||
.append("customerName", customerName)
|
||||
.append("customerPhone", customerPhone)
|
||||
.append("batteryType", batteryType)
|
||||
.append("rentalType", rentalType)
|
||||
.append("rentalDays", rentalDays)
|
||||
.append("rentalPrice", rentalPrice)
|
||||
.append("depositPrice", depositPrice)
|
||||
.append("overdueFee", overdueFee)
|
||||
.append("overdueType", overdueType)
|
||||
.append("isDepositFree", isDepositFree)
|
||||
.append("isAutoDeduct", isAutoDeduct)
|
||||
.append("firstOrderTime", firstOrderTime)
|
||||
.append("pickCarTime", pickCarTime)
|
||||
.append("startRentTime", startRentTime)
|
||||
.append("endRentTime", endRentTime)
|
||||
.append("reqEndRentTime", reqEndRentTime)
|
||||
.append("actEndRentTime", actEndRentTime)
|
||||
.append("overdueDays", overdueDays)
|
||||
.append("renewalTimes", renewalTimes)
|
||||
.append("chargeTimes", chargeTimes)
|
||||
.append("rentCarRuleId", rentCarRuleId)
|
||||
.append("rentBatteyRuleId", rentBatteyRuleId)
|
||||
.append("orderAmount", orderAmount)
|
||||
.append("endOrderTime", endOrderTime)
|
||||
.append("delFlag", delFlag)
|
||||
.append("zcOrderSubList", zcOrderSubList)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectBatteryRuleIdsByCarRuleId" resultType="long">
|
||||
SELECT battery_rule_id FROM zc_rent_car_rule_battery WHERE car_rule_id = #{carRuleId}
|
||||
</select>
|
||||
|
||||
<select id="selectModelRuleByCarRuleId" resultType="String">
|
||||
SELECT b.rule_name FROM zc_rent_car_rule_battery a left join zc_rent_car_rule b on a.battery_rule_id = b.id WHERE a.car_rule_id = #{carRuleId}
|
||||
</select>
|
||||
<insert id="insertZcRentCarRuleBattery" parameterType="ZcRentCarRuleBattery" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zc_rent_car_rule_battery
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
@ -11,23 +11,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="operatorId" column="operator_id" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="vehicleId" column="vehicle_id" />
|
||||
<result property="carModelId" column="car_model_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="customerPhone" column="customer_phone" />
|
||||
<result property="batteryType" column="battery_type" />
|
||||
<result property="rentalType" column="rental_type" />
|
||||
<result property="rentalDays" column="rental_days" />
|
||||
<result property="rentalPrice" column="rental_price" />
|
||||
<result property="depositPrice" column="deposit_price" />
|
||||
<result property="overdueFee" column="overdue_fee" />
|
||||
<result property="overdueType" column="overdue_type" />
|
||||
<result property="isDepositFree" column="is_deposit_free" />
|
||||
<result property="isAutoDeduct" column="is_auto_deduct" />
|
||||
<result property="firstOrderTime" column="first_order_time" />
|
||||
<result property="pickCarTime" column="pick_car_time" />
|
||||
<result property="startRentTime" column="start_rent_time" />
|
||||
<result property="endRentTime" column="end_rent_time" />
|
||||
<result property="reqEndRentTime" column="req_end_rent_time" />
|
||||
<result property="actEndRentTime" column="act_end_rent_time" />
|
||||
<result property="overdueDays" column="overdue_days" />
|
||||
<result property="renewalTimes" column="renewal_times" />
|
||||
<result property="chargeTimes" column="charge_times" />
|
||||
<result property="rentCarRuleId" column="rent_car_rule_id" />
|
||||
<result property="rentBatteyRuleId" column="rent_battey_rule_id" />
|
||||
<result property="orderAmount" column="order_amount" />
|
||||
<result property="endOrderTime" column="end_order_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
@ -58,11 +67,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcOrderMainVo">
|
||||
select order_id, order_no, order_status, operator_id, store_id, vehicle_id, customer_id, customer_name, customer_phone, rental_type, rental_days, rental_price, deposit_price, overdue_fee, is_deposit_free, is_auto_deduct, first_order_time, start_rent_time, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, del_flag, create_time, update_time from zc_order_main
|
||||
select order_id, order_no, order_status, operator_id, store_id, vehicle_id, car_model_id, customer_id, customer_name, customer_phone, battery_type, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, is_deposit_free, is_auto_deduct, first_order_time, pick_car_time, start_rent_time, end_rent_time, req_end_rent_time, act_end_rent_time, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, order_amount, end_order_time, del_flag, create_time, update_time from zc_order_main
|
||||
</sql>
|
||||
|
||||
<select id="selectZcOrderMainList" parameterType="ZcOrderMain" resultMap="ZcOrderMainResult">
|
||||
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.customer_id, a.customer_name, a.customer_phone, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.start_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.del_flag, a.create_time, a.update_time,
|
||||
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.order_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
|
||||
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate
|
||||
from zc_order_main a
|
||||
left join zc_company c on c.id = a.operator_id
|
||||
@ -98,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectZcOrderMainByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderSubResult">
|
||||
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.customer_id, a.customer_name, a.customer_phone, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.start_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.del_flag, a.create_time, a.update_time,
|
||||
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.order_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
|
||||
b.suborder_id as sub_suborder_id, b.order_id as sub_order_id, b.suborder_no as sub_suborder_no, b.suborder_type as sub_suborder_type, b.amount as sub_amount, b.payment_method as sub_payment_method, b.vin_battery_no as sub_vin_battery_no, b.created_at as sub_created_at, b.payment_id as sub_payment_id, b.paid_at as sub_paid_at, b.remark as sub_remark, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time,
|
||||
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate
|
||||
from zc_order_main a
|
||||
|
||||
@ -10,127 +10,107 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">套餐名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="ruleName" th:field="*{ruleName}" class="form-control" type="text" required>
|
||||
<div class="form-control-static" th:text="*{ruleName}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租赁类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_type')}">
|
||||
<input type="radio" th:id="${'rentalType_' + dict.dictCode}" name="rentalType" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{rentalType}" required>
|
||||
<label th:for="${'rentalType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_type', zcRentCarRule.rentalType)}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租赁天数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentalDays" th:field="*{rentalDays}" class="form-control" type="text">
|
||||
<div class="form-control-static" th:text="*{rentalDays}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租车价格(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentalPrice" th:field="*{rentalPrice}" class="form-control" type="text" required>
|
||||
<div class="form-control-static" th:text="*{rentalPrice}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">押金价格(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="depositPrice" th:field="*{depositPrice}" class="form-control" type="text" required>
|
||||
<div class="form-control-static" th:text="*{depositPrice}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">逾期金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="overdueFee" th:field="*{overdueFee}" class="form-control" type="text" required>
|
||||
<div class="form-control-static" th:text="*{overdueFee}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">逾期计费类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_overdue_type')}">
|
||||
<input type="radio" th:id="${'overdueType_' + dict.dictCode}" name="overdueType" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{overdueType}" required>
|
||||
<label th:for="${'overdueType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
|
||||
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_overdue_type', zcRentCarRule.overdueType)}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否支持免押:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_deposit_free')}">
|
||||
<input type="radio" th:id="${'depositFree_' + dict.dictCode}" name="depositFree" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{depositFree}" required>
|
||||
<label th:for="${'depositFree_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
|
||||
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_deposit_free', zcRentCarRule.depositFree)}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否支持代扣:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_rent_auto_deduct')}">
|
||||
<input type="radio" th:id="${'autoDeduct_' + dict.dictCode}" name="autoDeduct" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{autoDeduct}" required>
|
||||
<label th:for="${'autoDeduct_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_auto_deduct', zcRentCarRule.autoDeduct)}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属运营商:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
|
||||
<option value="">请选择所属运营商</option>
|
||||
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}" th:field="*{operatingCompanyId}" ></option>
|
||||
</select>
|
||||
<div class="form-control-static" th:text="${company.companyName}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租电套餐:</label>
|
||||
<div class="col-sm-8">
|
||||
<div id="batteryRuleList"></div>
|
||||
<div class="form-control-static" th:text="${modelRuleNames}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">选择车型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
|
||||
<option value="">请选择车型</option>
|
||||
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}" th:field="*{operatingCompanyId}" ></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "operation/rentCarRule";
|
||||
$("#form-rentCarRule-edit").validate({
|
||||
rules:{
|
||||
rentalPrice:{
|
||||
number:true
|
||||
},
|
||||
depositPrice:{
|
||||
number:true
|
||||
},
|
||||
overdueFee:{
|
||||
number:true
|
||||
}
|
||||
},
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// 初始隐藏租赁天数
|
||||
$('input[name="rentalDays"]').closest('.form-group').hide();
|
||||
|
||||
// 监听单选按钮变化
|
||||
$('input[name="rentalType"]').change(function() {
|
||||
if($(this).val() === '3') {
|
||||
$('input[name="rentalDays"]').closest('.form-group').show();
|
||||
} else {
|
||||
$('input[name="rentalDays"]').closest('.form-group').hide().find('input').val('');
|
||||
}
|
||||
});
|
||||
// 初始显示逾期金额
|
||||
var $overdueFeeGroup = $('input[name="overdueFee"]').closest('.form-group');
|
||||
|
||||
// 检查初始选中项
|
||||
if($('input[name="rentalType"]:checked').val() === '3') {
|
||||
$('input[name="rentalDays"]').closest('.form-group').show();
|
||||
}
|
||||
var currentRentalType = $('input[name="rentalType"]:checked').val();
|
||||
// 检查初始选中项
|
||||
if(currentRentalType === '1') {
|
||||
$overdueFeeGroup.hide().find('input').val('');
|
||||
}else if(currentRentalType === '3') {
|
||||
$rentalDaysGroup.show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-rentCarRule-edit').serialize());
|
||||
|
||||
@ -189,13 +189,13 @@
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-primary btn-xs btnOption" href="javascript:void(0)" onClick="$.operate.edit(\''+row.id+'\', 900, 700)"><i class="fa fa-sticky-note-o"></i> 应用至车型</a>');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
if (row.status == 1) {
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="enable(\'' + row.id + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>启用</a> ');
|
||||
} else {
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="disable(\'' + row.id + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>停用</a> ');
|
||||
}
|
||||
// actions.push('<a class="btn btn-primary btn-xs btnOption" href="javascript:void(0)" onClick="$.operate.detail(\''+row.id+'\', 900, 700)"><i class="fa fa-sticky-note-o"></i> 查看</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">车辆:</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{vehicleId}"></div>
|
||||
<div class="form-control-static" th:text="*{licensePlate}"></div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-required">客户姓名:</label>
|
||||
<div class="col-sm-4">
|
||||
@ -69,6 +69,18 @@
|
||||
<div class="form-control-static" th:text="*{overdueFee}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">租金总额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{orderAmount}"></div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-required">租赁周期:</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="${#dates.format(zcOrderMain.startRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div> -
|
||||
<div class="form-control-static" th:if="*{actEndRentTime} != null" th:text="${#dates.format(zcOrderMain.actEndRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
|
||||
<div class="form-control-static" th:if="*{actEndRentTime} == null" th:text="${#dates.format(zcOrderMain.endRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">是否开通免押:</label>
|
||||
<div class="col-sm-4">
|
||||
@ -196,7 +208,7 @@
|
||||
{
|
||||
field: 'vinBatteryNo',
|
||||
align: 'center',
|
||||
title: '车架/电池编号'
|
||||
title: '车牌号'
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@ -2,6 +2,18 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('租车订单列表')" />
|
||||
<style>
|
||||
.bootstrap-table .fixed-table-container .table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table th,
|
||||
.bootstrap-table .fixed-table-container .table td {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
@ -96,53 +108,56 @@
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "租车订单",
|
||||
tableLayout: 'fixed', // 固定表格布局
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'orderId',
|
||||
title: '订单ID',
|
||||
title: '订单编号',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'operatorName',
|
||||
title: '所属运营商',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'storeName',
|
||||
title: '所属门店',
|
||||
width: '120px'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'orderNo',
|
||||
title: '订单编号',
|
||||
width: '220px',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs btnOption" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderId + '\',1300,800)">' + value + '</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'orderStatus',
|
||||
title: '订单状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(orderStatusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'operatorName',
|
||||
title: '所属运营商'
|
||||
},
|
||||
{
|
||||
field: 'storeName',
|
||||
title: '所属门店'
|
||||
},
|
||||
{
|
||||
field: 'licensePlate',
|
||||
title: '车辆'
|
||||
title: '车架号',
|
||||
width: '120px'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'customerName',
|
||||
title: '客户姓名'
|
||||
title: '客户姓名',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'customerPhone',
|
||||
title: '联系电话'
|
||||
title: '联系电话',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'rentalType',
|
||||
title: '租赁类型',
|
||||
width: '120px',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(rentalTypeDatas, value);
|
||||
}
|
||||
@ -150,19 +165,48 @@
|
||||
|
||||
{
|
||||
field: 'rentalPrice',
|
||||
title: '租车价格(元)'
|
||||
title: '租赁价格(元)',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'depositPrice',
|
||||
title: '押金价格(元)'
|
||||
title: '支付押金(元)',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'overdueFee',
|
||||
title: '逾期金额(元)'
|
||||
field: 'rentalDays',
|
||||
title: '租赁天数',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'orderAmount',
|
||||
title: '租金总额',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'startRentTime',
|
||||
title: '租赁周期',
|
||||
width: '340px',
|
||||
formatter: function(value, row, index) {
|
||||
if(row.actEndRentTime == null){
|
||||
return row.startRentTime + ' ~ ' + row.endRentTime;
|
||||
}else{
|
||||
return row.startRentTime + ' ~ ' + row.actEndRentTime;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'orderStatus',
|
||||
title: '订单状态',
|
||||
width: '120px',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(orderStatusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'isDepositFree',
|
||||
title: '是否开通免押',
|
||||
width: '120px',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(depositFreeDatas, value);
|
||||
}
|
||||
@ -170,21 +214,41 @@
|
||||
{
|
||||
field: 'isAutoDeduct',
|
||||
title: '是否开通代扣',
|
||||
width: '120px',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(autoDeductDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'overdueDays',
|
||||
title: '逾期天数',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'renewalTimes',
|
||||
title: '续租次数',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'chargeTimes',
|
||||
title: '租电次数',
|
||||
width: '120px'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'firstOrderTime',
|
||||
title: '首次下单时间'
|
||||
title: '首次下单时间',
|
||||
width: '160px'
|
||||
},
|
||||
{
|
||||
field: 'startRentTime',
|
||||
title: '开始计费时间'
|
||||
title: '开始计费时间',
|
||||
width: '160px'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '100px',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderId + '\',1300,800)"><i class="fa fa-edit"></i>查看</a> ');
|
||||
|
||||
Reference in New Issue
Block a user