binxie
2024-01-22 102afa21c115e8c8b9333a326c3d1af08fe76faf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Cancel_Report</fullName>
    <availability>online</availability>
    <description>Sales_owner_job_type</description>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>取消</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>//XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 start
{!REQUIRESCRIPT(&quot;/soap/ajax/51.0/connection.js&quot;)};
{!REQUIRESCRIPT(&quot;/soap/ajax/51.0/apex.js&quot;)};
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)};
var sql = &quot;select id,Tender_information__r.subInfoType__c from Tender_Opportunity_Link__c where (Tender_information__r.subInfoType__c = &apos;3-1:废标公告&apos; OR Tender_information__r.subInfoType__c =&apos;3-2:流标公告&apos; OR Tender_information__r.TerminateApprovalStatus__c= &apos;批准&apos;) and Opportunity__c =&apos;&quot; + &apos;{!Opportunity.Id}&apos;+ &quot;&apos;&quot;;
//20230427 lt 项目终止流程开发 add OR Tender_information__r.TerminateApprovalStatus__c= &apos;批准&apos;
var sqlResult = sforce.connection.query(sql);
// alert(&apos;测试+:&apos;+sqlResult.size);
//XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 end
// jsの場合、翻訳された値がでるので、要注意
if (&apos;{!Opportunity.StageName}&apos; != &apos;引合&apos;
&amp;&amp; &apos;{!Opportunity.StageName}&apos; != &apos;询价&apos;
) {
alert(&quot;状态1:&quot; + &apos;{!Opportunity.StageName}&apos; + &quot;、不能做 取消 了!&quot;);
}
else if (&apos;{!Opportunity.SAP_Send_OK__c}&apos; == &apos;1&apos;) {
alert(&quot;已经上传SAP、不能做 取消 了!&quot;);
}
else if ({!Opportunity.Cnt_Lost_cancel_report__c} - {!Opportunity.Cnt_Lost_cancel_Draft__c} &gt; 0) {
alert(&quot;询价已经有 取消/失单报告 了!&quot;);
}
else if (&apos;{!Opportunity.Job_category__c}&apos; == &apos;支援&apos;) {
alert(&quot;询价所有人是助理的,先请修改到销售担当!&quot;);
}
//XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 start
//else if({!NOT(ISBLANK(Opportunity.Bidding_Project_Name_Bid__c))}&amp;&amp; &apos;{!Opportunity.subInfoType__c}&apos; != &apos;3-1:废标公告&apos; &amp;&amp;&apos;{!Opportunity.subInfoType__c}&apos; != &apos;3-2:流标公告&apos;){
else if({!NOT(ISBLANK(Opportunity.Bidding_Project_Name_Bid__c))}&amp;&amp; sqlResult.size == 0){
alert(&quot;有招投标项目时只能做失单或部分失单报告!&quot;);
}
//XLIU-CG98L5 【委托】【评估】新需求-招标项目/询价对应流标、废标改善 end
else {
location.href = &apos;/a1U/e?retURL=%2F{!URLENCODE(Opportunity.Id)}&apos; +
&apos;&amp;RecordType=01210000000R4hH&apos; +
&apos;&amp;CF00N10000004lbGT={!URLENCODE(Opportunity.Name)}&apos; +
&apos;&amp;CF00N10000004lbGT_lkid={!URLENCODE(Opportunity.Id)}&apos; +
&apos;&amp;CF00N10000006QShg={!URLENCODE(Opportunity.Sales_assistant_name__c)}&apos; +
&apos;&amp;CF00N10000006QShg_lkid={!URLENCODE(Opportunity.Sales_assistant_ID__c)}&apos; +
&apos;&amp;CF00N10000006QShq={!URLENCODE(Opportunity.Manager_name__c)}&apos; +
&apos;&amp;CF00N10000006QShq_lkid={!URLENCODE(Opportunity.Sales_manager_departmentID__c)}&apos; +
 
&apos;&amp;CF00N10000006QShb={!URLENCODE(Opportunity.Sales_owner_buchang__c)}&apos; +
&apos;&amp;CF00N10000006QShb_lkid={!URLENCODE(Opportunity.Sales_owner_buchangID__c)}&apos; +
 
 
 
 
 
 
 
 
 
&apos;&apos;;
}</url>
</WebLink>