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>
8 <input class="btn btn-primary radius" type="submit" value="提交搜索"> 8 <input class="btn btn-primary radius" type="submit" value="提交搜索">
9 <input class="btn btn-warning radius" type="reset" value="重置搜索"> 9 <input class="btn btn-warning radius" type="reset" value="重置搜索">
10 </div> 10 </div>
11 </form> 11 </form>
12 12
13 <div class="body mt-20"> 13 <div class="body mt-20">
14 <table class="table table-border table-bordered table-bg" id="table" url="/order/getStatus7"> 14 <table class="table table-border table-bordered table-bg" id="table" url="/order/getStatus7">
15 <thead class="text-c"> 15 <thead class="text-c">
16 <tr> 16 <tr>
17 <th width="15px"><input type="checkbox"></th> 17 <th width="15px"><input type="checkbox"></th>
18 <th width="68px">操作</th> 18 <th width="68px">操作</th>
19 <th>订单编号</th> 19 <th>订单编号</th>
20 <th>申请人</th> 20 <th>申请人</th>
21 <th>身份证</th> 21 <th>身份证</th>
22 <th>手机号</th> 22 <th>手机号</th>
23 <th>进件时间</th> 23 <th>进件时间</th>
24 <th>网点</th> 24 <th>网点</th>
25 <th>产品名称</th> 25 <th>产品名称</th>
26 <th>申请金额</th> 26 <th>申请金额</th>
27 <th>审批金额</th> 27 <th>审批金额</th>
28 <th>客户经理</th> 28 <th>客户经理</th>
29 <th>流程节点</th> 29 <th>流程节点</th>
30 <th>流转时间</th> 30 <th>流转时间</th>
31 <th>处理人</th> 31 <th>处理人</th>
32 </tr> 32 </tr>
33 </thead> 33 </thead>
34 <tbody class="text-c"> 34 <tbody class="text-c">
35 35
36 </tbody> 36 </tbody>
37 </table> 37 </table>
38 </div>
39 </div> 38 </div>
40 <?php $this->load->view('common/footer'); ?> 39 </div>
41 <script> 40 <?php $this->load->view('common/footer'); ?>
42 var table = $('#table').dataTable({ 41 <script>
43 columns: [ 42 var table = $('#table').dataTable({
44 { 43 columns: [
45 // data: "id", 44 {
46 render:function (data, type, full) { 45 // data: "id",
47 return '<input value="'+data+'" type="checkbox">'; 46 render: function (data, type, full) {
48 } 47 return '<input value="' + data + '" type="checkbox">';
49 }, 48 }
50 { 49 },
51 data: "id", render: function (data, type, full) { 50 {
51 data: "id", render: function (data, type, full) {
52 /*<li><a href="#">退至【资料补录】阶段</a></li> 52 /*<li><a href="#">退至【资料补录】阶段</a></li>
53 <li><a href="#">退至【审批-初审】阶段</a></li> 53 <li><a href="#">退至【审批-初审】阶段</a></li>
54 <li><a href="#">退至【审批-复审】阶段</a></li> 54 <li><a href="#">退至【审批-复审】阶段</a></li>
...@@ -56,129 +56,131 @@ ...@@ -56,129 +56,131 @@
56 <li><a href="#">退至【尽调】阶段</a></li> 56 <li><a href="#">退至【尽调】阶段</a></li>
57 <li><a href="#">退至【客户确认】阶段</a></li> 57 <li><a href="#">退至【客户确认】阶段</a></li>
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 {data: "orderNo"},//订单编号
84 {data: "userName"},//申请人
85 {data: "idCard"},//身份证
86 {data: "phoneNumber"},//手机号
87 {data: "createTime"},//进件时间
88 {name: "departmentId", data: "departmentName"},//网点
89 {name: "productId", data: "productName"},//产品名称
90 {data: "applyMoney"},//申请金额
91 {data: "agreeMoney"},//审批金额
92 {name: "createUser", data: "createUserName"},//客户经理
93 {name: "status", data: "statusDesc"},//流程节点
94 {data: "modifyTime"},//流转时间
95 {name: "modifyUser", data: "modifyUserName"}, //处理人
96 ]
97 });
98 </script>
81 99
100 <script>
101 function pass(id) {
102 layer.confirm('通过之后, 将立即进入审批阶段', {
103 btn: ['确认通过', '取消'],
104 title: '确认通过预审',
105 icon: 3
106 }, function () {
107 layer.msg('通过');
108 });
109 }
82 110
83 111 function rollback(id, curr, dest) {
112 console.log(id, curr, all);
113 layer.prompt({title: '输入驳回理由', formType: 1}, function (pass, index) {
114 layer.close(index);
115 var data = {
116 "destOrderStatus": dest,
117 "opinion": pass,
118 "orderStatus": curr
119 }
120 var targetUrl = 'flow/unConfirmRollbackStatus/' + id;
121 $.ajax({
122 type: 'put',
123 url: apiBaseUrl + targetUrl,
124 cache: false,
125 dataType: 'json',
126 data: JSON.stringify(data),
127 contentType: "application/json; charset=UTF-8",
128 success: function (data) {
129 if (data.msg) {
130 layer.alert(data.msg);
131 } else if (data.code != 0) {
132 layer.alert('操作失败');
133 } else {
134 layer.alert('操作成功');
84 } 135 }
136 setTimeout(function () {
137 if (!data.code) {
138 table.fnDraw();
139 layer_close();
140 }
141 }, 500);
85 }, 142 },
86 {data: "orderNo"},//订单编号 143 error: function () {
87 {data: "userName"},//申请人 144 layer.alert("操作失败")
88 {data: "idCard"},//身份证 145 }
89 {data: "phoneNumber"},//手机号 146 })
90 {data: "createTime"},//进件时间
91 {name: "departmentId", data: "departmentName"},//网点
92 {name: "productId", data: "productName"},//产品名称
93 {data: "applyMoney"},//申请金额
94 {data: "agreeMoney"},//审批金额
95 {name: "createUser", data: "createUserName"},//客户经理
96 {name: "status", data: "statusDesc"},//流程节点
97 {data: "modifyTime"},//流转时间
98 {name: "modifyUser", data: "modifyUserName"}, //处理人
99 ]
100 }); 147 });
101 </script> 148 }
102 149
103 <script> 150 function cancel(id) {
104 function pass(id) { 151 layer.confirm('确定取消?', {
105 layer.confirm('通过之后, 将立即进入审批阶段', { 152 btn: ['是', '否'],
106 btn: ['确认通过','取消'], 153 title: '确认',
107 title: '确认通过预审', 154 icon: 3
108 icon: 3 155 }, function () {
109 }, function(){ 156 var targetUrl = 'flow/cancelOrder/' + id;
110 layer.msg('通过'); 157 $.ajax({
111 }); 158 type: 'put',
112 } 159 url: apiBaseUrl + targetUrl,
113 160 cache: false,
114 function rollback(id, curr, all) { 161 dataType: 'json',
115 console.log(id, curr, all); 162 contentType: "application/json; charset=UTF-8",
116 layer.prompt({title: '输入驳回理由', formType: 1}, function(pass, index){ 163 success: function (data) {
117 layer.close(index); 164 if (data.msg) {
118 165 layer.alert(data.msg);
119 var targetUrl = 'flow/unConfirmRollbackStatus/' + id; 166 } else if (data.code != 0) {
120 $.ajax({ 167 layer.alert('请求失败');
121 type: 'put', 168 } else {
122 url: apiBaseUrl + targetUrl, 169 layer.alert('请求成功');
123 cache: false,
124 dataType: 'json',
125 contentType: "application/json; charset=UTF-8",
126 success: function (data) {
127 if (data.msg) {
128 layer.alert(data.msg);
129 } else if (data.code != 0) {
130 layer.alert('操作失败');
131 } else {
132 layer.alert('操作成功');
133 }
134 setTimeout(function () {
135 if(!data.code) {
136 table.fnDraw();
137 layer_close();
138 }
139 },500);
140 },
141 error: function () {
142 layer.alert("操作失败")
143 } 170 }
144 }) 171 setTimeout(function () {
145 }); 172 if (!data.code) {
146 } 173 table.fnDraw();
147 174 layer_close();
148 function cancel(id) {
149 layer.confirm('确定取消?', {
150 btn: ['是','否'],
151 title: '确认',
152 icon: 3
153 }, function(){
154 var targetUrl = 'flow/cancelOrder/' + id;
155 $.ajax({
156 type: 'put',
157 url: apiBaseUrl + targetUrl,
158 cache: false,
159 dataType: 'json',
160 contentType: "application/json; charset=UTF-8",
161 success: function (data) {
162 if (data.msg) {
163 layer.alert(data.msg);
164 } else if (data.code != 0) {
165 layer.alert('请求失败');
166 } else {
167 layer.alert('请求成功');
168 } 175 }
169 setTimeout(function () { 176 }, 500);
170 if(!data.code) { 177 },
171 table.fnDraw(); 178 error: function () {
172 layer_close(); 179 layer.alert("请求失败")
173 } 180 }
174 },500); 181 })
175 }, 182 });
176 error: function () { 183 }
177 layer.alert("请求失败") 184 </script>
178 }
179 })
180 });
181 }
182 </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!