GWY
2022-05-16 a9baff8a4508c1850e650f68831d857b953eace4
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<apex:page standardController="Diagnosis_Part__c" id="Page" extensions="NewDiagnosisPartController" action="{!init}" sidebar="false" showHeader="false">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.NewQuoteEntryJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <script>
        function returnSWOPage(){
            var pageClose = j$(escapeVfId("pageClose")).value();
            if (pageClose == 'true') {
                var diagnosisPartId = j$(escapeVfId("diagnosisPartId")).value();
                var swoId = j$(escapeVfId("swoId")).value();
                window.opener.repairReturnJS(diagnosisPartId,swoId); 
                window.close();   
            }
            
        }
 
        function saveJS(){
            blockme();
            save();
        }
 
        function closePage(){
            window.close();
        }
 
        function deleteJS(){
            if(confirm('是否删除?')==true){
                blockme();
                deleteAction();
            }
        }
 
    </script>
    <style type="text/css">
        .pbSubheader {
            background: #BFB19C!important;
            background-color: #DFE6F0!important;
            font-weight:bold;
 
        }
    </style>
    <apex:form id="formInfo">
        <apex:actionFunction name="save" action="{!save}" oncomplete="returnSWOPage();unblockUI();" reRender="formInfo,message"/>
        <apex:actionFunction name="deleteAction" action="{!deleteAction}"/>
        <input type="hidden" id="diagnosisPartId" value="{!diagnosisPartId}" />
        <input type="hidden" id="swoId" value="{!diagnosisPart.SWO__c}" />
        <input type="hidden" id="pageClose" value="{!pageClose}" />
        <apex:pageBlock id="RepairPartInfo" title="DiagnosisPart">
            <apex:pageBlockButtons location="top">
                <apex:commandButton onclick="saveJS()" value="Save" oncomplete="returnSWOPage();unblockUI();" reRender="formInfo" style="width: 80px;">
                    
                </apex:commandButton>
 
                <apex:commandButton onclick="closePage()" value="Cancel" style="width: 80px;">
                    
                </apex:commandButton>
                <apex:commandButton onclick="deleteJS();" oncomplete="returnSWOPage();" reRender="formInfo" value="Delete" style="width: 80px;">
                    
                </apex:commandButton>
            </apex:pageBlockButtons>
            <apex:outputPanel id="message">
 
                <apex:pagemessages />
            </apex:outputPanel>
            <apex:pageBlockSection title="DiagnosisPart信息" columns="2">
                    <apex:pageBlockSectionItem >
                       
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.SWO__c.label}" for="SWO_ID"/>
                        <apex:outputField value="{!diagnosisPart.SWO__c}" id="SWO_ID" />
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.Product__c.label}" for="ITEM"/>
                        <apex:inputField value="{!diagnosisPart.Product__c}" id="ITEM" required="true"/>
                    </apex:pageBlockSectionItem>
 
                   <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.PRODUCT_CODE__c.label}" for="PRODUCT_CODE"/>
                        <apex:inputField value="{!diagnosisPart.PRODUCT_CODE__c}" id="PRODUCT_CODE" required="true"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.PRODUCT_PART_NUMBER__c.label}" for="PRODUCT_PART_NUMBER"/>
                        <apex:inputField value="{!diagnosisPart.PRODUCT_PART_NUMBER__c}" id="PRODUCT_PART_NUMBER" required="true"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.PRODUCT_DESCRIPTION__c.label}" for="PRODUCT_DESCRIPTION"/>
                        <apex:inputField value="{!diagnosisPart.PRODUCT_DESCRIPTION__c}" id="PRODUCT_DESCRIPTION" required="true"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.QUANTITY__c.label}" for="QUANTITY"/>
                    <apex:inputField value="{!diagnosisPart.QUANTITY__c}" id="QUANTITY" required="true"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.INST_SERIAL__c.label}" for="INST_SERIAL"/>
                        <apex:inputField value="{!diagnosisPart.INST_SERIAL__c}" id="INST_SERIAL"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.STATUS__c.label}" for="STATUS"/>
                        <apex:inputField value="{!diagnosisPart.STATUS__c}" id="STATUS"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.HOLD_REASON__c.label}" for="HOLD_REASON"/>
                        <apex:inputField value="{!diagnosisPart.HOLD_REASON__c}" id="HOLD_REASON"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.REMARK__c.label}" for="REMARK"/>
                        <apex:inputField value="{!diagnosisPart.REMARK__c}" id="REMARK"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.DELIVERED__c.label}" for="DELIVERED"/>
                        <apex:inputField value="{!diagnosisPart.DELIVERED__c}" id="DELIVERED"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.RETURNED__c.label}" for="RETURNED"/>
                        <apex:inputField value="{!diagnosisPart.RETURNED__c}" id="RETURNED"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.DeliveredDate__c.label}" for="RETURNED"/>
                        <apex:inputField value="{!diagnosisPart.DeliveredDate__c}" id="DeliveredDate"/>
                    </apex:pageBlockSectionItem>
 
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.Diagnosis_Part__c.fields.RETURN_DATE__c.label}" for="RETURN_DATE"/>
                        <apex:inputField value="{!diagnosisPart.RETURN_DATE__c}" id="RETURN_DATE"/>
                    </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>