活动管理-修改提交格式
This commit is contained in:
parent
022e1fa39e
commit
6fee6d26f0
|
|
@ -1767,6 +1767,7 @@ var customSerialize = function(form, json, callback) {
|
|||
var arr = $('#' + form).serializeArray();
|
||||
var tmp = {};
|
||||
var res2 = {};
|
||||
var res3 = {};
|
||||
//处理array
|
||||
$.each(arr, function(k, v) {
|
||||
tmp[v.name] = v.value;
|
||||
|
|
@ -1777,7 +1778,7 @@ var customSerialize = function(form, json, callback) {
|
|||
$.each(res2, function(k, v) {
|
||||
var path = k.split('-');
|
||||
var k2 = path.pop();
|
||||
var next_node = res2;
|
||||
var next_node = res3;
|
||||
$.each(path, function(k2, node) {
|
||||
if (!next_node[node]) next_node[node] = {};
|
||||
next_node = next_node[node];
|
||||
|
|
@ -1790,6 +1791,6 @@ var customSerialize = function(form, json, callback) {
|
|||
return json;
|
||||
} else {
|
||||
// if (callback) callback(res2);
|
||||
return res2;
|
||||
return res3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@
|
|||
<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">
|
||||
<input name="drawInfo-ENDTIME" 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>
|
||||
|
|
@ -314,7 +314,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">活动标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="actTitle" name="actTitle" placeholder="活动名称"
|
||||
<input id="actTitle" name="actPageConfigGuide-actTitle" placeholder="活动名称"
|
||||
class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePic(this)">
|
||||
</div>
|
||||
|
|
@ -326,7 +326,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">活动描述:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="actDesc" name="actDesc" placeholder="活动描述"
|
||||
<input id="actDesc" name="actPageConfigGuide-actDesc" placeholder="活动描述"
|
||||
class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePic(this)">
|
||||
</div>
|
||||
|
|
@ -344,7 +344,7 @@
|
|||
<div>
|
||||
<span class="btn btn-white btn-file"><span
|
||||
class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span>
|
||||
<input type="file" id="pic" name="bgImg"></span>
|
||||
<input type="file" id="pic" name="actPageConfigGuide-bgImg"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists"
|
||||
data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
|
|
@ -357,7 +357,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">自定义按钮1:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="btn1" name="btnText" placeholder="自定义按钮1" class="form-control"
|
||||
<input id="btn1" name="actPageConfigGuide-btnText" placeholder="自定义按钮1" class="form-control"
|
||||
type="text"
|
||||
maxlength="30" onkeyup="updatePic(this)">
|
||||
</div>
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">按钮1跳转链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="btnLink" placeholder="按钮1跳转链接" class="form-control"
|
||||
<input name="actPageConfigGuide-btnLink" placeholder="按钮1跳转链接" class="form-control"
|
||||
type="text"
|
||||
maxlength="30">
|
||||
</div>
|
||||
|
|
@ -381,7 +381,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">自定义按钮2:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="btn2" name="btnText2" placeholder="自定义按钮2" class="form-control" type="text"
|
||||
<input id="btn2" name="actPageConfigGuide-btnText2" placeholder="自定义按钮2" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePic(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -392,7 +392,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">按钮2跳转链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="btnLink2" placeholder="按钮2跳转链接" class="form-control"
|
||||
<input name="actPageConfigGuide-btnLink2" placeholder="按钮2跳转链接" class="form-control"
|
||||
type="text"
|
||||
maxlength="30">
|
||||
</div>
|
||||
|
|
@ -429,7 +429,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">首次中奖配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="FIRSTFLAG" id="FIRSTFLAG" onchange="firstflag()" class="form-control"
|
||||
<select name="drawRule-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>
|
||||
|
|
@ -441,7 +441,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" disabled>
|
||||
<select name="drawRule-FIRSTAWARDPRIZE" class="form-control" id="firstawardprize" disabled>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -453,7 +453,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">时间段抽奖配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="DAILYFLAG" id="DAILYFLAG" onchange="dailyflag()" class="form-control"
|
||||
<select name="drawRule-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>
|
||||
|
|
@ -465,7 +465,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">时间段限制次数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="DAILYNUMBER" id="dailynumber" placeholder="时间段限制次数"
|
||||
<input name="drawRule-DAILYNUMBER" id="dailynumber" placeholder="时间段限制次数"
|
||||
class="form-control" type="text" maxlength="30" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -477,7 +477,7 @@
|
|||
<label class="col-sm-4 control-label is-required">抽奖限制开始时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="DAILYSTARTTIME" id="dailystarttime" class="form-control"
|
||||
<input name="drawRule-DAILYSTARTTIME" id="dailystarttime" class="form-control"
|
||||
placeholder="HH:mm:ss" type="text" disabled>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
|
|
@ -489,7 +489,7 @@
|
|||
<label class="col-sm-4 control-label is-required">抽奖限制结束时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="DAILYENDTIME" id="dailyendtime" class="form-control"
|
||||
<input name="drawRule-DAILYENDTIME" id="dailyendtime" class="form-control"
|
||||
placeholder="HH:mm:ss" type="text" disabled>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
|
|
@ -504,7 +504,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">抽奖必中配置:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="WILLDRAWFLAG" id="WILLDRAWFLAG" onchange="willdrawflag()"
|
||||
<select name="drawRule-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>
|
||||
|
|
@ -516,7 +516,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">抽奖必中计数:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="WILLDRAWAWARDNUMBER" id="willdrawawardnumber" placeholder="抽奖必中计数"
|
||||
<input name="drawRule-WILLDRAWAWARDNUMBER" id="willdrawawardnumber" placeholder="抽奖必中计数"
|
||||
class="form-control" type="text" maxlength="30" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -528,7 +528,7 @@
|
|||
<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 name="drawRule-WILLDRAWAWARDPRIZE" class="form-control" id="willdrawawardprize"
|
||||
disabled>
|
||||
</select>
|
||||
</div>
|
||||
|
|
@ -545,7 +545,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="title" name="title" placeholder="例如:客户姓名" class="form-control" type="text"
|
||||
<input id="title" name="actPageConfigUserinfo-title" placeholder="例如:客户姓名" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -556,7 +556,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">描述:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="describe" name="description" placeholder="例如:客户手机号" class="form-control" type="text"
|
||||
<input id="describe" name="actPageConfigUserinfo-description" placeholder="例如:客户手机号" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -567,7 +567,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">协议内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="agreement" name="agreement" height="100px" class="form-control" type="text"
|
||||
<input id="agreement" name="actPageConfigUserinfo-agreement" height="100px" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -583,7 +583,7 @@
|
|||
<div>
|
||||
<span class="btn btn-white btn-file"><span
|
||||
class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span>
|
||||
<input type="file" id="picture" name="bgImg"></span>
|
||||
<input type="file" id="picture" name="actPageConfigUserinfo-bgImg"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists"
|
||||
data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
|
|
@ -596,7 +596,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">自定义按钮:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="btn" name="btnText" placeholder="自定义按钮" class="form-control" type="text"
|
||||
<input id="btn" name="actPageConfigUserinfo-btnText" placeholder="自定义按钮" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -607,7 +607,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">按钮跳转链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="btnLink" placeholder="按钮跳转链接" class="form-control" type="text"
|
||||
<input name="actPageConfigUserinfo-btnLink" placeholder="按钮跳转链接" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)" >
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -619,16 +619,16 @@
|
|||
<label class="col-sm-4 control-label is-required">客户必填信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="userName" id="name" onclick="updateText(this)">姓名</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-userName" id="name" onclick="updateText(this)">姓名</input>
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="phone" id="phone" onclick="updateText(this)">手机号</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-phone" id="phone" onclick="updateText(this)">手机号</input>
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="gender" id="sex" onclick="updateText(this)">性别</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-gender" id="sex" onclick="updateText(this)">性别</input>
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="address" id="address" onclick="updateText(this)">地址</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-address" id="address" onclick="updateText(this)">地址</input>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -640,16 +640,16 @@
|
|||
<label class="col-sm-4 control-label ">代理人信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="agentName" id="agentName" onclick="updateText(this)">代理人姓名</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-agentName" id="agentName" onclick="updateText(this)">代理人姓名</input>
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="agentMobile" id="agentPhone" onclick="updateText(this)">代理人手机号</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-agentMobile" id="agentPhone" onclick="updateText(this)">代理人手机号</input>
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="agentGender" id="agentSex" onclick="updateText(this)">代理人性别</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-agentGender" id="agentSex" onclick="updateText(this)">代理人性别</input>
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" name="agentNo" id="agentNumber" onclick="updateText(this)">代理人工号</input>
|
||||
<input type="checkbox" name="actPageConfigUserinfo-agentNo" id="agentNumber" onclick="updateText(this)">代理人工号</input>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -672,28 +672,28 @@
|
|||
|
||||
<div class="drawText3Pri">
|
||||
<div>
|
||||
<input placeholder="姓名" name="name" type="hidden" id="namePri">
|
||||
<input placeholder="姓名" type="hidden" id="namePri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="手机号" name="phone" type="hidden" id="phonePri">
|
||||
<input placeholder="手机号" type="hidden" id="phonePri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="性别" name="sex" height="10px" type="hidden" id="sexPri">
|
||||
<input placeholder="性别" height="10px" type="hidden" id="sexPri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="地址" name="address" type="hidden" id="addressPri">
|
||||
<input placeholder="地址" type="hidden" id="addressPri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="代理人姓名" name="agentName" type="hidden" id="agentNamePri">
|
||||
<input placeholder="代理人姓名" type="hidden" id="agentNamePri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="代理人手机号" name="agentPhone" type="hidden" id="agentPhonePri">
|
||||
<input placeholder="代理人手机号" type="hidden" id="agentPhonePri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="代理人性别" name="agentSex" type="hidden" id="agentSexPri">
|
||||
<input placeholder="代理人性别" type="hidden" id="agentSexPri">
|
||||
</div>
|
||||
<div>
|
||||
<input placeholder="代理人地址" name="agentNumber" type="hidden" id="agentNumberPri">
|
||||
<input placeholder="代理人地址" type="hidden" id="agentNumberPri">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -714,7 +714,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">分享连接:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="shareConnect" name="shareLink" placeholder="例如:http://XX" class="form-control" type="text"
|
||||
<input id="shareConnect" name="actConfig-shareLink" placeholder="例如:http://XX" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -725,7 +725,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">分享标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="shareTitle" name="shareTitle" placeholder="例如:2021XX客户节" class="form-control" type="text"
|
||||
<input id="shareTitle" name="actConfig-shareTitle" placeholder="例如:2021XX客户节" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -736,7 +736,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">分享描述:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="shareDescribe" name="shareDesc" placeholder="例如:参与活动,赢大奖" class="form-control" type="text"
|
||||
<input id="shareDescribe" name="actConfig-shareDesc" placeholder="例如:参与活动,赢大奖" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -752,7 +752,7 @@
|
|||
<div>
|
||||
<span class="btn btn-white btn-file"><span
|
||||
class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span>
|
||||
<input type="file" id="shareImg" name="shareImg"></span>
|
||||
<input type="file" id="shareImg" name="actConfig-shareImg"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists"
|
||||
data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
|
|
@ -788,7 +788,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">关注二维码描述:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="qrCode" name="qrCode" placeholder="例如:扫描二维码参加活动" class="form-control" type="text"
|
||||
<input id="qrCode" name="actPageConfigSubscribe-qrCode" placeholder="例如:扫描二维码参加活动" class="form-control" type="text"
|
||||
maxlength="30" onkeyup="updatePri(this)">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -804,7 +804,7 @@
|
|||
<div>
|
||||
<span class="btn btn-white btn-file"><span
|
||||
class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span>
|
||||
<input type="file" id="backdropImg" name="bgImg"></span>
|
||||
<input type="file" id="backdropImg" name="actPageConfigSubscribe-bgImg"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists"
|
||||
data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
|
|
@ -821,7 +821,7 @@
|
|||
<div>
|
||||
<span class="btn btn-white btn-file"><span
|
||||
class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span>
|
||||
<input type="file" id="qrCodeImg" name="bgImg2"></span>
|
||||
<input type="file" id="qrCodeImg" name="actPageConfigSubscribe-bgImg2"></span>
|
||||
<a href="#" class="btn btn-white fileinput-exists"
|
||||
data-dismiss="fileinput">清除</a>
|
||||
</div>
|
||||
|
|
@ -982,7 +982,7 @@
|
|||
.on('click', function () {
|
||||
//添加保存逻辑
|
||||
var data = customSerialize("form-info-add",false);
|
||||
alert(data);
|
||||
|
||||
});
|
||||
var btnCancel = $('<a id="btn-cancel"></a>').text('取消')
|
||||
.addClass('btn btn-danger')
|
||||
|
|
|
|||
Loading…
Reference in New Issue