高章伟
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
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
<apex:page Controller="RemoveBoxController" tabStyle="InventoryView__tab" showHeader="true" sidebar="true" action="{!init}" id="allPage" title="拆盒">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<script>
function searchProductJs() {
    blockme();
    searchConsumableorderdetails();
}
 
function removeBoxConfirmJs(){
    var inventorysizeNum = j$(escapeVfId('consumableInventorysize')).value();
    if (inventorysizeNum > 0) {
        event.returnValue = confirm("确认拆盒吗?");
        if(event.returnValue == true){
            blockme();
            removeBoxConfirm();
        }
    }else{
        blockme();
        removeBoxConfirm();
    }
}
 
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
 
</script>
<apex:form id="allForm">
        <apex:actionFunction name="searchProductJs" action="{!searchConsumableorderdetails}" rerender="removeBoxdetailsSection,errordetailsSection, message,EDCline_1,messageText" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="removeBoxConfirm" action="{!removeBoxConfirm}" rerender="removeBoxdetailsSection,errordetailsSection,message,EDCline_1,messageText" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:outputPanel id="allPanel">
             <apex:outputPanel id="messageText">
                <table>
                        <tr>
                            <td>
                            <div id="ErrorName" style="color: red;font-weight: bold;" >{!alertMessage}</div>
                            </td>
                        </tr>
                </table>
            </apex:outputPanel>
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                </apex:outputPanel>
            <apex:pageBlock title="拆盒" id="allBlock" >
              <apex:pageBlock id="EDCline_1" >
                  <apex:commandButton onclick="removeBoxConfirmJs();return false;"    value="拆盒确认" style="width:150px" rerender="dummy" disabled="{!saveFLGbln}"/>
              </apex:pageBlock>
             <apex:pageBlock title="BarCode录入">
                    <table>
                        <colgroup>
                            <col width="160px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="90px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="85px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="70px"/>
                            <col width="100px"/>
                        </colgroup>
                        <tr>
                            <td align="right">BarCode号</td>
                            <td><apex:inputTextarea id="BarCodeArea"  value="{!barcode}" style="width:600px"/></td>
                            <td/>
                            <td align="right"></td>
                            <td><apex:commandButton value="获取明细" style="width: 150px;" onclick="searchProductJs(); return false;" /></td>
                            <td/>
                        </tr>
                        <tr>
                            <td></td>
                        </tr>
                    </table>
                </apex:pageBlock>
 
                 <apex:outputPanel id="message">
                    <apex:pageMessages />
                 </apex:outputPanel>
                 <apex:pageBlock title="拆盒明细">
                     <apex:pageblocksection columns="1" id="removeBoxdetailsSection">
                     <input type="hidden" id="consumableInventorysize" value="{!inventorysize}" />
                        <apex:pageblocktable value="{!ConsumableorderdetailsRecordsdummy}" var="records" id="ConsumableorderdetailsTable">
                             <apex:column width="80">
                                 <apex:facet name="header">消耗品名称</apex:facet>
                                 <apex:outputField value="{!records.Prod.Name__c}"/>
                             </apex:column>
                             <apex:column width="80" style="text-align: right;">
                                 <apex:facet name="header">规格</apex:facet>
                                 <apex:outputField value="{!records.esd.ProductPacking_list_manual__c}"/>
                             </apex:column>
                             <apex:column width="80">
                                 <apex:facet name="header">CFDA状态</apex:facet>
                                 <apex:outputField value="{!records.esd.CFDA_Status__c}"/>
                             </apex:column>
                             <apex:column width="80">
                                 <apex:facet name="header">注册证编码号</apex:facet>
                                 <apex:outputField value="{!records.esd.Report_Product_Approbation__c}"/>
                             </apex:column>
                             <apex:column width="80">
                                 <apex:facet name="header">注册证效期</apex:facet>
                                 <apex:outputField value="{!records.esd.Report_Product_Expiration__c}"/>
                             </apex:column>
                              <apex:column width="80">
                                 <apex:facet name="header">BarCode</apex:facet>
                                 <apex:outputField value="{!records.esd.Bar_Code__c}"/>
                             </apex:column>
                        </apex:pageblocktable>
                    </apex:pageblocksection>
                </apex:pageBlock>
 
                <apex:pageBlock title="错误明细">
                <apex:pageblocksection columns="1" id="errordetailsSection">
                    <apex:pageblocktable value="{!ConsumableorderdetailsRecordserror}" var="records" id="ConsumableorderdetailsTable1">
                         <apex:column width="80">
                             <apex:facet name="header">消耗品名称</apex:facet>
                             <apex:outputField value="{!records.Prod.Name__c}"/>
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">BarCode</apex:facet>
                             <apex:outputField value="{!records.esd.Bar_Code__c}"/>
                         </apex:column>
                         <apex:column width="80">
                             <apex:facet name="header">错误原因</apex:facet>
                             <apex:outputText value="{!records.ErrorReason}" />
                         </apex:column>
                    </apex:pageblocktable>
                </apex:pageblocksection>
            </apex:pageBlock>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>