活动管理-修改提交格式
This commit is contained in:
parent
6fee6d26f0
commit
16829f6138
|
|
@ -1786,7 +1786,7 @@ var customSerialize = function(form, json, callback) {
|
|||
next_node[k2] = v;
|
||||
});
|
||||
if (arguments[1] && arguments[1] == true) {
|
||||
var json = JSON.stringify(res2);
|
||||
var json = JSON.stringify(res3);
|
||||
// if (callback) callback(json);
|
||||
return json;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,22 +7,20 @@ import java.util.List;
|
|||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.sinosoft.activity.domain.ActConfig;
|
||||
import com.sinosoft.activity.domain.DrawInfo;
|
||||
import com.sinosoft.activity.domain.DrawPrizeInfo;
|
||||
import com.sinosoft.activity.domain.DrawRule;
|
||||
import com.sinosoft.activity.service.IDrawInfoService;
|
||||
import com.sinosoft.activity.service.IDrawPrizeInfoService;
|
||||
import com.sinosoft.activity.service.IDrawRuleService;
|
||||
import com.sinosoft.activity.vo.ActVO;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
||||
|
|
@ -117,6 +115,14 @@ public class DrawInfoController extends BaseController
|
|||
return toAjax(i);
|
||||
}
|
||||
|
||||
@PostMapping("/add/test")
|
||||
@ResponseBody
|
||||
public AjaxResult addtest(@RequestBody ActVO vo){
|
||||
ActConfig actConfig = vo.getActConfig();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改抽奖活动管理
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="drawInfo-STATUS" class="form-control" th:with="type=${@dict.getType('start_stop')}">
|
||||
<select name="drawInfo-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>
|
||||
|
|
@ -981,8 +981,27 @@
|
|||
.addClass('btn btn-info')
|
||||
.on('click', function () {
|
||||
//添加保存逻辑
|
||||
var data = customSerialize("form-info-add",false);
|
||||
|
||||
var data = customSerialize("form-info-add",true);
|
||||
alert(data);
|
||||
$.ajax({
|
||||
url: prefix + "/add/test",
|
||||
data: data,
|
||||
type: "post",
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
layer.msg("保存成功,正在刷新数据请稍后……", {
|
||||
icon: 1,
|
||||
time: 500,
|
||||
shade: [0.1, '#8F8F8F']
|
||||
},function() {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
alert(result.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
var btnCancel = $('<a id="btn-cancel"></a>').text('取消')
|
||||
.addClass('btn btn-danger')
|
||||
|
|
|
|||
Loading…
Reference in New Issue