Crazy 7 mesiacov pred
rodič
commit
bdf9d9cedb

+ 96 - 121
app/admin/controller/project/Report.php

@@ -102,9 +102,9 @@ class Report extends BaseController
 
         $where = [
             ["cp_project_report.delete_time", "=", 0],
-            ["project_id", "=", $param["project_id"]]
-            //["a.status",">",0000]//业主待审批之前
-
+            ["project_id", "=", $param["project_id"]],
+//            ["a.status",">",7],//财评审完后才到业主
+            ["a.status","<>",2]//财评拒绝后,业主端不显示
         ];
 
         $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
@@ -427,7 +427,6 @@ class Report extends BaseController
         }
         $this->Pushmessage->pushMessage($detail["project_id"], $handle['financial'], $handle['company']);
 
-
         $this->model->where("id", $id)->update(["status" => 3]);
         add_project_log("发起删除项目报告审批", $detail["project_id"], $detail["title"]);
         return to_assign(0, "操作成功");
@@ -438,6 +437,7 @@ class Report extends BaseController
      * 财评
      * 同意-报告
      */
+
     public function agree_report()
     {
         $param = get_params();
@@ -445,64 +445,45 @@ class Report extends BaseController
         $param = $handle['param'];
         //return json($param);
         //dump($param);
-        
+
         $type = isset($param['type']) ? $param['type'] : 0;
-        //dump($type);
-        if (!isset($param["type"])) {
+
+        if (!isset($param["type"])) {//在审核列表通过
             $id = isset($param['id']) ? $param['id'] : 0;
             $this->model->where("id", $id)->update(["status" => 1]);//财评已通过
             $detail = $this->model->where("id", $id)->find();//在Project_report里
-            //更新报告时间
-//            $num = $this->model->where([
-//                ["project_id", "=", $detail["project_id"],
-//                    ["type", ">", $detail["type"]]],
-//                ["status", ">", 1],//已通过
-//                ["status", "<>", 2],//不等于
-//                ["status", "<", 4]//小于删除通过
-//            ])->count();//找到status=3删除待审核的
-            //type,0初审,1对数,2审定
-            //$report_status = $detail["type"] + 1;//更新到对数
-//            if ($num == 0) {
-//                $data = ['report_time' => time(), "report_status" => $report_status];
-//            } else {
-//                $data = ['report_time' => time()];
-//            }
-
-//            try {
-//                Db::name("cost_project")->where("id", $detail["project_id"])->update($data);//
-//            } catch (DbException $e) {
-//                return to_assign(1, '操作失败,原因:' . $e->getMessage());
-//            }
 
             try {
-                Db::name("project_audit")->where([["else_id", "=", $id]])->update(["audit_status" => 2, "audit_time" => time()]);//更新通过
+                Db::name("project_audit")->where([["else_id", "=", $id]])->update(["audit_status" => 2, "audit_time" => time()]);//更新审批通过
             } catch (DbException $e) {
                 return to_assign(1, '操作失败,原因:' . $e->getMessage());
             }
             //给业主新增报告审核
-                $where = [
-                    ["project_id", "=", $param["project_id"]],
-                    ["else_id", "=", $param["else_id"]],//项目报告id
-                    ["audit_type", "=", 4]
-                ];
-                $detail = Db::name("cost_project")->where("id", $param["project_id"])->field("sent_review_head,sent_review_head_name")->find();
+            $where = [
+                ["project_id", "=", $param["project_id"]],
+                ["else_id", "=", $param["else_id"]],//项目报告id
+                ["audit_type", "=", 2]
+            ];
+            $de = Db::name("cost_project")->where("id", $param["project_id"])->field("sent_review_head,sent_review_head_name")->find();
+            if (isset($de)) {
                 $auditData = $this->Auditmodel->where($where)->find()->toArray();
                 $auditData["audit_name"] = "业主报告审核";
                 $auditData["audit_status"] = 1;
-                $auditData["audit_type"] = 2;
-                $auditData["approver"] = $detail["sent_review_head"];
-                $auditData["approver_name"] = $detail["sent_review_head_name"];
+                //$auditData["audit_type"] = 2;
+                $auditData["approver"] = $de["sent_review_head"];
+                $auditData["approver_name"] = $de["sent_review_head_name"];
                 $auditData["create_time"] = time();
                 $auditData["audit_time"] = null;
                 $auditData["remark"] = null;
                 $auditData["audit_remark"] = null;
                 unset($auditData["id"]);
                 try {
-                    Db::name("project_report")->where("id", $param["else_id"])->update(["status" => 1]);
                     $this->Auditmodel->save($auditData);
                 } catch (\Exception $e) {
                     return to_assign(1, '操作失败,原因:' . $e->getMessage());
                 }
+            }
+
 
             //发给公司
             $people = $this->model->where('id', $id)->value("maker_id");
@@ -519,51 +500,66 @@ class Report extends BaseController
             } else {
                 $handle['proprietor'] = array_merge($handle['proprietor'], (array)$proprietor);
             }
-          
-            $this->Pushmessage->pushMessage($detail["project_id"], $handle['financial'], $handle['company'], $handle['proprietor']);
-            add_project_log('审批通过', $param['project_id'], "财政局报告审批通过");
-
 
+            $this->Pushmessage->pushMessage($detail["project_id"], $handle['financial'], $handle['company'], $handle['proprietor']);
+            add_project_log('财政局审批通过', $param['project_id'], "报告审批通过");
 
-        } else {
+        } else {//在项目报告里同意
             $param['audit_time'] = time();
             $this->Auditmodel->where('id', $param['id'])->strict(false)->field(true)->update(["audit_status" => 2, "audit_time" => time()]);
             add_log('edit', $param['id'], $param);
             $id = $param['id'];
+            $this->model->where("id", $id)->update(["status" => 1]);//财评已通过
             unset($param["id"]);
 
             $detail = ProjectReport::where("id", $param["else_id"])->find();
-            $num = $this->model->where([
-                ["project_id", "=", $detail["project_id"],
-                    ["type", ">", $detail["type"]]],
-                ["status", ">", 1],
-                ["status", "<>", 2],
-                ["status", "<", 4]
-            ])->count();
-            //type,0初审,1对数,2审定
-            $report_status = $detail["type"] + 1;
-            if ($num == 0) {
-                $data = ['report_time' => time(), "report_status" => $report_status];
-            } else {
-                $data = ['report_time' => time()];
-            }
+
             $type_status = $detail["status"];
-            if ($type_status == 0) {
+            if ($type_status == 0) {//通过
                 ProjectReport::where("id", $param["else_id"])->update(["status" => 1, "update_time" => time()]);
-                $this->CostModel->where('id', $param['project_id'])->strict(false)->update($data);
-            } elseif ($type_status == 3) {
-                ProjectReport::where("id", $param["else_id"])->update(["status" => 4, "update_time" => time()]);
+            }
+            //给业主新增报告审核
+            $where = [
+                ["project_id", "=", $param["project_id"]],
+                ["else_id", "=", $param["else_id"]],//项目报告id
+                ["audit_type", "=", 2]
+            ];
+            $de = Db::name("cost_project")->where("id", $param["project_id"])->field("sent_review_head,sent_review_head_name")->find();
+            if (isset($de)) {
+                $auditData = $this->Auditmodel->where($where)->find()->toArray();
+                $auditData["audit_name"] = "业主报告审核";
+                $auditData["audit_status"] = 1;
+                //$auditData["audit_type"] = 2;
+                $auditData["approver"] = $de["sent_review_head"];
+                $auditData["approver_name"] = $de["sent_review_head_name"];
+                $auditData["create_time"] = time();
+                $auditData["audit_time"] = null;
+                $auditData["remark"] = null;
+                $auditData["audit_remark"] = null;
+                unset($auditData["id"]);
+                try {
+                    $this->Auditmodel->save($auditData);
+                } catch (\Exception $e) {
+                    return to_assign(1, '操作失败,原因:' . $e->getMessage());
+                }
             }
 
             $people = $this->Auditmodel->where('id', $id)->value("sponsor_id");
+
+            $proprietor =Db::name("costProject")->where("id",$detail["project_id"])->value("sent_review_head");
+            if (empty($handle['proprietor'])) {
+                $handle['proprietor'] = (array)$proprietor;
+            } else {
+                $handle['proprietor'] = array_merge($handle['proprietor'], (array)$proprietor);
+            }
             if (empty($handle['company'])) {
                 $handle['company'] = (array)$people;
             } else {
                 $handle['company'] = array_merge($handle['company'], (array)$people);
             }
-            $this->Pushmessage->pushMessage($param['project_id'], $handle['financial'], $handle['company']);
+            $this->Pushmessage->pushMessage($param['project_id'], $handle['financial'], $handle['company'],$handle['proprietor']);
 
-            add_project_log('审批通过', $param['project_id'], "报告审批通过");
+            add_project_log('财政局审批通过', $param['project_id'], "报告审批通过");
         }
 
         return to_assign(0, "操作成功");
@@ -571,7 +567,7 @@ class Report extends BaseController
 
     /**
      * 业主
-     * 同意-报告 (修改)
+     * 同意-报告 (修改)
      */
     public function proprietor_agree_report()
     {
@@ -579,7 +575,7 @@ class Report extends BaseController
         $handle = $this->Pushmessage->handleParam($param);
         $param = $handle['param'];
         $type = isset($param['type']) ? $param['type'] : 0;
-        if (!isset($param["type"])) {
+        if (!isset($param["type"])) {//在审核列表通过
             $id = isset($param['id']) ? $param['id'] : 0;
             $this->model->where("id", $id)->update(["status" => 8]);
             $detail = $this->model->where("id", $id)->find();
@@ -619,14 +615,13 @@ class Report extends BaseController
             $this->Pushmessage->pushMessage($detail["project_id"], $handle['financial'], $handle['company']);
 
 
-        } else {
+        } else {//在项目报告里通过
             $param['audit_time'] = time();
             $this->Auditmodel->where('id', $param['id'])->strict(false)->field(true)->update(["audit_status" => 2, "audit_time" => time()]);
             add_log('edit', $param['id'], $param);
             $id = $param['id'];
             unset($param["id"]);
 
-
             $detail = ProjectReport::where("id", $param["else_id"])->find();
             $num = $this->model->where([
                 ["project_id", "=", $detail["project_id"],
@@ -643,14 +638,15 @@ class Report extends BaseController
                 $data = ['report_time' => time()];
             }
             $type_status = $detail["status"];
-            if ($type_status == 0) {
-                ProjectReport::where("id", $param["else_id"])->update(["status" => 1, "update_time" => time()]);
+            if ($type_status == 1) {//财政局已通过
+                ProjectReport::where("id", $param["else_id"])->update(["status" => 8, "update_time" => time()]);
                 $this->CostModel->where('id', $param['project_id'])->strict(false)->update($data);
-            } elseif ($type_status == 3) {
-                ProjectReport::where("id", $param["else_id"])->update(["status" => 4, "update_time" => time()]);
+            } elseif ($type_status == 4) {//财政局删除已通过
+                ProjectReport::where("id", $param["else_id"])->update(["status" => 10, "update_time" => time()]);
             }
 
             $people = $this->Auditmodel->where('id', $id)->value("sponsor_id");
+
             if (empty($handle['company'])) {
                 $handle['company'] = (array)$people;
             } else {
@@ -658,10 +654,9 @@ class Report extends BaseController
             }
             $this->Pushmessage->pushMessage($param['project_id'], $handle['financial'], $handle['company']);
 
-            add_project_log('审批通过', $param['project_id'], "报告审批通过");
+            add_project_log('业主审批通过', $param['project_id'], "报告审批通过");
         }
 
-
         return to_assign(0, "操作成功");
     }
 
@@ -674,13 +669,13 @@ class Report extends BaseController
         $param = get_params();
         $handle = $this->Pushmessage->handleParam($param);
         $param = $handle['param'];
-        if (!isset($param["type"])) {
+        if (!isset($param["type"])) {//审核列表拒绝
             $id = isset($param['id']) ? $param['id'] : 0;
             $this->model->where("id", $id)->update(["status" => 2]);
 
-
             try {
-                Db::name("project_audit")->where([["else_id", "=", $id]])->update(["audit_status" => 3, "audit_remark" => $param["audit_remark"]]);
+                //全部的都变成已拒绝,修改为仅改变财评的状态
+                Db::name("project_audit")->where([["else_id", "=", $id]])->where("audit_name","财评报告审核")->update(["audit_status" => 3, "audit_remark" => $param["audit_remark"]]);
             } catch (DbException $e) {
                 return to_assign(1, '操作失败,原因:' . $e->getMessage());
             }
@@ -695,24 +690,24 @@ class Report extends BaseController
             $project_id = $this->model->where("id", $id)->value("project_id");
             $this->Pushmessage->pushMessage($project_id, $handle['financial'], $handle['company']);
 
-        } else {
+        } else {//项目报告列表拒绝
             $param = get_params();
             $handle = $this->Pushmessage->handleParam($param);
             $param = $handle['param'];
             try {
-                $param['audit_time'] = time();
+
                 $this->Auditmodel->where('id', $param["id"])->strict(false)->field(true)->update(["audit_status" => 3, "audit_remark" => $param["audit_remark"], "audit_time" => time()]);
 
                 $id = $param['id'];
                 unset($param["id"]);
 
-                $type_status = Db::name("contact")->where("id", $param["else_id"])->value("status");
+                $type_status = Db::name("project_report")->where("id", $param["else_id"])->value("status");
                 if ($type_status == 0) {
                     //新建
-                    Db::name("contact")->where("id", $param["else_id"])->update(["status" => 2, "update_time" => time()]);
+                    Db::name("project_report")->where("id", $param["else_id"])->update(["status" => 2, "update_time" => time()]);
                 } elseif ($type_status == 3) {
                     //删除
-                    Db::name("contact")->where("id", $param["else_id"])->update(["status" => 5, "update_time" => time()]);
+                    Db::name("project_report")->where("id", $param["else_id"])->update(["status" => 5, "update_time" => time()]);
                 }
                 $people = $this->Auditmodel->where('id', $id)->value("sponsor_id");
                 if (empty($handle['company'])) {
@@ -733,7 +728,7 @@ class Report extends BaseController
 
 
     /**
-     * 业主 (修改)
+     * 业主 (修改)
      * 不同意-报告
      */
     public function proprietor_un_report()
@@ -741,18 +736,17 @@ class Report extends BaseController
         $param = get_params();
         $handle = $this->Pushmessage->handleParam($param);
         $param = $handle['param'];
-        if (!isset($param["type"])) {
+        if (!isset($param["type"])) {//项目报告里审核
             $id = isset($param['id']) ? $param['id'] : 0;
-            $this->model->where("id", $id)->update(["status" => 2]);
-
+            $this->model->where("id", $id)->update(["status" => 9]);
 
             try {
-                Db::name("project_audit")->where([["else_id", "=", $id]])->update(["audit_status" => 3, "audit_remark" => $param["audit_remark"]]);
+                //一开始将所有的都改成了拒绝,改成了只改变业主的审批状态
+                Db::name("project_audit")->where([["else_id", "=", $id]])->where("audit_name","业主报告审核")->update(["audit_status" => 3, "audit_remark" => $param["audit_remark"]]);
             } catch (DbException $e) {
                 return to_assign(1, '操作失败,原因:' . $e->getMessage());
             }
 
-
             $people = $this->model->where('id', $id)->value("maker_id");
             if (empty($handle['company'])) {
                 $handle['company'] = (array)$people;
@@ -760,26 +754,26 @@ class Report extends BaseController
                 $handle['company'] = array_merge($handle['company'], (array)$people);
             }
             $project_id = $this->model->where("id", $id)->value("project_id");
-            $this->Pushmessage->pushMessage($project_id, $handle['financial'], $handle['company']);
+            $this->Pushmessage->pushMessage($project_id, [], $handle['company']);
 
-        } else {
+        } else {//审核列表里审核
             $param = get_params();
             $handle = $this->Pushmessage->handleParam($param);
             $param = $handle['param'];
             try {
-                $param['audit_time'] = time();
+                //$param['audit_time'] = time();
                 $this->Auditmodel->where('id', $param["id"])->strict(false)->field(true)->update(["audit_status" => 3, "audit_remark" => $param["audit_remark"], "audit_time" => time()]);
 
                 $id = $param['id'];
                 unset($param["id"]);
 
-                $type_status = Db::name("contact")->where("id", $param["else_id"])->value("status");
-                if ($type_status == 0) {
+                $type_status = Db::name("project_report")->where("id", $param["else_id"])->value("status");
+                if ($type_status == 1) {
                     //新建
-                    Db::name("contact")->where("id", $param["else_id"])->update(["status" => 2, "update_time" => time()]);
-                } elseif ($type_status == 3) {
+                    Db::name("project_report")->where("id", $param["else_id"])->update(["status" => 9, "update_time" => time()]);
+                } elseif ($type_status == 4) {
                     //删除
-                    Db::name("contact")->where("id", $param["else_id"])->update(["status" => 5, "update_time" => time()]);
+                    Db::name("project_report")->where("id", $param["else_id"])->update(["status" => 11, "update_time" => time()]);
                 }
                 $people = $this->Auditmodel->where('id', $id)->value("sponsor_id");
                 if (empty($handle['company'])) {
@@ -787,8 +781,7 @@ class Report extends BaseController
                 } else {
                     $handle['company'] = array_merge($handle['company'], (array)$people);
                 }
-                $this->Pushmessage->pushMessage($param['project_id'], $handle['financial'], $handle['company']);
-
+                $this->Pushmessage->pushMessage($param['project_id'], [], $handle['company']);
 
             } catch (\Exception $e) {
                 return to_assign(1, '操作失败,原因:' . $e->getMessage());
@@ -808,7 +801,8 @@ class Report extends BaseController
         $param = get_params();
         $handle = $this->Pushmessage->handleParam($param);
         $param = $handle['param'];
-        if (!isset($param["type"])) {
+        if (!isset($param["type"])) {//在
+
             $id = isset($param['id']) ? $param['id'] : 0;
             $this->model->where("id", $id)->update(["status" => 4]);
 
@@ -848,37 +842,18 @@ class Report extends BaseController
             }
             $project_id = $this->model->where("id", $id)->value("project_id");
             $this->Pushmessage->pushMessage($project_id, $handle['financial'], $handle['company']);
-        } else {
+        } else {//审核项目里
             $param['audit_time'] = time();
             $this->Auditmodel->where('id', $param['id'])->strict(false)->field(true)->update(["audit_status" => 2, "audit_time" => time()]);
 
             $id = $param['id'];
             unset($param["id"]);
 
-
             $detail = ProjectReport::where("id", $param["else_id"])->find();
-            $num = $this->model->where([
-                ["project_id", "=", $detail["project_id"],
-                    ["type", ">=", $detail["type"]]],
-                ["status", ">", 1],
-                ["status", "<>", 2],
-                ["status", "<", 4]
-            ])->count();
-            //type,0初审,1对数,2审定
-            $report_status = $detail["type"];
-            if ($num == 0) {
-                $data = ['report_time' => time(), "report_status" => $report_status];
-            } else {
-                $data = ['report_time' => time()];
-            }
+
             $type_status = $detail["status"];
-            if ($type_status == 0) {
-                ProjectReport::where("id", $param["else_id"])->update(["status" => 1, "update_time" => time()]);
-                $this->CostModel->where('id', $param['project_id'])->strict(false)->update($data);
-            } elseif ($type_status == 3) {
+            if ($type_status == 3) {
                 ProjectReport::where("id", $param["else_id"])->update(["status" => 4, "update_time" => time()]);
-                Db::name("cost_project")->where("id", $detail["project_id"])->update(["report_status" => $report_status]);
-
             }
 
             $people = $this->Auditmodel->where('id', $id)->value("sponsor_id");

+ 2 - 4
app/admin/view/project/audit/datalist.html

@@ -296,7 +296,6 @@
                             } else if (data.project_status == 7) {
                                 //退审审批
 
-
                                 tool.post("/admin/project.audit/project_edit_third", {
                                     id: data.id,
                                     else_id: data.else_id,
@@ -411,7 +410,7 @@
 
 
                         }
-                        //审批拒绝2
+                        //立项审批拒绝2
                         if (data.audit_type == 0) {
                             if (data.project_status == 2) {
                                 //立项
@@ -426,7 +425,7 @@
                                 }, callback);
                             }
                         }
-                        //拒绝一
+                        //立项审批拒绝一
                         if (data.audit_type == 1) {
                             if (data.project_status == 2) {
                                 //立项
@@ -478,7 +477,6 @@
                             if (data.else_status == 0) {
                                 //报告新建
 
-
                                 tool.post("/admin/project.report/un_report", {
                                     id: data.id,
                                     else_id: data.else_id,

+ 58 - 1
app/admin/view/project/audit/datalist_proprietor.html

@@ -65,7 +65,7 @@
                     align: 'center',
                     width: 100,
                     templet: function (item) {
-                        console.log(item);
+                        //console.log(item);
                         var html = '';
                         if (item.project_status === 1) {
                             html = '<span class="layui-badge layui-bg-orange" style="background-color: #ffb800 !important">立项中</span> ';
@@ -240,6 +240,32 @@
                                 project_status: data.project_status,
                             }, callback);
 
+                    }else if (data.audit_type == 2) {
+                        if (data.else_status == 1) {
+                            //业主审核报告新建
+                            console.log(1)
+                            tool.post("/admin/project.report/proprietor_agree_report", {
+                                id: data.id,
+                                else_id: data.else_id,
+                                audit_type: data.audit_type,
+                                project_id: data.project_id,
+                                project_status: data.project_status,
+                                type: 1000,
+
+                            }, callback);
+
+                        } else if (data.else_status == 4) {
+                            //业主审核报告删除
+                            tool.post("/admin/project.report/proprietor_agree_delete", {
+                                id: data.id,
+                                else_id: data.else_id,
+                                audit_type: data.audit_type,
+                                project_id: data.project_id,
+                                project_status: data.project_status,
+                                type: 1000,
+                            }, callback);
+
+                        }
                     }
 
                     abc = 1;
@@ -293,6 +319,37 @@
                                     audit_remark:text,
                                 }, callback);
 
+                        }else if (data.audit_type == 2) {
+                            if (data.else_status == 1) {
+                                //财评报告新建通过,业主报告新建拒绝
+                                tool.post("/admin/project.report/proprietor_un_report", {
+                                    id: data.id,
+                                    else_id: data.else_id,
+                                    audit_type: data.audit_type,
+                                    project_id: data.project_id,
+                                    project_status: data.project_status,
+                                    audit_remark: text,
+                                    type: 1000,
+
+                                }, callback);
+
+
+                            } else if (data.else_status == 4) {
+                                //财评报告删除通过,业主报告删除拒绝
+                                tool.post("/admin/project.report/proprietor_un_delete", {
+                                    id: data.id,
+                                    else_id: data.else_id,
+                                    audit_type: data.audit_type,
+                                    project_id: data.project_id,
+                                    project_status: data.project_status,
+                                    audit_remark: text,
+                                    type: 1000,
+
+                                }, callback);
+
+
+                            }
+
                         }
 
                     }

+ 17 - 9
app/admin/view/project/cost/project_report.html

@@ -62,18 +62,26 @@
                     }},
                 {field: 'status', title: '审批状态', align: 'center', width: 150,templet:function (d){
                         var abc = '';
-                        if(d.status==0){
+                        if (d.status == 0) {
                             abc = "<span>未审核(新建)</span>";
-                        }else if(d.status==1){
-                            abc = "<span>已通过(新建)</span>";
-                        }else if(d.status==2){
-                            abc = "<span>已拒绝(新建)</span>";
-                        }else if(d.status==3){
+                        } else if (d.status == 1) {
+                            abc = "<span>财政局已通过,待业主审核(新建)</span>";
+                        } else if (d.status == 2) {
+                            abc = "<span>财政局已拒绝(新建)</span>";
+                        } else if (d.status == 3) {
                             abc = "<span>未审核(删除)</span>";
-                        }else if(d.status==4){
-                            abc = "<span>已通过(删除)</span>";
-                        }else if(d.status==5){
+                        } else if (d.status == 4) {
+                            abc = "<span>财政局已通过,待业主审核(删除)</span>";
+                        } else if (d.status == 5) {
                             abc = "<span>已拒绝(删除)</span>";
+                        }else if (d.status ==8){
+                            abc = "<span>业主已通过(新建)</span>";
+                        }else if (d.status ==9){
+                            abc = "<span>业主拒绝(新建)</span>";
+                        }else if (d.status == 10) {
+                            abc = "<span>业主已通过(删除)</span>";
+                        } else if (d.status == 11) {
+                            abc = "<span>业主已拒绝(删除)</span>";
                         }
                         return abc;
                     }

+ 2 - 2
app/admin/view/project/cost_proprietor/datalist.html

@@ -532,9 +532,9 @@
                             // 1全部-可查看可编辑,2全部-可查看,0与我有关
                             if (a.self_id == 1) {
                                 if (a.proprietor_status< 1) {
-                                    h = '<a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a><div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
+                                    h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>'
                                 } else {
-                                    h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
+                                    h = '<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a></div>'
                                 }
                             } else if (a.self_id == 2) {
                                 h = '<div class="layui-btn-group"><a class="layui-btn layui-btn-xs layui-bg-blue" lay-event="read">查看</a></div>'

+ 2 - 2
app/admin/view/project/cost_proprietor/edit_report.html

@@ -103,9 +103,9 @@
                         var html = '<div class="layui-btn-group">';
                         var btn1 = `<a class="layui-btn layui-btn-xs layui-bg-blue" href=${d.filepath} download=${d.name} lay-event="">下载</a>`;
                         var btn2 = '';
-                        if (d.status == 0) {
+                        if (d.status == 1) {
                             btn2 = '<span class="layui-btn  layui-btn-xs" lay-event="agree_report">同意</span><span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="un_report">拒绝</span>';
-                        } else if (d.status == 3) {
+                        } else if (d.status == 4) {
                             btn2 = '<span class="layui-btn  layui-btn-xs" lay-event="agree_del">同意</span><span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="unagree_del">拒绝</span>';
                         }
                         return html + btn1 + btn2 + '</div>';

+ 7 - 7
app/admin/view/project/cost_proprietor/project_user.html

@@ -3,7 +3,7 @@
 </div>
 <script type="text/html" id="toolbaruser">
     <div class="layui-btn-container">
-        <button class="layui-btn layui-btn-sm" lay-event="add">+ 新增送审单位成员</button>
+<!--        <button class="layui-btn layui-btn-sm" lay-event="add">+ 新增送审单位成员</button>-->
 <!--        <button class="layui-btn layui-btn-sm" lay-event="adda">+ 新增施工单位成员</button>-->
 
     </div>
@@ -32,12 +32,12 @@
                 {field: 'mobile', title: '手机号码', align: 'center', rowspan: 2},
                 {field: 'email', title: '单位邮箱', align: 'center', rowspan: 2},
                 {
-                    title: '操作', fixed: 'right', align: 'center', width: 150, rowspan: 2, templet: function (d) {
-                        var html = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</span>';
-
-
-                        return html;
-                    }
+                    // title: '操作', fixed: 'right', align: 'center', width: 150, rowspan: 2, templet: function (d) {
+                    //     // var html = '<span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</span>';
+                    //
+                    //
+                    //     return html;
+                    // }
                 }
             ]]
         });

+ 113 - 0
app/admin/view/project/report/view_proprietor.html

@@ -0,0 +1,113 @@
+{extend name="common/base"/}
+{block name="style"}
+<link rel="stylesheet" href="{__GOUGU__}/third_party/prism/prism.css"/>
+<style>
+    .footer{
+        display: none;
+    }
+    
+    #fileBox li{
+        display: flex;
+        flex-wrap: wrap;
+        flex-direction: column;
+    }
+    
+    .layui-btn-group{
+        text-align: center;
+    }
+
+    #fileBox p{
+        margin: 3px 0 5px 0;
+        width: 11vw;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        text-align: center;
+    }
+
+    .upimg {
+        width: 250px;
+        height: 250px;
+    }
+
+    #fileBox img {
+        height: auto !important;
+    }
+
+    #fileBox{
+        width: 100%;
+        overflow: auto;
+        justify-content:flex-start;
+        align-content: space-between;
+        flex-direction: column-reverse;
+        flex-wrap: wrap;
+        display: flex;
+    }
+    
+    #fileBox li{
+        padding: 0.5vw 0.8vw 0.5vw 0.8vw;
+		white-space: nowrap;  
+    	overflow: hidden;       
+    	text-overflow: ellipsis;
+    	/*display: inline-block;*/
+		border-right: 1px solid #e2e2e2;
+        float: left;
+	 }
+.text-detial-ops{line-height: 30px; color:#999; font-size: 12px; padding: 12px 0;}
+.text-detial-ops span{margin-right: 20px;}
+.text-detial-ops a{margin-right:10px;}
+.text-detial-content{padding: 8px 0; color:#333; word-break: break-all; border-top:1px solid #e8e8e8;font-size: 16px!important; line-height: 1.72!important;}
+.text-detial-content p{padding: 8px 0;}
+.text-detial-content img{max-width:98%!important; margin:0 auto; display:block; border: 1px solid #e6e6e6; -webkit-box-shadow: 0 2px 6px rgba(26,26,26,.08); box-shadow: 0 2px 6px rgba(26,26,26,.08); border-radius: 4px;}
+.text-detial-content h1,.text-detial-content h2,.text-detial-content h3,.text-detial-content h4,.text-detial-content h5{margin-top:10px;}
+.text-detial-content a{color:#186AF2; font-style:italic;}
+.text-detial-content a:hover{text-decoration:underline;}
+
+.text-detial-content p code,.blog-detial-content pre{margin:0 3px;font-size: 14px; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; background: #f6f6f6; padding: 10px; border-radius: 2px;}
+.text-detial-content p code{border: 1px solid #eee;padding: 2px 4px;}
+.text-detial-content table {border-collapse: collapse; border-spacing: 0; display: block; width: 100%; overflow: auto;  word-break: normal;word-break: keep-all; margin-top: 0;margin-bottom: 16px;}
+.text-detial-content table tr {background-color: #fff;border-top: 1px solid #ccc;}
+.text-detial-content table tr:nth-child(2n) {background-color: #f8f8f8;}
+.text-detial-content table td, .blog-detial-content table th { padding: 6px 12px;border: 1px solid #ddd; font-size:14px; }
+.text-detial-content table th {font-weight: 800;}
+.text-detial-content li {list-style: initial;margin-left: 20px;}
+:not(pre)>code[class*=language-], pre[class*=language-]{background:#fff!important;border:1px solid #e8e8e8!important; border-radius:3px;}
+</style>
+{/block}
+<!-- 主体 -->
+{block name="body"}
+<form class="layui-form p-4">
+	<h1>{$detail.title}</h1>
+	<div class="text-detial-ops">
+		<span>{$detail.maker_name}发表于:{$detail.create_time | date='Y-m-d H:i:s'}</span>
+	</div>
+	<div class="text-detial-content">
+	{$detail.content|raw}
+	</div>
+</form>
+<div class="layui-card border-y">
+	<div class="layui-row p-2" id="fileBox">
+		{:fileCard($file_array)}
+		{empty name="$file_array" }
+		<div class="layui-data-none">暂无附件</div>
+		{/empty}
+	</div>
+</div>
+
+
+{/block}
+<!-- 脚本 -->
+{block name="script"}
+<script src="{__GOUGU__}/third_party/prism/prism.js"></script>
+<script>
+	function gouguInit(){
+		$('#filesBox').on('click', '.file-del', function () {
+
+			layer.msg("不可删除")
+
+		})
+	}
+	
+
+</script>
+{/block}
+<!-- /脚本 -->