/** * Created by MyPC on 2019/12/17. */ //构建养护关联CLD客户列表 function buildClientBySearch(data){ var html=''; $.each(data, function(k, v) { html+='
' + '
'+ v.clientname+'
' + '
'+ v.position+'
' + '
'+ v.telephone+'
' + '
'+ v.companyname+'
'; }); return html; } //构建养护用户列表 function fnStructureCuringUser(data){ var html=''; $.each(data, function(k, v) { html+=''; html+=''+setUndefined(v.mobile)+''; html+=''+setUndefined(v.curingCompany)+''; html+=''+setUndefined(v.clientInfo.clientname)+''; html+=''+setUndefined(v.clientInfo.companyname)+''; html+=''+v.updateTotal+''; html+=''+v.addtime+''; html+=''; }); $('tbody[curingUser]').html(html); $('div[curingListBox]').show(); $('p[upClientBox]').hide(); } //构建养护用户信息 function buildCuringInfo(data){ var html=' ' + '
' + '
通行账号
' ; if(data.mobile==''){ html+=''+setUndefined(data.email)+' '; }else{ html+=''+setUndefined(data.mobile)+' '; } html+='
' + '
手机
' + ''+setUndefined(data.mobile)+'
' + '
邮箱
' + '
' + ''+setUndefined(data.email)+'
'; html+='
' + '
称呼
' + ''+setUndefined(data.username)+'
'; html+='
' + '
注册云版
' + ''+setUndefined(data.create_time)+'
'; html+='
' + '
企业名称
' + ''+setUndefined(data.company)+'
'; html+='
' + '
企业地区
' + ''+setUndefined(data.province)+'
'; return html; } //构建养护升级产品信息 function buildCuringCompilation(data){ var upMajorBoxHtml=''; $.each(data.detail.compilationList, function(k, v) { upMajorBoxHtml+=''; upMajorBoxHtml+=''; upMajorBoxHtml+=''+ v.name+''; upMajorBoxHtml+=''; if(v.isUpgrade !== undefined && v.isUpgrade === true){ upMajorBoxHtml+='已升级'; }else{ upMajorBoxHtml+='升级'; } upMajorBoxHtml+=''; upMajorBoxHtml+=''; }); $('#curingSsoid').val(data.detail.userInfo.ssoIdKey); $('#curingMobile').val(data.detail.userInfo.mobile); $('#client_id').val(data.detail.clientInfo.cidKey); return upMajorBoxHtml; } //关联CLD客户 function relevanceClient(data){ var html=''; if(isExistence(data)){ html=buildClient(data); }else{ html='
CLD客户
' + ' 关联CLD客户
'; } return html; } function buildCuringOperateLog(data){ var html=''; if(isExistence(data)){ $.each(data, function(k, v) { html+='

' + '@'+ v.username+'' + ' '+ v.operation+'
' + ''+ v.createDate+'

'; }); }else{ html=''; } html+=''; return html; } function autoHeight(){ html=' ' $('div[autoHeight]').html(html); }