'id desc' ]; } //读取印章保管人来审批 protected function flowcheckname($num) { // // 印章负责人 // (select director from zqoa_seal where id = `seal_name`) is not null // if ($num == 'dept_process') { // $seal_info = m('seal')->getone("`id` = {$this->rs['seal_name']}"); // if ($seal_info) { // $sid = $seal_info['director_id']; // 审核人Id // $sna = $seal_info['director']; // 审核人 // return array($sid, $sna); // } // // } } //展示时替换一下 public function flowrsreplace($rs, $lx=0) { $rs['date'] = $rs['applydt']; $rs['date_index'] = substr($rs['applydt'],0,4); $flow_info = $this->flogmodel->getone("mid={$rs['id']} and step=1 and status=1 and `table` = 'sealapl'", 'checkname', 'id desc'); $rs['dept_manager'] = $flow_info ? $flow_info['checkname'] : null; if (!empty($rs['opinion_dept'])) { $dept = $rs['opinion_dept']; if ($dept == 1) { $flow_info = $this->flogmodel->getone("mid={$rs['id']} and step=3 and status=1 and `table` = 'sealapl'", 'checkname', 'id desc'); $rs['advice_level1_applyer'] = $flow_info ? $flow_info['checkname'] : null; } else if ($dept == 2) { } else if ($dept == 3) { $flow_info = $this->flogmodel->getone("mid={$rs['id']} and step=3 and status=1 and `table` = 'sealapl'", 'checkname', 'id desc'); $rs['advice_level3_applyer'] = $flow_info ? $flow_info['checkname'] : null; } else if ($dept == 4) { $flow_info = $this->flogmodel->getone("mid={$rs['id']} and step=3 and status=1 and `table` = 'sealapl'", 'checkname', 'id desc'); $rs['advice_level4_applyer'] = $flow_info ? $flow_info['checkname'] : null; } } $flow_info = $this->flogmodel->getone("mid={$rs['id']} and step=2 and status=1 and `table` = 'sealapl'", 'checkname', 'id desc'); $rs['office_applyer'] = $flow_info ? $flow_info['checkname'] : null; $seal = m('seal')->getone("id = {$rs['seal_name']}"); $rs['office_applyer1'] = $seal['specialized']; $rs['seal_name'] = m('seal')->getone("id = {$rs['seal_name']}")['name']; $rs['opinion_relay'] = str_replace($rs['opinion_relay'], '\n', '
'); return $rs; } public function inputtitle() { return "枣泉煤矿用印审批表"; } protected function flowdatalog($arr) { $arr['title'] = $this->inputtitle(); return $arr; } // $ors当前单据操作信息,$crs提交过来的信息 public function flowoptmenu($ors, $crs) { if ($ors['num'] == 'dept_process') { } } //审核之前调用$zt 状态, $sm说明 protected function flowcheckbefore($zt, $sm, $ufied){ if ($zt == 1) { if ($this->nowcourse['step'] == 3 && $this->nowcourse['name'] == '负责部门审批') { $opinion_dept = $this->rs['opinion_dept']; if ($opinion_dept == 1) { m('sealapl')->update(["advice_level1"=>$sm],"id={$this->id}"); } else if ($opinion_dept == 2) { m('sealapl')->update(["advice_level2"=>$sm],"id={$this->id}"); } else if ($opinion_dept == 3) { m('sealapl')->update(["advice_level3"=>$sm],"id={$this->id}"); } else if ($opinion_dept == 4) { m('sealapl')->update(["advice_level4"=>$sm],"id={$this->id}"); } } } } }