4295c038 by wang

Merge remote-tracking branch 'origin/develop' into develop

2 parents b9b183f1 8e16632f
...@@ -4,7 +4,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ...@@ -4,7 +4,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
4 class Work extends CI_Controller 4 class Work extends CI_Controller
5 { 5 {
6 6
7 public function __construct(){ 7 public function __construct()
8 {
8 parent::__construct(); 9 parent::__construct();
9 // $this->load->model(); 10 // $this->load->model();
10 } 11 }
...@@ -91,7 +92,7 @@ class Work extends CI_Controller ...@@ -91,7 +92,7 @@ class Work extends CI_Controller
91 public function detail($id = null) 92 public function detail($id = null)
92 { 93 {
93 $info = array(); 94 $info = array();
94 $url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id; 95 $url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
95 96
96 /*$context = stream_context_create(array( 97 /*$context = stream_context_create(array(
97 'http' => array( 98 'http' => array(
...@@ -111,17 +112,17 @@ class Work extends CI_Controller ...@@ -111,17 +112,17 @@ class Work extends CI_Controller
111 $ret->clientContactOutputVOS = array(); 112 $ret->clientContactOutputVOS = array();
112 } 113 }
113 114
114 $recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/'.$id; 115 $recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/' . $id;
115 $result2 = file_get_contents($recordUrl); 116 $result2 = file_get_contents($recordUrl);
116 $json2 = json_decode($result2); 117 $json2 = json_decode($result2);
117 $ret2 = $json2->data; 118 $ret2 = $json2->data;
118 119
119 $data = array( 120 $data = array(
120 'clientInfoOutputVO'=>$ret->clientInfoOutputVO, 121 'clientInfoOutputVO' => $ret->clientInfoOutputVO,
121 'clientUnitOutputVO'=>$ret->clientUnitOutputVO, 122 'clientUnitOutputVO' => $ret->clientUnitOutputVO,
122 'clientContactOutputVOS'=>$ret->clientContactOutputVOS, 123 'clientContactOutputVOS' => $ret->clientContactOutputVOS,
123 'applyOrderVO'=>$ret->applyOrderVO, 124 'applyOrderVO' => $ret->applyOrderVO,
124 'operatorRecord'=>$ret2 125 'operatorRecord' => $ret2
125 ); 126 );
126 $this->load->view('work/订单详情', $data); 127 $this->load->view('work/订单详情', $data);
127 } 128 }
...@@ -131,7 +132,7 @@ class Work extends CI_Controller ...@@ -131,7 +132,7 @@ class Work extends CI_Controller
131 */ 132 */
132 public function record($id = null) 133 public function record($id = null)
133 { 134 {
134 $url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id; 135 $url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
135 $result = file_get_contents($url); 136 $result = file_get_contents($url);
136 $json = json_decode($result); 137 $json = json_decode($result);
137 $ret = $json->data; 138 $ret = $json->data;
...@@ -142,20 +143,20 @@ class Work extends CI_Controller ...@@ -142,20 +143,20 @@ class Work extends CI_Controller
142 $ret->clientContactOutputVOS = array(); 143 $ret->clientContactOutputVOS = array();
143 } 144 }
144 145
145 $recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/'.$id; 146 $recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/' . $id;
146 $result2 = file_get_contents($recordUrl); 147 $result2 = file_get_contents($recordUrl);
147 $json2 = json_decode($result2); 148 $json2 = json_decode($result2);
148 $ret2 = $json2->data; 149 $ret2 = $json2->data;
149 150
150 $data = array( 151 $data = array(
151 'clientInfoOutputVO'=>$ret->clientInfoOutputVO, 152 'clientInfoOutputVO' => $ret->clientInfoOutputVO,
152 'clientUnitOutputVO'=>$ret->clientUnitOutputVO, 153 'clientUnitOutputVO' => $ret->clientUnitOutputVO,
153 'clientContactOutputVOS'=>$ret->clientContactOutputVOS, 154 'clientContactOutputVOS' => $ret->clientContactOutputVOS,
154 'applyOrderVO'=>$ret->applyOrderVO, 155 'applyOrderVO' => $ret->applyOrderVO,
155 'operatorRecord'=>$ret2, 156 'operatorRecord' => $ret2,
156 'id'=>$id 157 'id' => $id
157 ); 158 );
158 159
159 $this->load->view('work/资料/资料补录', $data); 160 $this->load->view('work/资料/资料补录', $data);
160 } 161 }
161 162
...@@ -166,12 +167,12 @@ class Work extends CI_Controller ...@@ -166,12 +167,12 @@ class Work extends CI_Controller
166 167
167 public function check($state = null, $id = null) 168 public function check($state = null, $id = null)
168 { 169 {
169 $url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id; 170 $url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
170 $result = file_get_contents($url); 171 $result = file_get_contents($url);
171 $json = json_decode($result); 172 $json = json_decode($result);
172 $ret = $json->data; 173 $ret = $json->data;
173 $data = array(); 174 $data = array();
174 if($ret){ 175 if ($ret) {
175 if (!$ret->clientUnitOutputVO) { 176 if (!$ret->clientUnitOutputVO) {
176 $ret->clientUnitOutputVO = array(); 177 $ret->clientUnitOutputVO = array();
177 } 178 }
...@@ -182,11 +183,11 @@ class Work extends CI_Controller ...@@ -182,11 +183,11 @@ class Work extends CI_Controller
182 $ret->applyOrderVO = array(); 183 $ret->applyOrderVO = array();
183 } 184 }
184 $data = array( 185 $data = array(
185 'clientInfoOutputVO'=>$ret->clientInfoOutputVO, 186 'clientInfoOutputVO' => $ret->clientInfoOutputVO,
186 'clientUnitOutputVO'=>$ret->clientUnitOutputVO, 187 'clientUnitOutputVO' => $ret->clientUnitOutputVO,
187 'clientContactOutputVOS'=>$ret->clientContactOutputVOS, 188 'clientContactOutputVOS' => $ret->clientContactOutputVOS,
188 'applyOrderVO'=>$ret->applyOrderVO, 189 'applyOrderVO' => $ret->applyOrderVO,
189 'id'=>$id 190 'id' => $id
190 ); 191 );
191 } 192 }
192 193
...@@ -242,7 +243,7 @@ class Work extends CI_Controller ...@@ -242,7 +243,7 @@ class Work extends CI_Controller
242 243
243 public function verify($id = null) 244 public function verify($id = null)
244 { 245 {
245 $url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id; 246 $url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
246 $result = file_get_contents($url); 247 $result = file_get_contents($url);
247 $json = json_decode($result); 248 $json = json_decode($result);
248 $ret = $json->data; 249 $ret = $json->data;
...@@ -254,10 +255,10 @@ class Work extends CI_Controller ...@@ -254,10 +255,10 @@ class Work extends CI_Controller
254 } 255 }
255 256
256 $data = array( 257 $data = array(
257 'clientInfoOutputVO'=>$ret->clientInfoOutputVO, 258 'clientInfoOutputVO' => $ret->clientInfoOutputVO,
258 'clientUnitOutputVO'=>$ret->clientUnitOutputVO, 259 'clientUnitOutputVO' => $ret->clientUnitOutputVO,
259 'clientContactOutputVOS'=>$ret->clientContactOutputVOS, 260 'clientContactOutputVOS' => $ret->clientContactOutputVOS,
260 'applyOrderVO'=>$ret->applyOrderVO 261 'applyOrderVO' => $ret->applyOrderVO
261 ); 262 );
262 $this->load->view('work/客户确认/客户确认', $data); 263 $this->load->view('work/客户确认/客户确认', $data);
263 } 264 }
...@@ -312,9 +313,15 @@ class Work extends CI_Controller ...@@ -312,9 +313,15 @@ class Work extends CI_Controller
312 313
313 public function loan($id) 314 public function loan($id)
314 { 315 {
315 316 $url = $this->config->item('apiBaseUrl') . 'flow/getWaitLoan/' . $id;
316 317 $result = file_get_contents($url);
317 $this->load->view('work/线下已放款'); 318 $json = json_decode($result);
319 $ret = $json->data;
320 $data = array(
321 'item' => $ret,
322 'id'=>$id
323 );
324 $this->load->view('work/线下已放款', $data);
318 } 325 }
319 326
320 public function data() 327 public function data()
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
91 </script> 91 </script>
92 <script> 92 <script>
93 function loan(id) { 93 function loan(id) {
94 layer_show('线下已放款', '/index.php/work/loan'); 94 layer_show('线下已放款', '/index.php/work/loan/' + id);
95 } 95 }
96 96
97 function cancel(id) { 97 function cancel(id) {
...@@ -129,6 +129,10 @@ ...@@ -129,6 +129,10 @@
129 }); 129 });
130 } 130 }
131 131
132 function reload() {
133
134 }
135
132 function rollback(id, curr, dest) { 136 function rollback(id, curr, dest) {
133 layer.prompt({title: '输入驳回理由', formType: 0}, function (pass, index) { 137 layer.prompt({title: '输入驳回理由', formType: 0}, function (pass, index) {
134 layer.close(index); 138 layer.close(index);
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
8 <div class="row cl"> 8 <div class="row cl">
9 <div class="form-group col-sm-4 col-md-2"> 9 <div class="form-group col-sm-4 col-md-2">
10 <label>申请金额</label> 10 <label>申请金额</label>
11 <input type="text" class="form-control input-text" value="" disabled> 11 <input type="text" class="form-control input-text" value="<?=$item->applyMoney?>" disabled>
12 <span class="glyphicon form-control-feedback"></span> 12 <span class="glyphicon form-control-feedback"></span>
13 </div> 13 </div>
14 <div class="form-group col-sm-4 col-md-2"> 14 <div class="form-group col-sm-4 col-md-2">
15 <label>申请期限</label> 15 <label>申请期限</label>
16 <input type="text" class="form-control input-text" value="" disabled> 16 <input type="text" class="form-control input-text" value="<?=$item->applyDeadline?>" disabled>
17 <span class="glyphicon form-control-feedback"></span> 17 <span class="glyphicon form-control-feedback"></span>
18 </div> 18 </div>
19 </div> 19 </div>
...@@ -26,22 +26,22 @@ ...@@ -26,22 +26,22 @@
26 <div class="row cl"> 26 <div class="row cl">
27 <div class="form-group col-sm-4 col-md-2"> 27 <div class="form-group col-sm-4 col-md-2">
28 <label>核批金额</label> 28 <label>核批金额</label>
29 <input type="text" class="form-control input-text" value="" disabled> 29 <input type="text" class="form-control input-text" value="<?=$item->agreeMoney?>" disabled>
30 <span class="glyphicon form-control-feedback"></span> 30 <span class="glyphicon form-control-feedback"></span>
31 </div> 31 </div>
32 <div class="form-group col-sm-4 col-md-2"> 32 <div class="form-group col-sm-4 col-md-2">
33 <label>借款期限</label> 33 <label>借款期限</label>
34 <input type="text" class="form-control input-text" value="" disabled> 34 <input type="text" class="form-control input-text" value="<?=$item->agreeDeadLine?>" disabled>
35 <span class="glyphicon form-control-feedback"></span> 35 <span class="glyphicon form-control-feedback"></span>
36 </div> 36 </div>
37 <div class="form-group col-sm-4 col-md-2"> 37 <div class="form-group col-sm-4 col-md-2">
38 <label>借款利率</label> 38 <label>借款利率</label>
39 <input type="text" class="form-control input-text" value="" disabled> 39 <input type="text" class="form-control input-text" value="<?=$item->annualInterestRate?>" disabled>
40 <span class="glyphicon form-control-feedback">%</span> 40 <span class="glyphicon form-control-feedback">%</span>
41 </div> 41 </div>
42 <div class="form-group col-sm-4 col-md-2"> 42 <div class="form-group col-sm-4 col-md-2">
43 <label>每月还款金额</label> 43 <label>每月还款金额</label>
44 <input type="text" class="form-control input-text" value="" disabled> 44 <input type="text" class="form-control input-text" value="<?=$item->agreeAnnualInterestRate?>" disabled>
45 <span class="glyphicon form-control-feedback"></span> 45 <span class="glyphicon form-control-feedback"></span>
46 </div> 46 </div>
47 </div> 47 </div>
...@@ -89,7 +89,33 @@ ...@@ -89,7 +89,33 @@
89 89
90 <script> 90 <script>
91 function pass() { 91 function pass() {
92 layer_close(); 92 var orderId = "<?=$id?>";
93 $.ajax({
94 type: 'put',
95 url: apiBaseUrl + 'flow/confirm/loan/' + orderId,
96 cache: false,
97 dataType: 'json',
98 data: JSON.stringify(data),
99 contentType: "application/json; charset=UTF-8",
100 success: function (data) {
101 if (data.msg) {
102 layer.alert(data.msg);
103 } else if (data.code != 0) {
104 layer.alert('操作失败');
105 } else {
106 layer.alert('操作成功');
107 }
108 setTimeout(function () {
109 if (!data.code) {
110 table.fnDraw();
111 layer_close();
112 }
113 }, 500);
114 },
115 error: function () {
116 layer.alert("操作失败")
117 }
118 })
93 } 119 }
94 </script> 120 </script>
95 </body> 121 </body>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!