layer弹出审批窗口填写备注

function edit(id){
        layer.open({
            type: 1
            ,title: '审批'
            ,offset: 'auto'
            ,area: ['280px', '180px']
            ,id: id //防止重复弹出
            ,content: '
'
,btn: ['通过', '驳回'] ,btnAlign: 'c' //按钮居中 ,shade: 0.5 //不显示遮罩 ,yes: function(){ // 通过 var message = $('#message').val(); $.ajax({ url: "{:url('Approve/edit',['status'=>1])}", type: "POST", data: {id:id,message:message}, dataType: "JSON", success: function(res) { layer.msg(res.msg); window.setTimeout(function (){ window.location.reload(); },2000); } }); } ,btn2: function(){ // 驳回 var message = $('#message').val(); $.ajax({ url: "{:url('Approve/edit',['status'=>2])}", type: "POST", data: {id:id,message:message}, dataType: "JSON", success: function(res) { layer.msg(res.msg); window.setTimeout(function (){ window.location.reload(); },2000); } }); } }); }

你可能感兴趣的:(php)