layer弹出层自定义提交取消按钮的例子
首先从js开始
/** *检查是否选中 */ Sendandre.check=function(){ varselected=$('#'+this.id).bootstrapTable('getSelections'); if(selected.length===0){ Feng.info("请先选中表格中的某一记录!"); returnfalse; }else{ Sendandre.seItem=selected[0]; console.log(Sendandre.seItem); returntrue; } }; /** *点击修改按钮时 */ Sendandre.openChangestan=function(){ if(this.check()){ this.layerIndex=layer.open({ type:2, title:'修改收派标准', area:['800px','400px'],//宽高 fix:false,//不固定 maxmin:true, content:Feng.ctxPath+'/sendandreceive/stander_edit?sendid='+this.seItem.sendid, success:function(layero,index){//成功获得加载changefile.html时 ////console.log(obj.data.editAble); varbody=layer.getChildFrame('body',index); //console.log(rowselect[0].filename); body.find(".sendname").val(Sendandre.seItem.sendname);//通过class名进行获取数据 body.find(".minwe").val(Sendandre.seItem.minwe); body.find(".maxwe").val(Sendandre.seItem.maxwe); } }); } };
然后是弹出层加载的界面
@layout("/common/_dialog.html",{plugins:["laydate","sweet-alert","layer"],js:["/assets/modular/system/basic/sendandre/send_edit.js"]}){标准名称
*