发布v2.5.7版本
This commit is contained in:
@@ -17,4 +17,17 @@ class agent_custfinaClassModel extends agentModel
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public function gettotal()
|
||||
{
|
||||
$stotal = $this->getwdtotal($this->adminid);
|
||||
$titles = '';
|
||||
return array('stotal'=>$stotal,'titles'=> $titles);
|
||||
}
|
||||
|
||||
private function getwdtotal($uid)
|
||||
{
|
||||
$where = '`uid`='.$uid.' and `type`=0 and `ispay`=0';
|
||||
$stotal = m('custfina')->rows($where);
|
||||
return $stotal;
|
||||
}
|
||||
}
|
||||
@@ -18,4 +18,17 @@ class agent_custfkdClassModel extends agentModel
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public function gettotal()
|
||||
{
|
||||
$stotal = $this->getwdtotal($this->adminid);
|
||||
$titles = '';
|
||||
return array('stotal'=>$stotal,'titles'=> $titles);
|
||||
}
|
||||
|
||||
private function getwdtotal($uid)
|
||||
{
|
||||
$where = '`uid`='.$uid.' and `type`=1 and `ispay`=0';
|
||||
$stotal = m('custfina')->rows($where);
|
||||
return $stotal;
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class finaClassModel extends Model
|
||||
$arr = array();
|
||||
foreach($rows as $k=>$rs){
|
||||
$name = $rs['name'];
|
||||
if(!isempt($rs['banknum']))$name.='(**'.substr($rs['banknum'],-4).')';
|
||||
if(!isempt($rs['banknum']))$name.='(**'.mb_substr($rs['banknum'],-4).')';
|
||||
$arr[] = array(
|
||||
'value' => $rs['id'],
|
||||
'name' => $name,
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ class modeClassModel extends Model
|
||||
$arr = $this->getall($where,'`id`,`num`,`name`,`table`,`type`,`isflow`,`status`','sort');
|
||||
$typea = array();
|
||||
foreach($arr as $k=>$rs){
|
||||
if(LANG!='zh-CN')$rs['name'] = lang($rs['name'],'mode');
|
||||
$arr[$k]['name'] = ''.$rs['id'].'.'.$rs['name'].'('.$rs['num'].')';
|
||||
$typea[$rs['type']][] = $arr[$k];
|
||||
}
|
||||
@@ -33,6 +34,10 @@ class modeClassModel extends Model
|
||||
{
|
||||
$where = m('admin')->getjoinstr('receid', $uid);
|
||||
$arr = $this->getall("`status`=1 and `type`<>'系统' $sww $where",'`id`,`num`,`name`,`table`,`type`,`isflow`,`isscl`','`sort`');
|
||||
if(LANG!='zh-CN')foreach($arr as $k=>$rs){
|
||||
$arr[$k]['name'] = lang($rs['name'],'mode');
|
||||
$arr[$k]['type'] = lang($rs['type'],'mode');
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
@@ -42,6 +47,10 @@ class modeClassModel extends Model
|
||||
if($whe!='')$where = $whe;
|
||||
if($uid>0)$where = m('admin')->getjoinstr('receid', $uid);
|
||||
$arr = $this->getall('status=1 and isflow>0 '.$where.'','`id`,`name`,`type`','sort');
|
||||
if(LANG!='zh-CN')foreach($arr as $k=>$rs){
|
||||
$arr[$k]['name'] = lang($rs['name'],'mode');
|
||||
$arr[$k]['type'] = lang($rs['type'],'mode');
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
@@ -78,14 +87,16 @@ class modeClassModel extends Model
|
||||
$showzt = false;
|
||||
|
||||
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_name', '申请人'),'fields'=>'base_name');
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_deptname', '申请人部门'),'fields'=>'base_deptname');
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_sericnum', '单号'),'fields'=>'sericnum');
|
||||
$farrs = m('flow_element')->getall("`mid`='$modeid'",'`fields`,`name`,`fieldstype`,`ispx`,`isalign`,`iszb`,`islb`,`issou`,`data`,`width`','`iszb`,`sort`');
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_name', lang('申请人')),'fields'=>'base_name');
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_deptname', lang('申请人部门')),'fields'=>'base_deptname');
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_sericnum', lang('单号')),'fields'=>'sericnum');
|
||||
$farrs = m('flow_element')->getall("`mid`='$modeid'",'`fields`,`name`,`fieldstype`,`ispx`,`isalign`,`iszb`,`islb`,`issou`,`data`,`width`,`iseditlx`','`iszb`,`sort`');
|
||||
$inpub = c('input');
|
||||
$inpub->flow = $flow;
|
||||
$zbarr = $zbnamea = array();
|
||||
if(!isempt($mors['names']))$zbnamea = explode(',', $mors['names']);
|
||||
foreach($farrs as $k=>$rs){
|
||||
if(LANG!='zh-CN')$rs['name'] = $flow->lang($rs['name']);
|
||||
if($glx==1 && $rs['issou']=='1' && ($rs['fieldstype']=='select' || $rs['fieldstype']=='rockcombo')){
|
||||
$rs['store'] =$inpub->getdatastore($rs['fieldstype'],$inrs,$rs['data']);
|
||||
}
|
||||
@@ -112,7 +123,7 @@ class modeClassModel extends Model
|
||||
//$isdaoru = m('flow_element')->rows("`mid`='$modeid' and `isdr`=1");
|
||||
$drstrbtn = '';
|
||||
//if($isdaoru>0){
|
||||
$drstrbtn = "<span style=\"display:none\" id=\"daoruspan_{rand}\"><button class=\"btn btn-default\" click=\"daoru,1\" type=\"button\">导入</button> </span>";
|
||||
$drstrbtn = "<span style=\"display:none\" id=\"daoruspan_{rand}\"><button class=\"btn btn-default\" click=\"daoru,1\" type=\"button\"><?=lang('导入')?></button> </span>";
|
||||
//}
|
||||
|
||||
//读取流程模块的条件
|
||||
@@ -123,19 +134,19 @@ class modeClassModel extends Model
|
||||
if($lbztxs==2)$showzt = false;
|
||||
if($showzt){
|
||||
$ztarr = $flow->getstatusarr();
|
||||
$zthtml = '<td><select class="form-control" style="width:120px;border-left:0;border-radius:0;" id="selstatus_{rand}"><option value="">-全部状态-</option>';
|
||||
$zthtml = '<td><select class="form-control" style="width:120px;border-left:0;border-radius:0;" id="selstatus_{rand}"><option value="">-<?=lang(\'全部\')?><?=lang(\'状态\')?>-</option>';
|
||||
foreach($ztarr as $zt=>$ztv){
|
||||
if($isflow==0 && $zt==23)continue;
|
||||
$zthtml .= '<option style="color:'.arrvalue($ztv, 1).'" value="'.$zt.'">'.$ztv[0].'</option>';
|
||||
$vals = str_replace('?','', $ztv[0]);
|
||||
$zthtml .= '<option style="color:'.arrvalue($ztv, 1).'" value="'.$zt.'"><?=lang(\''.$vals.'\')?></option>';
|
||||
}
|
||||
$zthtml .= '</select></td>';
|
||||
$zthtml = str_replace('?','', $zthtml);
|
||||
}
|
||||
$fselarr = array();
|
||||
$bear = $this->db->getrows('[Q]option',"`num` like 'columns_".$num."_%'",'`num`,`value`');
|
||||
foreach($bear as $k2=>$rs2)$fselarr[$rs2['num']]=$rs2['value'];
|
||||
$placeholder= '关键字';
|
||||
if($isflow>0)$placeholder= '关键字/申请人/单号';
|
||||
$placeholder= '<?=lang(\'关键字\')?>';
|
||||
if($isflow>0)$placeholder= '<?=lang(\'关键字\')?>/<?=lang(\'申请人\')?>/<?=lang(\'单号\')?>';
|
||||
if($glx==1){
|
||||
return array(
|
||||
'isflow' => $isflow,
|
||||
@@ -144,31 +155,31 @@ class modeClassModel extends Model
|
||||
'fieldzarr' => $zbarr,
|
||||
'fieldsselarr' => $fselarr,
|
||||
'chufarr' => $chufarr,
|
||||
'modename' => $name,
|
||||
'modename' => $flow->lang($name),
|
||||
'modetable'=> $this->rock->jm->encrypt($mors['table']),
|
||||
'modenames' => $this->rock->repempt($mors['names']),
|
||||
'modenames' => $flow->lang($this->rock->repempt($mors['names'])),
|
||||
);
|
||||
}
|
||||
$html= "".$hstart."
|
||||
<div>
|
||||
<table width=\"100%\">
|
||||
<tr>
|
||||
<td style=\"padding-right:10px;\" id=\"tdleft_{rand}\" nowrap><button id=\"addbtn_{rand}\" class=\"btn btn-primary\" click=\"clickwin,0\" disabled type=\"button\"><i class=\"icon-plus\"></i> 新增</button></td>
|
||||
<td style=\"padding-right:10px;\" id=\"tdleft_{rand}\" nowrap><button id=\"addbtn_{rand}\" class=\"btn btn-primary\" click=\"clickwin,0\" disabled type=\"button\"><i class=\"icon-plus\"></i> <?=lang('新增')?></button></td>
|
||||
|
||||
<td><select class=\"form-control\" style=\"width:110px;border-top-right-radius:0;border-bottom-right-radius:0;padding:0 2px\" id=\"fields_{rand}\"></select></td>
|
||||
<td><select class=\"form-control\" style=\"width:60px;border-radius:0px;border-left:0;padding:0 2px\" id=\"like_{rand}\"><option value=\"0\">包含</option><option value=\"1\">等于</option><option value=\"2\">大于等于</option><option value=\"3\">小于等于</option><option value=\"4\">不包含</option></select></td>
|
||||
<td><select class=\"form-control\" style=\"width:130px;border-radius:0;border-left:0;display:none;padding:0 5px\" id=\"selkey_{rand}\"><option value=\"\">-请选择-</option></select><input class=\"form-control\" style=\"width:130px;border-radius:0;border-left:0;padding:0 5px\" id=\"keygj_{rand}\" placeholder=\"关键词\"><input class=\"form-control\" style=\"width:130px;border-radius:0;border-left:0;padding:0 5px;display:none;\" id=\"key_{rand}\" placeholder=\"".$placeholder."\">
|
||||
<td><select class=\"form-control\" style=\"width:60px;border-radius:0px;border-left:0;padding:0 2px\" id=\"like_{rand}\"><option value=\"0\"><?=lang('包含')?></option><option value=\"1\"><?=lang('等于')?></option><option value=\"2\"><?=lang('大于')?><?=lang('等于')?></option><option value=\"3\"><?=lang('小于')?><?=lang('等于')?></option><option value=\"4\"><?=lang('不包含')?></option></select></td>
|
||||
<td><select class=\"form-control\" style=\"width:130px;border-radius:0;border-left:0;display:none;padding:0 5px\" id=\"selkey_{rand}\"><option value=\"\">-<?=lang('请选择')?>-</option></select><input class=\"form-control\" style=\"width:130px;border-radius:0;border-left:0;padding:0 5px\" id=\"keygj_{rand}\" placeholder=\"<?=lang('关键字')?>\"><input class=\"form-control\" style=\"width:130px;border-radius:0;border-left:0;padding:0 5px;display:none;\" id=\"key_{rand}\" placeholder=\"".$placeholder."\">
|
||||
</td>
|
||||
$zthtml
|
||||
<td>
|
||||
<div style=\"white-space:nowrap\">
|
||||
<button style=\"border-right:0;border-radius:0;border-left:0\" class=\"btn btn-default\" click=\"searchbtn\" type=\"button\">搜索</button><button class=\"btn btn-default\" id=\"downbtn_{rand}\" type=\"button\" style=\"padding-left:8px;padding-right:8px;border-top-left-radius:0;border-bottom-left-radius:0\"><i class=\"icon-angle-down\"></i></button>
|
||||
<button style=\"border-right:0;border-radius:0;border-left:0\" class=\"btn btn-default\" click=\"searchbtn\" type=\"button\"><?=lang('搜索')?></button><button class=\"btn btn-default\" id=\"downbtn_{rand}\" type=\"button\" style=\"padding-left:8px;padding-right:8px;border-top-left-radius:0;border-bottom-left-radius:0\"><i class=\"icon-angle-down\"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
<td width=\"90%\" style=\"padding-left:10px\">$whtml</td>
|
||||
|
||||
<td align=\"right\" id=\"tdright_{rand}\" nowrap>
|
||||
".$drstrbtn."<button class=\"btn btn-default\" style=\"display:none\" id=\"daobtn_{rand}\" disabled click=\"daochu\" type=\"button\">导出 <i class=\"icon-angle-down\"></i></button>
|
||||
".$drstrbtn."<button class=\"btn btn-default\" style=\"display:none\" id=\"daobtn_{rand}\" disabled click=\"daochu\" type=\"button\"><?=lang('导出')?> <i class=\"icon-angle-down\"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user