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="headWearId" class="col-sm-2 control-label">头饰:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <select name="headWearId" id="headWearId" th:with="type=${headWears}">
- <option th:each="headWear : ${type}" th:text="${headWear.headwearName}" th:value="${headWear.headwearId}"></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:headwear:query" onclick="querySearch()"><i class="fa fa-search"></i> 查询</a>
- <a class="btn btn-warning btn-rounded btn-sm" shiro:hasPermission="mall:give:headwear: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/headwear";
- function querySearch() {
- if(!$('#erBanNo').val()){
- $.modal.alertError("请输入卿卿号");
- return;
- }
- $.operate.get(prefix + "/getGiveHeadwearUsersInfo?erBanNo=" + $('#erBanNo').val() + "&headWearId=" + $("#headWearId").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.erBanNoOrHeadWearId + "</th>\n" +
- " <th style='width:100px;text-align: center'>" + bean.headWearName + "</th>\n" +
- " <th style='width:100px;text-align: center'>" + bean.goldPrice + "</th>\n" +
- " <th style='text-align: center'>" + bean.headWearDate + "</th>\n" +
- " </tr>";
- $('#tbody').html(str);
- }
- })
- }
- function confirmGift(){
- if(!$('#erBanNo').val()){
- $.modal.alertError("请输入卿卿号!");
- return;
- }
- var erBanNo = $('#erBanNo').val();
- var itemId = $('#headWearId').val();
- var days = $("#days").val();
- $.operate.post(prefix + "/give",{"erBanNo":erBanNo,"itemId":itemId,"days":days})
- }
- </script>
- </body>
- </html>
|