瀏覽代碼

办公室意见修改

q 1 年之前
父節點
當前提交
70949c0885

+ 14 - 10
webmain/flow/page/input_meeting.html

@@ -27,22 +27,26 @@
         <td colspan="5" class="ys2">{title}</td>
     </tr>
     <tr>
+        <td height="34" align="right" class="ys1">*^meet_dev^</td>
+        <td colspan="5" class="ys2">{meet_dev}</td>
+    </tr>
+    <tr>
         <td height="34" align="right" class="ys1">^remark^</td>
         <td colspan="5" class="ys2">{remark}</td>
     </tr>
     </tbody>
 </table><br/>
-<div><b>会议室安排</b></div>
+<!--<div><b>会议室安排</b></div>-->
 
-<table width="100%" border="0" class="ke-zeroborder">
-    <tbody>
-    <tr class="autoyijianview">
-        <td height="34" width="10%" align="right" class="ys1">*^meeting_room^</td>
-        <td class="ys2" colspan="3">{meeting_room}</td>
+<!--<table width="100%" border="0" class="ke-zeroborder">-->
+<!--    <tbody>-->
+<!--    <tr class="autoyijianview">-->
+<!--        <td height="34" width="10%" align="right" class="ys1">*^meeting_room^</td>-->
+<!--        <td class="ys2" colspan="3">{meeting_room}</td>-->
 
-    </tr>
-    </tbody>
-</table><br/>
+<!--    </tr>-->
+<!--    </tbody>-->
+<!--</table><br/>-->
 <div><b>就餐安排</b></div>
 <table width="100%" border="0" class="ke-zeroborder">
     <tbody>
@@ -90,4 +94,4 @@
     </tr>
     </tbody>
 </table>
-{room_id}
+<!--{room_id}-->

+ 4 - 0
webmain/flow/page/view_meeting_0.html

@@ -27,6 +27,10 @@
         <td colspan="5" class="ys2">{title}</td>
     </tr>
     <tr>
+        <td height="34" align="right" class="ys1">^meet_dev^</td>
+        <td colspan="5" class="ys2">{meet_dev}</td>
+    </tr>
+    <tr>
         <td height="34" align="right" class="ys1">^remark^</td>
         <td colspan="5" class="ys2">{remark}</td>
     </tr>

+ 57 - 16
webmain/model/flow/meetingModel.php

@@ -115,8 +115,10 @@ class flow_meetingClassModel extends flowModel
 
         // 将id转换为文字
         $rs['meet_state'] = $this->getstatezt($zt);
-        if (!empty($room_id)) $rs['room_id'] = $this->meeting_room[$room_id]['room_name'];
+        if (!empty($room_id)) $rs['room_id'] = $this->meeting_room[$room_id]['room_name']."({$this->meeting_room[$room_id]['desc']})"; // 会议室Id替换会议室名
         $rs['state_info'] = $this->getApproval($rs['nowcheckname'] ?? '');
+        $meet_dev = ["不需要", "视频会议", "LED屏"];
+        $rs['meet_dev'] = $rs['meet_dev'] == 0 ? $meet_dev[$rs['meet_dev']] : "<font color=red>".$meet_dev[$rs['meet_dev']]."</font>";
 
         return $rs;
     }
@@ -185,22 +187,37 @@ class flow_meetingClassModel extends flowModel
 //            ];
 //
 //            m('meeting_key')->update($data, "id={$this->id}");
-        } else if ($ors['num'] == "noup") {
-
-            //  动作名
-            if ($ors['actname'] == "change_room") {
-                $data = $this->rs;
-                $roomName = $this->meeting_room[$data['room_id']]['room_name'];
-                if (!empty($roomName)) {
-                    $this->update([
-                        "meeting_room"=>$roomName,
-                    ], "id={$this->id}");
-
-                    // 更换会议室 - 发送会议短信
-                    $this->meetingSms($this->id);
-                }
+        } else if ($ors['num'] == "noup_chage_room") {
+            $data = $this->rs;
+            $roomName = $this->meeting_room[$data['room_id']]['room_name'];
+            $isApply = m('meeting')->isapplymsg($this->rs['start_time'], $this->rs['end_time'], $roomName, $this->id, 1);
+
+            if (empty($isApply)) {
+                $this->update([
+                    "meeting_room"=>$roomName,
+                ], "id={$this->id}");
+
+                // 更换会议室 - 发送会议短信
+                $this->meetingSms($this->id);
+            } else {
+                return $isApply;
             }
+        }
+    }
 
