GWY
2022-04-15 b823c7f3569cf9368e2245846e918f78f32e903a
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<apex:page Controller="OrderPdf2Controller" showHeader="false" sidebar="false" id="allPage" action="{!init2}" >
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
    <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
    <script type="text/javascript">
        function savejs() {
            blockme();
            savebtn();
        }
        function printjs() {
            blockme();
            printbtn();
        }
        function setSeller() {
            var seller = j$(escapeVfId('seller_select')).val();
            var name = '';
            var address = '';
            var city = '';
            var province = '';
            var phone = '';
            if (seller == 'bj') {
                name = j$(escapeVfId('seller_name1')).val();
                address = j$(escapeVfId('seller_address1')).val();
                city = j$(escapeVfId('seller_city1')).val();
                province = j$(escapeVfId('seller_province1')).val();
                phone = j$(escapeVfId('seller_phone1')).val();
            } else if (seller == 'sh') {
                name = j$(escapeVfId('seller_name2')).val();
                address = j$(escapeVfId('seller_address2')).val();
                city = j$(escapeVfId('seller_city2')).val();
                province = j$(escapeVfId('seller_province2')).val();
                phone = j$(escapeVfId('seller_phone2')).val();
            }
            j$(escapeVfId('allPage:allForm:allBlock:seller_name')).val(name);
            j$(escapeVfId('allPage:allForm:allBlock:seller_address')).val(address);
            j$(escapeVfId('allPage:allForm:allBlock:seller_city')).val(city);
            j$(escapeVfId('allPage:allForm:allBlock:seller_province')).val(province);
            j$(escapeVfId('allPage:allForm:allBlock:seller_phone')).val(phone);
        }
    </script>
 
    <apex:form id="allForm">
        <apex:actionFunction name="savebtn" rerender="allForm,message" action="{!saveBtn}" oncomplete="unblockUI();"/>
        <apex:actionFunction name="printbtn" rerender="allForm,message" action="{!printBtn}" oncomplete="unblockUI();"/>
        <apex:outputPanel id="message">
            <apex:pageMessages />
        </apex:outputPanel>
 
        <apex:pageBlock id="allBlock">
 
        <input type="hidden" id="seller_name1" value="{!seller_name1}"/>
        <input type="hidden" id="seller_address1" value="{!seller_address1}"/>
        <input type="hidden" id="seller_city1" value="{!seller_city1}"/>
        <input type="hidden" id="seller_province1" value="{!seller_province1}"/>
        <input type="hidden" id="seller_phone1" value="{!seller_phone1}"/>
 
        <input type="hidden" id="seller_name2" value="{!seller_name2}"/>
        <input type="hidden" id="seller_address2" value="{!seller_address2}"/>
        <input type="hidden" id="seller_city2" value="{!seller_city2}"/>
        <input type="hidden" id="seller_province2" value="{!seller_province2}"/>
        <input type="hidden" id="seller_phone2" value="{!seller_phone2}"/>
 
        <table border="0" width="600px">
            <tr>
                <td style="text-align: center; font-size: 16pt;">完税订货单</td>
            </tr>
        </table>
        <table style="border:solid 1px black" width="600px">
            <colgroup>
                <col width="20%"/>
                <col width="80%"/>
            </colgroup>
            <tr>
                <td style="text-align: right;">选择卖方:</td>
                <td style="text-align: left;">
                    <select id="seller_select" onchange="setSeller();">
                        <option value="none" selected="selected">-无-</option>
                        <apex:outputpanel layout="none" rendered="{!IF(productSegment == 'NDT'|| productSegment == 'ANI', false, true)}">
                            <option value="sh">上海</option>
                        </apex:outputpanel>
                        
                        <apex:outputpanel layout="none" rendered="{!IF(productSegment == 'NDT'|| productSegment == 'ANI', true, false)}">
                            <option value="sh">上海</option>
                        </apex:outputpanel>
                    </select>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;">卖方:</td>
                <td style="text-align: left;"><apex:inputText id="seller_name" value="{!header.seller_name}" /></td>
            </tr>
            <tr>
                <td style="text-align: right;">地址:</td>
                <td style="text-align: left;"><apex:inputText id="seller_address" value="{!header.seller_address}" /></td>
            </tr>
            <tr>
                <td style="text-align: right;">城市:</td>
                <td style="text-align: left;"><apex:inputText id="seller_city" value="{!header.seller_city}" /></td>
            </tr>
            <tr>
                <td style="text-align: right;">省份:</td>
                <td style="text-align: left;"><apex:inputText id="seller_province" value="{!header.seller_province}" /></td>
            </tr>
            <tr>
                <td style="text-align: right;">电话:</td>
                <td style="text-align: left;"><apex:inputText id="seller_phone" value="{!header.seller_phone}" /></td>
            </tr>
            <tr>
                <td style="text-align: right;">合同名:</td>
                <td style="text-align: left;"><apex:inputText value="{!order.Name}" /></td>
            </tr>
            <tr>
                <td style="text-align: right;">订单编号:</td>
                <td style="text-align: left;"><apex:inputText value="{!header.pdf_order_no}" /></td>
            </tr>
            <apex:outputPanel layout="none" rendered="{!IF(productSegment == 'BS', true, false)}">
            <tr>
                <td style="text-align: right;">②SAP报备单号:</td>
                <td style="text-align: left;"><apex:inputText value="{!header.order_sap_no}" /></td>
            </tr>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(productSegment == 'IE', true, false)}">
            <tr>
                <td style="text-align: right;">用户属性(IE用):</td>
                <td style="text-align: left;"><apex:inputField value="{!order.PDF_Property__c}" /></td>
            </tr>
            </apex:outputPanel>
            <apex:outputPanel layout="none" rendered="{!IF(productSegment == 'IE' || productSegment == 'RVI'|| productSegment == 'NDT'|| productSegment == 'ANI', true, false)}">
            <tr style="border-bottom: thin solid black;">
                <td style="text-align: left;">报备单号:</td>
                <td style="text-align: left;"><apex:inputText value="{!header.order_no}" /></td>
            </tr>
            </apex:outputPanel>
        </table>
 
         <apex:outputPanel layout="none" rendered="{!IF(productSegment == 'BS', true, false)}">
        <table style="border-collapse:collapse;" border="1" width="600px">
            <apex:outputPanel rendered="{!notSpecialDealer}">
                <colgroup>
                    <col width="5%"/>
                    <col width="15%"/>
                    <col width="15%"/>
                    <col width="5%"/>
                    <col width="15%"/>
                    <col width="15%"/>
                    <col width="30%"/>
                </colgroup>
                <tr>
                    <td style="text-align: center;" colspan="6">⑤订货明细</td>
                    <td style="text-align: center;">BS填写</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!!notSpecialDealer}">
                <colgroup>
                    <col width="11%"/>
                    <col width="21%"/>
                    <col width="21%"/>
                    <col width="11%"/>
                    <col width="36%"/>
                </colgroup>
                <tr>
                    <td style="text-align: center;" colspan="4">⑤订货明细</td>
                    <td style="text-align: center;">BS填写</td>
                </tr>
            </apex:outputPanel>
            <tr>
                <td style="text-align: center;">NO.</td>
                <td style="text-align: center;">OT CODE</td>
                <td style="text-align: center;">EC CODE</td>
                <td style="text-align: center;">数量</td>
                <apex:outputPanel rendered="{!notSpecialDealer}">
                    <td style="text-align: center;">单价(RMB)</td>
                    <td style="text-align: center;">总价(RMB)</td>
                </apex:outputPanel>
                <td style="text-align: center;">生产厂家</td>
            </tr>
            <apex:repeat value="{!inputDetails}" var="detail">
            <tr>
                <td style="text-align: center;"><apex:outputText value="{!detail.lineno}" /></td>
                <td style="text-align: left;"><apex:outputText value="{!detail.otcode}" /></td>
                <td style="text-align: left;"><apex:outputText value="{!detail.eccode}" /></td>
                <td style="text-align: right;"><apex:outputText value="{!detail.quantity}" /></td>
                <apex:outputPanel rendered="{!notSpecialDealer}">
                    <td style="text-align: right;"><apex:outputText value="{!detail.price}" /></td>
                    <td style="text-align: right;"><apex:outputText value="{!detail.totalprice}" /></td>
                </apex:outputPanel>
                <td style="text-align: left;"><apex:inputText value="{!detail.factory}" /></td>
            </tr>
            </apex:repeat>
        </table>
        </apex:outputPanel>
 
        <table border="0" width="600px">
            <tr>
                <td style="text-align: center;"><apex:commandButton value="保存" action="{!saveBtn}" /></td>
                <td style="text-align: center;"><apex:commandButton value="保存并打印" action="{!printBtn}" /></td>
            </tr>
        </table>
        </apex:pageBlock>
    </apex:form>
</apex:page>