191 lines
8.2 KiB
HTML
191 lines
8.2 KiB
HTML
<!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-edit" th:object="${drawConfig}">
|
||
<input type="hidden" name="DRAWCONFIGID" th:value="${DRAWCONFIGID}" />
|
||
<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}" th:field="*{PRIZELEVEL}"></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" th:field="*{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" th:field="*{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"th:field="*{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" th:field="*{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">
|
||
<label class="col-sm-4 control-label is-required">奖品发放制度:</label>
|
||
<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}" th:field="*{AWARDTYPE}"></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" th:field="*{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}" th:field="*{AWARDMETHOD}"></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}" th:field="*{STATUS}"></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" th:field="*{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-edit").validate({
|
||
focusCleanup: true
|
||
});
|
||
|
||
/**获取奖品及信息列表*/
|
||
$(document).ready(function() {
|
||
var PRIZECODE = [[${drawConfig.PRIZECODE}]];
|
||
|
||
var job= "";
|
||
$.ajax({
|
||
|
||
url:prefix + "/prizeInfo",
|
||
success: function (data) {
|
||
|
||
for(var i in data){
|
||
if (job.length==0){
|
||
|
||
if(data[i].prizecode==PRIZECODE){
|
||
job = "<option value='"+data[i].prizecode+"' selected=\"selected\">"+data[i].prizename+"</option>"
|
||
}
|
||
job = "<option value='"+data[i].prizecode+"' >"+data[i].prizename+"</option>"
|
||
|
||
}else{
|
||
if(data[i].prizecode==PRIZECODE){
|
||
job += "<option value='"+data[i].prizecode+"' selected=\"selected\">"+data[i].prizename+"</option>"
|
||
}
|
||
job += "<option value='"+data[i].prizecode+"' >"+data[i].prizename+"</option>"
|
||
}
|
||
|
||
|
||
}
|
||
$("#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 + "/edit", $('#form-info-edit').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> |