+
+    //操作菜单操作之前
+    protected function flowoptmenubefore($ors, $arr)
+    {
+        if($ors['num']=='noup_chage_room') {
+            $room_id = $this->rock->post('fields_room_id');
+            $room = m("meeting_room")->getone("id={$room_id}", 'room_name');
+            $roomName = $room['room_name'];
+            $isApply = m('meeting')->isapplymsg($this->rs['start_time'], $this->rs['end_time'], $roomName, $this->id, 1);
+
+            if (!empty($isApply)) {
+                return $isApply;
+            }
         }
     }
 
@@ -210,10 +227,30 @@ class flow_meetingClassModel extends flowModel
 //        m('meet_sys')->deleteMeetingRoom($this->rs);
     }
 
+
+    //审核之前调用$zt 状态, $sm说明
+    protected function flowcheckbefore($zt, $sm){
+        $haha = $this->rs['room_id'];
+        $meet_room = $sm['room_id'];
+        $meet_room = $sm['meeting_room'];
+        $meeting = m('meeting')->getone("room_id={$meet_room} and ");
+        $isApply = m('meeting')->isapplymsg($this->rs['start_time'], $this->rs['end_time'], $meet_room, $this->id, 1);
+        if ($this->nowcourse['step'] == 2 && !empty($isApply)) {
+            return [
+                "msg"=>$isApply
+            ];
+        }
+        return null;
+
+    }
+
     //审核完成后调用
     protected function flowcheckafter($zt, $sm){
         // 发送会议短信
 //        $this->meetingSms($this->id);
+        $haha = $this->rs['room_id'];
+        return false;
+
 
     }
 
@@ -225,7 +262,9 @@ class flow_meetingClassModel extends flowModel
 
     }
 
+    // 自定义方法
 
+    // 状态样式
     public function getstatezt($zt)
     {
         if (isset($this->hyarrb[$zt])) {
@@ -236,6 +275,7 @@ class flow_meetingClassModel extends flowModel
         }
     }
 
+    // 审核样式
     public function getApproval($names) {
         if (empty($names)) {
             $html = '<font style="background-color:#00c959; padding: 2px 8px; border-radius: 4px; color: #fff">已审核</font>';
@@ -246,6 +286,7 @@ class flow_meetingClassModel extends flowModel
         }
     }
 
+    // 短信发送
     public function meetingSms($meetId) {
 
         if (empty($meetId)) {
@@ -323,7 +364,7 @@ class flow_meetingClassModel extends flowModel
                 ];
             }
 
-            if (count($depts['phoneNum']) > 0) {
+            if (isset($depts['phoneNum']) && count($depts['phoneNum']) > 0) {
                 m('send_sms')->sendBatchSms($depts['phoneNum'], $depts['para'], 1);
             }
         }

+ 74 - 4
webmain/model/flow/meeting_keyModel.php

@@ -66,13 +66,33 @@ class flow_meeting_keyClassModel extends flowModel
             }
         }
         // 会议开始时的处理
