main
parent
e3a9ae252a
commit
848f311f64
@ -0,0 +1,43 @@
|
|||||||
|
package com.tamguo.modules.member.model.condition;
|
||||||
|
|
||||||
|
public class MemberCondition {
|
||||||
|
|
||||||
|
private Integer pageNo;
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
private String mobile;
|
||||||
|
private String username;
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
public Integer getPageNo() {
|
||||||
|
return pageNo;
|
||||||
|
}
|
||||||
|
public void setPageNo(Integer pageNo) {
|
||||||
|
this.pageNo = pageNo;
|
||||||
|
}
|
||||||
|
public Integer getPageSize() {
|
||||||
|
return pageSize;
|
||||||
|
}
|
||||||
|
public void setPageSize(Integer pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package com.tamguo.modules.tiku.web;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.mapper.Condition;
|
||||||
|
import com.baomidou.mybatisplus.plugins.Page;
|
||||||
|
import com.tamguo.common.utils.Result;
|
||||||
|
import com.tamguo.modules.book.model.BookCategoryEntity;
|
||||||
|
import com.tamguo.modules.book.model.BookEntity;
|
||||||
|
import com.tamguo.modules.book.service.IBookCategoryService;
|
||||||
|
import com.tamguo.modules.book.service.IBookService;
|
||||||
|
import com.tamguo.modules.member.model.MemberEntity;
|
||||||
|
import com.tamguo.modules.member.model.condition.MemberCondition;
|
||||||
|
import com.tamguo.modules.member.service.IMemberService;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(value="tiku/member")
|
||||||
|
public class MemberController {
|
||||||
|
|
||||||
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IMemberService iMemberService;
|
||||||
|
@Autowired
|
||||||
|
IBookService iBookService;
|
||||||
|
@Autowired
|
||||||
|
IBookCategoryService iBookCategoryService;
|
||||||
|
|
||||||
|
@RequestMapping(value="list")
|
||||||
|
public ModelAndView list(ModelAndView model) {
|
||||||
|
model.setViewName("modules/tiku/member/list");
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value="listData" , method=RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public Map<String, Object> listData(MemberCondition condition){
|
||||||
|
Page<MemberEntity> page = iMemberService.listData(condition);
|
||||||
|
return Result.jqGridResult(page.getRecords(), page.getTotal(), page.getSize(), page.getCurrent(), page.getPages());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value="reward" , method=RequestMethod.GET)
|
||||||
|
public ModelAndView reward(String id , ModelAndView model) {
|
||||||
|
model.setViewName("modules/tiku/member/reward");
|
||||||
|
model.addObject("member", iMemberService.selectById(id));
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@RequestMapping(value="bookTreeData",method=RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public List<BookEntity> bookTreeData(String memberId){
|
||||||
|
List<BookEntity> bookList = iBookService.selectList(Condition.create().eq("owner", memberId).orderDesc(Arrays.asList("create_date")));
|
||||||
|
if(!CollectionUtils.isEmpty(bookList)) {
|
||||||
|
for(int i=0 ; i<bookList.size() ; i++) {
|
||||||
|
BookEntity book = bookList.get(i);
|
||||||
|
BookCategoryEntity category = iBookCategoryService.selectById(book.getCategoryId());
|
||||||
|
book.setCategoryName(category.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bookList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value="reward" , method=RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public Result submitReward(String id , String bookId , Integer rewardPoint , BigDecimal rewardMoney) {
|
||||||
|
try {
|
||||||
|
iMemberService.reward(id , bookId , rewardPoint , rewardMoney);
|
||||||
|
return Result.result(0, null, "奖励成功!");
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage() , e);
|
||||||
|
return Result.result(1, null, "奖励失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
lang='zh_CN',ctx='http://localhost/',ctxPath='/',ctxAdmin='/',ctxFront='/f',ctxStatic='static',Global={SHOW:'1',HIDE:'0',OP_AUTH:'auth',OP_ADD:'add',FALSE:'false',USERFILES_BASE_URL:'/userfiles/',YES:'1',TRUE:'true',NO:'0',OP_EDIT:'edit',STATUS_DELETE:'1',STATUS_NORMAL:'0',STATUS_DRAFT:'9',STATUS_AUDIT_BACK:'5',STATUS_DISABLE:'2',STATUS_FREEZE:'3',STATUS_AUDIT:'4'}
|
lang='zh_CN',ctx='http://admin.tamguo.com/',ctxPath='/',ctxAdmin='/',ctxFront='/f',ctxStatic='static',Global={SHOW:'1',HIDE:'0',OP_AUTH:'auth',OP_ADD:'add',FALSE:'false',USERFILES_BASE_URL:'/userfiles/',YES:'1',TRUE:'true',NO:'0',OP_EDIT:'edit',STATUS_DELETE:'1',STATUS_NORMAL:'0',STATUS_DRAFT:'9',STATUS_AUDIT_BACK:'5',STATUS_DISABLE:'2',STATUS_FREEZE:'3',STATUS_AUDIT:'4'}
|
@ -0,0 +1,104 @@
|
|||||||
|
<!DOCTYPE html><html><head><meta charset="utf-8"><meta content="webkit" name="renderer"/><meta http-equiv="X-UA-Compatible"
|
||||||
|
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
|
||||||
|
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
|
||||||
|
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
|
||||||
|
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||||
|
<title>会员管理 - Tamguo OMS</title>
|
||||||
|
<script th:src="${setting.domain + 'global.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
|
||||||
|
<!--[if lt IE 9]><script src="/js/static/common/h5fix.min.js"></script><![endif]-->
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'jqGrid/4.7/css/ui.jqgrid.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
|
||||||
|
</head><body class="hold-transition ">
|
||||||
|
<div class="wrapper"><div class="main-content">
|
||||||
|
<div class="box box-main">
|
||||||
|
<div class="box-header">
|
||||||
|
<div class="box-title">
|
||||||
|
<i class="fa icon-user"></i> 会员管理
|
||||||
|
</div>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<form id="searchForm" th:action="${setting.domain + 'tiku/member/listData'}" method="post" class="form-inline " data-page-no="1" data-page-size="10" data-order-by="">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">手机号:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<input type="text" id="mobile" name="mobile" value="" maxlength="100" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">用户名:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<input type="text" id="username" name="username" value="" maxlength="100" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">昵称:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<input type="text" id="nickName" name="nickName" value="" maxlength="100" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||||
|
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<table id="dataGrid"></table>
|
||||||
|
<div id="dataGridPage"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
|
||||||
|
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.extend.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/common.js'}"></script>
|
||||||
|
<script>
|
||||||
|
// 初始化DataGrid对象
|
||||||
|
$('#dataGrid').dataGrid({
|
||||||
|
searchForm: $("#searchForm"),
|
||||||
|
columnModel: [
|
||||||
|
{header:'会员编号', name:'id', index:'u.id', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
|
||||||
|
return '<a href="tiku/member/update?id='+row.id+'&op=edit" class="btnList" data-title="编辑会员">'+(val||row.id)+'</a>';
|
||||||
|
}},
|
||||||
|
{header:'用户名', name:'username', index:'u.username', width:150, align:"center"},
|
||||||
|
{header:'昵称', name:'nickName', index:'u.nickName', width:150, align:"center"},
|
||||||
|
{header:'手机号', name:'mobile', index:'u.mobile', width:150, align:"center"},
|
||||||
|
{header:'邮箱', name:'email', index:'u.email', width:200, align:"center"},
|
||||||
|
{header:'积分', name:'point', index:'u.point', width:150, align:"center"},
|
||||||
|
{header:'余额', name:'amount', index:'u.amount', width:150, align:"center"},
|
||||||
|
{header:'最后登录时间', name:'lastLoginTime', index:'u.lastLoginTime', width:200, align:"center"},
|
||||||
|
{header:'操作', name:'actions', width:80, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a href="tiku/member/update?id='+row.id+'" class="btnList" title="编辑会员"><i class="fa fa-pencil"></i></a> ');
|
||||||
|
actions.push('<a href="javascript:" class="btnMore" title="更多操作"><i class="fa fa-chevron-circle-right"></i></a> ');
|
||||||
|
actions.push('<div class="moreItems">');
|
||||||
|
actions.push('<a href="tiku/member/reward?id='+row.id+'&op=auth" class="btn btn-default btn-xs btnList" title="奖励"><i class="fa fa-check-square-o"></i> 奖励</a> ');
|
||||||
|
actions.push('</div>');
|
||||||
|
return actions.join('');
|
||||||
|
}}
|
||||||
|
],
|
||||||
|
// 加载成功后执行事件
|
||||||
|
ajaxSuccess: function(data){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -0,0 +1,151 @@
|
|||||||
|
<!DOCTYPE html><html><head><meta charset="utf-8"><meta content="webkit" name="renderer"/><meta http-equiv="X-UA-Compatible"
|
||||||
|
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
|
||||||
|
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
|
||||||
|
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
|
||||||
|
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||||
|
<title>奖励积分 - TamGuo OMS</title>
|
||||||
|
<script th:src="${setting.domain + 'global.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
|
||||||
|
<!--[if lt IE 9]><script src="/js/static/common/h5fix.min.js"></script><![endif]-->
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'jqGrid/4.7/css/ui.jqgrid.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
|
||||||
|
</head><body class="hold-transition ">
|
||||||
|
<div class="wrapper"><div class="main-content">
|
||||||
|
<div class="box box-main">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<div class="box-title">
|
||||||
|
<i class="fa icon-people"></i> 会员奖励积分
|
||||||
|
</div>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form id="inputForm" th:action="${setting.domain + 'tiku/member/reward'}" method="post" class="form-horizontal">
|
||||||
|
<input type="hidden" id="id" name="id" th:value="${member.id}"/>
|
||||||
|
<input type="hidden" id="bookId" name="bookId" value=""/>
|
||||||
|
<div class="box-body">
|
||||||
|
<br/> <div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 会员账号:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="username" name="username" th:value="${member.username}" minlength="4" maxlength="20" readonly="true" class="form-control required userName"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 会员昵称:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="nickName" name="nickName" th:value="${member.nickName}" maxlength="32" readonly="true" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 奖励积分:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="rewardPoint" name="rewardPoint" value="" maxlength="20" class="form-control required"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 奖励金额:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="rewardMoney" name="rewardMoney" value="" maxlength="20" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-unit">会员书籍</div>
|
||||||
|
<div class="pl10 pb20">
|
||||||
|
<table id="bookGrid"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
|
||||||
|
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.extend.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-validation/1.16/jquery.validate.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-validation/1.16/localization/messages_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-validation/1.16/jquery.validate.extend.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/common.js'}"></script>
|
||||||
|
<script type="text/javascript" th:inline="javascript">
|
||||||
|
// 加载角色列表
|
||||||
|
var bookGrid = $("#bookGrid").dataGrid({
|
||||||
|
url: ctx + 'tiku/member/bookTreeData',
|
||||||
|
postData: [
|
||||||
|
{name:'memberId',value:$("#id").val()}
|
||||||
|
],
|
||||||
|
columnModel: [
|
||||||
|
{header:'书籍编码', name:'id', sortable:false, width:100, align:"center"},
|
||||||
|
{header:'书籍分类', name:'categoryName', sortable:false, width:100, align:"center"},
|
||||||
|
{header:'书籍名称', name:'name', sortable:false, width:100, align:"center"},
|
||||||
|
{header:'创建时间', name:'createDate', sortable:false, width:100, align:"center"}
|
||||||
|
],
|
||||||
|
showCheckbox: false,
|
||||||
|
autoGridHeight: function(){
|
||||||
|
return 'auto';
|
||||||
|
},
|
||||||
|
autoGridWidth: function(){
|
||||||
|
return $('#inputForm .box-body').width()-20;
|
||||||
|
},
|
||||||
|
ajaxSuccess: function(){
|
||||||
|
console.log("success");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#inputForm").validate({
|
||||||
|
submitHandler: function(form){
|
||||||
|
// 获取选中角色
|
||||||
|
var book = bookGrid.dataGrid('getSelectRow');
|
||||||
|
if(book == null){
|
||||||
|
js.showMessage("请选择获奖的书籍!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$("#bookId").val(book);
|
||||||
|
js.ajaxSubmitForm($(form), function(data){
|
||||||
|
js.showMessage(data.message);
|
||||||
|
if(data.result == 0){
|
||||||
|
js.closeCurrentTabPage(function(contentWindow){
|
||||||
|
contentWindow.page();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, "json");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in new issue