高章伟
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
<apex:page showHeader="true" controller="OutboundorderImportController" sidebar="true" action="{!init}">
    <apex:form >
        <apex:actionFunction name="dataInfoconfim" action="{!dataInfoconfim}" rerender="EDCline_1, message">
        </apex:actionFunction>
        <apex:actionFunction name="dataImport" action="{!dataImport}" rerender="errorPanel,message">
        </apex:actionFunction>
        <apex:outputPanel rendered="{!errorflg}" id="errorPanel">
            <table width="100%">
                <tr>
                    <td align="left"><div class="errorMsg">{!errorMessage}</div></td>
                </tr>
            </table>
        </apex:outputPanel>
        <apex:pageBlock id="EDCline_1" >
            <apex:pageBlockSection columns="6">
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="读取csv文件" action="{!importCSVFile}"/>
                  <apex:commandButton value="导入数据" action="{!dataImport}" disabled="{!saveFLGbln}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pagemessages />
        <apex:pageBlock >
        <apex:pageblocksection columns="1" title="出库单信息" id="OrderSection">
            <apex:pageblocktable value="{!orderRecords}" var="records" id="OrderTable">
                 <apex:column width="80">
                     <apex:facet name="header">出库单名称</apex:facet>
                     <apex:outputField value="{!records.order.Name}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">目的</apex:facet>
                     <apex:outputText value="{!records.order.SummonsForDirction__c}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">医院编码</apex:facet>
                     <apex:outputText value="{!records.hospitalCode}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">医院名称</apex:facet>
                     <apex:outputText value="{!records.hospitalName}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">科室</apex:facet>
                     <apex:outputText value="{!records.order.Order_ForCustomerText__c}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">二级经销商</apex:facet>
                     <apex:outputText value="{!records.agencyName}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">出库/销售日期</apex:facet>
                     <apex:outputText value="{0, date, yyyy/MM/dd}">
                        <apex:param value="{!records.order.Outbound_Date__c}" />
                    </apex:outputText>
                 </apex:column>
            </apex:pageblocktable>
        </apex:pageblocksection>
        <!--
        <apex:pageblocksection columns="1" title="出库单明细" id="OrderdetSection">
            <apex:pageblocktable value="{!orderdetRecords}" var="records" id="OrderdetTable">
                 <apex:column width="80">
                     <apex:facet name="header">出库单名称</apex:facet>
                     <apex:outputText value="{!records.orderName}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">产品型号</apex:facet>
                     <apex:outputText value="{!records.productName}"/>
                 </apex:column>
                 <apex:column width="80" style="text-align: right;">
                     <apex:facet name="header">出货数量</apex:facet>
                     <apex:outputField value="{!records.orderdetails1.Shipment_Count__c}"/>
                 </apex:column>
                 <apex:column width="80" style="text-align: right;">
                     <apex:facet name="header">出货单价</apex:facet>
                     <apex:outputField value="{!records.orderdetails1.Delivery_List_RMB__c}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">单位</apex:facet>
                     <apex:outputField value="{!records.orderdetails1.Box_Piece__c}"/>
                 </apex:column>
                 <apex:column width="80" style="text-align: right;">
                     <apex:facet name="header">二级经销商给客户单价</apex:facet>
                     <apex:outputField value="{!records.orderdetails1.Unitprice_To_agency__c}"/>
                 </apex:column>
            </apex:pageblocktable>
        </apex:pageblocksection>
        <apex:pageblocksection columns="1" title="出库产品明细" id="Orderdet2Section">
            <apex:pageblocktable value="{!orderdet2Records}" var="records" id="Orderdet2Table">
                 <apex:column width="80">
                     <apex:facet name="header">出库单名称</apex:facet>
                     <apex:outputText value="{!records.orderName}"/>
                 </apex:column>
                 <apex:column width="80">
                     <apex:facet name="header">产品型号</apex:facet>
                     <apex:outputText value="{!records.productName}"/>
                 </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:pageblocktable>
        </apex:pageblocksection>-->
     </apex:pageBlock>
   </apex:form>
</apex:page>