diff --git a/README.md b/README.md index 1385f09..9a91bc9 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ 官网网站:http://www.rockoa.com/ 源码仅供学习二次开发使用,禁止二次发布,禁止用于商业用途出售等(违者必究) 版权:Copyright @2016-2023 信呼开发团队 -版本整理时间:2023-04-05 23:59:59 -版本号:V2.5.5 +版本整理时间:2023-04-26 23:59:59 +版本号:V2.5.6 -### V2.5.5更新说明 +### V2.5.6更新说明 1、完善系统安全性。 2、更多升级日志详见:http://www.rockoa.com/view_core.html diff --git a/config/version.php b/config/version.php index 75b8329..f40f341 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ '+e.message+''; js.alert(msg,'js閿欒'); }); + setTimeout(function(){ + if(typeof(api)=='undefined'){ + var api={}; + api.systemType='androidnew'; + api.deviceId=''; + } + },2000); }); var js={path:'index',url:'',bool:false,login:{},initdata:{},openarr:{},scroll:function(){}}; var isIE=true; @@ -56,11 +63,7 @@ js.getarropen=function(caa){ jsopenararass = caa; js.open('js/array.shtml'); } -if(typeof(api)=='undefined'){ - var api={}; - api.systemType='android'; - api.deviceId=''; -} + js.str=function(o){ o.value = strreplace(o.value); } diff --git a/mode/bootstrapplugin/jquery-bootstable.js b/mode/bootstrapplugin/jquery-bootstable.js index ab1bdd3..43b6a9a 100644 --- a/mode/bootstrapplugin/jquery-bootstable.js +++ b/mode/bootstrapplugin/jquery-bootstable.js @@ -76,25 +76,32 @@ }; this._create = function(){ var a = can.columns; - var s = '',i,len=a.length,val,s1,s2='',cols,s3='',s4='',s5='',le,st,ov,j,j1,na,attr,sty='',hs='',dis,dlen=this.data.length; + var s = '',i,len=a.length,val,s1,s2='',cols,s3='',s4='',s5='',le,st,ov,j,j1,na,attr,sty='',hs='',dis,dlen=this.data.length,mcol; s+='
| '; + mcol = window['maincolor']; + if(!mcol)mcol='#3399FF'; + s+=' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| '; if(can.checked)s+=' | '; + var nstr = js.getoption(this.tablekeymd5()),nda={}; + if(nstr)nda = JSON.parse(nstr); for(i=0;i | ';
+ s+=' ';
if(can.celleditor&&a[i].editor)s+=' ';
s+=a[i].text;
if(a[i].sortable){
s+=' ';
- if(can.sort == a[i].dataIndex){
+ if(can.sort == na){
s+='';
}else{
s+='';
@@ -145,6 +152,9 @@
obj.find('i[tempsort]').click(function(){
me._clickorder(this);
});
+ obj.find('th[thxu]').dblclick(function(){
+ me._dblclickth(this);
+ });
};
this.insert=function(d, funs,inid){
d = js.apply({id:'auto'}, d);
@@ -181,7 +191,7 @@
dis = '';
if(ov.checkdisabled)dis='disabled';
s+='
diff --git a/webmain/main/flow/flowAction.php b/webmain/main/flow/flowAction.php
index e82824d..113cd81 100644
--- a/webmain/main/flow/flowAction.php
+++ b/webmain/main/flow/flowAction.php
@@ -803,6 +803,18 @@ class mode_'.$modenum.'ClassAction extends inputAction{
if($flow->isflow>0){
$billrs = $flow->billmodel->getone("`table`='$flow->mtable' and `mid`='".$rs['id']."'");
$otehsr = arrvalue($billrs, 'nowcheckname');
+ $narr['udeptname'] = arrvalue($billrs, 'udeptname');
+ $narr['optname'] = arrvalue($billrs, 'uname');
+ }else{
+ $uid = arrvalue($rs,'uid');
+ if(!$uid)$uid = arrvalue($rs,'optid');
+ if($uid){
+ $urs = $flow->adminmodel->getXinxi($uid);
+ if($urs){
+ $narr['udeptname'] = $urs['deptname'];
+ $narr['optname'] = $urs['name'];
+ }
+ }
}
$narr['status'] = $flow->getstatus($rs,'',$otehsr,1);
$narr['chushu'] = $flow->flogmodel->rows("`table`='".$flow->mtable."' and `mid`='".$rs['id']."'");
@@ -1168,8 +1180,12 @@ class mode_'.$modenum.'ClassAction extends inputAction{
$num = $this->post('num');
$modeid = (int)$this->post('modeid');
$str = $this->post('str');
- $this->option->setval($num.'@'.(-1*$modeid-1000), $str,'妯″潡鍒楀畾涔');
- $path = m('mode')->createlistpage($modeid);
+ if($str){
+ $this->option->setval($num.'@'.(-1*$modeid-1000), $str,'妯″潡鍒楀畾涔');
+ }else{
+ $this->option->delete("`num`='$num'");
+ }
+ //$path = m('mode')->createlistpage($modeid);
$msg = 'ok';
//if($path=='')$msg='宸蹭繚瀛,浣嗘棤娉曚粠鏂扮敓鎴愬垪琛ㄩ〉,鑷畾涔夊垪灏嗕笉鑳界敓鏁';
echo $msg;
diff --git a/webmain/main/flow/rock_flow_elementedit.php b/webmain/main/flow/rock_flow_elementedit.php
index c30ed4f..76ccf43 100644
--- a/webmain/main/flow/rock_flow_elementedit.php
+++ b/webmain/main/flow/rock_flow_elementedit.php
@@ -16,7 +16,7 @@ $(document).ready(function(){
},
submitcheck:function(d){
if(d.fieldstype.indexOf('change')==0){
- if(d.data=='')return '姝ゅ瓧娈靛厓绱犵被鍨嬫椂锛屾暟鎹簮蹇呴』濉啓鐢ㄦ潵瀛樺偍閫夋嫨鏉ョ殑Id锛屽濉啓涓猴細'+d.fields+'id';
+ if(d.data=='' || d.data==d.fields)return '姝ゅ瓧娈靛厓绱犵被鍨嬫椂锛屾暟鎹簮蹇呴』濉啓鐢ㄦ潵瀛樺偍閫夋嫨鏉ョ殑Id锛岃濉啓涓猴細'+d.fields+'id';
}
if(d.islu=='1' && d.fields=='id')return 'id瀛楁鏄笉鍙互鍋氬綍鍏ラ」瀛楁';
}
diff --git a/webmain/main/flow/rock_flow_menuedit.php b/webmain/main/flow/rock_flow_menuedit.php
index 3af84fd..dbcfa0f 100644
--- a/webmain/main/flow/rock_flow_menuedit.php
+++ b/webmain/main/flow/rock_flow_menuedit.php
@@ -37,6 +37,18 @@ $(document).ready(function(){
h.setValue('upgcont',jm.base64decode(d.upgcont));
}
}
+
+ var c = {
+ xuanrenyua:function(){
+ js.changeuser('', 'usercheck', '閫夋嫨閫傜敤浜哄憳',{
+ onselect:function(sna,sid){
+ if(sid)h.form.wherestr.value+=' and {uid} in('+sid+')';
+ }
+ })
+ }
+ }
+
+ js.initbtn(c);
});
@@ -110,7 +122,7 @@ $(document).ready(function(){
';
- }
+ }
for(i=0;i | ';
+ str+=' ';
+ js.tanbody('bootsthcog','璁剧疆鍒梉'+d.text+']鐨勫睘鎬', 300,200,{
+ html:str,
+ btn:[{text:'纭畾'}]
+ });
+ $('#bootsthcog_btn0').click(function(){
+ me._dblclickthclick(xu);
+ });
+ };
+ this._dblclickthclick=function(xu){
+ var d = can.columns[xu],w1=get('lie_width').value,d1={};
+ d1.align = get('lie_align').value;
+ d.align = d1.align;
+ if(w1 && w1>0){
+ d1.width = w1+get('lie_widths').value;
+ d.width = d1.width;
+ }
+ js.tanclose('bootsthcog');
+ this.reload();
+ var sbd = true;
+ if(can.modenum && can.listcreate && window['admintype']=='1'){
+ var da = {modenum:can.modenum,align:d1.align,width:'',fields:d.dataIndex};
+ if(d1.width)da.width = d1.width;
+ js.ajax('index.php?d=flow&m=flowopt&a=savecolums',da,function(ret){
+ if(ret.code==202)me._dblclickthsave(d,d1);
+ },'get,json');
+ sbd=false;
+ }
+ if(sbd)this._dblclickthsave(d,d1);
+ };
+ this._dblclickthsave=function(d,d1){
+ var key = this.tablekeymd5(),str,da={};
+ str = js.getoption(key);
+ if(str)da = JSON.parse(str);
+ da[d.dataIndex] = d1;
+ js.setoption(key,JSON.stringify(da));
+ };
+ this.tablekeymd5=function(){
+ var url = can.url;
+ if(url.indexOf('rnd')>0)url = url.substr(0,url.indexOf('rnd')-1);
+ var str = url+this.tablename+can.storeafteraction+can.storebeforeaction+can.defaultorder+can.onlytablekey;
+ if(can.modenum)str+=can.modenum;
+ return 'table'+md5(str);
+ };
this.signature= function(da, url){
var time = parseInt(js.now('time')*0.001);
var siaa = ''+NOWURL+''+url+''+da.tablename+''+time+'_'+adminid+'';
@@ -892,6 +966,7 @@
method:'POST', //post璇锋眰
rendertr:function(){return ''}, //灏戠敤
rowsbody:function(){return ''}, //灏戠敤
+ onlytablekey:'', //鍞竴鐨勭紪鍙
celldblclick:false //娌$敤
};
if(typeof(bootstableobj)=='undefined')bootstableobj={};
diff --git a/web/res/js/strformat.js b/web/res/js/strformat.js
index 1d1c648..5a3e3c4 100644
--- a/web/res/js/strformat.js
+++ b/web/res/js/strformat.js
@@ -16,39 +16,41 @@ var strformat = {
return url;
},
emotspath:'',
+ openurl:function(dz){
+ js.location(dz);
+ },
+ urlpipei:function(str){
+ urlpipeiarr = [];
+ var strv = this.urlpipeiss(str,'http://');
+ strv = this.urlpipeiss(strv,'https://');
+ var i,len = urlpipeiarr.length,sv;
+ if(len>0)for(i=0;i鍒楀瀹藉害锛 ';
+ str+='瀵归綈鏂瑰紡锛 ';
+ str+='
浜哄憳鐘舵佷俊鎭
涓汉淇℃伅
鑱旂郴鏂瑰紡
宸ヨ祫鍗′俊鎭
宸ヤ綔缁忓巻
{鏂板,0} 鏁欒偛缁忓巻
{鏂板,1}
浜哄憳鐘舵佷俊鎭
涓汉淇℃伅
鑱旂郴鏂瑰紡
宸ヨ祫鍗′俊鎭
宸ヤ綔缁忓巻
{鏂板,0} 鏁欒偛缁忓巻
{鏂板,1}
+
+
+
+
\ No newline at end of file
diff --git a/webmain/flow/page/rock_page_custfina.php b/webmain/flow/page/rock_page_custfina.php
index f8f86dd..92e5411 100644
--- a/webmain/flow/page/rock_page_custfina.php
+++ b/webmain/flow/page/rock_page_custfina.php
@@ -26,6 +26,9 @@ c.searchbtn=function(){
var dt = get('dt_{rand}').value;
this.search({month:dt});
}
+c.createjizhang=function(d){
+ js.msgerror('璇峰湪璐㈠姟鐨勮彍鍗曚笅鎿嶄綔');
+}
//[鑷畾涔夊尯鍩焑nd]
c.initpagebefore();
diff --git a/webmain/flow/page/rock_page_custfinb.php b/webmain/flow/page/rock_page_custfinb.php
index f41cfae..80ed1d1 100644
--- a/webmain/flow/page/rock_page_custfinb.php
+++ b/webmain/flow/page/rock_page_custfinb.php
@@ -26,6 +26,9 @@ c.searchbtn=function(){
var dt = get('dt_{rand}').value;
this.search({month:dt});
}
+c.createjizhang=function(d){
+ js.msgerror('璇峰湪璐㈠姟鐨勮彍鍗曚笅鎿嶄綔');
+}
//[鑷畾涔夊尯鍩焑nd]
c.initpagebefore();
diff --git a/webmain/flow/page/rock_page_gong.php b/webmain/flow/page/rock_page_gong.php
index ac5b90e..5c7eba8 100644
--- a/webmain/flow/page/rock_page_gong.php
+++ b/webmain/flow/page/rock_page_gong.php
@@ -38,7 +38,8 @@ c.setcolumns('istop',{
});
c.setcolumns('appxs',{
type:'checkbox',
- 'editor':isedit
+ 'editor':isedit,
+ 'tooltip':'鎵嬫満缃戦〉鐗堝拰APP鐨勯椤垫樉绀鸿繖涓褰'
});
//[鑷畾涔夊尯鍩焑nd]
diff --git a/webmain/flow/page/viewpage_collects.html b/webmain/flow/page/viewpage_collects.html
new file mode 100644
index 0000000..4e1259a
--- /dev/null
+++ b/webmain/flow/page/viewpage_collects.html
@@ -0,0 +1,10 @@
+
+
+
+ 鍘诲畬鎴愬~鍐
+
+
\ No newline at end of file
diff --git a/webmain/index/indexAction.php b/webmain/index/indexAction.php
index c06c367..6155ee4 100644
--- a/webmain/index/indexAction.php
+++ b/webmain/index/indexAction.php
@@ -257,10 +257,14 @@ class indexClassAction extends Action{
$surl = $this->jm->base64decode($this->get('surl'));
$num = $this->get('num');
$menuname = $this->jm->base64decode($this->get('menuname'));
+ $urlpms = $this->jm->base64decode($this->get('urlpms'));
if(isempt($surl))exit('not found');
$file = ''.P.'/'.$surl.'.php';
if(!file_exists($file))$file = ''.P.'/'.$surl.'.shtml';
if(!file_exists($file))exit('404 not found '.$surl.'');
+ $params = array();
+ if($urlpms)$params = json_decode('{'.str_replace('\'','"', $urlpms).'}', true);
+ $this->assign('pageparams', $params);
if(contain($surl,'home/index/rock_index'))$this->showhomeitems();//棣栭〉鐨勬樉绀
$this->displayfile = $file;
//璁板綍鎵撳紑鑿滃崟鏃ュ織
diff --git a/webmain/index/indexpublic.js b/webmain/index/indexpublic.js
index 02f3d45..17dbb07 100644
--- a/webmain/index/indexpublic.js
+++ b/webmain/index/indexpublic.js
@@ -374,9 +374,12 @@ function highsearchclass(options){
if(this.type==1){
js.tanbody('searchhigh','鑷畾涔夊垪鏄剧ず', 300,350,{
html:'',
- btn:[{text:'纭畾'}]
+ btn:[{text:'纭畾'},{text:'娓呯┖',bgcolor:'#d9534f'}]
});
this.initfields();
+ $('#searchhigh_btn1').click(function(){
+ me.clearcolumn();
+ });
}
$('#searchhigh_btn0').click(function(){
me.queding();
@@ -489,18 +492,24 @@ function highsearchclass(options){
if(this.checked)d+=','+this.value+'';
});
if(d!='')d=d.substr(1);
- this.setmsg('淇濆瓨涓...');
- js.ajax(js.getajaxurl('savecolunms','flow','main'),{num:this.columnsnum,str:d,modeid:this.modeid},function(s){
- if(s=='ok'){
- js.msg('success','淇濆瓨鎴愬姛');
- me.oncallback(d);
- js.tanclose('searchhigh');
- }else{
- me.setmsg(s);
- }
- },'post');
+ this.savecolunms(d);
}
};
+ this.savecolunms=function(d){
+ this.setmsg('淇濆瓨涓...');
+ js.ajax(js.getajaxurl('savecolunms','flow','main'),{num:this.columnsnum,str:d,modeid:this.modeid},function(s){
+ if(s=='ok'){
+ js.msg('success','淇濆瓨鎴愬姛');
+ me.oncallback(d);
+ js.tanclose('searchhigh');
+ }else{
+ me.setmsg(s);
+ }
+ },'post');
+ };
+ this.clearcolumn=function(){
+ this.savecolunms('');
+ };
this.saveformdata=function(){
var d = js.getformdata('highform');
this.setinitdata('data',d);
diff --git a/webmain/index/indexscript.js b/webmain/index/indexscript.js
index fa10962..2650f41 100644
--- a/webmain/index/indexscript.js
+++ b/webmain/index/indexscript.js
@@ -443,7 +443,7 @@ function addtabs(a){
a.urlpath = url+'.php';
objcont.append('');
$.ajax({
- url:'?m=index&a=getshtml&surl='+jm.base64encode(url)+'&num='+num+'&menuname='+jm.base64encode(a.name)+'',
+ url:'?m=index&a=getshtml&surl='+jm.base64encode(url)+'&num='+num+'&menuname='+jm.base64encode(a.name)+'&urlpms='+jm.base64encode(urlpms)+'',
type:'get',
success: function(da){
$('#mainloaddiv').remove();
diff --git a/webmain/install/rockxinhu.sql b/webmain/install/rockxinhu.sql
index 9b1595d..479aa91 100644
--- a/webmain/install/rockxinhu.sql
+++ b/webmain/install/rockxinhu.sql
@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50610
File Encoding : 65001
-Date: 2023-04-05 12:59:00
+Date: 2023-04-26 15:45:05
*/
SET FOREIGN_KEY_CHECKS=0;
@@ -71,13 +71,13 @@ CREATE TABLE `xinhu_admin` (
-- ----------------------------
-- Records of xinhu_admin
-- ----------------------------
-INSERT INTO `xinhu_admin` VALUES ('1', 'A001', 'admin', '绠$悊鍛', 'e10adc3949ba59abbe56e057f20f883e', '5202', '1', '1', '鐢', '0592-1234569', 'upload/face/1.jpg', '2', '寮鍙戦儴', null, null, null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '5', '纾愮煶', '椤圭洰涓荤', '1', '[1],[2]', '[5]', '1,3,4', '15800000023', '1', '2016-06-01', null, '2017-03-08 09:52:30', null, null, null, '0', 'guanliyuan', null, '1', '0', null, '1', null, null, '0', '1');
+INSERT INTO `xinhu_admin` VALUES ('1', 'A001', 'admin', '绠$悊鍛', 'e10adc3949ba59abbe56e057f20f883e', '5266', '1', '1', '鐢', '0592-1234569', 'upload/face/1.jpg', '2', '寮鍙戦儴', null, null, null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '5', '纾愮煶', '椤圭洰涓荤', '1', '[1],[2]', '[5]', '1,3,4', '15800000023', '1', '2016-06-01', null, '2017-03-08 09:52:30', null, null, null, '0', 'guanliyuan', null, '1', '0', null, '1', null, null, '0', '1');
INSERT INTO `xinhu_admin` VALUES ('2', null, 'diaochan', '璨傝潐', 'e10adc3949ba59abbe56e057f20f883e', '166', '1', '0', '濂', '0592-123456', null, '3', '璐㈠姟閮', null, null, null, '淇″懠寮鍙戝洟闃/璐㈠姟閮', '5', '纾愮煶', '璐㈠姟鎬荤洃', '1', '[1],[3]', '[5]', '1,3', '15800000007', '1', '2016-08-09', null, null, null, null, null, '0', 'diaochan', null, '2', '0', null, '1', null, null, '0', '1');
INSERT INTO `xinhu_admin` VALUES ('3', null, 'xiaoqiao', '灏忎箶', 'e10adc3949ba59abbe56e057f20f883e', '281', '1', '0', '濂', null, null, '3', '璐㈠姟閮', null, null, null, '淇″懠寮鍙戝洟闃/璐㈠姟閮', '2', '璨傝潐', '鍑虹撼', '1', '[1],[3]', '[5],[2]', '1', '15800000001', '1', '2017-05-02', null, '2016-08-30 20:34:23', null, null, null, '0', 'xiaoqiao', null, '2', '0', null, '1', null, null, '0', '1');
-INSERT INTO `xinhu_admin` VALUES ('4', null, 'daqiao', '澶т箶', 'e10adc3949ba59abbe56e057f20f883e', '406', '1', '0', '濂', null, null, '4', '琛屾斂浜轰簨閮', '3', '璐㈠姟閮', '浼氳', '淇″懠寮鍙戝洟闃/琛屾斂浜轰簨閮', '5', '纾愮煶', '浜轰簨涓荤', '1', '[1],[4],[3]', '[5]', '1,3', '15800000002', '1', '2017-07-01', null, '2016-10-20 22:27:51', null, null, null, '0', 'daqiao', null, '2', '0', null, '1', null, null, '0', '1');
-INSERT INTO `xinhu_admin` VALUES ('5', null, 'rock', '纾愮煶', 'e10adc3949ba59abbe56e057f20f883e', '439', '1', '0', '鐢', null, null, '5', '绠$悊灞', null, null, null, '淇″懠寮鍙戝洟闃/绠$悊灞', null, null, '钁d簨闀', '0', '[1],[5]', null, '2,3', '15800000003', '1', '2015-11-01', null, null, null, null, null, '0', 'panshi', null, '1', '0', null, '1', null, '1,2,3,4', '0', '1');
+INSERT INTO `xinhu_admin` VALUES ('4', null, 'daqiao', '澶т箶', 'e10adc3949ba59abbe56e057f20f883e', '419', '1', '0', '濂', null, null, '4', '琛屾斂浜轰簨閮', '3', '璐㈠姟閮', '浼氳', '淇″懠寮鍙戝洟闃/琛屾斂浜轰簨閮', '5', '纾愮煶', '浜轰簨涓荤', '1', '[1],[4],[3]', '[5]', '1,3', '15800000002', '1', '2017-07-01', null, '2016-10-20 22:27:51', null, null, null, '0', 'daqiao', null, '2', '0', null, '1', null, null, '0', '1');
+INSERT INTO `xinhu_admin` VALUES ('5', null, 'rock', '纾愮煶', 'e10adc3949ba59abbe56e057f20f883e', '445', '1', '0', '鐢', null, null, '5', '绠$悊灞', null, null, null, '淇″懠寮鍙戝洟闃/绠$悊灞', null, null, '钁d簨闀', '0', '[1],[5]', null, '2,3', '15800000003', '1', '2015-11-01', null, null, null, null, null, '0', 'panshi', null, '1', '0', null, '1', null, '1,2,3,4', '0', '1');
INSERT INTO `xinhu_admin` VALUES ('6', null, 'zhangfei', '寮犻', 'e10adc3949ba59abbe56e057f20f883e', '216', '1', '0', '鐢', null, null, '2', '寮鍙戦儴', null, null, null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '7', '璧靛瓙榫', '绋嬪簭鍛', '100', '[1],[2]', '[5],[1],[7]', '1', '15800000004', '1', '2017-07-01', null, '2016-11-01 20:15:52', null, null, null, '0', 'zhangfei', null, '1', '0', null, '1', null, null, '0', '0');
-INSERT INTO `xinhu_admin` VALUES ('7', null, 'zhaozl', '璧靛瓙榫', 'e10adc3949ba59abbe56e057f20f883e', '248', '1', '0', '鐢', null, null, '2', '寮鍙戦儴', null, null, null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '1', '绠$悊鍛', '楂樼骇绋嬪簭鍛', '100', '[1],[2]', '[5],[1]', '1', '15800000005', '1', '2016-07-01', null, '2017-06-28 15:34:26', null, null, null, '0', 'zhaozilong', null, '1', '0', null, '1', null, null, '0', '0');
+INSERT INTO `xinhu_admin` VALUES ('7', null, 'zhaozl', '璧靛瓙榫', 'e10adc3949ba59abbe56e057f20f883e', '249', '1', '0', '鐢', null, null, '2', '寮鍙戦儴', null, null, null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '1', '绠$悊鍛', '楂樼骇绋嬪簭鍛', '100', '[1],[2]', '[5],[1]', '1', '15800000005', '1', '2016-07-01', null, '2017-06-28 15:34:26', null, null, null, '0', 'zhaozilong', null, '1', '0', null, '1', null, null, '0', '0');
INSERT INTO `xinhu_admin` VALUES ('8', null, 'xinhu', '淇″懠瀹㈡湇', '6846860684f05029abccc09a53cd66f1', '421', '1', '1', '濂', null, null, '2', '寮鍙戦儴', null, null, null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '1', '绠$悊鍛', '瀹㈡湇', '200', '[1],[2]', '[5],[1]', '1,4', '15800000006', '1', '2018-12-12', null, null, null, 'rainrock829', null, '0', 'xinhukefu', null, '1', '0', null, '1', null, '2', '0', '1');
-- ----------------------------
@@ -372,8 +372,8 @@ CREATE TABLE `xinhu_chargems` (
-- ----------------------------
-- Records of xinhu_chargems
-- ----------------------------
-INSERT INTO `xinhu_chargems` VALUES ('1', '0', '1', '2016-12-28 15:24:19', '2023-04-05 12:58:51', null, '1');
-INSERT INTO `xinhu_chargems` VALUES ('2', '1', '1', '2016-12-28 15:21:14', '2023-04-05 12:58:51', null, '0');
+INSERT INTO `xinhu_chargems` VALUES ('1', '0', '1', '2016-12-28 15:24:19', '2023-04-26 15:42:36', null, '1');
+INSERT INTO `xinhu_chargems` VALUES ('2', '1', '1', '2016-12-28 15:21:14', '2023-04-26 15:42:36', null, '0');
-- ----------------------------
-- Table structure for `xinhu_city`
@@ -491,22 +491,33 @@ CREATE TABLE `xinhu_custfina` (
`createid` smallint(6) DEFAULT '0',
`ismove` tinyint(1) DEFAULT '0' COMMENT '鏄惁杞Щ鐨',
`comid` smallint(6) DEFAULT '0' COMMENT '瀵瑰簲鍗曚綅id',
+ `xgnum` varchar(50) DEFAULT NULL COMMENT '鐩稿叧鍗曟嵁',
+ `xgid` int(11) DEFAULT '0',
+ `paytype` varchar(50) DEFAULT NULL COMMENT '鏀朵粯娆剧被鍨',
+ `jzid` int(11) DEFAULT '0' COMMENT '鐢熸垚瀵瑰簲璁拌处id',
PRIMARY KEY (`id`),
KEY `htid` (`htid`)
-) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='瀹㈡埛鏀朵粯娆';
+) ENGINE=MyISAM AUTO_INCREMENT=68 DEFAULT CHARSET=utf8 COMMENT='瀹㈡埛鏀朵粯娆';
-- ----------------------------
-- Records of xinhu_custfina
-- ----------------------------
-INSERT INTO `xinhu_custfina` VALUES ('2', '0', 'CF-20190604-001', '2016-10-15', '1', '1', '淇″懠鍔炲叕杞欢', '2016-10-15 18:40:20', '绠$悊鍛', '2100.00', '1', '1', '2016-10-19 18:42:22', '鏈嶅姟鍣ㄨ垂鐢', '2016-10-15 18:40:20', '绠$悊鍛', '1', '1', '0');
-INSERT INTO `xinhu_custfina` VALUES ('3', '2', 'HT-002', '2016-10-15', '7', '3', '寰蒋鍏徃', '2016-10-15 19:10:04', '璧靛瓙榫', '20000.00', '0', '1', '2016-10-05 19:10:20', null, '2016-10-15 19:10:04', '绠$悊鍛', '1', '1', '0');
-INSERT INTO `xinhu_custfina` VALUES ('4', '3', 'HT-003', '2016-10-15', '1', '1', '淇″懠鍔炲叕杞欢', '2016-10-19 16:05:06', '绠$悊鍛', '25.00', '1', '1', '2017-06-26 15:54:00', null, '2016-10-15 19:36:08', '绠$悊鍛', '1', '1', '0');
-INSERT INTO `xinhu_custfina` VALUES ('5', '2', 'HT-002', '2016-10-16', '7', '3', '寰蒋鍏徃', '2016-10-16 13:32:11', '璧靛瓙榫', '30000.00', '0', '0', null, null, '2016-10-16 13:32:11', '绠$悊鍛', '1', '0', '0');
-INSERT INTO `xinhu_custfina` VALUES ('6', '4', 'HT-004', '2016-10-16', '6', '5', '鑵捐绉戞妧', '2016-10-16 16:01:11', '寮犻', '2300.00', '0', '0', null, null, '2016-10-16 16:01:11', '寮犻', '6', '0', '0');
-INSERT INTO `xinhu_custfina` VALUES ('7', '-11', 'CF-20190509-001', '2019-05-09', '1', '15', '淇″懠', '2019-05-12 00:00:18', '绠$悊鍛', '12.00', '0', '1', '2019-05-12 00:00:44', null, '2019-05-12 00:00:18', '绠$悊鍛', '1', '1', '0');
-INSERT INTO `xinhu_custfina` VALUES ('8', '-11', 'CF-20190509-001', '2019-05-09', '1', '15', '淇″懠', '2019-05-12 00:02:44', '绠$悊鍛', '12.00', '0', '1', '2019-05-15 00:02:00', null, '2019-05-12 00:02:44', '绠$悊鍛', '1', '1', '0');
-INSERT INTO `xinhu_custfina` VALUES ('11', '0', null, '2022-05-25', '1', '15', '淇″懠', '2022-05-25 21:30:53', '绠$悊鍛', '20.00', '1', '1', '2022-05-25 21:33:00', null, '2022-05-25 21:30:53', '绠$悊鍛', '1', '1', '1');
-INSERT INTO `xinhu_custfina` VALUES ('13', '9', 'HT-008', '2022-11-15', '1', '17', '鍘﹂棬甯備汉姘戞斂搴', '2022-11-15 17:33:23', '绠$悊鍛', '2300.00', '1', '1', '2022-11-15 17:33:21', null, '2022-11-15 17:33:23', '绠$悊鍛', '1', '0', '1');
+INSERT INTO `xinhu_custfina` VALUES ('2', '0', 'CF-20190604-001', '2016-10-15', '1', '1', '淇″懠鍔炲叕杞欢', '2016-10-15 18:40:20', '绠$悊鍛', '2100.00', '1', '1', '2016-10-19 18:42:22', '鏈嶅姟鍣ㄨ垂鐢', '2016-10-15 18:40:20', '绠$悊鍛', '1', '1', '0', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('3', '2', 'HT-002', '2016-10-15', '7', '3', '寰蒋鍏徃', '2016-10-15 19:10:04', '璧靛瓙榫', '20000.00', '0', '1', '2016-10-05 19:10:20', null, '2016-10-15 19:10:04', '绠$悊鍛', '1', '1', '0', null, '0', null, '26');
+INSERT INTO `xinhu_custfina` VALUES ('4', '3', 'HT-003', '2016-10-15', '1', '1', '淇″懠鍔炲叕杞欢', '2016-10-19 16:05:06', '绠$悊鍛', '25.00', '1', '1', '2017-06-26 15:54:00', null, '2016-10-15 19:36:08', '绠$悊鍛', '1', '1', '0', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('5', '2', 'HT-002', '2016-10-16', '7', '3', '寰蒋鍏徃', '2016-10-16 13:32:11', '璧靛瓙榫', '30000.00', '0', '0', null, null, '2016-10-16 13:32:11', '绠$悊鍛', '1', '0', '0', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('6', '4', 'HT-004', '2016-10-16', '6', '5', '鑵捐绉戞妧', '2016-10-16 16:01:11', '寮犻', '2300.00', '0', '0', null, null, '2016-10-16 16:01:11', '寮犻', '6', '0', '0', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('7', '-11', 'CF-20190509-001', '2019-05-09', '1', '15', '淇″懠', '2019-05-12 00:00:18', '绠$悊鍛', '12.00', '0', '1', '2019-05-12 00:00:44', null, '2019-05-12 00:00:18', '绠$悊鍛', '1', '1', '0', null, '0', null, '28');
+INSERT INTO `xinhu_custfina` VALUES ('8', '-11', 'CF-20190509-001', '2019-05-09', '1', '15', '淇″懠', '2019-05-12 00:02:44', '绠$悊鍛', '12.00', '0', '1', '2019-05-15 00:02:00', null, '2019-05-12 00:02:44', '绠$悊鍛', '1', '1', '0', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('11', '0', null, '2022-05-25', '1', '15', '淇″懠', '2022-05-25 21:30:53', '绠$悊鍛', '20.00', '1', '1', '2022-05-25 21:33:00', null, '2022-05-25 21:30:53', '绠$悊鍛', '1', '1', '1', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('13', '9', 'HT-008', '2022-11-15', '1', '17', '鍘﹂棬甯備汉姘戞斂搴', '2022-11-15 17:33:23', '绠$悊鍛', '2300.00', '1', '1', '2022-11-15 17:33:21', null, '2022-11-15 17:33:23', '绠$悊鍛', '1', '0', '1', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('14', '0', null, '2023-04-12', '1', '17', '鍘﹂棬甯備汉姘戞斂搴', '2023-04-12 18:27:00', '绠$悊鍛', '33.00', '0', '1', '2023-04-05 18:26:00', null, '2023-04-12 18:27:00', '绠$悊鍛', '1', '0', '1', null, '0', '鐜伴噾', '-1');
+INSERT INTO `xinhu_custfina` VALUES ('63', '0', 'JXCXS-003', '2023-04-13', '1', '3', '寰蒋鍏徃', '2023-04-13 18:13:27', '绠$悊鍛', '224.66', '0', '0', null, null, '2023-04-13 18:13:27', '绠$悊鍛', '1', '0', '1', 'jxcxiaoshou', '14', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('16', '0', null, '2023-04-12', '1', '17', '鍘﹂棬甯備汉姘戞斂搴', '2023-04-12 19:01:39', '绠$悊鍛', '100.00', '0', '0', null, null, '2023-04-12 19:01:39', '绠$悊鍛', '1', '0', '1', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('61', '0', null, '2023-04-13', '1', '16', '鐧惧害', '2023-04-13 18:25:33', '绠$悊鍛', '100.00', '1', '1', '2023-04-06 18:25:00', '骞垮憡鎺ㄥ箍', '2023-04-13 17:17:14', '绠$悊鍛', '1', '0', '1', null, '0', null, '25');
+INSERT INTO `xinhu_custfina` VALUES ('58', '0', null, '2023-04-12', '1', '17', '鍘﹂棬甯備汉姘戞斂搴', '2023-04-12 19:01:39', '绠$悊鍛', '22.00', '0', '0', null, null, '2023-04-12 19:01:39', '绠$悊鍛', '1', '0', '1', null, '0', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('64', '0', 'JXCXS-003', '2023-04-13', '1', '3', '寰蒋鍏徃', '2023-04-13 18:13:27', '绠$悊鍛', '33.00', '0', '0', null, null, '2023-04-13 18:13:27', '绠$悊鍛', '1', '0', '1', 'jxcxiaoshou', '14', null, '0');
+INSERT INTO `xinhu_custfina` VALUES ('67', '0', 'JXCCG-002', '2023-04-13', '1', '3', '寰蒋鍏徃', '2023-04-13 18:26:45', '绠$悊鍛', '77.66', '1', '0', null, null, '2023-04-13 18:26:45', '绠$悊鍛', '1', '0', '1', 'jxccaigou', '10', null, '0');
-- ----------------------------
-- Table structure for `xinhu_customer`
@@ -559,14 +570,14 @@ CREATE TABLE `xinhu_customer` (
-- ----------------------------
-- Records of xinhu_customer
-- ----------------------------
-INSERT INTO `xinhu_customer` VALUES ('1', '淇″懠鍔炲叕杞欢', '浜掕仈缃', '1', '2023-02-04 11:37:15', '绠$悊鍛', '纾愮煶', '鍘﹂棬淇″懠绉戞妧鏈夐檺鍏徃', '缃戜笂寮鎷', '0592-123456', null, 'admin@rockoa.com', null, '涓浗绂忓缓鐪佸帵闂ㄥ競婀栭噷鍖轰粰宀宠矾4690鍙', null, null, '1', null, '绠$悊鍛', '1', null, null, '1', '1', '0', null, '1', '0.00', '0.00', null, null, '0', '2019-12-16 11:53:05', null, null, null, '1', '24.51036967209648,118.17883729934692,12', '绠$悊鍛');
+INSERT INTO `xinhu_customer` VALUES ('1', '淇″懠鍔炲叕杞欢', '浜掕仈缃', '1', '2023-02-04 11:37:15', '绠$悊鍛', '纾愮煶', '鍘﹂棬淇″懠绉戞妧鏈夐檺鍏徃', '缃戜笂寮鎷', '0592-123456', null, 'admin@rockoa.com', null, '涓浗绂忓缓鐪佸帵闂ㄥ競婀栭噷鍖轰粰宀宠矾4690鍙', null, null, '1', null, '绠$悊鍛', '1', '淇″懠瀹㈡湇', '8', '1', '1', '0', null, '1', '0.00', '0.00', null, null, '0', '2019-12-16 11:53:05', null, null, null, '1', '24.51036967209648,118.17883729934692,12', '绠$悊鍛');
INSERT INTO `xinhu_customer` VALUES ('2', 'Rock', '杞欢', '1', '2016-12-16 10:45:25', '绠$悊鍛', null, 'RockOA寮鍙戝洟闃', '鐢佃瘽寮鎷', '0592-123456', '15888888', 'xinhu@rockoa.com', null, '鍘﹂棬', null, null, '0', null, '绠$悊鍛', '1', null, null, '1', '0', '0', null, '0', '0.00', '0.00', null, null, '0', null, null, null, null, '0', null, '绠$悊鍛');
-INSERT INTO `xinhu_customer` VALUES ('3', '寰蒋鍏徃', '杞欢', '3', '2016-10-17 09:24:22', '灏忎箶', null, null, '缃戜笂寮鎷', null, null, null, null, '缇庡浗浼︽暒', null, null, '1', null, '绠$悊鍛', '1', null, null, '1', '0', '0', null, '1', '50000.00', '30000.00', null, null, '0', null, null, null, null, '0', null, '灏忎箶');
+INSERT INTO `xinhu_customer` VALUES ('3', '寰蒋鍏徃', '杞欢', '3', '2016-10-17 09:24:22', '灏忎箶', null, null, '缃戜笂寮鎷', null, null, null, null, '缇庡浗浼︽暒', null, null, '1', null, '绠$悊鍛', '1', null, null, '1', '0', '0', null, '1', '50257.66', '30257.66', null, null, '0', null, null, null, null, '0', null, '灏忎箶');
INSERT INTO `xinhu_customer` VALUES ('4', '璋锋瓕鍏徃', '涓汉', '1', '2017-11-11 12:02:10', '绠$悊鍛', null, null, '缃戜笂寮鎷', null, null, null, null, '缇庡浗chrome', null, null, '1', null, '淇″懠瀹㈡湇', '6', null, null, '1', '0', '0', null, '0', '0.00', '0.00', null, null, '0', null, null, null, null, '0', null, '绠$悊鍛');
INSERT INTO `xinhu_customer` VALUES ('5', '鑵捐绉戞妧', null, '0', '2016-10-16 16:00:31', null, null, null, '缃戜笂寮鎷', null, null, null, null, '娣卞湷', null, null, '1', '2016-10-16 16:00:31', '寮犻', '6', null, null, '0', '0', '0', null, '1', '2300.00', '2300.00', null, null, '1', null, null, null, null, '0', null, null);
INSERT INTO `xinhu_customer` VALUES ('15', '淇″懠', '杞欢', '1', '2020-11-16 15:30:46', '绠$悊鍛', '纾愮煶', '鍘﹂棬淇″懠杞欢寮鍙戝伐浣滃', '缃戜笂寮鎷', '0592-123456', '15800000000', 'admin@rockoa.com', null, '绛肩瓬琛楅亾婀栨花鍖楄矾', null, null, '1', '2017-08-20 13:43:23', '绠$悊鍛', '1', null, null, '0', '0', '0', null, '0', '24.00', '0.00', '绂忓缓鐪', '鍘﹂棬甯', '0', '2021-11-05 16:21:32', '92350206MA320FG000', '鎷涜', '6552885927360000', '1', '24.47933726229204,118.0894660949707,13', '绠$悊鍛');
INSERT INTO `xinhu_customer` VALUES ('16', '鐧惧害', '浜掕仈缃', '1', '2020-11-07 10:51:10', '绠$悊鍛', '鏉庡溅瀹', '鐧惧害鍦ㄧ嚎缃戠粶鎶鏈紙鍖椾含锛夋湁闄愬叕鍙', '缃戜笂寮鎷', '010-123456', '15800000001', 'admin@rockoa.com', null, '鍖椾含杞欢鍥櫨搴﹀ぇ鍘', null, null, '1', '2017-08-20 13:43:23', '绠$悊鍛', '1', null, null, '0', '0', '0', null, '1', '0.00', '0.00', '鍖椾含', '鏄屽钩鍖', '0', '2018-07-05 22:45:44', null, null, null, '1', null, '绠$悊鍛');
-INSERT INTO `xinhu_customer` VALUES ('17', '鍘﹂棬甯備汉姘戞斂搴', '鏀垮簻鏈烘瀯', '1', '2021-01-07 21:25:52', '绠$悊鍛', null, null, '缃戜笂寮鎷', '010-123456', '15800000002', '1111@qq.com', null, '绂忓缓鍘﹂棬', null, null, '1', '2017-08-20 13:43:23', '绠$悊鍛', '1', null, null, '0', '0', '0', null, '1', '0.00', '0.00', '绂忓缓', '鍘﹂棬', '0', null, null, null, null, '1', null, '绠$悊鍛');
+INSERT INTO `xinhu_customer` VALUES ('17', '鍘﹂棬甯備汉姘戞斂搴', '鏀垮簻鏈烘瀯', '1', '2021-01-07 21:25:52', '绠$悊鍛', null, null, '缃戜笂寮鎷', '010-123456', '15800000002', '1111@qq.com', null, '绂忓缓鍘﹂棬', null, null, '1', '2017-08-20 13:43:23', '绠$悊鍛', '1', null, null, '0', '0', '0', null, '1', '155.00', '122.00', '绂忓缓', '鍘﹂棬', '0', null, null, null, null, '1', null, '绠$悊鍛');
-- ----------------------------
-- Table structure for `xinhu_custplan`
@@ -799,10 +810,6 @@ CREATE TABLE `xinhu_demo` (
-- ----------------------------
-- Records of xinhu_demo
-- ----------------------------
-INSERT INTO `xinhu_demo` VALUES ('24', null, null, null, '2023-02-21', '1', '2023-02-21 15:30:10', '1', '绠$悊鍛', null, '1', '1', null, null, null, null, '鎴戞槸,澶у閮芥槸', null, null, '0.00', null, null, 'QOM-001', '0', '1', '0', '0', null, '绠$悊鍛', '1', null, null);
-INSERT INTO `xinhu_demo` VALUES ('25', null, null, null, '2023-02-21', '1', '2023-02-21 15:30:10', '1', '绠$悊鍛', null, '0', '1', null, null, null, null, null, null, '0', '0.00', null, null, null, '24', '1', '0', '0', null, null, null, null, null);
-INSERT INTO `xinhu_demo` VALUES ('26', null, null, null, '2023-02-21', '1', '2023-02-21 20:02:42', '1', '绠$悊鍛', null, '1', '1', null, null, null, null, null, null, null, '0.00', null, null, 'QOM-002', '0', '1', '0', '0', null, null, null, null, null);
-INSERT INTO `xinhu_demo` VALUES ('27', null, null, null, '2023-02-21', '1', '2023-02-21 20:02:42', '1', '绠$悊鍛', null, '0', '1', null, null, null, null, null, null, '0', '0.00', null, null, null, '26', '1', '0', '0', null, null, null, null, null);
-- ----------------------------
-- Table structure for `xinhu_dept`
@@ -978,7 +985,7 @@ CREATE TABLE `xinhu_file` (
`filepathout` varchar(500) DEFAULT NULL COMMENT '杩滅▼璺緞',
`explain` varchar(200) DEFAULT NULL COMMENT '璇存槑',
PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='涓婁紶鏂囦欢璁板綍琛';
+) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='涓婁紶鏂囦欢璁板綍琛';
-- ----------------------------
-- Records of xinhu_file
@@ -987,9 +994,6 @@ INSERT INTO `xinhu_file` VALUES ('1', null, '1', '绯荤粺logo.png', null, 'png',
INSERT INTO `xinhu_file` VALUES ('2', null, '1', 'daiban.png', null, 'png', '2000', '2.21 KB', 'images/daiban.png', 'images/daiban.png', '1', '绠$悊鍛', '2016-11-23 22:26:26', '127.0.0.1', 'Chrome', 'word', '2', '23', '0', null, '0', null, '0', null, null, null, null);
INSERT INTO `xinhu_file` VALUES ('3', '', '1', '淇″懠寮鍙戝洟闃熶粙缁.pptx', 'application/msword', 'pptx', '37837', '36.95 KB', 'http://www.rockoa.com/upload/upgfile/xinhuppt.pptx', '', '1', '绠$悊鍛', '2019-03-09 19:20:41', '127.0.0.1', 'Chrome', 'wordxie', '1', '16', '', '', '0', 'wordxie', '0', '', '4a79f31d1eeec342e97c50093eeda803', null, null);
INSERT INTO `xinhu_file` VALUES ('4', '', '1', '淇″懠浣跨敤鏂囨。.docx', 'application/msword', 'docx', '10840', '10.59 KB', 'http://www.rockoa.com/upload/upgfile/xinhuuse.docx', '', '1', '绠$悊鍛', '2019-03-09 20:45:33', '127.0.0.1', 'Chrome', 'wordxie', '2', '6', '', '', '0', 'wordxie', '0', '', '044de19ffa3b1d74fe5db901c587c06f', null, null);
-INSERT INTO `xinhu_file` VALUES ('5', null, '1', '1.png', 'image/png', 'png', '24484', '23.91 KB', 'upload/2023-02/22_18162049.png', 'upload/2023-02/22_18162049_s.png', '1', '绠$悊鍛', '2023-02-22 18:16:20', '127.0.0.1', 'Chrome', null, '0', '0', null, null, '0', 'demo', '1', null, null, null, null);
-INSERT INTO `xinhu_file` VALUES ('6', null, '1', '鍏氬涔.docx', 'application/msword', 'docx', '19381', '18.93 KB', 'upload/2023-02/22_18175545.docx', null, '1', '绠$悊鍛', '2023-02-22 18:17:55', '127.0.0.1', 'Chrome', null, '0', '0', null, null, '0', 'demo', '1', null, null, null, null);
-INSERT INTO `xinhu_file` VALUES ('7', null, '1', '淇″懠浣跨敤鏂囨。.doc', 'application/msword', 'doc', '24064', '23.50 KB', 'upload/2023-02/22_20061618.doc', null, '1', '绠$悊鍛', '2023-02-22 20:06:16', '127.0.0.1', 'Chrome', '', '32', '0', null, null, '0', 'demo', '1', null, null, null, null);
-- ----------------------------
-- Table structure for `xinhu_files`
@@ -1174,7 +1178,7 @@ CREATE TABLE `xinhu_flow_bill` (
KEY `table` (`table`,`mid`) USING BTREE,
KEY `status` (`status`),
KEY `modeid` (`modeid`)
-) ENGINE=MyISAM AUTO_INCREMENT=385 DEFAULT CHARSET=utf8 COMMENT='娴佺▼鍗曟嵁';
+) ENGINE=MyISAM AUTO_INCREMENT=392 DEFAULT CHARSET=utf8 COMMENT='娴佺▼鍗曟嵁';
-- ----------------------------
-- Records of xinhu_flow_bill
@@ -1296,8 +1300,6 @@ INSERT INTO `xinhu_flow_bill` VALUES ('360', 'CO-20220921001', 'planm', '7', '13
INSERT INTO `xinhu_flow_bill` VALUES ('361', 'CP-20220921001', 'planm', '8', '136', '淇℃伅鏀堕泦琛', '绠$悊鍛', '1', '2', '寮鍙戦儴', '2022-09-21 19:28:20', '1', '绠$悊鍛', '1', '0', '1', '2022-09-21', '绠$悊鍛樺鐞嗗悓鎰', '1', '0', null, null, null, '2022-09-21 19:30:44', '2022-09-21 19:27:08', '0', '1', null);
INSERT INTO `xinhu_flow_bill` VALUES ('362', 'CP-20220921002', 'planm', '9', '136', '淇℃伅鏀堕泦琛', '寮犻', '6', '2', '寮鍙戦儴', '2022-11-11 21:37:18', '6', '寮犻', '1', '0', '1', '2022-09-21', '绠$悊鍛樺鐞嗗悓鎰', '1', '0', null, null, null, '2022-11-17 10:45:42', '2022-09-21 19:27:08', '0', '1', null);
INSERT INTO `xinhu_flow_bill` VALUES ('368', 'CO-20221109001', 'planm', '14', '135', '淇℃伅鏀堕泦', '绠$悊鍛', '1', '2', '寮鍙戦儴', '2022-11-11 19:03:46', '1', '绠$悊鍛', '5', '0', '1', '2022-11-09', '纾愮煶澶勭悊鍚屾剰', '1', '0', null, null, null, '2022-11-11 20:37:19', '2022-11-09 22:22:18', '0', '1', null);
-INSERT INTO `xinhu_flow_bill` VALUES ('380', 'YS-20230221-001', 'demo', '24', '72', '婕旂ず娴嬭瘯', '绠$悊鍛', '1', '2', '寮鍙戦儴', '2023-02-21 15:30:10', '1', '绠$悊鍛', '6,4', '0', '1', '2023-02-21', '寮犻澶勭悊鍚屾剰', '1', '0', null, null, null, '2023-02-21 19:38:19', '2023-02-21 14:33:14', '0', '1', '[{\"na\":\"瀹℃牳\",\"cna\":\"寮犻\",\"cnaid\":\"6\",\"shu\":\"1\"},{\"na\":\"涓婄骇瀹℃壒\",\"cna\":\"澶т箶\",\"cnaid\":\"4\",\"shu\":\"1\"}]');
-INSERT INTO `xinhu_flow_bill` VALUES ('381', 'YS-20230221-002', 'demo', '26', '72', '婕旂ず娴嬭瘯', '绠$悊鍛', '1', '2', '寮鍙戦儴', '2023-02-21 20:02:42', '1', '绠$悊鍛', '7,6', '0', '1', '2023-02-21', '璧靛瓙榫欏鐞嗗悓鎰', '1', '0', null, null, null, '2023-02-21 20:21:03', '2023-02-21 19:44:42', '0', '1', '[{\"na\":\"涓婄骇瀹℃壒\",\"cna\":\"寮犻\",\"cnaid\":\"6\",\"shu\":\"1\"},{\"na\":\"瀹℃牳\",\"cna\":\"璧靛瓙榫橽",\"cnaid\":\"7\",\"shu\":\"1\"}]');
-- ----------------------------
-- Table structure for `xinhu_flow_chao`
@@ -1422,7 +1424,7 @@ CREATE TABLE `xinhu_flow_course` (
`csfwid` varchar(200) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `setid` (`setid`)
-) ENGINE=MyISAM AUTO_INCREMENT=150 DEFAULT CHARSET=utf8 COMMENT='娴佺▼姝ラ琛';
+) ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=utf8 COMMENT='娴佺▼姝ラ琛';
-- ----------------------------
-- Records of xinhu_flow_course
@@ -1559,7 +1561,7 @@ CREATE TABLE `xinhu_flow_element` (
PRIMARY KEY (`id`),
KEY `mid` (`mid`),
KEY `fields` (`fields`)
-) ENGINE=MyISAM AUTO_INCREMENT=1704 DEFAULT CHARSET=utf8 COMMENT='妯″潡鍏冪礌';
+) ENGINE=MyISAM AUTO_INCREMENT=1742 DEFAULT CHARSET=utf8 COMMENT='妯″潡鍏冪礌';
-- ----------------------------
-- Records of xinhu_flow_element
@@ -1765,7 +1767,7 @@ INSERT INTO `xinhu_flow_element` VALUES ('202', '1', '鏃ユ湡', 'indate', 'date',
INSERT INTO `xinhu_flow_element` VALUES ('203', '29', '鐢佃瘽', 'tel', 'text', '6', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', '鑱旂郴鏂瑰紡');
INSERT INTO `xinhu_flow_element` VALUES ('204', '29', '鎵嬫満鍙', 'mobile', 'text', '10', null, '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '1', '0', '鑱旂郴鏂瑰紡');
INSERT INTO `xinhu_flow_element` VALUES ('205', '29', '閭', 'email', 'text', '11', null, '0', null, '1', '1', 'readonly', '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '1', '0', '鑱旂郴鏂瑰紡');
-INSERT INTO `xinhu_flow_element` VALUES ('206', '29', '鐢熸棩绫诲瀷', 'birtype', 'select', '12', '0', '1', '0|闃冲巻', '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', '涓汉淇℃伅');
+INSERT INTO `xinhu_flow_element` VALUES ('206', '29', '鎬у埆', 'sex', 'select', '12', null, '1', '鐢,濂', '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', '涓汉淇℃伅');
INSERT INTO `xinhu_flow_element` VALUES ('207', '29', '鐢熸棩', 'birthday', 'date', '13', null, '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, '閫夋嫨韬唤璇佷笂鏃ユ湡', '0', '1', '0', '涓汉淇℃伅');
INSERT INTO `xinhu_flow_element` VALUES ('208', '29', '瀛﹀巻', 'xueli', 'text', '14', null, '1', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', '涓汉淇℃伅');
INSERT INTO `xinhu_flow_element` VALUES ('209', '29', '姘戞棌', 'minzu', 'text', '15', null, '1', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', '涓汉淇℃伅');
@@ -1837,16 +1839,16 @@ INSERT INTO `xinhu_flow_element` VALUES ('274', '35', '鍚堝悓鍐呭', 'content',
INSERT INTO `xinhu_flow_element` VALUES ('275', '35', '璇存槑', 'explain', 'textarea', '13', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('276', '35', '鍚堝悓缂栧彿', 'num', 'num', '0', null, '1', 'HT-', '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('277', '35', '鍚堝悓绫诲瀷', 'type', 'select', '11', '0', '1', '0|鏀舵鍚堝悓,1|浠樻鍚堝悓', '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('278', '36', '鍚堝悓', 'htid', 'select', '1', null, '0', 'hetongdata', '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('278', '36', '鍚堝悓/閿鍞崟', 'htid', 'select', '1', null, '1', 'hetongdata', '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('279', '36', '鍚堝悓/閿鍞崟', 'htnum', 'hidden', '2', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('280', '36', '瀹㈡埛鍚嶇О', 'custname', 'selectdatafalse', '4', null, '1', 'selectcust,custid', '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('281', '36', '绫诲瀷', 'type', 'hidden', '6', null, '0', '0|鏀舵鍗,1|浠樻鍗', '0', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('282', '36', '閲戦', 'money', 'number', '7', '0', '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('283', '36', '璇存槑', 'explain', 'textarea', '10', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('282', '36', '閲戦', 'money', 'number', '7', '0', '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '2', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('283', '36', '璇存槑', 'explain', 'textarea', '11', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('284', '35', '寰呮敹/浠橀噾棰', 'moneys', 'text', '12', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('285', '36', '瀹㈡埛鍚嶇О', 'custid', 'hidden', '5', null, '1', null, '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('286', '36', '鏄惁鏀舵', 'ispay', 'select', '8', '0', '1', '0|鍚,1|鏄', '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('287', '36', '鏀舵鏃堕棿', 'paydt', 'datetime', '9', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('287', '36', '鏀舵鏃堕棿', 'paydt', 'datetime', '10', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('288', '7', '鑱旂郴浜', 'linkname', 'text', '20', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('289', '36', '鎵灞炴棩鏈', 'dt', 'date', '3', '{date}', '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('290', '38', '瑕佽皟鍔ㄤ汉', 'tranname', 'changeuser', '0', null, '1', 'tranuid', '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
@@ -1977,14 +1979,14 @@ INSERT INTO `xinhu_flow_element` VALUES ('421', '29', '鐓х墖', 'zhaopian', 'upl
INSERT INTO `xinhu_flow_element` VALUES ('422', '29', '韬唤璇佸彿', 'idnum', 'text', '5', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', '涓汉淇℃伅');
INSERT INTO `xinhu_flow_element` VALUES ('423', '29', '澶囩敤鑱旂郴浜', 'spareman', 'text', '19', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', '鑱旂郴鏂瑰紡');
INSERT INTO `xinhu_flow_element` VALUES ('424', '29', '澶囩敤鑱旂郴浜虹數璇', 'sparetel', 'text', '20', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', '鑱旂郴鏂瑰紡');
-INSERT INTO `xinhu_flow_element` VALUES ('425', '29', '寮濮嬫棩鏈', 'startdt', 'date', '0', null, '1', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('426', '29', '鎴鏃ユ湡', 'enddt', 'date', '1', null, '1', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('427', '29', '鑱屼綅', 'rank', 'text', '2', null, '1', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('428', '29', '鍗曚綅鍚嶇О', 'unitname', 'text', '3', null, '1', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('429', '29', '寮濮嬫棩鏈', 'startdt', 'date', '0', null, '1', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('430', '29', '鎴鏃ユ湡', 'enddt', 'date', '1', null, '1', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('431', '29', '涓撲笟', 'rank', 'text', '2', null, '1', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('432', '29', '瀛︽牎鍚嶇О', 'unitname', 'text', '3', null, '1', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('425', '29', '寮濮嬫棩鏈', 'startdt', 'date', '0', null, '0', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('426', '29', '鎴鏃ユ湡', 'enddt', 'date', '1', null, '0', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('427', '29', '鑱屼綅', 'rank', 'text', '2', null, '0', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('428', '29', '鍗曚綅鍚嶇О', 'unitname', 'text', '3', null, '0', null, '1', '1', null, '1', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('429', '29', '寮濮嬫棩鏈', 'startdt', 'date', '0', null, '0', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('430', '29', '鎴鏃ユ湡', 'enddt', 'date', '1', null, '0', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('431', '29', '涓撲笟', 'rank', 'text', '2', null, '0', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('432', '29', '瀛︽牎鍚嶇О', 'unitname', 'text', '3', null, '0', null, '1', '1', null, '2', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '0', '1', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('433', '1', '灏侀潰鍥剧墖', 'fengmian', 'uploadimg', '1', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '1', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('434', '19', '姝f枃鏂囦欢', 'filecontid', 'uploadfile', '10', null, '0', 'doc,docx,pdf,jpg,png,xls,xlsx,ppt,pptx', '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('435', '20', '鍏枃鏂囦欢', 'filecontid', 'uploadfile', '9', null, '0', 'doc,docx,pdf', '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
@@ -2049,7 +2051,7 @@ INSERT INTO `xinhu_flow_element` VALUES ('514', '58', '鐧昏鏃堕棿', 'optdt', '
INSERT INTO `xinhu_flow_element` VALUES ('517', '35', '鐘舵', 'statetext', 'text', '14', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('518', '35', '鍒涘缓浜', 'createname', 'text', '15', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('519', '35', '鎷ユ湁鑰', 'optname', 'text', '4', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('520', '36', '鍒涘缓浜', 'createname', 'text', '11', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('520', '36', '鍒涘缓浜', 'createname', 'text', '12', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('521', '36', '鎵灞炰汉', 'optname', 'text', '0', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('522', '59', '缁翠慨杞﹁締', 'carid', 'select', '0', '0', '1', 'getcardata', '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('523', '59', '缁翠慨鍘熷洜', 'reason', 'textarea', '1', null, '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
@@ -2107,7 +2109,7 @@ INSERT INTO `xinhu_flow_element` VALUES ('578', '63', '鎺掑簭鍙', 'sort', 'numb
INSERT INTO `xinhu_flow_element` VALUES ('579', '63', '瀵瑰簲鑻辨枃鍚', 'nameen', 'text', '4', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('580', '63', 'ID', 'id', 'text', '12', null, '0', null, '0', '0', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('581', '31', '绛剧讲鍗曚綅', 'companyid', 'select', '4', null, '1', 'companydata', '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('582', '31', '閮ㄩ棬', 'deptname', 'text', '1', null, '0', null, '0', '0', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('582', '31', '閮ㄩ棬', 'deptname', 'text', '1', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('585', '10', '寰俊鍙', 'weixinid', 'text', '19', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, '鎵嬫満鍙蜂笉鑳戒綔涓哄井淇″彿', '1', '0', '0', '鑱旂郴淇℃伅');
INSERT INTO `xinhu_flow_element` VALUES ('583', '10', '鐢佃瘽', 'tel', 'text', '17', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '1', '0', '鑱旂郴淇℃伅');
INSERT INTO `xinhu_flow_element` VALUES ('584', '10', '閭', 'email', 'email', '18', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '1', '0', null, null, '1', '1', '0', '鑱旂郴淇℃伅');
@@ -2480,7 +2482,7 @@ INSERT INTO `xinhu_flow_element` VALUES ('980', '2', '涓绘寔浜', 'zcren', 'chan
INSERT INTO `xinhu_flow_element` VALUES ('981', '72', '缂栧彿', 'num', 'num', '2', null, '1', 'ABCYmd', '1', '1', 'readonly', '0', '0', null, null, '50', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('982', '69', '闇鏌ラ槄浜', 'recename', 'text', '9', null, '0', null, '0', '0', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('983', '69', '闇鏌ラ槄(鎬/鏈)浜', 'chatotal', 'text', '10', null, '0', null, '0', '0', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('984', '1', 'APP棣栭〉鏄剧ず', 'appxs', 'checkbox', '15', '0', '0', null, '1', '0', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('984', '1', 'APP棣栨樉', 'appxs', 'checkbox', '15', '0', '0', null, '1', '0', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('985', '88', 'APP棣栭〉鏄剧ず', 'appxs', 'checkbox', '17', '0', '0', null, '1', '0', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1032', '35', '鍚堝悓鍒嗙被', 'fenlei', 'rockcombo', '1', null, '0', 'crmhtfenlei', '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1033', '98', '璺熻繘瀹㈡埛', 'custname', 'selectdatafalse', '0', null, '1', 'getmycust,custid', '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
@@ -2583,11 +2585,11 @@ INSERT INTO `xinhu_flow_element` VALUES ('1310', '122', '閲戦', 'money', 'numb
INSERT INTO `xinhu_flow_element` VALUES ('1311', '122', '鏈嶅姟浜哄憳', 'usname', 'changeusercheck', '1', '{admin}|{uid}', '1', 'usid', '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1312', '72', '鐢宠绛惧悕', 'qianming', 'graph', '17', null, '0', null, '1', '1', null, '0', '0', null, null, '200', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1426', '73', '鍟嗗搧鏁', 'spshu', 'number', '7', '0', '0', null, '0', '1', null, '0', '0', null, null, '12', null, '1', '1', '0', '0', '1', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('1453', '57', '鍚堝悓', 'htid', 'select', '1', null, '0', 'hetongdata', '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('1454', '57', '鍚堝悓', 'htnum', 'hidden', '2', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('1453', '57', '鍚堝悓/閲囪喘鍗', 'htid', 'select', '1', null, '1', 'hetongdata', '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('1454', '57', '鍚堝悓/閲囪喘鍗', 'htnum', 'hidden', '2', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1455', '57', '瀹㈡埛鍚嶇О', 'custname', 'selectdatafalse', '4', null, '1', 'selectcust,custid', '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1456', '57', '绫诲瀷', 'type', 'select', '6', null, '0', '0|鏀舵鍗,1|浠樻鍗', '0', '1', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-INSERT INTO `xinhu_flow_element` VALUES ('1457', '57', '閲戦', 'money', 'number', '7', '0', '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('1457', '57', '閲戦', 'money', 'number', '7', '0', '1', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '2', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1458', '57', '璇存槑', 'explain', 'textarea', '10', null, '0', null, '1', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1459', '57', '瀹㈡埛鍚嶇О', 'custid', 'hidden', '5', null, '1', null, '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1460', '57', '鏄惁浠樻', 'ispay', 'select', '8', '0', '1', '0|鍚,1|鏄', '1', '1', null, '0', '0', null, null, '0', null, '1', '1', '0', '0', '0', null, null, '0', '0', '0', null);
@@ -2645,6 +2647,8 @@ INSERT INTO `xinhu_flow_element` VALUES ('1572', '135', '鎻愮ず', 'temp_beizhu',
INSERT INTO `xinhu_flow_element` VALUES ('1703', '142', '鎿嶄綔浜', 'optname', 'text', '11', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '1', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1701', '142', '鍦板潃', 'address', 'ditumap', '6', null, '0', 'addresslatlng', '1', '1', 'maxhang', '0', '0', null, null, '0', null, '1', '0', '1', '0', '0', null, null, '0', '0', '0', null);
INSERT INTO `xinhu_flow_element` VALUES ('1702', '142', '鍦板潃缁忕含搴', 'addresslatlng', 'hidden', '7', null, '0', null, '1', '0', null, '0', '0', null, null, '0', null, '0', '0', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('1740', '36', '璁拌处鍗', 'jzid', 'text', '13', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
+INSERT INTO `xinhu_flow_element` VALUES ('1741', '57', '璁拌处鍗', 'jzid', 'text', '12', null, '0', null, '0', '1', null, '0', '0', null, null, '0', null, '1', '0', '0', '0', '0', null, null, '0', '0', '0', null);
-- ----------------------------
-- Table structure for `xinhu_flow_extent`
@@ -2663,7 +2667,7 @@ CREATE TABLE `xinhu_flow_extent` (
`fieldstr` varchar(500) DEFAULT NULL COMMENT '鐩稿叧瀛楁',
PRIMARY KEY (`id`),
KEY `modeid` (`modeid`)
-) ENGINE=MyISAM AUTO_INCREMENT=278 DEFAULT CHARSET=utf8 COMMENT='妯″潡鏉冮檺';
+) ENGINE=MyISAM AUTO_INCREMENT=290 DEFAULT CHARSET=utf8 COMMENT='妯″潡鏉冮檺';
-- ----------------------------
-- Records of xinhu_flow_extent
@@ -2883,6 +2887,9 @@ INSERT INTO `xinhu_flow_extent` VALUES ('271', '鍏ㄤ綋浜哄憳', 'all', '133', '1'
INSERT INTO `xinhu_flow_extent` VALUES ('273', '鍏ㄤ綋浜哄憳', 'all', '142', '3', 'YHVpZGA9e3VpZH0:', null, '1', '0', null);
INSERT INTO `xinhu_flow_extent` VALUES ('274', '鍏ㄤ綋浜哄憳', 'all', '142', '2', 'YHVpZGA9e3VpZH0:', null, '1', '0', null);
INSERT INTO `xinhu_flow_extent` VALUES ('275', '鍏ㄤ綋浜哄憳', 'all', '35', '3', 'dWlkPXt1aWR9', null, '1', '0', null);
+INSERT INTO `xinhu_flow_extent` VALUES ('287', '鍏ㄤ綋浜哄憳', 'all', '57', '2', 'dWlkPXt1aWR9IGFuZCBpc3BheT0w', null, '1', '0', null);
+INSERT INTO `xinhu_flow_extent` VALUES ('288', '鍏ㄤ綋浜哄憳', 'all', '57', '3', 'dWlkPXt1aWR9IGFuZCBpc3BheT0w', null, '1', '0', null);
+INSERT INTO `xinhu_flow_extent` VALUES ('289', '鍏ㄤ綋浜哄憳', 'all', '57', '1', null, null, '1', '0', null);
-- ----------------------------
-- Table structure for `xinhu_flow_log`
@@ -2910,7 +2917,7 @@ CREATE TABLE `xinhu_flow_log` (
`iszb` tinyint(1) DEFAULT '0' COMMENT '鏄惁杞姙璁板綍',
PRIMARY KEY (`id`),
KEY `table` (`table`,`mid`)
-) ENGINE=MyISAM AUTO_INCREMENT=4626 DEFAULT CHARSET=utf8 COMMENT='鍗曟嵁鎿嶄綔璁板綍';
+) ENGINE=MyISAM AUTO_INCREMENT=4769 DEFAULT CHARSET=utf8 COMMENT='鍗曟嵁鎿嶄綔璁板綍';
-- ----------------------------
-- Records of xinhu_flow_log
@@ -3388,18 +3395,22 @@ INSERT INTO `xinhu_flow_log` VALUES ('4503', 'project', '1', '0', null, '鏇存柊
INSERT INTO `xinhu_flow_log` VALUES ('4558', 'goodm', '3', '2', '涓嶅悓鎰', '琛屾斂瀹℃壒', '20', '2023-01-10 19:26:07', '鍢垮樋', 'unknow', 'Chrome', '纾愮煶', '5', '28', 'red', '1', '2', null, '0');
INSERT INTO `xinhu_flow_log` VALUES ('4560', 'goodm', '3', '1', '鍚屾剰', '琛屾斂瀹℃壒', '20', '2023-01-10 19:26:50', null, 'unknow', 'Chrome', '纾愮煶', '5', '28', 'green', '1', '2', null, '0');
INSERT INTO `xinhu_flow_log` VALUES ('4579', 'customer', '1', '1', null, '璇勮', '0', '2023-01-13 17:51:05', '鍢垮樋鍢', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '7', null, '1', '0', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4592', 'demo', '26', '1', null, '鎻愪氦', '0', '2023-02-21 19:44:42', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '72', null, '1', '0', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4591', 'demo', '24', '1', '鍚屾剰', '瀹℃牳', '889268', '2023-02-21 19:38:19', null, 'unknow', 'Chrome', '寮犻', '6', '72', 'green', '1', '1', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4588', 'demo', '24', '1', null, '鎻愪氦', '0', '2023-02-21 14:33:14', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '72', null, '1', '0', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4594', 'demo', '26', '1', '鍚屾剰', '涓婄骇瀹℃壒', '889269', '2023-02-21 19:54:57', null, 'unknow', 'Chrome', '寮犻', '6', '72', 'green', '0', '1', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4595', 'demo', '26', '2', '閫鍥', '瀹℃牳', '889270', '2023-02-21 19:57:09', '鍟,閫鍥炲埌[涓婄骇瀹℃壒(寮犻)]', 'unknow', 'Chrome', '璧靛瓙榫', '7', '72', '#17B2B7', '0', '2', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4596', 'demo', '26', '1', '鍚屾剰', '涓婄骇瀹℃壒', '889269', '2023-02-21 19:58:18', null, 'unknow', 'Chrome', '寮犻', '6', '72', 'green', '0', '1', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4597', 'demo', '26', '2', '涓嶅悓鎰', '瀹℃牳', '889270', '2023-02-21 19:59:07', '鍝堝搱鍝', 'unknow', 'Chrome', '璧靛瓙榫', '7', '72', 'red', '0', '2', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4599', 'demo', '26', '1', '鍚屾剰', '涓婄骇瀹℃壒', '889269', '2023-02-21 20:07:50', null, 'unknow', 'Chrome', '寮犻', '6', '72', 'green', '1', '1', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4600', 'demo', '26', '1', '鍚屾剰', '涓婄骇瀹℃壒', '8889269', '2023-02-21 20:20:52', null, 'unknow', 'Chrome', '寮犻', '6', '72', 'green', '1', '1', null, '0');
-INSERT INTO `xinhu_flow_log` VALUES ('4601', 'demo', '26', '1', '鍚屾剰', '瀹℃牳', '8889270', '2023-02-21 20:21:03', null, 'unknow', 'Chrome', '璧靛瓙榫', '7', '72', 'green', '1', '2', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4682', 'custfina', '14', '1', null, '鎻愪氦', '0', '2023-04-12 18:26:59', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', null, '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4683', 'custfina', '16', '1', null, '鎻愪氦', '0', '2023-04-12 19:01:39', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', null, '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4750', 'custfina', '63', '0', null, '鍒嗘媶涓鍗(杈撳叆閲戦)', '0', '2023-04-13 18:13:37', '33', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'chocolate', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4756', 'custfina', '64', '0', null, '鍒嗘媶涓鍗(杈撳叆閲戦)', '0', '2023-04-15 10:45:16', '灏卞ソ涔呭ソ涔', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'chocolate', '1', '0', null, '0');
INSERT INTO `xinhu_flow_log` VALUES ('4611', 'fininfom', '5', '2', '涓嶅悓鎰', '璐㈠姟瀹℃牳', '9', '2023-02-23 16:58:13', 'aaa', 'unknow', 'Chrome', '璨傝潐', '2', '11', 'red', '1', '3', null, '0');
INSERT INTO `xinhu_flow_log` VALUES ('4617', 'fininfom', '5', '2', '涓嶅悓鎰', '璐㈠姟瀹℃牳', '9', '2023-03-14 11:27:29', '鍛靛懙鍛', 'unknow', 'Chrome', '璨傝潐', '2', '11', 'red', '1', '3', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4757', 'custfina', '14', '0', null, '鏍囪鏃犻渶鐢熸垚璁拌处鍗', '0', '2023-04-15 12:34:23', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'brown', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4758', 'custfina', '14', '0', null, '鏍囪闇鐢熸垚璁拌处鍗', '0', '2023-04-15 12:38:02', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'brown', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4759', 'custfina', '14', '0', null, '鏍囪鏃犻渶鐢熸垚璁拌处鍗', '0', '2023-04-15 12:38:08', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'brown', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4760', 'custfina', '13', '0', null, '鏍囪鏃犻渶鐢熸垚璁拌处鍗', '0', '2023-04-15 12:43:12', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '57', 'brown', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4761', 'custfina', '13', '0', null, '鏍囪闇鐢熸垚璁拌处鍗', '0', '2023-04-15 12:43:21', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '57', 'brown', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4767', 'custfina', '63', '0', null, '鍒嗘媶涓鍗(杈撳叆閲戦)', '0', '2023-04-20 21:16:56', '3333', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'chocolate', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4744', 'custfina', '16', '0', null, '鍒嗘媶涓鍗(杈撳叆閲戦)', '0', '2023-04-12 21:48:49', '22', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'chocolate', '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4755', 'customer', '1', '1', null, '鍏变韩缁', '0', '2023-04-14 18:33:22', '鍏变韩缁:淇″懠瀹㈡湇', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '7', null, '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4709', 'custfina', '23', '1', null, '鎻愪氦', '0', '2023-04-12 20:37:01', null, '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', null, '1', '0', null, '0');
+INSERT INTO `xinhu_flow_log` VALUES ('4711', 'custfina', '24', '0', '宸叉敹娆', '鏍囧凡鏀舵', '0', '2023-04-12 20:37:35', '鏄', '127.0.0.1', 'Chrome', '绠$悊鍛', '1', '36', 'green', '1', '0', null, '0');
-- ----------------------------
-- Table structure for `xinhu_flow_menu`
@@ -3427,7 +3438,7 @@ CREATE TABLE `xinhu_flow_menu` (
`iszs` tinyint(1) DEFAULT '0' COMMENT '鏄惁鍦ㄨ鎯呴〉闈㈡樉绀',
PRIMARY KEY (`id`),
KEY `setid` (`setid`)
-) ENGINE=MyISAM AUTO_INCREMENT=98 DEFAULT CHARSET=utf8 COMMENT='鍗曟嵁鎿嶄綔鑿滃崟';
+) ENGINE=MyISAM AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='鍗曟嵁鎿嶄綔鑿滃崟';
-- ----------------------------
-- Records of xinhu_flow_menu
@@ -3485,6 +3496,14 @@ INSERT INTO `xinhu_flow_menu` VALUES ('28', '鏍囧凡浠樻', 'pay', '0', '宸蹭粯
INSERT INTO `xinhu_flow_menu` VALUES ('80', '褰掕繕棰嗙敤璧勪骇', 'guihainoup', '0', null, 'blue', '0', null, '134', 'YHN0YXRlYD0xIGFuZCBgc3RhdHVzYD0x', null, '1', '1', '0', '1', null, null, null, '1');
INSERT INTO `xinhu_flow_menu` VALUES ('81', '鐢熸垚鏀堕泦琛', 'noupcreate', '0', null, 'blue', '0', null, '135', 'c3RhdHVzPTEgYW5kIHN0YXRlPTAgYW5kIGZlbmxlaT0w', null, '1', '1', '0', '1', null, null, null, '0');
INSERT INTO `xinhu_flow_menu` VALUES ('82', '澶嶅埗姝よ褰', 'noupfuzhi', '0', null, null, '0', null, '135', 'YHN0YXR1c2A8PjU:', null, '1', '1', '0', '1', null, null, null, '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('101', '鍒嗘媶涓鍗(杈撳叆閲戦)', 'noupfuzhe', '0', null, 'chocolate', '0', null, '36', 'dWlkPXt1aWR9IGFuZCBpc3BheT0w', '璇存槑璇疯緭鍏ラ噾棰', '1', '1', '1', '1', null, null, null, '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('102', '鍒嗘媶涓鍗(杈撳叆閲戦)', 'noupfuzhe', '0', null, 'chocolate', '0', null, '57', 'dWlkPXt1aWR9IGFuZCBpc3BheT0w', '璇存槑璇疯緭鍏ラ噾棰', '1', '1', '1', '1', null, null, null, '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('104', '鐢熸垚璁拌处鏀跺叆鍗', 'noupcreatejz', '0', null, 'blue', '0', null, '36', 'YGlzcGF5YD0xIGFuZCBganppZGA9MA::', null, '1', '0', '0', '7', null, null, 'Y3JlYXRlaml6aGFuZw::', '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('105', '鐢熸垚璁拌处鏀嚭鍗', 'noupcreatejz', '0', null, 'blue', '0', null, '57', 'YGlzcGF5YD0xIGFuZCBganppZGA9MA::', null, '1', '0', '0', '7', null, null, 'Y3JlYXRlaml6aGFuZw::', '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('106', '鏍囪鏃犻渶鐢熸垚璁拌处鍗', 'noupnoxujz', '0', null, 'brown', '0', null, '36', 'YGlzcGF5YD0xIGFuZCBganppZGA9MA::', null, '1', '1', '0', '1', null, null, 'YGp6aWRgPS0x', '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('107', '鏍囪闇鐢熸垚璁拌处鍗', 'noupxnoxujz', '0', null, 'brown', '0', null, '36', 'YGlzcGF5YD0xIGFuZCBganppZGA9LTE:', null, '1', '1', '0', '1', null, null, 'YGp6aWRgPTA:', '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('108', '鏍囪鏃犻渶鐢熸垚璁拌处鍗', 'noupnoxujz', '0', null, 'brown', '0', null, '57', 'YGlzcGF5YD0xIGFuZCBganppZGA9MA::', null, '1', '1', '0', '1', null, null, 'YGp6aWRgPS0x', '0');
+INSERT INTO `xinhu_flow_menu` VALUES ('109', '鏍囪闇鐢熸垚璁拌处鍗', 'noupxnoxujz', '0', null, 'brown', '0', null, '57', 'YGlzcGF5YD0xIGFuZCBganppZGA9LTE:', null, '1', '1', '0', '1', null, null, 'YGp6aWRgPTA:', '0');
-- ----------------------------
-- Table structure for `xinhu_flow_modetpl`
@@ -3594,7 +3613,7 @@ CREATE TABLE `xinhu_flow_set` (
`sortdir` varchar(50) DEFAULT NULL COMMENT '榛樿鎺掑簭',
`isys` tinyint(1) DEFAULT '0' COMMENT '鎻愯棰勫',
PRIMARY KEY (`id`,`num`)
-) ENGINE=MyISAM AUTO_INCREMENT=155 DEFAULT CHARSET=utf8 COMMENT='娴佺▼妯″潡';
+) ENGINE=MyISAM AUTO_INCREMENT=157 DEFAULT CHARSET=utf8 COMMENT='娴佺▼妯″潡';
-- ----------------------------
-- Records of xinhu_flow_set
@@ -3809,7 +3828,7 @@ CREATE TABLE `xinhu_flow_where` (
`syrname` varchar(200) DEFAULT NULL COMMENT '姝ゆ潯浠跺彲閫傜敤瀵硅薄',
PRIMARY KEY (`id`),
KEY `setid` (`setid`)
-) ENGINE=MyISAM AUTO_INCREMENT=421 DEFAULT CHARSET=utf8 COMMENT='鍗曟嵁鏉′欢';
+) ENGINE=MyISAM AUTO_INCREMENT=430 DEFAULT CHARSET=utf8 COMMENT='鍗曟嵁鏉′欢';
-- ----------------------------
-- Records of xinhu_flow_where
@@ -4108,6 +4127,12 @@ INSERT INTO `xinhu_flow_where` VALUES ('378', '136', 'all', 'all', '鎵鏈夋敹闆
INSERT INTO `xinhu_flow_where` VALUES ('379', '136', 'alljz', 'all', '宸叉埅姝', 'YGVuZGR0YDx7bm93fQ::', null, null, '1', null, null, null, null, null, '1', '1', null, null);
INSERT INTO `xinhu_flow_where` VALUES ('390', '142', 'my', null, '鎴戠殑褰曞叆', 'YHVpZGA9e3VpZH0:', null, null, '0', null, null, null, null, null, '1', '1', null, null);
INSERT INTO `xinhu_flow_where` VALUES ('391', '142', 'all', 'all', '鎵鏈変緵搴斿晢', 'MT0x', null, null, '0', null, null, null, null, null, '1', '1', null, null);
+INSERT INTO `xinhu_flow_where` VALUES ('424', '36', 'findai', 'finall', '寰呯敓鎴愯璐﹀崟', 'YGlzcGF5YD0xIGFuZCBganppZGA9MA::', null, null, '0', null, null, null, null, null, '1', '1', null, null);
+INSERT INTO `xinhu_flow_where` VALUES ('425', '36', 'finys', 'finall', '宸茬敓鎴愯璐﹀崟', 'YGlzcGF5YD0xIGFuZCBganppZGA!MA::', null, null, '1', null, null, null, null, null, '1', '1', null, null);
+INSERT INTO `xinhu_flow_where` VALUES ('426', '36', 'finall', 'finall', '鎵鏈夋敹娆惧崟', 'YGlzcGF5YD0x', null, null, '2', null, null, null, null, null, '1', '1', null, null);
+INSERT INTO `xinhu_flow_where` VALUES ('427', '57', 'findai', 'finall', '寰呯敓鎴愯璐﹀崟', 'YGlzcGF5YD0xIGFuZCBganppZGA9MA::', null, null, '0', null, null, null, null, null, '1', '1', null, null);
+INSERT INTO `xinhu_flow_where` VALUES ('428', '57', 'finys', 'finall', '宸茬敓鎴愯璐﹀崟', 'YGlzcGF5YD0xIGFuZCBganppZGA!MA::', null, null, '1', null, null, null, null, null, '1', '1', null, null);
+INSERT INTO `xinhu_flow_where` VALUES ('429', '57', 'finall', 'finall', '鎵鏈変粯娆惧崟', 'YGlzcGF5YD0x', null, null, '2', null, null, null, null, null, '1', '1', null, null);
-- ----------------------------
-- Table structure for `xinhu_godepot`
@@ -5117,13 +5142,13 @@ CREATE TABLE `xinhu_im_history` (
-- ----------------------------
-- Records of xinhu_im_history
-- ----------------------------
-INSERT INTO `xinhu_im_history` VALUES ('1', 'group', '2', '2', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-INSERT INTO `xinhu_im_history` VALUES ('2', 'group', '2', '7', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-INSERT INTO `xinhu_im_history` VALUES ('3', 'group', '2', '6', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-INSERT INTO `xinhu_im_history` VALUES ('4', 'group', '2', '8', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-INSERT INTO `xinhu_im_history` VALUES ('5', 'group', '2', '5', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-INSERT INTO `xinhu_im_history` VALUES ('6', 'group', '2', '1', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-INSERT INTO `xinhu_im_history` VALUES ('7', 'group', '2', '4', '8', '2023-04-05 12:29:26', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('1', 'group', '2', '2', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('2', 'group', '2', '7', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('3', 'group', '2', '6', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('4', 'group', '2', '8', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('5', 'group', '2', '5', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('6', 'group', '2', '1', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
+INSERT INTO `xinhu_im_history` VALUES ('7', 'group', '2', '4', '8', '2023-04-26 15:25:37', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '1', null, null, '0');
-- ----------------------------
-- Table structure for `xinhu_im_menu`
@@ -5374,7 +5399,7 @@ CREATE TABLE `xinhu_im_mess` (
-- ----------------------------
-- Records of xinhu_im_mess
-- ----------------------------
-INSERT INTO `xinhu_im_mess` VALUES ('1', '2023-04-05 12:29:26', '1', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '8', '2', '2,7,6,8,5,1,4', 'group', null, '0', null);
+INSERT INTO `xinhu_im_mess` VALUES ('1', '2023-04-26 15:25:37', '1', '5aSn5a625pyJ5ZWl6Zeu6aKY6L!Z6YeM6K!05ZWK77yB', '8', '2', '2,7,6,8,5,1,4', 'group', null, '0', null);
-- ----------------------------
-- Table structure for `xinhu_im_messzt`
@@ -5454,7 +5479,7 @@ CREATE TABLE `xinhu_infor` (
-- ----------------------------
INSERT INTO `xinhu_infor` VALUES ('1', '娆㈣繋浣跨敤淇″懠宸ヤ綔鍙', '2018-04-26 17:27:10', '閫氱煡鍏憡', '\n 娆㈣繋浣跨敤锛屾湁浠讳綍闂鍙互闅忔椂鑱旂郴鎴戜滑锛屽府浣犺В绛斿摝銆 \n \n\n 淇″懠鏄竴娆惧紑婧愬厤璐圭殑宸ヤ綔鍙拌蒋浠讹紝鍙坊鍔犲簲鐢紝绠$悊锛宲c涓婏紝app閮藉彲浠ヤ娇鐢紝鎴戜滑鐨勪唬鐮佸叏閮ㄥ紑鏀撅紝鍙嚜鐢变娇鐢ㄣ俓n ', null, null, null, '1', '绠$悊鍛', null, null, '淇″懠寮鍙戝洟闃', '2016-08-01', '1', null, '0', '0', '0', '0', null, null, '0', '0', '0'); INSERT INTO `xinhu_infor` VALUES ('2', '鍏充簬鍐欐棩鎶ュ埗搴﹁鏄', '2019-04-13 19:54:43', '瑙勫垯鍒跺害', '\n 1銆佹瘡涓汉宸ヤ綔鏃ュ湪涓嬬彮鍚庡繀椤诲啓宸ヤ綔鏃ユ姤锛屽叏澶╄鍋囧彲涓嶇敤鍐欙紝鍙鏈変笂鐝氨闇瑕佸啓锛屽嵆浣夸綘涓婄彮1鍒嗛挓銆俓n \n\n 2銆佷篃鍙互闅斿ぉ鍐欍俓n \n\n 鏈啓澶勭綒 \n \n\n 1銆佹湭鍐欎竴娆℃墸浜斿潡锛岀疮璁″姞鍊嶃俓n ', null, 'u1,u2,u3,u4,u5,u6,u7,u8,u9', null, '1', '绠$悊鍛', null, null, '浜哄姏琛屾斂閮', '2016-08-01', '1', 'images/kqbanner1.jpg', '0', '0', '0', '0', null, null, '0', '0', '0'); -INSERT INTO `xinhu_infor` VALUES ('6', '淇″懠鏇存柊鍙戝竷V2.5.5鐗堟湰', '2023-04-05 11:18:38', '閫氱煡鍏憡', '\n 鐗堟湰娣诲姞浜嗗彂甯冨涓嬪姛鑳藉晩銆俓n \n\n 1銆佺郴缁熷姛鑳藉畬鍠勩俓n \n\n 2銆佹洿鏂颁簡寰堝锛岃嚜宸辩湅鍗囩骇鏃ュ織銆俓n ', 'http://www.rockoa.com/view_down.html', 'd1', '淇″懠寮鍙戝洟闃', '1', '绠$悊鍛', null, null, '淇″懠寮鍙戝洟闃', '2023-04-05', '1', 'images/logo.png', '0', '0', '0', '1', null, null, '1', '1', '0'); +INSERT INTO `xinhu_infor` VALUES ('6', '淇″懠鏇存柊鍙戝竷V2.5.6鐗堟湰', '2023-04-26 15:17:23', '閫氱煡鍏憡', '\n 鐗堟湰娣诲姞浜嗗彂甯冨涓嬪姛鑳藉晩銆俓n \n\n 1銆佺郴缁熷姛鑳藉畬鍠勩俓n \n\n 2銆佹洿鏂颁簡寰堝锛岃嚜宸辩湅鍗囩骇鏃ュ織銆俓n ', 'http://www.rockoa.com/view_down.html', 'd1', '淇″懠寮鍙戝洟闃', '1', '绠$悊鍛', null, null, '淇″懠寮鍙戝洟闃', '2023-04-26', '1', 'images/logo.png', '0', '0', '0', '1', null, null, '1', '1', '0'); INSERT INTO `xinhu_infor` VALUES ('9', '浣犱滑瑙夊緱杩欎釜绯荤粺濡備綍锛', '2019-06-03 13:17:05', '閫氱煡鍏憡', '寮濮嬫姇绁ㄦ媺銆', null, 'd1', '淇″懠寮鍙戝洟闃', '1', '绠$悊鍛', '2018-08-31 12:42:00', '2017-08-26 12:42:00', '寮鍙戦儴', '2017-08-26', '1', null, '1', '1', '0', '0', '2019-04-15', null, '1', '0', '0'); -- ---------------------------- @@ -6191,7 +6216,7 @@ CREATE TABLE `xinhu_menu` ( `types` tinyint(1) DEFAULT '0', PRIMARY KEY (`id`), KEY `pid` (`pid`,`status`) -) ENGINE=MyISAM AUTO_INCREMENT=453 DEFAULT CHARSET=utf8 COMMENT='绯荤粺鑿滃崟'; +) ENGINE=MyISAM AUTO_INCREMENT=461 DEFAULT CHARSET=utf8 COMMENT='绯荤粺鑿滃崟'; -- ---------------------------- -- Records of xinhu_menu @@ -6380,7 +6405,7 @@ INSERT INTO `xinhu_menu` VALUES ('182', '鎺堟潈鍗曟嵁鏌ョ湅', '40', '8', 'main,f INSERT INTO `xinhu_menu` VALUES ('183', '鍗曟嵁鏌ョ湅', '38', '3', 'main,fwork,search', 'search', null, 'flowsearch', '0', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('184', '鎴戠殑钖祫', '39', '3', 'main,salary,my', 'money', null, null, '0', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('185', '娴佺▼妯″潡缁熻', '7', '12', 'main,flowtotal', 'bar-chart', null, null, '1', '1', null, '0', '0', '0', '0'); -INSERT INTO `xinhu_menu` VALUES ('186', '鎶ラ攢鍊熻繕娆', '313', '2', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); +INSERT INTO `xinhu_menu` VALUES ('186', '鎶ラ攢鍊熻繕娆', '313', '4', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('187', '璐圭敤鎶ラ攢', '186', '0', 'flow,page,finfybx,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('188', '鍑哄樊鎶ラ攢', '186', '3', 'flow,page,finccbx,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('189', '鍊熸鍗', '186', '5', 'flow,page,finjkd,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); @@ -6491,7 +6516,7 @@ INSERT INTO `xinhu_menu` VALUES ('302', '鎵鏈夐攢鍞', '126', '4', 'flow,page,c INSERT INTO `xinhu_menu` VALUES ('303', '娴佺▼鐩戞帶', '40', '9', 'main,fwork,bill,atype=jiankong', 'retweet', null, 'jiankong', '0', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('306', '鎴戠殑鍏枃缁熻', '232', '5', 'flow,page,officiatotal,atype=my', null, null, null, '0', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('313', '璐㈠姟', '0', '8', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); -INSERT INTO `xinhu_menu` VALUES ('315', '鍙戠エ浠樻', '313', '3', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); +INSERT INTO `xinhu_menu` VALUES ('315', '鍙戠エ浠樻', '313', '5', null, null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('317', '璺熻繘璁″垝', '64', '0', 'flow,page,custplan,atype=my', null, null, null, '0', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('318', '鎵鏈夎窡杩涜鍒', '126', '1', 'flow,page,custplan,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); INSERT INTO `xinhu_menu` VALUES ('319', '鐗╁搧褰掕繕', '249', '4', 'flow,page,goodgh,atype=all,pnum=all', null, null, null, '1', '1', null, '0', '0', '0', '0'); @@ -6632,7 +6657,7 @@ CREATE TABLE `xinhu_option` ( PRIMARY KEY (`id`), KEY `num` (`num`), KEY `pid` (`pid`) -) ENGINE=MyISAM AUTO_INCREMENT=865 DEFAULT CHARSET=utf8 COMMENT='绯荤粺閫夐」'; +) ENGINE=MyISAM AUTO_INCREMENT=891 DEFAULT CHARSET=utf8 COMMENT='绯荤粺閫夐」'; -- ---------------------------- -- Records of xinhu_option @@ -6992,11 +7017,11 @@ INSERT INTO `xinhu_option` VALUES ('477', '棣栭〉鏄惁鏄剧ず鍏憡婊氬姩鍥剧墖' INSERT INTO `xinhu_option` VALUES ('478', '棣栭〉鏄惁鏄剧ず鏂伴椈婊氬姩鍥剧墖', '0', '475', 'appsy_xwshow', '鍚', '0', null, '1', null, '0', null, null, '鏄剧ず瀵瑰簲鍊兼敼鎴愨滄槸鈥', '0'); INSERT INTO `xinhu_option` VALUES ('483', '璁拌处鏀跺叆绫诲瀷', '0', '130', 'finjishoutype', null, '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('484', '璁拌处鏀嚭绫诲瀷', '0', '130', 'finjizhitype', null, '0', null, '1', null, '0', null, null, null, '0'); -INSERT INTO `xinhu_option` VALUES ('485', '杞处', '0', '483', null, null, '0', null, '1', null, '0', null, null, null, '0'); -INSERT INTO `xinhu_option` VALUES ('486', '浜у搧鏀跺叆', '0', '483', null, null, '0', null, '1', null, '0', null, null, null, '0'); -INSERT INTO `xinhu_option` VALUES ('487', '杞处', '0', '484', null, null, '0', null, '1', null, '0', null, null, null, '0'); -INSERT INTO `xinhu_option` VALUES ('488', '宸ヨ祫', '0', '484', null, null, '0', null, '1', null, '0', null, null, null, '0'); -INSERT INTO `xinhu_option` VALUES ('489', '鎶ラ攢', '0', '484', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('485', '鍒濆閲戦', '0', '483', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('486', '閿鍞敹鍏', '0', '483', null, null, '0', '9', '1', null, '0', null, null, '1122 搴旀敹璐︽', '0'); +INSERT INTO `xinhu_option` VALUES ('487', '璐拱鏉愭枡', '0', '484', null, null, '0', '38', '1', null, '0', null, null, '2202 搴斾粯璐︽', '0'); +INSERT INTO `xinhu_option` VALUES ('488', '宸ヨ祫绀句繚', '0', '484', null, null, '0', '40', '1', null, '0', null, null, '2211 搴斾粯鑱屽伐钖叕', '0'); +INSERT INTO `xinhu_option` VALUES ('489', '绋庤垂鏀嚭', '0', '484', null, null, '0', '57', '1', null, '0', null, null, '2221006 搴斾氦绋庤垂-搴斾氦鎵寰楃◣', '0'); INSERT INTO `xinhu_option` VALUES ('490', '瀹㈡埛鍚堝悓鍒嗙被', '0', '50', 'crmhtfenlei', null, '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('491', '鏅氬悎鍚', '0', '490', null, null, '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('492', '瀹㈡埛璺熻繘鏂瑰紡', '0', '50', 'custgentype', null, '0', null, '1', null, '0', null, null, null, '0'); @@ -7038,6 +7063,7 @@ INSERT INTO `xinhu_option` VALUES ('591', '绫诲瀷涓', '0', '590', null, null, ' INSERT INTO `xinhu_option` VALUES ('592', '绫诲瀷浜', '0', '590', null, null, '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('594', '浼氳鐭俊妯$増缂栧彿', '0', '62', 'meetsmstpl', null, '0', null, '1', null, '0', null, null, '濡備娇鐢ㄩ樋閲岀煭淇¤繖涓氨瑕佽缃', '0'); INSERT INTO `xinhu_option` VALUES ('595', '浼氳鍙栨秷鐭俊妯$増缂栧彿', '0', '62', 'meetsmstplqx', null, '0', null, '1', null, '0', null, null, '濡備娇鐢ㄩ樋閲岀煭淇¤繖涓氨瑕佽缃', '0'); +INSERT INTO `xinhu_option` VALUES ('890', null, '0', '-102', '565a422403fa778aa771', 'MjAyMy0wNS0wMw::', '0', null, '1', '2023-04-26 15:45:19', '1', null, null, null, '1'); INSERT INTO `xinhu_option` VALUES ('729', '鎶曟爣椤圭洰鐘舵', '0', '574', 'xiangmutbstate', null, '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('732', '澶辨爣', '0', '729', null, '2', '2', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('730', '鎶曟爣涓', '0', '729', null, '0', '0', null, '1', null, '0', null, null, null, '0'); @@ -7136,6 +7162,30 @@ INSERT INTO `xinhu_option` VALUES ('846', '姣忔湀', '0', '844', null, 'm', '0', INSERT INTO `xinhu_option` VALUES ('847', '姣2涓湀', '0', '844', null, 'm2', '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('848', '姣3涓湀', '0', '844', null, 'm3', '0', null, '1', null, '0', null, null, null, '0'); INSERT INTO `xinhu_option` VALUES ('849', '姣忓勾', '0', '844', null, 'y', '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('864', '鍑瘉鎽樿', '0', '130', 'finzhaiyao', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('865', '鎻愮幇', '0', '864', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('866', '鏀粯閾惰鎵嬬画璐', '0', '864', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('867', '鏀跺簲鏀舵椤', '0', '864', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('868', '浠樺簲浠樻椤', '0', '864', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('869', '鎶ラ攢宸梾璐', '0', '864', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('870', '鍑瘉妯℃澘绫诲瀷', '0', '130', 'finmobantype', null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('871', '鏃ュ父鏀嚭', '0', '870', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('872', '閲囪喘', '0', '870', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('873', '閿鍞', '0', '870', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('874', '宸ヨ祫', '0', '870', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('875', '绋庨噾', '0', '870', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('876', '鎶樻棫鍜屾憡閿', '0', '870', null, null, '0', null, '1', null, '0', null, null, null, '0'); +INSERT INTO `xinhu_option` VALUES ('877', '鏈嶅姟鏀跺叆', '0', '483', null, null, '0', '9', '1', null, '0', null, null, '1122 搴旀敹璐︽', '0'); +INSERT INTO `xinhu_option` VALUES ('878', '鍒╂伅鏀嚭', '0', '484', null, null, '0', '145', '1', null, '0', null, null, '5603001 璐㈠姟璐圭敤-鍒╂伅璐圭敤', '0'); +INSERT INTO `xinhu_option` VALUES ('879', '绉熼噾鐗╀笟', '0', '484', null, null, '0', '135', '1', null, '0', null, null, '5602004 绠$悊璐圭敤-鍔炲叕璐', '0'); +INSERT INTO `xinhu_option` VALUES ('880', '姘寸數璐', '0', '484', null, null, '0', '135', '1', null, '0', null, null, '5602004 绠$悊璐圭敤-鍔炲叕璐', '0'); +INSERT INTO `xinhu_option` VALUES ('881', '宸梾璐', '0', '484', null, null, '0', '137', '1', null, '0', null, null, '5602006 绠$悊璐圭敤-宸梾璐', '0'); +INSERT INTO `xinhu_option` VALUES ('882', '鎷涘緟璐', '0', '484', null, null, '0', '133', '1', null, '0', null, null, '5602002 绠$悊璐圭敤-涓氬姟鎷涘緟璐', '0'); +INSERT INTO `xinhu_option` VALUES ('883', '杩愯緭璐', '0', '484', null, null, '0', '125', '1', null, '0', null, null, '5601011 閿鍞垂鐢-杩愯緭璐', '0'); +INSERT INTO `xinhu_option` VALUES ('884', '鍊熸', '0', '483', null, null, '0', '36', '1', null, '0', null, null, '2001 鐭湡鍊熸', '0'); +INSERT INTO `xinhu_option` VALUES ('885', '鍒╂伅鏀跺叆', '0', '483', null, null, '0', '145', '1', null, '0', null, null, '5603001 璐㈠姟璐圭敤-鍒╂伅璐圭敤', '0'); +INSERT INTO `xinhu_option` VALUES ('886', '鍏朵粬鏀跺叆', '0', '483', null, null, '0', '13', '1', '2023-04-10 18:31:22', '1', null, null, '1221 鍏朵粬搴旀敹娆', '1'); +INSERT INTO `xinhu_option` VALUES ('887', '鍏朵粬鏀嚭', '0', '484', null, null, '0', '80', '1', '2023-04-10 18:32:25', '1', null, null, '2241 鍏朵粬搴斾粯娆', '1'); -- ---------------------------- -- Table structure for `xinhu_planm` @@ -7647,7 +7697,7 @@ CREATE TABLE `xinhu_task` ( INSERT INTO `xinhu_task` VALUES ('1', '娴佺▼浠庢柊鍖归厤', '绯荤粺', 'flow,pipei', 'd,d', '00:10:00,12:10:00', '姣忓ぉ0,12鐐', '1', '0', null, null, '0', null, null, null, null, null); INSERT INTO `xinhu_task` VALUES ('2', '鏁版嵁澶囦唤', '绯荤粺', 'sys,beifen', 'd', '00:20:00', '姣忓ぉ鍑屾櫒00:20', '1', '0', null, null, '0', null, null, null, null, null); INSERT INTO `xinhu_task` VALUES ('3', '绯荤粺鍗囩骇鎻愰啋', '绯荤粺', 'sys,upgtx', 'd', '00:25:00', '姣忓ぉ鍑屾櫒00:25', '0', '0', null, null, '0', null, null, null, '1,8', '绠$悊鍛,淇″懠瀹㈡湇'); -INSERT INTO `xinhu_task` VALUES ('4', '5鍒嗛挓杩愯1娆', '绯荤粺', 'minute5,run', 'i5', '00', '姣5鍒嗛挓杩愯涓娆', '1', '1', '2023-04-05 12:30:00', null, '0', null, 'success', '杩欎釜鏄繀椤荤殑锛屼笉鍙垹闄ゅ仠鐢', null, null); +INSERT INTO `xinhu_task` VALUES ('4', '5鍒嗛挓杩愯1娆', '绯荤粺', 'minute5,run', 'i5', '00', '姣5鍒嗛挓杩愯涓娆', '1', '0', null, null, '0', null, null, '杩欎釜鏄繀椤荤殑锛屼笉鍙垹闄ゅ仠鐢', null, null); INSERT INTO `xinhu_task` VALUES ('5', '鑰冨嫟淇℃伅鎻愰啋', '鑰冨嫟', 'kaoqin,todo', 'd', '09:25:00', '姣忓ぉ9鐐', '1', '0', null, null, '21', null, null, '鍦ㄦā鍧椼愯冨嫟淇℃伅銆戜笅璁剧疆鎻愰啋鍒板摢浜涘钩鍙般', null, null); INSERT INTO `xinhu_task` VALUES ('6', '鐢ㄦ埛鏁版嵁鏇存柊', '鐢ㄦ埛', 'sys,dataup', 'd', '00:10:00', '姣忓ぉ', '1', '0', null, null, '1', null, null, null, null, null); INSERT INTO `xinhu_task` VALUES ('7', '鑰冨嫟鍒嗘瀽', '鑰冨嫟', 'kaoqin,anay', 'd', '02:15:00', '姣忓ぉ2鐐', '1', '0', null, null, '22', null, null, '鍒嗘瀽鍏ㄤ綋浜哄憳鏄ㄥぉ鐨勮冨嫟', null, null); @@ -7764,8 +7814,8 @@ CREATE TABLE `xinhu_userinfo` ( -- ---------------------------- -- Records of xinhu_userinfo -- ---------------------------- -INSERT INTO `xinhu_userinfo` VALUES ('1', '绠$悊鍛', 'A001', '寮鍙戦儴', null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '椤圭洰涓荤', null, '*', null, '1', '鐢', '0592-1234569', '15800000023', '2016-06-01', 'admin@rockoa.com', null, '1', '0', '1987-02-15', '鍗氬+鍚', '0', '姹', '鏈', '绂忓缓', '鍘﹂棬', '鍘﹂棬', '2016-10-01', '2016-10-02', '鍘﹂棬閾惰', '6225****', 'images/face.jpg', '350202199901013526', '纾愮煶', '10086', '1', '1', null, null); -INSERT INTO `xinhu_userinfo` VALUES ('2', '璨傝潐', null, '璐㈠姟閮', null, '淇″懠寮鍙戝洟闃/璐㈠姟閮', '璐㈠姟鎬荤洃', null, null, null, '1', '濂', '0592-123456', '15800000007', '2016-08-09', null, null, '1', '0', null, null, '0', null, null, null, null, null, null, null, null, null, 'images/diaochan.jpg', null, null, null, '1', '2', null, null); +INSERT INTO `xinhu_userinfo` VALUES ('1', '绠$悊鍛', 'A001', '寮鍙戦儴', null, '淇″懠寮鍙戝洟闃/寮鍙戦儴', '椤圭洰涓荤', null, '*', null, '1', '鐢', '0592-1234569', '15800000023', '2016-06-01', 'admin@rockoa.com', null, '1', '0', '1992-02-15', '鍗氬+鍚', '0', '姹', '鏈', '绂忓缓', '绂忓缓鍘﹂棬', '鍘﹂棬', '2016-10-01', '2016-10-02', '鍘﹂棬閾惰', '6225****', 'images/face.jpg', '350202199901013526', '纾愮煶', '10086', '1', '1', null, null); +INSERT INTO `xinhu_userinfo` VALUES ('2', '璨傝潐', null, '璐㈠姟閮', null, '淇″懠寮鍙戝洟闃/璐㈠姟閮', '璐㈠姟鎬荤洃', null, null, null, '1', '濂', '0592-123456', '15800000007', '2016-08-09', null, null, '1', '0', '1990-04-01', '鏈', '0', '姹', '鏈', '绂忓缓', '涓嶇煡閬', '涓嶇煡閬', null, null, null, null, 'images/daiban.png', null, null, null, '1', '2', null, null); INSERT INTO `xinhu_userinfo` VALUES ('3', '灏忎箶', null, '璐㈠姟閮', null, '淇″懠寮鍙戝洟闃/璐㈠姟閮', '鍑虹撼', null, null, null, '1', '濂', null, '15800000001', '2017-05-02', null, null, '1', '0', null, null, '0', null, null, null, null, null, null, null, null, null, null, null, null, null, '1', '2', null, null); INSERT INTO `xinhu_userinfo` VALUES ('4', '澶т箶', null, '琛屾斂浜轰簨閮', '璐㈠姟閮', '淇″懠寮鍙戝洟闃/琛屾斂浜轰簨閮', '浜轰簨涓荤', '浼氳', null, null, '1', '濂', null, '15800000002', '2017-07-01', null, null, '1', '0', '1990-06-11', '鏈', '0', '姹夋棌', '鏈', '鍘﹂棬', '鍘﹂棬', '鍘﹂棬', '2018-06-01', '2018-06-01', null, null, null, null, null, null, '1', '2', null, null); INSERT INTO `xinhu_userinfo` VALUES ('5', '纾愮煶', null, '绠$悊灞', null, '淇″懠寮鍙戝洟闃/绠$悊灞', '钁d簨闀', null, null, null, '1', '鐢', null, '15800000003', '2015-11-01', null, null, '0', '0', null, null, '0', null, null, null, null, null, null, null, null, null, null, null, null, null, '0', '1', null, '1,2,3,4'); @@ -7789,7 +7839,7 @@ CREATE TABLE `xinhu_userinfos` ( `comid` smallint(6) DEFAULT '0' COMMENT '瀵瑰簲鍗曚綅id', PRIMARY KEY (`id`), KEY `mid` (`mid`) -) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='浜哄憳妗f瀛愯〃'; +) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='浜哄憳妗f瀛愯〃'; -- ---------------------------- -- Records of xinhu_userinfos @@ -7802,6 +7852,8 @@ INSERT INTO `xinhu_userinfos` VALUES ('5', '1', '2', '2017-01-11', '2017-01-31', INSERT INTO `xinhu_userinfos` VALUES ('6', '1', '2', '2017-05-01', '2017-05-31', '鏋舵瀯甯', '寰蒋', '0', '1'); INSERT INTO `xinhu_userinfos` VALUES ('7', '4', '0', '2019-06-01', '2019-06-05', '鏃', '鏃', '0', '2'); INSERT INTO `xinhu_userinfos` VALUES ('8', '4', '0', '2019-06-01', '2019-06-26', '鎴', '鎴', '1', '2'); +INSERT INTO `xinhu_userinfos` VALUES ('12', '2', '0', null, null, null, null, '1', '2'); +INSERT INTO `xinhu_userinfos` VALUES ('11', '2', '0', null, null, null, null, '0', '2'); -- ---------------------------- -- Table structure for `xinhu_userract` diff --git a/webmain/login/tpl_login.html b/webmain/login/tpl_login.html index d4109c1..fdfb094 100644 --- a/webmain/login/tpl_login.html +++ b/webmain/login/tpl_login.html @@ -96,6 +96,10 @@ echo 'body{--main-color:'.$maincolor.';background:rgba('.$maincolors.',0.05)}';
Copyright ©=date('Y')?> =$da['title']?>v=VERSION?> -
鐗堟潈鎵鏈夛細淇″懠寮鍙戝洟闃
+ '.$beian.'';
+ ?>
鏉′欢锛 |
- 涓虹┖鎴栬呮潯浠舵弧瓒虫椂鏄剧ず鑿滃崟 |
+ 涓虹┖鎴栬呮潯浠舵弧瓒虫椂鏄剧ず鑿滃崟 |
-
-
+
+ 鏍囪瘑宸茬敓鎴愬垪琛ㄩ〉
|
';
s1+=' ';
strarr[l]+=s1;
@@ -26,9 +26,11 @@ $(document).ready(function(){
}
}
- opencoluske_{rand}=function(na,num,ats){
+ opencoluske_{rand}=function(na,num,ats,scl){
if(!ats)ats='my';
- addtabs({name:na,num:'search'+num+'',url:'flow,page,'+num+',atype='+ats+'',icons:'search'});
+ var str = num;
+ if(scl=='2')str='aas,bh='+num+'';
+ addtabs({name:na,num:'search'+num+'',url:'flow,page,'+str+',atype='+ats+'',icons:'search'});
}
js.ajax(js.getajaxurl('getmodesearcharr','{mode}','{dir}'),{},function(a){
diff --git a/webmain/main/fwork/rock_fwork_todo.php b/webmain/main/fwork/rock_fwork_todo.php
index b9e8625..543e7ab 100644
--- a/webmain/main/fwork/rock_fwork_todo.php
+++ b/webmain/main/fwork/rock_fwork_todo.php
@@ -74,6 +74,17 @@ $(document).ready(function(){
},
del:function(){
a.del({checked:true,url:js.getajaxurl('deltodo','{mode}','{dir}')});
+ },
+ searchyidu:function(){
+ var sid = a.getchecked();
+ if(!sid){
+ js.msg('msg','娌℃湁閫変腑琛岃褰');
+ return;
+ }
+ js.ajax(js.getajaxurl('deltodoyd','{mode}','{dir}'),{id:sid},function(){
+ a.reload();
+ });
+
}
};
js.initbtn(c);
@@ -112,7 +123,7 @@ $(document).ready(function(){
'+lx+'('+len+') ';
for(i=0;i
-
+
|
diff --git a/webmain/main/userinfo/userinfoAction.php b/webmain/main/userinfo/userinfoAction.php
index 23c79d8..80a314b 100644
--- a/webmain/main/userinfo/userinfoAction.php
+++ b/webmain/main/userinfo/userinfoAction.php
@@ -91,6 +91,9 @@ class userinfoClassAction extends Action
);
$atatea = explode(',', '璇曠敤鏈,姝e紡,瀹炰範鐢,鍏艰亴,涓存椂宸,绂昏亴');
+ $atrows = $this->option->getmnum('userstate');
+ foreach($atrows as $k1=>$rs1)if(!isempt($rs1['value']))$atatea[$rs1['value']] = $rs1['name'];
+
foreach($rows as $k=>$rs){
$year = '';
if(!$this->isempt($rs['workdate'])) $year = substr($rs['workdate'],0,4);
diff --git a/webmain/model/finaModel.php b/webmain/model/finaModel.php
index c0b7da9..496a68f 100644
--- a/webmain/model/finaModel.php
+++ b/webmain/model/finaModel.php
@@ -68,24 +68,32 @@ class finaClassModel extends Model
$rows = m('finzhang')->getall("status=1 ".$where."",'*','sort, startdt desc');
$arr = array();
foreach($rows as $k=>$rs){
- $arr[] = array(
+ $sarr = array(
'value' => $rs['id'],
'name' => $rs['name'],
'subname' => $rs['startdt'].'鈫'.$rs['enddt'],
);
+ if($lx==2){
+ unset($sarr['subname']);
+ $sarr['name'].='('.$rs['startdt'].')';
+ }
+ $arr[] = $sarr;
}
return $arr;
}
//鑾峰彇璐㈠姟甯愬彿
- public function getaccount()
+ public function getaccount($zhid='')
{
- $where= m('admin')->getcompanywhere(3);
+ if(!$zhid)$zhid='0';
+ $where= 'and `zhangid`='.$zhid.'';
$rows = m('finount')->getall("status=1 ".$where."",'*','sort');
$arr = array();
foreach($rows as $k=>$rs){
+ $name = $rs['name'];
+ if(!isempt($rs['banknum']))$name.='(**'.substr($rs['banknum'],-4).')';
$arr[] = array(
'value' => $rs['id'],
- 'name' => $rs['name'],
+ 'name' => $name,
);
}
return $arr;
@@ -105,4 +113,26 @@ class finaClassModel extends Model
if(isempt($accid))$db->update('`money`=0', '`id` not in('.$ids.')');
}
+
+ //璇诲彇绉戠洰鏁版嵁
+ private $datarows = array();
+ public function kemudata()
+ {
+ $data = m('finkemu')->getall('`status`=1','*','`sort`');
+ $this->kemudatas($data, 0,'');
+
+ return $this->datarows;
+ }
+ private function kemudatas($data,$pid,$nae)
+ {
+ foreach($data as $k=>$rs){
+ if($pid==$rs['pid']){
+ $this->datarows[] = array(
+ 'value' => $rs['id'],
+ 'name' => ''.$rs['num'].' '.$nae.''.$rs['name'].''
+ );
+ $this->kemudatas($data, $rs['id'],$nae.$rs['name'].'-');
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/webmain/model/flow/custfinaModel.php b/webmain/model/flow/custfinaModel.php
index b16cdc5..5a69876 100644
--- a/webmain/model/flow/custfinaModel.php
+++ b/webmain/model/flow/custfinaModel.php
@@ -1,8 +1,9 @@
statearrs = c('array')->strtoarray('鏈敹娆緗red,宸叉敹娆緗green');
$this->statearrf = c('array')->strtoarray('鏈粯娆緗red,宸蹭粯娆緗green');
@@ -10,6 +11,8 @@ class flow_custfinaClassModel extends flowModel
public function flowrsreplace($rs)
{
+ if($rs['id']==0)return $rs;
+
$starrr = array('鏀','浠');
$rs['paystatus'] = $rs['ispay'];
$ispay = '鏈'.$starrr[$rs['type']].'娆';
@@ -17,6 +20,29 @@ class flow_custfinaClassModel extends flowModel
$rs['ispay'] = $ispay;
$rs['type'] = ''.$starrr[$rs['type']].'娆惧崟';
+ $htid = $rs['htid'];
+ $url = '';
+ if($htid>0)$url = $this->getxiangurl('custract', $htid, 'auto');
+ if($htid<0)$url = $this->getxiangurl('custxiao', 0-$htid, 'auto');
+ if(arrvalue($rs,'xgid') && arrvalue($rs,'xgnum'))$url = $this->getxiangurl($rs['xgnum'], $rs['xgid'], 'auto');
+ if($url && !isempt($rs['htnum']))
+ $rs['htnum'] = ''.$rs['htnum'].'';
+
+ if($rs['custid']>0){
+ //$url = $this->getxiangurl('customer', $rs['custid'], 'auto');
+ //$rs['custname'] = ''.$rs['custname'].'';
+ }
+
+ $jzid = arrvalue($rs,'jzid');
+ if($jzid>0){
+ $url = $this->getxiangurl('finjishou', $jzid, 'auto');
+ $rs['jzid'] = '宸茬敓鎴';
+ }else if($jzid=='-1'){
+ $rs['jzid'] = '涓嶉渶瑕';
+ }else{
+ $rs['jzid'] = '';
+ }
+
return $rs;
}
@@ -31,6 +57,31 @@ class flow_custfinaClassModel extends flowModel
$this->update("`ispay`='$ispay',`paydt`='$paydt'", $this->id);
m('crm')->ractmoney($this->rs['htid']);
}
+
+ //澶嶅埗涓鍗
+ if($ors['num']=='noupfuzhe'){
+ $jine = $this->rock->number(trim($arr['sm']));
+ $uarr = $this->getone($this->id);
+ $money= $uarr['money'];
+ unset($uarr['id']);
+ $uarr['createname'] = $this->adminname;
+ $uarr['createid'] = $this->adminid;
+ $uarr['money'] = $jine;
+ $this->insert($uarr);
+ $this->update('`money`=`money`-'.$jine.'', $this->id);
+ }
+ }
+
+ //鎿嶄綔鑿滃崟鎿嶄綔涔嬪墠
+ protected function flowoptmenubefore($ors, $arr)
+ {
+ if($ors['num']=='noupfuzhe'){
+ $sm = trim($arr['sm']);
+ if(!$sm || !is_numeric($sm))return '杈撳叆鈥'.$sm.'鈥濈殑涓嶆槸閲戦';
+ $sm = $this->rock->number($sm);
+ if(floatval($sm)<=0)return '杈撳叆閲戦蹇呴』澶т簬0';
+ if(floatval($sm) >= floatval($this->rs['money']))return '杈撳叆鐨勯噾棰濅笉鑳借秴杩'.$this->rs['money'].'';
+ }
}
protected function flowbillwhere($uid, $lx)
@@ -46,4 +97,30 @@ class flow_custfinaClassModel extends flowModel
'order' => '`optdt` desc'
);
}
+
+ protected function flowdeletebill($sm)
+ {
+ $this->delbool++;
+ $xgid = arrvalue($this->rs,'xgid');
+ $xgnum = arrvalue($this->rs,'xgnum');
+ $sid = $this->id;
+ if($xgnum && $xgid && $this->delbool==1){
+ $sflow = m('flow:'.$xgnum.'')->initbase($xgnum);
+ $drows = $this->getall("`xgnum`='$xgnum' and `xgid`='$xgid'");//鐩稿叧鑱斾竴璧峰垹
+ foreach($drows as $k=>$rs1){
+ $mid = $rs1['id'];
+ $this->loaddata($mid, false);
+ $this->deletebill($sm, false);
+ }
+ $sflow->update('`payid`=0', $xgid);
+ }
+ $this->id = $sid;
+ }
+
+ protected function flowgetoptmenu($opt,$bo=false)
+ {
+ if($opt=='noupcreatejz' && $bo){
+ return m('mode')->iscun('finjishou');
+ }
+ }
}
\ No newline at end of file
diff --git a/webmain/model/flow/custfinbModel.php b/webmain/model/flow/custfinbModel.php
index da95c80..149e1de 100644
--- a/webmain/model/flow/custfinbModel.php
+++ b/webmain/model/flow/custfinbModel.php
@@ -1,8 +1,9 @@
statearrs = c('array')->strtoarray('鏈敹娆緗red,宸叉敹娆緗green');
$this->statearrf = c('array')->strtoarray('鏈粯娆緗red,宸蹭粯娆緗green');
@@ -10,6 +11,8 @@ class flow_custfinbClassModel extends flowModel
public function flowrsreplace($rs)
{
+ if($rs['id']==0)return $rs;
+
$starrr = array('鏀','浠');
$rs['paystatus'] = $rs['ispay'];
$ispay = '鏈'.$starrr[$rs['type']].'娆';
@@ -17,6 +20,29 @@ class flow_custfinbClassModel extends flowModel
$rs['ispay'] = $ispay;
$rs['type'] = ''.$starrr[$rs['type']].'娆惧崟';
+ $htid = $rs['htid'];
+ $url = '';
+ if($htid>0)$url = $this->getxiangurl('custract', $htid, 'auto');
+ if($htid<0)$url = $this->getxiangurl('custxiao', 0-$htid, 'auto');
+ if(arrvalue($rs,'xgid') && arrvalue($rs,'xgnum'))$url = $this->getxiangurl($rs['xgnum'], $rs['xgid'], 'auto');
+ if($url && !isempt($rs['htnum']))
+ $rs['htnum'] = ''.$rs['htnum'].'';
+
+ if($rs['custid']>0){
+ //$url = $this->getxiangurl('customer', $rs['custid'], 'auto');
+ //$rs['custname'] = ''.$rs['custname'].'';
+ }
+
+ $jzid = arrvalue($rs,'jzid');
+ if($jzid>0){
+ $url = $this->getxiangurl('finjizhi', $jzid, 'auto');
+ $rs['jzid'] = '宸茬敓鎴';
+ }else if($jzid=='-1'){
+ $rs['jzid'] = '涓嶉渶瑕';
+ }else{
+ $rs['jzid'] = '';
+ }
+
return $rs;
}
@@ -31,6 +57,31 @@ class flow_custfinbClassModel extends flowModel
$this->update("`ispay`='$ispay',`paydt`='$paydt'", $this->id);
m('crm')->ractmoney($this->rs['htid']);
}
+
+ //澶嶅埗涓鍗
+ if($ors['num']=='noupfuzhe'){
+ $jine = $this->rock->number(trim($arr['sm']));
+ $uarr = $this->getone($this->id);
+ $money= $uarr['money'];
+ unset($uarr['id']);
+ $uarr['createname'] = $this->adminname;
+ $uarr['createid'] = $this->adminid;
+ $uarr['money'] = $jine;
+ $this->insert($uarr);
+ $this->update('`money`=`money`-'.$jine.'', $this->id);
+ }
+ }
+
+ //鎿嶄綔鑿滃崟鎿嶄綔涔嬪墠
+ protected function flowoptmenubefore($ors, $arr)
+ {
+ if($ors['num']=='noupfuzhe'){
+ $sm = trim($arr['sm']);
+ if(!$sm || !is_numeric($sm))return '杈撳叆鈥'.$sm.'鈥濈殑涓嶆槸閲戦';
+ $sm = $this->rock->number($sm);
+ if(floatval($sm)<=0)return '杈撳叆閲戦蹇呴』澶т簬0';
+ if(floatval($sm) >= floatval($this->rs['money']))return '杈撳叆鐨勯噾棰濅笉鑳借秴杩'.$this->rs['money'].'';
+ }
}
protected function flowbillwhere($uid, $lx)
@@ -46,4 +97,36 @@ class flow_custfinbClassModel extends flowModel
'order' => '`optdt` desc'
);
}
+
+ protected function flowdeletebill($sm)
+ {
+ $this->delbool++;
+ $xgid = arrvalue($this->rs,'xgid');
+ $xgnum = arrvalue($this->rs,'xgnum');
+ $sid = $this->id;
+ if($xgnum && $xgid && $this->delbool==1){
+ $sflow = m('flow:'.$xgnum.'')->initbase($xgnum);
+ $drows = $this->getall("`xgnum`='$xgnum' and `xgid`='$xgid'");//鐩稿叧鑱斾竴璧峰垹
+ foreach($drows as $k=>$rs1){
+ $mid = $rs1['id'];
+ $this->loaddata($mid, false);
+ $this->deletebill($sm, false);
+ }
+ $sflow->update('`payid`=0', $xgid);
+ }
+ $this->id = $sid;
+ }
+
+ protected function flowgetoptmenu($opt,$bo=false)
+ {
+ if($opt=='noupcreatejz' && $bo){
+ return m('mode')->iscun('finjizhi');
+ }
+ }
+
+ public function flowlistscript()
+ {
+ include_once('webmain/flow/page/rock_page_custfina_script.php');
+ return '';
+ }
}
\ No newline at end of file
diff --git a/webmain/model/flow/flow.php b/webmain/model/flow/flow.php
index 19873e4..4c100dc 100644
--- a/webmain/model/flow/flow.php
+++ b/webmain/model/flow/flow.php
@@ -5,11 +5,11 @@
* 缃戝潃锛歨ttp://www.rockoa.com/
* 绯荤粺鏂囦欢
*/
- class flowModel extends Model { public $modenum; public $editcont= ''; public $id = 0; public $moders; public $modeid; public $modename; public $sericnum; public $billrs = array(); public $rs = array(); public $urs = array(); public $drs = array(); public $fieldsarr = array(); public $fieldsarra = array(); public $mwhere; public $mtable; public $uname; public $uid = 0; public $optid = 0; public $isflow = 0; public $ismobile= 0; public $minwidth= 100; public $inputwidth= 0; public $atype = ''; public $daochubo= false; public $companyid= 1; protected function flowinit(){} protected function flowchangedata(){} protected function flowchangetodo(){} protected function flowdeletebill($sm){} protected function flowzuofeibill($sm){} protected function flowsubmit($na, $sm){} protected function flowaddlog($arr){} protected function flowdatalog($arr){} protected function flowcheckbefore(){} protected function flowcheckafter($zt, $sm){} protected function flowcheckfinsh($zt){} protected function flowgetfields($lx){} protected function flowgetoptmenu($opt){} protected function flowcheckname($num){} protected function flowcoursejudge($num){} protected function flowoptmenu($ors, $crs){} protected function flowisreadqx(){return false;} protected function flowisdeleteqx(){return false;} protected function flowprintrows($r){return $r;} protected function flowsubdata($r, $lx=0){return $r;} protected function flownexttodo($type){return false;} protected function flowbillwhere($lx, $uid){return '';} protected $flowweixinarr = array(); protected $flowviewufieds = 'uid'; protected $flowcompanyidfieds = 'comid'; protected $flowfieldstype = 0; public function flowrsreplace($rs){return $rs;} public function flowrsreplace_we($row, $rs){return $row;} public function flowwesearchdata($lx){return array();} protected function flowrsreplaceedit($rs){return $rs;} protected $flowstatusarr = array(1); protected $subsubdatastyle = ''; protected $wherejoin = array(); public $defaultorder = ''; public $floweditother = false; public $xiangbordercolor = ''; public $viewmodel,$chaomodel,$billmodel,$todomodel,$todosmodel,$flogmodel,$checksmodel,$cnamemodel,$wheremodel,$adminmodel,$remindmodel,$option,$rssust,$flowarr,$nowcourse,$nextcourse,$flowisend,$pipeiCoursearrc,$pipeiCoursearrs,$pipeiCoursearr,$_tempauoe; public function echomsg($msg) { if(!isajax())exit($msg); showreturn('', $msg, 201); exit(); } public function flowfieldarr($farr, $lx){return $farr;} public function flowinputtpl($cont, $lx){return $cont;} public function flowviewtpl($cont, $lx){return $cont;} public function floweditoffice($frs, $ofrs){} public function initdata($num, $id=null) { if(is_array($num)){ $this->moders= $num; }else{ $this->moders = m('flow_set')->getone(is_numeric($num) ? $num : "`num`='$num'"); if(!$this->moders)$this->echomsg('妯″潡['.$num.']涓嶅瓨鍦紝璇峰埌[娴佺▼妯″潡鍒楄〃]涓嬫坊鍔'); } $this->daochubo = ($this->rock->post('execldown')=='true') ? true :false; $table = $this->moders['table']; $this->modeid = $this->moders['id']; $this->modenum = $this->moders['num']; $this->modename = $this->moders['name']; $this->isflow = (int)$this->moders['isflow']; $this->settable($table); $this->mtable = $table; $this->viewmodel = m('view'); $this->chaomodel = m('flow_chao'); $this->billmodel = m('flow_bill'); $this->todomodel = m('flow_todo'); $this->todosmodel = m('flowtodo'); $this->flogmodel = m('flow_log'); $this->checksmodel = m('flow_checks'); $this->cnamemodel = m('flowcname'); $this->wheremodel = m('where'); $this->adminmodel = m('admin'); $this->remindmodel = m('remind'); $this->option = m('option'); $this->companyid = $this->adminmodel->getcompanyid(); $this->tfieldsarra(); $this->mwhere = "`table`='$this->mtable' and `mid`=-1"; if(!$this->defaultorder){ $sortdir = arrvalue($this->moders, 'sortdir'); if(!isempt($sortdir))$this->defaultorder = str_replace(' ',',', $sortdir); } $this->flowinit(); if($id==null)return $this; $this->loaddata($id, true); return $this; } private function tfieldsarra() { $rows = m('flow_element')->getrows("`mid`='$this->modeid' and `iszb`=0",'`name`,`fields`,`isbt`,`iszs`,`fieldstype`,`savewhere`,`data`,`isdr`,`iszb`,`issou`,`islu`,`islb`,`isonly`,`attr`','`sort`'); $this->fieldsarr = array(); if($rows)foreach($rows as $k=>$rs){ if($rs['islu']==1)$this->fieldsarr[] = $rs; } $this->fieldsarra = $rows; } public function inputtitle() { return $this->moders['name']; } public function flowsearchfields() { $arr = array(); if($this->isflow>0){ $arr[] = array('name'=>'鐢宠浜...','fields'=>'uid'); $arr[] = array('name'=>'鎻愪氦浜...','fields'=>'optid'); } return $arr; } public function loaddata($id, $ispd=true) { $this->id = (int)$id; $this->mwhere = "`table`='$this->mtable' and `mid`='$id'"; $swhere = "`id`='$id'"; $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $swhere .= ' and '.$wherestr; } $this->rs = $this->getone($swhere); $this->uname = ''; if(!$this->rs)$this->echomsg('鏁版嵁璁板綍涓嶅瓨鍦ㄤ簡'); $this->rs['base_name'] = ''; $this->rs['base_deptname'] = ''; if(isset($this->rs['uid']))$this->uid = $this->rs['uid']; if(isset($this->rs['comid']))$this->companyid = $this->rs['comid']; if(!isset($this->rs['applydt']))$this->rs['applydt'] = ''; if(!isset($this->rs['status']))$this->rs['status'] = 1; $uisfield = property_exists($this, 'uidfields') ? $this->uidfields : 'optid'; if($this->uid==0 && isset($this->rs[$uisfield]))$this->uid = $this->rs[$uisfield]; $this->optid = isset($this->rs['optid']) ? $this->rs['optid'] : $this->uid; $this->urs = $this->adminmodel->getone($this->uid,'id,name,user,deptid,deptids,deptname,deptallname,face,ranking,superid,superpath,superman,deptpath'); if($this->isempt($this->rs['applydt'])&&isset($this->rs['optdt']))$this->rs['applydt']=substr($this->rs['optdt'],0,10); if($this->urs){ $this->drs = $this->db->getone('[Q]dept',"`id`='".$this->urs['deptid']."'"); $this->uname = $this->urs['name']; $this->rs['base_name'] = $this->uname; if($this->drs){ $this->rs['base_deptname'] = $this->drs['name']; } } $this->sericnum = ''; $this->billrs = $this->billmodel->getone($this->mwhere); if($this->billrs){ $this->sericnum = $this->billrs['sericnum']; if(isempt(arrvalue($this->billrs,'uname'))){ $this->savebill(); } if($this->billrs['status']!=$this->rs['status'])$this->billmodel->update('`status`='.$this->rs['status'].'', $this->billrs['id']); if($this->billrs['isturn']!=$this->rs['isturn'])$this->billmodel->update('`isturn`='.$this->rs['isturn'].'', $this->billrs['id']); if(isempt($this->rs['base_name']))$this->rs['base_name'] = $this->billrs['uname']; if(isempt($this->rs['base_deptname']))$this->rs['base_deptname'] = $this->billrs['udeptname']; }else{ if($this->isflow>0)$this->savebill(); } if($this->isflow>0){ if($this->rs['status']==1 && $this->rs['isturn']=='0'){ $this->update(array('isturn' => 1), $this->id); $this->rs['isturn'] = 1; if($this->billrs)$this->billmodel->update('`isturn`=1', $this->billrs['id']); } } $this->getlogrows = array(); if($ispd)$this->isreadqx(); $this->rssust = $this->rs; $this->flowchangedata(); $this->rs['base_systitle'] = TITLE; $this->rs['base_modename'] = $this->modename; $this->rs['base_sericnum'] = $this->sericnum; $this->rs['base_summary'] = $this->getsummary(); } public function getdaiban() { $s = $this->rock->dbinstr('nowcheckid', $this->adminid); $to = $this->billmodel->rows('`modeid`='.$this->modeid.' and `isdel`=0 and `status` not in(1,2) and '.$s.''); return $to; } public function isreadqx($glx=0) { $bo = false; if($this->adminid==1)$bo=true; if($this->uid==$this->adminid && $this->adminid>0)$bo=true; if(!$bo && $this->isflow>0){ if($this->billrs){ $allcheckid = $this->billrs['allcheckid']; if(contain(','.$allcheckid.',',','.$this->adminid.','))$bo = true; } } if(!$bo){ if($this->urs && contain($this->urs['superpath'],'['.$this->adminid.']'))$bo = true; } if(!$bo){ $tos = $this->todosmodel->rows("".$this->mwhere." and `uid`='$this->adminid'"); if($tos>0)$bo=true; } if(!$bo){ $tos = $this->chaomodel->rows($this->mwhere.' and '.$this->rock->dbinstr('csnameid', $this->adminid).''); if($tos>0)$bo=true; } if(!$bo){ $tos = $this->db->rows('[Q]todo', "`uid`='$this->adminid' and ".$this->mwhere.""); if($tos>0)$bo=true; } if(!$bo)$bo = $this->flowisreadqx(); if(!$bo){ $bo = $this->isreadqxs(); } if(!$bo){ $tos = $this->isjiankongqx(); if($tos>0)$bo=true; } if($glx==1)return $bo; if(!$bo)$this->echomsg('鏃犳潈闄愭煡鐪嬫ā鍧梉'.$this->modenum.'.'.$this->modename.']'.$this->uname.'鐨勬暟鎹紝璇疯仈绯荤鐞嗗憳鍒癧娴佺▼妯″潡鈫掓祦绋嬫ā鍧楁潈闄怾涓嬭缃'); } public function isreadqxs() { $bo = false; $where = $this->viewmodel->viewwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=true; return $bo; } public function iseditqx() { $bo = 0; if($bo==0 && $this->isflow>0){ if($this->billrs && ($this->uid == $this->adminid || $this->optid==$this->adminid)){ if($this->billrs['nstatus']==0 || $this->billrs['nstatus']==2){ $bo = 1; } } if($this->rs['status']==1)$bo=0; } if($bo==0){ $where = $this->viewmodel->editwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } return $bo; } public function isdeleteqx() { $bo = 0; if($bo==0 && $this->isflow>0){ if($this->billrs && ($this->uid == $this->adminid || $this->optid==$this->adminid)){ if($this->billrs['nstatus']==0 || $this->billrs['nstatus']==2){ $bo = 1; } } if($this->rs['status']==1)$bo=0; } if($bo==0){ $where = $this->viewmodel->deletewhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } $isd = $this->flowisdeleteqx(); if(is_numeric($isd) && $isd <= 1)$bo = $isd; return $bo; } public function isjiankongqx() { $bo = 0; if($bo==0){ $where = $this->viewmodel->jiankongwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } return $bo; } public function getfields($lx=0) { $fields = array(); if(!$this->fieldsarra)$this->tfieldsarra(); $farr = $this->fieldsarra; foreach($farr as $k=>$rs)if($rs['iszs']=='1')$fields[$rs['fields']] = $rs['name']; $fters = $this->flowgetfields($lx); if(is_array($fters))$fields = array_merge($fields, $fters); return $fields; } public function getinputurl($num='',$mid=0,$can=array()) { if($num=='')$num = $this->modenum; $xa = 'lu'; if($this->ismobile==1)$xa = 'lum'; $url = 'index.php?a='.$xa.'&m=input&d=flow&num='.$num.'&mid='.$mid.''; if(is_array($can)){ foreach($can as $k=>$v)$url.='&'.$k.'='.$v.''; }else{ $url .= '&'.$can.''; } return $url; } public function replacepbr(&$arr, $k) { $val = arrvalue($arr, $k); if(!c('html')->ishtml($val))$arr[$k] = str_replace("\n",'', $val); return $arr; } public function getdatalog($lx=0, $isdy=0) { m('log')->addread($this->mtable, $this->id); $this->todosmodel->biaoyidu($this->adminid, $this->modenum, $this->id); $fobj = m('file'); $this->ismobile = $lx; $arr['modename'] = $this->modename; $arr['title'] = $this->modename; $arr['modeid'] = $this->modeid; $arr['modenum'] = $this->modenum; $arr['mid'] = $this->id; $arr['status'] = arrvalue($this->rs,'status'); $arr['logarr'] = $this->getlog(1); $arr['isplview'] = arrvalue($this->moders,'ispl','0'); $arr['isys'] = arrvalue($this->moders,'isys','0'); $contview = ''; $lsds = ($isdy==2) ? $isdy: $lx; $path = ''.P.'/flow/page/view_'.$this->modenum.'_'.$lsds.'.html'; if(COMPANYNUM){ $path1 = ''.P.'/flow/page/view_'.$this->modenum.'_'.COMPANYNUM.'_'.$lsds.'.html'; if(file_exists($path1))$path = $path1; } $fstr = $fobj->getstr($this->mtable, $this->id, 3); $issubtabs = 0; if($fstr != ''){ $this->rs['file_content'] = $fstr; } $data = $this->flowrsreplace($this->rs, ($isdy==2) ? 3 : 1); $dataa = $this->viewjinfields(array($data)); $data = $dataa[0]; $subdata = $this->getsuballdata(1); if($subdata){ $zbzd = m('flow_element')->getrows("`mid`='$this->modeid' and `iszb`>0 and `iszs`=1 and `fieldstype` in('uploadimg','uploadfile','textarea')",'`name`,`fields`,`fieldstype`,`iszb`','`iszb`,`sort`'); foreach($subdata as $zb=>$da){ $sub = $da['fields']; $data[$sub] = $this->getsubdata($zb,$da['data'],arrvalue($data,'subdatays'.$zb.'',$lx)); $data[''.$sub.'_style'] = 'padding:0'; } } $farrobj = $chufarr= array(); if(method_exists($this, 'flowxiangfields'))$chufarr = $this->flowxiangfields($chufarr); $farrobj['base_sericnum'] = array('name'=>arrvalue($chufarr,'base_sericnum','鍗曞彿')); $farrobj['base_name'] = array('name'=>arrvalue($chufarr,'base_name','鐢宠浜')); $farrobj['base_deptname'] = array('name'=>arrvalue($chufarr,'base_deptname','鐢宠浜洪儴闂')); $farrobj['base_status'] = array('name'=>arrvalue($chufarr,'base_status','娴佺▼鐘舵')); $farrobj['file_content'] = array('name'=>arrvalue($chufarr,'file_content','鐩稿叧鏂囦欢')); foreach($this->fieldsarra as $k=>$rs){ $fid = $rs['fields']; $fty = $rs['fieldstype']; if($fty=='uploadfile'){ $fval = arrvalue($data, $fid); if(isempt($fval))$fval='0'; $data[$fid] = ''; if($fval!='0'){ $data[$fid] = $fobj->getstr('', '', 3, "`id` in($fval)"); } } if($fty=='uploadimg' || $fty=='graph'){ $fval = arrvalue($data, $fid); if(!isempt($fval) && substr($fval,0,4)!=' '; $data[$key2].= $str1; } $ztass = $this->getnowstatus(); $data['base_status'] = $ztass[3]; if(file_exists($path)){ $contview = $this->flowviewtpl(file_get_contents($path), $lx); preg_match_all('/\^(.*?)\^/', $contview, $list); foreach($list[1] as $k=>$nrs){ $fzdrs = arrvalue($farrobj, $nrs); if($fzdrs)$contview = str_replace('^'.$nrs.'^', $fzdrs['name'], $contview); } $contview = $this->rock->reparr($contview, $data); } $arr['isdefaultview'] = 0; foreach($chufarr as $f1=>$v1)$qfields[$f1] = $v1; if($this->isempt($contview) || contain($contview, '$contview$')){ $arr['isdefaultview'] = 1; $_fields = array(); if($this->isflow>0){ $_fields['base_sericnum'] = $farrobj['base_sericnum']['name']; $_fields['base_name'] = $farrobj['base_name']['name']; $_fields['base_deptname'] = $farrobj['base_deptname']['name']; $_fields['base_status'] = $farrobj['base_status']['name']; } $fields = array_merge($_fields, $this->getfields($lx)); if($fstr!='')$fields['file_content'] = $farrobj['file_content']['name']; foreach($subdata as $zb=>$da){ $fields[$da['fields']] = $da['name']; } if($qfields)$fields = array_merge($fields,$qfields); if($lx==0)foreach($fields as $k=>$rs){$data[''.$k.'_style'] = 'width:75%';break;} $_colsr = $this->xiangbordercolor; if($_colsr=='')$_colsr = getconfig('bcolorxiang'); $contvimr = c('html')->xiangtable($fields, $data, $_colsr); $contvimr = ' '.$contvimr.' '; if($lx==1){ $contvimr = ''; if($this->isflow>0){ $contvimr.='
+ class flowModel extends Model { public $modenum; public $editcont= ''; public $id = 0; public $moders; public $modeid; public $modename; public $sericnum; public $billrs = array(); public $rs = array(); public $urs = array(); public $drs = array(); public $fieldsarr = array(); public $fieldsarra = array(); public $mwhere; public $mtable; public $uname; public $uid = 0; public $optid = 0; public $isflow = 0; public $ismobile= 0; public $minwidth= 100; public $inputwidth= 0; public $atype = ''; public $daochubo= false; public $companyid= 1; protected function flowinit(){} protected function flowchangedata(){} protected function flowchangetodo(){} protected function flowdeletebill($sm){} protected function flowzuofeibill($sm){} protected function flowsubmit($na, $sm){} protected function flowaddlog($arr){} protected function flowdatalog($arr){} protected function flowcheckbefore(){} protected function flowcheckafter($zt, $sm){} protected function flowcheckfinsh($zt){} protected function flowgetfields($lx){} protected function flowgetoptmenu($opt){} protected function flowcheckname($num){} protected function flowcoursejudge($num){} protected function flowoptmenu($ors, $crs){} protected function flowisreadqx(){return false;} protected function flowisdeleteqx(){return false;} protected function flowprintrows($r){return $r;} protected function flowsubdata($r, $lx=0){return $r;} protected function flownexttodo($type){return false;} protected function flowbillwhere($lx, $uid){return '';} protected $flowweixinarr = array(); protected $flowviewufieds = 'uid'; protected $flowcompanyidfieds = 'comid'; protected $flowfieldstype = 0; public function flowrsreplace($rs){return $rs;} public function flowrsreplace_we($row, $rs){return $row;} public function flowwesearchdata($lx){return array();} protected function flowrsreplaceedit($rs){return $rs;} protected $flowstatusarr = array(1); protected $subsubdatastyle = ''; protected $wherejoin = array(); public $defaultorder = ''; public $floweditother = false; public $xiangbordercolor = ''; public $viewmodel,$chaomodel,$billmodel,$todomodel,$todosmodel,$flogmodel,$checksmodel,$cnamemodel,$wheremodel,$adminmodel,$remindmodel,$option,$rssust,$flowarr,$nowcourse,$nextcourse,$flowisend,$pipeiCoursearrc,$pipeiCoursearrs,$pipeiCoursearr,$_tempauoe; public function echomsg($msg) { if(!isajax())exit($msg); showreturn('', $msg, 201); exit(); } public function flowfieldarr($farr, $lx){return $farr;} public function flowinputtpl($cont, $lx){return $cont;} public function flowviewtpl($cont, $lx){return $cont;} public function floweditoffice($frs, $ofrs){} public function initdata($num, $id=null) { $this->initbase($num); $this->viewmodel = m('view'); $this->chaomodel = m('flow_chao'); $this->billmodel = m('flow_bill'); $this->todomodel = m('flow_todo'); $this->todosmodel = m('flowtodo'); $this->flogmodel = m('flow_log'); $this->checksmodel = m('flow_checks'); $this->cnamemodel = m('flowcname'); $this->wheremodel = m('where'); $this->adminmodel = m('admin'); $this->remindmodel = m('remind'); $this->option = m('option'); $this->companyid = $this->adminmodel->getcompanyid(); $this->tfieldsarra(); $this->mwhere = "`table`='$this->mtable' and `mid`=-1"; if(!$this->defaultorder){ $sortdir = arrvalue($this->moders, 'sortdir'); if(!isempt($sortdir))$this->defaultorder = str_replace(' ',',', $sortdir); } $this->flowinit(); if($id==null)return $this; $this->loaddata($id, true); return $this; } public function initbase($num) { if(is_array($num)){ $this->moders= $num; }else{ $this->moders = m('flow_set')->getone(is_numeric($num) ? $num : "`num`='$num'"); if(!$this->moders)$this->echomsg('妯″潡['.$num.']涓嶅瓨鍦紝璇峰埌[娴佺▼妯″潡鍒楄〃]涓嬫坊鍔'); } $this->daochubo = ($this->rock->post('execldown')=='true') ? true :false; $table = $this->moders['table']; $this->modeid = $this->moders['id']; $this->modenum = $this->moders['num']; $this->modename = $this->moders['name']; $this->isflow = (int)$this->moders['isflow']; $this->settable($table); $this->mtable = $table; return $this; } private function tfieldsarra() { $rows = m('flow_element')->getrows("`mid`='$this->modeid' and `iszb`=0",'`name`,`fields`,`isbt`,`iszs`,`fieldstype`,`savewhere`,`data`,`isdr`,`iszb`,`issou`,`islu`,`islb`,`isonly`,`attr`','`sort`'); $this->fieldsarr = array(); if($rows)foreach($rows as $k=>$rs){ if($rs['islu']==1)$this->fieldsarr[] = $rs; } $this->fieldsarra = $rows; } public function inputtitle() { return $this->moders['name']; } public function flowsearchfields() { $arr = array(); if($this->isflow>0){ $arr[] = array('name'=>'鐢宠浜...','fields'=>'uid'); $arr[] = array('name'=>'鎻愪氦浜...','fields'=>'optid'); } return $arr; } public function loaddata($id, $ispd=true) { $this->id = (int)$id; $this->mwhere = "`table`='$this->mtable' and `mid`='$id'"; $swhere = "`id`='$id'"; $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $swhere .= ' and '.$wherestr; } $this->rs = $this->getone($swhere); $this->uname = ''; if(!$this->rs)$this->echomsg('鏁版嵁璁板綍涓嶅瓨鍦ㄤ簡'); $this->rs['base_name'] = ''; $this->rs['base_deptname'] = ''; if(isset($this->rs['uid']))$this->uid = $this->rs['uid']; if(isset($this->rs['comid']))$this->companyid = $this->rs['comid']; if(!isset($this->rs['applydt']))$this->rs['applydt'] = ''; if(!isset($this->rs['status']))$this->rs['status'] = 1; $uisfield = property_exists($this, 'uidfields') ? $this->uidfields : 'optid'; if($this->uid==0 && isset($this->rs[$uisfield]))$this->uid = $this->rs[$uisfield]; $this->optid = isset($this->rs['optid']) ? $this->rs['optid'] : $this->uid; $this->urs = $this->adminmodel->getone($this->uid,'id,name,user,deptid,deptids,deptname,deptallname,face,ranking,superid,superpath,superman,deptpath'); if($this->isempt($this->rs['applydt'])&&isset($this->rs['optdt']))$this->rs['applydt']=substr($this->rs['optdt'],0,10); if($this->urs){ $this->drs = $this->db->getone('[Q]dept',"`id`='".$this->urs['deptid']."'"); $this->uname = $this->urs['name']; $this->rs['base_name'] = $this->uname; if($this->drs){ $this->rs['base_deptname'] = $this->drs['name']; } } $this->sericnum = ''; $this->billrs = $this->billmodel->getone($this->mwhere); if($this->billrs){ $this->sericnum = $this->billrs['sericnum']; if(isempt(arrvalue($this->billrs,'uname'))){ $this->savebill(); } if($this->billrs['status']!=$this->rs['status'])$this->billmodel->update('`status`='.$this->rs['status'].'', $this->billrs['id']); if($this->billrs['isturn']!=$this->rs['isturn'])$this->billmodel->update('`isturn`='.$this->rs['isturn'].'', $this->billrs['id']); if(isempt($this->rs['base_name']))$this->rs['base_name'] = $this->billrs['uname']; if(isempt($this->rs['base_deptname']))$this->rs['base_deptname'] = $this->billrs['udeptname']; }else{ if($this->isflow>0)$this->savebill(); } if($this->isflow>0){ if($this->rs['status']==1 && $this->rs['isturn']=='0'){ $this->update(array('isturn' => 1), $this->id); $this->rs['isturn'] = 1; if($this->billrs)$this->billmodel->update('`isturn`=1', $this->billrs['id']); } } $this->getlogrows = array(); if($ispd)$this->isreadqx(); $this->rssust = $this->rs; $this->flowchangedata(); $this->rs['base_systitle'] = TITLE; $this->rs['base_modename'] = $this->modename; $this->rs['base_sericnum'] = $this->sericnum; $this->rs['base_summary'] = $this->getsummary(); } public function getdaiban() { $s = $this->rock->dbinstr('nowcheckid', $this->adminid); $to = $this->billmodel->rows('`modeid`='.$this->modeid.' and `isdel`=0 and `status` not in(1,2) and '.$s.''); return $to; } public function isreadqx($glx=0) { $bo = false; if($this->adminid==1)$bo=true; if($this->uid==$this->adminid && $this->adminid>0)$bo=true; if(!$bo && $this->isflow>0){ if($this->billrs){ $allcheckid = $this->billrs['allcheckid']; if(contain(','.$allcheckid.',',','.$this->adminid.','))$bo = true; } } if(!$bo){ if($this->urs && contain($this->urs['superpath'],'['.$this->adminid.']'))$bo = true; } if(!$bo){ $tos = $this->todosmodel->rows("".$this->mwhere." and `uid`='$this->adminid'"); if($tos>0)$bo=true; } if(!$bo){ $tos = $this->chaomodel->rows($this->mwhere.' and '.$this->rock->dbinstr('csnameid', $this->adminid).''); if($tos>0)$bo=true; } if(!$bo){ $tos = $this->db->rows('[Q]todo', "`uid`='$this->adminid' and ".$this->mwhere.""); if($tos>0)$bo=true; } if(!$bo)$bo = $this->flowisreadqx(); if(!$bo){ $bo = $this->isreadqxs(); } if(!$bo){ $tos = $this->isjiankongqx(); if($tos>0)$bo=true; } if($glx==1)return $bo; if(!$bo)$this->echomsg('鏃犳潈闄愭煡鐪嬫ā鍧梉'.$this->modenum.'.'.$this->modename.']'.$this->uname.'鐨勬暟鎹紝璇疯仈绯荤鐞嗗憳鍒癧娴佺▼妯″潡鈫掓祦绋嬫ā鍧楁潈闄怾涓嬭缃'); } public function isreadqxs() { $bo = false; $where = $this->viewmodel->viewwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=true; return $bo; } public function iseditqx() { $bo = 0; if($bo==0 && $this->isflow>0){ if($this->billrs && ($this->uid == $this->adminid || $this->optid==$this->adminid)){ if($this->billrs['nstatus']==0 || $this->billrs['nstatus']==2){ $bo = 1; } } if($this->rs['status']==1)$bo=0; } if($bo==0){ $where = $this->viewmodel->editwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } return $bo; } public function isdeleteqx() { $bo = 0; if($bo==0 && $this->isflow>0){ if($this->billrs && ($this->uid == $this->adminid || $this->optid==$this->adminid)){ if($this->billrs['nstatus']==0 || $this->billrs['nstatus']==2){ $bo = 1; } } if($this->rs['status']==1)$bo=0; } if($bo==0){ $where = $this->viewmodel->deletewhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } $isd = $this->flowisdeleteqx(); if(is_numeric($isd) && $isd <= 1)$bo = $isd; return $bo; } public function isjiankongqx() { $bo = 0; if($bo==0){ $where = $this->viewmodel->jiankongwhere($this->moders, $this->adminid, $this->flowviewufieds); $where = str_replace('{asqom}','', $where); $tos = $this->rows("`id`='$this->id' $where "); if($tos>0)$bo=1; } return $bo; } public function getfields($lx=0) { $fields = array(); if(!$this->fieldsarra)$this->tfieldsarra(); $farr = $this->fieldsarra; foreach($farr as $k=>$rs)if($rs['iszs']=='1')$fields[$rs['fields']] = $rs['name']; $fters = $this->flowgetfields($lx); if(is_array($fters))$fields = array_merge($fields, $fters); return $fields; } public function getinputurl($num='',$mid=0,$can=array()) { if($num=='')$num = $this->modenum; $xa = 'lu'; if($this->ismobile==1)$xa = 'lum'; $url = 'index.php?a='.$xa.'&m=input&d=flow&num='.$num.'&mid='.$mid.''; if(is_array($can)){ foreach($can as $k=>$v)$url.='&'.$k.'='.$v.''; }else{ $url .= '&'.$can.''; } return $url; } public function replacepbr(&$arr, $k) { $val = arrvalue($arr, $k); if(!c('html')->ishtml($val))$arr[$k] = str_replace("\n",' '; unset($fields['base_name']); unset($fields['base_deptname']); } $contvimr .= '', $val); return $arr; } public function getdatalog($lx=0, $isdy=0) { m('log')->addread($this->mtable, $this->id); $this->todosmodel->biaoyidu($this->adminid, $this->modenum, $this->id); $fobj = m('file'); $this->ismobile = $lx; $arr['modename'] = $this->modename; $arr['title'] = $this->modename; $arr['modeid'] = $this->modeid; $arr['modenum'] = $this->modenum; $arr['mid'] = $this->id; $arr['status'] = arrvalue($this->rs,'status'); $arr['logarr'] = $this->getlog(1); $arr['isplview'] = arrvalue($this->moders,'ispl','0'); $arr['isys'] = arrvalue($this->moders,'isys','0'); $contview = ''; $lsds = ($isdy==2) ? $isdy: $lx; $path = ''.P.'/flow/page/view_'.$this->modenum.'_'.$lsds.'.html'; if(COMPANYNUM){ $path1 = ''.P.'/flow/page/view_'.$this->modenum.'_'.COMPANYNUM.'_'.$lsds.'.html'; if(file_exists($path1))$path = $path1; } $fstr = $fobj->getstr($this->mtable, $this->id, 3); $issubtabs = 0; if($fstr != ''){ $this->rs['file_content'] = $fstr; } $subdata = $this->getsuballdata(1); $this->rs['subdatarows'] = $subdata; $data = $this->flowrsreplace($this->rs, ($isdy==2) ? 3 : 1); $dataa = $this->viewjinfields(array($data)); $data = $dataa[0]; if($subdata){ $zbzd = m('flow_element')->getrows("`mid`='$this->modeid' and `iszb`>0 and `iszs`=1 and `fieldstype` in('uploadimg','uploadfile','textarea')",'`name`,`fields`,`fieldstype`,`iszb`','`iszb`,`sort`'); foreach($subdata as $zb=>$da){ $sub = $da['fields']; $data[$sub] = $this->getsubdata($zb,$da['data'],arrvalue($data,'subdatays'.$zb.'',$lx)); $data[''.$sub.'_style'] = 'padding:0'; } } $farrobj = $chufarr= array(); if(method_exists($this, 'flowxiangfields'))$chufarr = $this->flowxiangfields($chufarr); $farrobj['base_sericnum'] = array('name'=>arrvalue($chufarr,'base_sericnum','鍗曞彿')); $farrobj['base_name'] = array('name'=>arrvalue($chufarr,'base_name','鐢宠浜')); $farrobj['base_deptname'] = array('name'=>arrvalue($chufarr,'base_deptname','鐢宠浜洪儴闂')); $farrobj['base_status'] = array('name'=>arrvalue($chufarr,'base_status','娴佺▼鐘舵')); $farrobj['file_content'] = array('name'=>arrvalue($chufarr,'file_content','鐩稿叧鏂囦欢')); foreach($this->fieldsarra as $k=>$rs){ $fid = $rs['fields']; $fty = $rs['fieldstype']; if($fty=='uploadfile'){ $fval = arrvalue($data, $fid); if(isempt($fval))$fval='0'; $data[$fid] = ''; if($fval!='0'){ $data[$fid] = $fobj->getstr('', '', 3, "`id` in($fval)"); } } if($fty=='uploadimg' || $fty=='graph'){ $fval = arrvalue($data, $fid); if(!isempt($fval) && substr($fval,0,4)!=' '; $data[$key2].= $str1; } $ztass = $this->getnowstatus(); $data['base_status'] = $ztass[3]; if(file_exists($path)){ $contview = $this->flowviewtpl(file_get_contents($path), $lx); preg_match_all('/\^(.*?)\^/', $contview, $list); foreach($list[1] as $k=>$nrs){ $fzdrs = arrvalue($farrobj, $nrs); if($fzdrs)$contview = str_replace('^'.$nrs.'^', $fzdrs['name'], $contview); } $contview = $this->rock->reparr($contview, $data); } $arr['isdefaultview'] = 0; foreach($chufarr as $f1=>$v1)$qfields[$f1] = $v1; if($this->isempt($contview) || contain($contview, '$contview$')){ $arr['isdefaultview'] = 1; $_fields = array(); if($this->isflow>0){ $_fields['base_sericnum'] = $farrobj['base_sericnum']['name']; $_fields['base_name'] = $farrobj['base_name']['name']; $_fields['base_deptname'] = $farrobj['base_deptname']['name']; $_fields['base_status'] = $farrobj['base_status']['name']; } $fields = array_merge($_fields, $this->getfields($lx)); if($fstr!='')$fields['file_content'] = $farrobj['file_content']['name']; foreach($subdata as $zb=>$da){ $fields[$da['fields']] = $da['name']; } if($qfields)$fields = array_merge($fields,$qfields); if($lx==0)foreach($fields as $k=>$rs){$data[''.$k.'_style'] = 'width:75%';break;} $_colsr = $this->xiangbordercolor; if($_colsr=='')$_colsr = getconfig('bcolorxiang'); $contvimr = c('html')->xiangtable($fields, $data, $_colsr); $contvimr = ' '.$contvimr.' '; if($lx==1){ $contvimr = ''; if($this->isflow>0){ $contvimr.='
', (string)$rs['explain']); $rows[$k]['explain'] = $rows[$k]['sm']; if(!isempt($rs['qmimg'])){ if(!contain($rs['qmimg'],'.')){ $qmimg = ''.UPDIR.'/'.date('Y-m').'/qmimg'.$rs['id'].'.png'; $bo = true; if(!file_exists($qmimg)){ $bar= explode(',', $rs['qmimg']); $bo = $this->rock->createtxt($qmimg, base64_decode($bar[1])); } if(!$bo){ $qmimg = $rs['qmimg']; }else{ $qmimg = ''.URL.''.$qmimg.''; } }else{ $qmimg = $rs['qmimg']; if(!file_exists($qmimg)){ $qmimg = ''; }else{ $qmimg = ''.URL.''.$qmimg.''; } } $rows[$k]['qmimg'] = $qmimg; if(!isempt($qmimg))$rows[$k]['explain']= ' '); } } if($uids!=''){ $rows = m('admin')->getadmininfor($rows, substr($uids, 1), 'checkid'); } $this->getlogrows[$lx] = $rows; return $rows; } public function addlog($arr=array()) { $addarr = array( 'table' => $this->mtable, 'mid' => $this->id, 'checkname' => $this->adminname, 'checkid' => $this->adminid, 'optdt' => $this->rock->now, 'courseid' => '0', 'status' => '1', 'ip' => $this->rock->ip, 'web' => $this->rock->web, 'modeid' => $this->modeid ); foreach($arr as $k=>$v)$addarr[$k]=$v; if(isset($addarr['explain']))$addarr['explain']= htmlspecialchars($addarr['explain']); $this->flogmodel->insert($addarr); $ssid = $this->db->insert_id(); $fileid = $this->rock->post('fileid'); if($fileid!='')m('file')->addfile($fileid, 'flow_log', $ssid, $this->modenum.'|'.$this->id); $logfileid = $this->rock->post('logfileid'); if($logfileid!='')m('file')->addfile($logfileid, 'flow_log', $ssid, $this->modenum.'|'.$this->id); $addarr['id'] = $ssid; $this->flowaddlog($addarr); $this->getlogrows = array(); return $ssid; } public function submit($na='', $sm='') { if($na=='')$na='鎻愪氦'; $isturn = 1; if($na=='淇濆瓨')$isturn = 0; $this->addlog(array( 'name' => $na, 'explain' => $sm )); if($this->isflow>0){ $marr['isturn'] = $isturn; $marr['status'] = 0; $this->rs['status'] = 0; $this->update($marr, $this->id); if(arrvalue($this->moders,'isflowlx')=='1' || $this->isflow>=3){ $this->checksmodel->delete($this->mwhere); $this->flogmodel->update('`valid`=0', ''.$this->mwhere.' and `courseid`>0 and `valid`=1'); } $farr = $this->getflow(); if($farr['nowcourseid']>0){ $sysnextoptid = $this->rock->post('sysnextoptid'); $sysnextopt = $this->rock->post('sysnextopt'); $sysnextcustidid = (int)$this->rock->post('sysnextcustidid'); if($sysnextcustidid == $farr['nowcourseid'] && !isempt($sysnextoptid) && !isempt($sysnextopt)){ $this->addcheckname($sysnextcustidid, $sysnextoptid, $sysnextopt, true, 1); $farr = $this->getflow(); } } $farr['status'] = 0; $this->savebill($farr); if($isturn == 1){ $this->nexttodo($farr['nowcheckid'],'submit'); } } $this->flowsubmit($na, $sm); $this->savecsname( $this->rock->post('syschaosongid'), $this->rock->post('syschaosong'), $this->adminid,0,$isturn,$na); if($na=='缂栬緫'){ $this->gettodosend('boedit'); }else{ $this->gettodosend('boturn'); } } private function savecsname($csnameid,$csname,$uid,$type,$isturn, $na) { if(!isempt($csnameid)){ $where = $this->mwhere.' and `type`='.$type.''; if($type>0)$where.=' and `uid`='.$uid.''; $csid = (int)$this->chaomodel->getmou('id', $where); if($csid==0)$where = ''; $this->chaomodel->record(array( 'modeid' => $this->modeid, 'table' => $this->mtable, 'mid' => $this->id, 'uid' => $uid, 'type' => $type, 'csname' => $csname, 'csnameid' => $csnameid, ),$where); if($isturn==1)$this->nexttodo($csnameid,'chao', $na); } } public function getcsname($id=0) { if($id>0){ $where= "`table`='$this->mtable' and `mid`='$id' and `type`=0"; }else{ $where= "`modeid`={$this->modeid} and `uid`={$this->adminid} and `type`=0"; $iscs = (int)$this->moders['iscs']; } $ors = $this->chaomodel->getone($where,'*','`id` desc'); $csname = $csnameid = ''; if($ors){ $csname = $ors['csname']; $csnameid = $ors['csnameid']; } return array( 'csname' => $csname, 'csnameid' => $csnameid, 'id' => $id, ); } public function zhuijiaexplain($sm='') { $this->addlog(array( 'explain' => $sm, 'name' => '杩藉姞璇存槑', 'status' => 1, )); $zt = $this->rs['status']; if($zt==2 && $this->isflow>0 && $this->adminid==$this->uid){ $marr['status'] = 0; $this->rs['status'] = 0; $this->update($marr, $this->id); $farr = $this->getflow(); $farr['status'] = 0; $this->savebill($farr); $this->nexttodo($farr['nowcheckid'],'zhui', $sm); } $this->gettodosend('bozhui','', $sm); } public function chuiban($sm='') { $this->addlog(array( 'explain' => $sm, 'name' => '鍌姙', 'status' => 1, )); $farr = $this->getflow(true); $this->nexttodo($farr['nowcheckid'],'cuiban', $sm); $this->gettodosend('cuiban','', $sm); } public function getyushen($rows) { return $rows; } private function getyushenss($id, $rows, $xu, $isq) { if($xu==0)$this->_tempauoe = array(); if(isset($rows[$id])){ $_tars = $rows[$id]; if($isq==1)$this->getyushenss($_tars['id'], $rows, $xu+1, $isq); $this->_tempauoe[] = $_tars; if($isq==0)$this->getyushenss($_tars['id'], $rows, $xu+1, $isq); } return $this->_tempauoe; } public function getflowpipei($uid=0) { $urs = $this->urs; if(!$urs)$urs = $uid; if(!is_array($urs))$urs = $this->db->getone('[Q]admin', "`id`='$urs'", '`deptid`,`deptpath`,`id`'); $coursedb = m('flowcourse'); $barr = $coursedb->pipeiCourse($this->modeid); $rows = $barr['rows']; $this->pipeiCoursearrc = $barr['rowd']; $this->pipeiCoursearrs = array(); $this->pipeiCoursearr = array(); $kqobj = m('kaoqin'); $this->getflowpipeis($rows, $urs, $kqobj); unset($this->pipeiCoursearrs); unset($this->pipeiCoursearrc); return $this->getyushen($this->pipeiCoursearr); } private function getflowpipeis($rows,$urs, $kqobj) { $shiyong = array(); $defix = $xuhao = 0; $uid = arrvalue($urs,'id',0); $zshu = count($rows); foreach($rows as $k=>$rs){ $whereid = (int)$rs['whereid']; $receid = $rs['receid']; $wherestr= arrvalue($rs, 'where'); if($rs['status']=='0')continue; if(!isempt($wherestr)){ $wherestr = m('base')->strreplace($this->rock->jm->base64decode($wherestr), $uid); $to = $this->rows("`id`='$this->id' and $wherestr "); if($to==0)continue; } if($whereid > 0){ $bo = $this->wheremanzhu($whereid); if(!$bo)continue; } if(!isempt($rs['num'])){ $bo = $this->flowcoursejudge($rs['num'], $rs); if(is_bool($bo) && !$bo)continue; } $xuhao++; if($defix==0 && (isempt($receid) || contain($receid,'all'))){ $defix = $xuhao; } if(isempt($receid) && (!isempt($wherestr) || $whereid > 0)){ $defix = $xuhao; } $rs['xuhao'] = $xuhao; $shiyong[] = $rs; } $pboss = false; if($shiyong){ $gxuha = $kqobj->getpipeimid($urs, $shiyong, 'xuhao', $defix); if($gxuha>0){ $pboss = true; $gxuha = $gxuha-1; $prs = $shiyong[$gxuha]; $this->getflowpipeisss($prs, $urs, $kqobj); } } if(!$pboss && $zshu==1 && $rows[0]['childshu']>0){ $this->getflowpipeis($rows[0]['children'], $urs, $kqobj); } } private function getflowpipeisss($prsnrs, $urs, $kqobj) { $prs = $prsnrs; unset($prs['children']); $this->pipeiCoursearrs[]= $prs['id']; $this->pipeiCoursearr[] = $prs; if($prs['childshu']>0){ $this->getflowpipeis($prsnrs['children'], $urs, $kqobj); }else{ $nid = arrvalue($prs,'nid','0'); if($nid>0 && !in_array($nid, $this->pipeiCoursearrs) && isset($this->pipeiCoursearrc, $nid)){ $this->getflowpipeis(array($this->pipeiCoursearrc[$nid]), $urs, $kqobj); } } } public function getflow($sbo=false) { $this->flowarr = array(); $allcheckid = $nowcheckid = $nowcheckname = $nstatustext = ''; $allcheckids = array(); $nowcourseid = 0; $nstatus = $this->rs['status']; $this->nowcourse = array(); $this->nextcourse = array(); $this->flowisend = 0; $curs = $this->flogmodel->getrows($this->mwhere,'checkid,checkname,courseid,`valid`,`status`,`statusname`,`name`,`iszb`','id desc'); $cufss = $ztnas = $chesarr = array(); foreach($curs as $k=>$rs){ if($rs['iszb']=='1' && !in_array($rs['checkid'], $allcheckids))$allcheckids[] = $rs['checkid']; if($rs['courseid']=='0')continue; $_su = ''.$rs['courseid'].''; $_su1 = ''.$rs['courseid'].'_'.$rs['checkid'].''; if($rs['valid']==1 && in_array($rs['status'], $this->flowstatusarr)){ if(!isset($cufss[$_su]))$cufss[$_su]=0; $cufss[$_su]++; $chesarr[$_su1] = 1; } if(!in_array($rs['checkid'], $allcheckids))$allcheckids[] = $rs['checkid']; if($nstatustext=='' && $rs['courseid']>0){ $nstatustext = ''.$rs['checkname'].'澶勭悊'.$rs['statusname'].''; $nstatus = $rs['status']; } $ztnas[$rs['courseid']] = ''.$rs['checkname'].''.$rs['statusname'].''; } $nowstep = $zongsetp = -1; $isend = 0; $czt = $this->rs['status']; $coutye = 0; $rows = ($czt==1 || $czt==5)? array() : $this->getflowpipei($this->uid); if($rows){ $checksa = $this->checksmodel->getrows($this->mwhere.' and `addlx`=3'); $coursea = $nrows = array(); foreach($checksa as $k=>$rs)$coursea[$rs['courseid']]='1'; $nrows = array(); $allcheckid = ''; $isoptsuperbo = false; foreach($rows as $k=>$rs){ $uarr = $this->getcheckname($rs); $rows[$k]['checkid'] = $uarr[0]; $rows[$k]['checkname'] = $uarr[1]; $allcheckid .= ','.$uarr[0].''; if($rs['checktype']=='optsuper' && isempt($uarr[0]))$isoptsuperbo=true; } if($isoptsuperbo)foreach($rows as $k=>$rs){ if($rs['checktype']=='optsuper'){ $_k1 = $k-1; $_uid = $this->optid; if($_k1>=0){ $ours = $this->flogmodel->getone($this->mwhere.' and `courseid`='.$rows[$_k1]['id'].' and `valid`=1 ','`checkid`','`id` desc'); if(!$ours){ $_uid = (int)$rows[$_k1]['checkid']; }else{ $_uid = $ours['checkid']; } } $uarr = $this->adminmodel->getsuperman($_uid); if($uarr){ $rows[$k]['checkid'] = $uarr[0]; $rows[$k]['checkname'] = $uarr[1]; } } } foreach($rows as $k=>$rs){ $nrows[] = $rs; if($rs['checktype']=='superall'){ $ids1 = $rs['id']; $suparr = $this->adminmodel->getsuperarr($this->uid); if($suparr){ $logdsar = $this->getlog(); foreach($logdsar as $k1=>$rs1){ if($rs1['courseid']>0 && $rs1['status']=='1' && $rs1['valid']=='1')$allcheckid .= ','.$rs1['checkid'].''; } foreach($suparr as $k1=>$surs){ if(!contain(','.$allcheckid.',', ','.$surs['id'].',')){ $rs['oldid'] = $ids1; $rs['id'] = $ids1 * 99999 + $surs['id']; $rs['checkid'] = $surs['id']; $rs['checkname'] = $surs['name']; $rs['iszf'] = 0; $nrows[] = $rs; $allcheckid .= ','.$surs['id'].''; } } } } } $yisheh = ''; if($this->isflow==2){ $logdsar = $this->getlog(); foreach($logdsar as $k1=>$rs1) if($rs1['courseid']>0 && $rs1['status']==1 && $rs1['valid']==1)$yisheh .= ','.$rs1['checkid'].''; } foreach($nrows as $k=>$rs){ $whereid = (int)$rs['whereid']; $checkshu = $rs['checkshu']; $checkid = $rs['checkid']; $checkname = $rs['checkname']; $checktype = $rs['checktype']; if($this->isflow==2 && !isempt($checkid) && isempt($rs['checkfields'])){ if(($checkid==$this->uid || $checkid==$this->optid) )continue; $k2 = $k+1; $ntype = 'yes'; if(isset($nrows[$k2])){ if($nrows[$k2]['checktype']=='change')$ntype='no'; } if($ntype=='yes' && contain(','.$yisheh.',',','.$checkid.','))continue; } if(!isempt($checkid))$yisheh .= ','.$checkid.''; $zongsetp++; $ischeck = 0; $checkids = $checknames = ''; $_su = ''.$rs['id'].''; $nowshu = 0; if(isset($cufss[$_su]))$nowshu = $cufss[$_su]; if(!$this->isempt($checkid)){ $checkida = explode(',', $checkid); $checkidna = explode(',', $checkname); $_chid = $_chna = ''; foreach($checkida as $k1=>$chkid){ $_su1 = ''.$rs['id'].'_'.$chkid.''; if(!in_array($chkid, $allcheckids))$allcheckids[] = $chkid; if(!isset($chesarr[$_su1])){ $_chid.=','.$chkid.''; $_chna.=','.arrvalue($checkidna, $k1).''; } } if($_chid!='')$_chid = substr($_chid, 1); if($_chna!='')$_chna = substr($_chna, 1); if($_chid==''){ $ischeck = 1; }else{ if($checkshu>0&&$nowshu>=$checkshu)$ischeck = 1; } $checkids = $_chid; $checknames = $_chna; }else{ if($checkshu>0&&$nowshu>=$checkshu)$ischeck = 1; if($checkshu == 0 && $nowshu>0)$ischeck = 1; } if($ischeck==0 && $coutye==0){ if((int)arrvalue($rs,'coursetype','0')>0)$coutye = 1; } $rs['ischeck'] = $ischeck; $rs['islast'] = 0; $rs['checkid'] = $checkid; $rs['checkname'] = $checkname; $rs['nowcheckid'] = $checkids; $rs['nowcheckname'] = $checknames; $rs['isnow'] = 0; $rs['nowstep'] = $zongsetp; $rs['step'] = $k+1; if($ischeck==0 && $nowstep==-1){ $rs['isnow']= 1; $nowstep = $zongsetp; $this->nowcourse = $rs; $nowcourseid = $rs['id']; $nowcheckid = $checkids; $nowcheckname = $checknames; } if($nowstep>-1 && $zongsetp==$nowstep+1)$this->nextcourse = $rs; $this->flowarr[]= $rs; } } if($zongsetp>-1)$this->flowarr[$zongsetp]['islast']=1; if($nowstep == -1){ $isend = 1; }else{ $nstatustext = '寰'.$nowcheckname.'澶勭悊'; } $this->flowisend = $isend; $allcheckid = join(',', $allcheckids); $arrbill['allcheckid'] = $allcheckid; $arrbill['nowcourseid'] = $nowcourseid; $arrbill['nowcheckid'] = $nowcheckid; $arrbill['nowcheckname'] = $nowcheckname; $arrbill['nstatustext'] = $nstatustext; $arrbill['nstatus'] = $nstatus; $arrbill['status'] = $this->rs['status']; $arrbill['isturn'] = $this->rs['isturn']; if($sbo)$this->getflowsave($arrbill); return $arrbill; } public function wheremanzhu($id) { $uid = $this->uid; $ser = $this->wheremodel->getflowwhere($id, $uid); if(!$ser)return true; $str = $ser['ntr']; if(!isempt($str)){ $to = $this->db->rows('[Q]admin',"`id`='$uid' and ($str)"); if($to>0)return false; } $str = $ser['str']; if(!isempt($str)){ $str= str_replace('{asqom}','', $str); $to = $this->rows("`id`='$this->id' and $str"); if($to==0)return false; } $str = $ser['utr']; if(!isempt($str)){ $to = $this->db->rows('[Q]admin',"`id`='$uid' and $str"); if($to==0)return false; } return true; } public function getflowsave($sarr, $suvu=false) { if(!$sarr)return; if($suvu)$sarr['updt'] = $this->rock->now; $this->billmodel->update($sarr, $this->mwhere); } private function getcheckname($crs) { $type = $crs['checktype']; $cuid = $name = ''; $courseid= $crs['id']; $cheorws = $this->checksmodel->getall($this->mwhere.' and `courseid`='.$courseid.'','checkid,checkname'); if($cheorws){ foreach($cheorws as $k=>$rs){ $lxss = $rs['checkid']; if(isempt($lxss) || $lxss=='0')continue; $cuid.=','.$lxss.''; $name.=','.$rs['checkname'].''; } if($cuid != ''){ $cuid = substr($cuid, 1); $name = substr($name, 1); return array($cuid, $name); } } if(!$this->isempt($crs['num'])){ $uarr = $this->flowcheckname($crs['num']); if(is_array($uarr)){ if(!$this->isempt($uarr[0]))return $uarr; } } if($type=='super' || $type=='superall'){ $cuid = $this->urs['superid']; $name = $this->urs['superman']; } if($type=='dept' || $type=='super' || $type=='superall'){ if($this->isempt($cuid) && $this->drs){ $cuid = $this->drs['headid']; $name = $this->drs['headman']; } } if($type=='apply'){ $cuid = $this->urs['id']; $name = $this->urs['name']; } if($type=='opt'){ $cuid = $this->rs['optid']; $name = $this->rs['optname']; if(isempt($cuid)){ $cuid = $this->urs['id']; $name = $this->urs['name']; } } if($type=='user'){ $cuid = $crs['checktypeid']; $name = $crs['checktypename']; } if($type=='rank'){ $rank = $crs['checktypename']; if(!$this->isempt($rank)){ $wheer1 = $this->adminmodel->getcompanywhere(5,'',$this->companyid); $rnurs = $this->db->getrows('[Q]admin',"`status`=1 and `ranking`='$rank' ".$wheer1."",'id,name','sort'); foreach($rnurs as $k=>$rns){ $cuid.=','.$rns['id'].''; $name.=','.$rns['name'].''; } if($cuid != ''){ $cuid = substr($cuid, 1); $name = substr($name, 1); } } } if($type=='cname'){ $cnbar = $this->cnamemodel->getcheckname($crs['checktypeid'], $this->uid); $cuid = arrvalue($cnbar, 0); $name = arrvalue($cnbar, 1); } if($type=='field'){ $fids = $crs['checktypeid']; if(!isempt($fids)){ $vals = ''; $farrs= explode(',', $fids); foreach($farrs as $fid){ $vid = arrvalue($this->rs, $fid); if(!isempt($vid))$vals.=','.$vid.''; } if($vals!=''){ $vals = substr($vals, 1); $uarr = $this->adminmodel->getrows('`status`=1 and `id` in('.$vals.')','id,name','FIELD(`id`,'.$vals.')'); foreach($uarr as $k=>$rs){ $cuid.=','.$rs['id'].''; $name.=','.$rs['name'].''; } if($cuid != ''){ $cuid = substr($cuid, 1); $name = substr($name, 1); } } } } $cuid = $this->rock->repempt($cuid); $name = $this->rock->repempt($name); return array($cuid, $name); } public function createbianhao($num, $fid, $wshu=3) { if(isempt($num))$num=''.$this->modenum.'-'; @$appdt = $this->rs['applydt']; if(isempt($appdt))$appdt = $this->rock->date; $apdt = str_replace('-','', substr($appdt,0,10)); $num = str_replace('Ymd',$apdt,$num); return $this->db->sericnum($num,'[Q]'.$this->mtable.'', $fid, $wshu); } public function createinputnum($num, $fid) { $acta = ''; if(method_exists($this, $num)){ $acta = $num; }else{ if(contain($num, ',')){ $arra = explode(',', $num); $acta = $arra[0]; $num = $arra[1]; } } if($acta && method_exists($this, $acta)){ $barr = $this->$acta($num); if(is_array($barr)){ $qom = arrvalue($barr, 'qom', $num); $wshu= arrvalue($barr, 'wshu', 3); $bom = arrvalue($barr, 'bom'); $fields = arrvalue($barr, 'fields', $fid); return $this->createbianhao($qom, $fields, $wshu).$bom; }else{ if(isempt($barr))$barr = $num; return $this->createbianhao($barr, $fid); } }else{ return $this->createbianhao($num, $fid); } } public function createnum() { $num = $this->moders['sericnum']; if($num=='鏃'||$this->isempt($num))$num='TM-Ymd-'; @$appdt = $this->rs['applydt']; if(isempt($appdt))$appdt = $this->rock->date; $apdt = str_replace('-','', $appdt); $num = str_replace('Ymd',$apdt,$num); return $this->db->sericnum($num,'[Q]flow_bill', 'sericnum', 3); } public function savebill($oarr=array()) { $dbs = $this->billmodel; $whes= $this->mwhere; $birs= $dbs->getone($whes); $arr = array( 'table' => $this->mtable, 'mid' => $this->id, 'optdt' => isset($this->rs['optdt']) ? $this->rs['optdt'] : $this->rock->now, 'optname' => arrvalue($this->rs,'optname', $this->adminname), 'optid' => arrvalue($this->rs,'optid', $this->adminid), 'modeid' => $this->modeid, 'updt' => $this->rock->now, 'isturn' => $this->rs['isturn'], 'nstatus' => $this->rs['status'], 'applydt' => $this->rs['applydt'], 'modename' => $this->modename, 'uname' => $this->rs['base_name'], 'udeptname' => $this->rs['base_deptname'], 'uid' => $this->uid, 'isdel' => '0', ); foreach($oarr as $k=>$v)$arr[$k]=$v; if(!$birs){ $arr['status'] = $arr['nstatus']; $arr['createdt']= $arr['optdt']; $arr['sericnum']= $this->createnum(); $arr['udeptid'] = $this->rock->post('sysudeptid', arrvalue($this->urs,'deptid')); $whes = ''; $this->sericnum = $arr['sericnum']; }else{ $udeptid = $birs['udeptid']; if($udeptid==0)$arr['udeptid']= arrvalue($this->urs,'deptid'); } $fstr = $this->rock->post('sysflow5str'); if($fstr)$arr['flow5str'] = $fstr; $dbs->record($arr, $whes); return $arr; } public function getsummary() { return $this->rock->reparr($this->moders['summary'], $this->rs); } public function addcheckname($courseid, $uid, $uname, $onbo=false, $addlx=0) { if(isempt($uid)){$uid = '0';$uname= 'auto';} $uida = explode(',', ''.$uid.''); $uidan = explode(',', $uname); if($onbo)$this->checksmodel->delete($this->mwhere.' and `courseid`='.$courseid.''); if($uida)foreach($uida as $k=>$uid){ $uname = $this->rock->arrvalue($uidan, $k); $zyarr = array( 'table' => $this->mtable, 'mid' => $this->id, 'modeid' => $this->modeid, 'courseid' => $courseid, 'optid' => $this->adminid, 'optname' => $this->adminname, 'addlx' => $addlx, 'optdt' => $this->rock->now, 'status' => 0 ); $this->checksmodel->delete($this->mwhere.' and `checkid`='.$uid.' and `courseid`='.$courseid.''); $zyarr['checkid'] = $uid; $zyarr['checkname'] = $uname; $this->checksmodel->insert($zyarr); } if($addlx==4)$this->checksmodel->delete($this->mwhere.' and `checkid`='.$this->adminid.' and `courseid`='.$courseid.''); } public function savedatastr($fval, $farr, $data=array()) { $str = ''; if(!$farr)return $str; $savewhere = $farr['savewhere']; $name = $farr['name']; $types = $farr['fieldstype']; if(isempt($savewhere) || isempt($fval))return $str; $savewhere = str_replace(array('{0}','{date}','{now}'), array($name, $this->rock->date,$this->rock->now), $savewhere); $savewhere = $this->rock->reparr($savewhere, $data); $saees = explode(',', $savewhere); if($types=='date' || $types=='datetime')$fval = strtotime($fval); if($types=='number')$fval = floatval($fval); foreach($saees as $saeess){ $fsaed = explode('|', $saeess); $msg = isset($fsaed[2]) ? $fsaed[2] : ''.$name.'鏁版嵁涓嶇鍙'; $val = isset($fsaed[1]) ? $fsaed[1] : ''; $lfs = $fsaed[0]; if($val != ''){ if($types=='date' || $types=='datetime')$val = strtotime($val); if($types=='number')$val = floatval($val); if($lfs=='gt'){$bo = $fval>$val;if(!$bo)return $msg;} if($lfs=='egt'){$bo = $fval>=$val;if(!$bo)return $msg;} if($lfs=='lt'){$bo = $fval<$val;if(!$bo)return $msg;} if($lfs=='elt'){$bo = $fval<=$val;if(!$bo)return $msg;} if($lfs=='eg'){$bo = $fval==$val;if(!$bo)return $msg;} if($lfs=='neg'){$bo = $fval!=$val;if(!$bo)return $msg;} } } return $str; } public function update($arr, $where) { if(is_array($arr)){ foreach($arr as $k=>$v)$this->rs[$k]=$v; } return parent::update($arr,$where); } public function updatelogvalid($whe) { $this->flogmodel->update('valid=0', $this->mwhere.' '.$whe); } public function strappend($sm, $str, $fh=',') { if(isempt($str))return $sm; if(!isempt($sm))$sm.=$fh; $sm.=$str; return $sm; } public function checkerror($lx=1,$sm='') { if($sm=='')$sm='鍗曟嵁寮傚父绠$悊鍛樺鐞'; $msg = $this->check($lx, $sm, 1); return $msg; } public function check($zt, $sm='', $lx=0) { if($this->rs['status']==1)return '娴佺▼宸插鐞嗗畬鎴,鏃犻渶鎿嶄綔'; $arr = $this->getflow(); $flowinfor = $this->getflowinfor(); if($flowinfor['ischeck']==0 && $lx==0)return '褰撳墠鏄痆'.$arr['nowcheckname'].']澶勭悊'; $nowcourse = $this->nowcourse; if($lx==1){ if($arr['nowcourseid']!=0)return '褰撳墠鏈夊鏍告楠D鏄瓨鍦ㄧ殑涓嶈兘鐩存帴鏍囪瘑宸插畬鎴'; $to = $this->flogmodel->rows($this->mwhere.' and `courseid`>0 and `status`=1'); if($to==0)return '璇ュ崟鎹病鏈変换浣曢氳繃瀹℃牳澶勭悊涓嶈兘鐩存帴鏍囪瘑宸插畬鎴愭垨宸插鏍'; $nowcourse = array('id'=>66666,'name'=>'寮傚父澶勭悊','step'=>0); } $nextcourse = $this->nextcourse; $zynameid = $this->rock->post('zynameid'); $zyname = $this->rock->post('zyname'); $csnameid = ''; $csname = ''; $nextname = $this->rock->post('nextname'); $nextnameid = $this->rock->post('nextnameid'); $qmimgstr = $this->rock->post('qmimgstr'); $tuiid = (int)$this->rock->post('tuiid'); $iszhuanyi = $ischangenext = 0; if($zt==1 && $this->isflow!=3 && isempt($zynameid) && arrvalue($nextcourse,'checktype')=='change'){ $ischangenext = 1; } if($zt!=2)$tuiid = 0; $istongyi = in_array($zt, $this->flowstatusarr); if($zynameid!='' && $istongyi){ if($zynameid==$this->adminid)return '涓嶈兘杞粰鑷繁'; $sm = $this->strappend($sm, '杞粰锛'.$zyname.''); $iszhuanyi = 1; $this->rs['syszb_name'] = $zyname; $this->rs['syszb_nameid'] = $zynameid; } if($nextnameid=='' && $ischangenext==1)return '璇烽夋嫨涓嬩竴姝ュ鐞嗕汉'; $ufied = array(); if($iszhuanyi == 0 && $zt!=2){ foreach($flowinfor['checkfields'] as $chef=>$chefv){ $ufied[$chef] = $_val = $this->rock->post('cfields_'.$chef.''); if(isempt($_val) && $chefv['isbt']=='1')$this->echomsg(''.$chefv['name'].'涓嶈兘涓虹┖'); $_stype = arrvalue($chefv, 'fieldstype'); if($_stype=='graph')$ufied[$chef] = c('input')->createqianming($_val); $_str = $this->savedatastr($_val, $chefv['fieldsarr'], $this->rs); if($_str!='')$this->echomsg($_str); } } $this->checkiszhuanyi = $iszhuanyi; $barr = $this->flowcheckbefore($zt, $ufied, $sm); $msg = ''; if(is_array($barr) && isset($barr['msg']))$msg = $barr['msg']; if(is_array($barr) && isset($barr['update'])){ foreach($barr['update'] as $_k=>$_v)$ufied[$_k] = $_v; } if(is_string($barr))$msg = $barr; if(!isempt($msg))return $msg; if($ufied){ $bo = $this->update($ufied, $this->id); if(!$bo)return 'dberr:'.$this->db->error(); } $courseact = $flowinfor['courseact']; $act = $courseact[$zt]; $statusname = $act[0]; $statuscolor= $act[1]; $nzt = $act[2]; $courseid = $nowcourse['id']; $this->checksmodel->update('`status`='.$zt.'', $this->mwhere.' and `checkid`='.$this->adminid.' and `courseid`='.$courseid.''); if($iszhuanyi == 1){ $this->addcheckname($courseid, $zynameid, $zyname, false, 4); $nowcourse['id'] = 0; } if($ischangenext==1){ $this->addcheckname($nextcourse['id'], $nextnameid, $nextname, true, 1); } $tuirs = array(); if($tuiid > 0)$tuirs = $this->flogmodel->getone($tuiid); if(!$tuirs)$tuiid = 0; if($tuiid>0){ $sm = $this->strappend($sm, '閫鍥炲埌['.$tuirs['name'].'('.$tuirs['checkname'].')]'); $statusname = '閫鍥'; $statuscolor = '#17B2B7'; } $this->checkistui = $tuiid; $logsm = $sm; if($iszhuanyi==0 && $csname)$logsm = $this->strappend($logsm,'鎶勯佺粰锛'.$csname.''); $this->lastlogid = $this->addlog(array( 'courseid' => $nowcourse['id'], 'name' => $nowcourse['name'], 'step' => $nowcourse['step'], 'status' => $zt, 'statusname'=> $statusname, 'color' => $statuscolor, 'explain' => $logsm, 'iszb' => $iszhuanyi, 'qmimg' => $qmimgstr )); if($tuiid > 0){ $this->addcheckname($tuirs['courseid'], $tuirs['checkid'], $tuirs['checkname'], true, 3); $this->updatelogvalid('and `courseid`>0 and `status`=1 and `step`>='.$tuirs['step'].''); } $lzt = $this->rock->repempt($nzt, $zt); $uparr = $nexttodoarr = $nexttodoarc = array(); $bsarr = $this->getflow(); $bsarr['tuiid'] = $tuiid; $nextcheckid = $bsarr['nowcheckid']; if($istongyi){ if($iszhuanyi==0){ $uparr['status']= $this->rock->repempt($nzt,'0'); } $nexttodoarr = array($nextcheckid, 'next', $sm, $statusname); }else{ if($tuiid>0){ $lzt = 23; $nexttodoarr = array($nextcheckid, 'tui', $sm, $statusname); }elseif($zt==2){ $nexttodoarr = array($this->optid, 'nothrough', $sm, $statusname); } $uparr['status'] = $lzt; } $this->flowcheckafter($zt, $sm, $nowcourse); $bsarr['nstatus'] = $lzt; $bsarr['checksm'] = $sm; if(!$this->nowcourse){ $uparr['status'] = $lzt; $nexttodoarc = array($this->optid, 'finish', $sm, ''); } if($uparr){ $this->update($uparr, $this->id); } if(!$this->nowcourse){ $this->flowcheckfinsh($zt); if($istongyi){ $this->checksmodel->delete($this->mwhere); } } $bsarr['status'] = $this->rs['status']; $this->getflowsave($bsarr, true); if($this->db->backsql()){ $bos = ($courseid == arrvalue($this->nowcourse, 'id') && $istongyi); if($nexttodoarr && (!$bos || $iszhuanyi==1))$this->nexttodo($nexttodoarr[0],$nexttodoarr[1],$nexttodoarr[2],$nexttodoarr[3]); if($nexttodoarc)$this->nexttodo($nexttodoarc[0],$nexttodoarc[1],$nexttodoarc[2],$nexttodoarc[3]); } if($iszhuanyi == 1){ $this->gettodosend('bozhuan','', $sm, 0, ''.$this->adminname.'灏哰'.$nowcourse['name'].']杞粰:'.$zyname.''); }else{ if($istongyi)$this->gettodosend('botong', $statusname, $sm, $nowcourse['id']); if($zt==2)$this->gettodosend('bobutong',$statusname, $sm, $nowcourse['id']); if(!$this->nowcourse && $istongyi)$this->gettodosend('bofinish', '', $sm); } if($iszhuanyi==0){ $sm1 = '鍦ㄢ'.$nowcourse['name'].'鈥濆鐞'.$statusname.''; $this->savecsname($csnameid,$csname,$this->adminid,$nowcourse['id'],1, $sm1); } return 'ok'; } public function pushs($receid, $cont, $title='', $params=array()) { return $this->push($receid,'', $cont, $title, 0, $params); } public function getxiangurl($num='', $id=0, $lx='x') { if($num=='')$num = $this->modenum; if($id==0)$id = $this->id; $url = URL; if($lx=='auto')$lx = ($this->ismobile==1)?'x':'p'; if($lx=='x' || $lx=='a')$url = $this->rock->getouturl(); $url = ''.$url.'task.php?a='.$lx.'&num='.$num.'&mid='.$id.''; if(COMPANYNUM)$url.='&dwnum='.COMPANYNUM.''; return $url; } public function getxiangurlx($num='',$id=0){return $this->getxiangurl($num,$id,'x');} public function push($receid, $gname='', $cont='', $title='', $wkal=0, $params=array()) { if(isempt($receid) && $wkal==1)$receid='all'; if(isempt($receid))return false; if(contain(','.$receid.',', ',d1,'))$receid='all'; $modenum = arrvalue($params, 'modenum', $this->modenum); $modename = arrvalue($params, 'modename', $this->modename); $id = (int)arrvalue($params, 'id', $this->id); $moders = arrvalue($params, 'moders'); if(!is_array($moders))$moders = $this->moders; if($gname=='')$gname = $modename; $reim = m('reim'); $url = $this->getxiangurl($modenum, $id, 'p'); $wxurl = $this->getxiangurl($modenum, $id, 'x'); $emurl = $this->getxiangurl($modenum, $id, 'a'); if($id==0){ $url = '';$wxurl = '';$emurl=''; } $url = arrvalue($params, 'url', $url); $wxurl = arrvalue($params, 'wxurl', $wxurl); $emurl = arrvalue($params, 'emurl', $emurl); $slx = 0; $pctx = $moders['pctx']; $mctx = $moders['mctx']; $wxtx = $moders['wxtx']; $ddtx = $moders['ddtx']; $emtx = $moders['emtx']; if($pctx==0 && $mctx==1)$slx=2; if($pctx==1 && $mctx==0)$slx=1; if($pctx==0 && $mctx==0)$slx=3; $this->rs['now_adminname'] = $this->adminname; $this->rs['now_modename'] = $modename; $cont = $this->rock->reparr($cont, $this->rs); $receido= $receid; $receid = $this->adminmodel->gjoins($receid); $uids = m('todo')->addtodo($receid, $modename, $cont, $modenum, $id); if($uids!='' && $moders['type'] != '绯荤粺' && $id > 0)$this->todosmodel->addtotouids($uids, array( 'table' => $moders['table'], 'mid' => $id, 'modename' => $modename, 'modenum' => $modenum, )); $title = $this->rock->reparr($title, $this->rs); $reim->pushagent($uids, $gname, $cont, $title, $url, $wxurl, $slx, ''.$modenum.'|'.$id.''); $this->flowchangetodo($uids, $gname); if(isempt($title))$title = $modename; $this->flowweixinarr=array(); return $receid; } public function nexttodo($nuid, $type, $sm='', $act='') { $cont = ''; $tit = ''; $gname = '娴佺▼寰呭姙'; $summary= $this->getsummary(); if($type=='submit' || $type=='next' || $type == 'cuiban'){ $cont = '浣犳湁['.$this->uname.']鐨刐'.$this->modename.',鍗曞彿:'.$this->sericnum.']闇瑕佸鐞'; if($sm!='')$cont.='锛岃鏄:'.$sm.''; $tit = ''.$this->uname.'鐨'.$this->modename.''; if($type != 'cuiban'){ $txnum = $this->option->getval('sms_txnum'); if(!isempt($txnum)){ $mknum = $this->option->getval('sms_mknum'); if($mknum=='all' || contain(','.$mknum.',',','.$this->modenum.',')){ $wxurl = $this->getxiangurlx(); $barr = c('xinhuapi')->sendsms($nuid, '', $txnum, array( 'modename' => $this->modename, 'sericnum' => $this->sericnum, 'applyname'=> $this->uname, 'deptname' => $this->rs['base_deptname'], ),$wxurl); } } } $type = 'daiban'; } if($type == 'nothrough'){ $cont = '浣犳彁浜'.$this->modename.',鍗曞彿:'.$this->sericnum.']'.$this->adminname.'澶勭悊['.$act.']锛屽師鍥:['.$sm.']'; $gname= '娴佺▼鐢宠'; $tit = ''.$this->modename.'澶勭悊'.$act.''; } if($type == 'finish'){ $cont = '浣犳彁浜ょ殑['.$this->modename.',鍗曞彿:'.$this->sericnum.']宸插叏閮ㄥ鐞嗗畬鎴'; $gname= '娴佺▼鐢宠'; $tit = ''.$this->modename.'鍏ㄩ儴澶勭悊瀹屾垚'; } if($type == 'zhui'){ $cont = ''.$this->adminname.'杩藉姞鍗曟嵁璇存槑['.$this->modename.',鍗曞彿:'.$this->sericnum.']锛岃鏄:['.$sm.']'; } if($type == 'tui'){ $cont = '['.$this->adminname.']閫鍥炲崟鎹甗'.$this->modename.',鍗曞彿:'.$this->sericnum.']鍒颁綘杩欒鍙婃椂澶勭悊锛岃鏄:'.$sm.''; } if($type == 'chao'){ $cont = ''.$this->adminname.''.$sm.'浜嗏'.$this->modename.'鈥'; if(!isempt($summary))$cont.='锛屾憳瑕佲'.$summary.'鈥'; if($this->isflow>0)$cont.='锛屽崟鍙封'.$this->sericnum.'鈥'; $gname= ''; $tit = ''.$this->modename.'鐨勫崟鎹妱閫'; } if($type=='pinglun'){ $cont = ''.$this->adminname.''.$act.'浣犵殑['.$this->modename.']鍗曟嵁锛岃鏄:'.$sm.''; $gname = ''; $tit = ''.$this->modename.'璇勮'; } if($type=='receipt'){ $cont = ''.$this->adminname.''.$act.'['.$this->modename.']鐨勫崟鎹'; if($sm!='')$cont.='锛岃鏄:'.$sm.''; $gname = '鍥炴墽纭'; $tit = ''.$this->modename.'鍥炴墽纭'; } $nbis = $this->flownexttodo($type); if($nbis){ if(is_string($nbis))$cont = $nbis; if(is_array($nbis)){ $tit = arrvalue($nbis, 'title', $tit); $gname = arrvalue($nbis, 'gname', $gname); $cont = arrvalue($nbis, 'cont', $cont); } } if($cont!='')$this->push($nuid, $gname, $cont, $tit); } public function getwxurl($num='') { if($num=='')$num = $this->modenum; $url = $this->rock->getouturl(); $str = ''.$url.'?m=ying&d=we&num='.$num.''; return $str; } public function getweurl($num='') { if($num=='')$num = $this->modenum; $url = $this->rock->getouturl(); $str = ''.$url.'?m=ying&d=we&mnum='.$num.''; return $str; } public function deletebill($sm='', $qxpd=true) { if(getconfig('systype')=='demo')return '婕旂ず璇峰嬁鍒犻櫎'; if($qxpd){ $is = $this->isdeleteqx(); if($is==0)return '鏃犳潈鍒犻櫎'; } if(method_exists($this,'flowdeletebillbefore')){ $bstr = $this->flowdeletebillbefore($sm); if(!isempt($bstr))return $bstr; } $modewhere = "`modenum`='".$this->modenum."' and `mid`=".$this->id.""; $this->flogmodel->delete($this->mwhere); m('reads')->delete($this->mwhere); m('file')->delfile('', "`mtype`='".$this->mtable."' and `mid`=".$this->id." and `id` not in(select `fileid` from `[Q]files` where `type`=3)"); $tables = $this->moders['tables']; if(!isempt($tables)){ $arrse = explode(',', $tables); foreach($arrse as $arrses)m($arrses)->delete('mid='.$this->id.''); } $this->billmodel->delete($this->mwhere); $this->todosmodel->delete($this->mwhere); $this->checksmodel->delete($this->mwhere); $this->chaomodel->delete($this->mwhere); m('remind')->delete($this->mwhere); m('todo')->delete($this->mwhere); m('todo')->delete($modewhere); m('receipt')->delete($this->mwhere); m('im_history')->delete("`xgurl`='".$this->modenum."|".$this->id."'"); m('files')->delete("`ip`='".$this->modenum."|".$this->id."'"); $this->delete($this->id); $this->flowdeletebill($sm); $this->flowzuofeibill($sm); $this->gettodosend('bodel','', $sm); $dels = '鍒犻櫎妯″潡['.$this->modename.']id涓'.$this->id.'鐨勫崟鎹'; $ztss = arrvalue($this->rs,'base_summary'); if(!isempt($ztss))$dels.=',鎽樿['.$ztss.']'; if(!isempt($sm))$dels.=',璇存槑:'.$sm.''; m('log')->addlogs('鍒犻櫎鍗曟嵁', $dels, 3); foreach($this->wherejoin as $num=>$fields){ $this->deletebilljoin($num, "`$fields`='$this->id'", $sm); } return 'ok'; } public function deletebilljoin($num, $where, $sm='') { $flow = m('flow')->initflow($num); $rows = $flow->getall($where); foreach($rows as $k1=>$rs1){ $mid = $rs1['id']; $flow->loaddata($mid, false); $flow->deletebill($sm, false); } } public function zuofeibilljoin($num, $where, $sm='') { $flow = m('flow')->initflow($num); $rows = $flow->getall($where); foreach($rows as $k1=>$rs1){ $mid = $rs1['id']; $flow->loaddata($mid, false); $flow->zuofeibill($sm); } } public function zuofeibill($sm='') { $this->addlog(array( 'explain' => $sm, 'name' => '浣滃簾', 'status' => 1, )); $this->update('`status`=5', $this->id); $zfarr = array( 'status' => 5, 'nstatus' => 5, 'checksm' => '浣滃簾锛'.$sm.'', 'nowcheckid' => '', 'nowcheckname' => '', 'nstatustext' => '浣滃簾', 'updt' => $this->rock->now, ); $this->billmodel->update($zfarr, $this->mwhere); $tables = $this->moders['tables']; if(!isempt($tables)){ $arrse = explode(',', $tables); foreach($arrse as $arrses)m($arrses)->delete('mid='.$this->id.''); } $this->flowzuofeibill($sm); $this->gettodosend('bozuofei','', $sm); foreach($this->wherejoin as $num=>$fields){ $this->zuofeibilljoin($num, "`$fields`='$this->id'", $sm); } return 'ok'; } public function openxiang() { $xiangdata = $btndata = array(); $data = $this->flowrsreplace($this->rs,4); foreach($this->fieldsarra as $k=>$rs){ if($rs['iszs']=='1'){ $xiangdata[] = array( 'name' => $rs['name'], 'fields'=> $rs['fields'], 'value' => $this->rock->repempt(arrvalue($data,$rs['fields'])) ); } } $barr['xiangdata'] = $xiangdata; $btnrows = $this->db->getrows('[Q]flow_menu',"`setid`='$this->modeid' and `status`=1 and `num` like 'open%'",'id,wherestr,name,num,issm,type','`sort`'); foreach($btnrows as $k=>$rs){ $wherestr = $rs['wherestr']; $bo = false; if(isempt($wherestr)){ $bo = true; }else{ $ewet = $this->wheremodel->getstrwhere($this->rock->jm->base64decode($wherestr)); $ewet = str_replace(array('{asqom}','1=2 and'),'', $ewet); $tos = $this->rows("`id`='$this->id' and $ewet"); if($tos>0)$bo = true; } if($bo)$btndata[] = array( 'id' => $rs['id'], 'name' => $rs['name'], 'issm' => $rs['issm'], ); } $barr['btndata'] = $btndata; if(method_exists($this,'flowopenxiang')){ $lbarr = $this->flowopenxiang($data,$xiangdata,$btndata); if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v; } return $barr; } public function smschuiban($sm='') { if($this->isflow>0 && $this->adminid==$this->uid){ $farr = $this->getflow(true); $nowcheckid = $farr['nowcheckid']; $tplnum = $this->option->getval('sms_cbnum','defnum'); $wxurl = $this->getxiangurlx(); $barr = c('xinhuapi')->sendsms($nowcheckid, '', $tplnum, array( 'modename' => $this->modename, 'sericnum' => $this->sericnum, 'applyname'=> $this->uname, 'deptname' => $this->rs['base_deptname'], ),$wxurl, false, false); if(!$barr['success'])return $barr['msg']; $this->addlog(array( 'explain' => $sm, 'name' => '鐭俊鍌姙', 'status' => 1, )); } return 'ok'; } public function addschedule($sm='') { $txdt = $this->rock->post('txdt'); if(isempt($sm))return '璇存槑涓嶈兘涓虹┖'; if(isempt($txdt))return '鎻愰啋鏃堕棿涓嶈兘涓虹┖'; $barr['title'] = $sm; $barr['startdt'] = $txdt; $barr['uid'] = $this->adminid; $barr['optdt'] = $this->rock->now; $barr['optname']= $this->adminname; $barr['txsj'] = 1; m('schedule')->insert($barr); return 'ok'; } public function getoptmenu($flx=0) { $where = ''; if($flx==1)$where='and `iszs`=1'; $rows = $this->db->getrows('[Q]flow_menu',"`setid`='$this->modeid' ".$where." and `status`=1",'id,wherestr,name,statuscolor,statusvalue,num,islog,issm,type,upgcont','`sort`'); $arr = array(); $bfrom = $this->rock->post('bfrom'); if($flx==0)$arr[] = array('lx'=>0,'name'=>$this->rock->jm->base64decode('5pyq562!5o6I5peg5rOV5pi!56S66I!c5Y2V5aaC5bey562!5o6I5Y675Y2H57qn'),'optmenuid'=>0,'color'=>'red'); if($flx==1)return $arr; $status = (int)arrvalue($this->rs,'status','0'); $isturn = (int)arrvalue($this->rs, 'isturn','0'); $ismy = ($this->uid == $this->adminid or $this->optid == $this->adminid); $isreadbo = $this->isreadqx(1); if($this->isflow>0 && $isturn==1){ } if($status != 5 && arrvalue($this->moders,'ispl','1')=='1' && $isreadbo){ $arr[] = array('name'=>'璇勮','lx'=>15,'nup'=>1,'issm'=>1,'optmenuid'=>-15); } if($ismy && arrvalue($this->moders,'ishz')=='1' && $status==1){ $smcont = $this->getsummary(); $mid = (int)m('receipt')->getmou('id',"`uid`='$this->adminid' and `modenum`='$this->modenum' and `mid`='$this->id'"); $namess = '鍥炴墽纭璁剧疆'; if($mid>0)$namess = '鍥炴墽纭缂栬緫'; $arr[] = array('name'=>$namess,'djmid'=>$mid,'optnum'=>'receipt','lx'=>'18','optmenuid'=>-18,'modename'=>$this->modename,'smcont'=>$smcont); } if($isreadbo && arrvalue($this->moders,'istxset','1')=='1' && $this->modenum != 'remind' && !in_array($status, array(2,5))){ $smcont = ''.$this->modename.'锛'.$this->getsummary(); $mid = (int)m('remind')->getmou('id',"`uid`='$this->adminid' and `modenum`='$this->modenum' and `mid`='$this->id'"); $namess = '锛嬫坊鍔犳彁閱掕缃'; if($mid>0)$namess = '鎻愰啋璁剧疆缂栬緫'; $arr[] = array('name'=>$namess,'djmid'=>$mid,'smcont'=>$smcont,'issm'=>1,'optnum'=>'tixing','lx'=>'14','optmenuid'=>-14); } if($this->iseditqx()==1 && $isreadbo){ $arr[] = array('name'=>'缂栬緫','optnum'=>'edit','lx'=>'11','optmenuid'=>-11); } if($this->isdeleteqx()==1){ $arr[] = array('name'=>'鍒犻櫎','color'=>'red','optnum'=>'del','nup'=>1,'issm'=>0,'islog'=>0,'statusvalue'=>9,'lx'=>'9','optmenuid'=>-9); } if(method_exists($this,'flowgetoptmenuarr')){ $lbarr = $this->flowgetoptmenuarr($flx); if(is_array($lbarr))foreach($lbarr as $k=>$v)$arr[]=$v; } return $arr; } public function optmenu($czid, $zt, $sm='') { $msg = ''; $cname = $this->rock->post('changename'); $cnameid = $this->rock->post('changenameid'); $cdate = $this->rock->post('changedate'); $darr = array( 'cname' => $cname, 'cnameid' => $cnameid, 'cdate' => $cdate, 'sm' => $sm, ); if($czid==-9){ $msg = $this->deletebill($sm); }else if($czid==-10){ $msg = $this->check($zt, $sm); if(contain($msg,'鎴愬姛'))$msg = 'ok'; }else if($czid==-12){ $this->zhuijiaexplain($sm); }else if($czid==-13){ $this->chuiban($sm); }else if($czid==-14){ $msg = $this->addschedule($sm); }else if($czid==-15){ $actname = $this->rock->post('name'); $this->addlog(array( 'explain' => $sm, 'name' => $actname, )); $uids = ''; if(isset($this->rs['uid'])){ $uids= $this->rs['uid']; }else if(isset($this->rs['optid'])){ $uids= $this->rs['optid']; } if($uids)$this->nexttodo($uids, 'pinglun', $sm, $actname); $this->gettodosend('boping','', $sm); }else if($czid==-16){ $this->zuofeibill($sm); }else if($czid==-17){ $msg = $this->smschuiban($sm); }else if($czid==-18){ $msg = $this->jiankongzb($darr); }else{ } if($msg=='')$msg='ok'; return $msg; } public function jiankongzb($darr) { return $this->bd6('5peg5L!h5ZG8562!5o6I5peg5q2k5Yqf6IO9'); } public function billwhere($uid, $lx) { $arr['table'] = $this->mtable; $arr['tableleft'] = ''; $arr['fields'] = ''; $arr['order'] = ''; $arr['group'] = ''; $arr['keywhere']= ''; $arr['asqom'] = ''; $arr['onlywhere'] = ''; $arr['companywhere']= ''; $this->atype = $lx; $nas = $this->flowbillwhere($uid, $lx); $inwhere = ''; if(substr($lx,0,5)=='grant'){ $inwhere = $this->viewmodel->viewwhere($this->moders, $this->adminid, $this->flowviewufieds, 1); } if($lx=='chaos'){ $inwhere = "and {asqom}`id` in(select `mid` from `[Q]flow_chao` where `table`='{$this->mtable}' and ".$this->rock->dbinstr('csnameid', $this->adminid).")"; } if($lx=='mychuli'){ $inwhere = "and {asqom}`id` in(select bill.`mid` from `[Q]flow_bill` as `bill` where bill.`modeid`='{$this->modeid}' and ".$this->rock->dbinstr('bill.`allcheckid`', $this->adminid).")"; } $_wehs = ''; if(is_array($nas)){ if(isset($nas['where']))$_wehs = $nas['where']; $ftears = explode(',','asqom,order,fields,fieldsleft,table,group,companywhere,onlywhere,keywhere,tableleft'); foreach($ftears as $fid)if(isset($nas[$fid]))$arr[$fid] = $nas[$fid]; }else{ $_wehs = $nas; } $fwhere = $this->getflowwhere($uid, $lx); $path = ''.P.'/flow/page/rock_page_'.$this->modenum.'.php'; $table = $arr['table']; $temsao = 0; if(!contain($table, ' ') && $this->isflow>0){ $arr['table'] = '`[Q]'.$this->mtable.'` a left join `[Q]flow_bill` b on a.`id`=b.`mid` and b.`table`=\''.$this->mtable.'\''; if(!isempt($arr['tableleft']))$arr['table'].=' left join '.$arr['tableleft'].''; $arr['asqom'] = 'a.'; $arr['fields']= 'a.*,b.`uname` as base_name,b.`udeptname` as base_deptname,b.`sericnum`,b.`nowcheckname`'; if(isset($arr['fieldsleft']) && $arr['fieldsleft'])$arr['fields'].=','.$arr['fieldsleft'].''; if($arr['order']=='')$arr['order'] = 'a.`optdt` desc'; $temsao = 1; if($this->defaultorder){ $defa = explode(',', $this->defaultorder); $desc = arrvalue($defa, 1, 'desc'); $arr['order'] = 'a.`'.$defa[0].'` '.$desc.''; } } if(isempt($arr['order'])){ $arr['order'] = '{asqom}`id` desc'; if($this->defaultorder){ $defa = explode(',', $this->defaultorder); $desc = arrvalue($defa, 1, 'desc'); $arr['order'] = '{asqom}`'.$defa[0].'` '.$desc.''; } } if(isempt($fwhere) && isempt($inwhere) && $this->moders['isscl']==1){ $fwhere = 'and 1=2'; } $where = $inwhere; $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $where .= ' and {asqom}'.$wherestr; } if($fwhere!='')$where .= ' '.$fwhere; if($_wehs!='')$where .= ' '.$_wehs; $highwhere = $this->gethighwhere(); $allfields = array(); $key = $this->rock->post('key'); $pnum = $this->rock->post('pnum'); $status = $this->rock->post('keystatus'); $ztfields = arrvalue($nas, 'ztfields', 'status'); $xhlikea = array('like','=','>=','<=', 'not like'); $xhfields = $this->rock->post('xhfields'); $xhlike = (int)$this->rock->post('xhlike','0'); $xhkeygj = $this->rock->jm->base64decode($this->rock->post('xhkeygj')); if(!isempt($xhkeygj) && $xhfields){ if(substr($xhfields,0,2)=='zb'){ $xu = substr($xhfields,2,1); $zbasr = explode(',', $this->moders['tables']); $zbts = arrvalue($zbasr,$xu); $xhfields = substr($xhfields,4); $wher1 = "`$xhfields` ".$xhlikea[$xhlike].""; if($xhlike==0 || $xhlike==4)$wher1.=" '%".$xhkeygj."%'"; if($xhlike==1 || $xhlike==2 || $xhlike==3)$wher1.=" '$xhkeygj'"; $wher1 = " and {asqom}`id` in(select `mid` from `[Q]".$zbts."` where ".$wher1.")"; $where.= $wher1; }else{ $wher1 = " and {asqom}`$xhfields` ".$xhlikea[$xhlike].""; if($xhlike==0 || $xhlike==4)$wher1.=" '%".$xhkeygj."%'"; if($xhlike==1 || $xhlike==2 || $xhlike==3)$wher1.=" '$xhkeygj'"; $where.= $wher1; } } if(!isempt($status))$where .= ' and {asqom}`'.$ztfields.'`='.$status.''; if(!isempt($key) && isempt($arr['keywhere'])){ $check = c('check'); $allfields = $this->db->getallfields('[Q]'.$this->mtable.''); $_kearr = array(); if($check->isdate($key) || $check->ismonth($key)){ $skeay = array('date','datetime','month'); foreach($this->fieldsarra as $k=>$rs){ $flx = $rs['fieldstype']; $fid = $rs['fields']; if($rs['issou']==1 && in_array($flx, $skeay) && in_array($fid, $allfields)){ if($check->isdate($key)){ if($flx=='date')$_kearr[] = "{asqom}`".$fid."`='$key'"; if($flx=='datetime')$_kearr[] = "{asqom}`".$fid."` like '$key%'"; if($flx=='month')$_kearr[] = "{asqom}`".$fid."`='".substr($key,0,7)."'"; if($temsao==1){ $_kearr[] = "b.`applydt`='$key'"; } } if($check->ismonth($key)){ if($flx=='month'){ $_kearr[] = "{asqom}`".$fid."`='$key'"; }else{ $_kearr[] = "{asqom}`".$fid."` like '$key%'"; } if($temsao==1){ $_kearr[] = "b.`applydt` like '$key%'"; } } } } } if(!$_kearr){ $skeay = array('text','textarea','htmlediter','changeuser','changeusercheck','changedept','changedeptusercheck','selectdatafalse','selectdatatrue','num'); $xiakk = array('rockcombo','select'); foreach($this->fieldsarra as $k=>$rs){ if($rs['issou']==1 && in_array($rs['fields'], $allfields) && substr($rs['fields'],-2) != 'dt'){ if(in_array($rs['fieldstype'], $skeay))$_kearr[] = "{asqom}`".$rs['fields']."` like '%".$key."%'"; } } if($temsao==1){ $_kearr[] = "b.`uname` like '%".$key."%'"; $_kearr[] = "b.`udeptname` like '%".$key."%'"; $_kearr[] = "b.`sericnum` = '$key'"; $_kearr[] = "b.`nowcheckname` = '$key'"; } if(isset($nas['orlikefields'])){ $owhee = explode(',', $nas['orlikefields']); foreach($owhee as $owhees){ $_owhees = explode('@', $owhees); $sle = arrvalue($_owhees, 1); if($sle=='1'){ $_kearr[] = "".$_owhees[0]." ='$key'"; }else{ $_kearr[] = "".$_owhees[0]." like '%".$key."%'"; } } } } if($_kearr && $arr['onlywhere']=='')$arr['keywhere'] = "and (".join(' or ',$_kearr).")"; } if(!isempt($arr['companywhere']) && getconfig('companymode'))$where .= ' '.$arr['companywhere']; if(!isempt($arr['onlywhere']))$where .= ' '.$arr['onlywhere']; if(!isempt($arr['keywhere']))$where .= ' '.$arr['keywhere']; if($highwhere!='')$where .= ' '.$highwhere; $where = str_replace('{asqom}', $arr['asqom'], $where); $arr['order'] = str_replace('{asqom}', $arr['asqom'], $arr['order']); $where = str_replace('[A]', $arr['asqom'], $where); $fields = $arr['fields']; if($this->flowfieldstype==1 && (isempt($fields) || $fields=='*') && $this->moders['isscl']==1){ if(!$allfields)$allfields = $this->db->getallfields('[Q]'.$this->mtable.''); $fields = '{asqom}`id`'; $odlvs = $this->option->getval('columns_'.$this->modenum.'_'.$pnum.''); if(isempt($odlvs)){ foreach($this->fieldsarra as $k=>$rs){ if($rs['islb']==1 && in_array($rs['fields'],$allfields)){ $fields.=',{asqom}`'.$rs['fields'].'`'; } } }else{ $odlvsa = explode(',', $odlvs); foreach($odlvsa as $odlvs1){ if(in_array($odlvs1, $allfields)){ $fields.=',{asqom}`'.$odlvs1.'`'; } } } if($this->isflow>0){ if(!contain($fields,'`status`'))$fields.=',{asqom}`status`'; } $fields = str_replace('{asqom}', $arr['asqom'], $fields); $arr['fields'] = $fields; } $fields = $arr['fields']; if(!isempt($fields) && $fields!='*'){ $fieldsa = explode(',', $fields); $fieldss = ''; foreach($fieldsa as $fieldsas){ if(contain($fieldsas,'`') || contain($fieldsas,'.') || contain($fieldsas,' ') || contain($fieldsas,'(')){ $fieldss.=','.$fieldsas.''; }else{ $fieldss.=',`'.$fieldsas.'`'; } } $arr['fields'] = substr($fieldss, 1); } $arr['where'] = str_replace('{asqom}','', $where); return $arr; } public function gethighwhere() { $s = ''; return $s; } public function getflowwhere($uid, $num) { $where = ''; $rs = $this->wheremodel->getone("`setid`='$this->modeid' and `num`='$num'"); if(!$rs)return $where; $where = $this->wheremodel->getwherestr($rs, $uid, $this->flowviewufieds); return $where; } public function getflowrows($uid, $lx, $limit=5, $swher='') { $nas = $this->billwhere($uid, $lx); $table = $nas['table']; if(!contain($table,' '))$table='[Q]'.$table.''; if(isempt($nas['fields']))$nas['fields'] = '*'; $swher = str_replace('{asqom}',$nas['asqom'], $swher); $where = '1=1 '.$nas['where'].' '.$swher.''; if($limit==0)return $this->db->rows($table, $where ); $rows = $this->db->getrows($table, $where , $nas['fields'], $nas['order'], $limit); foreach($rows as $k=>$rs){ $rows[$k] = $this->flowrsreplace($rs, 2); } return $rows; } public function gettodorows($whereid) { $where = $this->wheremodel->getwherestr($whereid, $this->adminid, $this->flowviewufieds); $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $where .= ' and '.$wherestr; } $where = str_replace('{asqom}','', $where); $rows = $this->getall('2=2 '.$where.''); foreach($rows as $k=>$rs){ $rows[$k] = $this->flowrsreplace($rs, 1); } return $rows; } public function printexecl($event) { $arr['moders'] = $this->moders; $arr['fields'] = $this->getfields(); $cell = 1; foreach($arr['fields'] as $k=>$v)$cell++; $arr['cell'] = $cell; $where = '1=1'; $str1 = $this->moders['where']; if(!isempt($str1)){ $str1 = $this->rock->covexec($str1); $where = $str1; } $vwhere = $this->viewmodel->viewwhere($this->moders, $this->adminid); $rows = $this->getrows(''.$where.' '.$vwhere.'', '*', 'id desc', 100); $arr['rows'] = $this->flowprintrows($rows); $arr['count'] = $this->db->count; return $arr; } public function getsuballdata($lx=0, $mid=0) { $tabless = $this->moders['tables']; $subdata = array(); if($mid==0)$mid = $this->id; if(!isempt($tabless)){ $tablessa = explode(',', $tabless); $namessa = explode(',', $this->moders['names']); $tabless1 = '['.str_replace(',','],[', $tabless).']'; foreach($tablessa as $zbx=>$tables){ $cis = substr_count($tabless1, '['.$tables.']'); $whes = ''; if($cis>1)$whes=' and `sslx`='.$zbx.''; $data = m($tables)->getall('mid='.$mid.''.$whes.'','*','`sort`'); $data = $this->flowsubdata($data, $lx, $zbx); if($lx == 0){ $subdata['subdata'.$zbx.''] = $data; }else{ $subdata[$zbx] = array( 'data' => $data, 'fields'=> 'subdata'.$zbx.'', 'name' => $this->rock->arrvalue($namessa, $zbx) ); } } } return $subdata; } private $gettodolistarr = null; public function gettodolist($act) { if(is_array($act))return $act; if($this->gettodolistarr === null){ $rows = $this->todomodel->getrows("`setid`='".$this->modeid."' and `status`=1"); $barr = array(); foreach($rows as $k=>$rs){ $whereid = (int)$rs['whereid']; if($whereid > 0){ $bo = $this->wheremanzhu($whereid); if(!$bo)continue; } $barr[] = $rs; } $this->gettodolistarr = $barr; }else{ $barr = $this->gettodolistarr; } $garr = array(); if($barr)foreach($barr as $k=>$rs){ if(arrvalue($rs,$act)=='1')$garr[] = $rs; } return $garr; } public function gettodosend($act, $actname='',$sm='', $courseid=0, $conts='') { $barr = $this->gettodolist($act); if(!$barr)return; $changearr = array('boturn'=>'鎻愪氦','boedit'=>'缂栬緫','bozhuan'=>'杞姙','bochang'=>'淇敼瀛楁','bodel'=>'鍒犻櫎','bozuofei'=>'浣滃簾','botong'=>'澶勭悊鍚屾剰','bobutong'=>'澶勭悊涓嶅悓鎰','bofinish'=>'鍏ㄩ儴澶勭悊瀹屾垚','bozhui'=>'杩藉姞璇存槑','boping'=>'璇勮','bohuiz'=>'鍥炴墽纭'); if($actname=='' && is_string($act))$actname = arrvalue($changearr, $act); if(isempt($actname))return; $cheo = c('check'); foreach($barr as $k=>$rs){ $receid = $rs['receid']; if($act=='botong' || $act=='bobutong'){ $changewe = $rs['changecourse']; if(!isempt($changewe) && !contain(','.$changewe.',',','.$courseid.','))continue; } if($rs['toturn']==1)$receid.=','.$this->uid.''; if(arrvalue($rs,'tosuper')=='1'){ $supar = $this->adminmodel->getsuperman($this->uid); $shnej = arrvalue($supar, 0); if(!isempt($shnej))$receid.=','.$shnej.''; } if($rs['tocourse']==1 && $this->billrs){ $allcheckid = $this->billrs['allcheckid']; if(!isempt($allcheckid))$receid.=','.$allcheckid.''; } $todofields = $rs['todofields']; if(!isempt($todofields)){ $toad = explode(',', $todofields); foreach($toad as $toads){ $ttv = arrvalue($this->rs, $toads); if(!isempt($ttv) && $cheo->isinnumber($ttv))$receid.=','.$ttv.''; } } if(isempt($receid))continue; if(substr($receid,0,1)==',')$receid = substr($receid, 1); $cont = $rs['summary']; if(isempt($cont))$cont = $conts; if(isempt($cont)){ $cont = ''.$this->adminname.''.$actname.'['.$this->modename.',鍗曞彿:'.$this->sericnum.']'; if($sm!='')$cont.=',璇存槑:'.$sm.''; } $this->push($receid, '', $cont, $this->rock->repempt($rs['name'])); } } public function numtodosend($num, $actname='',$sm='') { $rows = $this->todomodel->getrows("`setid`='".$this->modeid."' and `num`='$num' and `status`=1"); if(!$rows)return; $this->gettodosend($rows, $actname, $sm); } public function flowtotal($fields='', $type='') { if($fields=='')$fields = $this->rock->post('total_fields'); if($type=='')$type = $this->rock->post('total_type','jls'); $typea = explode('|', $type); $typefields = ''; $type = $typea[0]; $typefields = arrvalue($typea, 1); $rowa = array(); $rowa[] = array( 'name' => '鏆傛棤鏁版嵁', 'value' => 0, 'bili' => '' ); $tofiels= 'count(1)'; if($type=='sum')$tofiels = 'sum([A]`'.$typefields.'`)'; if($type=='avg')$tofiels = 'avg([A]`'.$typefields.'`)'; $atype = $this->rock->post('atype'); $table = '[Q]'.$this->mtable.''; $narr = $this->billwhere($this->adminid, $atype); $where = $narr['where']; $table = $narr['table']; if(!contain($table,' '))$table = '[Q]'.$table.''; $gwhere = $this->rock->post('where'); if(!isempt($gwhere)){ $gwhere = $this->rock->jm->uncrypt($this->rock->iconvsql($gwhere)); $where .= ' '.$gwhere.''; } $sql = 'select '.$fields.' as `name`,'.$tofiels.' as value from '.$table.' where 1=1 '.$where.' group by '.$fields.''; $sql = str_replace('[A]', $narr['asqom'], $sql); $rows = $this->db->getall($sql); $total = 0; if($rows){ foreach($rows as $k=>$rs)$total+=floatval($rs['value']); if($total>0)foreach($rows as $k=>$rs){ $rows[$k]['bili'] = $this->rock->number($rs['value']*100/$total).'%'; } if($type!='avg' && count($rows)>1)$rows[] = array('name' => '鍚堣','value' => $total,'bili' => ''); }else{ $rows = $rowa; } return $rows; } public function receiptcheck($hid, $sm) { return 'ok'; } public function getrowstable($atype, $where, $limit=100) { $rows = $this->getflowrows($this->adminid,$atype,$limit,$where); $headstr = '@xuhaos,,center'; foreach($this->fieldsarra as $k=>$rs){ if($rs['islb']==1 && $rs['iszb']=='0') $headstr.='@'.$rs['fields'].','.$rs['name'].''; } if($this->isflow>0){ $headstr.='@statustext,鐘舵'; if(is_array($rows))foreach($rows as $k=>$rs){ $rows[$k]['statustext'] = $this->getstatusstr($rs); } } $cont = c('html')->createrows($rows, substr($headstr, 1),'#cccccc','noborder'); return $cont; } public function viewjinfields($rows) { if(!$rows)return $rows; return $rows; } public function daochusubtable($rows) { return $rows; } } \ No newline at end of file +
', (string)$rs['explain']); $rows[$k]['explain'] = $rows[$k]['sm']; if(!isempt($rs['qmimg'])){ if(!contain($rs['qmimg'],'.')){ $qmimg = ''.UPDIR.'/'.date('Y-m').'/qmimg'.$rs['id'].'.png'; $bo = true; if(!file_exists($qmimg)){ $bar= explode(',', $rs['qmimg']); $bo = $this->rock->createtxt($qmimg, base64_decode($bar[1])); } if(!$bo){ $qmimg = $rs['qmimg']; }else{ $qmimg = ''.URL.''.$qmimg.''; } }else{ $qmimg = $rs['qmimg']; if(!file_exists($qmimg)){ $qmimg = ''; }else{ $qmimg = ''.URL.''.$qmimg.''; } } $rows[$k]['qmimg'] = $qmimg; if(!isempt($qmimg))$rows[$k]['explain']= ' '); } } if($uids!=''){ $rows = m('admin')->getadmininfor($rows, substr($uids, 1), 'checkid'); } $this->getlogrows[$lx] = $rows; return $rows; } public function addlog($arr=array()) { $addarr = array( 'table' => $this->mtable, 'mid' => $this->id, 'checkname' => $this->adminname, 'checkid' => $this->adminid, 'optdt' => $this->rock->now, 'courseid' => '0', 'status' => '1', 'ip' => $this->rock->ip, 'web' => $this->rock->web, 'modeid' => $this->modeid ); foreach($arr as $k=>$v)$addarr[$k]=$v; if(isset($addarr['explain']))$addarr['explain']= htmlspecialchars($addarr['explain']); $this->flogmodel->insert($addarr); $ssid = $this->db->insert_id(); $fileid = $this->rock->post('fileid'); if($fileid!='')m('file')->addfile($fileid, 'flow_log', $ssid, $this->modenum.'|'.$this->id); $logfileid = $this->rock->post('logfileid'); if($logfileid!='')m('file')->addfile($logfileid, 'flow_log', $ssid, $this->modenum.'|'.$this->id); $addarr['id'] = $ssid; $this->flowaddlog($addarr); $this->getlogrows = array(); return $ssid; } public function submit($na='', $sm='') { if($na=='')$na='鎻愪氦'; $isturn = 1; if($na=='淇濆瓨')$isturn = 0; $this->addlog(array( 'name' => $na, 'explain' => $sm )); if($this->isflow>0){ $marr['isturn'] = $isturn; $marr['status'] = 0; $this->rs['status'] = 0; $this->update($marr, $this->id); if(arrvalue($this->moders,'isflowlx')=='1' || $this->isflow>=3){ $this->checksmodel->delete($this->mwhere); $this->flogmodel->update('`valid`=0', ''.$this->mwhere.' and `courseid`>0 and `valid`=1'); } $farr = $this->getflow(); if($farr['nowcourseid']>0){ $sysnextoptid = $this->rock->post('sysnextoptid'); $sysnextopt = $this->rock->post('sysnextopt'); $sysnextcustidid = (int)$this->rock->post('sysnextcustidid'); if($sysnextcustidid == $farr['nowcourseid'] && !isempt($sysnextoptid) && !isempt($sysnextopt)){ $this->addcheckname($sysnextcustidid, $sysnextoptid, $sysnextopt, true, 1); $farr = $this->getflow(); } } $farr['status'] = 0; $this->savebill($farr); if($isturn == 1){ $this->nexttodo($farr['nowcheckid'],'submit'); } } $this->flowsubmit($na, $sm); $this->savecsname( $this->rock->post('syschaosongid'), $this->rock->post('syschaosong'), $this->adminid,0,$isturn,$na); if($na=='缂栬緫'){ $this->gettodosend('boedit'); }else{ $this->gettodosend('boturn'); } } private function savecsname($csnameid,$csname,$uid,$type,$isturn, $na) { if(!isempt($csnameid)){ $where = $this->mwhere.' and `type`='.$type.''; if($type>0)$where.=' and `uid`='.$uid.''; $csid = (int)$this->chaomodel->getmou('id', $where); if($csid==0)$where = ''; $this->chaomodel->record(array( 'modeid' => $this->modeid, 'table' => $this->mtable, 'mid' => $this->id, 'uid' => $uid, 'type' => $type, 'csname' => $csname, 'csnameid' => $csnameid, ),$where); if($isturn==1)$this->nexttodo($csnameid,'chao', $na); } } public function getcsname($id=0) { if($id>0){ $where= "`table`='$this->mtable' and `mid`='$id' and `type`=0"; }else{ $where= "`modeid`={$this->modeid} and `uid`={$this->adminid} and `type`=0"; $iscs = (int)$this->moders['iscs']; } $ors = $this->chaomodel->getone($where,'*','`id` desc'); $csname = $csnameid = ''; if($ors){ $csname = $ors['csname']; $csnameid = $ors['csnameid']; } return array( 'csname' => $csname, 'csnameid' => $csnameid, 'id' => $id, ); } public function zhuijiaexplain($sm='') { $this->addlog(array( 'explain' => $sm, 'name' => '杩藉姞璇存槑', 'status' => 1, )); $zt = $this->rs['status']; if($zt==2 && $this->isflow>0 && $this->adminid==$this->uid){ $marr['status'] = 0; $this->rs['status'] = 0; $this->update($marr, $this->id); $farr = $this->getflow(); $farr['status'] = 0; $this->savebill($farr); $this->nexttodo($farr['nowcheckid'],'zhui', $sm); } $this->gettodosend('bozhui','', $sm); } public function chuiban($sm='') { $this->addlog(array( 'explain' => $sm, 'name' => '鍌姙', 'status' => 1, )); $farr = $this->getflow(true); $this->nexttodo($farr['nowcheckid'],'cuiban', $sm); $this->gettodosend('cuiban','', $sm); } public function getyushen($rows) { return $rows; } private function getyushenss($id, $rows, $xu, $isq) { if($xu==0)$this->_tempauoe = array(); if(isset($rows[$id])){ $_tars = $rows[$id]; if($isq==1)$this->getyushenss($_tars['id'], $rows, $xu+1, $isq); $this->_tempauoe[] = $_tars; if($isq==0)$this->getyushenss($_tars['id'], $rows, $xu+1, $isq); } return $this->_tempauoe; } public function getflowpipei($uid=0) { $urs = $this->urs; if(!$urs)$urs = $uid; if(!is_array($urs))$urs = $this->db->getone('[Q]admin', "`id`='$urs'", '`deptid`,`deptpath`,`id`'); $coursedb = m('flowcourse'); $barr = $coursedb->pipeiCourse($this->modeid); $rows = $barr['rows']; $this->pipeiCoursearrc = $barr['rowd']; $this->pipeiCoursearrs = array(); $this->pipeiCoursearr = array(); $kqobj = m('kaoqin'); $this->getflowpipeis($rows, $urs, $kqobj); unset($this->pipeiCoursearrs); unset($this->pipeiCoursearrc); return $this->getyushen($this->pipeiCoursearr); } private function getflowpipeis($rows,$urs, $kqobj) { $shiyong = array(); $defix = $xuhao = 0; $uid = arrvalue($urs,'id',0); $zshu = count($rows); foreach($rows as $k=>$rs){ $whereid = (int)$rs['whereid']; $receid = $rs['receid']; $wherestr= arrvalue($rs, 'where'); if($rs['status']=='0')continue; if(!isempt($wherestr)){ $wherestr = m('base')->strreplace($this->rock->jm->base64decode($wherestr), $uid); $to = $this->rows("`id`='$this->id' and $wherestr "); if($to==0)continue; } if($whereid > 0){ $bo = $this->wheremanzhu($whereid); if(!$bo)continue; } if(!isempt($rs['num'])){ $bo = $this->flowcoursejudge($rs['num'], $rs); if(is_bool($bo) && !$bo)continue; } $xuhao++; if($defix==0 && (isempt($receid) || contain($receid,'all'))){ $defix = $xuhao; } if(isempt($receid) && (!isempt($wherestr) || $whereid > 0)){ $defix = $xuhao; } $rs['xuhao'] = $xuhao; $shiyong[] = $rs; } $pboss = false; if($shiyong){ $gxuha = $kqobj->getpipeimid($urs, $shiyong, 'xuhao', $defix); if($gxuha>0){ $pboss = true; $gxuha = $gxuha-1; $prs = $shiyong[$gxuha]; $this->getflowpipeisss($prs, $urs, $kqobj); } } if(!$pboss && $zshu==1 && $rows[0]['childshu']>0){ $this->getflowpipeis($rows[0]['children'], $urs, $kqobj); } } private function getflowpipeisss($prsnrs, $urs, $kqobj) { $prs = $prsnrs; unset($prs['children']); $this->pipeiCoursearrs[]= $prs['id']; $this->pipeiCoursearr[] = $prs; if($prs['childshu']>0){ $this->getflowpipeis($prsnrs['children'], $urs, $kqobj); }else{ $nid = arrvalue($prs,'nid','0'); if($nid>0 && !in_array($nid, $this->pipeiCoursearrs) && isset($this->pipeiCoursearrc, $nid)){ $this->getflowpipeis(array($this->pipeiCoursearrc[$nid]), $urs, $kqobj); } } } public function getflow($sbo=false) { $this->flowarr = array(); $allcheckid = $nowcheckid = $nowcheckname = $nstatustext = ''; $allcheckids = array(); $nowcourseid = 0; $nstatus = $this->rs['status']; $this->nowcourse = array(); $this->nextcourse = array(); $this->flowisend = 0; $curs = $this->flogmodel->getrows($this->mwhere,'checkid,checkname,courseid,`valid`,`status`,`statusname`,`name`,`iszb`','id desc'); $cufss = $ztnas = $chesarr = array(); foreach($curs as $k=>$rs){ if($rs['iszb']=='1' && !in_array($rs['checkid'], $allcheckids))$allcheckids[] = $rs['checkid']; if($rs['courseid']=='0')continue; $_su = ''.$rs['courseid'].''; $_su1 = ''.$rs['courseid'].'_'.$rs['checkid'].''; if($rs['valid']==1 && in_array($rs['status'], $this->flowstatusarr)){ if(!isset($cufss[$_su]))$cufss[$_su]=0; $cufss[$_su]++; $chesarr[$_su1] = 1; } if(!in_array($rs['checkid'], $allcheckids))$allcheckids[] = $rs['checkid']; if($nstatustext=='' && $rs['courseid']>0){ $nstatustext = ''.$rs['checkname'].'澶勭悊'.$rs['statusname'].''; $nstatus = $rs['status']; } $ztnas[$rs['courseid']] = ''.$rs['checkname'].''.$rs['statusname'].''; } $nowstep = $zongsetp = -1; $isend = 0; $czt = $this->rs['status']; $coutye = 0; $rows = ($czt==1 || $czt==5)? array() : $this->getflowpipei($this->uid); if($rows){ $checksa = $this->checksmodel->getrows($this->mwhere.' and `addlx`=3'); $coursea = $nrows = array(); foreach($checksa as $k=>$rs)$coursea[$rs['courseid']]='1'; $nrows = array(); $allcheckid = ''; $isoptsuperbo = false; foreach($rows as $k=>$rs){ $uarr = $this->getcheckname($rs); $rows[$k]['checkid'] = $uarr[0]; $rows[$k]['checkname'] = $uarr[1]; $allcheckid .= ','.$uarr[0].''; if($rs['checktype']=='optsuper' && isempt($uarr[0]))$isoptsuperbo=true; } if($isoptsuperbo)foreach($rows as $k=>$rs){ if($rs['checktype']=='optsuper'){ $_k1 = $k-1; $_uid = $this->optid; if($_k1>=0){ $ours = $this->flogmodel->getone($this->mwhere.' and `courseid`='.$rows[$_k1]['id'].' and `valid`=1 ','`checkid`','`id` desc'); if(!$ours){ $_uid = (int)$rows[$_k1]['checkid']; }else{ $_uid = $ours['checkid']; } } $uarr = $this->adminmodel->getsuperman($_uid); if($uarr){ $rows[$k]['checkid'] = $uarr[0]; $rows[$k]['checkname'] = $uarr[1]; } } } foreach($rows as $k=>$rs){ $nrows[] = $rs; if($rs['checktype']=='superall'){ $ids1 = $rs['id']; $suparr = $this->adminmodel->getsuperarr($this->uid); if($suparr){ $logdsar = $this->getlog(); foreach($logdsar as $k1=>$rs1){ if($rs1['courseid']>0 && $rs1['status']=='1' && $rs1['valid']=='1')$allcheckid .= ','.$rs1['checkid'].''; } foreach($suparr as $k1=>$surs){ if(!contain(','.$allcheckid.',', ','.$surs['id'].',')){ $rs['oldid'] = $ids1; $rs['id'] = $ids1 * 99999 + $surs['id']; $rs['checkid'] = $surs['id']; $rs['checkname'] = $surs['name']; $rs['iszf'] = 0; $nrows[] = $rs; $allcheckid .= ','.$surs['id'].''; } } } } } $yisheh = ''; if($this->isflow==2){ $logdsar = $this->getlog(); foreach($logdsar as $k1=>$rs1) if($rs1['courseid']>0 && $rs1['status']==1 && $rs1['valid']==1)$yisheh .= ','.$rs1['checkid'].''; } foreach($nrows as $k=>$rs){ $whereid = (int)$rs['whereid']; $checkshu = $rs['checkshu']; $checkid = $rs['checkid']; $checkname = $rs['checkname']; $checktype = $rs['checktype']; if($this->isflow==2 && !isempt($checkid) && isempt($rs['checkfields'])){ if(($checkid==$this->uid || $checkid==$this->optid) )continue; $k2 = $k+1; $ntype = 'yes'; if(isset($nrows[$k2])){ if($nrows[$k2]['checktype']=='change')$ntype='no'; } if($ntype=='yes' && contain(','.$yisheh.',',','.$checkid.','))continue; } if(!isempt($checkid))$yisheh .= ','.$checkid.''; $zongsetp++; $ischeck = 0; $checkids = $checknames = ''; $_su = ''.$rs['id'].''; $nowshu = 0; if(isset($cufss[$_su]))$nowshu = $cufss[$_su]; if(!$this->isempt($checkid)){ $checkida = explode(',', $checkid); $checkidna = explode(',', $checkname); $_chid = $_chna = ''; foreach($checkida as $k1=>$chkid){ $_su1 = ''.$rs['id'].'_'.$chkid.''; if(!in_array($chkid, $allcheckids))$allcheckids[] = $chkid; if(!isset($chesarr[$_su1])){ $_chid.=','.$chkid.''; $_chna.=','.arrvalue($checkidna, $k1).''; } } if($_chid!='')$_chid = substr($_chid, 1); if($_chna!='')$_chna = substr($_chna, 1); if($_chid==''){ $ischeck = 1; }else{ if($checkshu>0&&$nowshu>=$checkshu)$ischeck = 1; } $checkids = $_chid; $checknames = $_chna; }else{ if($checkshu>0&&$nowshu>=$checkshu)$ischeck = 1; if($checkshu == 0 && $nowshu>0)$ischeck = 1; } if($ischeck==0 && $coutye==0){ if((int)arrvalue($rs,'coursetype','0')>0)$coutye = 1; } $rs['ischeck'] = $ischeck; $rs['islast'] = 0; $rs['checkid'] = $checkid; $rs['checkname'] = $checkname; $rs['nowcheckid'] = $checkids; $rs['nowcheckname'] = $checknames; $rs['isnow'] = 0; $rs['nowstep'] = $zongsetp; $rs['step'] = $k+1; if($ischeck==0 && $nowstep==-1){ $rs['isnow']= 1; $nowstep = $zongsetp; $this->nowcourse = $rs; $nowcourseid = $rs['id']; $nowcheckid = $checkids; $nowcheckname = $checknames; } if($nowstep>-1 && $zongsetp==$nowstep+1)$this->nextcourse = $rs; $this->flowarr[]= $rs; } } if($zongsetp>-1)$this->flowarr[$zongsetp]['islast']=1; if($nowstep == -1){ $isend = 1; }else{ $nstatustext = '寰'.$nowcheckname.'澶勭悊'; } $this->flowisend = $isend; $allcheckid = join(',', $allcheckids); $arrbill['allcheckid'] = $allcheckid; $arrbill['nowcourseid'] = $nowcourseid; $arrbill['nowcheckid'] = $nowcheckid; $arrbill['nowcheckname'] = $nowcheckname; $arrbill['nstatustext'] = $nstatustext; $arrbill['nstatus'] = $nstatus; $arrbill['status'] = $this->rs['status']; $arrbill['isturn'] = $this->rs['isturn']; if($sbo)$this->getflowsave($arrbill); return $arrbill; } public function wheremanzhu($id) { $uid = $this->uid; $ser = $this->wheremodel->getflowwhere($id, $uid); if(!$ser)return true; $str = $ser['ntr']; if(!isempt($str)){ $to = $this->db->rows('[Q]admin',"`id`='$uid' and ($str)"); if($to>0)return false; } $str = $ser['str']; if(!isempt($str)){ $str= str_replace('{asqom}','', $str); $to = $this->rows("`id`='$this->id' and $str"); if($to==0)return false; } $str = $ser['utr']; if(!isempt($str)){ $to = $this->db->rows('[Q]admin',"`id`='$uid' and $str"); if($to==0)return false; } return true; } public function getflowsave($sarr, $suvu=false) { if(!$sarr)return; if($suvu)$sarr['updt'] = $this->rock->now; $this->billmodel->update($sarr, $this->mwhere); } private function getcheckname($crs) { $type = $crs['checktype']; $cuid = $name = ''; $courseid= $crs['id']; $cheorws = $this->checksmodel->getall($this->mwhere.' and `courseid`='.$courseid.'','checkid,checkname'); if($cheorws){ foreach($cheorws as $k=>$rs){ $lxss = $rs['checkid']; if(isempt($lxss) || $lxss=='0')continue; $cuid.=','.$lxss.''; $name.=','.$rs['checkname'].''; } if($cuid != ''){ $cuid = substr($cuid, 1); $name = substr($name, 1); return array($cuid, $name); } } if(!$this->isempt($crs['num'])){ $uarr = $this->flowcheckname($crs['num']); if(is_array($uarr)){ if(!$this->isempt($uarr[0]))return $uarr; } } if($type=='super' || $type=='superall'){ $cuid = $this->urs['superid']; $name = $this->urs['superman']; } if($type=='dept' || $type=='super' || $type=='superall'){ if($this->isempt($cuid) && $this->drs){ $cuid = $this->drs['headid']; $name = $this->drs['headman']; } } if($type=='apply'){ $cuid = $this->urs['id']; $name = $this->urs['name']; } if($type=='opt'){ $cuid = $this->rs['optid']; $name = $this->rs['optname']; if(isempt($cuid)){ $cuid = $this->urs['id']; $name = $this->urs['name']; } } if($type=='user'){ $cuid = $crs['checktypeid']; $name = $crs['checktypename']; } if($type=='rank'){ $rank = $crs['checktypename']; if(!$this->isempt($rank)){ $wheer1 = $this->adminmodel->getcompanywhere(5,'',$this->companyid); $rnurs = $this->db->getrows('[Q]admin',"`status`=1 and `ranking`='$rank' ".$wheer1."",'id,name','sort'); foreach($rnurs as $k=>$rns){ $cuid.=','.$rns['id'].''; $name.=','.$rns['name'].''; } if($cuid != ''){ $cuid = substr($cuid, 1); $name = substr($name, 1); } } } if($type=='cname'){ $cnbar = $this->cnamemodel->getcheckname($crs['checktypeid'], $this->uid); $cuid = arrvalue($cnbar, 0); $name = arrvalue($cnbar, 1); } if($type=='field'){ $fids = $crs['checktypeid']; if(!isempt($fids)){ $vals = ''; $farrs= explode(',', $fids); foreach($farrs as $fid){ $vid = arrvalue($this->rs, $fid); if(!isempt($vid))$vals.=','.$vid.''; } if($vals!=''){ $vals = substr($vals, 1); $uarr = $this->adminmodel->getrows('`status`=1 and `id` in('.$vals.')','id,name','FIELD(`id`,'.$vals.')'); foreach($uarr as $k=>$rs){ $cuid.=','.$rs['id'].''; $name.=','.$rs['name'].''; } if($cuid != ''){ $cuid = substr($cuid, 1); $name = substr($name, 1); } } } } $cuid = $this->rock->repempt($cuid); $name = $this->rock->repempt($name); return array($cuid, $name); } public function createbianhao($num, $fid, $wshu=3) { if(isempt($num))$num=''.$this->modenum.'-'; @$appdt = $this->rs['applydt']; if(isempt($appdt))$appdt = $this->rock->date; $apdt = str_replace('-','', substr($appdt,0,10)); $num = str_replace('Ymd',$apdt,$num); return $this->db->sericnum($num,'[Q]'.$this->mtable.'', $fid, $wshu); } public function createinputnum($num, $fid) { $acta = ''; if(method_exists($this, $num)){ $acta = $num; }else{ if(contain($num, ',')){ $arra = explode(',', $num); $acta = $arra[0]; $num = $arra[1]; } } if($acta && method_exists($this, $acta)){ $barr = $this->$acta($num); if(is_array($barr)){ $qom = arrvalue($barr, 'qom', $num); $wshu= arrvalue($barr, 'wshu', 3); $bom = arrvalue($barr, 'bom'); $fields = arrvalue($barr, 'fields', $fid); return $this->createbianhao($qom, $fields, $wshu).$bom; }else{ if(isempt($barr))$barr = $num; return $this->createbianhao($barr, $fid); } }else{ return $this->createbianhao($num, $fid); } } public function createnum() { $num = $this->moders['sericnum']; if($num=='鏃'||$this->isempt($num))$num='TM-Ymd-'; @$appdt = $this->rs['applydt']; if(isempt($appdt))$appdt = $this->rock->date; $apdt = str_replace('-','', $appdt); $num = str_replace('Ymd',$apdt,$num); return $this->db->sericnum($num,'[Q]flow_bill', 'sericnum', 3); } public function savebill($oarr=array()) { $dbs = $this->billmodel; $whes= $this->mwhere; $birs= $dbs->getone($whes); $arr = array( 'table' => $this->mtable, 'mid' => $this->id, 'optdt' => isset($this->rs['optdt']) ? $this->rs['optdt'] : $this->rock->now, 'optname' => arrvalue($this->rs,'optname', $this->adminname), 'optid' => arrvalue($this->rs,'optid', $this->adminid), 'modeid' => $this->modeid, 'updt' => $this->rock->now, 'isturn' => $this->rs['isturn'], 'nstatus' => $this->rs['status'], 'applydt' => $this->rs['applydt'], 'modename' => $this->modename, 'uname' => $this->rs['base_name'], 'udeptname' => $this->rs['base_deptname'], 'uid' => $this->uid, 'isdel' => '0', ); foreach($oarr as $k=>$v)$arr[$k]=$v; if(!$birs){ $arr['status'] = $arr['nstatus']; $arr['createdt']= $arr['optdt']; $arr['sericnum']= $this->createnum(); $arr['udeptid'] = $this->rock->post('sysudeptid', arrvalue($this->urs,'deptid')); $whes = ''; $this->sericnum = $arr['sericnum']; }else{ $udeptid = $birs['udeptid']; if($udeptid==0)$arr['udeptid']= arrvalue($this->urs,'deptid'); } $fstr = $this->rock->post('sysflow5str'); if($fstr)$arr['flow5str'] = $fstr; $dbs->record($arr, $whes); return $arr; } public function getsummary() { return $this->rock->reparr($this->moders['summary'], $this->rs); } public function addcheckname($courseid, $uid, $uname, $onbo=false, $addlx=0) { if(isempt($uid)){$uid = '0';$uname= 'auto';} $uida = explode(',', ''.$uid.''); $uidan = explode(',', $uname); if($onbo)$this->checksmodel->delete($this->mwhere.' and `courseid`='.$courseid.''); if($uida)foreach($uida as $k=>$uid){ $uname = $this->rock->arrvalue($uidan, $k); $zyarr = array( 'table' => $this->mtable, 'mid' => $this->id, 'modeid' => $this->modeid, 'courseid' => $courseid, 'optid' => $this->adminid, 'optname' => $this->adminname, 'addlx' => $addlx, 'optdt' => $this->rock->now, 'status' => 0 ); $this->checksmodel->delete($this->mwhere.' and `checkid`='.$uid.' and `courseid`='.$courseid.''); $zyarr['checkid'] = $uid; $zyarr['checkname'] = $uname; $this->checksmodel->insert($zyarr); } if($addlx==4)$this->checksmodel->delete($this->mwhere.' and `checkid`='.$this->adminid.' and `courseid`='.$courseid.''); } public function savedatastr($fval, $farr, $data=array()) { $str = ''; if(!$farr)return $str; $savewhere = $farr['savewhere']; $name = $farr['name']; $types = $farr['fieldstype']; if(isempt($savewhere) || isempt($fval))return $str; $savewhere = str_replace(array('{0}','{date}','{now}'), array($name, $this->rock->date,$this->rock->now), $savewhere); $savewhere = $this->rock->reparr($savewhere, $data); $saees = explode(',', $savewhere); if($types=='date' || $types=='datetime')$fval = strtotime($fval); if($types=='number')$fval = floatval($fval); foreach($saees as $saeess){ $fsaed = explode('|', $saeess); $msg = isset($fsaed[2]) ? $fsaed[2] : ''.$name.'鏁版嵁涓嶇鍙'; $val = isset($fsaed[1]) ? $fsaed[1] : ''; $lfs = $fsaed[0]; if($val != ''){ if($types=='date' || $types=='datetime')$val = strtotime($val); if($types=='number')$val = floatval($val); if($lfs=='gt'){$bo = $fval>$val;if(!$bo)return $msg;} if($lfs=='egt'){$bo = $fval>=$val;if(!$bo)return $msg;} if($lfs=='lt'){$bo = $fval<$val;if(!$bo)return $msg;} if($lfs=='elt'){$bo = $fval<=$val;if(!$bo)return $msg;} if($lfs=='eg'){$bo = $fval==$val;if(!$bo)return $msg;} if($lfs=='neg'){$bo = $fval!=$val;if(!$bo)return $msg;} } } return $str; } public function update($arr, $where) { if(is_array($arr)){ foreach($arr as $k=>$v)$this->rs[$k]=$v; } return parent::update($arr,$where); } public function updatelogvalid($whe) { $this->flogmodel->update('valid=0', $this->mwhere.' '.$whe); } public function strappend($sm, $str, $fh=',') { if(isempt($str))return $sm; if(!isempt($sm))$sm.=$fh; $sm.=$str; return $sm; } public function checkerror($lx=1,$sm='') { if($sm=='')$sm='鍗曟嵁寮傚父绠$悊鍛樺鐞'; $msg = $this->check($lx, $sm, 1); return $msg; } public function check($zt, $sm='', $lx=0) { if($this->rs['status']==1)return '娴佺▼宸插鐞嗗畬鎴,鏃犻渶鎿嶄綔'; $arr = $this->getflow(); $flowinfor = $this->getflowinfor(); if($flowinfor['ischeck']==0 && $lx==0)return '褰撳墠鏄痆'.$arr['nowcheckname'].']澶勭悊'; $nowcourse = $this->nowcourse; if($lx==1){ if($arr['nowcourseid']!=0)return '褰撳墠鏈夊鏍告楠D鏄瓨鍦ㄧ殑涓嶈兘鐩存帴鏍囪瘑宸插畬鎴'; $to = $this->flogmodel->rows($this->mwhere.' and `courseid`>0 and `status`=1'); if($to==0)return '璇ュ崟鎹病鏈変换浣曢氳繃瀹℃牳澶勭悊涓嶈兘鐩存帴鏍囪瘑宸插畬鎴愭垨宸插鏍'; $nowcourse = array('id'=>66666,'name'=>'寮傚父澶勭悊','step'=>0); } $nextcourse = $this->nextcourse; $zynameid = $this->rock->post('zynameid'); $zyname = $this->rock->post('zyname'); $csnameid = ''; $csname = ''; $nextname = $this->rock->post('nextname'); $nextnameid = $this->rock->post('nextnameid'); $qmimgstr = $this->rock->post('qmimgstr'); $tuiid = (int)$this->rock->post('tuiid'); $iszhuanyi = $ischangenext = 0; if($zt==1 && $this->isflow!=3 && isempt($zynameid) && arrvalue($nextcourse,'checktype')=='change'){ $ischangenext = 1; } if($zt!=2)$tuiid = 0; $istongyi = in_array($zt, $this->flowstatusarr); if($zynameid!='' && $istongyi){ if($zynameid==$this->adminid)return '涓嶈兘杞粰鑷繁'; $sm = $this->strappend($sm, '杞粰锛'.$zyname.''); $iszhuanyi = 1; $this->rs['syszb_name'] = $zyname; $this->rs['syszb_nameid'] = $zynameid; } if($nextnameid=='' && $ischangenext==1)return '璇烽夋嫨涓嬩竴姝ュ鐞嗕汉'; $ufied = array(); if($iszhuanyi == 0 && $zt!=2){ foreach($flowinfor['checkfields'] as $chef=>$chefv){ $ufied[$chef] = $_val = $this->rock->post('cfields_'.$chef.''); if(isempt($_val) && $chefv['isbt']=='1')$this->echomsg(''.$chefv['name'].'涓嶈兘涓虹┖'); $_stype = arrvalue($chefv, 'fieldstype'); if($_stype=='graph')$ufied[$chef] = c('input')->createqianming($_val); $_str = $this->savedatastr($_val, $chefv['fieldsarr'], $this->rs); if($_str!='')$this->echomsg($_str); } } $this->checkiszhuanyi = $iszhuanyi; $barr = $this->flowcheckbefore($zt, $ufied, $sm); $msg = ''; if(is_array($barr) && isset($barr['msg']))$msg = $barr['msg']; if(is_array($barr) && isset($barr['update'])){ foreach($barr['update'] as $_k=>$_v)$ufied[$_k] = $_v; } if(is_string($barr))$msg = $barr; if(!isempt($msg))return $msg; if($ufied){ $bo = $this->update($ufied, $this->id); if(!$bo)return 'dberr:'.$this->db->error(); } $courseact = $flowinfor['courseact']; $act = $courseact[$zt]; $statusname = $act[0]; $statuscolor= $act[1]; $nzt = $act[2]; $courseid = $nowcourse['id']; $this->checksmodel->update('`status`='.$zt.'', $this->mwhere.' and `checkid`='.$this->adminid.' and `courseid`='.$courseid.''); if($iszhuanyi == 1){ $this->addcheckname($courseid, $zynameid, $zyname, false, 4); $nowcourse['id'] = 0; } if($ischangenext==1){ $this->addcheckname($nextcourse['id'], $nextnameid, $nextname, true, 1); } $tuirs = array(); if($tuiid > 0)$tuirs = $this->flogmodel->getone($tuiid); if(!$tuirs)$tuiid = 0; if($tuiid>0){ $sm = $this->strappend($sm, '閫鍥炲埌['.$tuirs['name'].'('.$tuirs['checkname'].')]'); $statusname = '閫鍥'; $statuscolor = '#17B2B7'; } $this->checkistui = $tuiid; $logsm = $sm; if($iszhuanyi==0 && $csname)$logsm = $this->strappend($logsm,'鎶勯佺粰锛'.$csname.''); $this->lastlogid = $this->addlog(array( 'courseid' => $nowcourse['id'], 'name' => $nowcourse['name'], 'step' => $nowcourse['step'], 'status' => $zt, 'statusname'=> $statusname, 'color' => $statuscolor, 'explain' => $logsm, 'iszb' => $iszhuanyi, 'qmimg' => $qmimgstr )); if($tuiid > 0){ $this->addcheckname($tuirs['courseid'], $tuirs['checkid'], $tuirs['checkname'], true, 3); $this->updatelogvalid('and `courseid`>0 and `status`=1 and `step`>='.$tuirs['step'].''); } $lzt = $this->rock->repempt($nzt, $zt); $uparr = $nexttodoarr = $nexttodoarc = array(); $bsarr = $this->getflow(); $bsarr['tuiid'] = $tuiid; $nextcheckid = $bsarr['nowcheckid']; if($istongyi){ if($iszhuanyi==0){ $uparr['status']= $this->rock->repempt($nzt,'0'); } $nexttodoarr = array($nextcheckid, 'next', $sm, $statusname); }else{ if($tuiid>0){ $lzt = 23; $nexttodoarr = array($nextcheckid, 'tui', $sm, $statusname); }elseif($zt==2){ $nexttodoarr = array($this->optid, 'nothrough', $sm, $statusname); } $uparr['status'] = $lzt; } $this->flowcheckafter($zt, $sm, $nowcourse); $bsarr['nstatus'] = $lzt; $bsarr['checksm'] = $sm; if(!$this->nowcourse){ $uparr['status'] = $lzt; $nexttodoarc = array($this->optid, 'finish', $sm, ''); } if($uparr){ $this->update($uparr, $this->id); } if(!$this->nowcourse){ $this->flowcheckfinsh($zt); if($istongyi){ $this->checksmodel->delete($this->mwhere); } } $bsarr['status'] = $this->rs['status']; $this->getflowsave($bsarr, true); if($this->db->backsql()){ $bos = ($courseid == arrvalue($this->nowcourse, 'id') && $istongyi); if($nexttodoarr && (!$bos || $iszhuanyi==1))$this->nexttodo($nexttodoarr[0],$nexttodoarr[1],$nexttodoarr[2],$nexttodoarr[3]); if($nexttodoarc)$this->nexttodo($nexttodoarc[0],$nexttodoarc[1],$nexttodoarc[2],$nexttodoarc[3]); } if($iszhuanyi == 1){ $this->gettodosend('bozhuan','', $sm, 0, ''.$this->adminname.'灏哰'.$nowcourse['name'].']杞粰:'.$zyname.''); }else{ if($istongyi)$this->gettodosend('botong', $statusname, $sm, $nowcourse['id']); if($zt==2)$this->gettodosend('bobutong',$statusname, $sm, $nowcourse['id']); if(!$this->nowcourse && $istongyi)$this->gettodosend('bofinish', '', $sm); } if($iszhuanyi==0){ $sm1 = '鍦ㄢ'.$nowcourse['name'].'鈥濆鐞'.$statusname.''; $this->savecsname($csnameid,$csname,$this->adminid,$nowcourse['id'],1, $sm1); } return 'ok'; } public function pushs($receid, $cont, $title='', $params=array()) { return $this->push($receid,'', $cont, $title, 0, $params); } public function getxiangurl($num='', $id=0, $lx='x') { if($num=='')$num = $this->modenum; if($id==0)$id = $this->id; $url = URL; if($lx=='auto')$lx = ($this->ismobile==1)?'x':'p'; if($lx=='x' || $lx=='a')$url = $this->rock->getouturl(); $url = ''.$url.'task.php?a='.$lx.'&num='.$num.'&mid='.$id.''; if(COMPANYNUM)$url.='&dwnum='.COMPANYNUM.''; return $url; } public function getxiangurlx($num='',$id=0){return $this->getxiangurl($num,$id,'x');} public function push($receid, $gname='', $cont='', $title='', $wkal=0, $params=array()) { if(isempt($receid) && $wkal==1)$receid='all'; if(isempt($receid))return false; if(contain(','.$receid.',', ',d1,'))$receid='all'; $modenum = arrvalue($params, 'modenum', $this->modenum); $modename = arrvalue($params, 'modename', $this->modename); $id = (int)arrvalue($params, 'id', $this->id); $moders = arrvalue($params, 'moders'); if(!is_array($moders))$moders = $this->moders; if($gname=='')$gname = $modename; $reim = m('reim'); $url = $this->getxiangurl($modenum, $id, 'p'); $wxurl = $this->getxiangurl($modenum, $id, 'x'); $emurl = $this->getxiangurl($modenum, $id, 'a'); if($id==0){ $url = '';$wxurl = '';$emurl=''; } $url = arrvalue($params, 'url', $url); $wxurl = arrvalue($params, 'wxurl', $wxurl); $emurl = arrvalue($params, 'emurl', $emurl); $slx = 0; $pctx = $moders['pctx']; $mctx = $moders['mctx']; $wxtx = $moders['wxtx']; $ddtx = $moders['ddtx']; $emtx = $moders['emtx']; if($pctx==0 && $mctx==1)$slx=2; if($pctx==1 && $mctx==0)$slx=1; if($pctx==0 && $mctx==0)$slx=3; $this->rs['now_adminname'] = $this->adminname; $this->rs['now_modename'] = $modename; $cont = $this->rock->reparr($cont, $this->rs); $receido= $receid; $receid = $this->adminmodel->gjoins($receid); $uids = m('todo')->addtodo($receid, $modename, $cont, $modenum, $id); if($uids!='' && $moders['type'] != '绯荤粺' && $id > 0)$this->todosmodel->addtotouids($uids, array( 'table' => $moders['table'], 'mid' => $id, 'modename' => $modename, 'modenum' => $modenum, )); $title = $this->rock->reparr($title, $this->rs); $reim->pushagent($uids, $gname, $cont, $title, $url, $wxurl, $slx, ''.$modenum.'|'.$id.''); $this->flowchangetodo($uids, $gname); if(isempt($title))$title = $modename; $this->flowweixinarr=array(); return $receid; } public function nexttodo($nuid, $type, $sm='', $act='') { $cont = ''; $tit = ''; $gname = '娴佺▼寰呭姙'; $summary= $this->getsummary(); if($type=='submit' || $type=='next' || $type == 'cuiban'){ $cont = '浣犳湁['.$this->uname.']鐨刐'.$this->modename.',鍗曞彿:'.$this->sericnum.']闇瑕佸鐞'; if($sm!='')$cont.='锛岃鏄:'.$sm.''; $tit = ''.$this->uname.'鐨'.$this->modename.''; if($type != 'cuiban'){ $txnum = $this->option->getval('sms_txnum'); if(!isempt($txnum)){ $mknum = $this->option->getval('sms_mknum'); if($mknum=='all' || contain(','.$mknum.',',','.$this->modenum.',')){ $wxurl = $this->getxiangurlx(); $barr = c('xinhuapi')->sendsms($nuid, '', $txnum, array( 'modename' => $this->modename, 'sericnum' => $this->sericnum, 'applyname'=> $this->uname, 'deptname' => $this->rs['base_deptname'], ),$wxurl); } } } $type = 'daiban'; } if($type == 'nothrough'){ $cont = '浣犳彁浜'.$this->modename.',鍗曞彿:'.$this->sericnum.']'.$this->adminname.'澶勭悊['.$act.']锛屽師鍥:['.$sm.']'; $gname= '娴佺▼鐢宠'; $tit = ''.$this->modename.'澶勭悊'.$act.''; } if($type == 'finish'){ $cont = '浣犳彁浜ょ殑['.$this->modename.',鍗曞彿:'.$this->sericnum.']宸插叏閮ㄥ鐞嗗畬鎴'; $gname= '娴佺▼鐢宠'; $tit = ''.$this->modename.'鍏ㄩ儴澶勭悊瀹屾垚'; } if($type == 'zhui'){ $cont = ''.$this->adminname.'杩藉姞鍗曟嵁璇存槑['.$this->modename.',鍗曞彿:'.$this->sericnum.']锛岃鏄:['.$sm.']'; } if($type == 'tui'){ $cont = '['.$this->adminname.']閫鍥炲崟鎹甗'.$this->modename.',鍗曞彿:'.$this->sericnum.']鍒颁綘杩欒鍙婃椂澶勭悊锛岃鏄:'.$sm.''; } if($type == 'chao'){ $cont = ''.$this->adminname.''.$sm.'浜嗏'.$this->modename.'鈥'; if(!isempt($summary))$cont.='锛屾憳瑕佲'.$summary.'鈥'; if($this->isflow>0)$cont.='锛屽崟鍙封'.$this->sericnum.'鈥'; $gname= ''; $tit = ''.$this->modename.'鐨勫崟鎹妱閫'; } if($type=='pinglun'){ $cont = ''.$this->adminname.''.$act.'浣犵殑['.$this->modename.']鍗曟嵁锛岃鏄:'.$sm.''; $gname = ''; $tit = ''.$this->modename.'璇勮'; } if($type=='receipt'){ $cont = ''.$this->adminname.''.$act.'['.$this->modename.']鐨勫崟鎹'; if($sm!='')$cont.='锛岃鏄:'.$sm.''; $gname = '鍥炴墽纭'; $tit = ''.$this->modename.'鍥炴墽纭'; } $nbis = $this->flownexttodo($type); if($nbis){ if(is_string($nbis))$cont = $nbis; if(is_array($nbis)){ $tit = arrvalue($nbis, 'title', $tit); $gname = arrvalue($nbis, 'gname', $gname); $cont = arrvalue($nbis, 'cont', $cont); } } if($cont!='')$this->push($nuid, $gname, $cont, $tit); } public function getwxurl($num='') { if($num=='')$num = $this->modenum; $url = $this->rock->getouturl(); $str = ''.$url.'?m=ying&d=we&num='.$num.''; return $str; } public function getweurl($num='') { if($num=='')$num = $this->modenum; $url = $this->rock->getouturl(); $str = ''.$url.'?m=ying&d=we&mnum='.$num.''; return $str; } public function deletebill($sm='', $qxpd=true) { if(getconfig('systype')=='demo')return '婕旂ず璇峰嬁鍒犻櫎'; if($qxpd){ $is = $this->isdeleteqx(); if($is==0)return '鏃犳潈鍒犻櫎'; } if(method_exists($this,'flowdeletebillbefore')){ $bstr = $this->flowdeletebillbefore($sm); if(!isempt($bstr))return $bstr; } $modewhere = "`modenum`='".$this->modenum."' and `mid`=".$this->id.""; $this->flogmodel->delete($this->mwhere); m('reads')->delete($this->mwhere); m('file')->delfile('', "`mtype`='".$this->mtable."' and `mid`=".$this->id." and `id` not in(select `fileid` from `[Q]files` where `type`=3)"); $tables = $this->moders['tables']; if(!isempt($tables)){ $arrse = explode(',', $tables); foreach($arrse as $arrses)m($arrses)->delete('mid='.$this->id.''); } $this->billmodel->delete($this->mwhere); $this->todosmodel->delete($this->mwhere); $this->checksmodel->delete($this->mwhere); $this->chaomodel->delete($this->mwhere); m('remind')->delete($this->mwhere); m('todo')->delete($this->mwhere); m('todo')->delete($modewhere); m('receipt')->delete($this->mwhere); m('im_history')->delete("`xgurl`='".$this->modenum."|".$this->id."'"); m('files')->delete("`ip`='".$this->modenum."|".$this->id."'"); $this->delete($this->id); $this->flowdeletebill($sm); $this->flowzuofeibill($sm); $this->gettodosend('bodel','', $sm); $dels = '鍒犻櫎妯″潡['.$this->modename.']id涓'.$this->id.'鐨勫崟鎹'; $ztss = arrvalue($this->rs,'base_summary'); if(!isempt($ztss))$dels.=',鎽樿['.$ztss.']'; if(!isempt($sm))$dels.=',璇存槑:'.$sm.''; m('log')->addlogs('鍒犻櫎鍗曟嵁', $dels, 3); foreach($this->wherejoin as $num=>$fields){ $this->deletebilljoin($num, "`$fields`='$this->id'", $sm); } return 'ok'; } public function deletebilljoin($num, $where, $sm='') { $flow = m('flow')->initflow($num); $rows = $flow->getall($where); foreach($rows as $k1=>$rs1){ $mid = $rs1['id']; $flow->loaddata($mid, false); $flow->deletebill($sm, false); } } public function zuofeibilljoin($num, $where, $sm='') { $flow = m('flow')->initflow($num); $rows = $flow->getall($where); foreach($rows as $k1=>$rs1){ $mid = $rs1['id']; $flow->loaddata($mid, false); $flow->zuofeibill($sm); } } public function zuofeibill($sm='') { $this->addlog(array( 'explain' => $sm, 'name' => '浣滃簾', 'status' => 1, )); $this->update('`status`=5', $this->id); $zfarr = array( 'status' => 5, 'nstatus' => 5, 'checksm' => '浣滃簾锛'.$sm.'', 'nowcheckid' => '', 'nowcheckname' => '', 'nstatustext' => '浣滃簾', 'updt' => $this->rock->now, ); $this->billmodel->update($zfarr, $this->mwhere); $tables = $this->moders['tables']; if(!isempt($tables)){ $arrse = explode(',', $tables); foreach($arrse as $arrses)m($arrses)->delete('mid='.$this->id.''); } $this->flowzuofeibill($sm); $this->gettodosend('bozuofei','', $sm); foreach($this->wherejoin as $num=>$fields){ $this->zuofeibilljoin($num, "`$fields`='$this->id'", $sm); } return 'ok'; } public function openxiang() { $xiangdata = $btndata = array(); $data = $this->flowrsreplace($this->rs,4); foreach($this->fieldsarra as $k=>$rs){ if($rs['iszs']=='1'){ $xiangdata[] = array( 'name' => $rs['name'], 'fields'=> $rs['fields'], 'value' => $this->rock->repempt(arrvalue($data,$rs['fields'])) ); } } $barr['xiangdata'] = $xiangdata; $btnrows = $this->db->getrows('[Q]flow_menu',"`setid`='$this->modeid' and `status`=1 and `num` like 'open%'",'id,wherestr,name,num,issm,type','`sort`'); foreach($btnrows as $k=>$rs){ $wherestr = $rs['wherestr']; $bo = false; if(isempt($wherestr)){ $bo = true; }else{ $ewet = $this->wheremodel->getstrwhere($this->rock->jm->base64decode($wherestr)); $ewet = str_replace(array('{asqom}','1=2 and'),'', $ewet); $tos = $this->rows("`id`='$this->id' and $ewet"); if($tos>0)$bo = true; } if($bo)$btndata[] = array( 'id' => $rs['id'], 'name' => $rs['name'], 'issm' => $rs['issm'], ); } $barr['btndata'] = $btndata; if(method_exists($this,'flowopenxiang')){ $lbarr = $this->flowopenxiang($data,$xiangdata,$btndata); if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v; } return $barr; } public function smschuiban($sm='') { if($this->isflow>0 && $this->adminid==$this->uid){ $farr = $this->getflow(true); $nowcheckid = $farr['nowcheckid']; $tplnum = $this->option->getval('sms_cbnum','defnum'); $wxurl = $this->getxiangurlx(); $barr = c('xinhuapi')->sendsms($nowcheckid, '', $tplnum, array( 'modename' => $this->modename, 'sericnum' => $this->sericnum, 'applyname'=> $this->uname, 'deptname' => $this->rs['base_deptname'], ),$wxurl, false, false); if(!$barr['success'])return $barr['msg']; $this->addlog(array( 'explain' => $sm, 'name' => '鐭俊鍌姙', 'status' => 1, )); } return 'ok'; } public function addschedule($sm='') { $txdt = $this->rock->post('txdt'); if(isempt($sm))return '璇存槑涓嶈兘涓虹┖'; if(isempt($txdt))return '鎻愰啋鏃堕棿涓嶈兘涓虹┖'; $barr['title'] = $sm; $barr['startdt'] = $txdt; $barr['uid'] = $this->adminid; $barr['optdt'] = $this->rock->now; $barr['optname']= $this->adminname; $barr['txsj'] = 1; m('schedule')->insert($barr); return 'ok'; } public function getoptmenu($flx=0) { $where = ''; if($flx==1)$where='and `iszs`=1'; $rows = $this->db->getrows('[Q]flow_menu',"`setid`='$this->modeid' ".$where." and `status`=1",'id,wherestr,name,statuscolor,statusvalue,num,islog,issm,type,upgcont','`sort`'); $arr = array(); $bfrom = $this->rock->post('bfrom'); if($flx==0)$arr[] = array('lx'=>0,'name'=>$this->rock->jm->base64decode('5pyq562!5o6I5peg5rOV5pi!56S66I!c5Y2V5aaC5bey562!5o6I5Y675Y2H57qn'),'optmenuid'=>0,'color'=>'red'); if($flx==1)return $arr; $status = (int)arrvalue($this->rs,'status','0'); $isturn = (int)arrvalue($this->rs, 'isturn','0'); $ismy = ($this->uid == $this->adminid or $this->optid == $this->adminid); $isreadbo = $this->isreadqx(1); if($this->isflow>0 && $isturn==1){ } if($status != 5 && arrvalue($this->moders,'ispl','1')=='1' && $isreadbo){ $arr[] = array('name'=>'璇勮','lx'=>15,'nup'=>1,'issm'=>1,'optmenuid'=>-15); } if($ismy && arrvalue($this->moders,'ishz')=='1' && $status==1){ $smcont = $this->getsummary(); $mid = (int)m('receipt')->getmou('id',"`uid`='$this->adminid' and `modenum`='$this->modenum' and `mid`='$this->id'"); $namess = '鍥炴墽纭璁剧疆'; if($mid>0)$namess = '鍥炴墽纭缂栬緫'; $arr[] = array('name'=>$namess,'djmid'=>$mid,'optnum'=>'receipt','lx'=>'18','optmenuid'=>-18,'modename'=>$this->modename,'smcont'=>$smcont); } if($isreadbo && arrvalue($this->moders,'istxset','1')=='1' && $this->modenum != 'remind' && !in_array($status, array(2,5))){ $smcont = ''.$this->modename.'锛'.$this->getsummary(); $mid = (int)m('remind')->getmou('id',"`uid`='$this->adminid' and `modenum`='$this->modenum' and `mid`='$this->id'"); $namess = '锛嬫坊鍔犳彁閱掕缃'; if($mid>0)$namess = '鎻愰啋璁剧疆缂栬緫'; $arr[] = array('name'=>$namess,'djmid'=>$mid,'smcont'=>$smcont,'issm'=>1,'optnum'=>'tixing','lx'=>'14','optmenuid'=>-14); } if($this->iseditqx()==1 && $isreadbo){ $arr[] = array('name'=>'缂栬緫','optnum'=>'edit','lx'=>'11','optmenuid'=>-11); } if($this->isdeleteqx()==1){ $arr[] = array('name'=>'鍒犻櫎','color'=>'red','optnum'=>'del','nup'=>1,'issm'=>0,'islog'=>0,'statusvalue'=>9,'lx'=>'9','optmenuid'=>-9); } if(method_exists($this,'flowgetoptmenuarr')){ $lbarr = $this->flowgetoptmenuarr($flx); if(is_array($lbarr))foreach($lbarr as $k=>$v)$arr[]=$v; } return $arr; } public function optmenu($czid, $zt, $sm='') { $msg = ''; $cname = $this->rock->post('changename'); $cnameid = $this->rock->post('changenameid'); $cdate = $this->rock->post('changedate'); $darr = array( 'cname' => $cname, 'cnameid' => $cnameid, 'cdate' => $cdate, 'sm' => $sm, ); if($czid==-9){ $msg = $this->deletebill($sm); }else if($czid==-10){ $msg = $this->check($zt, $sm); if(contain($msg,'鎴愬姛'))$msg = 'ok'; }else if($czid==-12){ $this->zhuijiaexplain($sm); }else if($czid==-13){ $this->chuiban($sm); }else if($czid==-14){ $msg = $this->addschedule($sm); }else if($czid==-15){ $actname = $this->rock->post('name'); $this->addlog(array( 'explain' => $sm, 'name' => $actname, )); $uids = ''; if(isset($this->rs['uid'])){ $uids= $this->rs['uid']; }else if(isset($this->rs['optid'])){ $uids= $this->rs['optid']; } if($uids)$this->nexttodo($uids, 'pinglun', $sm, $actname); $this->gettodosend('boping','', $sm); }else if($czid==-16){ $this->zuofeibill($sm); }else if($czid==-17){ $msg = $this->smschuiban($sm); }else if($czid==-18){ $msg = $this->jiankongzb($darr); }else{ } if($msg=='')$msg='ok'; return $msg; } public function jiankongzb($darr) { return $this->bd6('5peg5L!h5ZG8562!5o6I5peg5q2k5Yqf6IO9'); } public function billwhere($uid, $lx) { $arr['table'] = $this->mtable; $arr['tableleft'] = ''; $arr['fields'] = ''; $arr['order'] = ''; $arr['group'] = ''; $arr['keywhere']= ''; $arr['asqom'] = ''; $arr['onlywhere'] = ''; $arr['companywhere']= ''; $this->atype = $lx; $nas = $this->flowbillwhere($uid, $lx); $inwhere = ''; if(substr($lx,0,5)=='grant'){ $inwhere = $this->viewmodel->viewwhere($this->moders, $this->adminid, $this->flowviewufieds, 1); } if($lx=='chaos'){ $inwhere = "and {asqom}`id` in(select `mid` from `[Q]flow_chao` where `table`='{$this->mtable}' and ".$this->rock->dbinstr('csnameid', $this->adminid).")"; } if($lx=='mychuli'){ $inwhere = "and {asqom}`id` in(select bill.`mid` from `[Q]flow_bill` as `bill` where bill.`modeid`='{$this->modeid}' and ".$this->rock->dbinstr('bill.`allcheckid`', $this->adminid).")"; } $_wehs = ''; if(is_array($nas)){ if(isset($nas['where']))$_wehs = $nas['where']; $ftears = explode(',','asqom,order,fields,fieldsleft,table,group,companywhere,onlywhere,keywhere,tableleft'); foreach($ftears as $fid)if(isset($nas[$fid]))$arr[$fid] = $nas[$fid]; }else{ $_wehs = $nas; } $fwhere = $this->getflowwhere($uid, $lx); $path = ''.P.'/flow/page/rock_page_'.$this->modenum.'.php'; $table = $arr['table']; $temsao = 0; if(!contain($table, ' ') && $this->isflow>0){ $arr['table'] = '`[Q]'.$this->mtable.'` a left join `[Q]flow_bill` b on a.`id`=b.`mid` and b.`table`=\''.$this->mtable.'\''; if(!isempt($arr['tableleft']))$arr['table'].=' left join '.$arr['tableleft'].''; $arr['asqom'] = 'a.'; $arr['fields']= 'a.*,b.`uname` as base_name,b.`udeptname` as base_deptname,b.`sericnum`,b.`nowcheckname`'; if(isset($arr['fieldsleft']) && $arr['fieldsleft'])$arr['fields'].=','.$arr['fieldsleft'].''; if($arr['order']=='')$arr['order'] = 'a.`optdt` desc'; $temsao = 1; if($this->defaultorder){ $defa = explode(',', $this->defaultorder); $desc = arrvalue($defa, 1, 'desc'); $arr['order'] = 'a.`'.$defa[0].'` '.$desc.''; } } if(isempt($arr['order'])){ $arr['order'] = '{asqom}`id` desc'; if($this->defaultorder){ $defa = explode(',', $this->defaultorder); $desc = arrvalue($defa, 1, 'desc'); $arr['order'] = '{asqom}`'.$defa[0].'` '.$desc.''; } } if(isempt($fwhere) && isempt($inwhere) && $this->moders['isscl']>0){ $fwhere = 'and 1=2'; } $where = $inwhere; $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $where .= ' and {asqom}'.$wherestr; } if($fwhere!='')$where .= ' '.$fwhere; if($_wehs!='')$where .= ' '.$_wehs; $highwhere = $this->gethighwhere(); $allfields = array(); $key = $this->rock->post('key'); $pnum = $this->rock->post('pnum'); $status = $this->rock->post('keystatus'); $ztfields = arrvalue($nas, 'ztfields', 'status'); $xhlikea = array('like','=','>=','<=', 'not like'); $xhfields = $this->rock->post('xhfields'); $xhlike = (int)$this->rock->post('xhlike','0'); $xhkeygj = $this->rock->jm->base64decode($this->rock->post('xhkeygj')); if(!isempt($xhkeygj) && $xhfields){ if(substr($xhfields,0,2)=='zb'){ $xu = substr($xhfields,2,1); $zbasr = explode(',', $this->moders['tables']); $zbts = arrvalue($zbasr,$xu); $xhfields = substr($xhfields,4); $wher1 = "`$xhfields` ".$xhlikea[$xhlike].""; if($xhlike==0 || $xhlike==4)$wher1.=" '%".$xhkeygj."%'"; if($xhlike==1 || $xhlike==2 || $xhlike==3)$wher1.=" '$xhkeygj'"; $wher1 = " and {asqom}`id` in(select `mid` from `[Q]".$zbts."` where ".$wher1.")"; $where.= $wher1; }else{ $wher1 = " and {asqom}`$xhfields` ".$xhlikea[$xhlike].""; if($xhlike==0 || $xhlike==4)$wher1.=" '%".$xhkeygj."%'"; if($xhlike==1 || $xhlike==2 || $xhlike==3)$wher1.=" '$xhkeygj'"; $where.= $wher1; } } if(!isempt($status))$where .= ' and {asqom}`'.$ztfields.'`='.$status.''; if(!isempt($key) && isempt($arr['keywhere'])){ $check = c('check'); $allfields = $this->db->getallfields('[Q]'.$this->mtable.''); $_kearr = array(); if($check->isdate($key) || $check->ismonth($key)){ $skeay = array('date','datetime','month'); foreach($this->fieldsarra as $k=>$rs){ $flx = $rs['fieldstype']; $fid = $rs['fields']; if($rs['issou']==1 && in_array($flx, $skeay) && in_array($fid, $allfields)){ if($check->isdate($key)){ if($flx=='date')$_kearr[] = "{asqom}`".$fid."`='$key'"; if($flx=='datetime')$_kearr[] = "{asqom}`".$fid."` like '$key%'"; if($flx=='month')$_kearr[] = "{asqom}`".$fid."`='".substr($key,0,7)."'"; if($temsao==1){ $_kearr[] = "b.`applydt`='$key'"; } } if($check->ismonth($key)){ if($flx=='month'){ $_kearr[] = "{asqom}`".$fid."`='$key'"; }else{ $_kearr[] = "{asqom}`".$fid."` like '$key%'"; } if($temsao==1){ $_kearr[] = "b.`applydt` like '$key%'"; } } } } } if(!$_kearr){ $skeay = array('text','textarea','htmlediter','changeuser','changeusercheck','changedept','changedeptusercheck','selectdatafalse','selectdatatrue','num'); $xiakk = array('rockcombo','select'); foreach($this->fieldsarra as $k=>$rs){ if($rs['issou']==1 && in_array($rs['fields'], $allfields) && substr($rs['fields'],-2) != 'dt'){ if(in_array($rs['fieldstype'], $skeay))$_kearr[] = "{asqom}`".$rs['fields']."` like '%".$key."%'"; } } if($temsao==1){ $_kearr[] = "b.`uname` like '%".$key."%'"; $_kearr[] = "b.`udeptname` like '%".$key."%'"; $_kearr[] = "b.`sericnum` = '$key'"; $_kearr[] = "b.`nowcheckname` = '$key'"; } if(isset($nas['orlikefields'])){ $owhee = explode(',', $nas['orlikefields']); foreach($owhee as $owhees){ $_owhees = explode('@', $owhees); $sle = arrvalue($_owhees, 1); if($sle=='1'){ $_kearr[] = "".$_owhees[0]." ='$key'"; }else{ $_kearr[] = "".$_owhees[0]." like '%".$key."%'"; } } } } if($_kearr && $arr['onlywhere']=='')$arr['keywhere'] = "and (".join(' or ',$_kearr).")"; } if(!isempt($arr['companywhere']) && getconfig('companymode'))$where .= ' '.$arr['companywhere']; if(!isempt($arr['onlywhere']))$where .= ' '.$arr['onlywhere']; if(!isempt($arr['keywhere']))$where .= ' '.$arr['keywhere']; if($highwhere!='')$where .= ' '.$highwhere; $where = str_replace('{asqom}', $arr['asqom'], $where); $arr['order'] = str_replace('{asqom}', $arr['asqom'], $arr['order']); $where = str_replace('[A]', $arr['asqom'], $where); $fields = $arr['fields']; if($this->flowfieldstype==1 && (isempt($fields) || $fields=='*') && $this->moders['isscl']>0){ if(!$allfields)$allfields = $this->db->getallfields('[Q]'.$this->mtable.''); $fields = '{asqom}`id`'; $odlvs = $this->option->getval('columns_'.$this->modenum.'_'.$pnum.''); if(isempt($odlvs)){ foreach($this->fieldsarra as $k=>$rs){ if($rs['islb']==1 && in_array($rs['fields'],$allfields)){ $fields.=',{asqom}`'.$rs['fields'].'`'; } } }else{ $odlvsa = explode(',', $odlvs); foreach($odlvsa as $odlvs1){ if(in_array($odlvs1, $allfields)){ $fields.=',{asqom}`'.$odlvs1.'`'; } } } if($this->isflow>0){ if(!contain($fields,'`status`'))$fields.=',{asqom}`status`'; } $fields = str_replace('{asqom}', $arr['asqom'], $fields); $arr['fields'] = $fields; } $fields = $arr['fields']; if(!isempt($fields) && $fields!='*'){ $fieldsa = explode(',', $fields); $fieldss = ''; foreach($fieldsa as $fieldsas){ if(contain($fieldsas,'`') || contain($fieldsas,'.') || contain($fieldsas,' ') || contain($fieldsas,'(')){ $fieldss.=','.$fieldsas.''; }else{ $fieldss.=',`'.$fieldsas.'`'; } } $arr['fields'] = substr($fieldss, 1); } $arr['where'] = str_replace('{asqom}','', $where); return $arr; } public function gethighwhere() { $s = ''; return $s; } public function getflowwhere($uid, $num) { $where = ''; $rs = $this->wheremodel->getone("`setid`='$this->modeid' and `num`='$num'"); if(!$rs)return $where; $where = $this->wheremodel->getwherestr($rs, $uid, $this->flowviewufieds); return $where; } public function getflowrows($uid, $lx, $limit=5, $swher='') { $nas = $this->billwhere($uid, $lx); $table = $nas['table']; if(!contain($table,' '))$table='[Q]'.$table.''; if(isempt($nas['fields']))$nas['fields'] = '*'; $swher = str_replace('{asqom}',$nas['asqom'], $swher); $where = '1=1 '.$nas['where'].' '.$swher.''; if($limit==0)return $this->db->rows($table, $where ); $rows = $this->db->getrows($table, $where , $nas['fields'], $nas['order'], $limit); foreach($rows as $k=>$rs){ $rows[$k] = $this->flowrsreplace($rs, 2); } return $rows; } public function gettodorows($whereid) { $where = $this->wheremodel->getwherestr($whereid, $this->adminid, $this->flowviewufieds); $wherestr = $this->moders['where']; if(!isempt($wherestr)){ $wherestr = $this->rock->covexec($wherestr); $where .= ' and '.$wherestr; } $where = str_replace('{asqom}','', $where); $rows = $this->getall('2=2 '.$where.''); foreach($rows as $k=>$rs){ $rows[$k] = $this->flowrsreplace($rs, 1); } return $rows; } public function printexecl($event) { $arr['moders'] = $this->moders; $arr['fields'] = $this->getfields(); $cell = 1; foreach($arr['fields'] as $k=>$v)$cell++; $arr['cell'] = $cell; $where = '1=1'; $str1 = $this->moders['where']; if(!isempt($str1)){ $str1 = $this->rock->covexec($str1); $where = $str1; } $vwhere = $this->viewmodel->viewwhere($this->moders, $this->adminid); $rows = $this->getrows(''.$where.' '.$vwhere.'', '*', 'id desc', 100); $arr['rows'] = $this->flowprintrows($rows); $arr['count'] = $this->db->count; return $arr; } public function getsuballdata($lx=0, $mid=0) { $tabless = $this->moders['tables']; $subdata = array(); if($mid==0)$mid = $this->id; if(!isempt($tabless)){ $tablessa = explode(',', $tabless); $namessa = explode(',', $this->moders['names']); $tabless1 = '['.str_replace(',','],[', $tabless).']'; foreach($tablessa as $zbx=>$tables){ $cis = substr_count($tabless1, '['.$tables.']'); $whes = ''; if($cis>1)$whes=' and `sslx`='.$zbx.''; $data = m($tables)->getall('mid='.$mid.''.$whes.'','*','`sort`'); $data = $this->flowsubdata($data, $lx, $zbx); if($lx == 0){ $subdata['subdata'.$zbx.''] = $data; }else{ $subdata[$zbx] = array( 'data' => $data, 'fields'=> 'subdata'.$zbx.'', 'name' => $this->rock->arrvalue($namessa, $zbx) ); } } } return $subdata; } private $gettodolistarr = null; public function gettodolist($act) { if(is_array($act))return $act; if($this->gettodolistarr === null){ $rows = $this->todomodel->getrows("`setid`='".$this->modeid."' and `status`=1"); $barr = array(); foreach($rows as $k=>$rs){ $whereid = (int)$rs['whereid']; if($whereid > 0){ $bo = $this->wheremanzhu($whereid); if(!$bo)continue; } $barr[] = $rs; } $this->gettodolistarr = $barr; }else{ $barr = $this->gettodolistarr; } $garr = array(); if($barr)foreach($barr as $k=>$rs){ if(arrvalue($rs,$act)=='1')$garr[] = $rs; } return $garr; } public function gettodosend($act, $actname='',$sm='', $courseid=0, $conts='') { $barr = $this->gettodolist($act); if(!$barr)return; $changearr = array('boturn'=>'鎻愪氦','boedit'=>'缂栬緫','bozhuan'=>'杞姙','bochang'=>'淇敼瀛楁','bodel'=>'鍒犻櫎','bozuofei'=>'浣滃簾','botong'=>'澶勭悊鍚屾剰','bobutong'=>'澶勭悊涓嶅悓鎰','bofinish'=>'鍏ㄩ儴澶勭悊瀹屾垚','bozhui'=>'杩藉姞璇存槑','boping'=>'璇勮','bohuiz'=>'鍥炴墽纭'); if($actname=='' && is_string($act))$actname = arrvalue($changearr, $act); if(isempt($actname))return; $cheo = c('check'); foreach($barr as $k=>$rs){ $receid = $rs['receid']; if($act=='botong' || $act=='bobutong'){ $changewe = $rs['changecourse']; if(!isempt($changewe) && !contain(','.$changewe.',',','.$courseid.','))continue; } if($rs['toturn']==1)$receid.=','.$this->uid.''; if(arrvalue($rs,'tosuper')=='1'){ $supar = $this->adminmodel->getsuperman($this->uid); $shnej = arrvalue($supar, 0); if(!isempt($shnej))$receid.=','.$shnej.''; } if($rs['tocourse']==1 && $this->billrs){ $allcheckid = $this->billrs['allcheckid']; if(!isempt($allcheckid))$receid.=','.$allcheckid.''; } $todofields = $rs['todofields']; if(!isempt($todofields)){ $toad = explode(',', $todofields); foreach($toad as $toads){ $ttv = arrvalue($this->rs, $toads); if(!isempt($ttv) && $cheo->isinnumber($ttv))$receid.=','.$ttv.''; } } if(isempt($receid))continue; if(substr($receid,0,1)==',')$receid = substr($receid, 1); $cont = $rs['summary']; if(isempt($cont))$cont = $conts; if(isempt($cont)){ $cont = ''.$this->adminname.''.$actname.'['.$this->modename.',鍗曞彿:'.$this->sericnum.']'; if($sm!='')$cont.=',璇存槑:'.$sm.''; } $this->push($receid, '', $cont, $this->rock->repempt($rs['name'])); } } public function numtodosend($num, $actname='',$sm='') { $rows = $this->todomodel->getrows("`setid`='".$this->modeid."' and `num`='$num' and `status`=1"); if(!$rows)return; $this->gettodosend($rows, $actname, $sm); } public function flowtotal($fields='', $type='') { if($fields=='')$fields = $this->rock->post('total_fields'); if($type=='')$type = $this->rock->post('total_type','jls'); $typea = explode('|', $type); $typefields = ''; $type = $typea[0]; $typefields = arrvalue($typea, 1); $rowa = array(); $rowa[] = array( 'name' => '鏆傛棤鏁版嵁', 'value' => 0, 'bili' => '' ); $tofiels= 'count(1)'; if($type=='sum')$tofiels = 'sum([A]`'.$typefields.'`)'; if($type=='avg')$tofiels = 'avg([A]`'.$typefields.'`)'; $atype = $this->rock->post('atype'); $table = '[Q]'.$this->mtable.''; $narr = $this->billwhere($this->adminid, $atype); $where = $narr['where']; $table = $narr['table']; if(!contain($table,' '))$table = '[Q]'.$table.''; $gwhere = $this->rock->post('where'); if(!isempt($gwhere)){ $gwhere = $this->rock->jm->uncrypt($this->rock->iconvsql($gwhere)); $where .= ' '.$gwhere.''; } $sql = 'select '.$fields.' as `name`,'.$tofiels.' as value from '.$table.' where 1=1 '.$where.' group by '.$fields.''; $sql = str_replace('[A]', $narr['asqom'], $sql); $rows = $this->db->getall($sql); $total = 0; if($rows){ foreach($rows as $k=>$rs)$total+=floatval($rs['value']); if($total>0)foreach($rows as $k=>$rs){ $rows[$k]['bili'] = $this->rock->number($rs['value']*100/$total).'%'; } if($type!='avg' && count($rows)>1)$rows[] = array('name' => '鍚堣','value' => $total,'bili' => ''); }else{ $rows = $rowa; } return $rows; } public function receiptcheck($hid, $sm) { return 'ok'; } public function getrowstable($atype, $where, $limit=100) { $rows = $this->getflowrows($this->adminid,$atype,$limit,$where); $headstr = '@xuhaos,,center'; foreach($this->fieldsarra as $k=>$rs){ if($rs['islb']==1 && $rs['iszb']=='0') $headstr.='@'.$rs['fields'].','.$rs['name'].''; } if($this->isflow>0){ $headstr.='@statustext,鐘舵'; if(is_array($rows))foreach($rows as $k=>$rs){ $rows[$k]['statustext'] = $this->getstatusstr($rs); } } $cont = c('html')->createrows($rows, substr($headstr, 1),'#cccccc','noborder'); return $cont; } public function viewjinfields($rows) { if(!$rows)return $rows; return $rows; } public function daochusubtable($rows) { return $rows; } } \ No newline at end of file diff --git a/webmain/model/flow/userractModel.php b/webmain/model/flow/userractModel.php index 134a99f..3888520 100644 --- a/webmain/model/flow/userractModel.php +++ b/webmain/model/flow/userractModel.php @@ -9,9 +9,13 @@ class flow_userractClassModel extends flowModel $this->statearr = explode(',','寰呮墽琛,鐢熸晥涓,宸茬粓姝,宸茶繃鏈'); } - public function flowrsreplace($rs) + public function flowrsreplace($rs, $lx=0) { $rs['state'] = $this->statearr[$rs['state']]; + if(isset($rs['newname']) && !isempt($rs['newname']) && $rs['newname']!=$rs['uname'])$this->update("`uname`='".$rs['newname']."'",$rs['id']); + if($lx==1){ + $rs['deptname'] = $this->adminmodel->getmou('deptname', $rs['uid']); + } return $rs; } public function updatestate() @@ -31,7 +35,7 @@ class flow_userractClassModel extends flowModel return array( 'where' => '', 'table' => $table, - 'fields'=> 'a.*,b.deptname', + 'fields'=> 'a.*,b.deptname,b.`name` as newname', 'orlikefields'=>'b.deptname', 'order' => 'a.`optdt` desc', 'asqom' => 'a.' diff --git a/webmain/model/homeitemsModel.php b/webmain/model/homeitemsModel.php index 0d1608a..464e27d 100644 --- a/webmain/model/homeitemsModel.php +++ b/webmain/model/homeitemsModel.php @@ -69,19 +69,30 @@ class homeitemsClassModel extends Model if(in_array('flowtodo', $nubar) && !isset($arr['flowtodo']))$arr['flowtodo'] = m('flowtodo')->getwdtotals($uid); if(in_array('cropt', $nubar) && !isset($arr['cropt']))$arr['cropt'] = m('goods')->getdaishu(); //鍑哄叆搴撴搷浣滄暟 if(in_array('receiptmy', $nubar) && !isset($arr['receiptmy']))$arr['receiptmy'] = m('flow:receipt')->getweitotal($uid); - if(in_array('myhong', $nubar) && !isset($arr['myhong']))$arr['myhong'] = m('official')->rows('`uid`='.$uid.' and `type`=0 and `status`=1 and `thid`=0');//缁熻鏈绾㈢殑 - if(in_array('officidus', $nubar) && !isset($arr['officidus']))$arr['officidus'] = m('officidu')->rows('`status` in(0,3) and `isturn`=1 and '.$this->rock->dbinstr('runrenid',$uid).''); + if(in_array('myhong', $nubar) && !isset($arr['myhong']) && $this->iscun('officiahong'))$arr['myhong'] = m('official')->rows('`uid`='.$uid.' and `type`=0 and `status`=1 and `thid`=0');//缁熻鏈绾㈢殑 + if(in_array('officidus', $nubar) && !isset($arr['officidus']) && $this->iscun('officidu'))$arr['officidus'] = m('officidu')->rows('`status` in(0,3) and `isturn`=1 and '.$this->rock->dbinstr('runrenid',$uid).''); //鏈畬鎴愬伐浣滆鍒 - if(in_array('myplan', $nubar) && !isset($arr['myplan'])){ + if(in_array('myplan', $nubar) && !isset($arr['myplan']) && $this->iscun('planm')){ $obj = m('flow:planm'); if(method_exists($obj,'getwwctotals'))$arr['myplan'] = $obj->getwwctotals($uid); } + if($this->iscun('custfina')){ + $dbss = m('custfina'); + if(in_array('daifina', $nubar))$arr['daifina'] = $dbss->rows('`ispay`=1 and `jzid`=0 and `type`=0'); + if(in_array('daifinb', $nubar))$arr['daifinb'] = $dbss->rows('`ispay`=1 and `jzid`=0 and `type`=1'); + } return $arr; } + //鍒ゆ柇妯″潡鏄惁寮鍚瓨鍦 + public function iscun($num) + { + $to = $this->db->rows('[Q]flow_set',"`num`='$num' and `status`=1"); + return $to==1; + } //鎴戠殑鐢宠 public function get_apply_arr() diff --git a/webmain/model/modeModel.php b/webmain/model/modeModel.php index 42f918c..623d747 100644 --- a/webmain/model/modeModel.php +++ b/webmain/model/modeModel.php @@ -81,7 +81,7 @@ class modeClassModel extends Model $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`','`iszb`,`sort`'); + $farrs = m('flow_element')->getall("`mid`='$modeid'",'`fields`,`name`,`fieldstype`,`ispx`,`isalign`,`iszb`,`islb`,`issou`,`data`,`width`','`iszb`,`sort`'); $inpub = c('input'); $zbarr = $zbnamea = array(); if(!isempt($mors['names']))$zbnamea = explode(',', $mors['names']); @@ -139,11 +139,13 @@ class modeClassModel extends Model if($glx==1){ return array( 'isflow' => $isflow, + 'modeid' => $modeid, 'fieldsarr' => $farr, 'fieldzarr' => $zbarr, 'fieldsselarr' => $fselarr, 'chufarr' => $chufarr, 'modename' => $name, + 'modetable'=> $this->rock->jm->encrypt($mors['table']), 'modenames' => $this->rock->repempt($mors['names']), ); } @@ -281,7 +283,7 @@ $rstr = "".$hstart." $arr['gongwen'] = '204,239,289,290,232,256,258,291,292,293,306,205,257,259,294,255,233,206,304,305'; - $arr['crm'] = '63,37,64,73,104,105,114,118,126,179,262,299,131,132,75,112,113,123,263,317,110,111,108,109,106,119,115,116,117,107,120,121,122,175,176,177,178,264,302,318,300,301,386,387'; + $arr['crm'] = '63,37,64,73,104,105,114,118,126,179,262,299,131,132,75,112,113,123,263,317,110,111,108,109,106,119,115,116,117,107,120,121,122,175,176,177,178,264,302,318,300,301,386,387,458,459,460'; $arr['userinfo'] = '85,101,149'; $arr['userract'] = '95'; @@ -294,10 +296,12 @@ $rstr = "".$hstart." $arr['hrtrsalary'] = '129'; $arr['reward'] = '130'; - $arr['finjishou'] = '311,312,316,369'; + $arr['finjishou'] = '311,312,316,369,457'; $arr['finzhang'] = '308'; $arr['finkemu'] = '309'; $arr['finount'] = '310'; + $arr['finscrip'] = '453,454,455'; + $arr['finscrib'] = '456'; $arr['finfybx'] = '187,191'; $arr['finccbx'] = '188'; diff --git a/webmain/public/print/tpl_print.html b/webmain/public/print/tpl_print.html index 758b270..8269ddc 100644 --- a/webmain/public/print/tpl_print.html +++ b/webmain/public/print/tpl_print.html @@ -73,6 +73,7 @@ var prt = { + + + + + + +
+
+
+
+
+
+ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||