|
@@ -710,8 +710,9 @@ class SalesOrderService extends Service
|
|
|
public function salesOrderList($data,$user){
|
|
|
$model = SalesOrder::Clear($user,$data);
|
|
|
$model = $model->where('del_time',0)
|
|
|
- ->select('id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','customer_id','sign_time','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','other_fee','discount_fee','contract_fee','pay_way','car_type','year','mileage','color','original_set','processing','state','invoice_state','plat_type','plat_order','install_method','install_position','customer_contact','is_confirm')
|
|
|
- ->orderby('id', 'desc');
|
|
|
+ ->select('id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','customer_id','sign_time','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','other_fee','discount_fee','contract_fee','pay_way','car_type','year','mileage','color','original_set','processing','state','invoice_state','plat_type','plat_order','install_method','install_position','customer_contact','is_confirm','dispatch_time_second')
|
|
|
+ ->orderby('id', 'desc')
|
|
|
+ ->orderby('dispatch_time_second','desc');
|
|
|
|
|
|
if(! empty($data['order_number'])) $model->where('order_number','LIKE', '%'.$data['order_number'].'%');
|
|
|
if(! empty($data['sales_order_type'])) $model->where('sales_order_type',$data['sales_order_type']);
|
|
@@ -791,6 +792,11 @@ class SalesOrderService extends Service
|
|
|
$customer_id = (new RangeService())->salesOrderCustomerCrtSearch($user,$data);
|
|
|
$model->whereIn('customer_id',$customer_id);
|
|
|
}
|
|
|
+ if(! empty($data['dispatch_time_second'][0]) && ! empty($data['dispatch_time_second'][1])) {
|
|
|
+ $return = $this->changeDateToTimeStampAboutRange($data['dispatch_time_second']);
|
|
|
+ $model->where('dispatch_time_second','>=',$return[0]);
|
|
|
+ $model->where('dispatch_time_second','<=',$return[1]);
|
|
|
+ }
|
|
|
|
|
|
$list = $this->limit($model,'',$data);
|
|
|
$list = $this->fillData($list,$data);
|
|
@@ -987,6 +993,7 @@ class SalesOrderService extends Service
|
|
|
$data['data'][$key]['construction_time'] = $value['construction_time'] ? date('Y-m-d H:i:s',$value['construction_time']) : '';
|
|
|
$data['data'][$key]['handover_time'] = $value['handover_time'] ? date('Y-m-d H:i:s',$value['handover_time']) : '';
|
|
|
$data['data'][$key]['crt_time'] = $value['crt_time'] ? date('Y-m-d H:i:s',$value['crt_time']) : '';
|
|
|
+ $data['data'][$key]['dispatch_time_second_time'] = $value['dispatch_time_second'] ? date('Y-m-d H:i:s',$value['dispatch_time_second']) : '';
|
|
|
$data['data'][$key]['crt_name'] = $emp[$value['crt_id']] ?? '';
|
|
|
$data['data'][$key]['product'] = $product[$value['id']] ?? [];
|
|
|
$data['data'][$key]['fee'] = $fee[$value['id']] ?? "";
|
|
@@ -1261,7 +1268,7 @@ class SalesOrderService extends Service
|
|
|
|
|
|
public function salesOrderListsalesOrderWxList($data,$user){
|
|
|
$model = SalesOrder::where('del_time',0)
|
|
|
- ->select('id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','customer_id','sign_time','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','other_fee','discount_fee','contract_fee','pay_way','car_type','year','mileage','color','original_set','processing','state','invoice_state','plat_type','plat_order','install_method','install_position','customer_contact','is_confirm')
|
|
|
+ ->select('id','sales_order_type','model_type','order_number','selling_price','vin_no','car_type','order_type','customer_id','sign_time','crt_id','crt_time','mark','product_total','rate','construction_time','handover_time','other_fee','discount_fee','contract_fee','pay_way','car_type','year','mileage','color','original_set','processing','state','invoice_state','plat_type','plat_order','install_method','install_position','customer_contact','is_confirm','dispatch_time_second')
|
|
|
->orderby('id', 'desc');
|
|
|
|
|
|
if(! empty($data['openid'])){
|