高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
<apex:page controller="ConsumUploadPictureController" showHeader="false" action="{!init}" id="allPage">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
    <style>
        table {
          border-collapse: collapse;
        }
        td, th {
          border: 1px solid black;
          text-align: center;
        }
    </style>
    <script type="text/javascript">
        function closeWindow(){
            if (j$(escapeVfId('allPage:allForm:done_flag')).val() == 'true') {
                // window.opener.location.reload();
                if(j$(escapeVfId('allPage:allForm:hasPicture')).val() == 'true'){
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.background = '#009DDC';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.color = 'white';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_L:{!line}:rowCheck").checked = true;
                }
                else{
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.background = '#e8e8e9';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_R:{!line}:button").style.color = '#333';
                    window.opener.document.getElementById("allPage:allForm:dataBlock:dataline_L:{!line}:rowCheck").checked = true;
                }
                window.close();
            }
        }
    </script>
    <apex:pageMessages id="message"/>
    <apex:form id="allForm">
        <apex:inputHidden value="{!done_flag}" id="done_flag"/>
        <apex:inputHidden value="{!hasPicture}" id="hasPicture"/>
        <table>
            <tr>
                <td colspan="6">
                    <apex:commandButton value="保存" action="{!save}" reRender="message,done_flag,hasPicture" oncomplete="closeWindow();"/>
                </td>
            </tr>
            <tr>
                <th>备品配套明细型号</th>
                <th>产品名称</th>
                <th>重要性程度</th>
                <th>跟台者</th>
                <th>消耗品有效期至</th>
                <th>耗材备品明细状态</th>
            </tr>
            <tr>
                <td>{!caesd.Fixture_Model_No_F__c}</td>
                <td>{!caesd.ProductName__c}</td>
                <td>{!caesd.Degree_Of_Importance__c}</td>
                <td> <apex:outputField value="{!caesd.Follower_User__c}"/> </td>
                <td>
                    <apex:outputText value="{0,date,yyyy'/'MM'/'dd}">
                        <apex:param value="{!caesd.Consumable_Guaranteen_end_F__c}" />
                    </apex:outputText>
                </td>
                <td>{!caesd.RAESD_Status__c}</td>
            </tr>
            <tr>
                <th colspan="3">图片1</th>
                <th colspan="3">图片2</th>
            </tr>
            <tr>
                <td colspan="3">
                    <apex:inputField value="{!caesd.Picture1__c}"/>
                </td>
                <td colspan="3">
                    <apex:inputField value="{!caesd.Picture2__c}"/>
                </td>
            </tr>
        </table>
    </apex:form>
</apex:page>