<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>Quotation_request</fullName>
|
<availability>online</availability>
|
<description>//20220511
|
{!RequireScript("/soap/ajax/51.0/connection.js")}
|
{!RequireScript("/soap/ajax/51.0/apex.js")}
|
{!RequireScript("/resource/CommonUtilJs")}
|
var foo = function() {
|
var AgencyHospitalLink = sforce.connection.query("select id,isSame__c from Agency_Hospital_Link__c where id = '"+"{!Agency_Opportunity__c.Agency_HospitalId__c}"+"'");
|
var AgencyHospital = AgencyHospitalLink.getArray("records");
|
if(AgencyHospital.length > 0){
|
if(AgencyHospital[0].isSame__c == '0'){
|
alert("医院名称有变更,请等待15分钟");
|
return;
|
}
|
|
}
|
var url = "/apex/NewQuoteIrai?agencyoppid={!Agency_Opportunity__c.Id}";
|
window.open(url,'_blank','scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes');
|
//window.location.href="/apex/NewQuoteIrai?agencyoppid={!Agency_Opportunity__c.Id}";
|
};
|
foo();</description>
|
<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")}
|
//2021-10-22 gwy 版本更改为51.0
|
var foo = function() {
|
var AgencyHospitalLink = sforce.connection.query("select id,isSame__c from Agency_Hospital_Link__c where id = '"+"{!Agency_Opportunity__c.Agency_HospitalId__c}"+"'");
|
var AgencyHospital = AgencyHospitalLink.getArray("records");
|
var IsTransformed = "{!Agency_Opportunity__c.Is_Transformed__c}";
|
if(AgencyHospital.length > 0){
|
if(AgencyHospital[0].isSame__c == '0'){
|
alert("医院名称有变更,请等待15分钟");
|
return;
|
}
|
|
if(IsTransformed == true){
|
alert("请从询价画面新建报价委托");
|
return;
|
}
|
|
var u_p = "{!$User.Salesdepartment_text__c}";
|
if(u_p == '5.华东' || u_p == '6.华南'){
|
alert("请新建购买意向。");
|
return;
|
}
|
|
}
|
var url = "/apex/NewQuoteIrai?agencyoppid={!Agency_Opportunity__c.Id}";
|
window.open(url,'_blank','scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes');
|
//window.location.href="/apex/NewQuoteIrai?agencyoppid={!Agency_Opportunity__c.Id}";
|
};
|
foo();</url>
|
</WebLink>
|