信呼v2.5.1版本
This commit is contained in:
@@ -255,6 +255,7 @@ class inputAction extends Action
|
||||
|
||||
//保存后处理
|
||||
$this->saveafter($table,$this->getsavenarr($uaarr, $oldrs), $id, $addbo);
|
||||
if($addbo)c('cache')->del('tempdata_'.$modenum.'_'.$this->adminid.'');//删除暂存
|
||||
|
||||
//保存修改记录
|
||||
$editcont = '';
|
||||
@@ -675,6 +676,8 @@ class inputAction extends Action
|
||||
$otherfile = 'webmain/flow/input/tpl_input_luother_'.$this->ismobile.'.html';
|
||||
if(!file_exists($otherfile))$otherfile = '';
|
||||
$this->assign('otherfile', $otherfile);
|
||||
$tempdata = ($mid==0) ? c('cache')->get('tempdata_'.$num.'_'.$this->adminid.'') : '';
|
||||
$this->assign('tempdata', $tempdata);
|
||||
}
|
||||
|
||||
//2022-06-15添加分组显示
|
||||
@@ -699,7 +702,7 @@ class inputAction extends Action
|
||||
//多行子表内替换
|
||||
private function pisubduolie($content, $modeid, $nameaas)
|
||||
{
|
||||
$fieldarr = m('flow_element')->getrows("`mid`='$modeid' and `iszb`>0",'fields,fieldstype,name,dev,data,isbt,islu,attr,iszb,gongsi,lens','`sort`');
|
||||
$fieldarr = m('flow_element')->getrows("`mid`='$modeid' and `iszb`>0",'*','`sort`');
|
||||
if(!$fieldarr)return $content;
|
||||
$this->fieldarr = array();
|
||||
foreach($fieldarr as $k=>$rs){
|
||||
@@ -1162,6 +1165,22 @@ class inputAction extends Action
|
||||
}
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂存7天
|
||||
*/
|
||||
public function savezhanAjax()
|
||||
{
|
||||
$flownum = $this->post('flownum');
|
||||
$contstr = $this->post('contstr');
|
||||
$key = 'tempdata_'.$flownum.'_'.$this->adminid.'';
|
||||
if($contstr){
|
||||
c('cache')->set($key, $contstr, 3600*24*7);
|
||||
}else{
|
||||
c('cache')->del($key);
|
||||
}
|
||||
return returnsuccess();
|
||||
}
|
||||
}
|
||||
|
||||
class inputClassAction extends inputAction{}
|
||||
@@ -375,6 +375,8 @@ var c={
|
||||
if(smid=='0'||smid==''){
|
||||
isedit=1;
|
||||
$('#AltSspan').show();
|
||||
$('#Altzhan').show();
|
||||
c.loadzhan();
|
||||
c.initdatelx();
|
||||
c.initinput();
|
||||
initbodys(smid);
|
||||
@@ -421,36 +423,9 @@ var c={
|
||||
var da = a.data;
|
||||
alldata= da;
|
||||
js.setmsg();
|
||||
var len = arr.length,i,fid,val,flx,ojb,j;
|
||||
var len = arr.length,i,j;
|
||||
data=da.data;
|
||||
for(i=0;i<len;i++){
|
||||
fid=arr[i].fields;
|
||||
flx=arr[i].fieldstype;
|
||||
if(arr[i].islu=='1' && arr[i].iszb=='0' && fid.indexOf('temp_')!=0){
|
||||
val=da.data[fid];
|
||||
if(val==null)val='';
|
||||
if(flx=='checkboxall'){
|
||||
ojb=$("input[name='"+fid+"[]']");
|
||||
val=','+val+',';
|
||||
for(j=0;j<ojb.length;j++){
|
||||
if(val.indexOf(','+ojb[j].value+',')>-1)ojb[j].checked=true;
|
||||
}
|
||||
}else if(flx=='graph'){
|
||||
if(form(fid))form(fid).value=val;
|
||||
if(val)$('#graphview_'+fid+'').append('<div><img id="imgqianming_'+fid+'" src="'+val+'" height="90"></div>');
|
||||
}else if(flx=='checkbox'){
|
||||
form(fid).checked = (val=='1');
|
||||
}else if(flx=='htmlediter' && this.editorobj[fid]){
|
||||
this.editorobj[fid].html(val);
|
||||
}else if(flx.substr(0,6)=='change'){
|
||||
if(form(fid))form(fid).value=val;
|
||||
fid = arr[i].data;
|
||||
if(!isempt(fid)&&form(fid))form(fid).value=da.data[fid];
|
||||
}else{
|
||||
if(form(fid))form(fid).value=val;
|
||||
}
|
||||
}
|
||||
}
|
||||
for(i=0;i<len;i++)this.showvalue(arr[i],da.data);
|
||||
isedit=da.isedit;
|
||||
if(form('base_name'))form('base_name').value=da.user.name;
|
||||
if(form('base_deptname'))form('base_deptname').value=da.user.deptname;
|
||||
@@ -544,6 +519,7 @@ var c={
|
||||
if(gongsistr.indexOf('AmountInWords')>-1)js.importjs('js/rmb.js');
|
||||
if(gongsistr.indexOf('js.')>-1)js.importjs('js/jsrock.js');
|
||||
}
|
||||
this.tempkey = ''+moders.num+'tempdata';
|
||||
},
|
||||
getsubdata:function(i){
|
||||
var d=[];
|
||||
@@ -729,7 +705,95 @@ var c={
|
||||
o.show();
|
||||
o.prev().show();
|
||||
},
|
||||
|
||||
savezhan:function(){
|
||||
var d = js.getformdata();
|
||||
var len = arr.length,i,fid;
|
||||
for(i=0;i<len;i++){
|
||||
if(arr[i].iszb!='0')continue;
|
||||
fid = arr[i].fields;
|
||||
if(arr[i].islu=='1' && arr[i].fieldstype=='htmlediter' && this.editorobj[fid]){
|
||||
d[fid] = this.editorobj[fid].html();
|
||||
}
|
||||
}
|
||||
for(i=0;i<this.subcount;i++)d['subdata'+i+''] = this.getsubdata(i);
|
||||
this.savezhans(jm.base64encode(JSON.stringify(d)));
|
||||
js.msgok('暂存保存成功');
|
||||
},
|
||||
savezhans:function(str){
|
||||
if(!str)str='';
|
||||
js.ajax(geturlact('savezhan'),{flownum:moders.num,contstr:str},function(ret){
|
||||
if(!str){
|
||||
js.msgok('暂存已删除');
|
||||
js.reload();
|
||||
}
|
||||
}, 'post');
|
||||
},
|
||||
showvalue:function(fa,da){
|
||||
var fid,flx,val,ojb,j,fb=[];
|
||||
fid = fa.fields;
|
||||
flx = fa.fieldstype;
|
||||
if(fa.islu=='1' && fa.iszb=='0' && fid.indexOf('temp_')!=0){
|
||||
val=da[fid];
|
||||
if(val==null)val='';
|
||||
fb.push(fid);
|
||||
if(flx=='checkboxall'){
|
||||
ojb=$("input[name='"+fid+"[]']");
|
||||
val=','+val+',';
|
||||
for(j=0;j<ojb.length;j++){
|
||||
if(val.indexOf(','+ojb[j].value+',')>-1)ojb[j].checked=true;
|
||||
}
|
||||
}else if(flx=='graph'){
|
||||
if(form(fid))form(fid).value=val;
|
||||
if(val)$('#graphview_'+fid+'').append('<div><img id="imgqianming_'+fid+'" src="'+val+'" height="90"></div>');
|
||||
}else if(flx=='checkbox'){
|
||||
form(fid).checked = (val=='1');
|
||||
}else if(flx=='htmlediter' && this.editorobj[fid]){
|
||||
this.editorobj[fid].html(val);
|
||||
}else if(flx.substr(0,6)=='change'){
|
||||
if(form(fid))form(fid).value=val;
|
||||
fid = fa.data;
|
||||
if(!isempt(fid)&&form(fid)){
|
||||
form(fid).value=da[fid];
|
||||
fb.push(fid);
|
||||
}
|
||||
}else{
|
||||
if(form(fid))form(fid).value=val;
|
||||
}
|
||||
}
|
||||
return fb;
|
||||
},
|
||||
loadzhan:function(){
|
||||
var dstr = tempdata;
|
||||
if(dstr){
|
||||
var da = js.decode(jm.base64decode(dstr));
|
||||
c.loadzhanshow(da);
|
||||
}
|
||||
},
|
||||
loadzhanshow:function(da){
|
||||
var i,zn,j,sub,len;
|
||||
for(i=0;i<this.subcount;i++){
|
||||
sub = da['subdata'+i+''];
|
||||
if(sub){
|
||||
zn = sub.length;
|
||||
for(j=0;j<zn;j++){
|
||||
if(form('xuhao'+i+'_'+j+'')){
|
||||
this.setrowdata(i,j, sub[j]);
|
||||
}else{
|
||||
this.insertrow(i,sub[j],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var len=arr.length,fda=['id'];
|
||||
for(i=0;i<len;i++)fda= fda.concat(this.showvalue(arr[i],da));
|
||||
for(i in da){
|
||||
if(fda.indexOf(i)==-1 && i.indexOf('0_')==-1){
|
||||
if(form(i))form(i).value = da[i];
|
||||
}
|
||||
}
|
||||
js.msg('success','当前记录读取暂存的,<a href="javascript:;" onclick="c.savezhans()" class="zhu">[删除暂存]</a>', 10);
|
||||
this.zhanbool = true;
|
||||
},
|
||||
|
||||
//----强大公式计算函数处理start-----
|
||||
inputblur:function(o1,zb){
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
var inputtwo={
|
||||
onchangebefore:function(){},
|
||||
selectdatadata:{}, //保存数据源
|
||||
selectdata:function(s1,ced,fid,tit,zbis){
|
||||
if(isedit==0)return;
|
||||
@@ -144,7 +145,7 @@ var inputtwo={
|
||||
}
|
||||
this.initupssa[sna]=$.rockupload({
|
||||
'inputfile':'filed_'+sna+'_inp',
|
||||
'initremove':false,'uptype':uptp,
|
||||
'initremove':false,'uptype':uptp,'formming':sna,
|
||||
'urlparams':{'sysmodenum':modenum,'sysmid':mid},
|
||||
'oparams':{sname:sna,snape:tsye},
|
||||
'onsuccess':function(f,gstr){
|
||||
@@ -186,6 +187,13 @@ var inputtwo={
|
||||
}else if(tsye=='img'){
|
||||
js.loading('上传中...');
|
||||
}
|
||||
},
|
||||
onerror:function(estr){
|
||||
c.upfbo = false;
|
||||
js.msg('msg',estr);
|
||||
},
|
||||
onchangebefore:function(){
|
||||
c.onchangebefore(this);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -207,7 +215,7 @@ var inputtwo={
|
||||
js.loading('等待上传完成...');
|
||||
setTimeout("c.upimages('"+fid+"','"+fileid+"', true)",3000);
|
||||
}else{
|
||||
js.ajax(geturlact('upimagepath'),{fileid:fileid,fid:fid},function(ret){
|
||||
js.ajax('api.php?m=login&a=upimagepath',{fileid:fileid,fid:fid},function(ret){
|
||||
js.unloading();
|
||||
var da = ret.data;
|
||||
if(da.path)form(da.fid).value=da.path;
|
||||
@@ -379,5 +387,69 @@ var inputtwo={
|
||||
if(lx==0)obj.create();
|
||||
if(lx==1)obj.imports();
|
||||
if(lx==2)obj.clear();
|
||||
},
|
||||
//自动完成2022-10-30添加
|
||||
autocompletearr:{},
|
||||
autocomplete:function(o1,s1,id1,zb){
|
||||
clearTimeout(this.autoctime);
|
||||
this.autocompletea=[o1,s1,id1,zb];
|
||||
if(this.nowinpvle == o1.value && get('completelist'))return;
|
||||
if(this.autocompletearr[id1]){
|
||||
this.autoctime = setTimeout(function(){c.autocompleteshow(o1,c.autocompletearr[id1]);},10);
|
||||
return;
|
||||
}
|
||||
var a1 = s1.split(',');
|
||||
var gcan = {'act':a1[0],'actstr':jm.base64encode(s1),'acttyle':'act','sysmodenum':modenum,'sysmid':mid};
|
||||
js.ajax(geturlact('getselectdata', gcan),{key:jm.base64encode(o1.value)}, function(ret){
|
||||
c.autocompletearr[id1] = ret;
|
||||
c.autocompleteshow(o1,ret);
|
||||
},'get,json')
|
||||
},
|
||||
autocompleteshow:function(o1,da){
|
||||
if(!da || da.length==0)return;
|
||||
var o2 = $(o1),lefta=o2.offset(),i,len=da.length,ds=[],zl=10,j=0;
|
||||
$('#completelist').remove();
|
||||
var str= '<div id="completelist" style="position:absolute;z-index:9;left:'+lefta.left+'px;top:'+(lefta.top+29)+'px;background:white;border:1px var(--main-color) solid;box-shadow: 0px 0px 5px rgb(0,0,0,0.3)"></div>';
|
||||
var val= strreplace(o1.value);
|
||||
if(val){
|
||||
for(i=0;i<len;i++)if(da[i].name.indexOf(val)>-1 || (da[i].subname && da[i].subname.indexOf(val)>-1)){
|
||||
ds.push(da[i]);j++;if(j>=zl*3)break;
|
||||
}
|
||||
}else{
|
||||
ds=da;
|
||||
}
|
||||
this.autodata = ds;
|
||||
this.nowinpvle= o1.value;
|
||||
$('body').append(str);
|
||||
this.autocompleteshows(zl,1)
|
||||
js.addbody('completelist', 'remove','completelist');
|
||||
},
|
||||
autocompleteshows:function(zl,p){
|
||||
var ds = this.autodata;
|
||||
var str='',i,len=ds.length,j=0;
|
||||
for(i=(p-1)*zl;i<len;i++){
|
||||
str+='<div class="list-itemv" onclick="c.autocompleteclick('+i+')" value="'+i+'" style="padding:5px 10px">'+ds[i].name+'';
|
||||
if(ds[i].subname)str+=' <span style="font-size:12px">('+ds[i].subname+')</span>';
|
||||
str+='</div>';
|
||||
j++;
|
||||
if(j>=zl)break;
|
||||
}
|
||||
if(len>zl){
|
||||
str+='<div style="padding:5px 10px;background:#eeeeee">总记录'+len+'条';
|
||||
if(p>1)str+=' <a href="javascript:;" class="zhu" onclick="c.autocompleteshows(\''+zl+'\','+(p-1)+')"><上页</a>';
|
||||
if(j==zl)str+=' <a href="javascript:;" class="zhu" onclick="c.autocompleteshows(\''+zl+'\','+(p+1)+')">下页></a>';
|
||||
str+='</div>';
|
||||
}
|
||||
setTimeout(function(){$('#completelist').html(str)},10);
|
||||
},
|
||||
autocompleteclick:function(i){
|
||||
var d = this.autodata[i],o1=this.autocompletea[0];
|
||||
o1.value=d.name;
|
||||
var a1 = this.autocompletea[1].split(',');
|
||||
if(a1[1]){
|
||||
if(form(a1[1]))form(a1[1]).value = d.value;
|
||||
}
|
||||
this.onselectdataall(o1.name,d);
|
||||
$('#completelist').remove();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,12 @@
|
||||
//流程模块【collectm.信息收集】下录入页面自定义js页面,初始函数
|
||||
function initbodys(){
|
||||
|
||||
}
|
||||
|
||||
function changesubmit(d){
|
||||
if(d.fenlei=='0' && !d.runren)return '请选择收集对象';
|
||||
}
|
||||
|
||||
js.changeuser_before=function(na){
|
||||
if(na=='runren' && form('fenlei').value=='1')return '外部收集不需要选择人';
|
||||
}
|
||||
@@ -13,7 +13,7 @@ function initbodys(){
|
||||
addchengesss();
|
||||
|
||||
if(mid=='0'){
|
||||
if(form('cardid'))js.ajax(geturlact('getlast'),{},function(d){
|
||||
if(!c.zhanbool && form('cardid'))js.ajax(geturlact('getlast'),{},function(d){
|
||||
if(d){
|
||||
if(form('paytype'))form('paytype').value=d.paytype;
|
||||
if(form('cardid'))form('cardid').value=d.cardid;
|
||||
|
||||
@@ -4,7 +4,7 @@ function initbodys(){
|
||||
if(js.request('optlx')=='my'){
|
||||
for(var i=0;i<disarr.length;i++)if(form(disarr[i]))form(disarr[i]).disabled=true;
|
||||
}
|
||||
form('jiguan').readOnly=false;
|
||||
if(form('jiguan'))form('jiguan').readOnly=false;
|
||||
}
|
||||
|
||||
function changesubmit(){
|
||||
|
||||
4
webmain/flow/input/inputjs/mode_yqhealthy.js
Normal file
4
webmain/flow/input/inputjs/mode_yqhealthy.js
Normal file
@@ -0,0 +1,4 @@
|
||||
//流程模块【yqhealthy.健康报备】下录入页面自定义js页面,初始函数
|
||||
function initbodys(){
|
||||
|
||||
}
|
||||
@@ -15,9 +15,10 @@ class mode_collectmClassAction extends inputAction{
|
||||
protected function savebefore($table, $arr, $id, $addbo){
|
||||
$rows['type'] = 2; //必须为2
|
||||
|
||||
$dbs = m('admin');
|
||||
$rows['leixing'] = $dbs->rows($dbs->gjoin($arr['runrenid'], 'ud', 'where'));
|
||||
|
||||
if($arr['fenlei']=='0'){
|
||||
$dbs = m('admin');
|
||||
$rows['leixing'] = $dbs->rows($dbs->gjoin($arr['runrenid'], 'ud', 'where'));
|
||||
}
|
||||
return array(
|
||||
'rows' => $rows
|
||||
);
|
||||
@@ -34,6 +35,20 @@ class mode_collectmClassAction extends inputAction{
|
||||
|
||||
}
|
||||
|
||||
public function beizhustring()
|
||||
{
|
||||
return '<span style="color:gray">类型是外部收集,字段类型仅支持文本框,文本域,日期类型,单选框,复选框的类型。</span>';
|
||||
}
|
||||
|
||||
public function createouturlAjax()
|
||||
{
|
||||
header("Content-type:image/png");
|
||||
$urls= $this->rock->getouturl();
|
||||
$id = (int)$this->get('id');
|
||||
m('planm')->update('`state`=1', $id);
|
||||
$url = ''.$urls.'?m=login&a=collect&mid='.$id.'';
|
||||
$img = c('qrcode')->show($url);
|
||||
echo $img;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,5 +31,96 @@ class mode_collectsClassAction extends inputAction{
|
||||
protected function saveafter($table, $arr, $id, $addbo){
|
||||
|
||||
}
|
||||
|
||||
protected function storeaftersss($table, $rows, $barr=array())
|
||||
{
|
||||
$arr = array();
|
||||
$mid = (int)$this->get('leixingid','0');
|
||||
if($mid>0 && isset($barr['listinfo'])){
|
||||
$fieldsarr = $barr['listinfo']['fieldsarr'];
|
||||
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function collectstotal_before()
|
||||
{
|
||||
$mid = (int)$this->get('mid','0');
|
||||
$this->mid = $mid;
|
||||
$key = $this->post('key');
|
||||
$this->zdarr = m('plans')->getall('mid='.$this->mid.'','*','`sort`');
|
||||
$this->zdobj = array();
|
||||
$where = '';
|
||||
if($key)$where=" and (`optname` like '%".$key."%'";
|
||||
$wher1 = '';
|
||||
foreach($this->zdarr as $k=>$rs){
|
||||
$flx = $rs['zxren'];
|
||||
$this->zdobj[$rs['id']] = $flx;
|
||||
}
|
||||
if($key)$wher1=" a.`zxren` like '%".$key."%'";
|
||||
if($wher1)$where.=' or `id` in(select a.`mid` from `[Q]plans` a left join `[Q]planm` b on a.`mid`=b.`id` where b.`type`=3 and b.`leixing`='.$mid.' and '.$wher1.')';
|
||||
if($key)$where.=')';
|
||||
return 'and `type`=3 and `leixing`='.$mid.''.$where.'';
|
||||
}
|
||||
|
||||
public function collectstotal_after($table, $rows)
|
||||
{
|
||||
$dbs = m('plans');
|
||||
$arows= $this->zdarr;
|
||||
$mrs = m($table)->getone($this->mid);
|
||||
|
||||
if($this->loadci==1){
|
||||
$farr = array();
|
||||
if($mrs['fenlei']=='0'){
|
||||
$farr[] = array(
|
||||
'text' => '填写人',
|
||||
'dataIndex' => 'optname'
|
||||
);
|
||||
}
|
||||
foreach($arows as $k=>$rs){
|
||||
$sarr = array(
|
||||
'text' => $rs['pitem'],
|
||||
'dataIndex' => 'items_'.$rs['id'].'',
|
||||
'filestype' => $rs['zxren'],
|
||||
'sortable' => false
|
||||
);
|
||||
if($rs['zxren']=='uploadfile' || $rs['zxren']=='textarea')$sarr['align']='left';
|
||||
$farr[] = $sarr;
|
||||
}
|
||||
$farr[] = array(
|
||||
'text' => '填写时间',
|
||||
'dataIndex' => 'optdt',
|
||||
'sortable' => true
|
||||
);
|
||||
$farr[] = array(
|
||||
'text' => '状态',
|
||||
'dataIndex' => 'status',
|
||||
'sortable' => true
|
||||
);
|
||||
$barr['columns'] = $farr;
|
||||
}
|
||||
$faobj = m('file');
|
||||
foreach($rows as $k=>$rs){
|
||||
$arows= $dbs->getall('mid='.$rs['id'].'','*','`sort`');
|
||||
foreach($arows as $k1=>$rs1){
|
||||
$flx = arrvalue($this->zdobj, $rs1['itemid']);
|
||||
$val = $rs1['zxren'];
|
||||
if($flx=='uploadimg' && !isempt($val)){
|
||||
$val = '<img src="'.$val.'" onclick="$.imgview({\'url\':this.src})" height="60">';
|
||||
}
|
||||
if($flx=='uploadfile' && !isempt($val)){
|
||||
$val = $faobj->getstr('', '', 0, "`id` in($val)");
|
||||
}
|
||||
$rows[$k]['items_'.$rs1['itemid'].''] = $val;
|
||||
}
|
||||
$status = '';
|
||||
if($rs['status']=='0')$status='<font color=blue>待审核</font>';
|
||||
if($rs['status']=='1')$status='<font color=green>已审核</font>';
|
||||
if($rs['status']=='2')$status='<font color=red>未通过</font>';
|
||||
$rows[$k]['status'] = $status;
|
||||
}
|
||||
$barr['rows'] = $rows;
|
||||
return $barr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,5 +141,13 @@ class mode_userClassAction extends inputAction{
|
||||
m('admin')->updateinfo(); //更新
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
public function rankingdata()
|
||||
{
|
||||
$arr = array();
|
||||
$rows = $this->db->getall('select `ranking` from `[Q]admin` group by `ranking`');
|
||||
foreach($rows as $k=>$rs)$arr[] = array('name'=>$rs['ranking'],'value'=>'');
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
|
||||
30
webmain/flow/input/mode_yqhealthyAction.php
Normal file
30
webmain/flow/input/mode_yqhealthyAction.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* 此文件是流程模块【yqhealthy.健康报备】对应控制器接口文件。
|
||||
*/
|
||||
class mode_yqhealthyClassAction extends inputAction{
|
||||
|
||||
/**
|
||||
* 重写函数:保存前处理,主要用于判断是否可以保存
|
||||
* $table String 对应表名
|
||||
* $arr Array 表单参数
|
||||
* $id Int 对应表上记录Id 0添加时,大于0修改时
|
||||
* $addbo Boolean 是否添加时
|
||||
* return array('msg'=>'错误提示内容','rows'=> array()) 可返回空字符串,或者数组 rows 是可同时保存到数据库上数组
|
||||
*/
|
||||
protected function savebefore($table, $arr, $id, $addbo){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写函数:保存后处理,主要保存其他表数据
|
||||
* $table String 对应表名
|
||||
* $arr Array 表单参数
|
||||
* $id Int 对应表上记录Id
|
||||
* $addbo Boolean 是否添加时
|
||||
*/
|
||||
protected function saveafter($table, $arr, $id, $addbo){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<?php
|
||||
$maincolor = getconfig('apptheme','#1389D3');
|
||||
?>
|
||||
var editor,arr=<?=$da['fieldsjson']?>,moders=<?=json_encode($da['moders'])?>,gongsiarr=<?=json_encode($da['gongsiarr'])?>,subfielsa=<?=json_encode($da['subfielsa'])?>,zbnamearr=<?=json_encode($da['zbnamearr'])?>,isedit=0,mid='<?=$da['mid']?>',isinput=1,data={},maincolor='<?=$maincolor?>';
|
||||
var editor,arr=<?=$da['fieldsjson']?>,moders=<?=json_encode($da['moders'])?>,gongsiarr=<?=json_encode($da['gongsiarr'])?>,subfielsa=<?=json_encode($da['subfielsa'])?>,zbnamearr=<?=json_encode($da['zbnamearr'])?>,isedit=0,mid='<?=$da['mid']?>',isinput=1,data={},maincolor='<?=$maincolor?>',tempdata='<?=$tempdata?>';
|
||||
</script>
|
||||
<style>
|
||||
<?php
|
||||
@@ -133,7 +133,7 @@ echo 'body{--main-color:'.$maincolor.';--main-border:rgba('.$maincolors.',0.2)}'
|
||||
<?php
|
||||
if($da['isflow']>0)echo '<label><input onclick="c.changeturn(this)" value="1" checked type="checkbox" id="sysisturn">直接提交</label> ';
|
||||
?>
|
||||
<input id="AltS" type="button" style="border-radius:5px" onclick="return c.save()" value="提交" class="webbtn"></span>
|
||||
<a class="hui" id="Altzhan" style="margin-right:10px;display:none" onclick="return c.savezhan()" href="javascript:;">暂存</a><input id="AltS" type="button" style="border-radius:5px" onclick="return c.save()" value="提交" class="webbtn"></span>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<?php
|
||||
$maincolor = getconfig('apptheme','#1389D3');
|
||||
?>
|
||||
var editor,arr=<?=$da['fieldsjson']?>,moders=<?=json_encode($da['moders'])?>,gongsiarr=<?=json_encode($da['gongsiarr'])?>,subfielsa=<?=json_encode($da['subfielsa'])?>,zbnamearr=<?=json_encode($da['zbnamearr'])?>,isedit=0,mid='<?=$da['mid']?>',isinput=1,data={},maincolor='<?=$maincolor?>';
|
||||
var editor,arr=<?=$da['fieldsjson']?>,moders=<?=json_encode($da['moders'])?>,gongsiarr=<?=json_encode($da['gongsiarr'])?>,subfielsa=<?=json_encode($da['subfielsa'])?>,zbnamearr=<?=json_encode($da['zbnamearr'])?>,isedit=0,mid='<?=$da['mid']?>',isinput=1,data={},maincolor='<?=$maincolor?>',tempdata='<?=$tempdata?>';
|
||||
ismobile=1;
|
||||
js.changeuser=function(na,lx,tit,cans){
|
||||
var can = {
|
||||
@@ -186,7 +186,7 @@ if($showheader==1)echo '<div id="header_title" style="padding-top:'.$cenghei.'px
|
||||
<span id="AltSspan" style="display:none" >
|
||||
<?php
|
||||
if($da['isflow']>0)echo '<label><input onclick="c.changeturn(this)" value="1" checked type="checkbox" id="sysisturn">直接提交</label> ';
|
||||
?>
|
||||
?><a class="hui" id="Altzhan" style="margin-right:10px;display:none" onclick="return c.savezhan()" href="javascript:;">暂存</a>
|
||||
<button id="AltS" style="border-radius:5px" type="button" onclick="return c.save()" class="btn">提交</button></span>
|
||||
<div id="msgview"></div>
|
||||
</div>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<table width="100%" border="0" class="ke-zeroborder"><tbody><tr class="autoyijianview"><td height="34" width="15%" align="right" class="ys1">*^name^</td><td width="35%" class="ys2">{name}</td><td height="34" align="right" class="ys1"></td><td class="ys2"></td></tr><tr><td height="34" align="right" class="ys1">*^runren^</td><td colspan="3" class="ys2">{runren}</td></tr><tr><td height="34" width="15%" align="right" class="ys1">*^startdt^</td><td width="35%" class="ys2">{startdt}</td><td height="34" width="15%" align="right" class="ys1">*^enddt^</td><td width="35%" class="ys2">{enddt}</td></tr><tr><td height="34" align="right" class="ys1">^explain^</td><td colspan="3" class="ys2">{explain}</td></tr><tr><td class="ys2" style="background-color:#CCCCCC;" colspan="4"><strong>收集字段</strong></td></tr><tr><td class="ys0" colspan="4"><table class="tablesub ke-zeroborder" id="tablesub0" style="width:100%;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="10%">序号</td><td>*字段名称</td><td>字段类型</td><td>说明/数据源</td><td>是否必填</td><td width="5%">操作</td></tr><tr><td>[xuhao0,0]</td><td>[pitem0,0]</td><td>[zxren0,0]</td><td>[zxrenid0,0]</td><td>[itemid0,0]</td><td>{删,0}</td></tr></tbody></table><div style="background-color:#F1F1F1;">{新增,0}</div></td></tr><tr><td height="34" align="right" class="ys1">^file_content^</td><td colspan="3" class="ys2">{file_content}</td></tr></tbody></table>
|
||||
<table width="100%" border="0" class="ke-zeroborder"><tbody><tr class="autoyijianview"><td height="34" width="15%" align="right" class="ys1">*^name^</td><td width="35%" class="ys2">{name}</td><td height="34" width="15%" align="right" class="ys1">*^fenlei^</td><td width="35%" class="ys2">{fenlei}</td></tr><tr><td height="34" align="right" class="ys1">^runren^</td><td colspan="3" class="ys2">{runren}</td></tr><tr><td height="34" width="15%" align="right" class="ys1">*^startdt^</td><td width="35%" class="ys2">{startdt}</td><td height="34" width="15%" align="right" class="ys1">*^enddt^</td><td width="35%" class="ys2">{enddt}</td></tr><tr><td height="34" align="right" class="ys1">^explain^</td><td colspan="3" class="ys2">{explain}</td></tr><tr><td height="34" align="right" class="ys1">^temp_beizhu^</td><td colspan="3" class="ys2">{temp_beizhu}</td></tr><tr><td class="ys2" style="background-color:#CCCCCC;" colspan="4"><strong>收集字段</strong></td></tr><tr><td class="ys0" colspan="4"><table class="tablesub ke-zeroborder" id="tablesub0" style="width:100%;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="10%">序号</td><td>*字段名称</td><td>字段类型</td><td>说明/数据源</td><td>是否必填</td><td width="5%">操作</td></tr><tr><td>[xuhao0,0]</td><td>[pitem0,0]</td><td>[zxren0,0]</td><td>[zxrenid0,0]</td><td>[itemid0,0]</td><td>{删,0}</td></tr></tbody></table><div style="background-color:#F1F1F1;">{新增,0}</div></td></tr><tr><td height="34" align="right" class="ys1">^file_content^</td><td colspan="3" class="ys2">{file_content}</td></tr></tbody></table>
|
||||
1
webmain/flow/page/input_yqhealthy.html
Normal file
1
webmain/flow/page/input_yqhealthy.html
Normal file
@@ -0,0 +1 @@
|
||||
<table width="100%" border="0" class="ke-zeroborder"><tbody><tr class="autoyijianview"><td height="34" width="15%" align="right" class="ys1">*^applyname^</td><td width="35%" class="ys2">{applyname}</td><td height="34" width="15%" align="right" class="ys1">*^applydt^</td><td width="35%" class="ys2">{applydt}</td></tr><tr><td height="34" width="15%" align="right" class="ys1">*^tiwen^</td><td width="35%" class="ys2">{tiwen}</td><td height="34" width="15%" align="right" class="ys1">*^state^</td><td width="35%" class="ys2">{state}</td></tr><tr><td height="34" align="right" class="ys1">^tupian^</td><td colspan="3" class="ys2">{tupian}</td></tr><tr><td height="34" align="right" class="ys1">^tupian1^</td><td colspan="3" class="ys2">{tupian1}</td></tr><tr><td height="34" align="right" class="ys1">^explain^</td><td colspan="3" class="ys2">{explain}</td></tr><tr><td height="34" align="right" class="ys1">^file_content^</td><td colspan="3" class="ys2">{file_content}</td></tr><tr><td height="34" align="right" class="ys1">^base_name^</td><td class="ys2">{base_name}</td><td align="right" class="ys1">^base_deptname^</td><td class="ys2">{base_deptname}</td></tr></tbody></table>
|
||||
@@ -113,6 +113,7 @@
|
||||
|
||||
},
|
||||
onloadbefore:function(){},
|
||||
oncolumns:function(d){return d},
|
||||
loaddatabefore:function(d){
|
||||
var das = d.listinfo;
|
||||
if(das){
|
||||
@@ -173,7 +174,7 @@
|
||||
},
|
||||
daoru:function(){
|
||||
window['managelist'+modenum+''] = a;
|
||||
addtabs({num:'daoruuser',url:'flow,input,daoru,modenum='+modenum+'',icons:'plus',name:'导入'+modename+''});
|
||||
addtabs({num:'daoru'+modenum+'',url:'flow,input,daoru,modenum='+modenum+'',icons:'plus',name:'导入'+modename+''});
|
||||
},
|
||||
initcolumns:function(bots){
|
||||
var num = 'columns_'+modenum+'_'+pnum+'',d=[],d1,d2={},i,len=fieldsarr.length,bok,sa=[{name:'默认搜索',fields:'','inputtype':'dev'}];
|
||||
@@ -208,6 +209,7 @@
|
||||
if(isflow>0)d.push({text:'流程状态',dataIndex:'statustext'});
|
||||
if(nstr=='' || nstr.indexOf(',caozuo,')>=0)d.push({text:'',dataIndex:'caozuo',callback:'opegs{rand}'});
|
||||
for(i=0;i<d.length;i++)if(this.setcinfo[d[i].dataIndex])d[i] = js.apply(d[i],this.setcinfo[d[i].dataIndex]);
|
||||
d = this.oncolumns(d);
|
||||
bootparams.columns = d;
|
||||
if(bots)a.setColumns(d);
|
||||
d1 = this.fieldzarr;
|
||||
|
||||
@@ -21,13 +21,28 @@ $(document).ready(function(){
|
||||
|
||||
c.setcolumns('leixing',{
|
||||
renderer:function(v,d,i){
|
||||
return ''+v+' <a href="javascript:;" onclick="viespere{rand}('+i+')">查看</a>';
|
||||
var str = ''+v+'';
|
||||
str+=' <a href="javascript:;" onclick="viespere{rand}('+i+',0)">查看</a>';
|
||||
str+=' <a href="javascript:;" onclick="viespere{rand}('+i+',1)">统计</a>';
|
||||
return str;
|
||||
}
|
||||
});
|
||||
|
||||
viespere{rand}=function(id){
|
||||
viespere{rand}=function(id,lx){
|
||||
var d = a.getData(id);
|
||||
var bo = addtabs({name:'信息收集表['+d.name+']',url:'flow,page,collects,atype=all,pnum=all,leixingid='+d.id+'',num:'collects'+d.id+''});
|
||||
if(lx==1){
|
||||
addtabs({name:'信息收集表['+d.name+']统计',url:'flow,page,collectstotal,mid='+d.id+'',num:'collectstotal'+d.id+''});
|
||||
}else{
|
||||
addtabs({name:'信息收集表['+d.name+']',url:'flow,page,collects,atype=all,pnum=all,leixingid='+d.id+'',num:'collects'+d.id+''});
|
||||
}
|
||||
}
|
||||
|
||||
c.createouturl=function(d){
|
||||
var url = c.getacturl('createouturl')+'&id='+d.id+'';
|
||||
js.tanbody('createurl','['+d.name+']外部收集地址', 300,200,{
|
||||
html:'<div style="height:160px;padding:5px" align="center"><div><img id="createurlimg" src="images/logo.png" width="130" height="130"></div><div><a href="'+url+'" download="'+d.name+'130x130.png" class="blue">保存二维码</a>,<a href="javascript:;" onclick="js.open(\'?m=login&a=collect&mid='+d.id+'\',350,500)" class="blue">打开页面</a></div></div>'
|
||||
});
|
||||
get('createurlimg').src = url;
|
||||
}
|
||||
|
||||
//[自定义区域end]
|
||||
|
||||
@@ -21,6 +21,7 @@ $(document).ready(function(){
|
||||
|
||||
var plid = params.leixingid;
|
||||
if(plid)bootparams.url+='&leixingid='+plid+'';
|
||||
$('#tdleft_{rand}').hide();
|
||||
|
||||
//[自定义区域end]
|
||||
c.initpagebefore();
|
||||
|
||||
65
webmain/flow/page/rock_page_collectstotal.php
Normal file
65
webmain/flow/page/rock_page_collectstotal.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var mid = params.mid;
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'planm',checked:false,fanye:true,statuschange:false,
|
||||
url:publicmodeurl('collects','',{'mid':mid}),defaultorder:'`optdt` desc',
|
||||
storeafteraction:'collectstotal_after',storebeforeaction:'collectstotal_before',
|
||||
columns:[{
|
||||
text:'填写时间',dataIndex:'optdt',sortable:true
|
||||
},{
|
||||
text:'状态',dataIndex:'status',sortable:true
|
||||
}],
|
||||
loadbefore:function(d){
|
||||
if(d.columns)a.setColumns(d.columns);
|
||||
},
|
||||
itemdblclick:function(d){
|
||||
openxiangs('详情','collects',d.id);
|
||||
}
|
||||
});
|
||||
var c = {
|
||||
|
||||
daochu:function(){
|
||||
a.exceldown();
|
||||
},
|
||||
search:function(){
|
||||
var key = get('key_{rand}').value;
|
||||
a.setparams({key:key}, true);
|
||||
},
|
||||
prints:function(){
|
||||
pirnttablelist(a, nowtabs.name);
|
||||
}
|
||||
};
|
||||
|
||||
c{rand} = c;
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
||||
|
||||
<td width="95%" align="left">
|
||||
|
||||
<div class="input-group" style="width:220px;">
|
||||
<input class="form-control" id="key_{rand}" onkeydown="if(event.keyCode==13)c{rand}.search()" placeholder="关键词">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" click="daochu" type="button">导出</button>
|
||||
<button class="btn btn-default" click="prints" type="button">打印</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="veiw_{rand}"></div>
|
||||
@@ -29,7 +29,7 @@ c.setcolumns('recename',{
|
||||
c.setcolumns('fengmian',{
|
||||
renderer:function(v){
|
||||
if(!v)return ' ';
|
||||
return '<img src="'+v+'" height="60">';
|
||||
return '<img src="'+v+'" onclick="$.imgview({\'url\':this.src})" height="60">';
|
||||
}
|
||||
});
|
||||
c.setcolumns('title',{
|
||||
|
||||
70
webmain/flow/page/rock_page_yqhealthy.php
Normal file
70
webmain/flow/page/rock_page_yqhealthy.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* 模块:yqhealthy.健康报备
|
||||
* 说明:自定义区域内可写你想要的代码
|
||||
* 来源:流程模块→表单元素管理→[模块.健康报备]→生成列表页
|
||||
*/
|
||||
defined('HOST') or die ('not access');
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var modenum = 'yqhealthy',modename='健康报备',isflow=0,modeid='142',atype = params.atype,pnum=params.pnum,modenames='',listname='eXVxaW5nbQ::';
|
||||
if(!atype)atype='';if(!pnum)pnum='';
|
||||
var fieldsarr = [],fieldsselarr= [],chufarr= [];
|
||||
|
||||
<?php
|
||||
include_once('webmain/flow/page/rock_page.php');
|
||||
?>
|
||||
|
||||
//[自定义区域start]
|
||||
|
||||
c.setcolumns('tupian',{
|
||||
renderer:function(v){
|
||||
if(!v)return ' ';
|
||||
return '<img src="'+v+'" onclick="$.imgview({\'url\':this.src})" height="60">';
|
||||
}
|
||||
});
|
||||
c.setcolumns('tupian1',{
|
||||
renderer:function(v){
|
||||
if(!v)return ' ';
|
||||
return '<img src="'+v+'" onclick="$.imgview({\'url\':this.src})" height="60">';
|
||||
}
|
||||
});
|
||||
|
||||
//[自定义区域end]
|
||||
c.initpagebefore();
|
||||
js.initbtn(c);
|
||||
var a = $('#view'+modenum+'_{rand}').bootstable(bootparams);
|
||||
c.init();
|
||||
|
||||
});
|
||||
</script>
|
||||
<!--SCRIPTend-->
|
||||
<!--HTMLstart-->
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="padding-right:10px;" id="tdleft_{rand}" nowrap><button id="addbtn_{rand}" class="btn btn-primary" click="clickwin,0" disabled type="button"><i class="icon-plus"></i> 新增</button></td>
|
||||
|
||||
<td><select class="form-control" style="width:110px;border-top-right-radius:0;border-bottom-right-radius:0;padding:0 2px" id="fields_{rand}"></select></td>
|
||||
<td><select class="form-control" style="width:60px;border-radius:0px;border-left:0;padding:0 2px" id="like_{rand}"><option value="0">包含</option><option value="1">等于</option><option value="2">大于等于</option><option value="3">小于等于</option><option value="4">不包含</option></select></td>
|
||||
<td><select class="form-control" style="width:130px;border-radius:0;border-left:0;display:none;padding:0 5px" id="selkey_{rand}"><option value="">-请选择-</option></select><input class="form-control" style="width:130px;border-radius:0;border-left:0;padding:0 5px" id="keygj_{rand}" placeholder="关键词"><input class="form-control" style="width:130px;border-radius:0;border-left:0;padding:0 5px;display:none;" id="key_{rand}" placeholder="关键字">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="white-space:nowrap">
|
||||
<button style="border-right:0;border-radius:0;border-left:0" class="btn btn-default" click="searchbtn" type="button">搜索</button><button class="btn btn-default" id="downbtn_{rand}" type="button" style="padding-left:8px;padding-right:8px;border-top-left-radius:0;border-bottom-left-radius:0"><i class="icon-angle-down"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
<td width="90%" style="padding-left:10px"><div id="changatype{rand}" class="btn-group"></div></td>
|
||||
|
||||
<td align="right" id="tdright_{rand}" nowrap>
|
||||
<span style="display:none" id="daoruspan_{rand}"><button class="btn btn-default" click="daoru,1" type="button">导入</button> </span><button class="btn btn-default" style="display:none" id="daobtn_{rand}" disabled click="daochu" type="button">导出 <i class="icon-angle-down"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="viewyqhealthy_{rand}"></div>
|
||||
<!--HTMLend-->
|
||||
Reference in New Issue
Block a user