123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <!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="role-form">
- <div class="select-list">
- <div class="form-group">
- <label for="erBanNo" class="col-sm-2 control-label">卿卿号:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <input name="erBanNo" id="erBanNo" class="form-control" type="text" placeholder="请输入卿卿号"/>
- </div>
- </div>
- <div class="form-group">
- <label for="carId" class="col-sm-2 control-label">座驾:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <select name="carId" id="carId" th:with="type=${cars}">
- <option th:each="car : ${type}" th:text="${car.carName}" th:value="${car.carId}"></option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">赠送天数:</label>
- <div class="col-sm-10">
- <select name="days" id="days" class="form-control m-b" th:with="type=${@dict.getType('give_days_type')}">
- <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-2 control-label"></label>
- <div class="col-sm-10">
- <a class="btn btn-primary btn-rounded btn-sm" shiro:hasPermission="mall:give:car:query" onclick="querySearch()"><i class="fa fa-search"></i> 查询</a>
- <a class="btn btn-warning btn-rounded btn-sm" shiro:hasPermission="mall:give:car:confirm" onclick="confirmGift()"><i class="fa fa-check"></i> 确认</a>
- </div>
- </div>
- </div>
- </form>
- </div>
-
- <div class="col-sm-12 select-table table-striped">
- <table class="table table-bordered">
- <thead><tr>
- <th style="width: 80px;text-align: center">头像</th>
- <th style="width:60px;text-align: center">uid</th>
- <th style="width:100px;text-align: center">卿卿号</th>
- <th style="width:100px;text-align: center">昵称</th>
- <th style="width:150px;text-align: center">卿卿号OR座驾ID</th>
- <th style="width:100px;text-align: center">座驾名称</th>
- <th style="width:80px;text-align: center">价格</th>
- <th style="text-align: center">剩余时间(天)</th>
- </tr></thead>
- <tbody id="tbody">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var prefix = ctx + "mall/give/car";
- function querySearch() {
- if(!$('#erBanNo').val()){
- $.modal.alertError("请输入卿卿号");
- return;
- }
- $.operate.get(prefix + "/getGiveCarUsersInfo?erBanNo=" + $('#erBanNo').val() + "&carId=" + $("#carId").val(),function (result) {
- if(result.code == 0){
- var str = '';
- var bean = result.data;
- str += "<tr>\n" +
- " <th style=\"width: 80px;text-align: center\"><img src='"+bean.avatar+"' width='50'/></th>\n" +
- " <th style='width: 60px;text-align: center'>" + bean.uid + "</th>\n" +
- " <th style='width:100px;text-align: center'>" + bean.erBanNo + "</th>\n" +
- " <th style='width:100px;text-align: center'>" + bean.nick + "</th>\n" +
- " <th style='width:150px;text-align: center'>" + bean.erBanNoOrCarId + "</th>\n" +
- " <th style='width:100px;text-align: center'>" + bean.carName + "</th>\n" +
- " <th style='width:100px;text-align: center'>" + bean.goldPrice + "</th>\n" +
- " <th style='text-align: center'>" + bean.carDate + "</th>\n" +
- " </tr>";
- $('#tbody').html(str);
- }
- })
- }
- function confirmGift(){
- if(!$('#erBanNo').val()){
- $.modal.alertError("请输入卿卿号!");
- return;
- }
- var erBanNo = $('#erBanNo').val();
- var itemId = $('#carId').val();
- var days = $("#days").val();
- $.operate.post(prefix + "/give",{"erBanNo":erBanNo,"itemId":itemId,"days":days})
- }
- </script>
- </body>
- </html>
|