发布v2.7.0版本

This commit is contained in:
雨中磐石
2025-07-18 14:38:01 +08:00
parent d0c604e040
commit 5cec56526e
31 changed files with 235 additions and 204 deletions

View File

@@ -96,7 +96,7 @@ class inputAction extends Action
}
if($oldrs)$this->rs = $oldrs;
$uaarr = $farrs = array();
$lvls = array('text','textarea','ditumap');
$lvls = array('textnot','textarea','ditumap');
foreach($fieldsarr as $k=>$rs){
$fid = $rs['fields'];
$fi1 = substr($fid, 0, 5);

View File

@@ -110,7 +110,8 @@ class mode_knowtraimClassAction extends inputAction{
$mdos = m('flow:knowtraim');
foreach($rows as $k=>$rs){
$zt = $mdos->getstatestr($rs['state']);
$rows[$k]['startdt'] = ''.substr($rs['startdt'],5,11).'至'.substr($rs['enddt'],5,11).'('.$zt.')';
//$rows[$k]['startdt'] = ''.substr($rs['startdt'],5,11).'至'.substr($rs['enddt'],5,11).'('.$zt.')';
$rows[$k]['startdt'] = ''.$rs['startdt'].'至'.$rs['enddt'].'('.$zt.')';
if($rs['fenshu']=='0' && $rs['isks']==0)$rows[$k]['fenshu']='';
if(!isempt($rs['ksedt']))$rows[$k]['ksedt'] = ''.substr($rs['kssdt'],5,11).'至'.substr($rs['ksedt'],5,11).'';
$strs = ($rs['isks']=='1') ? '<font color=green>已考试</font>' : '<font color=red>未考试</font>';

View File

@@ -70,6 +70,9 @@ $(document).ready(function(){
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
},
view:function(){
}
};
js.initbtn(c);

View File

@@ -798,6 +798,7 @@ class mode_'.$modenum.'ClassAction extends inputAction{
if($rows){
$flow = m('flow')->initflow($this->moders['num']);
$mbil = m('flowbill');
$mcom = m('company');
foreach($rows as $k=>$rs){
$zt = '';
if(isset($rs['status']))$zt = $rs['status'];
@@ -829,6 +830,13 @@ class mode_'.$modenum.'ClassAction extends inputAction{
}
$narr['status'] = $flow->getstatus($rs,'',$otehsr,1);
$narr['chushu'] = $flow->flogmodel->rows("`table`='".$flow->mtable."' and `mid`='".$rs['id']."'");
$comid = arrvalue($rs,'comid');
$narr['comid'] = $comid;
if($comid){
$cmrs = $mcom->getXinxi($rs['comid']);
if($cmrs)$narr['comid'] = $cmrs['id'].'.'.$cmrs['name'];
}
$arr[] = $narr;
}

View File

@@ -19,6 +19,8 @@ $(document).ready(function(){
text:'ID',dataIndex:'id',sortable:true
},{
text:'状态',dataIndex:'status',sortable:true
},{
text:'所属单位',dataIndex:'comid',sortable:true
},{
text:'处理记录',dataIndex:'chushu',renderer:function(v,d,i){
var s='&nbsp;';

View File

@@ -6,31 +6,34 @@ $(document).ready(function(){
if(!zt)zt='';
if(!mid)mid='0';
var bools=false;
var 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
}];
if(companymode)columns.push({text:'所属单位※',dataIndex:'comidname'});
columns.push({text:'状态',dataIndex:'status',sortable:true});
columns.push({text:'',dataIndex:'caozuo',callback:'opegs{rand}'});
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}'
}],
columns:columns,
celldblclick:function(){
c.view();
},

View File

@@ -75,4 +75,17 @@ class companyClassModel extends Model
{
m('userract')->update("`company`='$name'","`companyid`='$id'");//员工合同
}
/**
* 所属单位名称
*/
public function comidname($comid)
{
if($comid && is_numeric($comid)){
$mors = $this->getXinxi($comid);
return arrvalue($mors, 'name');
}else{
return $comid;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -173,7 +173,7 @@ class flow_gongClassModel extends flowModel
'order' => '`istop` desc,`optdt` desc',
'keywere' => $keywere,
'where' => $whyere,
'fields' => 'id,typename,optdt,title,optname,zuozhe,indate,recename,fengmian,mintou,`status`,`istop`,`appxs`'
'fields' => 'id,typename,optdt,title,optname,zuozhe,indate,recename,fengmian,mintou,`status`,`istop`,`appxs`,`comid`'
);
}

View File

@@ -37,7 +37,7 @@ class flow_userClassModel extends flowModel
$where.= " and instr(`deptpath`,'[$detpid]')>0";
}
return array(
'fields'=> '`name`,`id`,`id` as uid,`face`,`sort`,`deptallname`,deptpath,`ranking`,`tel`,`mobile`,`email`,`user`,num,workdate,sex,deptname,deptnames,superman,status,type,online,lastonline,isvcard,`companyid`',
'fields'=> '`name`,`id`,`id` as uid,`face`,`sort`,`deptallname`,deptpath,`ranking`,`tel`,`mobile`,`email`,`user`,num,workdate,sex,deptname,deptnames,superman,status,type,online,lastonline,isvcard,`companyid`,`comid`',
'order' => '`status` desc,`sort`',
'where' => $where
);

View File

@@ -136,6 +136,7 @@ class flowbillClassModel extends Model
$modename = $rs['modename'];
$summary = '';
$summarx = '';
$comidname = '';
$modenum = '';
$statustext = '记录不存在';
$statusstr = '不存在';
@@ -155,6 +156,7 @@ class flowbillClassModel extends Model
$rers = $this->db->getone('[Q]'.$rs['table'].'', $rs['mid']);
if($rers){
$tihsrs = $flow->rsreplace($rers, 2, null, 1);
$comidname = $tihsrs['comidname'];
$summary = $this->rock->reparr($mors['summary'], $tihsrs);
$summarx = $this->rock->reparr($mors['summarx'], $tihsrs);
@@ -190,6 +192,7 @@ class flowbillClassModel extends Model
if(!isempt($rs['checksm']))$cont.='<br>处理说明:'.$rs['checksm'].'';
}
}
if(ISMORECOM)$cont.='<br>所属单位※:'.$comidname.'';
$srows[]= array(
'title' => $title,
@@ -298,6 +301,7 @@ class flowbillClassModel extends Model
$modename = $rs['modename'];
$summary = '';
$modenum = '';
$comidname = '';
$statustext = '记录不存在';
$statuscolor= '#888888';
$ishui = 0;
@@ -319,6 +323,7 @@ class flowbillClassModel extends Model
$tihsrs = $flow->rsreplace($rers, 2, null, 1);
$summary = $this->rock->reparr($mors['summary'], $tihsrs);
$comidname = $tihsrs['comidname'];//所属单位
$nowsets = $rs['nowcheckname']; //当前审核人
$ztarr = $flow->getstatus($rers, $mors['statusstr'], $nowsets);
$statustext = $ztarr[0];
@@ -349,6 +354,7 @@ class flowbillClassModel extends Model
'modename' => $modename,
'modenum' => $modenum,
'summary' => $summary,
'comidname' => $comidname,
'status' => $statusstr
);
}

View File

@@ -113,6 +113,8 @@ class modeClassModel extends Model
}
}
}
$farr[] = array('name'=>arrvalue($chufarr, 'comidname', lang('所属单位※')),'fields'=>'comidname','islb'=>(ISMORECOM)?1:0);
$jgpstr = '<!--SCRIPTend-->';
$hstart = '<!--HTMLstart-->';

