hstate = array('未处理', '已处理'); $this->hcolor = array('#ff6600','green'); } // 初始化单据可替换其他属性,$lx,0默认,1详情展示,2列表显示,3打印页,4外部详情页 public function flowrsreplace($rs, $lx=0) { $zt = $rs['handle_state']; // 将id转换为文字 $rs['handle_state'] = $this->getstatezt($zt); return $rs; } // $ors当前单据操作信息,$crs提交过来的信息 public function flowoptmenu($ors, $crs) { // 切换会议议题 if ($ors['num'] == 'noup') { $sm = $crs['sm']; // 提交过来的说明 $uname = $this->uname; $uid = $this->uid; // 更新说明 $this->update([ "explain"=>$sm, "repairer"=>$uname, "repairer_id"=>$uid, ], $this->id); } } public function getstatezt($zt) { if (isset($this->hstate[$zt])) { $html = ''.$this->hstate[$zt].''; return $html; } else { return null; } } }