DESKTOP-0K9VGFE\hp
2022-03-11 6d766b0c8e9b31e7e03ffd344a94c2851aa9beb9
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<apex:page Controller="SaleOrderController" showHeader="true" tabStyle="SaleAndDelivery__tab" sidebar="true" 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.CommonUtilJs)}"/>
<script>
function saveJs() {
    blockme();
    ProSale();
}
function searchProductJs() {
    blockme();
    SearchPro();
}
function SaveE(){
    blockme();
    ProdElivery();
}
 
function SaveP(){
    blockme();
    ProSale();
}
 
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
 
</script>
<apex:form id="allForm">
        <apex:actionFunction name="SearchPro" action="{!SearchPro}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="ProSale" action="{!ProSale}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message" onComplete="unblockUI();">
        </apex:actionFunction>
         <apex:actionFunction name="ProdElivery" action="{!ProdElivery}" rerender="ConsumableorderdetailsSection,ConsumableorderdetailsSection1, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:outputPanel id="allPanel">
            <apex:pageBlock title="出货管理" id="allBlock">
             <apex:pageBlockButtons >
                    <apex:commandButton onclick="SaveP();"  value="销售" rerender="dummy" style="width: 150px;" rendered="{!IF(coc.Summons_Order_type__c='销售',true,false)}"/>
                    <apex:commandButton onclick="SaveE();"  value="出货" rerender="dummy" style="width: 150px;" rendered="{!IF(coc.Summons_Order_type__c='销售',false,true)}"/>
                </apex:pageBlockButtons>
                 <apex:outputPanel id="message">
                    <apex:pageMessages />
                 </apex:outputPanel>
            <apex:pageBlock rendered="{!IF(ESetId !='', true, false)}" title="出库单信息">
                    <table>
                    <colgroup>
                            <col width="120px"/>
                            <col width="130px"/>
                            <col width="100px"/>
                            <col width="120px"/>
                            <col width="120px"/>
                            <col width="120px"/>
                            <col width="120px"/>
                            <col width="120px"/>
 
                                    <col width="150px"/>
                        </colgroup>
                        <tr>
                            <td align="right">出库单号:</td>
                            <td align="left"><apex:outputField value="{!coc.Name}" style="width:100px"/></td>
                            <td align="right">客户名:</td>
                            <td align="left"><apex:outputField value="{!coc.ShipmentAccount__c}" style="width:100px"/></td>
                             <td align="right">科室:</td>
                            <td align="left"><apex:outputField value="{!coc.Order_ForCustomerText__c}" style="width:100px"/></td>
                            <td align="right">目的:</td>
                            <td align="left"><apex:outputField id="OrderDircteion"  value="{!coc.SummonsForDirction__c}" style="width:100px"/></td>
                        </tr>
                    </table>
                </apex:pageBlock>
 
                <apex:pageBlock title="BarCode录入" rendered="{!IF(coc.Arrive_Order__c = null,true,false)}">
                    <table>
                        <colgroup>
                            <col width="160px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="150px"/>
                            <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" onchange="PraseBarCode(this.value)" value="{!barcode}" style="width:400px"/></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:pageBlock title="出货明细" id="ConsumableorderdetailsSection">
                    <table class="list" border="0" cellpadding="0" cellspacing="0">
                        <tr class="headerRow">
                            <th>消耗品订单</th>
                            <th>{!$ObjectType.Consumable_order_details2__c.fields.name.label}</th>
                            <th>单位</th>
                            <th>消耗品名称</th>
                            <th>发货日期</th>
                            <th>BarCode</th>
                            <th>使用期限</th>
                            <th>出货数量</th>
                        </tr>
                        <apex:repeat value="{!ConsumableorderdetailsRecords}" var="records" id="ConsumableorderdetailsTable">
                        <tr class="dataRow">
                            <td class="dataCell"><apex:outputField id="consumablesCount1" value="{!records.orderdetails2.Consumable_order_minor__c}"/></td>
                            <td class="dataCell"><apex:outputLink value="/{!records.orderdetails2.id}" target="LINK_{!records.orderdetails2.id}"><apex:outputField id="consumablesCount" value="{!records.orderdetails2.name}"/></apex:outputLink></td>
                            <td class="dataCell"><apex:outputField value="{!records.orderdetails2.Box_Piece__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.Prod.name}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.orderdetails2.Deliver_date__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.orderdetails2.Bar_Code__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.orderdetails2.Sterilization_limit__c}"/></td>
                            <td class="dataCell">
                                <apex:outputText value="{!records.outboundCount}" rendered="{!IF(records.orderdetails2.Box_Piece__c='盒',true,false)}"/>
                                <apex:inputText value="{!records.outboundCount}" rendered="{!IF(records.orderdetails2.Box_Piece__c='个',true,false)}"/></td>
                        </tr>
                        </apex:repeat>
                    </table>
 
                </apex:pageBlock>
 
                <apex:pageBlock title="出货错误明细">
                <apex:pageblocksection columns="1" id="ConsumableorderdetailsSection1">
                    <apex:pageblocktable value="{!ConsumableorderdetailsRecordserror}" var="records" id="ConsumableorderdetailsTable1">
                         <apex:column width="80">
                             <apex:facet name="header">消耗品订单</apex:facet>
                             <apex:outputField id="consumablesCount11" value="{!records.orderdetails2.Consumable_order_minor__c}"/>
                         </apex:column>
                         <apex:column width="80">
                             <apex:facet name="header">{!$ObjectType.Consumable_order_details2__c.fields.name.label}</apex:facet>
                             <apex:outputField id="consumablesCount1" value="{!records.orderdetails2.name}"/>
                             <apex:inputHidden id="oldConsumableCount1" value="{!records.oldConsumableCount}"/>
                         </apex:column>
                         <apex:column width="80">
                             <apex:facet name="header">消耗品名称</apex:facet>
                             <apex:outputField value="{!records.Prod.name}"/>
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">单位</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.Box_Piece__c}" />
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">BarCode</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.Bar_Code__c}"/>
                         </apex:column>
                          <apex:column width="80">
                             <apex:facet name="header">使用期限</apex:facet>
                             <apex:outputField value="{!records.orderdetails2.Sterilization_limit__c}"/>
                         </apex:column>
                         <apex:column width="80">
                             <apex:facet name="header">错误原因</apex:facet>
                             <apex:outputText value="{!records.ErrorReason}" />
                         </apex:column>
                    </apex:pageblocktable>
                    <script>
                        setDisabled();
                    </script>
                </apex:pageblocksection>
            </apex:pageBlock>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>