RuoYi/sino-activity/src/main/resources/templates/activity/info/add.html

268 lines
12 KiB
HTML
Raw Normal View History

2021-03-30 09:45:17 +08:00
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('创建活动')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-add">
<h4 class="form-header h4">活动管理</h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">活动名称:</label>
<div class="col-sm-8">
<input name="DRAWNAME" placeholder="活动名称" class="form-control" type="text" maxlength="30">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">状态:</label>
<div class="col-sm-8">
<select name="STATUS" class="form-control" th:with="type=${@dict.getType('start_stop')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">消耗对象:</label>
<div class="col-sm-8">
<select name="EXPENO" class="form-control" th:with="type=${@dict.getType('expeType')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">消耗价值:</label>
<div class="col-sm-8">
<input name="EXPENOVALUE" placeholder="消耗价值" class="form-control" type="text" maxlength="30">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">开始时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="STARTTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
2021-03-30 09:45:17 +08:00
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">结束时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="ENDTIME" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
2021-03-30 09:45:17 +08:00
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
</div>
<h4 class="form-header h4">活动规则</h4>
<div class="row">
<div class="col-sm-6">
<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')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<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>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<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')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<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">
2021-03-30 09:45:17 +08:00
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<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">
2021-03-30 09:45:17 +08:00
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<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">
2021-03-30 09:45:17 +08:00
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<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')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<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">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">抽奖必中奖品:</label>
<div class="col-sm-8">
<select name="WILLDRAWAWARDPRIZE" class="form-control" id="willdrawawardprize">
</select>
</div>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "activity/info"
/**获取奖品及信息列表*/
$(document).ready(function() {
var job= "";
2021-03-30 09:45:17 +08:00
$.ajax({
url:prefix + "/prizeInfo",
success: function (data) {
for(var i in data){
if (job.length==0){
job = "<option value='"+data[i].prizecode+"'>"+data[i].prizename+"</option>"
}
else{
job += "<option value='"+data[i].prizecode+"'>"+data[i].prizename+"</option>"
}
2021-03-30 09:45:17 +08:00
}
$("#firstawardprize").html(job);
$("#willdrawawardprize").html(job);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
},
async:false //false表示同步
}
);
});
$("#form-info-add").validate({
focusCleanup: true
});
function submitHandler(){
var data = $("#form-info-add").serializeArray();
$.operate.saveModal(prefix+"/add", data);
}
$("input[name='STARTTIME']").datetimepicker({
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
forceParse: 0,
showMeridian: 1,
format: 'yyyy-mm-dd hh:ii:ss'
2021-03-30 09:45:17 +08:00
});
$("input[name='ENDTIME']").datetimepicker({
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
forceParse: 0,
showMeridian: 1,
format: 'yyyy-mm-dd hh:ii:ss'
2021-03-30 09:45:17 +08:00
});
$("input[name='DAILYSTARTTIME']").datetimepicker({
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
forceParse: 0,
showMeridian: 1,
format: 'yyyy-mm-dd hh:ii:ss'
2021-03-30 09:45:17 +08:00
});
$("input[name='DAILYENDTIME']").datetimepicker({
weekStart: 1,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
forceParse: 0,
showMeridian: 1,
format: 'yyyy-mm-dd hh:ii:ss'
2021-03-30 09:45:17 +08:00
});
</script>
</body>
</html>