ab9e8f0b by yangjianbin

init

1 parent 23988e35
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
53 return '<span class="dropDown dropDown_hover">\ 53 return '<span class="dropDown dropDown_hover">\
54 <button class="btn radius size-M">请选择 <i class="Hui-iconfont">&#xe6d5;</i></button>\ 54 <button class="btn radius size-M">请选择 <i class="Hui-iconfont">&#xe6d5;</i></button>\
55 <ul class="dropDown-menu menu radius box-shadow">\ 55 <ul class="dropDown-menu menu radius box-shadow">\
56 <li><a href="javascript:;" onclick="layer_show(\'订单详情\', \'/index.pbp/work/detail/1?tab=0\')">查看详细</a></li>\ 56 <li><a href="javascript:;" onclick="layer_show(\'订单详情\', \'/index.pbp/work/detail/'+data+'?tab=0\')">查看详细</a></li>\
57 <li><a href="javascript:;" onclick="loan(1)">线下已放款</a></li>\ 57 <li><a href="javascript:;" onclick="loan('+data+')">线下已放款</a></li>\
58 <li>\ 58 <li>\
59 <a href="#">退回订单<i class="arrow Hui-iconfont">&#xe6d7;</i></a>\ 59 <a href="#">退回订单<i class="arrow Hui-iconfont">&#xe6d7;</i></a>\
60 <ul class="menu">\ 60 <ul class="menu">\
...@@ -93,6 +93,41 @@ ...@@ -93,6 +93,41 @@
93 function loan(id) { 93 function loan(id) {
94 layer_show('线下已放款', '/work/loan'); 94 layer_show('线下已放款', '/work/loan');
95 } 95 }
96
97 function cancel(id) {
98 layer.confirm('确定取消?', {
99 btn: ['是','否'],
100 title: '确认',
101 icon: 3
102 }, function(){
103 var targetUrl = 'flow/cancelOrder/' + id;
104 $.ajax({
105 type: 'put',
106 url: apiBaseUrl + targetUrl,
107 cache: false,
108 dataType: 'json',
109 contentType: "application/json; charset=UTF-8",
110 success: function (data) {
111 if (data.msg) {
112 layer.alert(data.msg);
113 } else if (data.code != 0) {
114 layer.alert('请求失败');
115 } else {
116 layer.alert('请求成功');
117 }
118 setTimeout(function () {
119 if(!data.code) {
120 table.fnDraw();
121 layer_close();
122 }
123 },500);
124 },
125 error: function () {
126 layer.alert("请求失败")
127 }
128 })
129 });
130 }
96 </script> 131 </script>
97 </body> 132 </body>
98 <html> 133 <html>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!