活动管理-抽奖活动管理修改
This commit is contained in:
parent
bf6ca95d16
commit
a43f406d4a
|
|
@ -34,12 +34,10 @@ public class DrawRule extends BaseEntity
|
|||
private String DAILYFLAG;
|
||||
|
||||
/** 日抽奖限制开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date DAILYSTARTTIME;
|
||||
private String DAILYSTARTTIME;
|
||||
|
||||
/** 日抽奖限制结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date DAILYENDTIME;
|
||||
private String DAILYENDTIME;
|
||||
|
||||
/** 日抽奖限制次数 */
|
||||
private Long DAILYNUMBER;
|
||||
|
|
@ -90,19 +88,19 @@ public class DrawRule extends BaseEntity
|
|||
this.DRAWRULEID = DRAWRULEID;
|
||||
}
|
||||
|
||||
public Date getDAILYSTARTTIME() {
|
||||
public String getDAILYSTARTTIME() {
|
||||
return DAILYSTARTTIME;
|
||||
}
|
||||
|
||||
public void setDAILYSTARTTIME(Date DAILYSTARTTIME) {
|
||||
public void setDAILYSTARTTIME(String DAILYSTARTTIME) {
|
||||
this.DAILYSTARTTIME = DAILYSTARTTIME;
|
||||
}
|
||||
|
||||
public Date getDAILYENDTIME() {
|
||||
public String getDAILYENDTIME() {
|
||||
return DAILYENDTIME;
|
||||
}
|
||||
|
||||
public void setDAILYENDTIME(Date DAILYENDTIME) {
|
||||
public void setDAILYENDTIME(String DAILYENDTIME) {
|
||||
this.DAILYENDTIME = DAILYENDTIME;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT
|
||||
i.DRAWID,
|
||||
i.DRAWNAME,
|
||||
i. STATUS,
|
||||
i.STATUS,
|
||||
i.EXPENO,
|
||||
i.EXPENOVALUE,
|
||||
i.STARTTIME,
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">首次中奖配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="FIRSTFLAG" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<select name="FIRSTFLAG" id="FIRSTFLAG" onchange="firstflag()" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">首次中奖奖品:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="FIRSTAWARDPRIZE" class="form-control" id="firstawardprize">
|
||||
<select name="FIRSTAWARDPRIZE" class="form-control" id="firstawardprize" disabled >
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">时间段抽奖配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="DAILYFLAG" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<select name="DAILYFLAG" id="DAILYFLAG" onchange="dailyflag()" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">时间段限制次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="DAILYNUMBER" placeholder="时间段限制次数" class="form-control" type="text" maxlength="30">
|
||||
<input name="DAILYNUMBER" id="dailynumber" placeholder="时间段限制次数" class="form-control" type="text" maxlength="30" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="DAILYSTARTTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
<input name="DAILYSTARTTIME" class="form-control" placeholder="HH:mm:ss" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="DAILYENDTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||
<input name="DAILYENDTIME" id="DAILYENDTIME" class="form-control" placeholder="HH:mm:ss" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">抽奖必中配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="WILLDRAWFLAG" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<select name="WILLDRAWFLAG" id="WILLDRAWFLAG" onchange="willdrawflag()" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">抽奖必中计数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="WILLDRAWAWARDNUMBER" placeholder="抽奖必中计数" class="form-control" type="text" maxlength="30">
|
||||
<input name="WILLDRAWAWARDNUMBER" id="willdrawawardnumber" placeholder="抽奖必中计数" class="form-control" type="text" maxlength="30" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -219,6 +219,35 @@
|
|||
$.operate.saveModal(prefix+"/add", data);
|
||||
}
|
||||
|
||||
//时间段抽奖配置
|
||||
function dailyflag(){
|
||||
var DAILYFLAG = $("#DAILYFLAG").val();
|
||||
if (DAILYFLAG==1){
|
||||
$('#dailynumber').removeAttr('readonly');
|
||||
}else if(DAILYFLAG==0){
|
||||
$("#dailynumber").attr('readonly','true');
|
||||
}
|
||||
}
|
||||
//抽奖必中配置
|
||||
function willdrawflag(){
|
||||
var WILLDRAWFLAG = $("#WILLDRAWFLAG").val();
|
||||
if (WILLDRAWFLAG==1){
|
||||
$('#willdrawawardnumber').removeAttr('readonly');
|
||||
}else if(WILLDRAWFLAG==0){
|
||||
$("#willdrawawardnumber").attr('readonly','true');
|
||||
}
|
||||
}
|
||||
|
||||
//首次中奖配置
|
||||
function firstflag(){
|
||||
var FIRSTFLAG = $("#FIRSTFLAG").val();
|
||||
if (FIRSTFLAG==1){
|
||||
$('#firstawardprize').removeAttr('disabled');
|
||||
}else if(FIRSTFLAG==0){
|
||||
$("#firstawardprize").attr('disabled','true');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("input[name='STARTTIME']").datetimepicker({
|
||||
weekStart: 1,
|
||||
|
|
@ -250,7 +279,7 @@
|
|||
startView: 2,
|
||||
forceParse: 0,
|
||||
showMeridian: 1,
|
||||
format: 'yyyy-mm-dd hh:ii:ss'
|
||||
format: 'hh:ii:ss'
|
||||
});
|
||||
|
||||
$("input[name='DAILYENDTIME']").datetimepicker({
|
||||
|
|
@ -261,7 +290,7 @@
|
|||
startView: 2,
|
||||
forceParse: 0,
|
||||
showMeridian: 1,
|
||||
format: 'yyyy-mm-dd hh:ii:ss'
|
||||
format: 'hh:ii:ss'
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<label class="col-sm-4 control-label is-required">开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<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">
|
||||
<input name="STARTTIME" th:value="${#dates.format(drawInfo.STARTTIME, 'yyyy-MM-dd 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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
<label class="col-sm-4 control-label is-required">结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<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">
|
||||
<input name="ENDTIME" th:value="${#dates.format(drawInfo.ENDTIME, 'yyyy-MM-dd 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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">首次中奖配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="FIRSTFLAG" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<select name="FIRSTFLAG" id="FIRSTFLAG" onchange="firstflag()" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{FIRSTFLAG}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">首次中奖奖品:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="FIRSTAWARDPRIZE" class="form-control" id="firstawardprize" >
|
||||
<select name="FIRSTAWARDPRIZE" class="form-control" id="firstawardprize" >
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">时间段抽奖配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="DAILYFLAG" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<select name="DAILYFLAG" id="DAILYFLAG" onchange="dailyflag()" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{DAILYFLAG}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">时间段限制次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="DAILYNUMBER" th:field="*{DAILYNUMBER}" placeholder="时间段限制次数" class="form-control" type="text" maxlength="30">
|
||||
<input name="DAILYNUMBER" id="dailynumber" th:field="*{DAILYNUMBER}" placeholder="时间段限制次数" class="form-control" type="text" maxlength="30" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<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">
|
||||
<input name="DAILYSTARTTIME" th:field="*{DAILYSTARTTIME}" class="form-control" placeholder="HH:mm:ss" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<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">
|
||||
<input name="DAILYENDTIME" th:field="*{DAILYENDTIME}" class="form-control" placeholder="HH:mm:ss" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">抽奖必中配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="WILLDRAWFLAG" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<select name="WILLDRAWFLAG" id="WILLDRAWFLAG" onchange="willdrawflag()" class="form-control" th:with="type=${@dict.getType('is_boolean')}">
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{WILLDRAWFLAG}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">抽奖必中计数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="WILLDRAWAWARDNUMBER" th:field="*{WILLDRAWAWARDNUMBER}" placeholder="抽奖必中计数" class="form-control" type="text" maxlength="30">
|
||||
<input name="WILLDRAWAWARDNUMBER" id="willdrawawardnumber" th:field="*{WILLDRAWAWARDNUMBER}" placeholder="抽奖必中计数" class="form-control" type="text" maxlength="30" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -193,9 +193,21 @@
|
|||
}
|
||||
/**获取奖品及信息列表*/
|
||||
$(document).ready(function() {
|
||||
var DAILYFLAG = $("#DAILYFLAG").val();
|
||||
if(DAILYFLAG==0){
|
||||
$("#dailynumber").attr('readonly','true');
|
||||
}
|
||||
var WILLDRAWFLAG = $("#WILLDRAWFLAG").val();
|
||||
if(WILLDRAWFLAG==0){
|
||||
$("#willdrawawardnumber").attr('readonly','true');
|
||||
}
|
||||
var FIRSTFLAG = $("#FIRSTFLAG").val();
|
||||
if(FIRSTFLAG==0){
|
||||
$("#firstawardprize").attr('disabled','true');
|
||||
}
|
||||
|
||||
var WILLDRAWAWARDPRIZE = [[${drawInfo.WILLDRAWAWARDPRIZE}]];
|
||||
var FIRSTAWARDPRIZE = [[${drawInfo.FIRSTAWARDPRIZE}]];
|
||||
|
||||
var job= "";
|
||||
var jobj= "";
|
||||
$.ajax({
|
||||
|
|
@ -246,6 +258,38 @@
|
|||
);
|
||||
});
|
||||
|
||||
//时间段抽奖配置
|
||||
function dailyflag(){
|
||||
var DAILYFLAG = $("#DAILYFLAG").val();
|
||||
if (DAILYFLAG==1){
|
||||
$('#dailynumber').removeAttr('readonly');
|
||||
}else if(DAILYFLAG==0){
|
||||
$("#dailynumber").attr('readonly','true');
|
||||
}
|
||||
}
|
||||
//抽奖必中配置
|
||||
function willdrawflag(){
|
||||
var WILLDRAWFLAG = $("#WILLDRAWFLAG").val();
|
||||
if (WILLDRAWFLAG==1){
|
||||
$('#willdrawawardnumber').removeAttr('readonly');
|
||||
}else if(WILLDRAWFLAG==0){
|
||||
$("#willdrawawardnumber").attr('readonly','true');
|
||||
}
|
||||
}
|
||||
|
||||
//首次中奖配置
|
||||
function firstflag(){
|
||||
var FIRSTFLAG = $("#FIRSTFLAG").val();
|
||||
if (FIRSTFLAG==1){
|
||||
$('#firstawardprize').removeAttr('disabled');
|
||||
}else if(FIRSTFLAG==0){
|
||||
$("#firstawardprize").attr('disabled','true');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("input[name='STARTTIME']").datetimepicker({
|
||||
weekStart: 1,
|
||||
todayBtn: 1,
|
||||
|
|
@ -276,7 +320,7 @@
|
|||
startView: 2,
|
||||
forceParse: 0,
|
||||
showMeridian: 1,
|
||||
format: 'yyyy-mm-dd hh:ii:ss'
|
||||
format: 'hh:ii:ss'
|
||||
});
|
||||
|
||||
$("input[name='DAILYENDTIME']").datetimepicker({
|
||||
|
|
@ -287,7 +331,7 @@
|
|||
startView: 2,
|
||||
forceParse: 0,
|
||||
showMeridian: 1,
|
||||
format: 'yyyy-mm-dd hh:ii:ss'
|
||||
format: 'hh:ii:ss'
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Reference in New Issue