webmain/flow/input/mode_userinfoAction.php

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
*	此文件是流程模块【userinfo.人员信息】对应接口文件。
*/ 
class mode_userinfoClassAction extends inputAction{
	
	public function companydata()
	{
		return m('company')->getselectdata(1);
	}

	protected function savebefore($table, $arr, $id, $addbo){
		$mobile = $arr['mobile'];
		$optlx	= $this->post('optlx');
		if(!c('check')->ismobile($mobile)){
			return '手机号格式有误';
		}
		//if(m('admin')->rows("`mobile`='$mobile' and `id`<>'$id'")>0){
		//	return '手机号['.$mobile.']已存在';
		//}
		
		$notsave = 'name,deptname,ranking,email';//不保存字段
		if($id==1)$notsave.=',quitdt';
		if($optlx=='my')$notsave.=',state,workdate,syenddt,positivedt,quitdt,companyid'; //个人编辑不保存
		
		
		return array(
			'notsave' => $notsave
		);
	}
	

	protected function saveafter($table, $arr, $id, $addbo){
		
		$this->userstateafter($table, $arr, $id);
	}
	
	
	public function storeafter($table, $rows)
	{
		$deptdata = false;
		if($this->loadci==1 && $this->post('showdept')=='1'){
			$drows = m('dept')->getall('1=1','`id`,`name`,`pid`');
			$deptdata = $this->depttreeshu($drows, '0', '0');
		}
		return array(
			'statearr' => $this->flow->statearrs,
			'isadd'    => false,
			'deptdata'    => $deptdata,
		);
	}
	
	//组织结构活动得到树形数据
	private function depttreeshu($rows, $pid, $fids)
	{
		$barr = array();
		foreach($rows as $k=>$rs){
			if($rs['pid']==$pid){
				$rs['children'] = $this->depttreeshu($rows, $rs['id'], $fids);
				$rs['expanded'] = $pid==$fids;
后面还有 65 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。