diff --git a/admin/libraries/Ordersv2List.php b/admin/libraries/Ordersv2List.php
index 119d026d..f2bdf581 100644
--- a/admin/libraries/Ordersv2List.php
+++ b/admin/libraries/Ordersv2List.php
@@ -8,6 +8,7 @@ class Ordersv2List
private $ci;
private $searchTpAry = array('owner_name' => '车主姓名', 'owner_mobile' => '车主手机号', 'name' => '客户姓名', 'mobile' => '客户手机号', 'sid' => '订单号');
private $paywayAry = array(0 => '贷款', 1 => '全款');
+ private $overAry = array(0 => '7天内', 1 => '14天内', 2=> '30天内', 3=> '大于30天');
private $t1 = 'lc_receiver_orders_v2';
private $t2 = 'lc_receiver_order_status';
@@ -38,9 +39,11 @@ class Ordersv2List
!$params['of2_id'] && $params['of2_id'] = '';
!strlen($params['payway']) && $params['payway'] = '';
!$params['biz_type'] && $params['biz_type'] = '';
+ !strlen($params['over_id']) && $params['over_id'] = '';
$fieldAry = $this->get_fields($status_pid);
$show_info['offlineSourcesAry'] = $this->ci->mdCustomers->offlineSources();//客户来源
$show_info['paywayAry'] = $this->paywayAry;//付款方式
+ $show_info['overAry'] = $this->overAry;
$show_info['bizTypeAry'] = $this->ci->biz_model->type_ary();//门店类型
//渠道经理
$show_info['qdjl_lists'] = $this->ci->mdLichebUsers->select(array('group_id' => 4, 'status' => 1, 'biz_id<>' => '0')
@@ -124,6 +127,21 @@ class Ordersv2List
$where["{$this->t1}.bill_time <="] = $bill_time[1] . ' 23:59:59';
}
}
+ //交付时长
+ if(strlen($params['over_id'])){
+ if($params['over_id']==3){
+ $where["{$this->t1}.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["{$this->t1}.over_time<="] = date('Y-m-d',time()+$e_day*24*60*60);
+ }
+ }
if ($params['brand_id']) {//品牌
$where["{$this->t1}.brand_id"] = $params['brand_id'];
} else {
@@ -184,7 +202,7 @@ class Ordersv2List
$fileds = "{$this->t1}.id,{$this->t1}.name,{$this->t1}.mobile,{$this->t1}.brand_id,{$this->t1}.s_id,{$this->t1}.v_id,
{$this->t1}.cor_id,{$this->t1}.incor_id,{$this->t1}.money_json,{$this->t1}.payway,{$this->t1}.status,{$this->t1}.c_time,
{$this->t1}.biz_id,{$this->t1}.bill_time,{$this->t1}.customer_id,{$this->t1}.owner_name,{$this->t1}.owner_mobile,{$this->t1}.main_type,{$this->t1}.info_json,
- {$this->t1}.order_time,{$this->t1}.bill_time,{$this->t1}.item_id";
+ {$this->t1}.order_time,{$this->t1}.bill_time,{$this->t1}.item_id,{$this->t1}.over_time";
if (strlen($params['status_pid']) && $params['status'] == 1) { //付款-已下定
$where["{$this->t1}.status <> 2"] = null;
}
@@ -262,7 +280,6 @@ class Ordersv2List
$v_name = isset($attr[$val['v_id']]) ? $attr[$val['v_id']][0]['title'] : '';
$cor_name = isset($attr[$val['cor_id']]) ? $attr[$val['cor_id']][0]['title'] : '';
$fields['o_id'] = $val['id'];
- $fields['bill_time'] = $val['bill_time'];
if (Orders_v2_entity::V2_START_ID < $val['id']) {
if ($val['main_type']) {
$name = $info_json['c_company'];
@@ -283,7 +300,7 @@ class Ordersv2List
}
$fields['mobile'] = $mobile;
$fields['car_name'] = "{$brand_name}-{$series_name}-{$v_name}-{$cor_name}";
- $fields['price'] = number_format($money_json['price_car'], 2);
+ $fields['price'] = $this->paywayAry[$val['payway']]."
".number_format($money_json['price_car'], 2);
$fields['payway_name'] = $this->paywayAry[$val['payway']];
$fields['incor_name'] = isset($attr[$val['incor_id']]) ? $attr[$val['incor_id']][0]['title'] : '';
if (strlen($params['status_pid']) && $params['status_pid'] != 5 && $val['status'] != 2) {
@@ -304,6 +321,7 @@ class Ordersv2List
$fields['of_title'] = $of_title;
$fields['order_time'] = $val['order_time'] != '0000-00-00 00:00:00' ? $val['order_time'] : '';
$fields['bill_time'] = $val['bill_time'] != '0000-00-00 00:00:00' ? $val['bill_time'] : '';
+ $fields['over_time'] = $val['over_time'] != '0000-00-00 00:00:00' ? $val['over_time'] : '';
$fields['vin'] = $items[$val['item_id']] ? $items[$val['item_id']] : '';
$lists[] = $fields;
}
@@ -335,7 +353,8 @@ class Ordersv2List
if (!strlen($status_pid)) {
$fields2 = [
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
- 'price' => ['title' => '车辆平台价', 'width' => '9%'], 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
+ 'price' => ['title' => '车辆平台价', 'width' => '9%'],
+// 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
'c_time' => ['title' => '订单时间', 'width' => '9%'
]
@@ -343,16 +362,18 @@ class Ordersv2List
} elseif ($status_pid == 3) {
$fields2 = [
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
- 'price' => ['title' => '车辆平台价', 'width' => '9%'], 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
+ 'price' => ['title' => '车辆平台价', 'width' => '9%'],
+// 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
'bill_time' => ['title' => '开票时间', 'width' => '9%']
];
} else {
$fields2 = [
'car_name' => ['title' => '车辆', 'width' => '27%'], 'biz_name' => ['title' => '门店', 'width' => '12%'],
- 'price' => ['title' => '车辆平台价', 'width' => '9%'], 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
+ 'price' => ['title' => '车辆平台价', 'width' => '9%'],
+// 'payway_name' => ['title' => '付款方式', 'width' => '8%'],
'of_title' => ['title' => '客户来源', 'width' => '10%'], 'status_name' => ['title' => '状态', 'width' => '9%'],
- 'order_time' => ['title' => '下定时间', 'width' => '9%']
+ 'over_time' => ['title' => '交付截止', 'width' => '9%'],'order_time' => ['title' => '下定时间', 'width' => '9%']
];
}
$fields = array_merge($fields1, $fields2);
diff --git a/admin/views/receiver/orderv2/lists.php b/admin/views/receiver/orderv2/lists.php
index 83d3333c..4413991e 100644
--- a/admin/views/receiver/orderv2/lists.php
+++ b/admin/views/receiver/orderv2/lists.php
@@ -194,6 +194,17 @@
+
+