您的位置:首页 > 产品设计 > UI/UE

easyui后台取值一般是主键id进行删除

2016-02-23 11:02 573 查看
//信息列表

weChatBill.datagrid({

//title:"挂号信息信息列表",

idField:"id",

striped:true,//奇偶行显示不同颜色

fitColumns:true,

nowap:true,//列内容多时自动折至第二行,fitColumns为false才有效

rownumbers:false,

singleSelect:false,//可以多选

loadMsg:"正在加载数据....",

url:listurl,

frozenColumns:[[

{field:'ck',checkbox:true}

]],

columns : [ [

{field:'patientName',title:'姓名',sortable:true,width:50,align:'center'},

{field:'createTime',title:'预约时间',sortable:true,width:100,align:'center'},

{field:'bookingTime',title:'预约就诊时间',sortable:true,width:100,align:'center'},

{field:'drName',title:'医生',sortable:true,width:100,align:'center'},

{field:'blh',title:'病例号',sortable:true,width:100,align:'center'},

{field:'patientPhone',title:'患者手机',sortable:true,width:130,align:'center'},

/* {field:'remark',title:'备注',sortable:true,width:150,align:'center'},

*/ {field:'orderPrice',title:'预付金',width:50,align:'center'},

{field:'price',title:'预付金抵扣金额',width:130,align:'center'},

{field:'payType',title:'支付方式',width:50,align:'center',formatter:function(value){

//0微信支付1会员卡支付

var result = "";

switch(value){

case 0:result="微信支付";break;

case 1:result="会员卡支付";break;

}

return result;

}

},

{field:'status',title:'状态',sortable:true,width:80,align:'center',align:'center',formatter:function(value){

//0预付1抵扣2退还 3罚没

var result = "";

switch(value){

case 0:result="预付";break;

case 1:result="抵扣";break;

case 2:result="退还";break;

case 3:result="罚没";break;

}

return result;

}

}

] ],

pagination:true,

pageList:[10,20],

pageSize:10,

toolbar:[

{

id:'btnremove',

text:'罚没',

iconCls:'icon-remove',

handler:function(){

var selections = weChatBill.datagrid("getSelections");

console.log(selections);

if(selections.length<1){

$.messager.show({

title:"提示信息",

msg:"请至少选择一条需要记录!"

});

}else if(selections[0].status==1){

$.messager.show({

title:"提示信息",

msg:"已抵扣!"

});

}else if(selections[0].status==2){

$.messager.show({

title:"提示信息",

msg:"已退还!"

});

}else if(selections[0].status==3){

$.messager.show({

title:"提示信息",

msg:"已罚没!"

});

}else{//只有状态为0时才能执行

$.messager.confirm("提示信息","确定罚没吗?",function(r){

if(r){

var ids = [];

for(var i=0;i<selections.length;i++){

ids.push("ids="+selections[i].id);

}

var data = ids.join("&");

$.post("doctorwatch/wechat_updatestatus.htmls",data,function(r){

var rtn = $.parseJSON(r);

$.messager.show({

title:rtn.title,

msg:rtn.msg

});

weChatBill.datagrid("unselectAll");

weChatBill.datagrid("reload");

});

}

});

}

}

}],

});

}

}

后台取值方法

public Message wechatUpdateStatus(int[] ids) throws Exception {

}

有很多不完善 但是红色和绿色标记的可以参考
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息