{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.ds_bill}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    <div class="fixed-empty"></div>
    <form method="get" action="" target="" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>{$Think.lang.order_time_from}{$Think.lang.bill_year_search}</dt>
                <dd>
                    <select name="query_year" class="querySelect">
                        <option value="">{$Think.lang.ds_please_choose}</option>
                        <?php for($i = date('Y',TIMESTAMP)-5; $i <= date('Y',TIMESTAMP)+2; $i++) { ?>
                        <option value="{$i}" {if condition="$Request.param.query_year eq $i"}selected{/if}>{$i}</option>
                        <?php } ?>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt></dt>
                <dd></dd>
            </dl>
            <div class="btn_group">
                <a href="javascript:document.formSearch.submit();" class="btn " title="">{$Think.lang.ds_query}</a>
                {if $filtered}
                <a href="{:url('Bill/index')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                {/if}
                <a class="btn" href="javascript:export_xls('{:url('Bill/export_js_step1')}')"><span>{$Think.lang.ds_export}Excel</span></a>
            </div>
        </div>
    </form>
    
  <div class="explanation" id="explanation">
      <div class="title" id="checkZoom">
          <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
          <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
      </div>
      <ul>
          <li>{$Think.lang.bill_index_hlpe1}</li>
      </ul>
  </div>
    
    
    
    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th>{$Think.lang.ds_order_sn}{$Think.lang.bill_order}（{$Think.lang.ds_month}）</th>
                <th class="align-center">{$Think.lang.order_price_from}</th>
                <th class="align-center">{$Think.lang.order_total_transport}</th>
                <th class="align-center">{$Think.lang.bill_os_commis_totals}</th>
                <th class="align-center">{$Think.lang.bill_os_order_returntotals}</th>
                <th class="align-center">{$Think.lang.bill_os_commis_returntotals}</th>
                <th class="align-center">{$Think.lang.bill_os_store_costtotals}</th>
                <th class="align-center">{$Think.lang.ob_inviter_totals}</th>
                <th class="align-center">{$Think.lang.bill_os_result_totals}</th>
                <th class="align-center">{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        <tbody>
            {notempty name="bill_list"}
            {foreach name="bill_list" item="bill"}
            <tr class="hover">
                <td>
                    <?php echo substr($bill['os_month'],0,4).'-'.substr($bill['os_month'],4);?>
                </td>
                <td class="align-center">{$bill.os_order_totals}</td>
                <td class="align-center">{$bill.os_shipping_totals}</td>
                <td class="align-center">{$bill.os_commis_totals}</td>
                <td class="align-center">{$bill.os_order_returntotals}</td>
                <td class="align-center">{$bill.os_commis_returntotals}</td>
                <td class="align-center">{$bill.os_store_costtotals}</td>
                <td class="align-center">{$bill.os_inviter_totals}</td>
                <td class="align-center">{$bill.os_result_totals}</td>
                <td class="align-center">
                    <a href="{:url('Bill/show_statis',['os_month'=>$bill.os_month])}" class="dsui-btn-view"><i class="iconfont"></i>{$Think.lang.ds_view}</a>
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="no_data">
                <td colspan="15">{$Think.lang.ds_no_record}</td>
            </tr>
            {/notempty}
        </tbody>
        {notempty name="bill_list"}
        <tfoot>
            <tr class="tfoot">
                <td colspan="15" id="dataFuncs">{$show_page|raw}</td>
            </tr>
        </tfoot>
        {/notempty}
    </table>
</div>
<script type="text/javascript">
    $(function() {
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>