edit-admin-fh_agent

This commit is contained in:
lccsw
2021-10-28 09:58:24 +08:00
parent 7a2fe961fd
commit 07df6b5031
+10 -1
View File
@@ -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]);