- 注册时间
- 2013-7-9
- 最后登录
- 2013-12-19
- 阅读权限
- 10
- 积分
- 39
- 精华
- 0
- 帖子
- 13
|
我这样写后就不能排序了?能帮看下什么原因吗?
<body>
<div class="mini-fit">
<div id="BD_BRANCH_ITEM_RATE_LIST" style="width:100%;height:100%" class="mini-datagrid" sortMode="client"
allowResize = "true" idField="id" url="${base}/bd/bd_branch_item_rate!ajaxList.action" showFooter="false" >
<div property="columns">
<div type="indexcolumn" name="index" headerAlign="center" header="序号"></div>
<div width="100" name="itemRate" field="itemRate" headerAlign="center" allowSort="true" header="商品等级"></div>
<div width="100" name="branchRate" field="branchRate" headerAlign="center" allowSort="true" header="门店等级"></div>
<div width="100" name="rateQty" field="rateQty" headerAlign="center" header="数量">
<input property="editor" class="mini-textbox" style="width:100%;" vtype="float"/>
</div>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">
mini.parse()
var grid = mini.get('BD_BRANCH_ITEM_RATE_LIST')
var columnsArray = gGetColumns(grid)
//查询数据添加到grid上
$(function(){
$.post("${base}/bd/bd_branch_item_rate!ajaxList.action",null,function(res){
data = res.data;
var branchRates = gGetStaticValueForCombo('bdBranchInfo.branchRate');
var itemRates = gGetStaticValueForCombo('bdItemInfo.itemRate');
for(var i=0;i<branchRates.length;i++){
for(var j=0;j<itemRates.length;j++){
var qty = 0;
for(var k=0;k<data.length;k++){
if(data[k].branchRate==branchRates[i].id&&data[k].itemRate==itemRates[j].id){
qty = data[k].rateQty;
}
}
insertRowGrid("new",grid,{
itemRate:itemRates[j].id,
branchRate:branchRates[i].id,
rateQty:qty
});
}
}
},"json")
})
</script>
|
|