高章伟
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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<apex:page Controller="SaleAndDeliveryController" showHeader="true" tabStyle="SaleAndDelivery__tab" sidebar="true" id="allPage" action="{!init1}" title="出库">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<script>
//取消焦点
function setFocusOnLoad() {}
function bodyOnLoad(){setFocusOnLoad();}
 
function searchProductJs() {
    blockme();
    searchConsumableorderdetails();
}
 
function searchConsumableorFinishJs() {
    blockme();
    searchConsumableorFinish();
}
//未完成开票出库单检索
function searchOrderInstatusJs() {
    blockme();
    searchOrderInstatus();
}
//排序
function SortLimitedJs(key) {
    blockme();
    SortLimited(key);
}
 
function calonLoad() {
    
}
function ClearJs(){
    blockme();
    document.getElementById("allPage:allForm:allBlock:searchBlock:OrderDateStartSearch").value = "";
    document.getElementById("allPage:allForm:allBlock:searchBlock:OrderDateEndSearch").value = "";
    document.getElementById("allPage:allForm:allBlock:searchBlock:OrderCodeSearch").value = "";
    document.getElementById("allPage:allForm:allBlock:searchBlock:OrderAccountSearch").value = "";
    cleanUp();
}
//上传文件
function outorderImpJs(){
    window.open("/customer/OutboundorderImport");
}
window.sfdcPage.appendToOnloadQueue(function() { calonLoad() });
</script>
<style>
    .dateFormat  {
        display: none;
    }
    tr.dataRow {
        background-color:white;
    }
    td.columus {
        background-color:white;
        text-align: right;
    }
    tr.dataRow:hover {
        background-color: #e3f3ff;
    }
</style>
    <apex:form id="allForm">
        <apex:actionFunction name="searchConsumableorderdetails" action="{!searchConsumableorderdetails}" rerender="searchdetails,searchBlock, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="searchConsumableorFinish" action="{!searchConsumableorFinish}" rerender="searchdetails,searchBlock, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="cleanUp" action="{!cleanUp}" rerender="searchdetails,searchBlock, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="searchOrderInstatus" action="{!searchOrderInstatus}" rerender="searchdetails,searchBlock, message" onComplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="SortLimited" action="{!SortLimited}" rerender="searchdetails,searchBlock, message" onComplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!sortKey}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="allPanel">
            <apex:pageBlock id="allBlock">
                <apex:pageBlock id="newBlock">
                    <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"></td>
                            <td><apex:commandButton action="{!neworderhead}" value="新建出库单" rerender="dummy" /></td>
                            <td/>
                            <!--<td align="right"></td>
                            <td><apex:commandButton onclick="" value="下载未出库一览" rerender="dummy" /></td>
                            <td/>-->
                            <td align="right"></td>
                            <td><apex:commandButton onclick="outorderImpJs();" value="上传已出库一览" rerender="dummy"  /></td>
                            <td/>
                        </tr>
                        <tr>
                            <td></td>
                        </tr>
                    </table>
                </apex:pageBlock>
                <apex:pageBlock id="searchBlock" title="检索条件">
                    <table>
                        <colgroup>
                            <col width="80px"/>
                            <col width="200px"/>
                            <col width="10px"/>
                            <col width="100px"/>
                            <col width="100px"/>
                            <col width="10px"/>
                            <col width="80px"/>
                            <col width="100px"/>
                            <col width="150px"/>
                            <col width="150px"/>
                            <col width="150px"/>
                            <col width="150px"/>
                        </colgroup>
                        <tr>
                            <td align="right">出库日</td>
                            <td>从<apex:inputField id="OrderDateStartSearch" value="{!coc.Order_date__c}" style="width:80px"/>起</td>
                            <td/>
                            <td align="right">出库单号</td>
                            <td><apex:inputtext id="OrderCodeSearch" value="{!category1}" style="width:80px"/></td>
                            <td/>
                            <td align="right">客户名</td>
                            <td><apex:inputtext id="OrderAccountSearch" value="{!category2}" style="width:80px"/></td>
                            <td><apex:commandButton value="还没出库的出库单" style="width: 150px;" onclick="searchProductJs(); return false;" /> </td>
                            <td><apex:commandButton value="已出库未开票的出库单" style="width: 150px;" onclick="searchOrderInstatusJs(); return false" /></td>
                            <td><apex:commandButton value="已出库已开票的出库单" style="width: 150px;" onclick="searchConsumableorFinishJs(); return false;" /></td>
                            <td><apex:commandButton value="清空" style="width: 130px;" onclick="ClearJs(); return false;" /></td>
                        </tr>
                        <tr>
                            <td align="right"></td>
                            <td>到<apex:inputField id="OrderDateEndSearch" value="{!coc.Deliver_date__c}" style="width:80px"/></td>
                            <td/>
                            <td align="right"></td>
                            <td></td>
                            <td/>
                            <td align="right"></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    </table>
                </apex:pageBlock>
                <apex:outputPanel id="message">
                    <apex:pageMessages />
                 </apex:outputPanel>
                <apex:pageBlock id="searchdetails" title="出库单一览">
                    <table class="list" border="0" cellpadding="0" cellspacing="0">
                        <tr class="headerRow">
                            <th><a href="#" onclick="SortLimitedJs('0');return false;" style="text-decoration: underline;">出库日</a>{!sortOrder[0]}</th>
                            <th><a href="#" onclick="SortLimitedJs('1');return false;" style="text-decoration: underline;">出库单号</a>{!sortOrder[1]}</th>
                            <th><a href="#" onclick="SortLimitedJs('2');return false;" style="text-decoration: underline;">{!$ObjectType.Consumable_order__c.fields.ShipmentAccount__c.label}</a>{!sortOrder[2]}</th>
                            <th>{!$ObjectType.Consumable_order__c.fields.Order_ForCustomerText__c.label}</th>
                            <th><a href="#" onclick="SortLimitedJs('3');return false;" style="text-decoration: underline;">{!$ObjectType.Consumable_order__c.fields.SummonsStatus_c__c.label}</a>{!sortOrder[3]}</th>
                            <th><a href="#" onclick="SortLimitedJs('4');return false;" style="text-decoration: underline;">{!$ObjectType.Consumable_order__c.fields.Billed_Status__c.label}</a>{!sortOrder[4]}</th>
                            <th>未发票金额(元)</th>
                            <th><a href="#" onclick="SortLimitedJs('5');return false;" style="text-decoration: underline;">创建日期</a>{!sortOrder[5]}</th>
                        </tr>
                    <apex:repeat value="{!raesList}" var="records" id="theRepeat">
                        <tr class="dataRow">
                            <td Class="dataCell">
                                <apex:outputField value="{!records.Outbound_Date__c}"/></td>
                            <td class="dataCell"><apex:outputLink value="/summonsCreat?ESetid={!records.Id}" target="_self"><apex:outputField value="{!records.Name}"/></apex:outputLink></td>
                            <td class="dataCell"><apex:outputField value="{!records.ShipmentAccount__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.Order_ForCustomerText__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.SummonsStatus_c__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.Billed_Status__c}"/></td>
                            <td class="dataCell" style="text-align: right;"><apex:outputField value="{!records.InvoiceNotPro_money__c}"/></td>
                            <td class="dataCell"><apex:outputField value="{!records.CreatedDate}"/></td>
                        </tr>
                    </apex:repeat>
                    </table>
               </apex:pageBlock>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>