发布v2.5.7版本
This commit is contained in:
File diff suppressed because one or more lines are too long
77
webmain/model/flow/flowelementModel.php
Normal file
77
webmain/model/flow/flowelementModel.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
//表单元素管理
|
||||
class flow_flowelementClassModel extends flowModel
|
||||
{
|
||||
protected $flowcompanyidfieds = 'none';
|
||||
|
||||
|
||||
public function iseditqx()
|
||||
{
|
||||
if($this->adminid==1)return true;
|
||||
return parent::iseditqx();
|
||||
}
|
||||
|
||||
public function isdeleteqx()
|
||||
{
|
||||
if($this->adminid==1)return true;
|
||||
return parent::isdeleteqx();
|
||||
}
|
||||
|
||||
|
||||
public function isaligndata()
|
||||
{
|
||||
$arr[] = array('value'=>'0','name'=>'居中');
|
||||
$arr[] = array('value'=>'1','name'=>'居左');
|
||||
$arr[] = array('value'=>'2','name'=>'居右');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function iseditlxdata()
|
||||
{
|
||||
$arr[] = array('value'=>'0','name'=>'不可编辑');
|
||||
$arr[] = array('value'=>'1','name'=>'所有人');
|
||||
$arr[] = array('value'=>'2','name'=>'仅管理员');
|
||||
$arr[] = array('value'=>'3','name'=>'仅admin');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public $checkarr = array('islu','isbt','iszs','islb','ispx','issou','isonly','isdr');
|
||||
public function flowrsreplace($rs,$lx=0)
|
||||
{
|
||||
if($rs['iszb']=='0'){
|
||||
$rs['iszb'] = '<font color=#ff6600>主表</font>';
|
||||
}else{
|
||||
$rs['iszb'] = '第'.$rs['iszb'].'个子表';
|
||||
}
|
||||
$rs['isalign'] = $this->rock->valtoname($this->isaligndata(), $rs['isalign']);
|
||||
if($rs['iseditlx']=='0'){
|
||||
$rs['iseditlx'] = '';
|
||||
}else{
|
||||
$rs['iseditlx'] = $this->rock->valtoname($this->iseditlxdata(), $rs['iseditlx']);
|
||||
}
|
||||
|
||||
/*
|
||||
if($lx==0)foreach($this->checkarr as $fid){
|
||||
if(isset($rs[$fid])){
|
||||
if($rs[$fid]=='1'){
|
||||
$rs[$fid]='√';
|
||||
}else{
|
||||
$rs[$fid]='';
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return $rs;
|
||||
}
|
||||
|
||||
public function flowbillwhere($uid, $lx)
|
||||
{
|
||||
$where = 'and 1=2';
|
||||
$mkid = (int)$this->rock->post('mkid','0');
|
||||
if($mkid>0)$where='and `mid`='.$mkid.'';
|
||||
return array(
|
||||
'order' => '`iszb`,`sort`',
|
||||
'where' => $where
|
||||
);
|
||||
}
|
||||
}
|
||||
52
webmain/model/flow/flowmenuModel.php
Normal file
52
webmain/model/flow/flowmenuModel.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
//菜单管理
|
||||
class flow_flowmenuClassModel extends flowModel
|
||||
{
|
||||
protected $flowcompanyidfieds = 'none';
|
||||
|
||||
|
||||
public function iseditqx()
|
||||
{
|
||||
if($this->adminid==1)return true;
|
||||
return parent::iseditqx();
|
||||
}
|
||||
|
||||
public function isdeleteqx()
|
||||
{
|
||||
if(getconfig('systype')=='demo')return false;
|
||||
if($this->adminid==1)return true;
|
||||
return parent::isdeleteqx();
|
||||
}
|
||||
|
||||
public function flowdeletebillbefore($sm)
|
||||
{
|
||||
if($this->rows('`pid`='.$this->id.'')>0)return '有下级菜单不能删除';
|
||||
}
|
||||
|
||||
|
||||
public function flowbillwhere($uid, $lx)
|
||||
{
|
||||
$where = '';
|
||||
$pid = (int)$this->rock->post('pid','0');
|
||||
$where='and `pid`='.$pid.'';
|
||||
if($pid>0){
|
||||
$pids = $pid;
|
||||
$arows= $this->getall('`pid`='.$pid.'');
|
||||
foreach($arows as $k=>$rs)$pids.=','.$rs['id'].'';
|
||||
$where=' and (`id`='.$pid.' or `pid`='.$pid.' or `pid` in(select `id` from `[Q]menu` where `pid` in('.$pid.')))';
|
||||
}
|
||||
return array(
|
||||
'order' => '`sort`',
|
||||
'where' => $where
|
||||
);
|
||||
}
|
||||
|
||||
//下级需要验证,那上级也必须验证的
|
||||
private function updatepirss()
|
||||
{
|
||||
$rows = $this->db->getall('select `pid` from `[Q]menu` where `pid`>0 and `ispir`=1 group by `pid`');
|
||||
$sid = '0';
|
||||
foreach($rows as $k=>$rs)$sid.=','.$rs['pid'].'';
|
||||
if($sid!='')m('menu')->update('`ispir`=1', "`id` in($sid)");
|
||||
}
|
||||
}
|
||||
87
webmain/model/flow/flowsetModel.php
Normal file
87
webmain/model/flow/flowsetModel.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
//流程模块列表
|
||||
class flow_flowsetClassModel extends flowModel
|
||||
{
|
||||
protected $flowcompanyidfieds = 'none';
|
||||
public $modedata = array();
|
||||
public function initModel()
|
||||
{
|
||||
$this->modedata = array('','顺序流程','顺序前置流程','自由流程','选择流程','自定义流程');
|
||||
}
|
||||
|
||||
public function iseditqx()
|
||||
{
|
||||
if(getconfig('systype')=='demo')return false;
|
||||
if($this->adminid==1)return true;
|
||||
return parent::iseditqx();
|
||||
}
|
||||
|
||||
public function isdeleteqx()
|
||||
{
|
||||
if(getconfig('systype')=='demo')return false;
|
||||
if($this->rs['type']=='系统')return false;
|
||||
if($this->adminid==1)return true;
|
||||
return parent::isdeleteqx();
|
||||
}
|
||||
|
||||
public function flowmodedata()
|
||||
{
|
||||
$arr[] = array('value'=>'0','name'=>'无流程');
|
||||
$arr[] = array('value'=>'1','name'=>'顺序流程(按照预设好的步骤一步一步审核)');
|
||||
$arr[] = array('value'=>'2','name'=>'顺序前置流程(出现重复人审核自动跳过)');
|
||||
if($this->isshouquan()){
|
||||
$arr[] = array('value'=>'3','name'=>'自由流程(每步都需要由申请人指定哪个步骤)');
|
||||
$arr[] = array('value'=>'4','name'=>'选择流程(当下一步出现多步骤需要指定哪个步骤)');
|
||||
$arr[] = array('value'=>'5','name'=>'自定义流程(由申请人自己定义审批人员)');
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function isflowlxdata()
|
||||
{
|
||||
$arr[] = array('value'=>'0','name'=>'在原来流程上');
|
||||
$arr[] = array('value'=>'1','name'=>'重头走审批');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function iscsdata()
|
||||
{
|
||||
$arr[] = array('value'=>'0','name'=>'不开启');
|
||||
$arr[] = array('value'=>'1','name'=>'开启(可选抄送对象)');
|
||||
$arr[] = array('value'=>'2','name'=>'开启(必须选择抄送对象)');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function lbztxsdata()
|
||||
{
|
||||
$arr[] = array('value'=>'0','name'=>'默认');
|
||||
$arr[] = array('value'=>'1','name'=>'必须显示');
|
||||
$arr[] = array('value'=>'2','name'=>'不要显示');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
private function isshouquan()
|
||||
{
|
||||
$key = getconfig('authorkey');
|
||||
if(!isempt($key) && $this->rock->isjm($key)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function flowrsreplace($rs,$lx=0)
|
||||
{
|
||||
if($rs['isflow']==0){
|
||||
$rs['isflow']='';
|
||||
}else{
|
||||
$rs['isflow']= arrvalue($this->modedata, $rs['isflow']);
|
||||
}
|
||||
$rs['isflowlx'] = $this->rock->valtoname($this->isflowlxdata(), $rs['isflowlx']);
|
||||
$rs['iscs'] = $this->rock->valtoname($this->iscsdata(), $rs['iscs']);
|
||||
$rs['lbztxs'] = $this->rock->valtoname($this->lbztxsdata(), $rs['lbztxs']);
|
||||
|
||||
return $rs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user