edit-admin-pay_log

This commit is contained in:
lccsw
2022-07-27 13:57:59 +08:00
parent 5d578b0b81
commit 82cb12a9e1
2 changed files with 8 additions and 9 deletions
@@ -754,7 +754,7 @@ class Orders extends HD_Controller
}
}
$sum = $this->app_liche_orders_model->sum('total_price', ['o_id'=>$params['id'],'status'=>1,'pay_price <>'=>0]);
$this->data['pay_price'] = $sum['total_price'];
$this->data['pay_price'] = $sum['total_price'] ? $sum['total_price'] : 0;
$this->data['need_price'] = $this->orders_v2_entity->recevable_price($params['id']);
$this->data['list'] = $list;
$hasNext = ceil($count / $size) > $page ? 1 : 0;
@@ -815,9 +815,9 @@ class Orders extends HD_Controller
$last_p_row = $this->app_liche_orders_model->get(['o_id'=>$row['id'],'type'=>3,'pid'=>$p_row['id'],'status>='=>0]); //尾款父订单
if($type==6){ //尾款
if($money>$car_price){
return $this->show_json(SYS_CODE_FAIL, '车款金额错误');
}
// if($money>$car_price){
// return $this->show_json(SYS_CODE_FAIL, '车款金额错误');
// }
$this->app_liche_orders_model->update(['status'=>-1],['o_id'=>$row['id'],'status'=>0,'type'=>1]); //定金更新成无效订单
$money_json = json_decode($row['money_json'],true);
$last_pay_count = $this->app_liche_orders_model->count(['pid'=>$last_p_row['id'],'type'=>3,'status'=>1]);//尾款支付订单
@@ -826,9 +826,9 @@ class Orders extends HD_Controller
$this->app_liche_orders_model->update(['status'=>-1],['o_id'=>$row['id'],'type'=>3]); //尾款更新成无效订单
}
}else{ //服务费
if($money>$srv_price){
return $this->show_json(SYS_CODE_FAIL, '服务费金额错误');
}
// if($money>$srv_price){
// return $this->show_json(SYS_CODE_FAIL, '服务费金额错误');
// }
$this->app_liche_orders_model->update(['status'=>-1],['o_id'=>$row['id'],'type'=>2,'status'=>0]); //未支付更新成无效订单
}
$this->load->helper('order');
@@ -869,7 +869,6 @@ class Orders extends HD_Controller
'status'=>1,
'o_id'=>$row['id'],
'pid>'=>0,
'type!=' => 7
];
$last_p_row && $where['id <>'] = $last_p_row['id'];
$is_pay = $this->app_liche_orders_model->sum('total_price',$where); //已支付金额
+1 -1
View File
@@ -51,7 +51,7 @@
</ul>
</nav>
</div>
<div class="align-r ml15" v-if="pay_price">应收总额:{{need_price}},已收总额:{{pay_price}}&nbsp&nbsp</div>
<div class="align-r ml15" v-if="need_price">应收总额:{{need_price}},已收总额:{{pay_price}}&nbsp&nbsp</div>
</div>
</div>