订单列表
This commit is contained in:
@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.orders.mapper.ZcOrderMainMapper">
|
||||
|
||||
<resultMap type="ZcOrderMain" id="ZcOrderMainResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="operatorId" column="operator_id" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="vehicleId" column="vehicle_id" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="customerPhone" column="customer_phone" />
|
||||
<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="isDepositFree" column="is_deposit_free" />
|
||||
<result property="isAutoDeduct" column="is_auto_deduct" />
|
||||
<result property="firstOrderTime" column="first_order_time" />
|
||||
<result property="startRentTime" column="start_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="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ZcOrderMainZcOrderSubResult" type="ZcOrderMain" extends="ZcOrderMainResult">
|
||||
<collection property="zcOrderSubList" notNullColumn="sub_suborder_id" javaType="java.util.List" resultMap="ZcOrderSubResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZcOrderSub" id="ZcOrderSubResult">
|
||||
<result property="suborderId" column="sub_suborder_id" />
|
||||
<result property="orderId" column="sub_order_id" />
|
||||
<result property="suborderNo" column="sub_suborder_no" />
|
||||
<result property="suborderType" column="sub_suborder_type" />
|
||||
<result property="amount" column="sub_amount" />
|
||||
<result property="paymentMethod" column="sub_payment_method" />
|
||||
<result property="vinBatteryNo" column="sub_vin_battery_no" />
|
||||
<result property="createdAt" column="sub_created_at" />
|
||||
<result property="paymentId" column="sub_payment_id" />
|
||||
<result property="paidAt" column="sub_paid_at" />
|
||||
<result property="remark" column="sub_remark" />
|
||||
<result property="delFlag" column="sub_del_flag" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="updateTime" column="sub_update_time" />
|
||||
</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
|
||||
</sql>
|
||||
|
||||
<select id="selectZcOrderMainList" parameterType="ZcOrderMain" resultMap="ZcOrderMainResult">
|
||||
<include refid="selectZcOrderMainVo"/>
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
|
||||
<if test="storeId != null "> and store_id = #{storeId}</if>
|
||||
<if test="vehicleId != null "> and vehicle_id = #{vehicleId}</if>
|
||||
<if test="customerId != null "> and customer_id = #{customerId}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
|
||||
<if test="rentalType != null and rentalType != ''"> and rental_type = #{rentalType}</if>
|
||||
<if test="rentalDays != null "> and rental_days = #{rentalDays}</if>
|
||||
<if test="rentalPrice != null "> and rental_price = #{rentalPrice}</if>
|
||||
<if test="depositPrice != null "> and deposit_price = #{depositPrice}</if>
|
||||
<if test="overdueFee != null "> and overdue_fee = #{overdueFee}</if>
|
||||
<if test="isDepositFree != null "> and is_deposit_free = #{isDepositFree}</if>
|
||||
<if test="isAutoDeduct != null "> and is_auto_deduct = #{isAutoDeduct}</if>
|
||||
<if test="firstOrderTime != null "> and first_order_time = #{firstOrderTime}</if>
|
||||
<if test="startRentTime != null "> and start_rent_time = #{startRentTime}</if>
|
||||
<if test="overdueDays != null "> and overdue_days = #{overdueDays}</if>
|
||||
<if test="renewalTimes != null "> and renewal_times = #{renewalTimes}</if>
|
||||
<if test="chargeTimes != null "> and charge_times = #{chargeTimes}</if>
|
||||
<if test="rentCarRuleId != null "> and rent_car_rule_id = #{rentCarRuleId}</if>
|
||||
<if test="rentBatteyRuleId != null "> and rent_battey_rule_id = #{rentBatteyRuleId}</if>
|
||||
</where>
|
||||
</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,
|
||||
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
|
||||
from zc_order_main a
|
||||
left join zc_order_sub b on b.order_id = a.order_id
|
||||
where a.order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcOrderMain" parameterType="ZcOrderMain" useGeneratedKeys="true" keyProperty="orderId">
|
||||
insert into zc_order_main
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">order_no,</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">order_status,</if>
|
||||
<if test="operatorId != null">operator_id,</if>
|
||||
<if test="storeId != null">store_id,</if>
|
||||
<if test="vehicleId != null">vehicle_id,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null and customerName != ''">customer_name,</if>
|
||||
<if test="customerPhone != null and customerPhone != ''">customer_phone,</if>
|
||||
<if test="rentalType != null and rentalType != ''">rental_type,</if>
|
||||
<if test="rentalDays != null">rental_days,</if>
|
||||
<if test="rentalPrice != null">rental_price,</if>
|
||||
<if test="depositPrice != null">deposit_price,</if>
|
||||
<if test="overdueFee != null">overdue_fee,</if>
|
||||
<if test="isDepositFree != null">is_deposit_free,</if>
|
||||
<if test="isAutoDeduct != null">is_auto_deduct,</if>
|
||||
<if test="firstOrderTime != null">first_order_time,</if>
|
||||
<if test="startRentTime != null">start_rent_time,</if>
|
||||
<if test="overdueDays != null">overdue_days,</if>
|
||||
<if test="renewalTimes != null">renewal_times,</if>
|
||||
<if test="chargeTimes != null">charge_times,</if>
|
||||
<if test="rentCarRuleId != null">rent_car_rule_id,</if>
|
||||
<if test="rentBatteyRuleId != null">rent_battey_rule_id,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">#{orderStatus},</if>
|
||||
<if test="operatorId != null">#{operatorId},</if>
|
||||
<if test="storeId != null">#{storeId},</if>
|
||||
<if test="vehicleId != null">#{vehicleId},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null and customerName != ''">#{customerName},</if>
|
||||
<if test="customerPhone != null and customerPhone != ''">#{customerPhone},</if>
|
||||
<if test="rentalType != null and rentalType != ''">#{rentalType},</if>
|
||||
<if test="rentalDays != null">#{rentalDays},</if>
|
||||
<if test="rentalPrice != null">#{rentalPrice},</if>
|
||||
<if test="depositPrice != null">#{depositPrice},</if>
|
||||
<if test="overdueFee != null">#{overdueFee},</if>
|
||||
<if test="isDepositFree != null">#{isDepositFree},</if>
|
||||
<if test="isAutoDeduct != null">#{isAutoDeduct},</if>
|
||||
<if test="firstOrderTime != null">#{firstOrderTime},</if>
|
||||
<if test="startRentTime != null">#{startRentTime},</if>
|
||||
<if test="overdueDays != null">#{overdueDays},</if>
|
||||
<if test="renewalTimes != null">#{renewalTimes},</if>
|
||||
<if test="chargeTimes != null">#{chargeTimes},</if>
|
||||
<if test="rentCarRuleId != null">#{rentCarRuleId},</if>
|
||||
<if test="rentBatteyRuleId != null">#{rentBatteyRuleId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcOrderMain" parameterType="ZcOrderMain">
|
||||
update zc_order_main
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">order_status = #{orderStatus},</if>
|
||||
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
||||
<if test="storeId != null">store_id = #{storeId},</if>
|
||||
<if test="vehicleId != null">vehicle_id = #{vehicleId},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
|
||||
<if test="customerPhone != null and customerPhone != ''">customer_phone = #{customerPhone},</if>
|
||||
<if test="rentalType != null and rentalType != ''">rental_type = #{rentalType},</if>
|
||||
<if test="rentalDays != null">rental_days = #{rentalDays},</if>
|
||||
<if test="rentalPrice != null">rental_price = #{rentalPrice},</if>
|
||||
<if test="depositPrice != null">deposit_price = #{depositPrice},</if>
|
||||
<if test="overdueFee != null">overdue_fee = #{overdueFee},</if>
|
||||
<if test="isDepositFree != null">is_deposit_free = #{isDepositFree},</if>
|
||||
<if test="isAutoDeduct != null">is_auto_deduct = #{isAutoDeduct},</if>
|
||||
<if test="firstOrderTime != null">first_order_time = #{firstOrderTime},</if>
|
||||
<if test="startRentTime != null">start_rent_time = #{startRentTime},</if>
|
||||
<if test="overdueDays != null">overdue_days = #{overdueDays},</if>
|
||||
<if test="renewalTimes != null">renewal_times = #{renewalTimes},</if>
|
||||
<if test="chargeTimes != null">charge_times = #{chargeTimes},</if>
|
||||
<if test="rentCarRuleId != null">rent_car_rule_id = #{rentCarRuleId},</if>
|
||||
<if test="rentBatteyRuleId != null">rent_battey_rule_id = #{rentBatteyRuleId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcOrderMainByOrderId" parameterType="Long">
|
||||
delete from zc_order_main where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcOrderMainByOrderIds" parameterType="String">
|
||||
delete from zc_order_main where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcOrderSubByOrderIds" parameterType="String">
|
||||
delete from zc_order_sub where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcOrderSubByOrderId" parameterType="Long">
|
||||
delete from zc_order_sub where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchZcOrderSub">
|
||||
insert into zc_order_sub( suborder_id, order_id, suborder_no, suborder_type, amount, payment_method, vin_battery_no, created_at, payment_id, paid_at, remark, del_flag, create_time, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.suborderId}, #{item.orderId}, #{item.suborderNo}, #{item.suborderType}, #{item.amount}, #{item.paymentMethod}, #{item.vinBatteryNo}, #{item.createdAt}, #{item.paymentId}, #{item.paidAt}, #{item.remark}, #{item.delFlag}, #{item.createTime}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.orders.mapper.ZcOrderSubMapper">
|
||||
|
||||
<resultMap type="ZcOrderSub" id="ZcOrderSubResult">
|
||||
<result property="suborderId" column="suborder_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="suborderNo" column="suborder_no" />
|
||||
<result property="suborderType" column="suborder_type" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="paymentMethod" column="payment_method" />
|
||||
<result property="vinBatteryNo" column="vin_battery_no" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="paymentId" column="payment_id" />
|
||||
<result property="paidAt" column="paid_at" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcOrderSubVo">
|
||||
select suborder_id, order_id, suborder_no, suborder_type, amount, payment_method, vin_battery_no, created_at, payment_id, paid_at, remark, del_flag, create_time, update_time from zc_order_sub
|
||||
</sql>
|
||||
|
||||
<select id="selectZcOrderSubList" parameterType="ZcOrderSub" resultMap="ZcOrderSubResult">
|
||||
<include refid="selectZcOrderSubVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="suborderNo != null and suborderNo != ''"> and suborder_no = #{suborderNo}</if>
|
||||
<if test="suborderType != null and suborderType != ''"> and suborder_type = #{suborderType}</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
<if test="paymentMethod != null and paymentMethod != ''"> and payment_method = #{paymentMethod}</if>
|
||||
<if test="vinBatteryNo != null and vinBatteryNo != ''"> and vin_battery_no = #{vinBatteryNo}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="paymentId != null and paymentId != ''"> and payment_id = #{paymentId}</if>
|
||||
<if test="paidAt != null "> and paid_at = #{paidAt}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcOrderSubBySuborderId" parameterType="Long" resultMap="ZcOrderSubResult">
|
||||
<include refid="selectZcOrderSubVo"/>
|
||||
where suborder_id = #{suborderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcOrderSub" parameterType="ZcOrderSub" useGeneratedKeys="true" keyProperty="suborderId">
|
||||
insert into zc_order_sub
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="suborderNo != null and suborderNo != ''">suborder_no,</if>
|
||||
<if test="suborderType != null and suborderType != ''">suborder_type,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="paymentMethod != null and paymentMethod != ''">payment_method,</if>
|
||||
<if test="vinBatteryNo != null and vinBatteryNo != ''">vin_battery_no,</if>
|
||||
<if test="createdAt != null">created_at,</if>
|
||||
<if test="paymentId != null and paymentId != ''">payment_id,</if>
|
||||
<if test="paidAt != null">paid_at,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="suborderNo != null and suborderNo != ''">#{suborderNo},</if>
|
||||
<if test="suborderType != null and suborderType != ''">#{suborderType},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="paymentMethod != null and paymentMethod != ''">#{paymentMethod},</if>
|
||||
<if test="vinBatteryNo != null and vinBatteryNo != ''">#{vinBatteryNo},</if>
|
||||
<if test="createdAt != null">#{createdAt},</if>
|
||||
<if test="paymentId != null and paymentId != ''">#{paymentId},</if>
|
||||
<if test="paidAt != null">#{paidAt},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcOrderSub" parameterType="ZcOrderSub">
|
||||
update zc_order_sub
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="suborderNo != null and suborderNo != ''">suborder_no = #{suborderNo},</if>
|
||||
<if test="suborderType != null and suborderType != ''">suborder_type = #{suborderType},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="paymentMethod != null and paymentMethod != ''">payment_method = #{paymentMethod},</if>
|
||||
<if test="vinBatteryNo != null and vinBatteryNo != ''">vin_battery_no = #{vinBatteryNo},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="paymentId != null and paymentId != ''">payment_id = #{paymentId},</if>
|
||||
<if test="paidAt != null">paid_at = #{paidAt},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where suborder_id = #{suborderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcOrderSubBySuborderId" parameterType="Long">
|
||||
delete from zc_order_sub where suborder_id = #{suborderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcOrderSubBySuborderIds" parameterType="String">
|
||||
delete from zc_order_sub where suborder_id in
|
||||
<foreach item="suborderId" collection="array" open="(" separator="," close=")">
|
||||
#{suborderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
360
ruoyi-admin/src/main/resources/templates/orders/order/add.html
Normal file
360
ruoyi-admin/src/main/resources/templates/orders/order/add.html
Normal file
@ -0,0 +1,360 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增租车订单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-add">
|
||||
<h4 class="form-header h4">租车订单信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderNo" class="form-control" type="text" required>
|
||||
</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_order_status')}">
|
||||
<input type="radio" th:id="${'orderStatus_' + dict.dictCode}" name="orderStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'orderStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属运营商ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属门店ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="storeId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">车辆ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vehicleId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">客户id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">客户姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">客户联系电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerPhone" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租赁类型(时租/日租/按天数/以租代售):</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="rentalType" class="form-control m-b" th:with="type=${@dict.getType('key_order_rental_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租赁天数(当类型为"按天数"时使用):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentalDays" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租车价格(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentalPrice" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">押金价格(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="depositPrice" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">逾期金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="overdueFee" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">是否开通免押:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="isDepositFree" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">是否开通代扣:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="isAutoDeduct" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">首次下单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="firstOrderTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">开始计费时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="startRentTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">逾期天数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="overdueDays" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">续租次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="renewalTimes" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">充电次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="chargeTimes" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租车套餐id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentCarRuleId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租电套餐id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentBatteyRuleId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">租车子订单信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "orders/order"
|
||||
var suborderTypeDatas = [[${@dict.getType('key_order_suborder_type')}]];
|
||||
$("#form-order-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='firstOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='startRentTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'suborderNo',
|
||||
align: 'center',
|
||||
title: '子订单编号',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].suborderNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'suborderType',
|
||||
align: 'center',
|
||||
title: '子订单类型',
|
||||
formatter: function(value, row, index) {
|
||||
var name = $.common.sprintf("zcOrderSubList[%s].suborderType", index);
|
||||
return $.common.dictToSelect(suborderTypeDatas, value, name);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
align: 'center',
|
||||
title: '订单金额',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].amount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'paymentMethod',
|
||||
align: 'center',
|
||||
title: '支付方式',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paymentMethod' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'vinBatteryNo',
|
||||
align: 'center',
|
||||
title: '车架/电池编号',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].vinBatteryNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createdAt',
|
||||
align: 'center',
|
||||
title: '订单产生时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].createdAt' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'paymentId',
|
||||
align: 'center',
|
||||
title: '支付ID',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paymentId' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'paidAt',
|
||||
align: 'center',
|
||||
title: '实际支付时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paidAt' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
align: 'center',
|
||||
title: '备注',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].remark' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'delFlag',
|
||||
align: 'center',
|
||||
title: '删除标志',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].delFlag' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '创建时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].createTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].updateTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
suborderNo: "",
|
||||
suborderType: "",
|
||||
amount: "",
|
||||
paymentMethod: "",
|
||||
vinBatteryNo: "",
|
||||
createdAt: "",
|
||||
paymentId: "",
|
||||
paidAt: "",
|
||||
remark: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
343
ruoyi-admin/src/main/resources/templates/orders/order/edit.html
Normal file
343
ruoyi-admin/src/main/resources/templates/orders/order/edit.html
Normal file
@ -0,0 +1,343 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('租车订单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-order-edit" th:object="${zcOrderMain}">
|
||||
<h4 class="form-header h4">租车订单信息</h4>
|
||||
<input name="orderId" th:field="*{orderId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderNo" th:field="*{orderNo}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="orderStatus" class="form-control m-b" th:with="type=${@dict.getType('key_order_status')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{rentalType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属运营商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorId" th:field="*{operatorId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属门店:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="storeId" th:field="*{storeId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">车辆ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vehicleId" th:field="*{vehicleId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">客户姓名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerName" th:field="*{customerName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">客户联系电话:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="customerPhone" th:field="*{customerPhone}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租赁类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="rentalType" class="form-control m-b" th:with="type=${@dict.getType('key_order_rental_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{rentalType}"></option>
|
||||
</select>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">是否开通免押:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="isDepositFree" th:field="*{isDepositFree}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">是否开通代扣:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="isAutoDeduct" th:field="*{isAutoDeduct}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">首次下单时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="firstOrderTime" th:value="${#dates.format(zcOrderMain.firstOrderTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">开始计费时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="startRentTime" th:value="${#dates.format(zcOrderMain.startRentTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">逾期天数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="overdueDays" th:field="*{overdueDays}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">续租次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="renewalTimes" th:field="*{renewalTimes}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">充电次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="chargeTimes" th:field="*{chargeTimes}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租车套餐id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentCarRuleId" th:field="*{rentCarRuleId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租电套餐id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentBatteyRuleId" th:field="*{rentBatteyRuleId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">租车子订单信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- <button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>-->
|
||||
<!-- <button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>-->
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "orders/order";
|
||||
var suborderTypeDatas = [[${@dict.getType('key_order_suborder_type')}]];
|
||||
$("#form-order-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='firstOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='startRentTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${zcOrderMain.zcOrderSubList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'suborderNo',
|
||||
align: 'center',
|
||||
title: '子订单编号',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].suborderNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'suborderType',
|
||||
align: 'center',
|
||||
title: '子订单类型',
|
||||
formatter: function(value, row, index) {
|
||||
var name = $.common.sprintf("zcOrderSubList[%s].suborderType", index);
|
||||
return $.common.dictToSelect(suborderTypeDatas, value, name);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
align: 'center',
|
||||
title: '订单金额',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].amount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'paymentMethod',
|
||||
align: 'center',
|
||||
title: '支付方式',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paymentMethod' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'vinBatteryNo',
|
||||
align: 'center',
|
||||
title: '车架/电池编号',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].vinBatteryNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'createdAt',
|
||||
align: 'center',
|
||||
title: '订单产生时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].createdAt' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'paymentId',
|
||||
align: 'center',
|
||||
title: '支付ID',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paymentId' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'paidAt',
|
||||
align: 'center',
|
||||
title: '实际支付时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paidAt' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'remark',
|
||||
align: 'center',
|
||||
title: '备注',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].remark' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '创建时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].createTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].updateTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
suborderNo: "",
|
||||
suborderType: "",
|
||||
amount: "",
|
||||
paymentMethod: "",
|
||||
vinBatteryNo: "",
|
||||
createdAt: "",
|
||||
paymentId: "",
|
||||
paidAt: "",
|
||||
remark: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
189
ruoyi-admin/src/main/resources/templates/orders/order/order.html
Normal file
189
ruoyi-admin/src/main/resources/templates/orders/order/order.html
Normal file
@ -0,0 +1,189 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('租车订单列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>所属运营商:</label>
|
||||
<select name="operatorId" id="operatorId" >
|
||||
<option value="">请选择所属运营商</option>
|
||||
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>所属门店:</label>
|
||||
<input type="text" name="storeId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>车辆:</label>
|
||||
<input type="text" name="vehicleId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单编号:</label>
|
||||
<input type="text" name="orderNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单状态:</label>
|
||||
<select name="orderStatus" th:with="type=${@dict.getType('key_order_status')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>客户联系电话:</label>
|
||||
<input type="text" name="customerPhone"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>租赁类型:</label>
|
||||
<select name="rentalType" th:with="type=${@dict.getType('key_order_rental_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="orders:order:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="orders:order:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="orders:order:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="orders:order:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('orders:order:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('orders:order:remove')}]];
|
||||
var orderStatusDatas = [[${@dict.getType('key_order_status')}]];
|
||||
var rentalTypeDatas = [[${@dict.getType('key_order_rental_type')}]];
|
||||
var prefix = ctx + "orders/order";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "租车订单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'orderId',
|
||||
title: '订单ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'orderNo',
|
||||
title: '订单编号'
|
||||
},
|
||||
{
|
||||
field: 'orderStatus',
|
||||
title: '订单状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(orderStatusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'operatorId',
|
||||
title: '所属运营商'
|
||||
},
|
||||
{
|
||||
field: 'storeId',
|
||||
title: '所属门店'
|
||||
},
|
||||
{
|
||||
field: 'vehicleId',
|
||||
title: '车辆'
|
||||
},
|
||||
{
|
||||
field: 'customerName',
|
||||
title: '客户姓名'
|
||||
},
|
||||
{
|
||||
field: 'customerPhone',
|
||||
title: '客户联系电话'
|
||||
},
|
||||
{
|
||||
field: 'rentalType',
|
||||
title: '租赁类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(rentalTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'rentalDays',
|
||||
title: '租赁天数'
|
||||
},
|
||||
{
|
||||
field: 'rentalPrice',
|
||||
title: '租车价格(元)'
|
||||
},
|
||||
{
|
||||
field: 'depositPrice',
|
||||
title: '押金价格(元)'
|
||||
},
|
||||
{
|
||||
field: 'overdueFee',
|
||||
title: '逾期金额(元)'
|
||||
},
|
||||
{
|
||||
field: 'isDepositFree',
|
||||
title: '是否开通免押'
|
||||
},
|
||||
{
|
||||
field: 'isAutoDeduct',
|
||||
title: '是否开通代扣'
|
||||
},
|
||||
{
|
||||
field: 'firstOrderTime',
|
||||
title: '首次下单时间'
|
||||
},
|
||||
{
|
||||
field: 'startRentTime',
|
||||
title: '开始计费时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editCustomize(\'' + row.orderId + '\',1300,700)"><i class="fa fa-edit"></i>查看</a> ');
|
||||
//actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增租车子订单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-orderSub-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">关联的订单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">子订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="suborderNo" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">子订单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="suborderType" class="form-control m-b" th:with="type=${@dict.getType('key_order_suborder_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单金额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="amount" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">支付方式:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentMethod" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">车架/电池编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vinBatteryNo" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单产生时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="createdAt" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">支付ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">实际支付时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="paidAt" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "orders/orderSub"
|
||||
$("#form-orderSub-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-orderSub-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='createdAt']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='paidAt']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改租车子订单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-orderSub-edit" th:object="${zcOrderSub}">
|
||||
<input name="suborderId" th:field="*{suborderId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">关联的订单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderId" th:field="*{orderId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">子订单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="suborderNo" th:field="*{suborderNo}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">子订单类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="suborderType" class="form-control m-b" th:with="type=${@dict.getType('key_order_suborder_type')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{suborderType}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单金额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="amount" th:field="*{amount}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">支付方式:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentMethod" th:field="*{paymentMethod}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">车架/电池编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vinBatteryNo" th:field="*{vinBatteryNo}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">订单产生时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="createdAt" th:value="${#dates.format(zcOrderSub.createdAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">支付ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentId" th:field="*{paymentId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">实际支付时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="paidAt" th:value="${#dates.format(zcOrderSub.paidAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "orders/orderSub";
|
||||
$("#form-orderSub-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-orderSub-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='createdAt']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("input[name='paidAt']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('租车子订单列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>订单号:</label>
|
||||
<input type="text" name="orderId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>子订单编号:</label>
|
||||
<input type="text" name="suborderNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>子订单类型:</label>
|
||||
<select name="suborderType" th:with="type=${@dict.getType('key_order_suborder_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单金额:</label>
|
||||
<input type="text" name="amount"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>支付方式:</label>
|
||||
<input type="text" name="paymentMethod"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>车架/电池编号:</label>
|
||||
<input type="text" name="vinBatteryNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单产生时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择订单产生时间" name="createdAt"/>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="orders:orderSub:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="orders:orderSub:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="orders:orderSub:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="orders:orderSub:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('orders:orderSub:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('orders:orderSub:remove')}]];
|
||||
var suborderTypeDatas = [[${@dict.getType('key_order_suborder_type')}]];
|
||||
var prefix = ctx + "orders/orderSub";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "租车子订单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'suborderId',
|
||||
title: '子订单',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'orderId',
|
||||
title: '订单号'
|
||||
},
|
||||
{
|
||||
field: 'suborderNo',
|
||||
title: '子订单编号'
|
||||
},
|
||||
{
|
||||
field: 'suborderType',
|
||||
title: '子订单类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(suborderTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
title: '订单金额'
|
||||
},
|
||||
{
|
||||
field: 'paymentMethod',
|
||||
title: '支付方式'
|
||||
},
|
||||
{
|
||||
field: 'vinBatteryNo',
|
||||
title: '车架/电池编号'
|
||||
},
|
||||
{
|
||||
field: 'createdAt',
|
||||
title: '订单产生时间'
|
||||
},
|
||||
{
|
||||
field: 'paymentId',
|
||||
title: '支付方式'
|
||||
},
|
||||
{
|
||||
field: 'paidAt',
|
||||
title: '实际支付时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.suborderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.suborderId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user