111
GWY
2022-03-10 e1928eff37b01afcdfd5456944bb3b15d09e3258
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<apex:page id="Page" Controller="NewReplacementOpportunityController" sidebar="true" showHeader="true" action="{!init}">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
 
    <script>
        function saveJs() {
            blockme();
            saveBtn();
        }
 
        function saveYesJs() {
            blockme();
            saveBtnYes();
        }
 
        function saveNoJs() {
            blockme();
            saveBtnNo();
        }
 
        function cancelJs() {
            var baseUrl = '{!baseUrl}';
            var rtUrl = '{!rtUrl}';
            if (rtUrl == 'null' || rtUrl == '') {
                rtUrl = '{!conId}';
            }
            window.location.href = baseUrl + "/" + rtUrl;
        }
    </script>
 
    <apex:form id="mainForm">
        <apex:actionFunction action="{!saveBtn}" name="saveBtn" reRender="mainForm,message" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!saveBtnYes}" name="saveBtnYes" reRender="mainForm,message" oncomplete="unblockUI();"/>
        <apex:actionFunction action="{!saveBtnNo}" name="saveBtnNo" reRender="mainForm,message" oncomplete="unblockUI();"/>
 
        <apex:outputPanel id="message">
            <apex:messages styleClass="editListError"/>
        </apex:outputPanel>
 
        <input type="hidden" id="hasError" value="{!hasError}"/>
        <input type="hidden" id="isDealerPage" value="{!isDealerPage}"/>
         <apex:pageBlock id="idSearchSetProduct" title="新建询价" tabStyle="Opportunity">
            <apex:pageBlockButtons location="top">
                <apex:commandButton style="width:50px" onclick="saveJs();" value="保存" rerender="dummy" rendered="{!IF(hasError == true, false, true)}"/>
                <apex:commandButton style="width:50px" onclick="cancelJs();" value="取消" rerender="dummy" rendered="{!IF(hasError == true, false, true)}"/>
                <apex:commandButton style="width:50px" onclick="saveYesJs();" value="是" rerender="dummy" rendered="{!IF(hasError == true, true, false)}"/>
                <apex:commandButton style="width:50px" onclick="saveNoJs();" value="否" rerender="dummy" rendered="{!IF(hasError == true, true, false)}"/>
            </apex:pageBlockButtons>
 
             <apex:pageBlockSection title="询价信息" columns="2">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="询价名称" for="opp_Name"/>
                    <apex:inputField value="{!opp.Name}" id="opp_Name"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="产品分类" for="opp_ProductSegment"/>
                    <apex:inputField value="{!opp.ProductSegment__c}" id="opp_ProductSegment" required="true"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="客户名" for="opp_Account"/>
                    <apex:inputField value="{!opp.AccountId}" id="opp_Account" required="true"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="询价币种" for="opp_CurrencyIsoCode"/>
                    <apex:inputField value="{!opp.CurrencyIsoCode}" id="opp_CurrencyIsoCode"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="类型" for="opp_Type"/>
                    <apex:inputField value="{!opp.Type}" id="opp_Type"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="金额" for="opp_Amount"/>
                    <apex:inputField value="{!opp.Amount}" id="opp_Amount"/>
                </apex:pageBlockSectionItem>
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="整机/零件" for="opp_MachineParts"/>
                    <apex:inputField value="{!opp.Machine_Parts__c}" id="opp_MachineParts"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
 
            <apex:pageBlockSection title="附加信息" columns="2">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="内贸 / 外贸" for="opp_TradeType"/>
                    <apex:inputField value="{!opp.TradeType__c}" id="opp_TradeType" required="true"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="销售方式" for="opp_SalesChannel"/>
                    <apex:inputField value="{!opp.SalesChannel__c}" id="opp_SalesChannel" required="true"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
 
            <apex:pageBlockSection title="经销商相关信息" columns="2">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="代理商名" for="opp_Dealer"/>
                    <apex:inputField value="{!opp.Dealer__c}" id="opp_Dealer"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="代理商销售担当者名" for="opp_DealerSalesStaffName"/>
                    <apex:inputField value="{!opp.DealerSalesStaffName__c}" id="opp_DealerSalesStaffName" required="true"/>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
 
        </apex:pageBlock>
 
 
    </apex:form>
</apex:page>