linwu %!s(int64=3) %!d(string=hai) anos
pai
achega
e37873f4da
Modificáronse 1 ficheiros con 18 adicións e 13 borrados
  1. 18 13
      app/Http/Controllers/Web/Content/BuyhouseController.php

+ 18 - 13
app/Http/Controllers/Web/Content/BuyhouseController.php

@@ -141,19 +141,21 @@ class BuyhouseController extends WebBaseController
         $check = [];
         if ($apply) {
             //审核状态
-            if ($apply['rs_check_status'] != 2) {
-                $check['status_text'] = '人社局' . $this->apply_status[$apply['rs_check_status']];
-                $check['comment']     = $apply['rs_check_status'] == 1 ? '' : $apply['rs_check_comment'];
-                $check['type']        = $this->check_type[$apply['rs_check_status']];
-            } elseif ($apply['zj_check_status'] != 2) {
-                $check['status_text'] = '住建局' . $this->apply_status[$apply['zj_check_status']];
-                $check['comment']     = $apply['zj_check_status'] == 1 ? '' : $apply['zj_check_comment'];
-                $check['type']        = $this->check_type[$apply['zj_check_status']];
-            } else {
-                $check['title']       = '';
-                $check['status_text'] = $this->apply_status[$apply['zj_check_status']];
-                $check['comment']     = '';
-                $check['type']        = 'success';
+            if ($apply['is_draft'] == 2) {
+                if ($apply['rs_check_status'] != 2) {
+                    $check['status_text'] = '人社局' . $this->apply_status[$apply['rs_check_status']];
+                    $check['comment']     = $apply['rs_check_status'] == 1 ? '' : $apply['rs_check_comment'];
+                    $check['type']        = $this->check_type[$apply['rs_check_status']];
+                } elseif ($apply['zj_check_status'] != 2) {
+                    $check['status_text'] = '住建局' . $this->apply_status[$apply['zj_check_status']];
+                    $check['comment']     = $apply['zj_check_status'] == 1 ? '' : $apply['zj_check_comment'];
+                    $check['type']        = $this->check_type[$apply['zj_check_status']];
+                } else {
+                    $check['title']       = '';
+                    $check['status_text'] = $this->apply_status[$apply['zj_check_status']];
+                    $check['comment']     = '';
+                    $check['type']        = 'success';
+                }
             }
         } else {
             $time   = time();
@@ -285,6 +287,9 @@ class BuyhouseController extends WebBaseController
         if ($info->zj_check_status == 3) {
             $info->zj_check_status = 1;
         }
+        if ($info->is_draft == 1) {
+            $info->is_draft = 2;
+        }
         $info->save();
 
         return response()->json(['status' => 1]);