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">
|
|
|
|
|
<input type="hidden" name="DRAWCODE" th:value="${DRAWCODE}" />
|
|
|
|
|
<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="PRIZELEVEL" class="form-control" th:with="type=${@dict.getType('prizeLevel')}">
|
|
|
|
|
<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="PRIZECODE" class="form-control" id="PRIZECODE">
|
|
|
|
|
</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">
|
|
|
|
|
<input name="PROBABILITY" id="PROBABILITY" 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">
|
|
|
|
|
<input name="DISPLAYORDER" 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">
|
|
|
|
|
<input name="TOTALNUMBER" 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">
|
|
|
|
|
<input name="AVAILABLENUMBER" placeholder="剩余数量" class="form-control" type="text" maxlength="30">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<div class="form-group">
|
2021-03-31 09:40:01 +08:00
|
|
|
<label class="col-sm-4 control-label is-required">奖品发放限制:</label>
|
2021-03-30 09:45:17 +08:00
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<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}"></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="AWARDTYPEVALUE" 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="AWARDMETHOD" class="form-control" th:with="type=${@dict.getType('AWARDMETHOD')}">
|
|
|
|
|
<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="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">
|
|
|
|
|
<input name="CUE" placeholder="中奖提示" class="form-control" type="text" maxlength="30">
|
|
|
|
|
</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/config"
|
|
|
|
|
$("#form-info-add").validate({
|
|
|
|
|
focusCleanup: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/**获取奖品及信息列表*/
|
|
|
|
|
$(document).ready(function() {
|
2021-03-30 10:27:56 +08:00
|
|
|
var job= "";
|
2021-03-30 09:45:17 +08:00
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
|
|
url:prefix + "/prizeInfo",
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
for(var i in data){
|
2021-03-30 10:27:56 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
|
$("#PRIZECODE").html(job);
|
|
|
|
|
},
|
|
|
|
|
error : function(XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
|
alert(errorThrown);
|
|
|
|
|
},
|
|
|
|
|
async:false //false表示同步
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
function submitHandler() {
|
|
|
|
|
var PROBABILITY=$("#PROBABILITY").val();
|
|
|
|
|
probability = (PROBABILITY.length) >0? PROBABILITY :0;
|
|
|
|
|
$("#PROBABILITY").val(probability);
|
|
|
|
|
if ($.validate.form()) {
|
|
|
|
|
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("input[name='CREATETIMESTAMP']").datetimepicker({
|
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
|
minView: "month",
|
|
|
|
|
autoclose: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("input[name='LASTUPDATETIMESTAMP']").datetimepicker({
|
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
|
minView: "month",
|
|
|
|
|
autoclose: true
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|