1.判断内容是否修改
1)
var cgrid = query_panel.cgrid;
var v = cgrid.getValues();
//console.log(v);
if (v != "" && typeof (v) != "undefined") {
Ext.Msg.alert(MsgMrg.OptMsg, '修改信息后请先保存!');
return;
}
2)
if (cgrid.getStore().getModifiedRecords().length > 0) {
Ext.Msg.alert(MsgMrg.OptMsg, '修改信息后请先保存!');
return;
}
2.获取选中行的某个值
listeners: {
beforeload: function (v) {
debugger
Ext.apply(v.baseParams, {
//SFields: ["USERID"],//
//SFieldTypes: ['string'],
//Relations: ["="],
//SValues: ['qcy'],
UserId:grid.getSelectionModel().getSelected().get('UserID')
});
}
}
3.后台返回json格式的输出
return "{success:false,msg:'不存在此按钮'}";
4.前台渐变弹窗
prityTip(MsgMrg.OptMsg, '已是启用状态!');
5.点击后弹出输入文本框弹窗
Ext.Msg.prompt(MsgMrg.OptMsg, "请填写启用原因", function (btn, text) { if (btn == "ok") { if (text == '' || text == null) { Ext.Msg.alert(MsgMrg.OptMsg, '请填写启用原因!'); return; } //mainfunction } })