edit-admin-fh_agent
This commit is contained in:
@@ -674,7 +674,16 @@ class Orders extends HD_Controller
|
||||
$this->order_agents_model->update(['status' => 1], ['o_id' => $oid]);
|
||||
|
||||
$loan = $this->order_loans_model->get(['o_id' => $oid]);
|
||||
if($loan['status']==3 || $row['payway']){ //判断是否完成代办
|
||||
if($loan && !$row['payway']){ //分期
|
||||
if($loan['status']==3){ //判断是否完成代办
|
||||
$this->orders_model->update(['status' => 5], ['id' => $oid]);
|
||||
if (!$this->order_deliverys_model->count(['o_id' => $oid])) {
|
||||
$this->order_deliverys_model->add(['o_id' => $oid, 'c_time' => time]);
|
||||
}
|
||||
}else{
|
||||
return $this->show_json(SYS_CODE_FAIL, '修改失败,请先完成按揭');
|
||||
}
|
||||
}else{
|
||||
$this->orders_model->update(['status' => 5], ['id' => $oid]);
|
||||
if (!$this->order_deliverys_model->count(['o_id' => $oid])) {
|
||||
$this->order_deliverys_model->add(['o_id' => $oid, 'c_time' => time]);
|
||||
|
||||
Reference in New Issue
Block a user