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');
class Work extends CI_Controller
{
public function __construct(){
public function __construct()
{
parent::__construct();
// $this->load->model();
}
......@@ -91,7 +92,7 @@ class Work extends CI_Controller
public function detail($id = null)
{
$info = array();
$url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id;
$url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
/*$context = stream_context_create(array(
'http' => array(
......@@ -111,17 +112,17 @@ class Work extends CI_Controller
$ret->clientContactOutputVOS = array();
}
$recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/'.$id;
$recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/' . $id;
$result2 = file_get_contents($recordUrl);
$json2 = json_decode($result2);
$ret2 = $json2->data;
$data = array(
'clientInfoOutputVO'=>$ret->clientInfoOutputVO,
'clientUnitOutputVO'=>$ret->clientUnitOutputVO,
'clientContactOutputVOS'=>$ret->clientContactOutputVOS,
'applyOrderVO'=>$ret->applyOrderVO,
'operatorRecord'=>$ret2
'clientInfoOutputVO' => $ret->clientInfoOutputVO,
'clientUnitOutputVO' => $ret->clientUnitOutputVO,
'clientContactOutputVOS' => $ret->clientContactOutputVOS,
'applyOrderVO' => $ret->applyOrderVO,
'operatorRecord' => $ret2
);
$this->load->view('work/订单详情', $data);
}
......@@ -131,7 +132,7 @@ class Work extends CI_Controller
*/
public function record($id = null)
{
$url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id;
$url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
$result = file_get_contents($url);
$json = json_decode($result);
$ret = $json->data;
......@@ -142,20 +143,20 @@ class Work extends CI_Controller
$ret->clientContactOutputVOS = array();
}
$recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/'.$id;
$recordUrl = $this->config->item('apiBaseUrl') . 'order/orderOperatorRecord/' . $id;
$result2 = file_get_contents($recordUrl);
$json2 = json_decode($result2);
$ret2 = $json2->data;
$data = array(
'clientInfoOutputVO'=>$ret->clientInfoOutputVO,
'clientUnitOutputVO'=>$ret->clientUnitOutputVO,
'clientContactOutputVOS'=>$ret->clientContactOutputVOS,
'applyOrderVO'=>$ret->applyOrderVO,
'operatorRecord'=>$ret2,
'id'=>$id
'clientInfoOutputVO' => $ret->clientInfoOutputVO,
'clientUnitOutputVO' => $ret->clientUnitOutputVO,
'clientContactOutputVOS' => $ret->clientContactOutputVOS,
'applyOrderVO' => $ret->applyOrderVO,
'operatorRecord' => $ret2,
'id' => $id
);
$this->load->view('work/资料/资料补录', $data);
}
......@@ -166,12 +167,12 @@ class Work extends CI_Controller
public function check($state = null, $id = null)
{
$url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id;
$url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
$result = file_get_contents($url);
$json = json_decode($result);
$ret = $json->data;
$data = array();
if($ret){
if ($ret) {
if (!$ret->clientUnitOutputVO) {
$ret->clientUnitOutputVO = array();
}
......@@ -182,11 +183,11 @@ class Work extends CI_Controller
$ret->applyOrderVO = array();
}
$data = array(
'clientInfoOutputVO'=>$ret->clientInfoOutputVO,
'clientUnitOutputVO'=>$ret->clientUnitOutputVO,
'clientContactOutputVOS'=>$ret->clientContactOutputVOS,
'applyOrderVO'=>$ret->applyOrderVO,
'id'=>$id
'clientInfoOutputVO' => $ret->clientInfoOutputVO,
'clientUnitOutputVO' => $ret->clientUnitOutputVO,
'clientContactOutputVOS' => $ret->clientContactOutputVOS,
'applyOrderVO' => $ret->applyOrderVO,
'id' => $id
);
}
......@@ -242,7 +243,7 @@ class Work extends CI_Controller
public function verify($id = null)
{
$url = $this->config->item('apiBaseUrl') . 'order/detail/'.$id;
$url = $this->config->item('apiBaseUrl') . 'order/detail/' . $id;
$result = file_get_contents($url);
$json = json_decode($result);
$ret = $json->data;
......@@ -254,10 +255,10 @@ class Work extends CI_Controller
}
$data = array(
'clientInfoOutputVO'=>$ret->clientInfoOutputVO,
'clientUnitOutputVO'=>$ret->clientUnitOutputVO,
'clientContactOutputVOS'=>$ret->clientContactOutputVOS,
'applyOrderVO'=>$ret->applyOrderVO
'clientInfoOutputVO' => $ret->clientInfoOutputVO,
'clientUnitOutputVO' => $ret->clientUnitOutputVO,
'clientContactOutputVOS' => $ret->clientContactOutputVOS,
'applyOrderVO' => $ret->applyOrderVO
);
$this->load->view('work/客户确认/客户确认', $data);
}
......@@ -312,9 +313,15 @@ class Work extends CI_Controller
public function loan($id)
{
$this->load->view('work/线下已放款');
$url = $this->config->item('apiBaseUrl') . 'flow/getWaitLoan/' . $id;
$result = file_get_contents($url);
$json = json_decode($result);
$ret = $json->data;
$data = array(
'item' => $ret,
'id'=>$id
);
$this->load->view('work/线下已放款', $data);
}
public function data()
......
......@@ -91,7 +91,7 @@
</script>
<script>
function loan(id) {
layer_show('线下已放款', '/index.php/work/loan');
layer_show('线下已放款', '/index.php/work/loan/' + id);
}
function cancel(id) {
......@@ -129,6 +129,10 @@
});
}
function reload() {
}
function rollback(id, curr, dest) {
layer.prompt({title: '输入驳回理由', formType: 0}, function (pass, index) {
layer.close(index);
......
......@@ -8,12 +8,12 @@
<div class="row cl">
<div class="form-group col-sm-4 col-md-2">
<label>申请金额</label>
<input type="text" class="form-control input-text" value="" disabled>
<input type="text" class="form-control input-text" value="<?=$item->applyMoney?>" disabled>
<span class="glyphicon form-control-feedback"></span>
</div>
<div class="form-group col-sm-4 col-md-2">
<label>申请期限</label>
<input type="text" class="form-control input-text" value="" disabled>
<input type="text" class="form-control input-text" value="<?=$item->applyDeadline?>" disabled>
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
......@@ -26,22 +26,22 @@
<div class="row cl">
<div class="form-group col-sm-4 col-md-2">
<label>核批金额</label>
<input type="text" class="form-control input-text" value="" disabled>
<input type="text" class="form-control input-text" value="<?=$item->agreeMoney?>" disabled>
<span class="glyphicon form-control-feedback"></span>
</div>
<div class="form-group col-sm-4 col-md-2">
<label>借款期限</label>
<input type="text" class="form-control input-text" value="" disabled>
<input type="text" class="form-control input-text" value="<?=$item->agreeDeadLine?>" disabled>
<span class="glyphicon form-control-feedback"></span>
</div>
<div class="form-group col-sm-4 col-md-2">
<label>借款利率</label>
<input type="text" class="form-control input-text" value="" disabled>
<input type="text" class="form-control input-text" value="<?=$item->annualInterestRate?>" disabled>
<span class="glyphicon form-control-feedback">%</span>
</div>
<div class="form-group col-sm-4 col-md-2">
<label>每月还款金额</label>
<input type="text" class="form-control input-text" value="" disabled>
<input type="text" class="form-control input-text" value="<?=$item->agreeAnnualInterestRate?>" disabled>
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
......@@ -89,7 +89,33 @@
<script>
function pass() {
layer_close();
var orderId = "<?=$id?>";
$.ajax({
type: 'put',
url: apiBaseUrl + 'flow/confirm/loan/' + orderId,
cache: false,
dataType: 'json',
data: JSON.stringify(data),
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.alert('操作成功');
}
setTimeout(function () {
if (!data.code) {
table.fnDraw();
layer_close();
}
}, 500);
},
error: function () {
layer.alert("操作失败")
}
})
}
</script>
</body>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!