cusorderV2_831
This commit is contained in:
@@ -518,7 +518,7 @@ class CusorderV2 extends Wxapp
|
||||
'value' => sprintf("%.2f", $orders_entity->total_price($row['id']))
|
||||
];
|
||||
//服务费
|
||||
$srv_data = $orders_entity->order_srv_money($row['id'], 1,0);
|
||||
$srv_data = $orders_entity->order_srv_money($row['id'], 1, 0);
|
||||
if ($srv_data['total'] > 0) {
|
||||
$car_data['委托代办']['value'] = sprintf("%.2f", $srv_data['total']);
|
||||
foreach ($srv_data['list'] as $val) {
|
||||
@@ -529,10 +529,10 @@ class CusorderV2 extends Wxapp
|
||||
if ($fines) {
|
||||
$fines_list = [];
|
||||
foreach ($fines as $item) {
|
||||
$fines_list['list'][$item['txt']] = $item['price']>0 ? sprintf("%.2f", $item['price']) : '赠送';
|
||||
$fines_list['list'][$item['txt']] = $item['price'] > 0 ? sprintf("%.2f", $item['price']) : '赠送';
|
||||
}
|
||||
$car_data['精品选装'] = $fines_list;
|
||||
$car_data['精品选装']['value'] = sprintf("%.2f",$money_json['price_fine_select']);
|
||||
$car_data['精品选装']['value'] = sprintf("%.2f", $money_json['price_fine_select']);
|
||||
}
|
||||
$car_data['需开具本地发票'] = $row['if_local_bill'] ? '需要' : '不需要';
|
||||
}
|
||||
@@ -658,16 +658,15 @@ class CusorderV2 extends Wxapp
|
||||
!$page && $page = 1;
|
||||
!$size && $size = 10;
|
||||
|
||||
$where = [
|
||||
'status>=' => 0,
|
||||
'biz_id' => $this->biz_id,
|
||||
];
|
||||
|
||||
$group_id == 1 && $where['admin_id'] = $uid;//销售
|
||||
if ($group_id == 4 && $this->biz_id != 1) {
|
||||
$where['brand_id!='] = 3; //渠道经理过滤
|
||||
$where = ['status>=' => 0];
|
||||
if ($group_id == 1) {
|
||||
$where['admin_id'] = $uid;//销售
|
||||
} else if ($group_id == 2 || $group_id == 3) {//店长/老板
|
||||
$where["biz_id = {$this->biz_id} or admin_id = {$uid}"] = null;
|
||||
} else if ($group_id == 4) {
|
||||
$where['biz_id'] = $this->biz_id;
|
||||
$this->biz_id != 1 && $where['brand_id!='] = 3; //渠道经理过滤
|
||||
}
|
||||
|
||||
if ($keyword) {
|
||||
$where["(name='{$keyword}' or owner_name='{$keyword}')"] = null;
|
||||
}
|
||||
@@ -785,27 +784,27 @@ class CusorderV2 extends Wxapp
|
||||
$need_pay = $this->orders_v2_entity->recevable_price($val['id'], false); //需要支付车款
|
||||
$need_last_pay = $book_is_pay ? $need_pay - $money_json['price_book'] : $need_pay;
|
||||
if ($int_is_pay['status']) {
|
||||
$price_book_text = number_format($int_is_pay['total_price'],2) . "(已支付)";
|
||||
$price_book_text = number_format($int_is_pay['total_price'], 2) . "(已支付)";
|
||||
$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 = number_format($money_json['price_book'],2) . "($book_is_pay_text)";
|
||||
$price_book_text = number_format($money_json['price_book'], 2) . "($book_is_pay_text)";
|
||||
$other_data['定金金额'] = ['type' => 'text', 'value' => $price_book_text, 'bg_color' => ''];
|
||||
}
|
||||
if($ht_pay['total_price']){
|
||||
$ht_price = number_format($ht_pay['total_price'],2);
|
||||
if ($ht_pay['total_price']) {
|
||||
$ht_price = number_format($ht_pay['total_price'], 2);
|
||||
$other_data['车款金额'] = ['type' => 'text', 'value' => "{$ht_price}(已支付)", 'bg_color' => ''];
|
||||
$need_last_pay -= $ht_pay['total_price'];
|
||||
}
|
||||
if($need_last_pay){
|
||||
if ($need_last_pay) {
|
||||
$last_is_pay_text = $is_pay_price >= $need_pay ? '已支付' : '未支付';
|
||||
$last_text = number_format($need_last_pay,2) . "($last_is_pay_text)";
|
||||
$last_text = number_format($need_last_pay, 2) . "($last_is_pay_text)";
|
||||
$other_data['尾款金额'] = ['type' => 'text', 'value' => $last_text, 'bg_color' => ''];
|
||||
}
|
||||
if ($srv_is_pay) {
|
||||
$last_is_pay_text = $srv_is_pay['status'] ? '已支付' : '未支付';
|
||||
$srv_text = number_format($srv_is_pay['total_price'],2) . "($last_is_pay_text)";
|
||||
$srv_text = number_format($srv_is_pay['total_price'], 2) . "($last_is_pay_text)";
|
||||
$other_data['服务费'] = ['type' => 'text', 'value' => $srv_text, 'bg_color' => ''];
|
||||
}
|
||||
if ($int_is_pay['status'] || $book_is_pay['status'] || $this->app_liche_orders_model->count(['o_id' => $val['id'], 'type' => 6, 'status' => 1])) {
|
||||
|
||||
Reference in New Issue
Block a user