233bbad2 by yangjianbin

init

1 parent 80b77195
...@@ -72,13 +72,39 @@ ...@@ -72,13 +72,39 @@
72 </script> 72 </script>
73 73
74 <script> 74 <script>
75
75 function cancel(id) { 76 function cancel(id) {
76 layer.confirm('取消之后, 将立即进入【已取消】列表', { 77 layer.confirm('确定取消?', {
77 btn: ['确认', '取消'], 78 btn: ['是','否'],
78 title: '客户取消', 79 title: '确认',
79 icon: 2 80 icon: 3
80 }, function () { 81 }, function(){
81 layer.msg('取消'); 82 var targetUrl = 'flow/cancelOrder/' + id;
83 $.ajax({
84 type: 'put',
85 url: apiBaseUrl + targetUrl,
86 cache: false,
87 dataType: 'json',
88 contentType: "application/json; charset=UTF-8",
89 success: function (data) {
90 if (data.msg) {
91 layer.alert(data.msg);
92 } else if (data.code != 0) {
93 layer.alert('操作失败');
94 } else {
95 layer.alert('操作成功');
96 }
97 setTimeout(function () {
98 if(!data.code) {
99 table.fnDraw();
100 layer_close();
101 }
102 },500);
103 },
104 error: function () {
105 layer.alert("操作失败")
106 }
107 })
82 }); 108 });
83 } 109 }
84 </script> 110 </script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!