View File

@@ -163,6 +163,11 @@ class publicClassAction extends ActionNot{
$otype = (int)$this->get('otype','0');
$this->smartydata['id'] = $id;
$this->smartydata['otype'] = $otype;
$urlbj = getconfig('officebj_url');
//说明是自己部署编辑平台用旧的页面
if(!isempt($urlbj) && !contain($urlbj,'rockoa.com') && getconfig('systype') != 'dev')
$this->displayfile = ''.P.'/public/tpl_public_fileedit_old.html';
}
/**

View File

@@ -8,13 +8,14 @@
<script type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/base64-min.js"></script>
<script>
var id = '<?=$da['id']?>',otype='<?=$da['otype']?>',nowda,ldata;
var id = '<?=$da['id']?>',otype='<?=$da['otype']?>',nowda,ldata,erand;
function initbody(){
erand = js.request('erand');//编辑号
js.setmsg('初始中...');
$.ajax({
type:'get',dataType:'json',
url:'api.php?m=upload&a=officeexists&id='+id+'&otype='+otype+'',
url:'api.php?m=upload&a=officeexists&id='+id+'&otype='+otype+'&erand='+erand+'',
success:function(ret){
if(ret.success){
var da = ret.data;

View File

@@ -0,0 +1,46 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>文档处理</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/js.js"></script>
<script>
var id = '<?=$da['id']?>',otype='<?=$da['otype']?>';
function initbody(){
var kei = 'fileid'+id+'';
var msg = sessionStorage.getItem(kei);
if(msg){
$('#zongmsgve').html('刚刚已经打开此文件<br><br><a href="javascript:;" onclick="js.reload()">重新进去</a><a href="javascript:;" onclick="js.back()">&lt;&lt;返回</a>');
sessionStorage.removeItem(kei,'');
return;
}
var url = 'api.php?m=upload&a=sendedit&id='+id+'&otype='+otype+'';
$.ajax({
type:'get',
url:url,
success:function(s){
var ret = js.decode(s);
if(ret.success){
var da = ret.data;
$('#msgview').html('跳转中...');
sessionStorage.setItem(kei,'trueabc');
js.location(da.url);
}else{
$('#msgview').html('<font color=red>'+ret.msg+'</font>');
}
},
error:function(e){
$('#msgview').html(e.responseText);
}
});
}
</script>
</head>
<body style="padding:0px;margin:0px;">
<div style="margin-top:20%" align="center" id="zongmsgve">
<img src="images/mloading.gif" align="absmiddle">&nbsp;<span id="msgview">处理中...</span>
</div>
</body>
</html>

View File

@@ -257,8 +257,8 @@ $(document).ready(function(){
<td align="right">文档在线编辑:</td>
<td class="tdinput">
<select id="officebj_{rand}" class="form-control"><option value="">安装客户端在线编辑插件</option><option value="1">官网提供在线编辑服务(官网VIP专用)</option></select>
<div id="divofficebj_key" style="display:none"><input placeholder="在线编辑key可不用设置" class="form-control" id="officebj_key_{rand}"></div>
<select id="officebj_{rand}" class="form-control"><option value="">安装客户端在线编辑插件</option><option value="1">官网提供在线编辑服务(按次收费)</option></select>
<div id="divofficebj_key" style="display:none"><input placeholder="在线编辑key可不用设置" class="form-control" id="officebj_key_{rand}"> <a target="_blank" href="<?=URLY?>view_onlineoffice.html">关于在线编辑说明</a></div>
</td>
</tr>

View File

@@ -32,8 +32,13 @@ class uploadClassAction extends apiAction
$this->returnjson($arr);
}
/**
* 从编辑文件中心获取最新编辑的文件20250610
*/
public function editfilebAction()
{
//用那个异步去获取(待开发)
$fileid = (int)$this->get('fileid','0');
$frs = m('file')->getone($fileid);
if(!$frs)return 'error';
@@ -58,6 +63,22 @@ class uploadClassAction extends apiAction
}
}
//判断是否编辑完成
public function editfilecAction()
{
$fileid = (int)$this->get('fileid','0');
$erand = $this->get('erand');
$frs = m('file')->getone($fileid);
if(!$erand || !$frs)return 'error';
$barr = c('rockedit')->getdata('file','editfilec', array(
'filekey' => getconfig('xinhukey'),
'filenum' => $frs['onlynum'],
'erand' => $erand
));
if($barr['success'])return $barr['data'];
return 'wait';
}
/**
* 这个是用来在线编辑文档上传的
@@ -378,9 +399,20 @@ class uploadClassAction extends apiAction
//编辑
if($type==2){
if(getconfig('officebj')=='1'){
$erand = rand(1000000,9999999);
$data['fileext']= 'rockedit';
$data['url'] = 'index.php?m=public&a=fileedit&id='.$fileid.'';
$data['editwsinfo'] = c('rockedit')->getwsinfo();
$data['url'] = 'index.php?m=public&a=fileedit&id='.$fileid.'&erand='.$erand.'';
$data['editwsinfo'] = c('rockedit')->getwsinfo(array(
'erand' => $erand,
'fileid'=> $fileid
));
/*
c('rockqueue')->push('rockoffice,gedit', array(
'erand' => $erand,
'cishu' =>1,
'fileid' =>$fileid,
'optid' => $this->adminid
), time() + 10);*/
}else{
if($ismobile==1)return returnerror('移动端不支持在线编辑');
$data['fileext']='rockoffice';
@@ -668,6 +700,7 @@ class uploadClassAction extends apiAction
'optid' => $this->adminid,
'otype' => $otype,
'fileext' => $frs['fileext'],
'erand' => $this->get('erand'),
'filename' => $this->rock->jm->base64encode($frs['filename']),
'optname' => $this->rock->jm->base64encode($this->adminname),
'face' => $this->rock->jm->base64encode(m('admin')->getface($urs['face'])),

View File

@@ -7,11 +7,15 @@ class uploawClassAction extends apiAction
}
/**
* 上传文件(外部信息收集使用的)
* 上传文件(外部信息收集使用的),弃用
*/
public function upfileAction()
{
if(!$_FILES)exit('sorry!');
return 'error0';
/*
$mid = (int)$this->get('mid','0');
$to = m('planm')->rows('`id`='.$mid.' and `type`=2 and `fenlei`=1 and `status`=1');
if($to==0 || !$_FILES)exit('sorry!');
$upimg = c('upfile');
$maxsize= (int)$this->get('maxsize', $upimg->getmaxzhao());//上传最大M
$uptypes= 'jpg|png|docx|doc|pdf|xlsx|xls|zip|rar';
@@ -21,5 +25,6 @@ class uploawClassAction extends apiAction
$arr = c('down')->uploadback($upses);
$arr['autoup'] = (getconfig('qcloudCos_autoup') || getconfig('alioss_autoup')) ? 1 : 0; //是否上传其他平台
return $arr;
*/
}
}

