信呼v2.5.1版本
This commit is contained in:
@@ -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(){
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user