| xqd
@@ -89,6 +89,14 @@ class OrderController extends Controller
|
|
|
if($request->method() == 'POST') {
|
|
|
$data = $request->input();
|
|
|
|
|
|
+
|
|
|
+ foreach ($data as $key=>$val){
|
|
|
+ if(empty($val)&&$key!='work'&&$key!='native_place'&&$key!='address'){
|
|
|
+ $res['state'] = 0;
|
|
|
+ $res['err'] = $conf[$key].'不能为空!';
|
|
|
+ return $this->api($res);
|
|
|
+ }
|
|
|
+ }
|
|
|
$style = explode(',',$data['sample_type']);
|
|
|
$str = '';
|
|
|
foreach ($style as $key=>$val){
|
| xqd
@@ -104,14 +112,6 @@ class OrderController extends Controller
|
|
|
}
|
|
|
//dd($style);
|
|
|
$data['sample_type'] = $str;
|
|
|
- foreach ($data as $key=>$val){
|
|
|
- if(empty($val)&&$key!='sample_type'&&$key!='sex'){
|
|
|
- $res['state'] = 0;
|
|
|
- $res['err'] = $conf[$key].'不能为空!';
|
|
|
- return $this->api($res);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
$query = MedicalOrderModel::create($data);
|
|
|
if($query){
|
|
|
$res['state'] = 1;
|