From 9c1e3935f8e86e766e584e8b18e46f536f76458a Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Mon, 5 Sep 2022 18:50:30 +0800 Subject: [PATCH] edit-liche-admin_list --- admin/libraries/Ordersv2List.php | 1 + api/controllers/plan/Biz.php | 6 ++++++ common/models/biz/Biz_settle_price_model.php | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/admin/libraries/Ordersv2List.php b/admin/libraries/Ordersv2List.php index ac0f6b21..c5b57d71 100644 --- a/admin/libraries/Ordersv2List.php +++ b/admin/libraries/Ordersv2List.php @@ -368,6 +368,7 @@ class Ordersv2List $fields['over_time'] = $val['over_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['over_time'])) : ''; $fields['refund_time'] = $val['refund_time'] != '0000-00-00 00:00:00' ? date('Y-m-d',strtotime($val['refund_time'])) : ''; $fields['vin'] = $items[$val['item_id']] ? $items[$val['item_id']] : ''; + $fields['vin'] && $fields['car_name'] = $fields['car_name']."
".$fields['vin']; if($size>1000){ $user_info = ''; diff --git a/api/controllers/plan/Biz.php b/api/controllers/plan/Biz.php index 97e17b1a..12b48387 100644 --- a/api/controllers/plan/Biz.php +++ b/api/controllers/plan/Biz.php @@ -371,6 +371,9 @@ class Biz extends HD_Controller $profix_fine = $cb; } $settle_money_json['out']['biz_price'] = $profix_fine; + //拖车费 + $truck_row = $this->biz_trucking_model->get(['auto_b_id'=>$val['brand_id'],'biz_id'=>$val['biz_id'],'status'=>1]); + $price_trucking = $truck_row['money'] ? $truck_row['money'] : 0; $add_data = [ 'biz_id' => $val['biz_id'], 'o_id' => $val['id'], @@ -378,6 +381,7 @@ class Biz extends HD_Controller 'profix_insure' => $profix_insuer, 'profix_loan' => $profix_loan, 'profix_carno' => $profix_carno, + 'price_trucking' => $price_trucking, 'profix_fine' => $money_json['price_fine_select'] - $profix_fine, 'money_json' => json_encode($settle_money_json,JSON_UNESCAPED_UNICODE), 'year' => date('Y',strtotime($val['bill_time'])), @@ -422,6 +426,7 @@ class Biz extends HD_Controller 'biz_id' => $val['biz_id'], 'profix_car' => $val['profix_car'], 'price_all' => $price_all, + 'price_trucking' => $val['price_trucking'], 'year' => $val['year'], 'month' => $val['month'], 'c_time' => time() @@ -452,6 +457,7 @@ class Biz extends HD_Controller $data = [ 'profix_car' => $static_row['profix_car'] + $val['profix_car'], 'price_all' => $static_row['price_all'] + $price_all, + 'price_trucking' => $static_row['price_trucking'] + $val['price_trucking'], ]; $res = $this->biz_settle_static_model->update($data,['id'=>$static_row['id']]); if($res){ diff --git a/common/models/biz/Biz_settle_price_model.php b/common/models/biz/Biz_settle_price_model.php index fe08f33a..ceb8f595 100644 --- a/common/models/biz/Biz_settle_price_model.php +++ b/common/models/biz/Biz_settle_price_model.php @@ -49,9 +49,14 @@ class Biz_settle_price_model extends HD_Model $jsondata = json_decode($jsondata,true); $res = 0; if($jsondata){ + $key_filter = ['num','base_employees']; foreach ($jsondata as $key=>$val) { - $res += $val; + if(!in_array($key,$key_filter)){ + $res += $val; + } } + $base_employees = $jsondata['base_employees'] * $jsondata['num']; + $res += $base_employees; } return $res; }