-        if ($stime <= $time && $etime > $time) {
+        if (($stime <= $time && $etime > $time) || ($is_hand == 1 && $zt == 1)) {
             $nzt = 1;
             // 会议开始,议题自动调整开始第一项
-            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state', 'sort');
+            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state, topic_title', 'sort');
             if (isset($topic['id']) && $topic['topic_state'] < 2) {
                 m('meeting')->firstMeetingTopicStart($this->id);
+                // 当前议题
             }
+
+            // 展示近几个议题状态
+            $topics = m('meeting_topics')->getall("mid={$this->id}",'id, topic_state, topic_title', 'sort');
+            for ($i = 0; $i < count($topics); $i++) {
+                $topic = $topics[$i];
+                if ($topic['topic_state'] == 3) {
+                    $rs['topic'] = $this->getTopicInfoState($topic);
+                }
+                if ($topic['topic_state'] == 1) {
+                    $rs['topic'] .= $this->getTopicInfoState($topic);
+                }
+                if ($topic['topic_state'] == 2) {
+                    $rs['topic'] .= $this->getTopicInfoState($topic);
+                }
+            }
+
+        } else {
+            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state, topic_title', 'sort desc');
+            $rs['topic'] = $this->getTopicState($topic['topic_state']).$topic['topic_title'];
         }
 
         // 更新数据状态
@@ -92,8 +112,8 @@ class flow_meeting_keyClassModel extends flowModel
     // $ors当前单据操作信息,$crs提交过来的信息
     public function flowoptmenu($ors, $crs)
     {
-        // 切换会议议题
-        if ($ors['num'] == 'changeTopic') {
+        if ($ors['num'] == 'nextTopic') {
+            // 下一议题
             $topics = $this->db->getall("select * from `[Q]meeting_topics` where mid = {$this->id} order by sort");
 
             for ($i = 0; $i < count($topics); $i++) {
@@ -122,6 +142,43 @@ class flow_meeting_keyClassModel extends flowModel
                 m('meeting_key')->update(['is_hand' => 1, 'meet_state' => 2], "id={$this->id}");
             }
 
+        } else if ($ors['num'] == 'preTopic') {
+            // 上一议题
+            $topics = $this->db->getall("select * from `[Q]meeting_topics` where mid = {$this->id} order by sort");
+            $is_end = 1;
+            for ($i = 0; $i < count($topics); $i++) {
+                // 找到结束议题
+                if ($topics[$i]['topic_state'] == 2) {
+                    $id = $topics[$i]['id'];
+                    // 恢复到上一状态
+                    $data = [
+                        'topic_state' => $topics[$i]['topic_state'] - 1
+                    ];
+                    m('meeting_topics')->update($data, "id={$id}");
+                    // 更新上一个状态
+                    if (isset($topics[$i - 1]['topic_state'])) {
+                        $id = $topics[$i - 1]['id'];
+                        $data = ['topic_state' => 2];
+                        m('meeting_topics')->update($data, "id={$id}");
+                    }
+                    // 更新下一个状态
+                    if (isset($topics[$i + 1]['topic_state'])) {
+                        $id = $topics[$i + 1]['id'];
+                        $data = ['topic_state' => 0];
+                        m('meeting_topics')->update($data, "id={$id}");
+                    }
+                    if (isset($topics[$i + 2]['topic_state'])) {
+                        $id = $topics[$i + 2]['id'];
+                        $data = ['topic_state' => 0];
+                        m('meeting_topics')->update($data, "id={$id}");
+                    }
+                    $is_end = 0;
+                    break;
+                }
+            }
+            if ($is_end == 1 && isset($topics[$i - 1])) {
+                m('meeting_topics')->update(['topic_state'=>2], "id={$topics[$i-1]['id']}");
+            }
         } else if ($ors['num'] == 'enableMeeting') {
 
             $time 		 = time();
@@ -187,4 +244,17 @@ class flow_meeting_keyClassModel extends flowModel
         }
     }
 
+    public function getTopicInfoState($topic)
+    {
+        $zt = $topic['topic_state'];
+        $colors = ["#ff83ec", "#ff8b1a", "#00c959", "#ff4974"];
+        $title = ["【等待议题】", "【下一议题】", "【当前议题】", "【上一议题】"];
+        $info = str_replace("\n", "", $title[$zt].":".$topic['topic_title']);
+        if (isset(m('meeting')->hyarrb[$zt])) {
+            $html = '<font style="color:'.$colors[$zt].'; padding: 4px 8px; border-radius: 4px;">'.$info.'</font>.<br />';
+            return $html;
+        } else {
+            return null;
+        }
+    }
 }