<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<column id="__I64OQwyqOzbs6T6YR7m">
  <name>电子证书</name>
  <parentId>__BvgSQ1NlaFXnrik0fWw</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <width></width>
  <valueScript><![CDATA[//弹出层打开表单            
(function() {                     
  var doc=getCurrentDocument();  
  var docId=doc.getId();
  var nameOne=doc.getItemValueAsString("name");
  var nameTwo=doc.getItemValueAsString("name");
  var oneInchPhoto=doc.getItemValueAsString("oneInchPhoto");
  var certificateDate=doc.getItemValueAsString("certificateDate");
  var certificateFrom=doc.getItemValueAsString("certificateFrom");
  var certificateNO=doc.getItemValueAsString("certificateNO");
  var ATTACHMENT=doc.getItemValueAsString("ATTACHMENT");//签章pdf
  var infodoc = findDocument(docId);
  var SECURITYID = getItemValueAsString("SECURITYID");
  println("SECURITYID---------------"+SECURITYID);
  //var SECURITYID = infodoc.findItem("securityid").getValue();;//员工id
  println("securityid"+SECURITYID)
  var userid = "";
  var sql="select tenant_user_id from obpm2.tenant_employees where id='"+SECURITYID+"' 	"
  var datas = queryByDSName("tms",sql);
  if(datas!=null){
    for(var iterator = datas.iterator();iterator.hasNext();){
      var map1 = iterator.next();//取值
      userid= map1.get("tenant_user_id");
      println("userid"+userid)
    }
  }

  println("ATTACHMENT"+ATTACHMENT)
  var birthday=doc.getItemValueAsString("birthday");
  var idCardNo=doc.getItemValueAsString("idCardNo");//+"&oneInchPhoto="+oneInchPhoto
  var exparams = "&nameOne="+nameOne+"&nameTwo="+nameTwo+"&certificateDate="+certificateDate+"&certificateFrom="+certificateFrom+"&certificateNO="+certificateNO+"&idCardNo="+idCardNo+"&birthday="+birthday;  //拼接参数      
  var appId=getApplication();                        
  var domainid=getDomainid();            
  var formid2="__HPn4JsKsEGwu12YIFyL";
  var btn=""


  var certificateType = doc.getItemValueAsString("certificateType");

  if(isNotNull(ATTACHMENT)){
    if(ATTACHMENT.indexOf("http")==-1){
      ATTACHMENT="/obpm"+ATTACHMENT
      println("ATTACHMENT2"+ATTACHMENT)
    }
    btn="<o-action action-type='jumpto' formid='"+formid2+"' actionContent='' appid='"+appId+"' title='电子证书' url='"+ATTACHMENT+"'  open-type='open-blank' isRefresh='true'  dialog-width='1000px' dialog-height='600px'  exparams='"+exparams+"' >电子证书</o-action>";   
  }
  //新页面北京地区使用
  else if(certificateFrom&&certificateFrom.indexOf("北京")>-1){
    btn="<o-action action-type='jumpto'  appid='"+appId+"' open-type='open-eject' reflash-on-close='reflash-on-close' dialog-width='700px' dialog-height='530px' url='/static/signon/staff/#/elesign?userId="+userid+"&certificateNO="+certificateNO+"'>电子证书</o-action>"  
    println("userid-------------"+userid)
  }else if(certificateType=="11"){
     btn="<o-action action-type='jumpto' appid='"+appId+"' open-type='open-eject' reflash-on-close='reflash-on-close' dialog-width='700px' dialog-height='530px' url='/static/signon/staff/#/CompletionCert?userId="+userid+"&certificateNO="+certificateNO+"' exparams='"+exparams+"' >电子证书</o-action>"
  }else{
    //旧页面除北京地区使用
    btn="<o-action action-type='opendocument' formid='"+formid2+"' appid='"+appId+"' open-type='open-eject' reflash-on-close='reflash-on-close' dialog-width='1000px' dialog-height='600px' exparams='"+exparams+"'>电子证书</o-action>"  
  }
  
  return btn;                                    
})();	]]></valueScript>
  <hiddenScript><![CDATA[]]></hiddenScript>
  <beforeScript><![CDATA[]]></beforeScript>
  <parentView>__BvgSQ1NlaFXnrik0fWw</parentView>
  <type>COLUMN_TYPE_SCRIPT</type>
  <fieldName></fieldName>
  <flowReturnCss>false</flowReturnCss>
  <imageName>01</imageName>
  <fontColor></fontColor>
  <orderno>18</orderno>
  <sum>false</sum>
  <total>false</total>
  <isOrderByField>false</isOrderByField>
  <orderType>ASC</orderType>
  <multiLanguageLabel></multiLanguageLabel>
  <actionScript><![CDATA[]]></actionScript>
  <clickSorting>true</clickSorting>
  <sortStandard>00</sortStandard>
  <jumpMapping>nameOne:__LiGdjVnJoJ1rBu5e4Ow;nameTwo:__LiGdjVnJoJ1rBu5e4Ow;oneInchPhoto:__OEop7XAlE9MGzSlLSJ4;certificateFrom:__TNufSpAbUODj3cHHYyz;certificateDate:__WDzDtzkPgZ3zHkdorWE;certificateNO:__S6C9HY2DQ7Yti5DQrt7;idCardNo:__tb5f4kCr1A4qnB2X6s2</jumpMapping>
  <mappingform>__JPHvq5gsbT0nuFotaqq</mappingform>
  <formatType>simple</formatType>
  <decimalsNum>1</decimalsNum>
  <thouSign>false</thouSign>
  <decimalsCurr>1</decimalsCurr>
  <currType>zh_CN</currType>
  <color>rgba(0, 0, 0, 1)</color>
  <fontSize>12</fontSize>
  <groundColor>rgba(255, 255, 255, 0)</groundColor>
  <showIcon>false</showIcon>
  <iconMapping></iconMapping>
  <buttonType>04</buttonType>
  <buttonName>电子证书</buttonName>
  <visible>true</visible>
  <visible4ExpExcel>false</visible4ExpExcel>
  <visible4Print>true</visible4Print>
  <visible4PagePrint>false</visible4PagePrint>
  <templateForm>__Wy1I9DHidgf0iKRNcQQ</templateForm>
  <icon></icon>
  <showType>01</showType>
  <mappingField></mappingField>
  <showMoon>false</showMoon>
  <showAsLabel>false</showAsLabel>
  <showAsButton>false</showAsButton>
  <displayType>00</displayType>
  <displayLength></displayLength>
  <showTitle>false</showTitle>
  <isFilter>false</isFilter>
</column>