ss 1 年之前
父節點
當前提交
e947b03f08

+ 0 - 2
application/admin/view/index/def2.html

@@ -221,8 +221,6 @@
 
     })
 
-
-
 </script>
 {/block}
 

+ 1 - 1
application/admin/view/supervise/index.html

@@ -68,7 +68,7 @@
             height: 'auto',
             emptyrecords: "暂无数据",
             sortorder: "asc",
-            caption:"品质督列表",
+            caption:"品质督列表",
             loadComplete: function (xhr) {
                 if(xhr.code==0){
                     layer.msg(xhr.msg);

文件差異過大導致無法顯示
+ 1764 - 0
application/api/controller/screen/Onelevel.php


文件差異過大導致無法顯示
+ 2241 - 0
application/api/controller/screen/Threelevel.php


+ 623 - 0
application/h5/controller/Todo.php

@@ -0,0 +1,623 @@
+<?php
+namespace app\h5\controller;
+
+use app\hander\HelpHander;
+use EasyWeChat\Factory;
+use think\Controller;
+use think\Db;
+
+class Todo extends Controller
+{
+    private $spOrgId = 5; //国天sp 厦门中山医院
+    private $bjOrgId = 11; //霸洁云 贵州省黔西市人民医院
+    private $xcOrgId = 18; //新城悦 嘉善县中医院
+
+    public function lists(){
+        $dd = think_decrypt(input('orgId','','trim'));
+        if(!$dd){
+            HelpHander::error('参数错误');
+        }
+        $dd = explode('|',$dd);
+        if(count($dd) != 2){
+            HelpHander::error('参数错误');
+        }
+        $orgId = (int)$dd[0];
+
+        $this->assign('orgId',input('orgId','','trim'));
+
+        if($orgId == 3){
+//            $data = [];
+//            $header = ['状态', '类型', '始发地', '目的地', '需求时间', '执行人', '派工时间', '接收时间'];
+//            if($mode == 1){
+//                $header = ['状态', '科室', '报修事项', '内容', '下单时间'];
+//            }else if($mode == 2||$mode == 4){
+//                $header = ['状态', '科室', '内容', '下单时间'];
+//            }
+            $lists = gtspdb('orders')
+                ->where('ORG_ID',$this->spOrgId)
+                ->where('CURR_ORDER_MODE','in',[1,5])
+//                ->where('WORK_TYPE_MODE',$mode)
+                ->where('DEL_REF',0)
+                ->order('ORDER_ID DESC')
+                ->limit(20)
+                ->field('ORDER_ID as id,CURR_ORDER_MODE as order_mode,CREATTE_TIME as create_time,SEND_TIME as send_time,CONTENT as content,DEP_ID as dep_id,WORK_TYPE_MODE as mode')
+                ->select();
+            foreach ($lists as $k=>$v){
+                $dep = gtspdb('org')->where('ORG_ID',$v['dep_id'])->value('NAME');
+                $status = gtspdb('order_mode')->where('ORDER_MODE',$v['order_mode'])->value('OUT_CONTENT');
+                $lists[$k]['dep'] = $dep;
+                $lists[$k]['status'] = $status;
+
+                $todos = gtspdb('todo')
+                    ->alias('t')
+                    ->join('user u','u.USER_ID = t.TO_USER_ID')
+                    ->where('t.ORDER_ID',$v['id'])
+                    ->where('t.DEL_REF',0)
+                    ->where('t.TODO_MODE','in',[1,2,3])
+                    ->field('t.CONFIRM_TIME,u.REAL_NAME')
+                    ->select();
+                $todos = $todos?$todos:[];
+                $unames = [];
+                foreach ($todos as $tk=>$tv){
+                    $unames[] = $tv['REAL_NAME'];
+                }
+                $un = $unames?implode(',',$unames):'';
+                $lists[$k]['names'] = $un;
+            }
+
+        }elseif ($orgId == 24){
+//            $data = [];
+//            $header = ['状态', '类型', '始发地', '目的地', '需求时间', '执行人', '派工时间', '接收时间'];
+//            if($mode == 1){
+//                $header = ['状态', '科室', '报修事项', '内容', '下单时间'];
+//            }else if($mode == 2||$mode == 4){
+//                $header = ['状态', '科室', '内容', '下单时间'];
+//            }
+            $lists = bjydb('orders')
+                ->where('org_id',$this->bjOrgId)
+                ->where('order_mode','in',[1,4])
+//                ->where('work_type_mode',$mode)
+                ->where('del',0)
+                ->order('id desc')
+                ->limit(20)
+                ->field('id,order_mode,create_time,send_time,content,dep_id,work_type_mode as mode')
+                ->select();
+            foreach ($lists as $k=>$v){
+                $dep = bjydb('dep')->where('id',$v['dep_id'])->value('title');
+                $status = bjydb('order_mode')->where('id',$v['order_mode'])->value('out_content');
+                $lists[$k]['dep'] = $dep;
+                $lists[$k]['status'] = $status;
+
+                $todos = bjydb('todo')
+                    ->alias('t')
+                    ->join('user u','u.id = t.to_user_id')
+                    ->where('t.order_id',$v['id'])
+                    ->where('t.del',0)
+                    ->where('t.todo_mode','in',[1,2,3])
+                    ->field('t.confirm_time,u.real_name')
+                    ->select();
+                $todos = $todos?$todos:[];
+                $unames = [];
+                foreach ($todos as $tk=>$tv){
+                    $unames[] = $tv['real_name'];
+                }
+                $un = $unames?implode(',',$unames):'';
+                $lists[$k]['names'] = $un;
+            }
+        }elseif ($orgId == 26){
+//            $data = [];
+//            $header = ['状态', '类型', '始发地', '目的地', '需求时间', '执行人', '派工时间', '接收时间'];
+//            if($mode == 1){
+//                $header = ['状态', '科室', '报修事项', '内容', '下单时间'];
+//            }else if($mode == 2||$mode == 4){
+//                $header = ['状态', '科室', '内容', '下单时间'];
+//            }
+            $lists = xcydb('orders')
+                ->where('org_id',$this->xcOrgId)
+                ->where('order_mode','in',[1,4])
+//                ->where('work_type_mode',$mode)
+                ->where('del',0)
+                ->order('id desc')
+                ->limit(20)
+                ->field('id,order_mode,create_time,send_time,content,dep_id,work_type_mode as mode')
+                ->select();
+            foreach ($lists as $k=>$v){
+                $dep = xcydb('dep')->where('id',$v['dep_id'])->value('title');
+                $status = xcydb('order_mode')->where('id',$v['order_mode'])->value('out_content');
+                $lists[$k]['dep'] = $dep;
+                $lists[$k]['status'] = $status;
+
+                $todos = xcydb('todo')
+                    ->alias('t')
+                    ->join('user u','u.id = t.to_user_id')
+                    ->where('t.order_id',$v['id'])
+                    ->where('t.del',0)
+                    ->where('t.todo_mode','in',[1,2,3])
+                    ->field('t.confirm_time,u.real_name')
+                    ->select();
+                $todos = $todos?$todos:[];
+                $unames = [];
+                foreach ($todos as $tk=>$tv){
+                    $unames[] = $tv['real_name'];
+                }
+                $un = $unames?implode(',',$unames):'';
+                $lists[$k]['names'] = $un;
+            }
+        }else{
+//            if($mode == 1){
+//                $header = ['状态', '科室', '报修事项', '内容', '下单时间'];
+//            }else if($mode == 2||$mode == 4){
+//                $header = ['状态', '科室', '内容', '下单时间'];
+//            }
+            $lists = Db::name('orders')
+                ->where('org_id',$orgId)
+                ->where('order_mode','in',[1,4])
+//                ->where('work_type_mode',$mode)
+                ->where('del',0)
+                ->order('id desc')
+                ->limit(20)
+                ->field('id,order_mode,create_time,send_time,content,dep_id,work_type_mode as mode')
+                ->select();
+            foreach ($lists as $k=>$v){
+                $dep = Db::name('dep')->where('id',$v['dep_id'])->value('title');
+                $status = Db::name('order_mode')->where('id',$v['order_mode'])->value('out_content');
+                $lists[$k]['dep'] = $dep;
+                $lists[$k]['status'] = $status;
+
+                $todos = Db::name('todo')
+                    ->alias('t')
+                    ->join('user u','u.id = t.to_user_id')
+                    ->where('t.order_id',$v['id'])
+                    ->where('t.del',0)
+                    ->where('t.todo_mode','in',[1,2,3])
+                    ->field('t.confirm_time,u.real_name')
+                    ->select();
+                $todos = $todos?$todos:[];
+                $unames = [];
+                foreach ($todos as $tk=>$tv){
+                    $unames[] = $tv['real_name'];
+                }
+                $un = $unames?implode(',',$unames):'';
+                $lists[$k]['names'] = $un;
+            }
+        }
+        $this->assign('lists',$lists);
+        return $this->fetch();
+    }
+
+    public function detail(){
+        $dd = think_decrypt(input('orgId','','trim'));
+        if(!$dd){
+            HelpHander::error('参数错误');
+        }
+        $dd = explode('|',$dd);
+        if(count($dd) != 2){
+            HelpHander::error('参数错误');
+        }
+        $orgId = (int)$dd[0];
+
+        $this->assign('orgId',input('orgId','','trim'));
+        $id = input('id/d',0);
+        $type = input('type/d',0);
+        $this->assign('type',$type);
+
+        if($orgId == 3 && $type == 0){
+            $info = gtspdb('orders')
+                ->where('ORG_ID',$this->spOrgId)
+                ->where('ORDER_ID',$id)
+                ->where('DEL_REF',0)
+                ->field('ORDER_ID as id,CURR_ORDER_MODE as order_mode,CREATTE_TIME as create_time,SEND_TIME as send_time,CONTENT as content,DEP_ID as dep_id,WORK_TYPE_MODE as mode')
+                ->find();
+            if($info){
+                $dep = gtspdb('org')->where('ORG_ID',$info['dep_id'])->value('NAME');
+
+                $status = gtspdb('order_mode')->where('ORDER_MODE',$info['order_mode'])->value('OUT_CONTENT');
+                $info['dep'] = $dep;
+                $info['status'] = $status;
+
+                $todos = gtspdb('todo')
+                    ->alias('t')
+                    ->join('user u','u.USER_ID = t.TO_USER_ID')
+                    ->where('t.ORDER_ID',$info['id'])
+                    ->where('t.DEL_REF',0)
+                    ->where('t.TODO_MODE','in',[1,2,3])
+                    ->column('u.REAL_NAME');
+                $un = $todos?implode(',',$todos):'';
+                $info['names'] = $un;
+
+                if($info['mode'] == 1){
+                    $type = gtspdb('order_repair')
+                        ->alias('or')
+                        ->leftJoin('order_type ot','ot.ORDER_TYPE_ID = or.TYPE_ID')
+                        ->where('or.ORDER_ID',$info['id'])
+                        ->value('NAME');
+                    $info['repair_name'] = $type?$type:'';
+                }else if($info['mode'] == 3){
+                    $convey = gtspdb('order_convey')
+                        ->alias('oc')
+                        ->join('convey_cate cc','cc.ID = oc.TYPE')
+                        ->where('oc.ORDER_ID',$info['id'])
+                        ->field('oc.*,cc.NAME as cate_title')
+                        ->find();
+                    $info['cate_title'] = '';
+                    $info['start'] = '';
+                    $info['end'] = '';
+                    if($convey){
+                        $sa = gtspdb('address')->where('ADDRESS_ID',$convey['START'])->find();
+                        $sa1  =  $ea1 = '';
+                        if($sa){
+                            $sa1 = gtspdb('address')->where('PARENT_ID',$sa['ADDRESS_ID'])->value('NAME');
+                        }
+
+                        $start = $sa1.$sa['NAME'];
+                        $info['start'] = $start;
+
+                        $ea = gtspdb('address')->where('ADDRESS_ID',$convey['END'])->find();
+                        if($ea){
+                            $ea1 = gtspdb('address')->where('PARENT_ID',$sa['ADDRESS_ID'])->value('NAME');
+                        }
+
+                        $end = $ea1.$ea['NAME'];
+                        $info['end'] = $end;
+
+                        $info['cate_title'] = $convey['cate_title'];
+                    }
+                }
+            }
+        }elseif ($orgId == 24 && $type == 0){
+            $info = bjydb('orders')
+                ->where('org_id',$this->bjOrgId)
+                ->where('id',$id)
+                ->where('del',0)
+                ->field('id,order_mode,create_time,send_time,content,dep_id,work_type_mode as mode')
+                ->find();
+            if($info){
+                $dep = bjydb('dep')->where('id',$info['dep_id'])->value('title');
+                $status = bjydb('order_mode')->where('id',$info['order_mode'])->value('out_content');
+                $info['dep'] = $dep;
+                $info['status'] = $status;
+
+                $todos = bjydb('todo')
+                    ->alias('t')
+                    ->join('user u','u.id = t.to_user_id')
+                    ->where('t.order_id',$info['id'])
+                    ->where('t.del',0)
+                    ->where('t.todo_mode','in',[1,2,3])
+                    ->column('u.real_name');
+                $un = $todos?implode(',',$todos):'';
+                $info['names'] = $un;
+
+                if($info['mode'] == 1){
+                    $type = bjydb('order_repair')
+                        ->alias('or')
+                        ->leftJoin('order_type ot','ot.id = or.type_id')
+                        ->where('or.order_id',$info['id'])
+                        ->value('title');
+                    $info['repair_name'] = $type?$type:'';
+                }else if($info['mode'] == 3){
+                    $convey = bjydb('order_convey')
+                        ->alias('oc')
+                        ->join('convey_cate cc','cc.id = oc.type')
+                        ->where('oc.order_id',$info['id'])
+                        ->field('oc.*,cc.title as cate_title')
+                        ->find();
+                    $info['cate_title'] = '';
+                    $info['start'] = '';
+                    $info['end'] = '';
+                    if($convey){
+                        $start = bjydb('address')->where('id',$convey['start'])->value('title');
+                        $end = bjydb('address')->where('id',$convey['end'])->value('title');
+                        $info['start'] = $start;
+                        $info['end'] = $end;
+                        $info['cate_title'] = $convey['cate_title'];
+                    }
+                }
+            }
+
+        }elseif ($orgId == 26 && $type == 0){
+            $info = xcydb('orders')
+                ->where('org_id',$this->xcOrgId)
+                ->where('id',$id)
+                ->where('del',0)
+                ->field('id,order_mode,create_time,send_time,content,dep_id,work_type_mode as mode')
+                ->find();
+            if($info){
+                $dep = xcydb('dep')->where('id',$info['dep_id'])->value('title');
+                $status = xcydb('order_mode')->where('id',$info['order_mode'])->value('out_content');
+                $info['dep'] = $dep;
+                $info['status'] = $status;
+
+                $todos = xcydb('todo')
+                    ->alias('t')
+                    ->join('user u','u.id = t.to_user_id')
+                    ->where('t.order_id',$info['id'])
+                    ->where('t.del',0)
+                    ->where('t.todo_mode','in',[1,2,3])
+                    ->column('u.real_name');
+                $un = $todos?implode(',',$todos):'';
+                $info['names'] = $un;
+
+                if($info['mode'] == 1){
+                    $type = xcydb('order_repair')
+                        ->alias('or')
+                        ->leftJoin('order_type ot','ot.id = or.type_id')
+                        ->where('or.order_id',$info['id'])
+                        ->value('title');
+                    $info['repair_name'] = $type?$type:'';
+                }else if($info['mode'] == 3){
+                    $convey = xcydb('order_convey')
+                        ->alias('oc')
+                        ->join('convey_cate cc','cc.id = oc.type')
+                        ->where('oc.order_id',$info['id'])
+                        ->field('oc.*,cc.title as cate_title')
+                        ->find();
+                    $info['cate_title'] = '';
+                    $info['start'] = '';
+                    $info['end'] = '';
+                    if($convey){
+                        $start = xcydb('address')->where('id',$convey['start'])->value('title');
+                        $end = xcydb('address')->where('id',$convey['end'])->value('title');
+                        $info['start'] = $start;
+                        $info['end'] = $end;
+                        $info['cate_title'] = $convey['cate_title'];
+                    }
+                }
+            }
+
+        }else{
+            if($type == 1){
+                $orgId = 3; // 停车场违停订单
+                $id = '539';
+            }
+            $info = Db::name('orders')
+                ->where('org_id',$orgId)
+                ->where('id',$id)
+                ->where('del',0)
+                ->field('id,order_mode,create_time,send_time,content,dep_id,work_type_mode as mode')
+                ->find();
+            if($info){
+                $dep = Db::name('dep')->where('id',$info['dep_id'])->value('title');
+                $status = Db::name('order_mode')->where('id',$info['order_mode'])->value('out_content');
+                $info['dep'] = $dep;
+                $info['status'] = $status;
+
+                $todos = Db::name('todo')
+                    ->alias('t')
+                    ->join('user u','u.id = t.to_user_id')
+                    ->where('t.order_id',$info['id'])
+                    ->where('t.del',0)
+                    ->where('t.todo_mode','in',[1,2,3])
+                    ->column('u.real_name');
+                $un = $todos?implode(',',$todos):'';
+                $info['names'] = $un;
+
+                if($info['mode'] == 1){
+                    $type = Db::name('order_repair')
+                        ->alias('or')
+                        ->leftJoin('order_type ot','ot.id = or.type_id')
+                        ->where('or.order_id',$info['id'])
+                        ->value('title');
+                    $info['repair_name'] = $type?$type:'';
+                }else if($info['mode'] == 3){
+                    $convey = Db::name('order_convey')
+                        ->alias('oc')
+                        ->join('convey_cate cc','cc.id = oc.type')
+                        ->where('oc.order_id',$info['id'])
+                        ->field('oc.*,cc.title as cate_title')
+                        ->find();
+                    $info['cate_title'] = '';
+                    $info['start'] = '';
+                    $info['end'] = '';
+                    if($convey){
+                        $start = Db::name('address')->where('id',$convey['start'])->value('title');
+                        $end = Db::name('address')->where('id',$convey['end'])->value('title');
+                        $info['start'] = $start;
+                        $info['end'] = $end;
+                        $info['cate_title'] = $convey['cate_title'];
+                    }
+                }
+            }
+        }
+
+        $this->assign('info',$info);
+        return $this->fetch();
+    }
+
+    public function daily(){
+        $dd = think_decrypt(input('orgId','','trim'));
+        if(!$dd){
+            HelpHander::error('参数错误');
+        }
+        $dd = explode('|',$dd);
+        if(count($dd) != 2){
+            HelpHander::error('参数错误');
+        }
+        $orgId = (int)$dd[0];
+//        $orgId = 23;
+
+        $id = input('id/d',0);
+        $this->assign('orgId',input('orgId','','trim'));
+
+        $hours = model('Daily')->getTimeDaily($orgId);
+        $s = $hours['start'];
+        $e = $hours['end'];
+
+        $order = 'id desc';
+        $map[] = ['dr.daily_id','=',$id];
+        $map[] = ['dr.create_time','>=',$s];
+        $map[] = ['dr.create_time','<',$e];
+        $map[] = ['dr.org_id', '=', $orgId];
+        //数据查询
+        $lists = Db::name('daily_record')
+            ->alias('dr')
+            ->join('daily d', 'd.id=dr.daily_id')
+            ->field('dr.*,d.title,d.content as daily_details')
+            ->where($map)
+            ->order($order)
+            ->select();
+        foreach ($lists as $k => $v) {
+            $lists[$k]['user_name'] = Db::name('user')
+                ->where('id', $v['user_id'])
+                ->value('real_name');
+//            $lists[$k]['zc'] = 0;
+//            if($v['order_id'] > 0){
+//                $lists[$k]['zc'] = 1;
+//                $res = Db::name('orders')->where('id',$v['order_id'])->where('del',0)->where('order_mode','in',[1,4])->find();
+//                if($res){
+//                    $lists[$k]['zc'] = 2;
+//                }
+//            }
+        }
+
+        $this->assign('lists',$lists);
+        return $this->fetch();
+
+    }
+
+    public function ddetail(){
+        $dd = think_decrypt(input('orgId','','trim'));
+        if(!$dd){
+            HelpHander::error('参数错误');
+        }
+        $dd = explode('|',$dd);
+        if(count($dd) != 2){
+            HelpHander::error('参数错误');
+        }
+        $orgId = (int)$dd[0];
+//        $orgId = 23;
+
+        $this->assign('orgId',input('orgId','','trim'));
+        $id = input('id/d',0);
+
+        $ret = Db::name('daily_record')->where('id', $id)->where('org_id', $orgId)->find();
+        $daily = Db::name('daily')->field('title,content')
+            ->where('id', $ret['daily_id'])->find();
+        $ret['daily_name'] = $daily['title'];
+        $ret['daily_details'] = $daily['content'];
+        $ret['check_json'] = json_decode($ret['check_json'], true);
+        $ret['user_name'] = Db::name('user')
+            ->where('id', $ret['user_id'])->value('real_name');
+        $this->assign('info', $ret);
+        return $this->fetch();
+    }
+
+    public function patrol(){
+        $dd = think_decrypt(input('orgId','','trim'));
+        if(!$dd){
+            HelpHander::error('参数错误');
+        }
+        $dd = explode('|',$dd);
+        if(count($dd) != 2){
+            HelpHander::error('参数错误');
+        }
+        $orgId = (int)$dd[0];
+
+//        $orgId = 23;
+
+        $this->assign('orgId',input('orgId','','trim'));
+
+        $lists = Db::name('patrol_task')
+            ->where('org_id',$orgId)
+            ->where('del',0)
+            ->where('start_time','<=',date('Y-m-d H:i:s',time()+12*60*60))
+            ->field('id,title,status,start_time,end_time')
+            ->order('start_time desc,id desc')
+            ->limit(20)
+            ->select();
+        $lists = $lists?$lists:[];
+//        $data = [];
+        foreach ($lists as $k=>$v){
+//            if($v['status'] == 0){ //0=未执行 1=执行中 2=已完成 3=未完成 5=中断 6=已关闭
+//                $status = "未执行";
+//            }else if($v['status'] == 1){
+//                $status = "执行中";
+//            }else if($v['status'] == 2){
+//                $status = "已完成";
+//            }else if($v['status'] == 3){
+//                $status = "未完成";
+//            }else if($v['status'] == 5){
+//                $status = "中断";
+//            }else{
+//                $status = "已关闭";
+//            }
+
+            $users = Db::name('patrol_task_user')
+                ->alias('a')
+                ->join('user u','u.id = a.user_id')
+                ->where('a.patrol_task_id',$v['id'])
+                ->column('real_name');
+
+//            $arr = [$v['title'],$status,$users?implode(',',$users):''];
+//            $data[] = $arr;
+            $lists[$k]['users'] = $users?implode(',',$users):'';
+        }
+        $this->assign('lists',$lists);
+        return $this->fetch();
+    }
+
+    public function pdetail(){
+        $dd = think_decrypt(input('orgId','','trim'));
+        if(!$dd){
+            HelpHander::error('参数错误');
+        }
+        $dd = explode('|',$dd);
+        if(count($dd) != 2){
+            HelpHander::error('参数错误');
+        }
+        $orgId = (int)$dd[0];
+//        $orgId = 23;
+
+        $this->assign('orgId',input('orgId','','trim'));
+        $id = input('id/d',0);
+
+        $info=Db::name('patrol_task')
+            ->field('id,start_time,end_time,status,title,interrupt_img,interrupt_reson')
+            ->where('id',$id)
+            ->where('org_id',$orgId)
+            ->find();
+        if(!$info){
+            HelpHander::error('记录不存在');
+        }
+        $info['start_time']=date('Y-m-d H:i',strtotime($info['start_time']));
+        $info['end_time']=date('Y-m-d H:i',strtotime($info['end_time']));
+        //获取执行用户
+        $task_user=Db::name('patrol_task_user')
+            ->alias('ptu')
+            ->join('user u','u.id=ptu.user_id')
+            ->where('ptu.patrol_task_id',$info['id'])
+            ->column('u.real_name');
+        $info['task_user']=implode(',',$task_user);
+
+
+        $addrForms = Db::name('patrol_task_addr')
+            ->alias('a')
+            ->join('patrol_addr_form b','a.patrol_form_id = b.id')
+            ->join('address c','c.id = a.address_id')
+            ->where('a.patrol_task_id',$info['id'])
+            ->field('a.*,b.title as formTitle,c.title as addrTitle')
+            ->select();
+        $addrForms = $addrForms?$addrForms:[];
+        foreach ($addrForms as $k=>$v){
+            $record = Db::name('patrol_record')
+                ->alias('a')
+                ->join('user b','a.user_id = b.id')
+                ->where('a.patrol_task_id',$v['patrol_task_id'])
+                ->where('a.patrol_addr_id',$v['address_id'])
+                ->field('b.real_name as uname,a.*')
+                ->find();
+            if($record){
+                $cj = $record['check_json']?json_decode($record['check_json'],true):[];
+                $record['check_json'] = $cj;
+                $record['images'] = $record['images']?explode(',',$record['images']):[];
+            }
+            $addrForms[$k]['record'] = $record?$record:[];
+        }
+        $info['addrForms'] = $addrForms;
+
+        $this->assign('info',$info);
+
+        return $this->fetch();
+    }
+}
+
+

+ 61 - 0
application/h5/view/todo/common2.html

@@ -0,0 +1,61 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=0, maximum-scale=0, user-scalable=yes,shrink-to-fit=no">
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>{:get_config('web_site_title')}</title>
+    <link rel="icon" href="./favicon.png">
+    <meta name="keywords" content="" />
+    <meta name="description" content="" />
+    <link rel="shortcut icon" href="/favicon.ico">
+    <link rel="stylesheet" href="/static/hplus/css/bootstrap.min.css">
+    <link rel="stylesheet" href="/static/hplus/css/font-awesome.min.css?v=4.4.0" />
+    <link rel="stylesheet" href="/static/hplus/css/animate.css"/>
+    <link rel="stylesheet" href="/static/hplus/css/style.css?v=4.1.0">
+    <link rel="stylesheet" href="/static/hplus/css/jquery.contextMenu.min.css"/>
+    <link href="/static/hplus/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">
+    <link rel="stylesheet" href="/static/elementui2.15.5/index.css"/>
+    <link rel="stylesheet" href="/static/elementui2.15.5/style/theme/index.css">
+    <link rel="stylesheet" href="/admin/css/common.css">
+    <script src="/static/hplus/js/jquery.min.js?v=2.1.4"></script>
+    <script src="/static/layer3.2.0/layer.js"></script>
+    <script src="/static/elementui2.15.5/vue-2.6.14.js"></script>
+    <script src="/static/elementui2.15.5/index.js"></script>
+    <style>
+        #top-alert{
+            position: fixed;
+            top: 15px;
+            left:15px;
+            right: 15px;
+            z-index: 1000;
+            display: none;
+        }
+    </style>
+    {block name="css"}{/block}
+</head>
+<body class="gray-bg">
+<div id="top-alert" class="alert alert-danger alert-dismissable">
+    <button aria-hidden="true" class="close" type="button">×</button>
+    <span class="alert-content"></span>
+</div>
+<div style="padding: 15px;background-color: transparent;">
+    {block name="main"}{/block}
+</div>
+
+<script src="/static/hplus/js/bootstrap.min.js?v=3.3.7"></script>
+<script src="/static/hplus/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
+<script src="/static/hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
+<script src="/static/hplus/js/plugins/contextMenu/jquery.contextMenu.min.js"></script>
+<script src="/static/hplus/js/hplus.js?v=4.1.0"></script>
+<script type="text/javascript" src="/static/hplus/js/contabs.js"></script>
+<!-- 第三方插件 -->
+<script src="/static/hplus/js/plugins/pace/pace.min.js"></script>
+<script src="/static/hplus/js/plugins/jqgrid/i18n/grid.locale-cn.js"></script>
+<script src="/static/hplus/js/plugins/jqgrid/jquery.jqGrid.min.js"></script>
+<script src="/admin/js/common.js"></script>
+{block name="script"}{/block}
+
+</body>
+</html>

+ 52 - 0
application/h5/view/todo/daily.html

@@ -0,0 +1,52 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>检查记录列表</title>
+    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css" />
+    <style>
+        tr{
+            cursor: pointer;
+        }
+    </style>
+</head>
+<body>
+<div>
+    <p><br></p>
+    <h3 class="text-center">检查记录列表</h3>
+    <p><br></p>
+    <table class="table table-striped text-center" style="width: 100%">
+        <tr>
+            <th class="text-center">任务地点名称</th>
+            <th class="text-center">任务详情</th>
+            <th class="text-center">工作人员</th>
+            <th class="text-center">时间</th>
+        </tr>
+        {notempty name="lists"}
+        {volist name="lists" id="v"}
+        <tr data-url="{:url('Todo/ddetail',['id'=>$v['id'],'orgId'=>$orgId])}" onclick="gotourl(this)">
+            <td>{$v.title}</td>
+            <td>{$v.daily_details}</td>
+            <td>{$v.user_name}</td>
+            <td>{$v.create_time}</td>
+        </tr>
+        {/volist}
+        {else /}
+        <tr>
+            <td colspan="4">暂无数据</td>
+        </tr>
+        {/notempty}
+    </table>
+    <p><br></p>
+</div>
+<script src="/static/jquery-1.11.3.min.js"></script>
+<script>
+    function gotourl(_self) {
+        window.location.href = $(_self).attr('data-url');
+    }
+</script>
+</body>
+</html>

+ 151 - 0
application/h5/view/todo/ddetail.html

@@ -0,0 +1,151 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>检查记录详情</title>
+    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css" />
+    <style>
+        th{
+            width: 20%;
+            text-align: right;
+            padding-right: 50px;
+        }
+    </style>
+</head>
+<body>
+<div>
+    <p><br></p>
+    <h3 class="text-center">检查记录详情 &nbsp;&nbsp; <a href="{:url('Todo/daily',['orgId'=>$orgId,'id'=>$info['daily_id']])}"><span class="text-muted" style="font-size: 14px;">返回上一页</span></a></h3>
+    <p><br></p>
+    <table class="table table-striped text-left" style="width: 100%">
+        <tr>
+            <th>编号</th>
+            <td>
+                {$info['id']}
+            </td>
+        </tr>
+        <tr>
+            <th>任务地点名称</th>
+            <td>
+                {$info['daily_name']}
+            </td>
+        </tr>
+        <tr>
+            <th>任务详情</th>
+            <td>
+                {$info['daily_details']}
+            </td>
+        </tr>
+        <tr>
+            <th>工作人员</th>
+            <td>
+                {$info['user_name']}
+            </td>
+        </tr>
+        <tr>
+            <th>时间</th>
+            <td>
+                {$info['create_time']}
+            </td>
+        </tr>
+
+        <tr>
+            <th>工作表单</th>
+            <td>
+                <table class="table table-bordered">
+                    <thead>
+                    <tr>
+                        <th>序号</th>
+                        <th>内容</th>
+                        <th>完成</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    {foreach $info['check_json'] as $k=>$v}
+                    <tr>
+                        <td>{$k+1}</td>
+                        <td>{$v['title']}</td>
+                        {if ($v['result']  == 1)}
+                        <td><input type="checkbox" checked disabled></td>
+                        {else}
+                        <td><input type="checkbox"  disabled></td>
+                        {/if}
+
+
+                    </tr>
+                    {/foreach}
+                    </tbody>
+                </table>
+            </td>
+        </tr>
+        <tr>
+            <th>内容</th>
+            <td>
+                {$info['content']}
+            </td>
+        </tr>
+        <tr>
+            <th>图片</th>
+            <td>
+                <img src="{$info['images']}" alt="" onclick="open_img(this)" style="width: 80px;height: 60px;"  >
+            </td>
+        </tr>
+
+    </table>
+    <p><br></p>
+</div>
+<script src="/static/jquery-1.11.3.min.js"></script>
+<script src="/static/layer3.2.0/layer.js"></script>
+<script>
+    function gotourl(_self) {
+        window.location.href = $(_self).attr('data-url');
+    }
+
+    //打开查看图片
+    function open_img(_self) {
+        var src = $(_self).attr('src');
+        var img = new Image();
+        img.src = src;
+        var width = $(window).width()*0.8;
+        var height = $(window).height()*0.8;
+        img.onload = function(){
+            var imgw = img.width;
+            var imgh = img.height;
+            if(imgw > width&&imgh < height){
+                imgh = imgh*width/imgw;
+                imgw = width;
+            }else if(imgw < width&&imgh > height){
+                imgw = imgw*height/imgh;
+                imgh = height;
+            }else if(imgw > width&&imgh > height){
+                var bl1 = width/height;
+                var bl2 = imgw/imgh;
+                if(bl1 < bl2){
+                    imgh = imgh*width/imgw;
+                    imgw = width;
+                }else if(bl1 > bl2){
+                    imgw = imgw*height/imgh;
+                    imgh = height;
+                }else{
+                    imgh = height;
+                    imgw = width;
+                }
+            }
+            var imgs = '<img width="'+imgw+'" height="'+imgh+'" src="'+src+'" />';
+            layer.open({
+                type: 1,
+                title: false,
+                closeBtn: 1,
+                area: [imgw+'px', imgh+'px'],
+                skin: 'layui-layer-nobg', //没有背景色
+                shadeClose: true,
+                content: imgs
+            });
+        };
+    }
+</script>
+</body>
+</html>

+ 108 - 0
application/h5/view/todo/detail.html

@@ -0,0 +1,108 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>订单详情</title>
+    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css" />
+    <style>
+        th{
+            width: 20%;
+            text-align: right;
+            padding-right: 50px;
+        }
+    </style>
+</head>
+<body>
+<div>
+    <p><br></p>
+    <h3 class="text-center">订单详情 &nbsp;&nbsp; {eq name="type" value="0"}<a href="{:url('Todo/lists',['orgId'=>$orgId])}"><span class="text-muted" style="font-size: 14px;">返回上一页</span></a>{/eq}</h3>
+    <p><br></p>
+    <table class="table table-striped text-left" style="width: 100%">
+        <tr>
+            <th>类型</th>
+            <td>
+                {eq name="info['mode']" value="1"}报修{/eq}
+                {eq name="info['mode']" value="2"}保洁{/eq}
+                {eq name="info['mode']" value="3"}运送{/eq}
+                {eq name="info['mode']" value="4"}隐患预警{/eq}
+            </td>
+        </tr>
+        <tr>
+            <th>状态</th>
+            <td>
+                {$info['status']}
+            </td>
+        </tr>
+        <tr>
+            <th>科室</th>
+            <td>
+                {$info['dep']}
+            </td>
+        </tr>
+        <tr>
+            <th>内容</th>
+            <td>
+                {$info['content']}
+            </td>
+        </tr>
+        {eq name="info['mode']" value="1"}
+        <tr>
+            <th>报修类型</th>
+            <td>
+                {$info['repair_name']}
+            </td>
+        </tr>
+        {/eq}
+        {eq name="info['mode']" value="3"}
+        <tr>
+            <th>运送类型</th>
+            <td>
+                {$info['cate_title']}
+            </td>
+        </tr>
+        <tr>
+            <th>始发地</th>
+            <td>
+                {$info['start']}
+            </td>
+        </tr>
+        <tr>
+            <th>目的地</th>
+            <td>
+                {$info['end']}
+            </td>
+        </tr>
+        {/eq}
+        <tr>
+            <th>下单时间</th>
+            <td>
+                {$info['create_time']}
+            </td>
+        </tr>
+        <tr>
+            <th>派发时间</th>
+            <td>
+                {$info['send_time']}
+            </td>
+        </tr>
+        <tr>
+            <th>执行人</th>
+            <td>
+                {$info['names']}
+            </td>
+        </tr>
+
+    </table>
+    <p><br></p>
+</div>
+<script src="/static/jquery-1.11.3.min.js"></script>
+<script>
+    function gotourl(_self) {
+        window.location.href = $(_self).attr('data-url');
+    }
+</script>
+</body>
+</html>

+ 63 - 0
application/h5/view/todo/lists.html

@@ -0,0 +1,63 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>订单列表</title>
+    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css" />
+    <style>
+        tr{
+            cursor: pointer;
+        }
+    </style>
+</head>
+<body>
+<div>
+    <p><br></p>
+    <h3 class="text-center">进行中的订单</h3>
+    <p><br></p>
+    <table class="table table-striped text-center" style="width: 100%">
+        <tr>
+            <th class="text-center">类型</th>
+            <th class="text-center">状态</th>
+            <th class="text-center">科室</th>
+            <th class="text-center">内容</th>
+            <th class="text-center">下单时间</th>
+            <th class="text-center">派发时间</th>
+            <th class="text-center">执行人</th>
+        </tr>
+        {notempty name="lists"}
+        {volist name="lists" id="v"}
+        <tr data-url="{:url('Todo/detail',['id'=>$v['id'],'orgId'=>$orgId])}" onclick="gotourl(this)">
+            <td>
+                {eq name="v['mode']" value="1"}报修{/eq}
+                {eq name="v['mode']" value="2"}保洁{/eq}
+                {eq name="v['mode']" value="3"}运送{/eq}
+                {eq name="v['mode']" value="4"}隐患预警{/eq}
+            </td>
+            <td>{$v.status}</td>
+            <td>{$v.dep}</td>
+            <td>{$v.content}</td>
+            <td>{$v.create_time}</td>
+            <td>{$v.send_time}</td>
+            <td>{$v.names}</td>
+        </tr>
+        {/volist}
+        {else /}
+        <tr>
+            <td colspan="7">暂无数据</td>
+        </tr>
+        {/notempty}
+    </table>
+    <p><br></p>
+</div>
+<script src="/static/jquery-1.11.3.min.js"></script>
+<script>
+    function gotourl(_self) {
+        window.location.href = $(_self).attr('data-url');
+    }
+</script>
+</body>
+</html>

+ 61 - 0
application/h5/view/todo/patrol.html

@@ -0,0 +1,61 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>巡更列表</title>
+    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css" />
+    <style>
+        tr{
+            cursor: pointer;
+        }
+    </style>
+</head>
+<body>
+<div>
+    <p><br></p>
+    <h3 class="text-center">巡更列表</h3>
+    <p><br></p>
+    <table class="table table-striped text-center" style="width: 100%">
+        <tr>
+            <th class="text-center">任务名称</th>
+            <th class="text-center">开始时间</th>
+            <th class="text-center">结束时间</th>
+            <th class="text-center">状态</th>
+            <th class="text-center">执行人</th>
+        </tr>
+        {notempty name="lists"}
+        {volist name="lists" id="v"}
+        <tr data-url="{:url('Todo/pdetail',['id'=>$v['id'],'orgId'=>$orgId])}" onclick="gotourl(this)">
+            <td>{$v.title}</td>
+            <td>{$v.start_time}</td>
+            <td>{$v.end_time}</td>
+            <td>
+                {eq name="v['status']" value="0"}未执行{/eq}
+                {eq name="v['status']" value="1"}执行中{/eq}
+                {eq name="v['status']" value="2"}已完成{/eq}
+                {eq name="v['status']" value="3"}未完成{/eq}
+                {eq name="v['status']" value="5"}中断{/eq}
+                {eq name="v['status']" value="6"}已关闭{/eq}
+            </td>
+            <td>{$v.users}</td>
+        </tr>
+        {/volist}
+        {else /}
+        <tr>
+            <td colspan="5">暂无数据</td>
+        </tr>
+        {/notempty}
+    </table>
+    <p><br></p>
+</div>
+<script src="/static/jquery-1.11.3.min.js"></script>
+<script>
+    function gotourl(_self) {
+        window.location.href = $(_self).attr('data-url');
+    }
+</script>
+</body>
+</html>

+ 171 - 0
application/h5/view/todo/pdetail.html

@@ -0,0 +1,171 @@
+{extend name="todo/common2" /}
+{block name="main"}
+<div class="row">
+<div class="col-sm-12">
+    <div class="ibox float-e-margins">
+        <div class="ibox-title">
+            <h5>任务详情</h5>
+            <div class="ibox-tools">
+                <a class="toback" href="javascript:;" onclick="window.history.go(-1);">
+                    返回上一页
+                </a>
+            </div>
+        </div>
+
+        <div class="ibox-content">
+            <h5>任务信息</h5>
+            <table class="table">
+                <tbody>
+                <tr>
+                    <th style="width:90px ">任务名称</th><td>{$info['title']}</td>
+                </tr>
+                <tr>
+                    <th>开始时间</th><td>{$info['start_time']}</td>
+                </tr>
+                <tr>
+                    <th>结束时间</th><td>{$info['end_time']}</td>
+                </tr>
+                <tr>
+                    <th>执行人员</th><td>{$info['task_user']}</td>
+                </tr>
+                <tr>
+                    <th>任务状态</th>
+                    {if condition="$info['status'] eq 0"}
+                    <td>未执行</td>
+                    {elseif condition="$info['status'] eq 1"}
+                    <td>执行中</td>
+                    {elseif condition="$info['status'] eq 2"}
+                    <td>已完成</td>
+                    {elseif condition="$info['status'] eq 3"}
+                    <td>未完成</td>
+                    {elseif condition="$info['status'] eq 5"}
+                    <td>中断</td>
+                    {elseif condition="$info['status'] eq 6"}
+                    <td>已关闭</td>
+                    {/if}
+                </tr>
+
+                {if $info['status']==5}
+                <tr>
+                    <th>中断原因</th><td>{$info['interrupt_reson']}</td>
+                </tr>
+                <tr>
+                    <th>中断图片</th><td><img src="{$info['interrupt_img']}" onclick="open_img(this)" style="width: 80px;height: 60px;"  ></td>
+                </tr>
+                {/if}
+
+                </tbody>
+            </table>
+
+
+            <div id="vue-plan">
+                <p><br></p>
+                <h5>路线</h5>
+                <hr>
+                <el-steps direction="vertical">
+                    {volist name="info['addrForms']" id="v"}
+                    <el-step title="{$v.addrTitle}【{$v.formTitle}】">
+                        <div slot="description">
+                            {empty name="v['record']"}
+                            暂无记录
+                            <p><br></p>
+                            {else /}
+                            <p><br></p>
+                            <table class="table">
+                                <tr>
+                                    <td style="width: 100px;">时间</td>
+                                    <td>{$v['record']['create_time']}</td>
+                                </tr>
+                                <tr>
+                                    <td>执行人员</td>
+                                    <td>{$v['record']['uname']}</td>
+                                </tr>
+                                <tr>
+                                    <td>状态</td>
+                                    <td>
+                                        {eq name="$v['record']['is_normal']" value="0"}正常{else /}异常{/eq}
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>检查项</td>
+                                    <td>
+                                        <table class="table table-bordered">
+                                            <thead>
+                                            <tr>
+                                                <th>序号</th>
+                                                <th>内容</th>
+                                                <th>完成</th>
+                                            </tr>
+                                            </thead>
+                                            {volist name="v['record']['check_json']" id="vo" key="k"}
+                                            <tr>
+                                                <td width="10%">{$k+1}</td>
+                                                <td width="45%">{$vo['title']}</td>
+                                                <td width="45%">
+                                                    {eq name="vo['type']" value="1"}
+                                                    {$vo.result}
+                                                    {else /}
+                                                    {eq name="vo['result']" value="1"}
+                                                    <input type="checkbox" checked disabled>
+                                                    {else /}
+                                                    <input type="checkbox" disabled>
+                                                    {/eq}
+                                                    {/eq}
+                                                </td>
+                                            </tr>
+                                            {/volist}
+                                        </table>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>图片</td>
+                                    <td>
+                                        {volist name="v['record']['images']" id="voo"}
+                                        <img src="{$voo}" onclick="open_img(this)" style="width: 40px;height: 40px;margin-right: 10px" alt="">
+                                        {/volist}
+                                    </td>
+                                </tr>
+                            </table>
+                            {/empty}
+
+                        </div>
+                    </el-step>
+                    {/volist}
+                </el-steps>
+            </div>
+
+
+        </div>
+    </div>
+
+
+</div>
+</div>
+{/block}
+
+{block name="script"}
+<script>
+    new Vue({
+        el: '#vue-plan',
+        data: function() {
+            return {
+
+            }
+        },
+        watch: {
+
+        },
+        computed: {
+
+        },
+        created(){
+
+        },
+        methods: {
+
+        }
+    })
+
+</script>
+
+{/block}

二進制
public/admin/img/goods_card.png


二進制
public/canting.mp4


二進制
public/screen/images/TOP1.png


二進制
public/screen/images/TOP2.png


二進制
public/screen/images/TOP3.png


二進制
public/screen/images/hz01.png


二進制
public/screen/images/hz02.png


二進制
public/screen/images/maker.png


二進制
public/screen/images/nh1.png


二進制
public/screen/images/nh2.png


二進制
public/screen/images/nh3.png


二進制
public/screen/images/nh4.png


二進制
public/screen/images/nh5.png


二進制
public/screen/images/nh6.png