diff --git a/api/controllers/wxapp/licheb/CusorderV2.php b/api/controllers/wxapp/licheb/CusorderV2.php index 85c06375..5492b1f9 100644 --- a/api/controllers/wxapp/licheb/CusorderV2.php +++ b/api/controllers/wxapp/licheb/CusorderV2.php @@ -621,10 +621,17 @@ class CusorderV2 extends Wxapp $data['loan_status'] = true; $loan_row = $this->order_loans_model->get(['o_id' => $row['id']]); - $data['notify_file'] = [ - 'src' => $loan_row['notify_file'] ? build_qiniu_image_url($loan_row['notify_file']) : '', - 'value' => $loan_row['notify_file'] ? $loan_row['notify_file'] : '' - ]; + $notify_file_list = []; + $notify_file = $loan_row['notify_file'] ? explode(',',$loan_row['notify_file']) : ''; + if($notify_file){ + foreach ($notify_file as $item) { + $notify_file_list[] = [ + 'src' => build_qiniu_image_url($item), + 'value' => $item + ]; + } + } + $data['notify_file'] = $notify_file_list; $data['lend_file'] = [ 'src' => $loan_row['lend_file'] ? build_qiniu_image_url($loan_row['lend_file']) : '', 'value' => $loan_row['lend_file'] ? $loan_row['lend_file'] : '' @@ -649,6 +656,9 @@ class CusorderV2 extends Wxapp $uid = $this->session['uid']; $keyword = $this->input_param('keyword'); $status = $this->input_param('status'); + $brand_id = $this->input_param('brand_id'); + $s_id = $this->input_param('car_id'); + $v_id = $this->input_param('v_id'); $page = $this->input_param('page'); $size = $this->input_param('size'); $type = $this->input_param('type'); @@ -677,6 +687,9 @@ class CusorderV2 extends Wxapp $where = ['status!='=>2]; } $admin_ids && $where["admin_id in ({$admin_ids})"] = null; + $brand_id && $where['brand_id'] = $brand_id; + $s_id && $where['s_id'] = $s_id; + $v_id && $where['v_id'] = $v_id; if ($group_id == 1) { $where['admin_id'] = $uid;//销售 } else if ($group_id == 2 || $group_id == 3) {//店长/老板 diff --git a/api/controllers/wxapp/licheb/Loan.php b/api/controllers/wxapp/licheb/Loan.php index 3e310bc2..964d67d4 100644 --- a/api/controllers/wxapp/licheb/Loan.php +++ b/api/controllers/wxapp/licheb/Loan.php @@ -53,7 +53,6 @@ class Loan extends Wxapp{ } $price_last = $this->app_liche_orders_model->get(['o_id'=>$oid,'type'=>3,'status'=>1]); //尾款是否支付 $last_pay = $this->app_liche_orders_model->count(['o_id'=>$oid,'pid'=>$price_last['id'],'status'=>1]); //存在已支付尾款 - if($last_pay){ if($lend_file){ $update['lend_file'] = $lend_file; @@ -74,7 +73,7 @@ class Loan extends Wxapp{ $this->orders_v2_entity->add_order($order_row['id'],$userinfo['id']); $this->orders_status_entity->set_status($oid,1,1); $update = [ - 'notify_file' => $notify_file + 'notify_file' => implode(',',$notify_file) ]; $lend_file && $update['lend_file'] = $lend_file; $num && $update['num'] = $num;