浏览代码

增加草稿

linwu 3 年之前
父节点
当前提交
e37873f4da
共有 1 个文件被更改,包括 18 次插入13 次删除
  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 = [];
         $check = [];
         if ($apply) {
         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 {
         } else {
             $time   = time();
             $time   = time();
@@ -285,6 +287,9 @@ class BuyhouseController extends WebBaseController
         if ($info->zj_check_status == 3) {
         if ($info->zj_check_status == 3) {
             $info->zj_check_status = 1;
             $info->zj_check_status = 1;
         }
         }
+        if ($info->is_draft == 1) {
+            $info->is_draft = 2;
+        }
         $info->save();
         $info->save();
 
 
         return response()->json(['status' => 1]);
         return response()->json(['status' => 1]);