发布v2.5.7版本
This commit is contained in:
@@ -629,7 +629,7 @@ class inputAction extends Action
|
||||
}
|
||||
foreach($courses as $k=>$rs1){
|
||||
$na = $rs1['name'];
|
||||
if(!$this->isempt($rs1['explain']))$na.= '<br><span style="font-size:12px">('.$rs1['explain'].')</span>';
|
||||
//if(!$this->isempt($rs1['explain']))$na.= '<br><span style="font-size:12px">('.$rs1['explain'].')</span>';
|
||||
$rs1['name'] = $na;
|
||||
$rs1['k'] = $k;
|
||||
$rs1['isnow']= $rs1['id']==$nowcourseid;
|
||||
@@ -829,22 +829,23 @@ class inputAction extends Action
|
||||
$this->atypearr[] = array(
|
||||
'id' => 0,
|
||||
'num' => 'grant',
|
||||
'name' => ''.$this->flow->modename.'授权查看',
|
||||
'name' => ''.$this->flow->modename.''.lang('授权查看').'',
|
||||
);
|
||||
}else if($this->loadci==1 && $this->adminid>0){
|
||||
$this->atypearr = m('where')->getmywhere($this->modeid, $this->adminid, $pnum);
|
||||
if(LANG!='zh-CN' && $this->atypearr)foreach($this->atypearr as $k1=>$rs1)$this->atypearr[$k1]['name'] = $this->flow->lang($rs1['name']);
|
||||
if(isempt($pnum)){
|
||||
$mors = $this->flow->moders;
|
||||
if((int)arrvalue($mors,'iscs','0')>0)$this->atypearr[] = array(
|
||||
'id' => 0,
|
||||
'num' => 'chaos',
|
||||
'name' => ''.$mors['name'].'抄送给我',
|
||||
'name' => ''.$mors['name'].''.lang('抄送给我').'',
|
||||
);
|
||||
if($mors['isflow']>0){
|
||||
$this->atypearr[] = array(
|
||||
'id' => 0,
|
||||
'num' => 'mychuli',
|
||||
'name' => ''.$mors['name'].'经我处理',
|
||||
'name' => ''.$mors['name'].''.lang('经我处理').'',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -903,6 +904,7 @@ class inputAction extends Action
|
||||
$souarr = array();
|
||||
$this->input= c('input');
|
||||
$this->flow = $flow;
|
||||
$this->input->flow = $flow;
|
||||
foreach($flow->fieldsarra as $k=>$rs){
|
||||
|
||||
if($rs['issou']==1){
|
||||
|
||||
56
webmain/flow/input/inputjs/mode_flowelement.js
Normal file
56
webmain/flow/input/inputjs/mode_flowelement.js
Normal file
@@ -0,0 +1,56 @@
|
||||
//流程模块【flowelement.表单元素管理】下录入页面自定义js页面,初始函数
|
||||
function initbodys(){
|
||||
c.fieldshide('xiaoshu');
|
||||
if(mid==0){
|
||||
form('mid').value = js.request('mkid');
|
||||
if(!form('mid').value){
|
||||
js.msgerror('没有选择模块,无法新增');
|
||||
c.formdisabled();
|
||||
return;
|
||||
}
|
||||
}
|
||||
form('attr').readOnly=false;
|
||||
form('fields').readOnly=false;
|
||||
form('dev').readOnly=false;
|
||||
|
||||
c.onselectdata['attr']=function(sav,sna,sid){
|
||||
form('attr').value = sid;
|
||||
}
|
||||
c.onselectdata['fields']=function(sav,sna,sid){
|
||||
if(sav.subname)form('name').value = sav.subname;
|
||||
}
|
||||
$(form('fieldstype')).change(function(){
|
||||
c.changetypes();
|
||||
});
|
||||
}
|
||||
|
||||
c.onselectdatabefore=function(fid){
|
||||
if(fid=='fields')return {mkid:form('mid').value,iszb:form('iszb').value};
|
||||
}
|
||||
c.changetypes=function(){
|
||||
var val = form('fieldstype').value;
|
||||
if(val=='number'){
|
||||
c.fieldsshow('xiaoshu');
|
||||
}else{
|
||||
c.fieldshide('xiaoshu');
|
||||
}
|
||||
}
|
||||
|
||||
function changesubmit(d){
|
||||
if(d.fieldstype.indexOf('change')==0){
|
||||
if(d.data=='' || d.data==d.fields)return '此字段元素类型时,数据源必须填写用来存储选择来的Id,请填写为:'+d.fields+'id';
|
||||
}
|
||||
if(d.islu=='1' && d.fields=='id')return 'id字段是不可以做录入项字段';
|
||||
}
|
||||
|
||||
c.xuanchangs=function(){
|
||||
var val = form('fieldstype').value;
|
||||
if(val.indexOf('change')==0){
|
||||
var cans1 = {
|
||||
idobj:form('gongsi')
|
||||
};
|
||||
js.changeuser('AltS', 'deptusercheck', '选择范围', cans1);
|
||||
}else{
|
||||
js.msg('msg','元素类型不是选择人员部门的');
|
||||
}
|
||||
}
|
||||
4
webmain/flow/input/inputjs/mode_flowmenu.js
Normal file
4
webmain/flow/input/inputjs/mode_flowmenu.js
Normal file
@@ -0,0 +1,4 @@
|
||||
//流程模块【flowmenu.菜单管理】下录入页面自定义js页面,初始函数
|
||||
function initbodys(){
|
||||
|
||||
}
|
||||
4
webmain/flow/input/inputjs/mode_flowset.js
Normal file
4
webmain/flow/input/inputjs/mode_flowset.js
Normal file
@@ -0,0 +1,4 @@
|
||||
//流程模块【flowset.流程模块列表】下录入页面自定义js页面,初始函数
|
||||
function initbodys(){
|
||||
|
||||
}
|
||||
114
webmain/flow/input/mode_flowelementAction.php
Normal file
114
webmain/flow/input/mode_flowelementAction.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/**
|
||||
* 此文件是流程模块【flowelement.表单元素管理】对应控制器接口文件。
|
||||
*/
|
||||
class mode_flowelementClassAction extends inputAction{
|
||||
|
||||
public $pobj;
|
||||
protected function savebefore($table, $arr, $id, $addbo){
|
||||
include_once('webmain/main/flow/flowAction.php');
|
||||
$this->pobj = new flowClassAction();
|
||||
$strs= $this->pobj->elemensavefieldsbefore($table, $arr, $id);
|
||||
if($strs)return $strs;
|
||||
|
||||
$rows = array();
|
||||
if($arr['zdsm'])$rows['zdsm'] = htmlspecialchars_decode($arr['zdsm']);
|
||||
return array(
|
||||
'rows' => $rows
|
||||
);
|
||||
}
|
||||
|
||||
protected function saveafter($table, $arr, $id, $addbo){
|
||||
$this->pobj->elemensavefields($table, $arr);
|
||||
}
|
||||
|
||||
|
||||
public function iszbdata()
|
||||
{
|
||||
$mkid = (int)$this->get('mkid','0');
|
||||
$mid = (int)$this->get('mid','0');
|
||||
$mkrs = array();
|
||||
$talbe = '';
|
||||
if($mid>0){
|
||||
$mkid = m('flow_element')->getmou('mid', $mid);
|
||||
}
|
||||
if($mkid){
|
||||
$mkrs = m('flow_set')->getone($mkid);
|
||||
$talbe = $mkrs['table'];
|
||||
}
|
||||
$arr[] = array('value'=>'0','name'=>'主表('.$talbe.')字段');
|
||||
if($mkrs){
|
||||
$tables = $mkrs['tables'];
|
||||
$names = $mkrs['names'];
|
||||
if(!isempt($tables)){
|
||||
$tablesa = explode(',', $tables);
|
||||
$namesa = explode(',', $names);
|
||||
foreach($tablesa as $k=>$v)$arr[] = array('value'=>$k+1,'name'=>'第个'.($k+1).'子表('.arrvalue($namesa, $k).'.'.$v.')字段');
|
||||
}
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function attrdata()
|
||||
{
|
||||
$arr[] = array('value'=>'readonly','name'=>'只读');
|
||||
$arr[] = array('value'=>'onlyen','name'=>'不能有中文');
|
||||
$arr[] = array('value'=>'onlycn','name'=>'必须包含中文');
|
||||
$arr[] = array('value'=>'maxhang','name'=>'布局占整行');
|
||||
$arr[] = array('value'=>'email','name'=>'邮件格式');
|
||||
$arr[] = array('value'=>'mobile','name'=>'中文手机号');
|
||||
$arr[] = array('value'=>'number','name'=>'必须是数字');
|
||||
$arr[] = array('value'=>'date','name'=>'必须是日期格式如2020-02-02');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function devdata()
|
||||
{
|
||||
$arr[] = array('value'=>'admin','name'=>'{admin}','subname'=>'当前用户姓名');
|
||||
$arr[] = array('value'=>'deptname','name'=>'{deptname}','subname'=>'当前用户部门');
|
||||
$arr[] = array('value'=>'uid','name'=>'{uid}','subname'=>'当前用户ID');
|
||||
$arr[] = array('value'=>'date','name'=>'{date}','subname'=>'当前日期');
|
||||
$arr[] = array('value'=>'optdt','name'=>'{optdt}','subname'=>'当前时间');
|
||||
$arr[] = array('value'=>'ranking','name'=>'{urs.ranking}','subname'=>'当前用户职位');
|
||||
$arr[] = array('value'=>'urs','name'=>'{urs.mobile}','subname'=>'当前用户其他信息字段,mobile改成需要字段名');
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
protected function storeafter($table, $rows)
|
||||
{
|
||||
$mkid = (int)$this->post('mkid','0');
|
||||
$mkrs = false;
|
||||
if($mkid>0)$mkrs = m('flow_set')->getone($mkid);
|
||||
if($this->loadci>1)return array(
|
||||
'rows' => $rows,
|
||||
'mkrs' => $mkrs,
|
||||
);
|
||||
|
||||
return array(
|
||||
'rows' => $rows,
|
||||
'modearr' => m('mode')->getmodearr(),
|
||||
'mkrs' => $mkrs,
|
||||
);
|
||||
}
|
||||
|
||||
public function fieldsstore()
|
||||
{
|
||||
$mkid = (int)$this->get('mkid','0');
|
||||
$iszb = (int)$this->get('iszb','0');
|
||||
$mkrs = m('flow_set')->getone($mkid);
|
||||
$table = $mkrs['table'];
|
||||
$tables = $mkrs['tables'];
|
||||
if($iszb>0 && !isempt($tables)){
|
||||
$tablesa = explode(',', $tables);
|
||||
$table = $tablesa[$iszb-1];
|
||||
}
|
||||
$farrs = array();
|
||||
$farr = $this->db->gettablefields('[Q]'.$table.'');
|
||||
foreach($farr as $k=>$rs){
|
||||
$farrs[]= array('value'=>$rs['name'],'name'=>$rs['name'],'subname'=>$rs['explain']);
|
||||
}
|
||||
return $farrs;
|
||||
}
|
||||
}
|
||||
|
||||
52
webmain/flow/input/mode_flowmenuAction.php
Normal file
52
webmain/flow/input/mode_flowmenuAction.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* 此文件是流程模块【flowmenu.菜单管理】对应控制器接口文件。
|
||||
*/
|
||||
class mode_flowmenuClassAction extends inputAction{
|
||||
|
||||
|
||||
protected function savebefore($table, $arr, $id, $addbo){
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected function saveafter($table, $arr, $id, $addbo){
|
||||
|
||||
}
|
||||
|
||||
public $alldata = array();
|
||||
protected function storeafter($table, $rows)
|
||||
{
|
||||
$pid = (int)$this->post('pid','0');
|
||||
if($pid>0){
|
||||
$this->showgetmenu($rows,0,1,1);
|
||||
$rows = $this->alldata;
|
||||
}
|
||||
|
||||
return array(
|
||||
'rows' => $rows
|
||||
);
|
||||
}
|
||||
|
||||
private function showgetmenu($rows,$pid, $oi, $zt)
|
||||
{
|
||||
$zh = 0;
|
||||
foreach($rows as $k=>$rs){
|
||||
if($pid==$rs['pid']){
|
||||
$zh++;
|
||||
$rs['level'] = $oi;
|
||||
$zthui = $rs['status'];
|
||||
if($zt==0){
|
||||
$rs['ishui']=1;
|
||||
$zthui = 0;
|
||||
}
|
||||
$this->alldata[] = $rs;
|
||||
$len = count($this->alldata)-1;
|
||||
$cd = $this->showgetmenu($rows,$rs['id'], $oi+1, $zthui);
|
||||
$this->alldata[$len]['stotal']=$cd;
|
||||
}
|
||||
}
|
||||
return $zh;
|
||||
}
|
||||
}
|
||||
|
||||
40
webmain/flow/input/mode_flowsetAction.php
Normal file
40
webmain/flow/input/mode_flowsetAction.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* 此文件是流程模块【flowset.流程模块列表】对应控制器接口文件。
|
||||
*/
|
||||
class mode_flowsetClassAction extends inputAction{
|
||||
|
||||
public $pobj;
|
||||
protected function savebefore($table, $arr, $id, $addbo){
|
||||
include_once('webmain/main/flow/flowAction.php');
|
||||
$this->pobj = new flowClassAction();
|
||||
return $this->pobj->flowsetsavebefore($table, $arr);
|
||||
}
|
||||
|
||||
|
||||
protected function saveafter($table, $arr, $id, $addbo){
|
||||
$this->pobj->flowsetsaveafter($table, $arr);
|
||||
}
|
||||
|
||||
public function typedata()
|
||||
{
|
||||
$arr = array();
|
||||
$rows = $this->db->getall('select `type` from `[Q]flow_set` group by `type` order by `sort`');
|
||||
foreach($rows as $k=>$rs)$arr[] = array('value'=>'','name'=>$rs['type']);
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function getothernrAjax()
|
||||
{
|
||||
$mkid = (int)$this->get('mkid','0');
|
||||
$ind = (int)$this->get('ind','0');
|
||||
$bh = 'flowelement';
|
||||
$atype = 'all';
|
||||
|
||||
//读取数据
|
||||
$flow = m('flow')->initflow($bh);//初始化模块
|
||||
$cont = $flow->getrowstable($atype, 'and `mid`='.$mkid.'', 100,'name,fields,fieldstype,islu,isbt,iszb');//读取表格数据
|
||||
return $cont;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,12 +38,32 @@ class mode_userinfoClassAction extends inputAction{
|
||||
|
||||
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
|
||||
'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;
|
||||
$barr[] = $rs;
|
||||
}
|
||||
}
|
||||
return $barr;
|
||||
}
|
||||
|
||||
//人员状态切换保存后处理
|
||||
public function userstateafter($table, $cans, $id)
|
||||
{
|
||||
|
||||
@@ -96,7 +96,7 @@ echo 'body{--main-color:'.$maincolor.';--main-border:rgba('.$maincolors.',0.2)}'
|
||||
$stsp = '<div style="padding-top:20px"><table width="100%"><tr><td width="15%" nowrap height="30" align="right">';
|
||||
if($firstrs['checktype']=='change'){
|
||||
$stsp.='<font color=red>*</font>';
|
||||
$placeholder = '必须指定人员';
|
||||
$placeholder = '必须指定人员'.arrvalue($firstrs,'explain').'';
|
||||
$firstrs['isbt'] = 1;
|
||||
}
|
||||
$stsp.= ''.$firstrs['name'].':</td>';
|
||||
|
||||
@@ -152,7 +152,7 @@ if($showheader==1)echo '<div id="header_title" style="padding-top:'.$cenghei.'px
|
||||
$stsp.= '<td class="lurim" nowrap>';
|
||||
if($firstrs['checktype']=='change'){
|
||||
$stsp.='<font color=red>*</font>';
|
||||
$placeholder = '必须指定人员';
|
||||
$placeholder = '必须指定人员'.arrvalue($firstrs,'explain').'';
|
||||
$firstrs['isbt'] = 1;
|
||||
}
|
||||
$stsp.= ''.$firstrs['name'].':</td>';
|
||||
|
||||
Reference in New Issue
Block a user