View File

@@ -10,63 +10,7 @@ class openmodhetongClassAction extends openapiAction
public function dataAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$nickName = $this->jm->base64decode($this->get('nickName'));
$htdata = array();
$db = m('wxxcyus');
$uarr['mobile'] = $mobile;
$uarr['xcytype'] = $xcytype;
$uarr['openid'] = $openid;
$uarr['nickName'] = $nickName;
$uarr['province'] = $this->get('province');
$uarr['city'] = $this->get('city');
$uarr['gender'] = $this->get('gender');
$uarr['dingyue'] = $this->get('dingyue');
$uarr['avatarUrl'] = $this->jm->base64decode($this->get('avatarUrl'));
$where = "`openid`='$openid'";
if($db->rows($where)==0){
$uarr['adddt'] = $this->now;
$where='';
}else{
$uarr['optdt'] = $this->now;
}
$db->record($uarr, $where);
$custid = '0'; //客户id
$rows = m('customer')->getall("`mobile`='$mobile' and `status`=1",'id');
foreach($rows as $k=>$rs)$custid.=','.$rs['id'].'';
if($custid!='0'){
$htrows = m('custract')->getall('custid in('.$custid.')','custid,custname,id,startdt,enddt,signdt,type,money,num','id desc');
$dt = $this->rock->date;
foreach($htrows as $k=>$rs){
if($rs['startdt']>$dt){
$statustext='待生效';
$statuscolor='blue';
}else if($rs['startdt']<=$dt && $rs['enddt']>=$dt){
$statustext='生效中';
$statuscolor='green';
}else if($rs['enddt']<$dt){
$statustext='已过期';
$statuscolor='gray';
}
$htdata[] = array(
'id' => $rs['id'],
'name' => $rs['custname'],
'modenum' => 'custract',
'explain' => '金额:'.$rs['money'].',编号:'.$rs['num'].',有效期:'.$rs['startdt'].'→'.$rs['enddt'].'',
'statustext'=>$statustext,
'statuscolor'=>$statuscolor,
);
}
}
return returnsuccess(array(
'htdata' => $htdata,
));
}
/**
@@ -75,23 +19,6 @@ class openmodhetongClassAction extends openapiAction
public function customerAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$sql = "select a.id,a.name,a.unitname,b.name as yewuname from [Q]customer a left join [Q]admin b on a.uid=b.id where a.`mobile`='$mobile' and a.`status`=1";
$rows = $this->db->getall($sql);
$custdata = array();
foreach($rows as $k=>$rs){
$custdata[] = array(
'id' => $rs['id'],
'name' => $rs['name'],
'modenum' => 'customer',
'explain' => '业务员:'.$rs['yewuname'].'',
);
}
return returnsuccess(array(
'custdata' => $custdata,
));
}
}

View File

@@ -10,70 +10,5 @@ class openxiangClassAction extends openapiAction
$this->showreturn('', '此页面弃用', 201);//2025-04-09
}
/**
* 详情
*/
public function dataAction()
{
$list['hetong'] = 'custract,customer'; //配置可读取模块
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$kears = arrvalue($list, $xcytype);
if(!$kears)return returnerror('无效模块1');
if(!in_array($num,explode(',', $kears)))return returnerror('无效模块2');
$flow = m('flow')->initflow($num,$mid, false);
$barr['modename'] = $flow->modename;
$barr['btndata'] = array();
$barr['xiangdata']= array();
if(method_exists($flow,'openxiang')){
$lbarr = $flow->openxiang();
if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v;
}
return returnsuccess($barr);
}
/**
* 操作菜单
*/
public function optmenuAction()
{
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
$menuid = (int)$this->get('menuid','0');
$sm = c('check')->onlysql($this->jm->base64decode($this->get('sm')));
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$flow = m('flow')->initflow($num,$mid, false);
$msg = $flow->optmenu($menuid,1,$sm);
if($msg!='ok')return returnerror($msg);
return returnsuccess($msg);
}
/**
* 下载文件
*/
public function downurlAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return;
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return;
m('file')->show($id, true);
}
/**
* 返回文件详情
*/
public function fileinfoAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return returnerror('无效openid1');
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return returnerror('无效openid');
$frs = m('file')->getone($id,'id,filename,filesize,fileext,filepath,filepathout');
return returnsuccess($frs);
}
}