edit-liche-pay_status
This commit is contained in:
@@ -694,6 +694,7 @@ class Orders extends HD_Controller
|
||||
$descrip && $data['descrip'] = $descrip;
|
||||
$this->app_liche_orders_model->add($data);
|
||||
if($this->app_liche_orders_model->count(['status'=>1,'o_id'=>$row['id']])==1 && $money>=100){ //企业微信推送
|
||||
$this->orders_status_entity->set_status($row['id'],0,1);
|
||||
if(date('Y-m-d',strtotime($pay_time))==date('Y-m-d')){ //当天
|
||||
$this->qyrobot->deposit_notify_v2($row['id']);
|
||||
}else{
|
||||
@@ -710,7 +711,7 @@ class Orders extends HD_Controller
|
||||
$is_pay = $this->app_liche_orders_model->sum('total_price',$where); //已支付金额
|
||||
if($need_price && $is_pay['total_price']>=$need_price){ //完成支付
|
||||
$last_p_row && $this->app_liche_orders_model->update(['status'=>1],['id'=>$last_p_row['id']]);//完成未支付尾款
|
||||
$this->orders_status_entity->set_status($row['id'],0,1);
|
||||
$this->orders_status_entity->set_status($row['id'],0,2);
|
||||
}
|
||||
if(!$this->order_contracts_model->count(['o_id'=>$row['id']])){ //生成合同
|
||||
$url = http_host_com('api').'/pdfapi/add_pdf?oid='.$row['id'];
|
||||
|
||||
@@ -185,7 +185,6 @@ class Cusorderdata extends Wxapp{
|
||||
}
|
||||
$res = $this->receiver_order_datas_model->update($update,['o_id'=>$id]);
|
||||
if($res){
|
||||
$this->orders_status_entity->set_status($id,0,1);
|
||||
throw new Exception('修改成功', API_CODE_SUCCESS);
|
||||
}else{
|
||||
throw new Exception('修改失败', ERR_PARAMS_ERROR);
|
||||
|
||||
@@ -13,7 +13,7 @@ class Receiver_order_status_model extends HD_Model
|
||||
private $table_name = 'lc_receiver_order_status';
|
||||
|
||||
private $status_arr = [
|
||||
0 => [0 => '待付款', 1 => '已付款'], //付款
|
||||
0 => [0 => '待付款', 1=>'已下定', 2 => '已付款'], //付款
|
||||
1 => [0 => '分期办理中', 1 => '等待放款',2 => '完成按揭'], //分期
|
||||
2 => [0 => '待分配', 1 => '已配车' ], //配车
|
||||
3 => [0 => '待开票', 1 => '已开票'], //开票
|
||||
@@ -36,7 +36,7 @@ class Receiver_order_status_model extends HD_Model
|
||||
*/
|
||||
public function statusAry($status = '')
|
||||
{
|
||||
$status_ary[0] = array('name' => '付款', 'show' => true, 'list' => array(0 => '未付款', 1 => '已付款'),
|
||||
$status_ary[0] = array('name' => '付款', 'show' => true, 'list' => array(0 => '未付款' ,1 => '已下定', 2 => '已付款'),
|
||||
'menu_list' => array(0 => '未付款', 1 => '已付款'), 'menu_default' => 0,'pid_status'=>0);
|
||||
$status_ary[1] = array('name' => '分期办理', 'show' => true, 'list' => array(0 => '分期办理中', 1 => '等待放款' , 2 => '完成按揭'),
|
||||
'menu_list' => array(0 => '分期办理中', 1 => '等待放款' , 2 => '完成按揭'), 'menu_default' => 0,'pid_status'=>1);
|
||||
|
||||
@@ -295,10 +295,11 @@ class Payment_service extends HD_Service{
|
||||
$last_p_row && $where['id <>'] = $last_p_row['id'];
|
||||
$is_pay = $this->app_liche_orders_model->sum('total_price',$where); //已支付金额
|
||||
$this->load->library('receiver/orders_v2_entity');
|
||||
$this->load->library('receiver/orders_status_entity');
|
||||
$this->orders_status_entity->set_status($order['o_id'],0,1);
|
||||
$need_pay_money = $this->orders_v2_entity->recevable_price($order['o_id']);
|
||||
if($need_pay_money && $is_pay['total_price']>=$need_pay_money){ //完成支付
|
||||
$this->load->library('receiver/orders_status_entity');
|
||||
$this->orders_status_entity->set_status($order['o_id'],0,1);
|
||||
$this->orders_status_entity->set_status($order['o_id'],0,2);
|
||||
}
|
||||
return array('code'=>1,'msg'=>'操作成功');
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user