信呼OA版本v2.3.8
This commit is contained in:
329
webmain/main/fwork/fworkAction.php
Normal file
329
webmain/main/fwork/fworkAction.php
Normal file
@@ -0,0 +1,329 @@
|
||||
<?php
|
||||
class fworkClassAction extends Action
|
||||
{
|
||||
|
||||
/**
|
||||
* 流程申请获取数组
|
||||
*/
|
||||
public function getmodearrAjax()
|
||||
{
|
||||
$rows = m('mode')->getmoderows($this->adminid,'and islu=1');
|
||||
$row = array();
|
||||
$viewobj = m('view');
|
||||
foreach($rows as $k=>$rs){
|
||||
$lx = $rs['type'];
|
||||
if(!$viewobj->isadd($rs, $this->adminid))continue;
|
||||
if(!isset($row[$lx]))$row[$lx]=array();
|
||||
$row[$lx][] = $rs;
|
||||
}
|
||||
$this->returnjson(array('rows'=>$row));
|
||||
}
|
||||
|
||||
/**
|
||||
* 单据查看获取数组
|
||||
*/
|
||||
public function getmodesearcharrAjax()
|
||||
{
|
||||
$rows = m('mode')->getmoderows($this->adminid);
|
||||
$row = array();
|
||||
$mid = '0';
|
||||
foreach($rows as $k=>$rs){
|
||||
$path = ''.P.'/flow/page/rock_page_'.$rs['num'].'.php';
|
||||
if(!file_exists($path) || $rs['isscl']==0)continue;
|
||||
$lx = $rs['type'];
|
||||
$mid.=','.$rs['id'].'';
|
||||
$row[$lx][] = $rs;
|
||||
}
|
||||
if($mid!='0'){
|
||||
$where = m('admin')->getjoinstr('syrid', $this->adminid, 1);
|
||||
$wrows = m('flow_where')->getrows('`setid` in('.$mid.') and `status`=1 and `islb` and `num` is not null and ('.$where.') and `pnum` is null group by `setid`','`setid`,min(sort),`num`');
|
||||
$atypea = array();
|
||||
foreach($wrows as $k1=>$rs1){
|
||||
$nus = $rs1['setid'];
|
||||
if(!isset($atypea[$nus]))$atypea[$nus] = $rs1['num'];
|
||||
}
|
||||
foreach($row as $lx=>$rowaa){
|
||||
foreach($rowaa as $k2=>$rs2){
|
||||
$row[$lx][$k2]['atype'] = $this->rock->arrvalue($atypea, $rs2['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->returnjson(array('rows'=>$row));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function flowbillbefore($table)
|
||||
{
|
||||
$lx = $this->post('atype');
|
||||
$this->atypess = $lx;
|
||||
$dt = $this->post('dt1');
|
||||
$dt2 = $this->post('dt2');
|
||||
$key = $this->post('key');
|
||||
$zt = $this->post('zt');
|
||||
$modeid = (int)$this->post('modeid','0');
|
||||
$uid = $this->adminid;
|
||||
$where = 'and (a.`uid`='.$uid.' or a.`optid`='.$uid.')';
|
||||
//待办
|
||||
if($lx=='daib'){
|
||||
$where = 'and a.`isturn`=1 and a.`status` not in(1,2) and '.$this->rock->dbinstr('a.nowcheckid', $uid);
|
||||
}
|
||||
|
||||
//我下属申请
|
||||
if($lx=='xia'){
|
||||
$where = 'and a.`isturn`=1 and '.$this->rock->dbinstr('b.superid', $uid);
|
||||
}
|
||||
|
||||
//我参与
|
||||
if($lx=='jmy'){
|
||||
$where = 'and a.`isturn`=1 and '.$this->rock->dbinstr('a.allcheckid', $uid);
|
||||
}
|
||||
|
||||
//未通过
|
||||
if($lx=='mywtg'){
|
||||
$where.=" and a.status=2";
|
||||
}
|
||||
|
||||
//待提交
|
||||
if($lx=='daiturn'){
|
||||
$where.=" and a.`status` not in(5) and a.`isturn`=0 "; //未提交
|
||||
}
|
||||
|
||||
//异常
|
||||
if($lx=='error'){
|
||||
$whers = m('flowbill')->errorwhere('a.');
|
||||
$where = ' and '.$whers.'';
|
||||
}
|
||||
|
||||
|
||||
//授权单据查看
|
||||
if($lx=='grantview'){
|
||||
$where =' and 1=2';
|
||||
if($modeid>0){
|
||||
$moders = m('flow_set')->getone($modeid);
|
||||
$where = m('view')->viewwhere($moders, $uid);
|
||||
}
|
||||
}
|
||||
|
||||
$this->modeids = false;
|
||||
|
||||
//抄送的
|
||||
if($lx=='chaosview'){
|
||||
$where =' and 1=2';
|
||||
$crows = $this->db->getall("select * from `[Q]flow_chao` where ".$this->rock->dbinstr('csnameid', $uid)."");
|
||||
$this->modeids = '0';
|
||||
if($crows){
|
||||
$modeids = '';
|
||||
$mids = '';
|
||||
foreach($crows as $k1=>$rs1){
|
||||
$modeids.=','.$rs1['modeid'].'';
|
||||
$mids.=','.$rs1['mid'].'';
|
||||
}
|
||||
$this->modeids = substr($modeids,1);
|
||||
$where = " and a.`isturn`=1 and a.`modeid` in(".$this->modeids.") and a.`mid` in(".substr($mids,1).")";
|
||||
}
|
||||
}
|
||||
|
||||
//流程监控
|
||||
if($lx=='jiankong'){
|
||||
$where =' and 1=2';
|
||||
$this->modeids = '0';
|
||||
if($modeid==0){
|
||||
$rows = m('view')->getjilu($this->adminid);
|
||||
foreach($rows as $k1=>$rs1){
|
||||
$this->modeids.=','.$rs1['modeid'].'';
|
||||
}
|
||||
}else{
|
||||
$wwhere = m('view')->jiankongwhere($modeid, $this->adminid);//返回主表的条件
|
||||
$wwhere = str_replace('{asqom}','', $wwhere);
|
||||
$moders = $this->db->getone('[Q]flow_set', $modeid);
|
||||
$where =' and `mid` in(select `id` from `[Q]'.$moders['table'].'` where 1=1 '.$wwhere.')';
|
||||
}
|
||||
}
|
||||
|
||||
if($zt!=''){
|
||||
if($zt!='6'){
|
||||
$where.=" and a.`status`='$zt'";
|
||||
if($zt!='5')$where.=' and a.`isturn`=1';
|
||||
}else{
|
||||
$where.=" and a.`status` not in(5) and a.`isturn`=0 "; //未提交
|
||||
}
|
||||
}
|
||||
if($dt!='')$where.=" and a.`applydt`>='$dt'";
|
||||
if($dt2!='')$where.=" and a.`applydt`<='$dt2'";
|
||||
|
||||
if($modeid>0)$where.=' and a.modeid='.$modeid.'';
|
||||
if(!isempt($key))$where.=" and (b.`name` like '%$key%' or b.`deptname` like '%$key%' or a.`sericnum` like '$key%' or a.`nowcheckname`='$key' or a.`modename`='$key')";
|
||||
|
||||
|
||||
|
||||
return array(
|
||||
'table' => '`[Q]flow_bill` a left join `[Q]admin` b on a.uid=b.id',
|
||||
'where' => " and a.isdel=0 $where",
|
||||
'fields'=> 'a.*,b.name,b.deptname',
|
||||
'order' => 'a.optdt desc'
|
||||
);
|
||||
}
|
||||
|
||||
public function flowbillafter($table, $rows)
|
||||
{
|
||||
$rows = m('flowbill')->getbilldata($rows);
|
||||
$flowarr = array();
|
||||
if($this->atypess!='error'){
|
||||
if($this->modeids===false){
|
||||
$flowarr = m('mode')->getmodemyarr($this->adminid);
|
||||
}else{
|
||||
$flowarr = m('mode')->getmodemyarr(0,'and `id` in('.$this->modeids.')');
|
||||
}
|
||||
}else if($rows){
|
||||
foreach($rows as $k=>$rs){
|
||||
$errorsm = '';
|
||||
$chuli = '到[流程模块→流程审核步骤]下对应的步骤设置审核人';
|
||||
$errtype = 0;//有步骤没审核人
|
||||
if(isempt($rs['nowcheckid'])){
|
||||
if($rs['nowcourseid']=='0'){
|
||||
$errorsm = '<font color=blue>当前没有审核步骤</font>';
|
||||
$chuli = '到[流程模块→流程单据查看]删除最后一条处理记录,然后[重新匹配流程]';
|
||||
$errtype = 1; //没有步骤
|
||||
}else{
|
||||
$errorsm = '<font color=red>当前没有审核人</font>';
|
||||
}
|
||||
}else{
|
||||
$errorsm = '<font color=#800000>审核人帐号已停用</font>';
|
||||
$errtype = 2; //人员停用
|
||||
}
|
||||
$rows[$k]['errorsm'] = $errorsm;
|
||||
$rows[$k]['chuli'] = $chuli;
|
||||
$rows[$k]['errtype'] = $errtype;
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'rows' => $rows,
|
||||
'flowarr' => $flowarr
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function flowtodosbefore($table)
|
||||
{
|
||||
$dt = $this->post('dt1');
|
||||
$key = $this->post('key');
|
||||
$zt = $this->post('zt');
|
||||
$modenum= $this->post('modeid');
|
||||
$uid = $this->adminid;
|
||||
$where = 'and `uid`='.$uid.'';
|
||||
if(!isempt($modenum))$where.=" and `modenum`='$modenum'";
|
||||
if(!isempt($dt))$where.=" and `adddt` like '$dt%'";
|
||||
|
||||
return array(
|
||||
'where' => $where,
|
||||
'order' => '`adddt` desc'
|
||||
);
|
||||
}
|
||||
public function flowtodosafter($table, $rows)
|
||||
{
|
||||
$nums = "''";
|
||||
$mors = $this->db->getall('select `modenum` from `[Q]flow_todos` where `uid`='.$this->adminid.' group by `modenum`');
|
||||
foreach($mors as $k=>$rs)$nums.=",'".$rs['modenum']."'";
|
||||
$flowarr = m('mode')->getrows("`status`=1 and `num` in($nums)",'`num`,`name`,`summary`,`type`','sort');
|
||||
$modearr = array();
|
||||
foreach($flowarr as $k=>$rs){
|
||||
$modearr[$rs['num']] = $rs['summary'];
|
||||
}
|
||||
if($rows){
|
||||
foreach($rows as $k=>$rs){
|
||||
//$rows[$k]['id'] = $rs['mid'];
|
||||
$rers = $this->db->getone('[Q]'.$rs['table'].'', $rs['mid']);
|
||||
$summary = '';
|
||||
if($rers){
|
||||
$summary = $this->rock->reparr(arrvalue($modearr, $rs['modenum']), $rers);
|
||||
$rows[$k]['optdt'] = arrvalue($rers,'optdt');
|
||||
$rows[$k]['optname'] = arrvalue($rers,'optname');
|
||||
}
|
||||
$rows[$k]['summary'] = $summary;
|
||||
if($rs['isread']=='1'){
|
||||
$rows[$k]['ishui'] = 1;
|
||||
$rows[$k]['isread'] = '<font color="#888888">已读</font>';
|
||||
}else{
|
||||
$rows[$k]['isread'] = '<font color="red">未读</font>';
|
||||
}
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'rows' => $rows,
|
||||
'flowarr' => $flowarr
|
||||
);
|
||||
}
|
||||
|
||||
public function meetqingkbefore($table)
|
||||
{
|
||||
$pid = $this->option->getval('hyname','-1', 2);
|
||||
return array(
|
||||
'where' => "and `pid`='$pid'",
|
||||
'order' => 'sort',
|
||||
'field' => 'id,name',
|
||||
);
|
||||
}
|
||||
|
||||
public function meetqingkafter($table, $rows)
|
||||
{
|
||||
$dtobj = c('date');
|
||||
$startdt = $this->post('startdt', $this->date);
|
||||
$enddt = $this->post('enddt');
|
||||
if($enddt=='')$enddt = $dtobj->adddate($startdt,'d',7);
|
||||
$jg = $dtobj->datediff('d',$startdt, $enddt);
|
||||
if($jg>30)$jg = 30;
|
||||
$flow = m('flow:meet');
|
||||
$data = m('meet')->getall("`status`=1 and `type`=0 and `startdt`<='$enddt 23:59:59' and `enddt`>='$startdt' order by `startdt` asc",'hyname,title,startdt,enddt,state,joinname,optname,id');
|
||||
$datss = array();
|
||||
foreach($data as $k=>$rs){
|
||||
$rs = $flow->flowrsreplace($rs);
|
||||
$key = substr($rs['startdt'],0,10).$rs['hyname'];
|
||||
if(!isset($datss[$key]))$datss[$key] = array();
|
||||
$str = '['.substr($rs['startdt'],11,5).'→'.substr($rs['enddt'],11,5).']'.$rs['title'].'('.$rs['joinname'].') '.$rs['state'].'';
|
||||
$datss[$key][] = $str;
|
||||
}
|
||||
|
||||
$columns = $rows;
|
||||
$barr = array();
|
||||
$dt = $startdt;
|
||||
for($i=0; $i<=$jg; $i++){
|
||||
if($i>0)$dt = $dtobj->adddate($dt,'d',1);
|
||||
$w = $dtobj->cnweek($dt);
|
||||
$status = 1;
|
||||
if($w=='六'||$w=='日')$status = 0;
|
||||
$sbarr = array(
|
||||
'dt' => '星期'.$w.'<br>'.$dt.'',
|
||||
'status' => $status
|
||||
);
|
||||
foreach($rows as $k=>$rs){
|
||||
$key = $dt.$rs['name'];
|
||||
$str = '';
|
||||
if(isset($datss[$key])){
|
||||
foreach($datss[$key] as $k1=>$strs){
|
||||
$str.= ''.($k1+1).'.'.$strs.'<br>';
|
||||
}
|
||||
}
|
||||
$sbarr['meet_'.$rs['id'].''] = $str;
|
||||
}
|
||||
$barr[] = $sbarr;
|
||||
}
|
||||
$arr['columns'] = $columns;
|
||||
$arr['startdt'] = $startdt;
|
||||
$arr['enddt'] = $enddt;
|
||||
$arr['rows'] = $barr;
|
||||
$arr['totalCount'] = $jg+1;
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function deltodoAjax()
|
||||
{
|
||||
$id = $this->post('id','0');
|
||||
m('flow_todos')->delete('id in('.$id.') and `uid`='.$this->adminid.'');
|
||||
$this->backmsg();
|
||||
}
|
||||
|
||||
}
|
||||
35
webmain/main/fwork/rock_fwork_apply.php
Normal file
35
webmain/main/fwork/rock_fwork_apply.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
|
||||
var c={
|
||||
showdata:function(a){
|
||||
var hhu = parseInt(viewwidth/260);
|
||||
var j=0,lx,d,s1,i,l=0,len;
|
||||
var strarr = [];for(i=0;i<hhu;i++)strarr[i]='';
|
||||
for(lx in a){
|
||||
d=a[lx];s1='';j++;len=d.length;
|
||||
s1 ='<div align="left" style="margin:20px;width:230px" class="list-group">';
|
||||
s1+='<div class="list-group-item list-group-item-success"><i class="icon-plus"></i> '+lx+'('+len+')</div>';
|
||||
for(i=0;i<len;i++){
|
||||
s1+='<a style="TEXT-DECORATION:none" onclick="openinput(\''+d[i].name+'\',\''+d[i].num+'\',0)" class="list-group-item">'+d[i].name+'</a>';
|
||||
}
|
||||
s1+='</div>';
|
||||
strarr[l]+=s1;
|
||||
l++;
|
||||
if(l==hhu)l=0;
|
||||
}
|
||||
var s='<table><tr valign="top">';
|
||||
for(i=0;i<hhu;i++)s+='<td>'+strarr[i]+'</td>';
|
||||
s+='</tr></table>';
|
||||
$('#view_{rand}').html(s);
|
||||
}
|
||||
}
|
||||
|
||||
js.ajax(js.getajaxurl('getmodearr','{mode}','{dir}'),{},function(a){
|
||||
c.showdata(a.rows);
|
||||
},'get,json');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="view_{rand}"></div>
|
||||
211
webmain/main/fwork/rock_fwork_bill.php
Normal file
211
webmain/main/fwork/rock_fwork_bill.php
Normal file
@@ -0,0 +1,211 @@
|
||||
<?php defined('HOST') or die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var atype=params.atype,zt=params.zt,mid=params.modeid;
|
||||
if(!zt)zt='';
|
||||
if(!mid)mid='0';
|
||||
var bools=false;
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'flow_bill',params:{'atype':atype,'zt':zt,'modeid':mid},fanye:true,
|
||||
url:publicstore('{mode}','{dir}'),checked:atype=='daib',
|
||||
storeafteraction:'flowbillafter',storebeforeaction:'flowbillbefore',
|
||||
columns:[{
|
||||
text:'模块',dataIndex:'modename'
|
||||
},{
|
||||
text:'部门',dataIndex:'deptname'
|
||||
},{
|
||||
text:'申请人',dataIndex:'name'
|
||||
},{
|
||||
text:'单号',dataIndex:'sericnum'
|
||||
},{
|
||||
text:'申请日期',dataIndex:'applydt',sortable:true
|
||||
},{
|
||||
text:'摘要',dataIndex:'summary',align:'left',renderer:function(v){
|
||||
return '<div style="min-width:400px">'+v+'</div>';
|
||||
}
|
||||
},{
|
||||
text:'操作人',dataIndex:'optname',sortable:true
|
||||
},{
|
||||
text:'状态',dataIndex:'status',sortable:true
|
||||
},{
|
||||
text:'',dataIndex:'caozuo',callback:'opegs{rand}'
|
||||
}],
|
||||
celldblclick:function(){
|
||||
c.view();
|
||||
},
|
||||
load:function(a){
|
||||
if(!bools){
|
||||
var s = '<option value="0">-选择模块-</option>',len=a.flowarr.length,i,csd,types='';
|
||||
for(i=0;i<len;i++){
|
||||
csd = a.flowarr[i];
|
||||
if(types!=csd.type){
|
||||
if(types!='')s+='</optgroup>';
|
||||
s+='<optgroup label="'+csd.type+'">';
|
||||
}
|
||||
s+='<option value="'+csd.id+'">'+csd.name+'</option>';
|
||||
types = csd.type;
|
||||
}
|
||||
$('#mode_{rand}').html(s);
|
||||
if(mid>0)get('mode_{rand}').value=mid;
|
||||
}
|
||||
bools=true;
|
||||
},
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
},
|
||||
beforeload:function(){
|
||||
btn(true);
|
||||
}
|
||||
});
|
||||
function btn(bo){
|
||||
//get('xiang_{rand}').disabled = bo;
|
||||
}
|
||||
xing{rand}=function(oi){
|
||||
a.changedata = a.getData(oi);
|
||||
c.view();
|
||||
}
|
||||
var c = {
|
||||
reload:function(){
|
||||
a.reload();
|
||||
},
|
||||
view:function(){
|
||||
var d=a.changedata;
|
||||
openxiangs(d.modename,d.modenum,d.id,'opegs{rand}');
|
||||
},
|
||||
search:function(){
|
||||
a.setparams({
|
||||
key:get('key_{rand}').value,
|
||||
dt1:get('dt1_{rand}').value,
|
||||
dt2:get('dt2_{rand}').value,
|
||||
modeid:get('mode_{rand}').value
|
||||
},true);
|
||||
},
|
||||
clickdt:function(o1, lx){
|
||||
$(o1).rockdatepicker({initshow:true,view:'date',inputid:'dt'+lx+'_{rand}'});
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown(nowtabs.name);
|
||||
},
|
||||
changlx:function(o1,lx){
|
||||
$("button[id^='state{rand}']").removeClass('active');
|
||||
$('#state{rand}_'+lx+'').addClass('active');
|
||||
a.setparams({zt:lx});
|
||||
this.search();
|
||||
},
|
||||
plliang:function(){
|
||||
if(this.plbool)return;
|
||||
var d = a.getcheckdata();
|
||||
if(d.length<=0){
|
||||
js.msg('msg','请先用复选框选中行');
|
||||
return;
|
||||
}
|
||||
this.checkd = d;
|
||||
js.prompt('批量处理同意','请输入批量处理同意说明(选填)',function(lxbd,msg){
|
||||
if(lxbd=='yes'){
|
||||
setTimeout(function(){c.plliangso(msg);},10);
|
||||
}
|
||||
});
|
||||
},
|
||||
plliangso:function(sm){
|
||||
this.plbool = true;
|
||||
this.plchusm = sm;
|
||||
this.cgshu = 0;
|
||||
this.sbshu = 0;
|
||||
js.wait('<span id="plchushumm"></span>');
|
||||
this.plliangsos(0);
|
||||
},
|
||||
plliangsos:function(oi){
|
||||
var len = this.checkd.length;
|
||||
$('#plchushumm').html('批量处理中('+len+'/'+(oi+1)+')...');
|
||||
if(oi>=len){
|
||||
$('#plchushumm').html('处理完成,成功<font color=green>'+this.cgshu+'</font>条,失败<font color=red>'+this.sbshu+'</font>条');
|
||||
this.reload();
|
||||
this.plbool=false;
|
||||
return;
|
||||
}
|
||||
var d = this.checkd[oi];
|
||||
var cns= {sm:this.plchusm,zt:1,modenum:d.modenum,mid:d.id};
|
||||
js.ajax(js.getajaxurl('check','flowopt','flow'),cns, function(ret){
|
||||
if(ret.success){
|
||||
c.cgshu++;
|
||||
}else{
|
||||
c.sbshu++;
|
||||
js.msg('msg','['+d.modename+']'+ret.msg+',不能使用批量来处理,请打开详情去处理。');
|
||||
}
|
||||
c.plliangsos(oi+1);
|
||||
},'post,json');
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
$('#mode_{rand}').change(function(){
|
||||
c.search();
|
||||
});
|
||||
opegs{rand}=function(){
|
||||
c.reload();
|
||||
}
|
||||
|
||||
$('#state{rand}_'+zt+'').addClass('active');
|
||||
|
||||
if(atype=='mywtg' || atype=='daiturn'){
|
||||
$('#stewwews{rand}').hide();
|
||||
}
|
||||
if(atype!='daib'){
|
||||
$('#tdleft_{rand}').hide();
|
||||
}else{
|
||||
$('#state{rand}_').html('全部待办');
|
||||
$('#state{rand}_0').remove();
|
||||
$('#state{rand}_1').remove();
|
||||
$('#state{rand}_2').remove();
|
||||
$('#state{rand}_5').remove();
|
||||
$('#state{rand}_6').remove();
|
||||
}
|
||||
if(atype!='my')$('#state{rand}_6').remove();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="padding-right:10px;" id="tdleft_{rand}" nowrap><button class="btn btn-primary" click="plliang,0" type="button">批量处理同意</button></td>
|
||||
<td nowrap>
|
||||
<select style="width:150px" id="mode_{rand}" class="form-control" ><option value="0">-选择模块-</option></select>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<input style="width:110px" onclick="js.changedate(this)" placeholder="申请日期" readonly class="form-control datesss" id="dt1_{rand}" >
|
||||
</td>
|
||||
<td nowrap> 至 </td>
|
||||
<td nowrap>
|
||||
<input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt2_{rand}" >
|
||||
</td>
|
||||
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<input class="form-control" style="width:130px" id="key_{rand}" placeholder="单号/处理人/姓名/部门">
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
<td width="80%" style="padding-left:10px">
|
||||
|
||||
<div id="stewwews{rand}" class="btn-group">
|
||||
<button class="btn btn-default" id="state{rand}_" click="changlx," type="button">全部状态</button>
|
||||
<button class="btn btn-default" id="state{rand}_0" click="changlx,0" type="button">待审核</button>
|
||||
<button class="btn btn-default" id="state{rand}_1" style="color:green" click="changlx,1" type="button">已审核</button>
|
||||
<button class="btn btn-default" id="state{rand}_2" style="color:red" click="changlx,2" type="button">未通过</button>
|
||||
<button class="btn btn-default" id="state{rand}_5" style="color:#888888" click="changlx,5" type="button">已作废</button>
|
||||
<button class="btn btn-default" id="state{rand}_6" style="color:#ff6600" click="changlx,6" type="button">待提交</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
123
webmain/main/fwork/rock_fwork_meet.php
Normal file
123
webmain/main/fwork/rock_fwork_meet.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var atype=params.atype;
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'meet',modenum:'meet',modename:'会议',params:{'atype':atype},fanye:true,
|
||||
columns:[{
|
||||
text:'',dataIndex:'caozuo'
|
||||
},{
|
||||
text:'会议室',dataIndex:'hyname'
|
||||
},{
|
||||
text:'主题',dataIndex:'title',align:'left'
|
||||
},{
|
||||
text:'参会人',dataIndex:'joinname'
|
||||
},{
|
||||
text:'星期',dataIndex:'week'
|
||||
},{
|
||||
text:'纪要人',dataIndex:'jyname'
|
||||
},{
|
||||
text:'开始时间',dataIndex:'startdt'
|
||||
},{
|
||||
text:'结束时间',dataIndex:'enddt'
|
||||
},{
|
||||
text:'说明',dataIndex:'explain',align:'left'
|
||||
},{
|
||||
text:'状态',dataIndex:'state',sortable:true
|
||||
},{
|
||||
text:'发起人',dataIndex:'optname'
|
||||
}],
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
},
|
||||
beforeload:function(){
|
||||
btn(true);
|
||||
}
|
||||
});
|
||||
function btn(bo){
|
||||
get('xiang_{rand}').disabled = bo;
|
||||
}
|
||||
var c = {
|
||||
reload:function(){
|
||||
a.reload();
|
||||
},
|
||||
view:function(){
|
||||
var d=a.changedata;
|
||||
openxiangs('会议','meet',d.id,'opegs{rand}');
|
||||
},
|
||||
search:function(){
|
||||
a.setparams({
|
||||
key:get('key_{rand}').value,
|
||||
dt:get('dt1_{rand}').value
|
||||
},true);
|
||||
},
|
||||
clickdt:function(o1, lx){
|
||||
$(o1).rockdatepicker({initshow:true,view:'date',inputid:'dt'+lx+'_{rand}'});
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown(nowtabs.name);
|
||||
},
|
||||
changlx:function(o1,lx){
|
||||
$("button[id^='state{rand}']").removeClass('active');
|
||||
$('#state{rand}_'+lx+'').addClass('active');
|
||||
var asty=['my','mybz','myall','myfq'];
|
||||
a.setparams({atype:asty[lx]});
|
||||
this.search();
|
||||
},
|
||||
clickwin:function(){
|
||||
openinput('会议','meet',0,'opegs{rand}');
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
$('#mode_{rand}').change(function(){
|
||||
c.search();
|
||||
});
|
||||
opegs{rand}=function(){
|
||||
c.reload();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="padding-right:10px">
|
||||
<button class="btn btn-primary" click="clickwin,0" type="button"><i class="icon-plus"></i> 新增</button>
|
||||
</td>
|
||||
<td>
|
||||
<div style="width:120px" class="input-group">
|
||||
<input placeholder="日期" readonly class="form-control" id="dt1_{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="clickdt,1" type="button"><i class="icon-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<input class="form-control" style="width:180px" id="key_{rand}" placeholder="主题/参会人">
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
<td width="80%" style="padding-left:10px">
|
||||
|
||||
<div id="stewwews{rand}" class="btn-group">
|
||||
<button class="btn btn-default active" id="state{rand}_0" click="changlx,0" type="button">今日会议</button>
|
||||
<button class="btn btn-default" id="state{rand}_1" click="changlx,1" type="button">本周会议</button>
|
||||
<button class="btn btn-default" id="state{rand}_2" click="changlx,2" type="button">全部会议</button>
|
||||
<button class="btn btn-default" id="state{rand}_3" click="changlx,3" type="button">我发起</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" id="xiang_{rand}" click="view" disabled type="button">详情</button>
|
||||
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
<div class="tishi">默认显示今日的会议,会议读取全部人员的</div>
|
||||
85
webmain/main/fwork/rock_fwork_meethy.php
Normal file
85
webmain/main/fwork/rock_fwork_meethy.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
|
||||
var columns = [{
|
||||
text:'日期',dataIndex:'dt'
|
||||
}];
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'option',fanye:false,modedir:'{mode}:{dir}',storebeforeaction:'meetqingkbefore',storeafteraction:'meetqingkafter',
|
||||
columns:columns,
|
||||
loadbefore:function(d){
|
||||
get('dt1_{rand}').value=d.startdt;
|
||||
get('dt2_{rand}').value=d.enddt;
|
||||
c.setcolumns(d.columns);
|
||||
}
|
||||
});
|
||||
|
||||
var c = {
|
||||
search:function(){
|
||||
a.setparams({
|
||||
'startdt':get('dt1_{rand}').value,
|
||||
'enddt':get('dt2_{rand}').value
|
||||
},true);
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown();
|
||||
},
|
||||
setcolumns:function(d){
|
||||
var col=[],i,len=d.length;
|
||||
for(i=0;i<columns.length;i++)col.push(columns[i]);
|
||||
for(i=0;i<len;i++){
|
||||
col.push({text:d[i].name,dataIndex:'meet_'+d[i].id+'',align:'left'});
|
||||
}
|
||||
a.setColumns(col);
|
||||
},
|
||||
clickwin:function(){
|
||||
openinput('会议','meet',0,'opegs{rand}');
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
opegs{rand}=function(){
|
||||
a.reload();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="padding-right:10px">
|
||||
<button class="btn btn-primary" click="clickwin,0" type="button"><i class="icon-plus"></i> 新增</button>
|
||||
</td>
|
||||
<td nowrap>日期 </td>
|
||||
<td nowrap>
|
||||
<div style="width:140px" class="input-group">
|
||||
<input placeholder="" readonly class="form-control" id="dt1_{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="return js.selectdate(this,'dt1_{rand}')" type="button"><i class="icon-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td nowrap> 至 </td>
|
||||
<td nowrap>
|
||||
<div style="width:140px" class="input-group">
|
||||
<input placeholder="" readonly class="form-control" id="dt2_{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="return js.selectdate(this,'dt2_{rand}')" type="button"><i class="icon-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
<td style="padding-left:10px" width="90%">
|
||||
|
||||
|
||||
</td>
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
41
webmain/main/fwork/rock_fwork_search.php
Normal file
41
webmain/main/fwork/rock_fwork_search.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
|
||||
var c={
|
||||
showdata:function(a){
|
||||
var hhu = parseInt(viewwidth/260);
|
||||
var j=0,lx,d,s1,i,l=0,len;
|
||||
var strarr = [];for(i=0;i<hhu;i++)strarr[i]='';
|
||||
for(lx in a){
|
||||
d=a[lx];s1='';j++;len=d.length;
|
||||
s1 ='<div align="left" style="margin:20px;width:230px" class="list-group">';
|
||||
s1+='<div class="list-group-item list-group-item-success"><i class="icon-star-empty"></i> '+lx+'('+len+')</div>';
|
||||
for(i=0;i<len;i++){
|
||||
s1+='<a style="TEXT-DECORATION:none" onclick="opencoluske_{rand}(\''+d[i].name+'\',\''+d[i].num+'\',\''+d[i].atype+'\')" class="list-group-item">'+d[i].name+'</a>';
|
||||
}
|
||||
s1+='</div>';
|
||||
strarr[l]+=s1;
|
||||
l++;
|
||||
if(l==hhu)l=0;
|
||||
}
|
||||
var s='<table><tr valign="top">';
|
||||
for(i=0;i<hhu;i++)s+='<td>'+strarr[i]+'</td>';
|
||||
s+='</tr></table>';
|
||||
$('#view_{rand}').html(s);
|
||||
}
|
||||
}
|
||||
|
||||
opencoluske_{rand}=function(na,num,ats){
|
||||
if(!ats)ats='my';
|
||||
addtabs({name:na,num:'search'+num+'',url:'flow,page,'+num+',atype='+ats+'',icons:'search'});
|
||||
}
|
||||
|
||||
js.ajax(js.getajaxurl('getmodesearcharr','{mode}','{dir}'),{},function(a){
|
||||
c.showdata(a.rows);
|
||||
},'get,json');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="view_{rand}"></div>
|
||||
|
||||
128
webmain/main/fwork/rock_fwork_todo.php
Normal file
128
webmain/main/fwork/rock_fwork_todo.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var bools=false;
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'flow_todos',fanye:true,checked:true,
|
||||
url:publicstore('{mode}','{dir}'),
|
||||
storeafteraction:'flowtodosafter',storebeforeaction:'flowtodosbefore',
|
||||
columns:[{
|
||||
text:'模块',dataIndex:'modename'
|
||||
},{
|
||||
text:'提醒时间',dataIndex:'adddt',sortable:true
|
||||
},{
|
||||
text:'摘要',dataIndex:'summary',align:'left',width:300
|
||||
},{
|
||||
text:'操作人',dataIndex:'optname'
|
||||
},{
|
||||
text:'单据操作时间',dataIndex:'optdt'
|
||||
},{
|
||||
text:'状态',dataIndex:'isread',sortable:true
|
||||
}],
|
||||
celldblclick:function(){
|
||||
c.view();
|
||||
},
|
||||
load:function(a){
|
||||
if(!bools){
|
||||
var s = '<option value="">-选择模块-</option>',len=a.flowarr.length,i,csd,types='';
|
||||
for(i=0;i<len;i++){
|
||||
csd = a.flowarr[i];
|
||||
if(types!=csd.type){
|
||||
if(types!='')s+='</optgroup>';
|
||||
s+='<optgroup label="'+csd.type+'">';
|
||||
}
|
||||
s+='<option value="'+csd.num+'">'+csd.name+'</option>';
|
||||
types = csd.type;
|
||||
}
|
||||
$('#mode_{rand}').html(s);
|
||||
}
|
||||
bools=true;
|
||||
},
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
},
|
||||
beforeload:function(){
|
||||
btn(true);
|
||||
}
|
||||
});
|
||||
function btn(bo){
|
||||
get('xiang_{rand}').disabled = bo;
|
||||
}
|
||||
|
||||
var c = {
|
||||
reload:function(){
|
||||
a.reload();
|
||||
},
|
||||
view:function(){
|
||||
var d=a.changedata;
|
||||
openxiangs(d.modename,d.modenum,d.mid,'opegs{rand}');
|
||||
},
|
||||
search:function(){
|
||||
a.setparams({
|
||||
dt1:get('dt1_{rand}').value,
|
||||
modeid:get('mode_{rand}').value
|
||||
},true);
|
||||
},
|
||||
clickdt:function(o1, lx){
|
||||
$(o1).rockdatepicker({initshow:true,view:'date',inputid:'dt'+lx+'_{rand}'});
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown(nowtabs.name);
|
||||
},
|
||||
setss:function(){
|
||||
addtabs({name:'单据提醒设置',num:'searchremind',url:'flow,page,remind,atype=my',icons:'cog'});
|
||||
},
|
||||
del:function(){
|
||||
a.del({checked:true,url:js.getajaxurl('deltodo','{mode}','{dir}')});
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
$('#mode_{rand}').change(function(){
|
||||
c.search();
|
||||
});
|
||||
opegs{rand}=function(){
|
||||
c.reload();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="padding-right:10px">
|
||||
<button class="btn btn-default" click="setss" type="button"><i class="icon-cog"></i> 单据提醒设置</button>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<select style="width:150px" id="mode_{rand}" class="form-control" ><option value="">-所有模块-</option></select>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<div style="width:140px" class="input-group">
|
||||
<input placeholder="提醒日期" readonly class="form-control" id="dt1_{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="clickdt,1" type="button"><i class="icon-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
<td width="80%" style="padding-left:10px">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" id="xiang_{rand}" click="view" disabled type="button">详情</button> <button class="btn btn-default" click="daochu,1" type="button">导出</button>
|
||||
<button class="btn btn-danger" click="del" type="button"><i class="icon-trash"></i> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
Reference in New Issue
Block a user