Commit 12568f50 authored by maliang's avatar maliang

上传bug修复

parent 1ad7fdab
...@@ -52,6 +52,10 @@ public class CopyrightBookController { ...@@ -52,6 +52,10 @@ public class CopyrightBookController {
@ApiOperation(value = "获取总的未结算数据") @ApiOperation(value = "获取总的未结算数据")
@ResponseBody @ResponseBody
public String getDeductionConfig(@RequestBody PageTableRequest request){ public String getDeductionConfig(@RequestBody PageTableRequest request){
List<BaseSettlement> array = request.getArray();
for (BaseSettlement baseSettlement : array) {
System.out.println(baseSettlement.getContext());
}
List<BaseSettlement> deductionConfig = copyrightDao.getDeductionConfig(request.getPage(),request.getLimit()); List<BaseSettlement> deductionConfig = copyrightDao.getDeductionConfig(request.getPage(),request.getLimit());
List<BaseSettlement> deductionConfigs = copyrightDao.getDeductionConfig(0,1000); List<BaseSettlement> deductionConfigs = copyrightDao.getDeductionConfig(0,1000);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
......
...@@ -4,6 +4,7 @@ import com.boot.security.server.model.AdvertiserData; ...@@ -4,6 +4,7 @@ import com.boot.security.server.model.AdvertiserData;
import com.boot.security.server.model.BaseSettlement; import com.boot.security.server.model.BaseSettlement;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -33,6 +34,15 @@ public class PageTableRequest implements Serializable { ...@@ -33,6 +34,15 @@ public class PageTableRequest implements Serializable {
private Integer type; private Integer type;
private String typeName; private String typeName;
private Integer copyrightId; private Integer copyrightId;
private List<BaseSettlement> array;
public List<BaseSettlement> getArray() {
return array;
}
public void setArray(List<BaseSettlement> array) {
this.array = array;
}
public Integer getCopyrightId() { public Integer getCopyrightId() {
return copyrightId; return copyrightId;
......
...@@ -12,7 +12,20 @@ ...@@ -12,7 +12,20 @@
<div class="layui-form"> <div class="layui-form">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-md3">
<button id="updateDeductionConfig" type="button" class="layui-btn layui-btn-warm">修改</button>
</div>
<form class="layui-form" action="">
<div class="layui-col-md3" style="width: 160px">
<select name="deductionSelect" lay-verify="" id="deductionSelect">
<option value="阶梯比例">阶梯比例</option>
<option value="固定比例">固定比例</option>
</select>
</div>
<div class="layui-col-md3" style="width: 400px">
<input id="deductionInput" type="text" name="deductionInput" placeholder="请输入扣量比例" autocomplete="off" class="layui-input">
</div>
</form>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<table class="layui-table" id="copyrightConfig_table" lay-filter="test"> <table class="layui-table" id="copyrightConfig_table" lay-filter="test">
...@@ -46,11 +59,13 @@ ...@@ -46,11 +59,13 @@
var form; var form;
var copyrights; var copyrights;
var tableIns; var tableIns;
var table;
var form;
function table1(){ function table1(){
layui.use('table', function() { layui.use('table', function() {
var table = layui.table; table = layui.table;
tableIns=table.render({ tableIns=table.render({
elem: '#copyrightConfig_table' elem: '#copyrightConfig_table'
,id:'idTest' ,id:'idTest'
...@@ -64,6 +79,7 @@ ...@@ -64,6 +79,7 @@
,limits:[20,30,40,50,60,70,80,90] ,limits:[20,30,40,50,60,70,80,90]
,height:500 ,height:500
,cols: [[ ,cols: [[
{type:"checkbox"}
,{field: 'copyrightId', title: '版权费id', hide: true} ,{field: 'copyrightId', title: '版权费id', hide: true}
,{field: 'copyrightName', title: '版权方名称'} ,{field: 'copyrightName', title: '版权方名称'}
,{field: 'typeName', title: '扣量方式',edit:"text"} ,{field: 'typeName', title: '扣量方式',edit:"text"}
...@@ -103,9 +119,39 @@ ...@@ -103,9 +119,39 @@
}); });
}); });
} }
layui.use('form', function(){
form = layui.form;
});
$("#updateDeductionConfig").bind("click",function(){
var checkStatus = table.checkStatus('idTest');
var typeName=$("#deductionSelect").val();
var context=$("#deductionInput").val();
console.log(checkStatus.data);
console.log(typeName);
console.log(context);
var list={typeName:typeName,context:context,array:checkStatus.data}
$.ajax({
//请求方式
type : "post",
//请求的媒体类型
contentType: "application/json;charset=UTF-8",
//请求地址
url : "/copyrightBookController/updateDeductionConfig",
async:false,
//数据,json字符串
data : JSON.stringify(list),//ajax controller有请求参数必须传参写data
//请求成功
success : function(result) {
}
});
});
function reload(data) { function reload(data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment