Merge remote-tracking branch 'origin/activity' into activity
This commit is contained in:
commit
9242102930
|
|
@ -5,8 +5,10 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.sinosoft.activity.domain.DrawAwardRecord;
|
||||||
import com.sinosoft.activity.domain.DrawConfig;
|
import com.sinosoft.activity.domain.DrawConfig;
|
||||||
import com.sinosoft.activity.domain.DrawPrizeInfo;
|
import com.sinosoft.activity.domain.DrawPrizeInfo;
|
||||||
|
import com.sinosoft.activity.service.IDrawAwardRecordService;
|
||||||
import com.sinosoft.activity.service.IDrawConfigService;
|
import com.sinosoft.activity.service.IDrawConfigService;
|
||||||
import com.sinosoft.activity.service.IDrawPrizeInfoService;
|
import com.sinosoft.activity.service.IDrawPrizeInfoService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -42,6 +44,8 @@ public class DrawConfigController extends BaseController
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDrawPrizeInfoService iDrawPrizeInfoService;
|
private IDrawPrizeInfoService iDrawPrizeInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IDrawAwardRecordService iDrawAwardRecordService;
|
||||||
@RequiresPermissions("activity:config:view")
|
@RequiresPermissions("activity:config:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String config()
|
public String config()
|
||||||
|
|
@ -102,11 +106,13 @@ public class DrawConfigController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 修改存储奖项配置信息
|
* 修改存储奖项配置信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/edit/{DRAWCONFIGID}")
|
@GetMapping("/edit/{DRAWCONFIGID}/{PRIZECODE}/{DRAWCODE}")
|
||||||
public String edit(@PathVariable("DRAWCONFIGID") String DRAWCONFIGID, ModelMap mmap)
|
public String edit(@PathVariable("DRAWCONFIGID") String DRAWCONFIGID,@PathVariable("PRIZECODE") String PRIZECODE ,@PathVariable("DRAWCODE") String DRAWCODE ,ModelMap mmap)
|
||||||
{
|
{
|
||||||
DrawConfig drawConfig = drawConfigService.selectDrawConfigById(DRAWCONFIGID);
|
DrawConfig drawConfig = drawConfigService.selectDrawConfigById(DRAWCONFIGID);
|
||||||
|
DrawAwardRecord drawAwardRecord = iDrawAwardRecordService.selectDrawAwardRecordCount(DRAWCODE, PRIZECODE);
|
||||||
mmap.put("drawConfig", drawConfig);
|
mmap.put("drawConfig", drawConfig);
|
||||||
|
mmap.put("count", drawAwardRecord.getCount());
|
||||||
return prefix + "/configEdit";
|
return prefix + "/configEdit";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,17 @@ public class DrawAwardRecord extends BaseEntity
|
||||||
@Excel(name = "扩展")
|
@Excel(name = "扩展")
|
||||||
private String EXTID;
|
private String EXTID;
|
||||||
|
|
||||||
public void setAWARDRECORDID(String AWARDRECORDID)
|
private Integer count;
|
||||||
|
|
||||||
|
public Integer getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCount(Integer count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAWARDRECORDID(String AWARDRECORDID)
|
||||||
{
|
{
|
||||||
this.AWARDRECORDID = AWARDRECORDID;
|
this.AWARDRECORDID = AWARDRECORDID;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,12 @@ public interface DrawAwardRecordMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDrawAwardRecordByIds(String[] AWARDRECORDIDs);
|
public int deleteDrawAwardRecordByIds(String[] AWARDRECORDIDs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已发放奖品数量
|
||||||
|
* @param drawAwardRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DrawAwardRecord selectDrawAwardRecordCount(DrawAwardRecord drawAwardRecord);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,4 +58,11 @@ public interface IDrawAwardRecordService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDrawAwardRecordById(String AWARDRECORDID);
|
public int deleteDrawAwardRecordById(String AWARDRECORDID);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已发放奖品数量
|
||||||
|
* @param DRAWCODE
|
||||||
|
* @param prizecode
|
||||||
|
*/
|
||||||
|
public DrawAwardRecord selectDrawAwardRecordCount(String DRAWCODE, String prizecode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 存储抽奖特殊规则对象Service接口
|
* 存储抽奖特殊规则对象Service接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author xlh
|
||||||
* @date 2021-03-25
|
* @date 2021-03-25
|
||||||
*/
|
*/
|
||||||
public interface IDrawRuleService
|
public interface IDrawRuleService
|
||||||
|
|
|
||||||
|
|
@ -91,4 +91,17 @@ public class DrawAwardRecordServiceImpl implements IDrawAwardRecordService
|
||||||
{
|
{
|
||||||
return drawAwardRecordMapper.deleteDrawAwardRecordById(AWARDRECORDID);
|
return drawAwardRecordMapper.deleteDrawAwardRecordById(AWARDRECORDID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已发放奖品数量
|
||||||
|
* @param DRAWCODE
|
||||||
|
* @param prizecode
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DrawAwardRecord selectDrawAwardRecordCount(String DRAWCODE, String prizecode) {
|
||||||
|
DrawAwardRecord drawAwardRecord = new DrawAwardRecord();
|
||||||
|
drawAwardRecord.setDRAWCODE(DRAWCODE);
|
||||||
|
drawAwardRecord.setPRIZECODE(prizecode);
|
||||||
|
return drawAwardRecordMapper.selectDrawAwardRecordCount(drawAwardRecord);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import com.ruoyi.common.core.text.Convert;
|
||||||
/**
|
/**
|
||||||
* 抽奖活动管理对象Service业务层处理
|
* 抽奖活动管理对象Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author xlh
|
||||||
* @date 2021-03-25
|
* @date 2021-03-25
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="BUSINESSAREA" column="BUSINESSAREA" />
|
<result property="BUSINESSAREA" column="BUSINESSAREA" />
|
||||||
<result property="CITY" column="CITY" />
|
<result property="CITY" column="CITY" />
|
||||||
<result property="EXTID" column="EXTID" />
|
<result property="EXTID" column="EXTID" />
|
||||||
|
<result property="count" column="count" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDrawAwardRecordVo">
|
<sql id="selectDrawAwardRecordVo">
|
||||||
|
|
@ -166,4 +167,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectDrawAwardRecordCount" parameterType="DrawAwardRecord" resultMap="DrawAwardRecordResult">
|
||||||
|
SELECT
|
||||||
|
COUNT(1) AS count
|
||||||
|
FROM
|
||||||
|
draw_award_record a
|
||||||
|
WHERE
|
||||||
|
a.DRAWCODE = #{DRAWCODE}
|
||||||
|
AND a.PRIZECODE = #{PRIZECODE}
|
||||||
|
AND AWARDRESULT = '1'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="STARTTIME" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="STARTTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="ENDTIME" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="ENDTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="DAILYSTARTTIME" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="DAILYSTARTTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="DAILYENDTIME" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="DAILYENDTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -221,27 +221,47 @@
|
||||||
|
|
||||||
|
|
||||||
$("input[name='STARTTIME']").datetimepicker({
|
$("input[name='STARTTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='ENDTIME']").datetimepicker({
|
$("input[name='ENDTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='DAILYSTARTTIME']").datetimepicker({
|
$("input[name='DAILYSTARTTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='DAILYENDTIME']").datetimepicker({
|
$("input[name='DAILYENDTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">奖品总量:</label>
|
<label class="col-sm-4 control-label is-required">奖品总量:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="TOTALNUMBER" placeholder="奖品总量" class="form-control" type="text" maxlength="30">
|
<input name="TOTALNUMBER" id="totalnumber" placeholder="奖品总量" onkeyup="total()" class="form-control" type="text" maxlength="30">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">剩余数量:</label>
|
<label class="col-sm-4 control-label is-required">剩余数量:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="AVAILABLENUMBER" placeholder="剩余数量" class="form-control" type="text" maxlength="30">
|
<input name="AVAILABLENUMBER" id="availablenumber" placeholder="剩余数量" class="form-control" type="text" maxlength="30" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -127,7 +127,10 @@
|
||||||
$("#form-info-add").validate({
|
$("#form-info-add").validate({
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
function total(){
|
||||||
|
var totalnumber = $("#totalnumber").val();
|
||||||
|
$("#availablenumber").val(totalnumber)
|
||||||
|
}
|
||||||
/**获取奖品及信息列表*/
|
/**获取奖品及信息列表*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var job= "";
|
var job= "";
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-info-edit" th:object="${drawConfig}">
|
<form class="form-horizontal m" id="form-info-edit" th:object="${drawConfig}">
|
||||||
<input type="hidden" name="DRAWCONFIGID" th:value="${DRAWCONFIGID}" />
|
<input type="hidden" name="DRAWCONFIGID" th:value="${DRAWCONFIGID}" />
|
||||||
|
<input name="count" type="hidden" id="count" th:value="${count}" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -52,7 +53,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">奖品总量:</label>
|
<label class="col-sm-4 control-label is-required">奖品总量:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="TOTALNUMBER"th:field="*{TOTALNUMBER}" placeholder="奖品总量" class="form-control" type="text" maxlength="30">
|
<input name="TOTALNUMBER"th:field="*{TOTALNUMBER}" onkeyup="total()" id="totalnumber" placeholder="奖品总量" class="form-control" type="text" maxlength="30">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -60,7 +61,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">剩余数量:</label>
|
<label class="col-sm-4 control-label is-required">剩余数量:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="AVAILABLENUMBER" th:field="*{AVAILABLENUMBER}" placeholder="剩余数量" class="form-control" type="text" maxlength="30">
|
<input name="AVAILABLENUMBER" id="availablenumber" placeholder="剩余数量" class="form-control" type="text" maxlength="30" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -68,7 +69,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label is-required">奖品发放制度:</label>
|
<label class="col-sm-4 control-label is-required">奖品发放限制:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="AWARDTYPE" class="form-control" th:with="type=${@dict.getType('AWARDTYPE')}">
|
<select name="AWARDTYPE" class="form-control" th:with="type=${@dict.getType('AWARDTYPE')}">
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{AWARDTYPE}"></option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{AWARDTYPE}"></option>
|
||||||
|
|
@ -127,11 +128,15 @@
|
||||||
$("#form-info-edit").validate({
|
$("#form-info-edit").validate({
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
function total(){
|
||||||
|
var totalnumber = $("#totalnumber").val() - $("#count").val();
|
||||||
|
$("#availablenumber").val(totalnumber)
|
||||||
|
}
|
||||||
/**获取奖品及信息列表*/
|
/**获取奖品及信息列表*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var PRIZECODE = [[${drawConfig.PRIZECODE}]];
|
var PRIZECODE = [[${drawConfig.PRIZECODE}]];
|
||||||
|
var totalnumber = $("#totalnumber").val() - $("#count").val();
|
||||||
|
$("#availablenumber").val(totalnumber)
|
||||||
var job= "";
|
var job= "";
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li >
|
<li >
|
||||||
<label>活动编码:</label>
|
<label>活动编码:</label>
|
||||||
<input type="text" name="DRAWCODE" th:value="${DRAWCODE}" readonly/>
|
<input type="text" name="DRAWCODE" id="DRAWCODE" th:value="${DRAWCODE}" readonly/>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label>活动名称:</label>
|
<label>活动名称:</label>
|
||||||
|
|
@ -27,15 +27,12 @@
|
||||||
<a class="btn btn-success" onclick="$.operate.add(DRAWCODE)" shiro:hasPermission="config:info:add">
|
<a class="btn btn-success" onclick="$.operate.add(DRAWCODE)" shiro:hasPermission="config:info:add">
|
||||||
<i class="fa fa-plus"></i> 添加
|
<i class="fa fa-plus"></i> 添加
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="config:info:edit">
|
<a class="btn btn-primary single disabled" onclick="edit()" shiro:hasPermission="config:info:edit">
|
||||||
<i class="fa fa-edit"></i> 修改
|
<i class="fa fa-edit"></i> 修改
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="config:info:remove">
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="config:info:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="config:info:export">
|
|
||||||
<i class="fa fa-download"></i> 导出
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<div class="col-sm-12 select-table table-striped">
|
||||||
<table id="bootstrap-table"></table>
|
<table id="bootstrap-table"></table>
|
||||||
|
|
@ -56,10 +53,9 @@
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/" + DRAWCODE + "/list",
|
url: prefix + "/" + DRAWCODE + "/list",
|
||||||
createUrl: prefix + "/add/{id}",
|
createUrl: prefix + "/add/{id}",
|
||||||
updateUrl: prefix + "/edit/{id}",
|
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
modalName: "存储奖项配置信息",
|
modalName: "奖项信息",
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
|
|
@ -141,6 +137,23 @@
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function edit() {
|
||||||
|
var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
||||||
|
var rows = $('#bootstrap-table').bootstrapTable('getSelections')
|
||||||
|
var prizecode = "";
|
||||||
|
for (var i = 0; i < rows.length; i++) {
|
||||||
|
if (i == 0 || i == "0") {
|
||||||
|
prizecode += rows[i].prizecode;
|
||||||
|
} else {
|
||||||
|
prizecode += "," + rows[i].prizecode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var drawcode = $("#DRAWCODE").val();
|
||||||
|
var url = prefix +'/edit/' + id +"/" + prizecode +"/" + drawcode;
|
||||||
|
$.modal.open("修改" + table.options.modalName, url);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="STARTTIME" th:value="${#dates.format(drawInfo.STARTTIME, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="STARTTIME" th:value="${#dates.format(drawInfo.STARTTIME, 'yyyy-MM-dd HH:mm:ss HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="ENDTIME" th:value="${#dates.format(drawInfo.ENDTIME, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="ENDTIME" th:value="${#dates.format(drawInfo.ENDTIME, 'yyyy-MM-dd HH:mm:ss HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="DAILYSTARTTIME" th:value="${#dates.format(drawInfo.DAILYSTARTTIME, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="DAILYSTARTTIME" th:value="${#dates.format(drawInfo.DAILYSTARTTIME, 'yyyy-MM-dd HH:mm:ss HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="DAILYENDTIME" th:value="${#dates.format(drawInfo.DAILYENDTIME, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
<input name="DAILYENDTIME" th:value="${#dates.format(drawInfo.DAILYENDTIME, 'yyyy-MM-dd HH:mm:ss HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -247,27 +247,47 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='STARTTIME']").datetimepicker({
|
$("input[name='STARTTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='ENDTIME']").datetimepicker({
|
$("input[name='ENDTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='DAILYSTARTTIME']").datetimepicker({
|
$("input[name='DAILYSTARTTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("input[name='DAILYENDTIME']").datetimepicker({
|
$("input[name='DAILYENDTIME']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
weekStart: 1,
|
||||||
minView: "month",
|
todayBtn: 1,
|
||||||
autoclose: true
|
autoclose: 1,
|
||||||
|
todayHighlight: 1,
|
||||||
|
startView: 2,
|
||||||
|
forceParse: 0,
|
||||||
|
showMeridian: 1,
|
||||||
|
format: 'yyyy-mm-dd hh:ii:ss'
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -107,11 +107,11 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'STARTTIME',
|
field: 'starttime',
|
||||||
title: '开始时间'
|
title: '开始时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'ENDTIME',
|
field: 'endtime',
|
||||||
title: '结束时间'
|
title: '结束时间'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue