root 1 éve
szülő
commit
35dcd8a465
2 módosított fájl, 229 hozzáadás és 229 törlés
  1. 227 227
      webmain/flow/flowopt/flowoptAction.php
  2. 2 2
      webmain/task/openapi/openmeetAction.php

+ 227 - 227
webmain/flow/flowopt/flowoptAction.php

@@ -1,228 +1,228 @@
-<?php
-class flowoptClassAction extends Action
-{
-	public function addlogAjax()
-	{
-		$sm 	= $this->post('sm');
-		$mid 	= (int)$this->post('mid');
-		$modenum= $this->post('modenum');
-		$name 	= $this->post('name');
-		$zt 	= $this->post('zt');
-		$ztid 	= $this->post('ztid','1');
-		$ztcolor= $this->post('ztcolor');
-		m('flow')->addlog($modenum, $mid,$name,array(
-			'explain' 		=> $sm,
-			'statusname' 	=> $zt,
-			'status' 		=> $ztid,
-			'color' 		=> $ztcolor
-		));
-		$this->showreturn('ok');
-	}
-	
-	public function delflowAjax()
-	{
-		$mid 	= (int)$this->post('mid');
-		$modenum= $this->post('modenum');
-		$sm 	= $this->post('sm');
-		$msg 	= m('flow')->opt('deletebill', $modenum, $mid, $sm);
-		if($msg != 'ok')$this->showreturn('', $msg, 201);
-		$this->showreturn('ok');
-	}
-	
-	//审核
-	public function checkAjax()
-	{
-		$mid 	= (int)$this->post('mid');
-		$zt 	= (int)$this->post('zt');
-		$modenum= $this->post('modenum');
-		$sm 	= $this->post('sm');
-		$msg 	= m('flow')->opt('check', $modenum, $mid, $zt, $sm);
-		if($msg=='ok'){
-			return returnsuccess('处理成功');
-		}else{
-			return returnerror($msg);
-		}
-	}
-	
-	//单据获取操作菜单
-	public function getoptnumAjax()
-	{
-		$mid 	= (int)$this->post('mid');
-		$num	= $this->post('num');
-		
-		$arr 	= m('flow')->getoptmenu($num, $mid, 0);
-		$this->showreturn($arr);
-	}
-	
-	public function yyoptmenuAjax()
-	{
-		$num 	= $this->post('modenum');
-		$sm 	= $this->post('sm');
-		$optid 	= (int)$this->post('optmenuid');
-		$zt 	= (int)$this->post('statusvalue');
-		$mid 	= (int)$this->post('mid');
-		$msg 	= m('flow')->optmenu($num, $mid, $optid, $zt, $sm);
-		if($msg != 'ok')$this->showreturn('', $msg, 201);
-		$this->showreturn('');
-	}
-	
-	public function chehuiAjax()
-	{
-		$mid 	= (int)$this->post('mid');
-		$modenum= $this->post('modenum');
-		$sm 	= $this->post('sm');
-		$msg 	= m('flow')->opt('chehui', $modenum, $mid, $sm);
-		if($msg != 'ok')$this->showreturn('', $msg, 201);
-		$this->showreturn('');
-	}
-	
-	/**
-	*	模块统计
-	*/
-	public function flowtotalAjax()
-	{
-		$modenum= $this->post('modenum');
-		$rows 	= m('flow')->initflow($modenum)->flowtotal();
-		$barr['rows'] = $rows;
-		echo json_encode($barr);
-	}
-	
-	/**
-	*	将异常单据标识已完成
-	*/
-	public function oksuccessAjax()
-	{
-		$mid 	= (int)$this->post('mid');
-		$modenum= $this->post('modenum');
-		$sm 	= $this->post('sm');
-		$lx 	= $this->post('lx','1');
-		$flow   = m('flow')->initflow($modenum, $mid);
-		$msg 	= $flow->checkerror($lx, $sm);
-		return $msg;
-	}
-	
-	
-	/**
-	*	引用签名图片
-	*/
-	public function qianyinAjax()
-	{
-		$path = $this->option->getval('qmimgstr_'.$this->adminid.'');
-		if(isempt($path))return returnerror('你并没有设置签名图片,可到[个人设置]下添加签名图片');
-		if(!file_exists($path)){
-			return returnerror('签名图片不存在了,可到[个人设置]下重新设置签名图片');
-		}
-	
-		return returnsuccess($path);
-	}
-	
-	/**
-	*	回执确认
-	*/
-	public function receiptcheckAjax()
-	{
-		$mid 		= (int)$this->post('mid');
-		$modenum	= $this->post('modenum');
-		$sm 		= $this->post('sm');
-		$receiptid 	= (int)$this->post('receiptid','0');
-		$flow 		= m('flow')->initflow($modenum, $mid);
-		
-		return $flow->receiptcheck($receiptid, $sm);
-	}
-	
-	/**
-	*	读取字段
-	*/
-	public function getfieldsAjax()
-	{
-		$modenum	= $this->get('modenum');
-		$flow 		= m('flow')->initflow($modenum);
-		$farr 		= array();
-		foreach($flow->fieldsarra as $k=>$rs){
-			$farr[] = array(
-				'fields' => $rs['fields'],
-				'name' 	=> $rs['name'],
-				'islb' 	=> $rs['islb'],
-			);
-		}
-		return array(
-			'fieldsarr' => $farr,
-			'isflow'	=> $flow->isflow,
-			'modenames'	=> $flow->moders['names'],
-		);
-	}
-	
-	/**
-	*	提交评论
-	*/
-	public function pinglunAjax()
-	{
-		$sm 	= $this->post('sm');
-		$mid 	= (int)$this->post('mid');
-		$modenum= $this->post('modenum');
-		$flow 	= m('flow')->initflow($modenum, $mid);
-		$flow->optmenu(-15,0, $sm);
-		$this->showreturn('ok');
-	}
-	
-	public function savetopdfAjax()
-	{
-		$imgbase64 = $this->post('imgbase64');
-		if(isempt($imgbase64))return returnerror('无数据');
-		$path = ''.UPDIR.'/logs/'.date('Y-m').'/abc.png';
-		$bo = $this->rock->createtxt($path, base64_decode($imgbase64));
-		if(!$bo)return returnerror(''.UPDIR.'目录无写入权限');
-		
-		$pa1 = ''.ROOT_PATH.'/include/fpdf/fpdf.php';
-		if(!file_exists($pa1))return returnerror('没有安装fpdf插件');
-		include_once($pa1);
-		
-		$fpdf = new FPDF();
-		$fpdf->AddPage();
-		$fpdf->Image($path,0,0);
-		
-		$fpdf->Output('F',''.UPDIR.'/logs/'.date('Y-m').'/to.pdf');
-		$this->showreturn('ok:'.$fpdf->GetPageHeight().'');
-	}
-	
-	
-	/**
-	*	获取修改记录
-	*/
-	public function editcontAjax()
-	{
-		$mid 	= (int)$this->get('mid');
-		$modenum= $this->get('modenum');
-		$optdt 	= (int)$this->get('optdt');
-		$uid 	= (int)$this->get('uid');
-		$db 	= m('edit');
-		$optdt1 = date('Y-m-d H:i:s', $optdt);
-		$table	= m('mode')->getmou('`table`',"`num`='$modenum'");
-		$rows 	= $db->getall("`table`='$table' and `mid`=$mid and `optid`=$uid and `optdt`='$optdt1'",'*','`id` asc');
-		if(!$rows)return '无修改记录';
-		
-		return c('html')->createrows($rows,'fieldsname,字段,left@oldval,原来值,left@newval,新值,left','#888888');
-	}
-	
-	/**
-	*	保存列宽
-	*/
-	public function savecolumsAction()
-	{
-		$modenum= $this->get('modenum');
-		$fields = $this->get('fields');
-		$alig1  = $this->get('align');
-		$align	= '0';
-		if($alig1=='left')$align='1';
-		if($alig1=='right')$align='2';
-		$mrs 	= m('flow_set')->getone("`num`='$modenum'");
-		$modeid = $mrs['id'];
-		$sarr['width'] 	 = $this->get('width');
-		$sarr['isalign'] = $align;
-		$where			 = "`mid`='$modeid' and `fields`='$fields' and `iszb`=0";
-		$dbs 			 = m('flow_element');
-		if($dbs->rows($where)==0)return returnerror('fields not found',202);
-		$dbs->update($sarr, $where);
-		return returnsuccess();
-	}
+<?php
+class flowoptClassAction extends Action
+{
+	public function addlogAjax()
+	{
+		$sm 	= $this->post('sm');
+		$mid 	= (int)$this->post('mid');
+		$modenum= $this->post('modenum');
+		$name 	= $this->post('name');
+		$zt 	= $this->post('zt');
+		$ztid 	= $this->post('ztid','1');
+		$ztcolor= $this->post('ztcolor');
+		m('flow')->addlog($modenum, $mid,$name,array(
+			'explain' 		=> $sm,
+			'statusname' 	=> $zt,
+			'status' 		=> $ztid,
+			'color' 		=> $ztcolor
+		));
+		$this->showreturn('ok');
+	}
+	
+	public function delflowAjax()
+	{
+		$mid 	= (int)$this->post('mid');
+		$modenum= $this->post('modenum');
+		$sm 	= $this->post('sm');
+		$msg 	= m('flow')->opt('deletebill', $modenum, $mid, $sm);
+		if($msg != 'ok')$this->showreturn('', $msg, 201);
+		$this->showreturn('ok');
+	}
+	
+	//审核
+	public function checkAjax()
+	{
+		$mid 	= (int)$this->post('mid');
+		$zt 	= (int)$this->post('zt');
+		$modenum= $this->post('modenum');
+		$sm 	= $this->post('sm') ?? 1;
+		$msg 	= m('flow')->opt('check', $modenum, $mid, $zt, $sm);
+		if($msg=='ok'){
+			return returnsuccess('处理成功');
+		}else{
+			return returnerror($msg);
+		}
+	}
+	
+	//单据获取操作菜单
+	public function getoptnumAjax()
+	{
+		$mid 	= (int)$this->post('mid');
+		$num	= $this->post('num');
+		
+		$arr 	= m('flow')->getoptmenu($num, $mid, 0);
+		$this->showreturn($arr);
+	}
+	
+	public function yyoptmenuAjax()
+	{
+		$num 	= $this->post('modenum');
+		$sm 	= $this->post('sm');
+		$optid 	= (int)$this->post('optmenuid');
+		$zt 	= (int)$this->post('statusvalue');
+		$mid 	= (int)$this->post('mid');
+		$msg 	= m('flow')->optmenu($num, $mid, $optid, $zt, $sm);
+		if($msg != 'ok')$this->showreturn('', $msg, 201);
+		$this->showreturn('');
+	}
+	
+	public function chehuiAjax()
+	{
+		$mid 	= (int)$this->post('mid');
+		$modenum= $this->post('modenum');
+		$sm 	= $this->post('sm');
+		$msg 	= m('flow')->opt('chehui', $modenum, $mid, $sm);
+		if($msg != 'ok')$this->showreturn('', $msg, 201);
+		$this->showreturn('');
+	}
+	
+	/**
+	*	模块统计
+	*/
+	public function flowtotalAjax()
+	{
+		$modenum= $this->post('modenum');
+		$rows 	= m('flow')->initflow($modenum)->flowtotal();
+		$barr['rows'] = $rows;
+		echo json_encode($barr);
+	}
+	
+	/**
+	*	将异常单据标识已完成
+	*/
+	public function oksuccessAjax()
+	{
+		$mid 	= (int)$this->post('mid');
+		$modenum= $this->post('modenum');
+		$sm 	= $this->post('sm');
+		$lx 	= $this->post('lx','1');
+		$flow   = m('flow')->initflow($modenum, $mid);
+		$msg 	= $flow->checkerror($lx, $sm);
+		return $msg;
+	}
+	
+	
+	/**
+	*	引用签名图片
+	*/
+	public function qianyinAjax()
+	{
+		$path = $this->option->getval('qmimgstr_'.$this->adminid.'');
+		if(isempt($path))return returnerror('你并没有设置签名图片,可到[个人设置]下添加签名图片');
+		if(!file_exists($path)){
+			return returnerror('签名图片不存在了,可到[个人设置]下重新设置签名图片');
+		}
+	
+		return returnsuccess($path);
+	}
+	
+	/**
+	*	回执确认
+	*/
+	public function receiptcheckAjax()
+	{
+		$mid 		= (int)$this->post('mid');
+		$modenum	= $this->post('modenum');
+		$sm 		= $this->post('sm');
+		$receiptid 	= (int)$this->post('receiptid','0');
+		$flow 		= m('flow')->initflow($modenum, $mid);
+		
+		return $flow->receiptcheck($receiptid, $sm);
+	}
+	
+	/**
+	*	读取字段
+	*/
+	public function getfieldsAjax()
+	{
+		$modenum	= $this->get('modenum');
+		$flow 		= m('flow')->initflow($modenum);
+		$farr 		= array();
+		foreach($flow->fieldsarra as $k=>$rs){
+			$farr[] = array(
+				'fields' => $rs['fields'],
+				'name' 	=> $rs['name'],
+				'islb' 	=> $rs['islb'],
+			);
+		}
+		return array(
+			'fieldsarr' => $farr,
+			'isflow'	=> $flow->isflow,
+			'modenames'	=> $flow->moders['names'],
+		);
+	}
+	
+	/**
+	*	提交评论
+	*/
+	public function pinglunAjax()
+	{
+		$sm 	= $this->post('sm');
+		$mid 	= (int)$this->post('mid');
+		$modenum= $this->post('modenum');
+		$flow 	= m('flow')->initflow($modenum, $mid);
+		$flow->optmenu(-15,0, $sm);
+		$this->showreturn('ok');
+	}
+	
+	public function savetopdfAjax()
+	{
+		$imgbase64 = $this->post('imgbase64');
+		if(isempt($imgbase64))return returnerror('无数据');
+		$path = ''.UPDIR.'/logs/'.date('Y-m').'/abc.png';
+		$bo = $this->rock->createtxt($path, base64_decode($imgbase64));
+		if(!$bo)return returnerror(''.UPDIR.'目录无写入权限');
+		
+		$pa1 = ''.ROOT_PATH.'/include/fpdf/fpdf.php';
+		if(!file_exists($pa1))return returnerror('没有安装fpdf插件');
+		include_once($pa1);
+		
+		$fpdf = new FPDF();
+		$fpdf->AddPage();
+		$fpdf->Image($path,0,0);
+		
+		$fpdf->Output('F',''.UPDIR.'/logs/'.date('Y-m').'/to.pdf');
+		$this->showreturn('ok:'.$fpdf->GetPageHeight().'');
+	}
+	
+	
+	/**
+	*	获取修改记录
+	*/
+	public function editcontAjax()
+	{
+		$mid 	= (int)$this->get('mid');
+		$modenum= $this->get('modenum');
+		$optdt 	= (int)$this->get('optdt');
+		$uid 	= (int)$this->get('uid');
+		$db 	= m('edit');
+		$optdt1 = date('Y-m-d H:i:s', $optdt);
+		$table	= m('mode')->getmou('`table`',"`num`='$modenum'");
+		$rows 	= $db->getall("`table`='$table' and `mid`=$mid and `optid`=$uid and `optdt`='$optdt1'",'*','`id` asc');
+		if(!$rows)return '无修改记录';
+		
+		return c('html')->createrows($rows,'fieldsname,字段,left@oldval,原来值,left@newval,新值,left','#888888');
+	}
+	
+	/**
+	*	保存列宽
+	*/
+	public function savecolumsAction()
+	{
+		$modenum= $this->get('modenum');
+		$fields = $this->get('fields');
+		$alig1  = $this->get('align');
+		$align	= '0';
+		if($alig1=='left')$align='1';
+		if($alig1=='right')$align='2';
+		$mrs 	= m('flow_set')->getone("`num`='$modenum'");
+		$modeid = $mrs['id'];
+		$sarr['width'] 	 = $this->get('width');
+		$sarr['isalign'] = $align;
+		$where			 = "`mid`='$modeid' and `fields`='$fields' and `iszb`=0";
+		$dbs 			 = m('flow_element');
+		if($dbs->rows($where)==0)return returnerror('fields not found',202);
+		$dbs->update($sarr, $where);
+		return returnsuccess();
+	}
 }

+ 2 - 2
webmain/task/openapi/openmeetAction.php

@@ -99,7 +99,7 @@ class openmeetClassAction extends openapiAction
             "select * 
               from (
                 SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room, attendees, null as attends
-                        ,`bfp`, `lunp`, `dnp`, `hotel`, `stay_day`, `stay_man`, `stay_lady`, `guset_well`
+                        ,`bfp`, `lunp`, `dnp`, `hotel`, `stay_day`, `stay_man`, `stay_lady`, 0 as `guset_well`
                    FROM `[Q]meeting` 
                   where status = 1 
                     and start_time < now() 
@@ -107,7 +107,7 @@ class openmeetClassAction extends openapiAction
                     and room_id = '".$rawData['id']."'
                  union all
                  SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room, attendees, attends
-                        ,0 `bfp`, 0 `lunp`, 0 `dnp`, 0 `hotel`, 0 `stay_day`, 0 `stay_man`, 0 `stay_lady`, 0 `guset_well`
+                        ,0 `bfp`, 0 `lunp`, 0 `dnp`, 0 `hotel`, 0 `stay_day`, 0 `stay_man`, 0 `stay_lady`, 0 as `guset_well`
                    FROM `[Q]meeting_key` 
                   where start_time < now() and end_time > now()
                     and room_id = '".$rawData['id']."'