带确认提示
layer.confirm('您确定要提交该申请单吗?', {
btn: ['确定','取消']
}, function(){
var index = layer.load();
$.ajax({
url: "../../../../addOrUpdXzsqd.do",
data: {applyType:2,state:1,id:dt.id},
type: 'post',
dataType: "json",
success: function (resp) {
layer.close(index);
//成功提示
if (resp.msg == null) {
layer.msg("提交成功", {
icon: 1,
time: 1000
}, function () {
tableIns.reload();
});
} else {
//失败提示
layer.msg(resp.msg, {
icon: 2,
time: 2000
});
}
}
});
}, function(index){
tableIns.reload();
});