buli
2022-05-13 2f4492ee18f90274582fcc2bb06f5e9bf64136e8
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
<apex:page standardController="loaner_user__c" extensions="NewLoanerUserController" showHeader="true" sidebar="false" action="{!init}" title="新建样机借用客户">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<script>
 
function saveJs() {
    if(confirm('联系人和客户为必填信息,如果为空将不保存此条记录,是否已确认所有需要保存的信息该字段都不为空?')){
        blockme();
        updateUser();
    }
}
</script>
 
 
 
<style type="text/css">
    .dateFormat{
        display: none;
    }
</style>
 
    <apex:form id="allForm">
         <apex:actionFunction name="updateUser" action="{!updateUser}" rerender="allForm,message,allPanel" onComplete="unblockUI();"></apex:actionFunction>
         <apex:outputPanel id="message">
            <apex:messages />
        </apex:outputPanel>
 
         <apex:outputPanel id="allPanel">
            <apex:pageBlock id="allBlock">
                <table style="width: 100%;">
                    <tr>
                        <th style="text-align: left;font-size: 20px;">
                            新建样机借用客户
                        </th>
                        <th style="text-align: right;">
                            <apex:commandButton action="{!cancelBtn}" value="返回" rerender="dummy" style="width: 70px;"/>
                            <apex:commandButton onclick="saveJs();" value="确认" rerender="allForm" style="width: 70px;"/>
                        </th>
                    </tr>
                </table>
                    <div style="overflow: scroll;height: 300px;width: 1260px; ">
                       <apex:variable value="{!1}" var="cnt" />
                    <apex:repeat value="{!dataLines}" var="line" id="lines">
                                <div style="width: 1260px;">
                        {!$ObjectType.loaner_user__c.fields.Customer__c.label}:
                        <apex:inputField value="{!line.Customer__c}" />
                               {!$ObjectType.loaner_user__c.fields.Contact__c.label}:
                               <apex:inputField value="{!line.Contact__c}" />
                               {!$ObjectType.loaner_user__c.fields.FromThePeriod__c.label}:
                               <apex:inputField value="{!line.FromThePeriod__c}"/>
                               {!$ObjectType.loaner_user__c.fields.EndThePeriod__c.label}:
                               <apex:inputField value="{!line.EndThePeriod__c}"/>
                        {!$ObjectType.loaner_user__c.fields.Follow_UP_Opp__c.label}:
                        <apex:inputField value="{!line.Follow_UP_Opp__c}"/>
                               {!$ObjectType.loaner_user__c.fields.Remarks__c.label}:
                               <apex:inputField value="{!line.Remarks__c}"/>
                        
                               <apex:variable value="{!cnt + 1}" var="cnt" />
                           </div>
                    </apex:repeat>
                </div>
 
            </apex:pageBlock>
        </apex:outputPanel>
 
    </apex:form>
 
 
</apex:page>