From a43f406d4abee67c45874d116fd7de406916f676 Mon Sep 17 00:00:00 2001 From: xu0625 <1212> Date: Wed, 31 Mar 2021 17:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86-=E6=8A=BD?= =?UTF-8?q?=E5=A5=96=E6=B4=BB=E5=8A=A8=E7=AE=A1=E7=90=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sinosoft/activity/domain/DrawRule.java | 14 ++-- .../mapper/activity/DrawInfoMapper.xml | 2 +- .../templates/activity/info/add.html | 49 ++++++++++--- .../templates/activity/info/edit.html | 70 +++++++++++++++---- 4 files changed, 103 insertions(+), 32 deletions(-) diff --git a/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java index 466c45693..756df3a46 100644 --- a/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java +++ b/sino-activity/src/main/java/com/sinosoft/activity/domain/DrawRule.java @@ -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; } diff --git a/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml b/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml index 126ce3df1..6689c1e38 100644 --- a/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml +++ b/sino-activity/src/main/resources/mapper/activity/DrawInfoMapper.xml @@ -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, diff --git a/sino-activity/src/main/resources/templates/activity/info/add.html b/sino-activity/src/main/resources/templates/activity/info/add.html index 86e1c77d6..271b6d923 100644 --- a/sino-activity/src/main/resources/templates/activity/info/add.html +++ b/sino-activity/src/main/resources/templates/activity/info/add.html @@ -78,7 +78,7 @@
-
@@ -88,7 +88,7 @@
-
@@ -100,7 +100,7 @@
-
@@ -110,7 +110,7 @@
- +
@@ -121,7 +121,7 @@
- +
@@ -132,7 +132,7 @@
- +
@@ -147,7 +147,7 @@
-
@@ -157,7 +157,7 @@
- +
@@ -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' }); diff --git a/sino-activity/src/main/resources/templates/activity/info/edit.html b/sino-activity/src/main/resources/templates/activity/info/edit.html index 0c8ad82ef..0f5713b6e 100644 --- a/sino-activity/src/main/resources/templates/activity/info/edit.html +++ b/sino-activity/src/main/resources/templates/activity/info/edit.html @@ -56,7 +56,7 @@
- +
@@ -67,7 +67,7 @@
- +
@@ -80,7 +80,7 @@
-
@@ -90,7 +90,7 @@
-
@@ -102,7 +102,7 @@
-
@@ -112,7 +112,7 @@
- +
@@ -123,7 +123,7 @@
- +
@@ -134,7 +134,7 @@
- +
@@ -149,7 +149,7 @@
-
@@ -159,7 +159,7 @@
- +
@@ -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' });