53b71268 by Zelig

贷后 还款管理 编辑

1 parent 5d4817be
...@@ -45,11 +45,20 @@ class Loan extends CI_Controller { ...@@ -45,11 +45,20 @@ class Loan extends CI_Controller {
45 } 45 }
46 } 46 }
47 47
48 public function edit($state = 1) 48 public function edit($state = 1, $id = null)
49 { 49 {
50 $this->load->driver('enum');
51 $this->load->driver('configure');
52
50 switch ($state) { 53 switch ($state) {
51 case 1: 54 case 1:
52 $this->load->view('/loan/还款编辑'); 55 $url = $this->config->item('apiBaseUrl') . 'loanAfter/repaymentPlan/'.$id;
56 $result = file_get_contents($url);
57 $json = json_decode($result);
58 $ret = $json->data;
59 $ret->enumRepayStatus = $this->enum->repaymentPlan->status();
60
61 $this->load->view('/loan/还款编辑', $ret);
53 break; 62 break;
54 case 2: 63 case 2:
55 $this->load->view('/loan/催收编辑'); 64 $this->load->view('/loan/催收编辑');
......
...@@ -348,4 +348,4 @@ class CheckLogin ...@@ -348,4 +348,4 @@ class CheckLogin
348 } 348 }
349 } 349 }
350 350
351 }
...\ No newline at end of file ...\ No newline at end of file
351 }
......
1 <?php
2
3 class Configure extends CI_Driver_Library {
4 public function __construct () {
5 $this->valid_drivers = ['enum'];
6 }
7 }
1 <?php
2
3 class Configure_enum extends CI_Driver
4 {
5 public $CI;
6
7 public function __construct () {
8 $this->CI = &get_instance();
9 }
10
11 public function repayment () {
12 $url = $this->CI->config->item('apiBaseUrl') . 'config/enum/repayment';
13 $result = file_get_contents($url);
14 $json = json_decode($result);
15 $ret = $json->data;
16
17 return $ret;
18 }
19 }
1 <?php
2
3 class Enum extends CI_Driver_Library {
4 public function __construct () {
5 $this->valid_drivers = ['repaymentPlan'];
6 }
7 }
1 <?php
2
3 class Enum_repaymentPlan extends CI_Driver
4 {
5 public $CI;
6
7 public function __construct () {
8 $this->CI = &get_instance();
9 }
10
11 public function status () {
12 $url = $this->CI->config->item('apiBaseUrl') . 'enum/repaymentPlan/status';
13 $result = file_get_contents($url);
14 $json = json_decode($result);
15 $ret = $json->data;
16
17 return $ret;
18 }
19
20 public function source () {
21 $url = $this->CI->config->item('apiBaseUrl') . 'enum/repaymentPlan/source';
22 $result = file_get_contents($url);
23 $json = json_decode($result);
24 $ret = $json->data;
25
26 return $ret;
27 }
28 }
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!