- 注册时间
- 2012-7-5
- 最后登录
- 2012-11-6
- 阅读权限
- 10
- 积分
- 28
- 精华
- 0
- 帖子
- 5
|
- <div id="datagrid1" class="mini-datagrid" style="width:100%;height:550px;overflow-y:scroll; "
- allowResize="false"
- url="mu.php?for=order&act=list"
- idField="id"
- allowAlternating="true"
- pageSize="20"
- >
- <div property="columns">
- <div field="id" width="30" type="indexcolumn" align="center" headerAlign="center">#</div>
- <div field="ord_sn" width="100" headerAlign="center" allowSort="false">订单编号</div>
- <div field="ord_price" width="60" headerAlign="center" allowSort="true">订单总额</div>
- <div field="ord_status" width="100" headerAlign="center" allowSort="false">订单状态</div>
- <div field="ord_time" width="80" headerAlign="center" dateFormat="yyyy-M-d H:mm:ss" allowSort="true">成交时间</div>
- <div field="handle" width="60" align="center" headerAlign="center">操作</div>
- </div>
- </div>
- <div id="win1" class="mini-window" style="width:800px;height:500px;"
- showMaxButton="true"
- allowResize="false" allowDrag="true"
- >
- 载入中...
- </div>
- <script type="text/javascript">
- mini.parse();
-
- var grid = mini.get("datagrid1");
- grid.load();
- //grid.sortBy("price", "desc");
-
- var win = mini.get("win1");
- function orderClick(action, id)
- {
- win.set({
- title: "订单详情",
- url: "order.php?act=" + action + "&id=" + id
- });
- win.show();
- }
- grid.on("drawcell", function (e) {
-
- var record = e.record,
- column = e.column,
- field = e.field,
- value = e.value;
-
- if (field == "handle") {
- e.cellStyle = "text-align:center";
- e.cellHtml = '<a href="javascript:orderClick(\'edit\', \'' + record.id + '\')">修改</a> ';
- e.cellHtml += '<a href="javascript:orderClick(\'view\', \'' + record.id + '\')">详细</a> ';
- }
-
- });
- </script>
复制代码
|
|