| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <include file="public@header"/>
- <style>
- .count {
- margin: 1rem auto;
- }
- .count span {
- margin-right: 1rem;
- }
- .count span em {
- font-style: normal;
- color: red;
- }
- </style>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li class="active"><a>订单列表</a></li>
- </ul>
- <form class="well form-inline margin-top-20" method="post" action="{:url('order/index')}">
- <select class="form-control" name="status" id="status">
- <option value="0">全部</option>
- <option value="1" <if condition="$status == 1">selected</if>>待发货</option>
- <option value="2" <if condition="$status == 2">selected</if>>已发货</option>
- <option value="3" <if condition="$status == 3">selected</if>>已完成</option>
- </select>
- <input type="text" class="form-control js-bootstrap-date" name="start_time"
- value="{$start_time|default=''}"
- style="width: 140px;" autocomplete="off" placeholder="开始时间">-
- <input type="text" class="form-control js-bootstrap-date" name="end_time"
- value="{$end_time|default=''}"
- style="width: 140px;" autocomplete="off" placeholder="结束时间">
- 关键字:
- <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
- placeholder="下单人名称/订单号">
- <input type="submit" class="btn btn-primary" value="搜索"/>
- <a class="btn btn-default" href="{:url('order/index')}">清空</a>
- <a class="btn btn-warning" href="{:url('order/export')}">导出</a>
- <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
- </form>
- <div class="count">
- <span >订单数:{$counts.count|default='0'}</span>
- <span>总收入:<em>{$counts.total|default='0.00'} 元</em></span>
- <span><php> echo date('Y'); </php>年收入:<em>{$counts.year|default='0.00'} 元</em></span>
- <span><php> echo date('Y'); </php>年第<php> echo ceil(date('m')/3);</php>季度收入:<em>{$counts.quarter|default='0.00'} 元</em></span>
- <span><php> echo date('Y年m月'); </php>收入:<em>{$counts.month|default='0.00'} 元</em></span>
- </div>
- <form method="post" class="js-ajax-form">
- <table class="table table-hover table-bordered">
- <thead>
- <tr>
- <th><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
- <th width="100">订单号</th>
- <th width="80">下单人名称</th>
- <th>商品</th>
- <th>积分价格</th>
- <th>数量</th>
- <th width="60">总价</th>
- <th width="60">支付方式</th>
- <th width="80">收货信息</th>
- <th width="60">备注</th>
- <th width="120">兑换时间</th>
- <th>{:lang('STATUS')}</th>
- <th width="100">{:lang('ACTIONS')}</th>
- </tr>
- </thead>
- <tbody>
- <php>
- $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
- </php>
- <foreach name="list" item="vo">
- <tr>
- <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
- value="{$vo.id}" title="ID:{$vo.id}"></td>
- <td>{$vo['order_sn']?$vo['order_sn']:''}</td>
- <td>{$vo['real_name']?$vo['real_name']:''}</td>
- <td>
- <a href="javascript:imagePreviewDialog('{:cmf_get_image_preview_url($vo.thumb)}');">
- <img src="{:cmf_get_image_preview_url($vo.thumb)}" alt="" width="48" height="48">
- <p>{$vo['goods_name']?$vo['goods_name']:''}</p>
- </a>
- </td>
- <td>{$vo['score']?$vo['score']:0.00}</td>
- <td>{$vo['nums']?$vo['nums']:0}</td>
- <td>{$vo['total']?$vo['total']:0}</td>
- <td>
- <switch name="vo.pay_type">
- <case value="1">
- 积分
- </case>
- <case value="2">
- 余额
- </case>
- </switch>
- </td>
- <!--<td>{$vo['contact_name']?$vo['contact_name']:lang('NOT_FILLED')}</td>-->
- <td>{$vo['realname']} {$vo['mobile']} {$vo['address']}</td>
- <td>{$vo['remark']}</td>
- <td>{$vo['created_at']?$vo['created_at']:lang('NOT_FILLED')}</td>
- <td>
- <switch name="vo.status">
- <case value="1">
- <span class="text-success">待发货</span>
- </case>
- <case value="2">
- <span class="text-danger">已发货</span>
- </case>
- <case value="3">
- <span class="text-danger">已完成</span>
- </case>
- </switch>
- </td>
- <td>
- <if condition="$vo.status == 1">
- <a class="btn btn-xs btn-success" onclick="send('{$vo.id}')">发货</a>
- </if>
- <a class="btn btn-xs btn-danger js-ajax-dialog-btn"
- href="{:url('order/del',array('id'=>$vo['id']))}"
- data-msg="确认删除该兑换记录?">删除</a>
- </td>
- </tr>
- </foreach>
- </tbody>
- </table>
- <div class="pagination">{$page}</div>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script>
- function reloadPage(win) {
- win.location.reload();
- }
- $(function () {
- setCookie("refersh_time", 3);
- Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
- //批量冻结
- $('#js-batch-delete').click(function (e) {
- var ids = [];
- $("input[name='ids[]']").each(function () {
- if ($(this).is(':checked')) {
- ids.push($(this).val());
- }
- });
- if (ids.length == 0) {
- return false;
- }
- ids = ids.join(',');
- });
- //end
- });
- });
- </script>
- <script>
- function doDelete() {
- // Wind.use('artDialog', function () {
- var ids = [];
- $(".js-check:checked").each(function () {
- var id = $(this).val();
- if (id > 0) {
- ids.push(id);
- }
- });
- if (ids.length <= 0) {
- showMsg('请先选择操作项');
- return false;
- }
- if (confirm('确定批量删除选择项?不可恢复')) {
- $.post('/admin/order/del', {id: ids}, function (res) {
- if (res.code == 1) {
- showMsg(res.msg);
- setTimeout(function () {
- location.reload();
- }, 800)
- } else {
- showMsg(res.msg);
- }
- }, "json")
- }
- }
- /**
- * 发货
- * @param id
- */
- function send(id){
- var remark = prompt('确认发货?请填写发货信息,如:快递单号等');
- if(id>0 && remark){
- $.post('/admin/order/send', {id: id, remark: remark}, function (res) {
- if (res.code == 'success') {
- showMsg(res.message);
- setTimeout(function(){
- location.reload();
- }, 500)
- }else {
- showMsg(res.message);
- }
- },"json");
- }
- }
- </script>
- </body>
- </html>
|