123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <!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="ernos" class="col-sm-2 control-label">卿卿号(多个卿卿号回车分隔):</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <textarea class="form-control" name="ernos" id="ernos" style="height:100px;resize:none;"></textarea>
- </div>
- </div>
- <div class="form-group">
- <label for="num" class="col-sm-2 control-label">赠送数量:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <input type="text" class="form-control validate[required]" name="num" id="num" value="1">
- </div>
- </div>
- <div class="form-group">
- <label for="type" class="col-sm-2 control-label">赠送类型:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <select name="type" id="type" th:with="type=${@dict.getType('gold_type')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label for="num" class="col-sm-2 control-label">赠送用途:</label>
- <div class="col-sm-10" style="margin-bottom: 20px;">
- <input type="text" class="form-control validate[required]" name="remark" id="remark" value="" required>
- </div>
- </div>
- <div class="form-group"><div style="color:red;">(每个用户赠送次数以及被赠送用户的金币余额限制请查看字典管理)</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" onclick="querySearch()"><i class="fa fa-search"></i> 查询</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="confirmGif()"><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: 50px">头像</th>
- <th style="width:200px;">卿卿号</th>
- <th style="width:300px;">昵称</th>
- <th>金币</th>
- </tr></thead>
- <tbody id="tbody">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <script th:inline="javascript">
- var prefix = ctx + "users/coins";
- function querySearch() {
- if(!$('#ernos').val()){
- $.modal.alertError("请输入卿卿号");
- return;
- }
- $.operate.get(prefix + "/getUserInfo?erNos=" + $('#ernos').val(),function (result) {
- if(result.code == 0){
- var str = '';
- for(var i=0; i < result.data.length; i++) {
- var bean = result.data[i];
- str += "<tr>\n" +
- " <th style=\"width: 100px\"><img src='"+bean.avatar+"' width='50'/></th>\n" +
- " <th style='width:200px;'>" + bean.erbanNo + "</th>\n" +
- " <th style='width:300px;'>" + bean.nick + "</th>\n" +
- " <th>" + bean.goldNum + "</th>\n" +
- " </tr>";
- }
- $('#tbody').html(str);
- }
- })
- }
- function confirmGif(){
- var ernos = $('#ernos').val();
- var type = $('#type').val();
- var num = $('#num').val();
- var remark = $('#remark').val();
- if(!$('#ernos').val()){
- $.modal.alertError("请输入卿卿号!");
- return;
- }
- if(!remark){
- $.modal.alertError("请输入赠送用途!");
- return;
- }
- $.operate.post(prefix + "/give",{"erNos":ernos,"type":type,"num":num,"remark":remark})
- }
- </script>
- </body>
- </html>
|