edit-api-money_json

This commit is contained in:
lccsw
2021-11-08 16:26:17 +08:00
parent 8e75502a9c
commit db3b66e088
4 changed files with 10 additions and 10 deletions
+2
View File
@@ -106,6 +106,8 @@ class Orders extends HD_Controller
$deposit = $row['deposit'];
$jsondata = $row['jsondata'] ? json_decode($row['jsondata'], true) : array();
$row['price_discount'] = $money_json['price_discount'];
$sale_price = $money_json['price_discount'] ? $row['price']-$money_json['price_discount'] : $row['price'];
$row['sale_price'] = number_format($sale_price,2);
$row['info_json'] = json_decode($row['info_json'], true);
$row['status'] = intval($row['status']);
$row['price'] = number_format($row['price'], 2);
+4 -2
View File
@@ -24,8 +24,10 @@
<label class="am-para-label label-width"><span class="span-bold">车辆售价:</span></label>
<div class="am-para-input">
<label class="am-para-label-con">
{{info.price}}
<span class="text-danger" v-if="info.price_discount">(优惠金额:{{info.price_discount}})</span>
{{info.sale_price}}
<span class="text-danger">
(指导价:{{info.price}}<template v-if="info.price_discount">,优惠金额:{{info.price_discount}}</template>)
</span>
</label>
</div>
</div>
+3 -5
View File
@@ -183,18 +183,16 @@ class Cusorder extends Wxapp{
$info_json && $data['info_json'] = json_encode($info_json,JSON_UNESCAPED_UNICODE);
$finance_row && $data['finance_id'] = $finance_row['id'];
//获取金额json数据
$orders_entity = new Orders_entity();
$money_json = [
'price_car' => $car_row['price_car'],
'price_book' => $car_row['price_book'],
'price_insure' => $car_row['price_insure'],
'price_fine' => $car_row['price_fine'],
'price_discount' =>$disc_money ? $disc_money : 0,
'price_intention' => $inten_money ? $inten_money : 0
'price_intention' => $inten_money ? $inten_money : 0,
'price_finance' => $series_row['brand_id'] == 4 ? $orders_entity::PRICE_FINANCE_NZ : $orders_entity::PRICE_FINANCE
];
if(!$payway){
$orders_entity = new Orders_entity();
$money_json['price_insure'] = $series_row['brand_id'] == 4 ? $orders_entity::PRICE_FINANCE_NZ : $orders_entity::PRICE_FINANCE;
}
//获取挂牌价
if($series_row['brand_id']==3){ //狸车品牌写死挂牌费用0.01 测试用
$money_json['fee_carno'] = 0.01;
+1 -3
View File
@@ -223,9 +223,7 @@ class Cusorder2 extends Wxapp{
$money_json['price_fine'] = $car_row['price_fine'];
$money_json['price_discount'] = $disc_money;
$orders_entity = new Orders_entity();
if(!$payway){
$money_json['price_insure'] = $series_row['brand_id'] == 4 ? $orders_entity::PRICE_FINANCE_NZ : $orders_entity::PRICE_FINANCE;
}
$money_json['price_finance'] = $series_row['brand_id'] == 4 ? $orders_entity::PRICE_FINANCE_NZ : $orders_entity::PRICE_FINANCE;
$data['money_json'] = json_encode($money_json,JSON_UNESCAPED_UNICODE);
$result = $this->orders_model->update($data,['id'=>$row['id']]);