日期:2014-05-16  浏览次数:20356 次

easyui中datagrid的刷新和使用
代码如下,能正确初始化页面,但查询时只输出了json数据。 请大神看看哪里错了?
---------页面代码
<form name="f1" action="outlets_init.php"  method="post" >
<input type="text" class="easyui-datebox" id="bt" name="bt" value=<?php echo date('Y-m-d',strtotime('-7 day'))?>>
--to--<input type="text" class="easyui-datebox" id="et" name='et' value=<?php echo date('Y-m-d',time())?>>
<input type="submit"  value="go"  >
</form>
<br>
<p>default show last 7 days</p>
<br>
<div id="showR"  >

</div>
<div id="initD" style="display: display">
<table id="xxoo" class="easyui-datagrid" title="outlets_daily_sales" style="width:890px;height:auto"
            data-options="
                singleSelect: true,
                url: 'outlets_init.php',
                 rowStyler: function(index,row){
                    if (row.outdate == 'TOTAL'){
                        return 'background-color:#6293BB;color:#fff;font-weight:bold;';
                    }
                }
            ">
        <thead>
            <tr>
                <th data-options="field:'outdate',width:80">outdate</th>
                <th data-options="field:'Qingpu',width:80">Qingpu</th>
                <th data-options="field:'Wuxi',width:80">Wuxi</th>
                <th data-options="field:'Foxtown',width:80">Foxtown</th>
                <th data-options="field:'Suzhou',width:80">Suzhou</th>
                <th data-options="field:'Beijing',width:60">Beijing</th>
                 <th data-options="field:'Shenyang',width:80">Shenyang</th>
                <th data-options="field:'Xiamen',width:80">Xiamen</th>
                <th data-options="field:'Chongqing',width:80">Chongqing</th>
     &nb