57ba2561 by yangjianbin

init

1 parent 4ad0c170
......@@ -134,13 +134,38 @@
$('#table').DataTable().columns().search("").draw();
}
function cancel() {
function cancel(id) {
layer.confirm('确定取消?', {
btn: ['是','否'],
title: '确认',
icon: 3
}, function(){
layer.msg('通过');
var targetUrl = 'flow/cancelOrder/' + id;
$.ajax({
type: 'put',
url: apiBaseUrl + targetUrl,
cache: false,
dataType: 'json',
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('请求失败');
} else {
layer.alert('请求成功');
}
setTimeout(function () {
if(!data.code) {
table.fnDraw();
layer_close();
}
},500);
},
error: function () {
layer.alert("请求失败")
}
})
});
}
</script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!