257158fa by yangjianbin

init

1 parent ff366d52
1 <?php $this->load->view('common/header'); ?> 1 <?php $this->load->view('common/header'); ?>
2 2
3 <body> 3 <body>
4 <div class="page-container"> 4 <div class="page-container">
5 <form class="search"> 5 <form class="search">
6 <?php $this->load->view('work/search'); ?> 6 <?php $this->load->view('work/search'); ?>
7 <div> 7 <div>
...@@ -36,15 +36,15 @@ ...@@ -36,15 +36,15 @@
36 </tbody> 36 </tbody>
37 </table> 37 </table>
38 </div> 38 </div>
39 </div> 39 </div>
40 <?php $this->load->view('common/footer'); ?> 40 <?php $this->load->view('common/footer'); ?>
41 <script> 41 <script>
42 var table = $('#table').dataTable({ 42 var table = $('#table').dataTable({
43 columns: [ 43 columns: [
44 { 44 {
45 // data: "id", 45 // data: "id",
46 render:function (data, type, full) { 46 render: function (data, type, full) {
47 return '<input value="'+data+'" type="checkbox">'; 47 return '<input value="' + data + '" type="checkbox">';
48 } 48 }
49 }, 49 },
50 { 50 {
...@@ -58,29 +58,26 @@ ...@@ -58,29 +58,26 @@
58 <li><a href="#">退至【等待放款-移交】阶段</a></li>*/ 58 <li><a href="#">退至【等待放款-移交】阶段</a></li>*/
59 var subMenu = ''; 59 var subMenu = '';
60 $('[name=status]').find('option').each(function () { 60 $('[name=status]').find('option').each(function () {
61 if(!$(this).val()) { 61 if (!$(this).val()) {
62 return; 62 return;
63 } 63 }
64 subMenu += '<li><a href="javascript:;" onclick="rollback('+data+','+$(this).val()+','+full.status+')">退至 '+$(this).text()+'阶段</a></li>'; 64 subMenu += '<li><a href="javascript:;" onclick="rollback(' + data + ',' + $(this).val() + ',' + full.status + ')">退至 ' + $(this).text() + '阶段</a></li>';
65 }) 65 })
66 return '<span class="dropDown dropDown_hover">\ 66 return '<span class="dropDown dropDown_hover">\
67 <button class="btn radius size-M">请选择 <i class="Hui-iconfont">&#xe6d5;</i></button>\ 67 <button class="btn radius size-M">请选择 <i class="Hui-iconfont">&#xe6d5;</i></button>\
68 <ul class="dropDown-menu menu radius box-shadow">\ 68 <ul class="dropDown-menu menu radius box-shadow">\
69 <li><a href="javascript:;" onclick="layer_show(\'订单详情\', \'/index.php/work/detail/'+data+'?tab=0\')">查看详细</a></li>\ 69 <li><a href="javascript:;" onclick="layer_show(\'订单详情\', \'/index.php/work/detail/' + data + '?tab=0\')">查看详细</a></li>\
70 <li><a href="javascript:;" onclick="layer_show(\'资料补录\', \'/index.php/work/record/'+data+'\')">马上尽调</a></li>\ 70 <li><a href="javascript:;" onclick="layer_show(\'资料补录\', \'/index.php/work/record/' + data + '\')">马上尽调</a></li>\
71 <li><a href="javascript:;" onclick="rollback('+data+')">驳回</a></li>\ 71 <li><a href="javascript:;" onclick="rollback(' + data + ')">驳回</a></li>\
72 <li>\ 72 <li>\
73 <a href="#">退回订单<i class="arrow Hui-iconfont">&#xe6d7;</i></a>\ 73 <a href="#">退回订单<i class="arrow Hui-iconfont">&#xe6d7;</i></a>\
74 <ul class="menu">'+subMenu+'\ 74 <ul class="menu">' + subMenu + '\
75 </ul>\ 75 </ul>\
76 </li>\ 76 </li>\
77 <li><a href="javascript:;" onclick="cancel('+data+')">客户取消</a></li>\ 77 <li><a href="javascript:;" onclick="cancel(' + data + ')">客户取消</a></li>\
78 <li><a href="javascript:;" onclick="layer_show(\'订单详情\', \'/index.php/work/detail/'+data+'?tab=2\')">处理记录</a></li>\ 78 <li><a href="javascript:;" onclick="layer_show(\'订单详情\', \'/index.php/work/detail/' + data + '?tab=2\')">处理记录</a></li>\
79 </ul>\ 79 </ul>\
80 </span>'; 80 </span>';
81
82
83
84 } 81 }
85 }, 82 },
86 {data: "orderNo"},//订单编号 83 {data: "orderNo"},//订单编号
...@@ -98,30 +95,35 @@ ...@@ -98,30 +95,35 @@
98 {name: "modifyUser", data: "modifyUserName"}, //处理人 95 {name: "modifyUser", data: "modifyUserName"}, //处理人
99 ] 96 ]
100 }); 97 });
101 </script> 98 </script>
102 99
103 <script> 100 <script>
104 function pass(id) { 101 function pass(id) {
105 layer.confirm('通过之后, 将立即进入审批阶段', { 102 layer.confirm('通过之后, 将立即进入审批阶段', {
106 btn: ['确认通过','取消'], 103 btn: ['确认通过', '取消'],
107 title: '确认通过预审', 104 title: '确认通过预审',
108 icon: 3 105 icon: 3
109 }, function(){ 106 }, function () {
110 layer.msg('通过'); 107 layer.msg('通过');
111 }); 108 });
112 } 109 }
113 110
114 function rollback(id, curr, all) { 111 function rollback(id, curr, dest) {
115 console.log(id, curr, all); 112 console.log(id, curr, all);
116 layer.prompt({title: '输入驳回理由', formType: 1}, function(pass, index){ 113 layer.prompt({title: '输入驳回理由', formType: 1}, function (pass, index) {
117 layer.close(index); 114 layer.close(index);
118 115 var data = {
116 "destOrderStatus": dest,
117 "opinion": pass,
118 "orderStatus": curr
119 }
119 var targetUrl = 'flow/unConfirmRollbackStatus/' + id; 120 var targetUrl = 'flow/unConfirmRollbackStatus/' + id;
120 $.ajax({ 121 $.ajax({
121 type: 'put', 122 type: 'put',
122 url: apiBaseUrl + targetUrl, 123 url: apiBaseUrl + targetUrl,
123 cache: false, 124 cache: false,
124 dataType: 'json', 125 dataType: 'json',
126 data: JSON.stringify(data),
125 contentType: "application/json; charset=UTF-8", 127 contentType: "application/json; charset=UTF-8",
126 success: function (data) { 128 success: function (data) {
127 if (data.msg) { 129 if (data.msg) {
...@@ -132,11 +134,11 @@ ...@@ -132,11 +134,11 @@
132 layer.alert('操作成功'); 134 layer.alert('操作成功');
133 } 135 }
134 setTimeout(function () { 136 setTimeout(function () {
135 if(!data.code) { 137 if (!data.code) {
136 table.fnDraw(); 138 table.fnDraw();
137 layer_close(); 139 layer_close();
138 } 140 }
139 },500); 141 }, 500);
140 }, 142 },
141 error: function () { 143 error: function () {
142 layer.alert("操作失败") 144 layer.alert("操作失败")
...@@ -147,10 +149,10 @@ ...@@ -147,10 +149,10 @@
147 149
148 function cancel(id) { 150 function cancel(id) {
149 layer.confirm('确定取消?', { 151 layer.confirm('确定取消?', {
150 btn: ['是','否'], 152 btn: ['是', '否'],
151 title: '确认', 153 title: '确认',
152 icon: 3 154 icon: 3
153 }, function(){ 155 }, function () {
154 var targetUrl = 'flow/cancelOrder/' + id; 156 var targetUrl = 'flow/cancelOrder/' + id;
155 $.ajax({ 157 $.ajax({
156 type: 'put', 158 type: 'put',
...@@ -167,11 +169,11 @@ ...@@ -167,11 +169,11 @@
167 layer.alert('请求成功'); 169 layer.alert('请求成功');
168 } 170 }
169 setTimeout(function () { 171 setTimeout(function () {
170 if(!data.code) { 172 if (!data.code) {
171 table.fnDraw(); 173 table.fnDraw();
172 layer_close(); 174 layer_close();
173 } 175 }
174 },500); 176 }, 500);
175 }, 177 },
176 error: function () { 178 error: function () {
177 layer.alert("请求失败") 179 layer.alert("请求失败")
...@@ -179,6 +181,6 @@ ...@@ -179,6 +181,6 @@
179 }) 181 })
180 }); 182 });
181 } 183 }
182 </script> 184 </script>
183 </body> 185 </body>
184 <html> 186 <html>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!