贷后 还款管理 编辑
Showing
7 changed files
with
73 additions
and
3 deletions
| ... | @@ -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/催收编辑'); | ... | ... |
| 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 | } |
application/libraries/Enum/Enum.php
0 → 100644
| 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 | } |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment