edit-api-order_list
This commit is contained in:
@@ -653,6 +653,7 @@ class CusorderV2 extends Wxapp{
|
||||
'付款方式' => ['type'=> 'text','value'=>$val['payway']?'全款':'分期','bg_color'=>''],
|
||||
];
|
||||
$book_is_pay = $this->app_liche_orders_model->get(['o_id'=>$val['id'],'type'=>1]); //定金
|
||||
$int_is_pay = $this->app_liche_orders_model->get(['o_id'=>$val['id'],'type'=>4]); //意向金
|
||||
$p_row = $this->app_liche_orders_model->get(['o_id'=>$val['id'],'pid'=>0],'id'); //父订单
|
||||
$last_row = $this->app_liche_orders_model->get(['o_id'=>$val['id'],'pid'=>$p_row['id'],'type'=>3],'id'); //尾款订单
|
||||
//除去尾款已支付金额
|
||||
@@ -662,6 +663,10 @@ class CusorderV2 extends Wxapp{
|
||||
$is_pay_price = $total_pay['total_price'] + $last_pay['total_price'];
|
||||
$need_pay = $this->orders_v2_entity->recevable_price($val['id'],false); //需要支付车款
|
||||
$need_last_pay = $need_pay - $money_json['price_book'];
|
||||
if($int_is_pay['status']){
|
||||
$price_book_text = $int_is_pay['total_price']."(已支付)";
|
||||
$other_data['意向金金额'] = ['type'=> 'text','value'=>$price_book_text,'bg_color'=>''];
|
||||
}
|
||||
if($book_is_pay){
|
||||
$book_is_pay_text = $book_is_pay['status'] ? '已支付':'未支付';
|
||||
$price_book_text = $money_json['price_book']."($book_is_pay_text)";
|
||||
@@ -671,7 +676,7 @@ class CusorderV2 extends Wxapp{
|
||||
$last_text = $need_last_pay."($last_is_pay_text)";
|
||||
$other_data['尾款金额'] = ['type'=> 'text','value'=>$last_text,'bg_color'=>''];
|
||||
|
||||
if($book_is_pay['status'] || $this->app_liche_orders_model->count(['o_id'=>$val['id'],'type'=>6,'status'=>1])){
|
||||
if($int_is_pay['status'] || $book_is_pay['status'] || $this->app_liche_orders_model->count(['o_id'=>$val['id'],'type'=>6,'status'=>1])){
|
||||
if(!$val['payway']){
|
||||
$other_data['分期办理'] = ['type'=> 'text','value'=>$this->orders_status_entity->status_cn($val['id'],1),'bg_color'=>''];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user