function cashbackPercentage(){
var chk_value =[];
var percentage = $("#percentage").val();
if( percentage=='' || percentage < 0 || percentage > 20 ){
EasyuiUtils.alertMsg("请输入0~20之间的返现比例!");
return;
}
var url="${pageContext.request.contextPath}/balrebateruleSpecial/percentage";
// var rows = $('#dg').datagrid('getRows');
var rows = $('#dg').datagrid('getSelections');
for(var i=0;i<rows.length;i++){
if(rows[i].sid==null){
EasyuiUtils.alertMsg("请选择已配置过分佣比例的商品!");
return;
}else{
chk_value.push(rows[i].sid);
}
}
if(chk_value.length==0){
EasyuiUtils.alertMsg("请先选择商品!");
}else{
var ids=chk_value.toString();
EasyuiUtils.confirm("批量修改,请确定返现比例准确!",
function(){
$.post(url,{merchantRebatePercentage:percentage,ids:ids},function(result){
if(result=="success"){
EasyuiUtils.alertMsg("批量修改成功!");
doSearch('frm', 'dg');
}
else{
EasyuiUtils.alertMsg("系统忙,请稍后操作");
}
});
});
}
}
<!-- 数据列表 -->
<table id="dg" class="easyui-datagrid" toolbar="#tb" fitColumns='false'
data-options=" title: '无代理商商户结算返利配置(个性化)',
method: 'post',
url: '${pageContext.request.contextPath}/balrebateruleSpecial/proxySpecialList?custId='+${custId},
pagination: 'true',
pagePosition: 'bottom',
pageNumber: 1,
pageSize: '20',
rownumbers: 'true',
fit: 'true',
fitColumns: 'true',
fixed: 'true',
rownumbers: true,
loadMsg: '加载中,请稍后..',
onLoadSuccess:function(data){setBtnStyle(data);},
onLoadError:function(){alert(1)}
">
<thead>
<th field="ck" data-options="field:'sid'" checkbox="true"></th>
<th data-options="field:'ruleName'">分佣规则名称</th>
<th data-options="field:'custId',formatter: function(value,row,index){return convertData('custId',value,row,index);}">客户编号</th>
<th data-options="field:'shopProductName'">商品名称</th>
<th data-options="field:'operatorsCode',formatter: function(value,row,index){return convertData('operatorsCode',value,row,index);}">运营商</th>
<th data-options="field:'geographicalScope',formatter: function(value,row,index){return convertData('geographicalScope',value,row,index);}">地域范围</th>
<th data-options="field:'provinceName'">省名称</th>
<th data-options="field:'sellingPrice'">售价(元)</th>
<!-- <th data-options="field:'proxyRebatePercentage'">代理商返现比例</th> -->
<th data-options="field:'merchantRebatePercentage',formatter: function(value,row,index){return convertData('merchantRebatePercentage',value,row,index);}">商户返现比例</th>
<th data-options="field:'enableStartdate',formatter: function(value,row,index){return EasyuiUtils.formatDate2(value,row,index);}">有效开始时间</th>
<th data-options="field:'enableEnddate',formatter: function(value,row,index){return EasyuiUtils.formatDate2(value,row,index);}">有效结束时间</th>
<th data-options="field:'centCommission',formatter: function(value,row,index){return convertData('centCommission',value,row,index);}">是否分佣</th>
<!-- <th data-options="field:'isEffect', formatter: function(value,row,index){return convertData('isEffect', value,row,index);}">状态</th> -->
<th data-options="width:300, field:'操作', formatter: function(value,row,index){return convertData('action', value,row,index);}">操作</th>
</thead>
</table>