62,046
社区成员
发帖
与我相关
我的任务
分享
var msg = "如果已派車取消訂單還是會收費,您确定要取消訂單吗?";
if (confirm(msg) == true) {
$.ajax({
type: 'Post',
cache: false,
url: '/SCCM0103/CancelSendCar',
data: { appNo: srow[0].APPNO,carNo:srow[0].CARNO },
success: function (data) {
if (data == "OK") {
toastr.success("取消成功!");
$("#driverInfo").bootstrapTable('refresh');
} else {
toastr.error(data);
}
},
error: function (xhr) {
toastr.error("請求時發生錯誤:" + xhr.status);
}
});
} else {
return false
}
function check(){
layer.confirm('您確定要保存嗎?', {icon: 3, title:'提示'}, function(index){
return true;
});
return false;
}
form 加上 onsubmit="return check()"
layer.confirm('您確定要保存嗎?', {icon: 3, title:'提示'}, function(index){
layer.msg('保存成功!', {icon: 1,time: 1000});
});