|
@@ -295,11 +295,10 @@ class ConstructionService extends Service
|
|
|
$model = new Construction(['userData' => $user]);
|
|
|
$model = $model->where('del_time',0)
|
|
|
->select('title','id','model_type','order_number','customer_id','customer_contact_id','install_method','install_position','sales_order_id','construction_fee','construction_time','handover_time','urgency','crt_id','crt_time','mark','state','address1','address2','introduction','service_price')
|
|
|
- ->orderby('id', 'desc')
|
|
|
- ->where('model_type',$data['model_type']);
|
|
|
+ ->orderby('id', 'desc');
|
|
|
|
|
|
if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
|
|
|
-
|
|
|
+ if(! empty($data['model_type'])) $model->where('model_type',$data['model_type']);
|
|
|
$list = $this->limit($model,'',$data);
|
|
|
$list = $this->fillData($list);
|
|
|
|
|
@@ -330,6 +329,9 @@ class ConstructionService extends Service
|
|
|
$res = $this->checkNumber($data['service_price']);
|
|
|
if(! $res) return [false,'服务价格请输入不超过两位小数并且大于0的数值'];
|
|
|
}
|
|
|
+ if(! empty($data['handover_time'])) {
|
|
|
+ $data['handover_time'] = $this->changeDateToDateMin($data['handover_time']);
|
|
|
+ }
|
|
|
|
|
|
if($data['model_type'] == Construction::Model_type_one){
|
|
|
if(empty($data['install_method'])) return [false,'安装方式不能为空'];
|