bhq@iemsoft.cn
2018-11-27 e2b48dac099e43f4b3243cdf19a7522e4b5eccbe
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
{if $full_page eq 1}
<!DOCTYPE HTML>
<html>
  <head>
    {include file='html_header.htm'}
    <script src='js/region.js'></script>
    <script>
          /**
   * 载入收货地址
   * @param int addressId 收货地址id
   */
  function loadAddress(addressId)
  {
 
    location.href += 'order.php?act=edit&order_id={$order_id}&step=consignee&address_id=' + addressId;
  }
    </script>
  </head>
  <body>
<div id='container'> {/if}
  {include file='page_header.htm'}
      <!--修改收货人信息-->
  {if $step eq 'consignee'}
  <section>
    <div class="order_con">
      <div class="order_pd">
        <div class="order">
          <form name="theForm" action="order.php?act=step_post&step={$step}&order_id={$order_id}&step_act={$step_act}" method="post" onsubmit="return checkConsignee()">
            <div class="order_list_buyer">
              <div class="change_order_info">
              <table width="100%" cellpadding="3" cellspacing="1" >
                {if $address_list}
                <tr>
                  <td align="left" colspan="2">{$lang.address_list}</td>
                <tr>
                <tr>
                  <td colspan="2"><select onchange="loadAddress(this.value)" class="select_address">
                      <option value="0" selected>{$lang.select_please}</option>
                      
                          {foreach from=$address_list item=address}
                      <option value="{$address.address_id}" {if $smarty.get.address_id eq $address.address_id}selected{/if}>{$address.consignee|escape} {$address.email} {$address.address|escape} {$address.tel|escape}</option>
                      {/foreach}
                        
                    </select></td>
                </tr>
                {/if}
                <tr>
                  <td align="left" width="30%"><span>{$lang.label_consignee}</span></td>
                  <td><input name="consignee" type="text" value="{$order.consignee}" class="input_buyer"/>
                    {$lang.require_field} </td>
                </tr>
                {if $exist_real_goods}
                <tr>
                  <td align="left"><span>{$lang.label_area}</span></td>
                  <td><select name="country" id="selCountries" onChange="region.changed(this, 1, 'selProvinces')" class="select_region">
                      <option value="0" selected="true">{$lang.select_please}</option>
                      
                          {foreach from=$country_list item=country}
                          
                      <option value="{$country.region_id}" {if $order.country eq $country.region_id}selected{/if}>{$country.region_name}</option>
                      
                          {/foreach}
                        
                    </select>
                    <select name="province" id="selProvinces" onChange="region.changed(this, 2, 'selCities')" class="select_region">
                      <option value="0">{$lang.select_please}</option>
                      
                          {foreach from=$province_list item=province}
                          
                      <option value="{$province.region_id}" {if $order.province eq $province.region_id}selected{/if}>{$province.region_name}</option>
                      
                          {/foreach}
                        
                    </select>
                    <select name="city" id="selCities" onchange="region.changed(this, 3, 'selDistricts')" class="select_region no_mb">
                      <option value="0">{$lang.select_please}</option>
                      <!-- {foreach from=$city_list item=city} -->
                      <option value="{$city.region_id}" {if $order.city eq $city.region_id}selected{/if}>{$city.region_name}</option>
                      <!-- {/foreach} -->
                    </select>
                    <select name="district" id="selDistricts" class="select_region no_mb no_mr">
                      <option value="0">{$lang.select_please}</option>
                      <!-- {foreach from=$district_list item=district} -->
                      <option value="{$district.region_id}" {if $order.district eq $district.region_id}selected{/if}>{$district.region_name}</option>
                      <!-- {/foreach} -->
                    </select>
                    {$lang.require_field} </td>
                </tr>
                {/if}
                <tr>
                  <td align="left"><span>{$lang.label_email}</span></td>
                  <td><input name="email" type="text" value="{$order.email}"  class="input_buyer"/>
                    {$lang.require_field} </td>
                </tr>
                {if $exist_real_goods}
                <tr>
                  <td align="left"><span>{$lang.label_address}</span></td>
                  <td><input name="address" type="text" value="{$order.address}"  class="input_buyer"/>
                    {$lang.require_field} </td>
                </tr>
                <tr>
                  <td align="left"><span>{$lang.label_zipcode}</span></td>
                  <td><input name="zipcode" type="text" value="{$order.zipcode}"  class="input_buyer"/></td>
                </tr>
                {/if}
                <tr>
                  <td align="left"><span>{$lang.label_tel}</span></td>
                  <td><input name="tel" type="text" value="{$order.tel}"  class="input_buyer"/>
                    {$lang.require_field} </td>
                </tr>
                <tr>
                  <td align="left"><span>{$lang.label_mobile}</span></td>
                  <td><input name="mobile" type="text" value="{$order.mobile}"  class="input_buyer"/></td>
                </tr>
                {if $exist_real_goods}
                <!--<tr>
                  <td align="left">{$lang.label_sign_building}</td>
                  <td><input name="sign_building" type="text" value="{$order.sign_building}"  class="input_buyer"/></td>
                </tr>-->
                <tr>
                  <td align="left"><span>{$lang.label_best_time}</span></td>
                  <td><input name="best_time" type="text" value="{$order.best_time}"  class="input_buyer"/></td>
                </tr>
                {/if}
              </table>
              </div>
              <p align="center">
                <input name="{if $step_act eq 'add'}next{else}finish{/if}" type="submit" class="button" value="确定" />
                <input type="button" value="取消" class="button" onclick="history.back()" />
              </p>
            </div>
          </form>
        </div>
      </div>
    </div>
  </section>
      <!--修改费用信息-->
  {elseif $step eq 'money'}
  <section>
    <div class="order_con">
      <div class="order_pd">
        <div class="order">
          <form name="theForm" action="order.php?act=step_post&step={$step}&order_id={$order_id}&step_act={$step_act}" method="post">
            <div class="order_list_fee">
              <div class="change_order_info">
              <table width="100%" cellpadding="3" cellspacing="1" >
                <tr>
                  <td align="left" width="50%">商品总金额:{$order.formated_goods_amount}</td>
                  <td align="left" width="50%">折扣:
                    <input name="discount" type="text" id="discount" value="{$order.discount}" class="input_fee"/></td>
                </tr>
                <tr>
                  <td>发票税额:
                    <input name="tax" type="text" id="tax" value="{$order.tax}" class="input_fee"/></td>
                  <td>订单总金额:{$order.formated_total_fee}</td>
                </tr>
                <tr>
                  <td>配送费用:
                    <input name="shipping_fee" type="text" value="{$order.shipping_fee}" class="input_fee"/></td>
                  <td>已付款金额:{$order.formated_money_paid}</td>
                </tr>
                <tr>
                  <td>保价费用:
                    <input name="insure_fee" type="text" value="{$order.insure_fee}" class="input_fee"/></td>
                  <td>支付费用:
                    <input name="pay_fee" type="text" value="{$order.pay_fee}" class="input_fee"/></td>
                </tr>
                <tr>
                  <td>包装费用:
                    <input name="pack_fee" type="text" value="" class="input_fee"/></td>
                  <td>贺卡费用:
                    <input name="card_fee" type="text" value="" class="input_fee"/></td>
                </tr>
                <tr>
                  <td colspan="2">使用余额:{if $order.user_id >0}
                    <input name="surplus" type="text" value="{$order.surplus}" class="input_fee_t">
                    {/if} {$lang.available_surplus}{$available_user_money|default:0} </td>
                </tr>
                <tr>
                  <td colspan="2">{$lang.label_integral}{if $order.user_id > 0}
                    <input name="integral" type="text" value="{$order.integral}"  class="input_fee_t">
                    {/if} {$lang.available_integral}{$available_pay_points|default:0} </td>
                </tr>
                <tr>
                  <td colspan="2"> 使用红包:
                    <select name="bonus_id" class="select_bonus">
                      <option value="0" {if $order.bonus_id eq 0}selected{/if}>{$lang.select_please}</option>
                      
                        {foreach from=$available_bonus item=bonus}
                        
                      <option value="{$bonus.bonus_id}" {if $order.bonus_id eq $bonus.bonus_id}selected{/if} money="{$bonus.type_money}">{$bonus.type_name} - {$bonus.type_money}</option>
                      
                        {/foreach}
                        
                    </select></td>
                </tr>
                <tr>
                  <td colspan="2">应付款金额:{$order.formated_order_amount}</td>
                </tr>
              </table>
              </div>
              <p align="center">
                <input name="finish" type="submit" class="button" value="完成" />
                <input type="button" value="取消" class="button" onclick="history.back()" />
              </p>
            </div>
          </form>
        </div>
      </div>
    </div>
  </section>
      <!--修改配送方式-->
      {elseif $step eq "shipping"}
      <section>
        <div class="order_con">
          <div class="order_pd">
            <div class="order">
              <form name="theForm" action="order.php?act=step_post&step={$step}&order_id={$order_id}&step_act={$step_act}" method="post" onsubmit="return checkShipping()">
            <div class="order_list_fee">
              <div class="change_order_info">
              <table cellpadding="" cellspacing="0" width="100%" class="shipping">
                <tr class="first">
                  <td width="5%">&nbsp;</td>
                  <td width="25%" align="left">{$lang.name}</td>
                  <td width="25%" align="center">{$lang.shipping_fee}</td>
                  <td width="25%" align="center">{$lang.free_money}</td>
                  <td width="20%" align="center">{$lang.insure}</td>
                </tr>
                    {foreach from=$shipping_list item=shipping}
                    <tr>
                      <td><input name="shipping" type="radio" value="{$shipping.shipping_id}" {if $order.shipping_id eq $shipping.shipping_id}checked{/if} class="input_radio"/></td>
                      <td>{$shipping.shipping_name}</td>
                  <td align="center">{$shipping.format_shipping_fee}</td>
                  <td align="center">{$shipping.free_money}</td>
                  <td align="center">{$shipping.insure}</td>
                    </tr>
                    {/foreach}
                <tr class="last">
                  <td colspan="5" align="right"><input name="insure" type="checkbox" value="1" {if $order.insure_fee > 0}checked{/if} class="input_checkbox" />
                    {$lang.want_insure}
                  </td>
                </tr>
                
              </table>
              </div>
              <p align="center"> {if $step_act eq "add"}
                <input type="button" value="{$lang.button_prev}" class="button" onclick="history.back()" style="width:27%; box-sizing:border-box;"/>
                {else}{/if}
                <input name="{if $step_act eq 'add'}next{else}finish{/if}" type="submit" class="button" value="{if $step_act eq 'add'}{$lang.button_next}{else}{$lang.button_submit}{/if}" {if $step_act eq "add"}style="width:26.5%; margin-left:10%;margin-right:0;"{/if}/>
                <input type="button" value="{$lang.button_cancel}" class="button" onclick="location.href='order.php?act=process&func=cancel_order&order_id={$order_id}&step_act={$step_act}'" {if $step_act eq "add"}style="width:26.5%; margin-left:10%;"{/if}/>
              </p>
                </div>
                
              </form>
            </div>
          </div>
        </div>
      </section>
      <!--修改支付方式-->
      {elseif $step eq "payment"}
      <section>
        <div class="order_con">
          <div class="order_pd">
            <div class="order">
              <form name="theForm" action="order.php?act=step_post&step={$step}&order_id={$order_id}&step_act={$step_act}" method="post" onsubmit="return checkPayment()">
            <div class="order_list_fee">
              <div class="change_order_info">
              <table cellpadding="" cellspacing="0" width="100%" class="shipping">
                <tr class="first">
                  <td width="5%">&nbsp;</td>
                  <td width="65%" align="left">{$lang.name}</td>
                  <td width="30%" align="center">{$lang.pay_fee}</td>
                </tr>
                {foreach from=$payment_list item=payment}
                <tr>
                  <td><input type="radio" name="payment" value="{$payment.pay_id}" {if $order.pay_id eq $payment.pay_id}checked{/if} class="input_radio"/></td>
                  <td>{$payment.pay_name}</td>
                  <td align="center">{$payment.pay_fee}</td>
                </tr>
                {/foreach}
              </table>
              </div>
              <p align="center"> {if $step_act eq "add"}
                <input type="button" value="{$lang.button_prev}" class="button" onclick="history.back()" style="width:27%; box-sizing:border-box;"/>
                {else}{/if}
                <input name="{if $step_act eq 'add'}next{else}finish{/if}" type="submit" class="button" value="{if $step_act eq 'add'}{$lang.button_next}{else}{$lang.button_submit}{/if}" {if $step_act eq "add"}style="width:26.5%; margin-left:10%;margin-right:0;"{/if}/>
                <input type="button" value="{$lang.button_cancel}" class="button" onclick="location.href='order.php?act=process&func=cancel_order&order_id={$order_id}&step_act={$step_act}'" {if $step_act eq "add"}style="width:26.5%;margin-left:10%;"{/if}/>
              </p>
            </div>
          </form>
        </div>
      </div>
    </div>
  </section>
  {/if}
  {include file='page_footer.htm'}
  {if $full_page eq 1}
  {include file='static_div.htm'} </div>
</body>
</html>
{/if}