<?xml version="1.0" encoding="UTF-8"?> 
 | 
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> 
 | 
    <fullName>SI_Submint_BTN</fullName> 
 | 
    <availability>online</availability> 
 | 
    <displayType>button</displayType> 
 | 
    <linkType>javascript</linkType> 
 | 
    <masterLabel>提交审批</masterLabel> 
 | 
    <openType>onClickJavaScript</openType> 
 | 
    <protected>false</protected> 
 | 
    <url>{!RequireScript("/soap/ajax/51.0/connection.js")}  
 | 
{!RequireScript("/soap/ajax/51.0/apex.js")}  
 | 
{!RequireScript("/resource/CommonUtilJs")}  
 | 
var foo = function() { 
 | 
if('{!SI_Attachment__c.Type__c}'!='项目方案书'&&'{!SI_Attachment__c.Type__c}'!='标书'&&'{!SI_Attachment__c.Type__c}'!='CAD图纸'){ 
 | 
   alert('所选上传类型不需要审批'); 
 | 
   return; 
 | 
}else if('{!SI_Attachment__c.Type__c}'=='CAD图纸'){ 
 | 
   //审批CAD环节 
 | 
   alert('CAD图纸,不需要提交审批'); 
 | 
   return; 
 | 
}else if('{!SI_Attachment__c.Submit_Date__c}'!=''){ 
 | 
   alert('已审批通过,不能再次提交了'); 
 | 
   return; 
 | 
}else{ 
 | 
var submit = sforce.apex.execute('ControllerUtil','SI_FileUpdateSubmit',{subID:'{!SI_Attachment__c.Id}'}); 
 | 
if (submit != 'Fin') { 
 | 
    alert(submit); 
 | 
    return ; 
 | 
 } 
 | 
    window.location.reload(); 
 | 
} 
 | 
} 
 | 
foo();</url> 
 | 
</WebLink> 
 |