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
<apex:page Controller="ConInvoiceListController" showHeader="true" tabStyle="ConInvoiceList__tab" sidebar="true" id="allPage" action="{!init}" 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 ClearJs(){
    blockme();
    document.getElementById("allPage:allForm:searchBlock:InvoiceDateStartSearch").value = "";
    document.getElementById("allPage:allForm:searchBlock:InvoiceDateEndSearch").value = "";
    document.getElementById("allPage:allForm:searchBlock:InvoiceCodeSearch").value = "";
    document.getElementById("allPage:allForm:searchBlock:InvoiceAccountSearch").value = "";
    document.getElementById("allPage:allForm:searchBlock:InvoiceStatusSearch").value = "";
    clearUp();
}
 
function invoiceCodeSearchJs() {
    blockme();
    invoiceCodeSearch();
}
 
function newInvoiceJs() {
    blockme();
    window.open("/customer/apex/ConInvoiceView", "_self");
}
 
//排序
function SortLimitedJs(key) {
    blockme();
    SortLimited(key);
}
 
</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="invoiceCodeSearch" action="{!invoiceCodeSearch}" rerender="searchdetails,message" onComplete="unblockUI();">
    </apex:actionFunction>
    <apex:actionFunction name="clearUp" action="{!clearUp}" rerender="searchBlock,searchdetails,message" onComplete="unblockUI();">
    </apex:actionFunction>
    <apex:actionFunction name="SortLimited" action="{!SortLimited}" rerender="searchdetails, message" onComplete="unblockUI();">
        <apex:param name="firstParam" assignTo="{!sortKey}" value="" />
    </apex:actionFunction>
        <apex:outputPanel id="allPanel">
            <apex:pageBlock id="newBlock">
                <table>
                    <colgroup>
                        <col width="150px"/>
                        <col width="150px"/>
                        <col width="10px"/>
                        <col width="70px"/>
                        <col width="100px"/>
                        <col width="10px"/>
                    </colgroup>
                    <tr>
                        <td align="right"></td>
                        <td><apex:commandButton onclick="newInvoiceJs();return false;" value="新建发票" rerender="dummy" style="width:150px;" /></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="80px"/>
                        <col width="100px"/>
                        <col width="10px"/>
                        <col width="80px"/>
                        <col width="100px"/>
                        <col width="10px"/>
                        <col width="80px"/>
                        <col width="100px"/>
                        <col width="150px"/>
                        <col width="150px"/>
                    </colgroup>
                    <tr>
                        <td align="right">发票日期</td>
                        <td>从<apex:inputField id="InvoiceDateStartSearch" value="{!coc.Order_date__c}" style="width:80px"/>起</td>
                        <td/>
                        <td align="right">发票号</td>
                        <td><apex:inputtext id="InvoiceCodeSearch" value="{!category1}" style="width:80px"/></td>
                        <td/>
                        <td align="right">客户名</td>
                        <td><apex:inputtext id="InvoiceAccountSearch" value="{!category2}" style="width:80px"/></td>
                        <td/>
                        <td align="right">状态</td>
                        <td><apex:inputField id="InvoiceStatusSearch" value="{!coc.Invoice_status__c}" style="width:80px"/></td>
                        <td><apex:commandButton value="检索" style="width: 130px;" onclick="invoiceCodeSearchJs(); return false;" /></td>
                        <td><apex:commandButton value="清空" style="width: 130px;" onclick="ClearJs(); return false;" /></td>
                    </tr>
                    <tr>
                        <td align="right"></td>
                        <td valign="top">到<apex:inputField id="InvoiceDateEndSearch" 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 align="right"></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.Invoice_status__c.label}</th>
                        <th>发票账面金额(元)</th>
                        <th>{!$ObjectType.Consumable_order__c.fields.Invoice_attachment__c.label}</th>
                        <th>{!$ObjectType.Consumable_order__c.fields.Invoicedet_attachment__c.label}</th>
                    </tr>
                <apex:repeat value="{!raesList}" var="records" id="theRepeat">
                    <tr class="dataRow">
                        <td Class="dataCell">
                            <apex:outputField value="{!records.Invoice_Date__c}"/></td>
                        <td class="dataCell"><apex:outputLink value="/ConInvoiceView?invoiceId={!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.Invoice_status__c}"/></td>
                        <td class="dataCell" style="text-align: right;"><apex:outputField value="{!records.Invoice_total_amount__c}"/></td>
                        <td class="dataCell"><apex:outputField value="{!records.Invoice_attachment__c}"/></td>
                        <td class="dataCell"><apex:outputField value="{!records.Invoicedet_attachment__c}"/></td>
                    </tr>
                </apex:repeat>
                </table>
           </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>