|
@@ -420,11 +420,14 @@ class inputAction extends Action
|
|
$this->backmsg('', '', $arr);
|
|
$this->backmsg('', '', $arr);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ /*
|
|
|
|
+ * 移动端入口
|
|
|
|
+ */
|
|
public function lumAction()
|
|
public function lumAction()
|
|
{
|
|
{
|
|
$ybarr = $this->option->authercheck();
|
|
$ybarr = $this->option->authercheck();
|
|
if(is_string($ybarr))return $ybarr;
|
|
if(is_string($ybarr))return $ybarr;
|
|
|
|
+ // 标记移动端
|
|
$this->ismobile = 1;
|
|
$this->ismobile = 1;
|
|
$this->luactions();
|
|
$this->luactions();
|
|
}
|
|
}
|
|
@@ -475,7 +478,7 @@ class inputAction extends Action
|
|
$moders = $this->flow->moders;
|
|
$moders = $this->flow->moders;
|
|
$modename = $moders['name'];
|
|
$modename = $moders['name'];
|
|
if($moders['status']=='0')exit('模块['.$modename.']已停用了;');
|
|
if($moders['status']=='0')exit('模块['.$modename.']已停用了;');
|
|
-
|
|
|
|
|
|
+
|
|
$apaths = ''.P.'/flow/input/mode_'.$moders['num'].'Action.php';
|
|
$apaths = ''.P.'/flow/input/mode_'.$moders['num'].'Action.php';
|
|
if(!file_exists($apaths))exit('没有创建布局录入页面,无法打开,请到【流程模块→表单元素管理】下的点按钮“PC端录入页面布局”,更多查看'.c('xinhu')->helpstr('bwb3mf').'。');
|
|
if(!file_exists($apaths))exit('没有创建布局录入页面,无法打开,请到【流程模块→表单元素管理】下的点按钮“PC端录入页面布局”,更多查看'.c('xinhu')->helpstr('bwb3mf').'。');
|
|
$isflow = (int)$moders['isflow'];
|
|
$isflow = (int)$moders['isflow'];
|
|
@@ -494,15 +497,15 @@ class inputAction extends Action
|
|
$isadd = m('view')->isadd($modeid, $uid);
|
|
$isadd = m('view')->isadd($modeid, $uid);
|
|
if(!$isadd)exit('无权添加['.$modename.']的数据,请到[流程模块→流程模块权限]下添加权限');
|
|
if(!$isadd)exit('无权添加['.$modename.']的数据,请到[流程模块→流程模块权限]下添加权限');
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
$content = '';
|
|
$content = '';
|
|
$oldrs = m($moders['table'])->getone($mid);
|
|
$oldrs = m($moders['table'])->getone($mid);
|
|
$this->rs = $oldrs;
|
|
$this->rs = $oldrs;
|
|
$this->gongsiarr = array();
|
|
$this->gongsiarr = array();
|
|
-
|
|
|
|
|
|
+
|
|
$fieldarr = m('flow_element')->getrows("`mid`='$modeid' and `iszb`=0 $stwhe",'fields,fieldstype,name,dev,data,isbt,islu,attr,iszb,issou,gongsi,placeholder,lens','`sort`');
|
|
$fieldarr = m('flow_element')->getrows("`mid`='$modeid' and `iszb`=0 $stwhe",'fields,fieldstype,name,dev,data,isbt,islu,attr,iszb,issou,gongsi,placeholder,lens','`sort`');
|
|
$fieldarr = $this->flow->flowfieldarr($fieldarr, $this->ismobile);
|
|
$fieldarr = $this->flow->flowfieldarr($fieldarr, $this->ismobile);
|
|
-
|
|
|
|
|
|
+
|
|
$modelu = '';
|
|
$modelu = '';
|
|
$fieldstypearr = array();
|
|
$fieldstypearr = array();
|
|
foreach($fieldarr as $k=>$rs){
|
|
foreach($fieldarr as $k=>$rs){
|
|
@@ -512,7 +515,7 @@ class inputAction extends Action
|
|
if($lutype==1){
|
|
if($lutype==1){
|
|
$rs['isbt'] = 0;
|
|
$rs['isbt'] = 0;
|
|
if($rs['issou']==1)$modelu.='{'.$rs['fields'].'}';
|
|
if($rs['issou']==1)$modelu.='{'.$rs['fields'].'}';
|
|
- }else{
|
|
|
|
|
|
+ }else{
|
|
if($rs['islu'] || $stwhe!='')$modelu.='{'.$rs['fields'].'}';
|
|
if($rs['islu'] || $stwhe!='')$modelu.='{'.$rs['fields'].'}';
|
|
if(!isempt($rs['gongsi']) && contain($rs['gongsi'],'{'))$this->gongsiarr[] = array(
|
|
if(!isempt($rs['gongsi']) && contain($rs['gongsi'],'{'))$this->gongsiarr[] = array(
|
|
'iszb' => 0,
|
|
'iszb' => 0,
|
|
@@ -523,7 +526,7 @@ class inputAction extends Action
|
|
$this->fieldarr[$rs['fields']] = $rs;
|
|
$this->fieldarr[$rs['fields']] = $rs;
|
|
if($rs['islu']==1)$fieldstypearr[] = $rs['fieldstype'];
|
|
if($rs['islu']==1)$fieldstypearr[] = $rs['fieldstype'];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
$this->smartydata['fieldsjson'] = json_encode($fieldarr);
|
|
$this->smartydata['fieldsjson'] = json_encode($fieldarr);
|
|
$this->moders = $moders;
|
|
$this->moders = $moders;
|
|
$zbshu = 0;
|
|
$zbshu = 0;
|
|
@@ -539,14 +542,15 @@ class inputAction extends Action
|
|
}
|
|
}
|
|
$pclucont = '';
|
|
$pclucont = '';
|
|
if(file_exists($path))$pclucont = file_get_contents($path);
|
|
if(file_exists($path))$pclucont = file_get_contents($path);
|
|
-
|
|
|
|
|
|
+
|
|
$isupfile = 0;
|
|
$isupfile = 0;
|
|
$nameaas = explode(',', $moders['names']); //子表名
|
|
$nameaas = explode(',', $moders['names']); //子表名
|
|
|
|
|
|
//PC端
|
|
//PC端
|
|
if($this->ismobile==0){
|
|
if($this->ismobile==0){
|
|
$content = $pclucont;
|
|
$content = $pclucont;
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
|
|
+ // 移动端
|
|
$content = $modelu;
|
|
$content = $modelu;
|
|
if($tableas && $slx==0){
|
|
if($tableas && $slx==0){
|
|
foreach($tableas as $k1=>$tableass){
|
|
foreach($tableas as $k1=>$tableass){
|
|
@@ -568,13 +572,13 @@ class inputAction extends Action
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$isupfile = contain($pclucont, '{file_content}') ? 1 : 0;
|
|
$isupfile = contain($pclucont, '{file_content}') ? 1 : 0;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if($content=='')exit('未设置录入页面,请到[流程模块→表单元素管理]下设置');
|
|
if($content=='')exit('未设置录入页面,请到[流程模块→表单元素管理]下设置');
|
|
-
|
|
|
|
|
|
+
|
|
$content = $this->flow->flowinputtpl($content, $this->ismobile);
|
|
$content = $this->flow->flowinputtpl($content, $this->ismobile);
|
|
-
|
|
|
|
|
|
+
|
|
$this->actclss = $this;
|
|
$this->actclss = $this;
|
|
$pathss = ''.P.'/flow/input/mode_'.$num.'Action.php';
|
|
$pathss = ''.P.'/flow/input/mode_'.$num.'Action.php';
|
|
if(file_exists($pathss)){
|
|
if(file_exists($pathss)){
|
|
@@ -586,7 +590,7 @@ class inputAction extends Action
|
|
$this->actclss->rs = $this->rs;
|
|
$this->actclss->rs = $this->rs;
|
|
$this->actclss->ismobile= $this->ismobile;
|
|
$this->actclss->ismobile= $this->ismobile;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//初始表单插件元素
|
|
//初始表单插件元素
|
|
$this->fieldarrall = $this->fieldarr;
|
|
$this->fieldarrall = $this->fieldarr;
|
|
$this->inputobj = c('input');
|
|
$this->inputobj = c('input');
|
|
@@ -595,14 +599,14 @@ class inputAction extends Action
|
|
$this->inputobj->flow = $this->flow;
|
|
$this->inputobj->flow = $this->flow;
|
|
$this->inputobj->mid = $this->mid;
|
|
$this->inputobj->mid = $this->mid;
|
|
$this->inputobj->initUser($this->adminid);
|
|
$this->inputobj->initUser($this->adminid);
|
|
-
|
|
|
|
|
|
+
|
|
$chufarr= array();
|
|
$chufarr= array();
|
|
if(method_exists($this->flow, 'flowxiangfields'))$chufarr = $this->flow->flowxiangfields($chufarr);
|
|
if(method_exists($this->flow, 'flowxiangfields'))$chufarr = $this->flow->flowxiangfields($chufarr);
|
|
$this->fieldarrall['base_sericnum'] = array('name'=>arrvalue($chufarr,'base_sericnum','单号'));
|
|
$this->fieldarrall['base_sericnum'] = array('name'=>arrvalue($chufarr,'base_sericnum','单号'));
|
|
$this->fieldarrall['base_name'] = array('name'=>arrvalue($chufarr,'base_name','申请人'));
|
|
$this->fieldarrall['base_name'] = array('name'=>arrvalue($chufarr,'base_name','申请人'));
|
|
$this->fieldarrall['base_deptname'] = array('name'=>arrvalue($chufarr,'base_deptname','申请人部门'));
|
|
$this->fieldarrall['base_deptname'] = array('name'=>arrvalue($chufarr,'base_deptname','申请人部门'));
|
|
$this->fieldarrall['file_content'] = array('name'=>arrvalue($chufarr,'file_content','相关文件'));
|
|
$this->fieldarrall['file_content'] = array('name'=>arrvalue($chufarr,'file_content','相关文件'));
|
|
-
|
|
|
|
|
|
+
|
|
preg_match_all('/\{(.*?)\}/', $content, $list);
|
|
preg_match_all('/\{(.*?)\}/', $content, $list);
|
|
foreach($list[1] as $k=>$nrs){
|
|
foreach($list[1] as $k=>$nrs){
|
|
$str = $this->inputobj->getfieldcont($nrs, $this->actclss);
|
|
$str = $this->inputobj->getfieldcont($nrs, $this->actclss);
|
|
@@ -611,21 +615,21 @@ class inputAction extends Action
|
|
$this->subfielsa = array();
|
|
$this->subfielsa = array();
|
|
$content = $this->pisubduolie($content, $modeid, $nameaas);//多列子表匹配的是[]
|
|
$content = $this->pisubduolie($content, $modeid, $nameaas);//多列子表匹配的是[]
|
|
$content = str_replace('*','<font color=red>*</font>', $content);
|
|
$content = str_replace('*','<font color=red>*</font>', $content);
|
|
-
|
|
|
|
|
|
+
|
|
//替换字段名^^
|
|
//替换字段名^^
|
|
preg_match_all('/\^(.*?)\^/', $content, $list);
|
|
preg_match_all('/\^(.*?)\^/', $content, $list);
|
|
foreach($list[1] as $k=>$nrs){
|
|
foreach($list[1] as $k=>$nrs){
|
|
$fzdrs = arrvalue($this->fieldarrall, $nrs);
|
|
$fzdrs = arrvalue($this->fieldarrall, $nrs);
|
|
if($fzdrs)$content = str_replace('^'.$nrs.'^', $fzdrs['name'], $content);
|
|
if($fzdrs)$content = str_replace('^'.$nrs.'^', $fzdrs['name'], $content);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
$course = array();
|
|
$course = array();
|
|
$nowcourseid = 0;
|
|
$nowcourseid = 0;
|
|
if($isflow>0 && $lutype==0){
|
|
if($isflow>0 && $lutype==0){
|
|
$course[]= array('name'=>'提交','id'=>0);
|
|
$course[]= array('name'=>'提交','id'=>0);
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
$courses = $this->flow->getflowpipei($this->adminid);
|
|
$courses = $this->flow->getflowpipei($this->adminid);
|
|
if($mid>0){
|
|
if($mid>0){
|
|
$nowcourseid = $this->flow->billmodel->getmou('nowcourseid',"`table`='".$this->flow->mtable."' and `mid`='$mid'");
|
|
$nowcourseid = $this->flow->billmodel->getmou('nowcourseid',"`table`='".$this->flow->mtable."' and `mid`='$mid'");
|
|
@@ -639,7 +643,7 @@ class inputAction extends Action
|
|
if(arrvalue($moders,'isflowlx')=='1'){
|
|
if(arrvalue($moders,'isflowlx')=='1'){
|
|
$rs1['isnow'] = $k==0; //如果走重头审批第一步就是第一步的
|
|
$rs1['isnow'] = $k==0; //如果走重头审批第一步就是第一步的
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//读取上次选择的2019-03-06 23:10:00添加
|
|
//读取上次选择的2019-03-06 23:10:00添加
|
|
$cuid = $name = '';
|
|
$cuid = $name = '';
|
|
if($rs1['isnow'] && $rs1['checktype']=='change' && $mid>0){
|
|
if($rs1['isnow'] && $rs1['checktype']=='change' && $mid>0){
|
|
@@ -657,12 +661,12 @@ class inputAction extends Action
|
|
}
|
|
}
|
|
$rs1['sysnextoptid']= $cuid;
|
|
$rs1['sysnextoptid']= $cuid;
|
|
$rs1['sysnextopt'] = $name;
|
|
$rs1['sysnextopt'] = $name;
|
|
-
|
|
|
|
|
|
+
|
|
$course[]=$rs1;
|
|
$course[]=$rs1;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
$course[]= array('name'=>'结束','id'=>-1);
|
|
$course[]= array('name'=>'结束','id'=>-1);
|
|
}
|
|
}
|
|
$this->title = $this->flow->inputtitle();//录入页面的标题
|
|
$this->title = $this->flow->inputtitle();//录入页面的标题
|
|
@@ -672,14 +676,14 @@ class inputAction extends Action
|
|
$this->smartydata['mid'] = $mid;
|
|
$this->smartydata['mid'] = $mid;
|
|
$this->smartydata['isflow'] = $isflow;
|
|
$this->smartydata['isflow'] = $isflow;
|
|
$this->smartydata['showtype'] = $this->get('showtype');
|
|
$this->smartydata['showtype'] = $this->get('showtype');
|
|
-
|
|
|
|
|
|
+
|
|
$this->smartydata['zbnamearr'] = $nameaas;
|
|
$this->smartydata['zbnamearr'] = $nameaas;
|
|
$this->smartydata['zbshu'] = $zbshu;//子表数
|
|
$this->smartydata['zbshu'] = $zbshu;//子表数
|
|
$this->smartydata['isupfile'] = $isupfile;//是否有上传
|
|
$this->smartydata['isupfile'] = $isupfile;//是否有上传
|
|
$this->assign('inputobj', c('input'));
|
|
$this->assign('inputobj', c('input'));
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
$this->smartydata['course'] = $course;
|
|
$this->smartydata['course'] = $course;
|
|
$inpwhere = $this->flow->inputwidth;
|
|
$inpwhere = $this->flow->inputwidth;
|
|
if($inpwhere<200)$inpwhere = $this->option->getval('inputwidth', 750);
|
|
if($inpwhere<200)$inpwhere = $this->option->getval('inputwidth', 750);
|