From 8e147abdc2cdc1b47f201aa720b36f7313574c5a Mon Sep 17 00:00:00 2001
From: lcc <1127794702@qq.com>
Date: Wed, 5 Jun 2024 18:51:25 +0800
Subject: [PATCH] 20240605
---
admin/controllers/receiver/Orders.php | 311 +--------
admin/libraries/OrdersList.php | 76 +--
admin/views/receiver/order/get/ckinfo.php | 357 ++++++++++
admin/views/receiver/order/get/index.php | 638 ++++++++++++++++++
admin/views/receiver/order/get/loaninfo.php | 34 +
admin/views/receiver/order/get/oinfo.php | 96 +++
admin/views/receiver/order/lists.php | 14 +-
api/controllers/wxapp/licheb/Sign.php | 5 +-
.../receiver/Receiver_customers_model.php | 4 +-
.../receiver/order/Receiver_orders_model.php | 9 +-
10 files changed, 1174 insertions(+), 370 deletions(-)
create mode 100644 admin/views/receiver/order/get/ckinfo.php
create mode 100644 admin/views/receiver/order/get/index.php
create mode 100644 admin/views/receiver/order/get/loaninfo.php
create mode 100644 admin/views/receiver/order/get/oinfo.php
diff --git a/admin/controllers/receiver/Orders.php b/admin/controllers/receiver/Orders.php
index 3bc9d72c..a2e601fa 100644
--- a/admin/controllers/receiver/Orders.php
+++ b/admin/controllers/receiver/Orders.php
@@ -240,7 +240,7 @@ class Orders extends HD_Controller
{
$id = $this->input->get('id');
- $row = $this->receiver_orders_v2_model->get(['id' => $id]);
+ $row = $this->receiver_orders_model->get(['id' => $id]);
$customers = $this->customers_model->get(['id' => $row['customer_id']]);
if (!$row) {
return $this->show_json(SYS_CODE_FAIL, '订单不存在!');
@@ -251,247 +251,43 @@ class Orders extends HD_Controller
$customers['of2_id'] && $of_title .= '-' . $of_ary['list'][$customers['of2_id']];
$row['of_title'] = $of_title;
}
- $money_json = json_decode($row['money_json'], true);
- $deposit = $money_json['price_book'];
+ $row['money_json'] = json_decode($row['money_json'], true);
$jsondata = $row['jsondata'] ? json_decode($row['jsondata'], true) : array();
- $row['price_discount'] = $money_json['price_discount'];
- //售价详细信息
- $sale_detail = "指导价:" . number_format($money_json['price_car'], 2);
- $money_json['price_discount'] && $sale_detail .= ',优惠金额:' . number_format($money_json['price_discount'], 2);
- $money_json['price_color'] && $sale_detail .= ',颜色加价:' . number_format($money_json['price_color'], 2);
- $money_json['price_coplus'] && $sale_detail .= ',公司加价:' . number_format($money_json['price_coplus'], 2);
- $row['sale_detail'] = $sale_detail;
- $sale_price = $this->orders_v2_entity->total_price($row['id']);
- $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($money_json['price_car'], 2);
- $row['deposit'] = number_format($deposit, 2);
$row['c_time'] = date('Y-m-d', $row['c_time']);
$row['payway'] = intval($row['payway']);
- $row['item_id'] = intval($row['item_id']);
- $row['cardid'] = $row['info_json']['c_cardid'] ? $row['info_json']['c_cardid'] : '';
- $row['address'] = $row['info_json']['c_address'] ? $row['info_json']['c_address'] : '';
- $row['owner_cardid'] = $row['info_json']['c_owner_cardid'] ? $row['info_json']['c_owner_cardid'] : '';
- $row['credit'] = $row['info_json']['c_credit'] ? $row['info_json']['c_credit'] : '';
- $row['company'] = $row['info_json']['c_company'] ? $row['info_json']['c_company'] : '';
- $row['car_city_name'] = '';
- if ($row['info_json']['car_city_id']) {
- $city_row = $this->sys_area_model->get(['city_id' => $row['info_json']['car_city_id']], 'city_name');
- $row['car_city_name'] = $city_row['city_name'];
- }
$row['note'] = $jsondata['note'] ? $jsondata['note'] : '';
//获取车信息
$brand = $this->auto_brand_model->get(['id' => $row['brand_id']], 'name');
- $serie = $this->auto_series_model->get(['id' => $row['s_id']], 'name');
+ $series = $this->auto_series_model->get(['id' => $row['series_id']], 'name');
+ $car = $this->auto_cars_model->get(['id' => $row['car_id']], 'name');
$row['brand_name'] = $brand['name'];
- $row['s_name'] = $serie['name'];
- $attr_arr = [$row['v_id'], $row['cor_id'], $row['incor_id']];
- $attr = $this->auto_attr_model->get_map_by_ids($attr_arr, 'id,title');
- $row['v_name'] = isset($attr[$row['v_id']]) ? $attr[$row['v_id']][0]['title'] : '';
- $row['cor_name'] = isset($attr[$row['cor_id']]) ? $attr[$row['cor_id']][0]['title'] : '';
- $row['incor_name'] = isset($attr[$row['incor_id']]) ? $attr[$row['incor_id']][0]['title'] : '';
- //获取选择车辆vin
- if ($row['item_id']) {
- $this->load->model('items/items_model', 'mdItems');
- $row_goods = $this->mdItems->get(array('id' => $row['item_id']));
- $row['vin'] = $row_goods['vin'];
- }
- $row['if_usedcar_name'] = $row['if_usedcar'] ? ' (二手车)' : '';
+ $row['s_name'] = $series['name'];
+ $row['car_name'] = $car['name'];
$row['delry_time'] = $row['delry_time'] != '0000-00-00 00:00:00'
? str_replace(" 00:00:00", "", $row['delry_time']) : '';
- //获取车辆服务费
- $srv_info = $this->orders_v2_entity->order_srv_money($row['id'], 2);
- $fine_title = '';
- if ($row['fines']) {
- $fines = json_decode($row['fines'], true);
- $split = $fine_title = '';
- foreach ($fines as $key => $val) {
- $price = $val['price'] > 0 ? number_format(floatval($val['price']), 2) : '赠送';
- $fine_title .= $split . "{$val['txt']}:{$price}";
- $split = ' ';
- }
- }
- $row['fine_title'] = $fine_title;
- $srv_info['total'] = number_format($srv_info['total'], 2);
- $srv_detail = "";
- if ($srv_info['list']) {
- foreach ($srv_info['list'] as $key => $val) {
- $d = $srv_detail ? ',' : '';
- if ($val['key'] == 'price_fine_select' && $fine_title) {
- #$srv_detail .= $d . $val['title'] . ":" . number_format(floatval($val['money']), 2)."[$fine_title]";
- if ($val['money'] > 0) {
- $srv_detail .= $d . $val['title'] . ":" . number_format(floatval($val['money']), 2) . "[$fine_title]";
- } else {
- $srv_detail .= $d . $val['title'] . "[$fine_title]";
- }
- } else {
- $srv_detail .= $d . $val['title'] . ":" . number_format(floatval($val['money']), 2);
- }
- }
- }
- $srv_info['detail'] = $srv_detail;
- $row['srv_info'] = $srv_info;
- //获取按揭信息
- if (!$row['payway']) {
- $loan = $this->order_loans_model->get(['o_id' => $row['id']]);
-
- $notify_file_list = [];
- $file_list = $loan['notify_file'] ? explode(',', $loan['notify_file']) : array();
- if ($file_list) {
- foreach ($file_list as $item) {
- $notify_file_list[] = build_qiniu_image_url($item);
- }
- }
- $loan['notify_file_list'] = $notify_file_list;
- //$loan['notify_file_name'] = $loan['notify_file'] ? end(explode('/', $loan['notify_file'])) : '';
- $loan['lend_file'] = $loan['lend_file'] ? build_qiniu_image_url($loan['lend_file']) : '';
- $loan['lend_file_name'] = $loan['lend_file'] ? end(explode('/', $loan['lend_file'])) : '';
-
- //$loan['finance_rows'] = $this->sys_finance_model->select(['status' => 1], '', 0, 0, 'id,title');
- $loan['finance_rows'] = $this->sys_supplier_model->select(['status' => 1, 'type' => 3], '', 0, 0, 'id,title');
- $loan['price_loan'] = $money_json['price_loan'] ? $money_json['price_loan'] : '';
- $loan['first_pay'] = 0;
- if ($money_json['price_loan']) {
- $loan['first_pay'] = $sale_price - $money_json['price_loan'];
- $money_json['price_loan0'] && $loan['first_pay'] -= $money_json['price_loan0']; // 首付按揭
- }
- !$loan['num'] && $loan['num'] = 36;
- $loan['is_tiexi'] = intval($loan['is_tiexi']);
- $loan['loan_time'] = $loan['loan_time'] != '0000-00-00 00:00:00' ? date('Y-m-d', strtotime($loan['loan_time'])) : '';
- $status_array = $this->receiver_order_status_model->select(['o_id' => $row['id'], 'pid_status' => 1], '', '', 'id,status');
- $loan['status_array'] = array_column($status_array, 'status');
- $row['loan_info'] = $loan;
- }
-
- //获取按揭信息-首付按揭
- if (!$row['payway'] && $money_json['price_loan0']) {
- $loan = $this->order_loans0_model->get(['o_id' => $row['id']]);
-
- $notify_file_list = [];
- $file_list = $loan['notify_file'] ? explode(',', $loan['notify_file']) : array();
- if ($file_list) {
- foreach ($file_list as $item) {
- $notify_file_list[] = build_qiniu_image_url($item);
- }
- }
- $loan['notify_file_list'] = $notify_file_list;
- $loan['lend_file'] = $loan['lend_file'] ? build_qiniu_image_url($loan['lend_file']) : '';
- $loan['lend_file_name'] = $loan['lend_file'] ? end(explode('/', $loan['lend_file'])) : '';
-
- $loan['finance_rows'] = $this->sys_supplier_model->select(['status' => 1, 'type' => 3], '', 0, 0, 'id,title');
- $loan['price_loan'] = $money_json['price_loan0'] ? $money_json['price_loan0'] : '';
- $loan['first_pay'] = 0; // 不需要计算改值
- !$loan['num'] && $loan['num'] = 36;
- $loan['is_tiexi'] = intval($loan['is_tiexi']);
- $loan['loan_time'] = $loan['loan_time'] != '0000-00-00 00:00:00' ? date('Y-m-d', strtotime($loan['loan_time'])) : '';
- // 首付按揭的状态,根据记录值生成
- //$status_array = $this->receiver_order_status_model->select(['o_id'=>$row['id'],'pid_status'=>1],'','','id,status');
- //$loan['status_array'] = array_column($status_array,'status');
- $status_array = array();
- $row['finance_id0'] && $loan['notify_file'] && $status_array[] = 1;
- if ($this->app_liche_orders_model->get(['o_id' => $row['id'], 'type' => 8, 'status' => 1])) {
- $status_array[] = 2;
- }
- $loan['status_array'] = $status_array;
- $row['loan_info0'] = $loan;
- }
-
+ $row['downpayment_type_cn'] = $this->receiver_orders_model->downpayment_type($row['downpayment_type']);
//获取审核资料信息
$img_data = $this->receiver_order_datas_model->get(['o_id' => $row['id'], 'status>=' => 0]);
- $row['imgs_status'] = $this->order_datas_entity->data_ckinfo($img_data, $row['main_type']);
- //获取开票
- $bill_ck_img = json_decode($img_data['bill_ck_img'], true);
- if ($bill_ck_img) {
- foreach ($bill_ck_img as $key => $value) {
- $bill_ck_img[$key] = build_qiniu_image_url($value);
- }
- }
- $bill = $this->order_bills_model->get(['o_id' => $row['id']], 'status,file');
- $bill_status = $this->receiver_order_status_model->get(['o_id' => $row['id'], 'pid_status' => 3, 'status' => 1]); //是否已开票
- $bill['file'] = $bill['file'] ? build_qiniu_image_url($bill['file']) : '';
- $bill['file_type'] = $bill['file'] && strstr($bill['file'], '.pdf') ? 'pdf' : 'img';
- $bill['cardidA'] = $img_data['cardida'];
- $bill['cardidB'] = $img_data['cardidb'];
- $bill['business_licence'] = $img_data['business_licence'];
- $bill['bill_ck_img'] = $bill_ck_img;
-
- $bill['status'] = $bill_status ? 1 : 0;
- $companys = $this->sys_company_model->select(['status' => 1, 'wx_mchid!=' => ''], 'id desc', '', '', 'id,short');
- $row['companys'] = $companys;
- $row_goods['company_id'] && $item_company = $this->sys_company_model->get(['id' => $row_goods['company_id']], 'id,short');
- if (!$item_company) {
- $item_html = '车辆归属未选择';
- } else {
- $item_html = "车辆公司归属【{$item_company['short']}】";
- }
- $pay_order = $this->app_liche_orders_model->get(['type' => 3, 'status' => 1, 'o_id' => $row['id']], 'mch_id');
- $pay_order && $pay_compay = $this->sys_company_model->get(['wx_mchid' => $pay_order['mch_id']], 'id,short');
- $pay_html = '';
- if ($pay_order) {
- $ck_html = $pay_compay['id'] == $item_company['id'] ? '一致' : '不一致';
- $pay_html = "与尾款收款公司【{$pay_compay['short']}】 {$ck_html}";
- }
- $bill['warning'] = $item_html . $pay_html;
- $row['bill'] = $bill;
- //获取合同文件
- $contracts = $this->order_contracts_model->select(['o_id' => $row['id'], 'status' => 1], '', '', '', 'id,type,file,status');
- $contract_data = [];
- if ($contracts) {
- foreach ($contracts as $key => $val) {
- $contract_data[$val['type']] = [
- 'type' => $val['type'],
- 'status' => $val['status'],
-// 'src' => http_host_com('api').'/'.$val['file'],
- 'src' => http_host_com('api') . '/wxapp/licheb/protocol/pdf_img?id=' . $val['id'],
- ];
- }
- }
- $row['contract_data'] = $contract_data;
- //获取图片识别信息
- $agent = $this->order_agents_model->get(['o_id' => $row['id']]);
- $company = $ins_risk = $business_risk = '';
- if ($agent) {
- $agent['ins_time'] = $agent['ins_time'] != '0000-00-00 00:00:00' ? date('Y-m-d', strtotime($agent['ins_time'])) : '';
- $agent_jsondata = $agent['jsondata'] ? json_decode($agent['jsondata'], true) : '';
- if ($agent_jsondata) {
- $company = $agent_jsondata['company'];
- $ins_risk = $agent_jsondata['ins_risk'];
- $business_risk = $agent_jsondata['business_risk'];
- }
- }
- $agent['company'] = $company;
- $agent['ins_risk'] = $ins_risk;
- $agent['business_risk'] = $business_risk;
- $insurance_img = json_decode($img_data['insurance_img'], true);
- $business_img = json_decode($img_data['business_img'], true);
- $accident_img = json_decode($img_data['accident_img'], true);
- $agent['insurance_price'] = $insurance_img['price'] ? $insurance_img['price'] : '';
- $agent['insurance_product'] = $insurance_img['product'] ? $insurance_img['product'] : '';
- $agent['business_price'] = $business_img['price'] ? $business_img['price'] : '';
- $agent['business_product'] = $business_img['product'] ? $business_img['product'] : '';
- $agent['car_num'] = $agent['car_num'] ? $agent['car_num'] : '';
- $agent['accident_price'] = $accident_img['price'] ? $accident_img['price'] : '';
- $agent['accident_title'] = $accident_img['product'] ? $accident_img['product'] : '';
- if (!$agent['ins_time'] && $business_img) {
- $img_jsondata = json_decode($img_data['jsondata'], true);
- $business_img_key = md5(build_qiniu_image_url($business_img['img']));
- $business_img_orc = $img_jsondata['ins_info'][$business_img_key];
- if ($business_img_orc['data']['投保日期']) {
- $agent['business_time'] = $business_img_orc['data']['投保日期'];
- } else {
- $agent['business_time'] = $business_img_orc['data']['coverYears'];
- }
-
- }
- $row['agent'] = $agent;
+ $img_data['business_licence'] && $img_data['business_licence'] = build_qiniu_image_url($img_data['business_licence']);
+ $img_data['cardida'] && $img_data['cardida'] = build_qiniu_image_url($img_data['cardida']);
+ $img_data['cardidb'] && $img_data['cardidb'] = build_qiniu_image_url($img_data['cardidb']);
+ $img_data['pay_img'] && $img_data['pay_img'] = build_qiniu_image_url($img_data['pay_img']);
+ $img_data['contract_img'] && $img_data['contract_img'] = build_qiniu_image_url($img_data['contract_img']);
+ $img_data['car_img'] && $img_data['car_img'] = build_qiniu_image_url($img_data['car_img']);
+ $img_data['car_auth_img'] && $img_data['car_auth_img'] = build_qiniu_image_url($img_data['car_auth_img']);
+ $img_data['delivery_ck_img'] && $img_data['delivery_ck_img'] = build_qiniu_image_url($img_data['delivery_ck_img']);
+ $img_data['equity_ck_img'] && $img_data['equity_ck_img'] = build_qiniu_image_url($img_data['equity_ck_img']);
+ $img_data['bill_img'] && $img_data['bill_img'] = build_qiniu_image_url($img_data['bill_img']);
+ $img_data['insurance_img'] && $img_data['insurance_img'] = build_qiniu_image_url($img_data['insurance_img']);
+ $img_data['business_img'] && $img_data['business_img'] = build_qiniu_image_url($img_data['business_img']);
+ $row['img_data'] = $img_data;
//获取销售员
if ($row['sale_id']) {
$this->load->model('app/licheb/app_licheb_users_model', 'licheb_users_model');
$this->load->model("biz/biz_model");
$this->load->model("sys/sys_city_model", 'mdSysCity');
$row_admin = $this->licheb_users_model->get(array('id' => $row['sale_id']));
- # 2023-03-20:如果 角色是 渠道经理 就显示 XX渠道 某某某, XX 取所在城市
if ($row_admin['group_id'] == 4) {
$row_city = $this->mdSysCity->get(['city_id' => $row_admin['city_id']]);
$city_name = $row_city['name'] ? str_replace('市', '', $row_city['name']) . '渠道 ' : '';
@@ -506,17 +302,9 @@ class Orders extends HD_Controller
}
$row['admin_name'] = $admin_name;
}
- //订单状态
- if ($id > Orders_v2_entity::V2_START_ID) {
- $status_name = $this->orders_status_entity->last_status_cn($id);
- !$status_name && $status_name = '未下定';
- }
- $row['status_name'] = $status_name;
+ $row['status_name'] = $this->receiver_orders_model->get_status($row['status']);
//日志
- $where = [
- 'order_id' => $row['id']
- ];
- $logs = $this->order_oplogs_model->select($where, 'id desc', 1, 30, 'uname,log,c_time');
+ $logs = [];
$row['is_admin'] = $this->role == SUPER_ADMIN ? true : false;
$row['is_admin'] = ($this->role == SUPER_ADMIN || $this->role == 40) ? true : false;
@@ -525,7 +313,7 @@ class Orders extends HD_Controller
$this->data['logs'] = $logs;
$this->data['_title'] = '订单详情';
- return $this->show_view('receiver/orderv2/get/index', true);
+ return $this->show_view('receiver/order/get/index', true);
}
//添加单条数据
@@ -1430,7 +1218,7 @@ class Orders extends HD_Controller
$id = $this->input->post('id');
$field = $this->input->post('filed');
$save_value = $value = $this->input->post('value');
- $row = $this->receiver_orders_v2_model->get(['id' => $id]);
+ $row = $this->receiver_orders_model->get(['id' => $id]);
if (!$row) {
return $this->show_json(SYS_CODE_FAIL, '参数错误');
}
@@ -1448,60 +1236,9 @@ class Orders extends HD_Controller
$update = [
$field => $save_value
];
- if ($field == 'insurance_img' || $field == 'business_img' || $field == 'accident_img') {
- $jsondata = json_decode($re_data['jsondata'], true);
- $img_url = build_qiniu_image_url($value);
-// $result = $this->qiniuorc->car_insure($img_url);
- $result = $this->tcmarket->autoInsurance($img_url);
- if (!$result['code'] && $field != 'accident_img') { //意外险不强制识别成功
- return $this->show_json(SYS_CODE_FAIL, '图片识别失败,请重新上传');
- }
-// $img_jsondata = [
-// 'img' => $value,
-// 'date' => $result['data']['投保确认时间'],
-// 'price' => floatval($result['data']['合计保费']),
-// 'product' => $result['data']['保险公司']
-// ];
- $img_jsondata = [
- 'img' => $value,
- 'date' => $result['data']['policyStartDate'],
- 'price' => floatval($result['data']['premium']),
- 'product' => $result['data']['companyName'] ? $result['data']['companyName'] : $result['data']['department']
- ];
- # 0612各保单支持返点系数, 保留系数
- if ($re_data) {
- $insurance_img = json_decode($re_data['insurance_img'], true);
- $business_img = json_decode($re_data['business_img'], true);
- $accident_img = json_decode($re_data['accident_img'], true);
- if ($field == 'insurance_img' && $insurance_img['rebate']) {
- $img_jsondata['rebate'] = $insurance_img['rebate'];
- } elseif ($field == 'business_img' && $business_img['rebate']) {
- $img_jsondata['rebate'] = $business_img['rebate'];
- } elseif ($field == 'accident_img' && $accident_img['rebate']) {
- $img_jsondata['rebate'] = $accident_img['rebate'];
- }
- }
-
- $jsondata['ins_info'][md5($img_url)] = $result;
- $update[$field] = json_encode($img_jsondata, JSON_UNESCAPED_UNICODE);
- $update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
- }
- //识别行驶证
- if ($field == 'car_img') {
- $result = $this->tcorc->VehicleLicense(build_qiniu_image_url($value));
- if (!$result['code']) {
- return $this->show_json(SYS_CODE_FAIL, '图片识别失败,请重新上传');
- }
- $jsondata = json_decode($re_data['jsondata'], true);
- $jsondata['car_info'] = $result['data']['FrontInfo'];
- $update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE);
- }
$res = $this->receiver_order_datas_model->update($update, ['id' => $re_data_id]);
if ($res) {
- if ($field == 'car_img') {//更新车牌号
- $this->order_datas_entity->up_car_num($id);
- }
return $this->show_json(SYS_CODE_SUCCESS, '保存成功');
} else {
return $this->show_json(SYS_CODE_FAIL, '保存失败');
diff --git a/admin/libraries/OrdersList.php b/admin/libraries/OrdersList.php
index 81f14d39..22b66a82 100644
--- a/admin/libraries/OrdersList.php
+++ b/admin/libraries/OrdersList.php
@@ -64,7 +64,7 @@ class OrdersList
"status>=" => 0,
];
$_title = '全部订单';
- $view = 'receiver/orderv2/lists';
+ $view = 'receiver/order/lists';
$params['status_pid'] == 1 && $where["payway"] = 0;
if (is_product()) {
$where["biz_id<>"] = 1;
@@ -73,9 +73,6 @@ class OrdersList
$biz_ids = implode(',', $_SESSION['admin_info']['biz_id']);
$where["biz_id in ($biz_ids)"] = null;
}
- if ($params['biz_type']) {
- $where["biz_id in (select id from lc_biz where type = " . $params['biz_type'] . ')'] = null;
- }
if ($params['of_id'] || $params['of2_id']) {
$where_c = 'status>=0';
$params['of_id'] && $where_c .= ' and of_id = ' . $params['of_id'];
@@ -131,28 +128,6 @@ class OrdersList
$where["ck_time <="] = $ck_time[1] . ' 23:59:59';
}
}
- if (strlen($params['is_bill'])) {
- if ($params['is_bill']) {
- $where["bill_time <> '0000-00-00 00:00:00'"] = null;
- } else {
- $where["bill_time"] = '0000-00-00 00:00:00';
- }
- }
- //交付时长
- if (strlen($params['over_id'])) {
- if ($params['over_id'] == 3) {
- $where["over_time>"] = date('Y-m-d', time() + 30 * 24 * 60 * 60);
- } else {
- if ($params['over_id'] == 1) {
- $e_day = 14;
- } elseif ($params['over_id'] == 2) {
- $e_day = 30;
- } else {
- $e_day = 7;
- }
- $where["over_time<="] = date('Y-m-d', time() + $e_day * 24 * 60 * 60);
- }
- }
if ($params['brand_id']) {//品牌
$where["brand_id"] = $params['brand_id'];
} else {
@@ -163,16 +138,6 @@ class OrdersList
} else {
$params['series_id'] = '';
}
- if ($params['v_id']) {//车型
- $where["v_id"] = $params['v_id'];
- } else {
- $params['v_id'] = '';
- }
- if ($params['cor_id']) {//车身颜色
- $where["cor_id"] = $params['cor_id'];
- } else {
- $params['cor_id'] = '';
- }
//销售员筛选
if ($params['admin_id']) {
$where["sale_id"] = $params['admin_id'];
@@ -203,26 +168,11 @@ class OrdersList
!$params['biz_id_admin'] && $params['biz_id_admin'] = '';
$params['admin_id'] = '';
}
- if (strlen($params['status_pid'])) {
- $where["brand_id>"] = 0;
- }
- if (strlen($params['status_pid']) && $params['status_pid'] != 21) { //付款-已下定
- $where["status <> 2"] = null;
- }
- if ($params['status_pid'] == 4) { //交付需要开票后才显示
- $where["id in (select o_id from lc_receiver_order_status where pid_status=3 and status=1)"] = null;
- }
- if (strlen($params['status_pid']) && !$params['status_pid']) { //付款列表 下定时间排序
- $orderby = "order_time desc";
- } elseif ($params['status_pid'] == 3) { // 开票列表 开票时间排序
- $orderby = "bill_time desc";
- } elseif ($params['status_pid'] == 21) { //退款时间排序
- $orderby = "refund_time desc";
- } elseif ($params['status_pid'] == 5 || ($params['status'] == 2 && $params['status_pid'] == 4)) { //交付时间排序
- $orderby = "ck_time desc,c_time desc";
- } else {
- $orderby = "c_time desc";
+
+ if (strlen($params['status'])) {
+ $where['status'] = $params['status'];
}
+ $orderby = "c_time desc";
$count = $this->ci->mdOrders->count($where);
$rows = $this->ci->mdOrders->select($where, $orderby, $page, $size);
$lists = [];
@@ -273,17 +223,15 @@ class OrdersList
$fields['o_id'] = $val['id'];
$name = $val['name'];
$mobile = $val['mobile'];
- $open_url = '/receiver/orderv2/orders/get?id=';
- $id_card_append = $info_json['c_owner_cardid'] ? '
' . $info_json['c_owner_cardid'] : '';
- $id_card = $info_json['c_owner_cardid'] ? '="' . $info_json['c_owner_cardid'] . '"' : '';
+ $open_url = '/receiver/orders/get?id=';
$fields['name'] = $size > 1000 ? $name
- : '' . $name . '
' . $mobile . $id_card_append . '';
- $fields['id_card'] = $id_card;
+ : '' . $name . '
' . $mobile . '
' . $val['card_id'] . '';
+ $fields['id_card'] = $val['card_id'];
$fields['mobile'] = $size > 1000 ? '="' . $mobile . '"' : $mobile;
$fields['car_name'] = "{$brand_name}-{$series_name}-{$car_name}";
$fields['price_car'] = 0;
$fields['payway_name'] = $this->paywayAry[$val['payway']];
- $fields['price'] = $fields['payway_name'] . "
" . $fields['price_car'];
+ $fields['payway'] = $fields['payway_name'];
$fields['brand_name'] = $brand_name;
$fields['series_name'] = $series_name;
$status_name = $order_status_cn[$val['status']];
@@ -533,7 +481,7 @@ class OrdersList
if (!strlen($status_pid)) {
$fields2 = [
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
- 'price' => ['title' => '最终售价', 'width' => '9%'],
+ 'payway' => ['title' => '付款方式', 'width' => '9%'],
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
'c_time' => ['title' => '订单时间', 'width' => '9%'
]
@@ -541,7 +489,7 @@ class OrdersList
} elseif ($status_pid == 3) {
$fields2 = [
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
- 'price' => ['title' => '最终售价', 'width' => '9%'],
+ 'payway' => ['title' => '付款方式', 'width' => '9%'],
// 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
'bill_time' => ['title' => '开票时间', 'width' => '9%']
@@ -549,7 +497,7 @@ class OrdersList
} else {
$fields2 = [
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
- 'price' => ['title' => '最终售价', 'width' => '9%'],
+ 'payway' => ['title' => '付款方式', 'width' => '9%'],
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
'order_time' => ['title' => '下定时间', 'width' => '9%'], 'over_time' => ['title' => '交付截止', 'width' => '9%']
];
diff --git a/admin/views/receiver/order/get/ckinfo.php b/admin/views/receiver/order/get/ckinfo.php
new file mode 100644
index 00000000..25b22b9a
--- /dev/null
+++ b/admin/views/receiver/order/get/ckinfo.php
@@ -0,0 +1,357 @@
+
+ 身份证: +
+ +