作者 徐治堂

'订单模块差快递查询与退款,商品模块商品分类完成,商品刚开始写'

  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: wz
  5 + * Date: 2018/9/26
  6 + * Time: 14:29
  7 + */
  8 +
  9 +namespace app\admin\controller;
  10 +
  11 +
  12 +use cmf\controller\AdminBaseController;
  13 +use think\Db;
  14 +
  15 +class ZjGoodsController extends AdminBaseController
  16 +{
  17 + /**
  18 + * 商品列表
  19 + */
  20 + public function index(){
  21 + $where['g.delete_time']=0;
  22 + $param=[];
  23 + if ($this->request->param()){
  24 + $param=input('param.');
  25 + if (!empty($param['cate'])){
  26 + $where['ca.id']=$param['cate'];
  27 + }
  28 + }
  29 +
  30 + $all=Db::name('zj_goods')->alias('g')->join('zj_category c','g.cid=c.id')->join('zj_category ca','c.cid=ca.id')
  31 + ->where($where)->field('g.*,c.name as cname,ca.name as caname')->order('create_time','desc')->paginate(15);
  32 +
  33 + $all->appends($param);
  34 + $this->assign('all',$all->items());
  35 + $this->assign('page',$all->render());
  36 + return $this->fetch();
  37 + }
  38 +
  39 + /**
  40 + * 商品分类列表
  41 + */
  42 + public function category(){
  43 + $all=Db::name('zj_category')->alias('c')->join('zj_category ca','c.cid=ca.id','left')
  44 + ->field('c.*,ca.name as cname')->where('c.delete_time','0')->select();
  45 + $this->assign('all',$all);
  46 + return $this->fetch();
  47 + }
  48 +
  49 + /**
  50 + * 添加商品分类
  51 + */
  52 + public function addCate(){
  53 + $all=Db::name('zj_category')->where('grade','1')->select();
  54 + $this->assign('all',$all);
  55 + return $this->fetch();
  56 + }
  57 + /**
  58 + * 添加商品分类提交
  59 + */
  60 + public function addCatePost(){
  61 + if ($this->request->param()){
  62 + $param=input('param.');
  63 + $param['create_time']=time();
  64 + $add=Db::name('zj_category')->insert($param);
  65 + if (empty($add)){
  66 + $this->error('添加分类失败');
  67 + }else{
  68 + $this->success('添加分类成功');
  69 + }
  70 + }
  71 + }
  72 +
  73 + /**
  74 + * 编辑分类
  75 + */
  76 + public function editCate(){
  77 + if ($this->request->param()){
  78 + $param=input('param.id');
  79 + $one=Db::name('zj_category')->where('id',$param)->find();
  80 + $all=Db::name('zj_category')->where('grade','1')->select();
  81 + $this->assign('all',$all);
  82 + $this->assign('one',$one);
  83 + return $this->fetch();
  84 + }
  85 + }
  86 + /**
  87 + * 编辑分类提交
  88 + */
  89 + public function editCatePost(){
  90 + if ($this->request->param()){
  91 + $param=input('param.');
  92 + $edit=Db::name('zj_category')->update($param);
  93 + if (empty($edit)){
  94 + $this->error('保存失败');
  95 + }else{
  96 + $this->success('保存成功');
  97 + }
  98 + }
  99 + }
  100 + /**
  101 + * 删除分类
  102 + */
  103 + public function delCate(){
  104 + if ($this->request->isAjax()){
  105 + $param=input('param.id');
  106 + $edit=Db::name('zj_category')->where(['id'=>$param,'grade'=>'2'])->update(['delete_time'=>time()]);
  107 + if (empty($edit)){
  108 + $this->error('删除失败');
  109 + }else{
  110 + $this->success('删除成功');
  111 + }
  112 + }
  113 + }
  114 +}
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: wz
  5 + * Date: 2018/9/25
  6 + * Time: 11:29
  7 + */
  8 +
  9 +namespace app\admin\controller;
  10 +
  11 +
  12 +use cmf\controller\AdminBaseController;
  13 +use think\Db;
  14 +
  15 +class ZjOrderController extends AdminBaseController
  16 +{
  17 + /**
  18 + * 订单列表
  19 + */
  20 + public function index(){
  21 + $where['o.delete_time']=0;
  22 + $arr=[];
  23 + $where1=[];
  24 + if ($this->request->param()){
  25 + $arr=input('param.');
  26 + if (!empty($arr['uid'])){
  27 + $where['o.uid']=$arr['uid'];
  28 + }
  29 + if (!empty($arr['step'])){
  30 + $where['o.step']=$arr['step'];
  31 + }
  32 + if (!empty($arr['num'])){
  33 + $where['o.order_num']=$arr['num'];
  34 + }
  35 + if (!empty($arr['name'])){
  36 + $where['o.name']=$arr['name'];
  37 + }
  38 + if (!empty($arr['mobile'])){
  39 + $where['o.mobile']=$arr['mobile'];
  40 + }
  41 + if (!empty($arr['start_time'])){
  42 + $where['o.create_time']=['egt',strtotime($arr['start_time'])];
  43 + }
  44 + if (!empty($arr['end_time'])){
  45 + $where1['o.create_time']=['elt',strtotime($arr['end_time'])];
  46 + }
  47 + }
  48 + $all=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where($where)->where($where1)
  49 + ->order('create_time','desc')->field('o.*,u.user_nickname')->paginate(15);
  50 + $all->appends($arr);
  51 + $this->assign('start_time', !empty($arr['start_time']) ? $arr['start_time'] : '');
  52 + $this->assign('end_time', !empty($arr['end_time']) ? $arr['end_time'] : '');
  53 + $this->assign('uid',!empty($arr['uid'])?$arr['uid']:'');
  54 + $this->assign('step',!empty($arr['step'])?$arr['step']:'');
  55 + $this->assign('num',!empty($arr['num'])?$arr['num']:'');
  56 + $this->assign('name',!empty($arr['name'])?$arr['name']:'');
  57 + $this->assign('mobile',!empty($arr['mobile'])?$arr['mobile']:'');
  58 + $this->assign('page',$all->render());
  59 + $this->assign('all',$all->items());
  60 + return $this->fetch();
  61 + }
  62 +
  63 + /**
  64 + * 订单详情
  65 + */
  66 + public function detail(){
  67 + if ($this->request->param()){
  68 + $id=input('param.id');
  69 + $url=input('param.sta');
  70 + if ($url==1){
  71 + $url=url('index');
  72 + }elseif ($url==2){
  73 + $url=url('backlog');
  74 + }
  75 + $one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->join('zj_kd k','o.kid=k.id','left')
  76 + ->where('o.id',$id)->field('o.*,u.user_nickname,k.name as kname')->find();
  77 + $kd=Db::name('zj_kd')->select();
  78 + $all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$id)
  79 + ->field('g.name,og.num')->select();
  80 + $this->assign('kd',$kd);
  81 + $this->assign('url',$url);
  82 + $this->assign('one',$one);
  83 + $this->assign('all',$all);
  84 + return $this->fetch();
  85 + }
  86 + }
  87 + /**
  88 + * 订单详情修改提交
  89 + */
  90 + public function detailPost(){
  91 + if ($this->request->param()){
  92 + $param=input('param.');
  93 + $edit=Db::name('zj_order')->update($param);
  94 + if (empty($edit)){
  95 + $this->error('修改失败');
  96 + }else{
  97 + $this->success('修改成功');
  98 + }
  99 + }
  100 + }
  101 +
  102 +
  103 + /**
  104 + * 待处理订单列表
  105 + */
  106 + public function backlog(){
  107 + $where['o.delete_time']=0;
  108 + $arr=[];
  109 + $where1['o.step']=['in',['2','6','8']];
  110 + if ($this->request->param()){
  111 + $arr=input('param.');
  112 + if (!empty($arr['uid'])){
  113 + $where['o.uid']=$arr['uid'];
  114 + }
  115 + if (!empty($arr['step'])){
  116 + $where['o.step']=$arr['step'];
  117 + }
  118 + if (!empty($arr['num'])){
  119 + $where['o.order_num']=$arr['num'];
  120 + }
  121 + if (!empty($arr['name'])){
  122 + $where['o.name']=$arr['name'];
  123 + }
  124 + if (!empty($arr['mobile'])){
  125 + $where['o.mobile']=$arr['mobile'];
  126 + }
  127 + if (!empty($arr['start_time'])){
  128 + $where['o.create_time']=['egt',strtotime($arr['start_time'])];
  129 + }
  130 + if (!empty($arr['end_time'])){
  131 + $where1['o.create_time']=['elt',strtotime($arr['end_time'])];
  132 + }
  133 + }
  134 + $all=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where($where)->where($where1)
  135 + ->order('create_time','desc')->field('o.*,u.user_nickname')->paginate(15);
  136 + $all->appends($arr);
  137 + $this->assign('start_time', !empty($arr['start_time']) ? $arr['start_time'] : '');
  138 + $this->assign('end_time', !empty($arr['end_time']) ? $arr['end_time'] : '');
  139 + $this->assign('uid',!empty($arr['uid'])?$arr['uid']:'');
  140 + $this->assign('step',!empty($arr['step'])?$arr['step']:'');
  141 + $this->assign('num',!empty($arr['num'])?$arr['num']:'');
  142 + $this->assign('name',!empty($arr['name'])?$arr['name']:'');
  143 + $this->assign('mobile',!empty($arr['mobile'])?$arr['mobile']:'');
  144 + $this->assign('page',$all->render());
  145 + $this->assign('all',$all->items());
  146 + return $this->fetch();
  147 + }
  148 + /**
  149 + * 订单发货
  150 + */
  151 + public function fahuo(){
  152 + if ($this->request->param()){
  153 + $param=input('param.id');
  154 + //获取订单数据
  155 + $one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')
  156 + ->where('o.id',$param)->field('o.*,u.user_nickname')->find();
  157 + //获取快递公司数据
  158 + $kd=Db::name('zj_kd')->select();
  159 + //获取订单商品
  160 + $all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$param)
  161 + ->field('g.name,og.num')->select();
  162 + if ($one['step']>2){
  163 + echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单已发货</p></div>";
  164 + }elseif ($one['step']==1){
  165 + echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单未支付</p></div>";
  166 + }else{
  167 + $this->assign('kd',$kd);
  168 + $this->assign('one',$one);
  169 + $this->assign('all',$all);
  170 + return $this->fetch();
  171 + }
  172 + }
  173 + }
  174 + /**
  175 + * 订单发货提交
  176 + */
  177 + public function fhPost(){
  178 + if ($this->request->param()){
  179 + $param=input('param.');
  180 + if (empty($param['kd_num'])){
  181 + $this->error('快递单号不能为空');
  182 + }
  183 + $param['step']=3;
  184 + $edit=Db::name('zj_order')->update($param);
  185 + if (empty($edit)){
  186 + $this->error('订单状态更新失败');
  187 + }else{
  188 + $this->success('订单状态更新成功');
  189 + }
  190 + }
  191 + }
  192 + /**
  193 + * 订单退款审核
  194 + */
  195 + public function check(){
  196 + if ($this->request->param()){
  197 + $param=input('param.id');
  198 + //获取订单数据
  199 + $one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where('o.id',$param)
  200 + ->field('o.*,u.user_nickname')->find();
  201 + //获取订单商品
  202 + $all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$param)
  203 + ->field('g.name,g.price,og.num')->select();
  204 + if ($one['step']<6){
  205 + echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单未退货</p></div>";
  206 + }elseif ($one['step']>6){
  207 + echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>退款审核通过</p></div>";
  208 + }else{
  209 + $this->assign('one',$one);
  210 + $this->assign('all',$all);
  211 + return $this->fetch();
  212 + }
  213 + }
  214 + }
  215 +
  216 + /**
  217 + * 订单退款审核提交
  218 + */
  219 + public function checkPost(){
  220 + if ($this->request->param()){
  221 + $param=input('param.');
  222 + //判断审核是否通过
  223 + if (!empty($param['sta'])){
  224 + $param['step']=5;
  225 + unset($param['sta']);
  226 + $edit=Db::name('zj_order')->update($param);
  227 + }else{
  228 + $param['step']=7;
  229 + $edit=Db::name('zj_order')->update($param);
  230 + }
  231 + if (empty($edit)){
  232 + $this->error('订单状态更新失败');
  233 + }else{
  234 + $this->success('订单状态更新成功');
  235 + }
  236 + }
  237 + }
  238 + /**
  239 + * 订单退款
  240 + */
  241 + public function refund(){
  242 + if ($this->request->param()){
  243 + $param=input('param.id');
  244 + //获取订单数据
  245 + $one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where('o.id',$param)
  246 + ->field('o.*,u.user_nickname')->find();
  247 + //获取订单商品
  248 + $all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$param)
  249 + ->field('g.name,g.price,og.num')->select();
  250 + if ($one['step']>8){
  251 + echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单已退款</p></div>";
  252 + }elseif ($one['step']<8){
  253 + echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单状态错误</p></div>";
  254 + }else{
  255 + $this->assign('one',$one);
  256 + $this->assign('all',$all);
  257 + return $this->fetch();
  258 + }
  259 + }
  260 + }
  261 + /**
  262 + * 订单退款提交
  263 + */
  264 + public function refundPost(){
  265 + if ($this->request->param()){
  266 + $param=input('param.');
  267 + if ($param['tui']<=0){
  268 + $this->error('退款金额需大于0');
  269 + }
  270 +
  271 + $param['step']=9;
  272 + unset($param['tui']);//删除无用数据
  273 + $edit=Db::name('zj_order')->update($param);
  274 + if (empty($edit)){
  275 + $this->error('订单退款失败');
  276 + }else{
  277 + $this->success('订单退款成功');
  278 + }
  279 + }
  280 + }
  281 +
  282 +}
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li><a href="{:url('category')}">分类列表</a></li>
  7 + <li class="active"><a href="{:url('addCate')}">添加分类</a></li>
  8 + </ul>
  9 + <div class="row margin-top-20">
  10 + <div class="col-md-5">
  11 + <form class="js-ajax-form" action="{:url('addCatePost')}" method="post">
  12 + <div class="tab-content">
  13 + <div class="tab-pane active" id="A">
  14 + <div class="form-group">
  15 + <label for="name"><span class="form-required">*</span>分类名称</label>
  16 + <div>
  17 + <input type="text" class="form-control" placeholder="请输入名称" id="name" name="name" maxlength="10" required>
  18 + </div>
  19 + </div>
  20 + <div class="form-group">
  21 + <label for="name">分类简介</label>
  22 + <div>
  23 + <input type="text" name="intro" maxlength="100" class="form-control" placeholder="请输入简介">
  24 + </div>
  25 + </div>
  26 + <div class="form-group">
  27 + <label><span class="form-required">*</span>所属分类</label>
  28 + <div>
  29 + <select class="form-control" name="cid">
  30 + <foreach name="all" item="vo">
  31 + <option value="{$vo.id}">{$vo.name}</option>
  32 + </foreach>
  33 + </select>
  34 + </div>
  35 + </div>
  36 + </div>
  37 + </div>
  38 + <div class="form-group">
  39 + <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
  40 + <a class="btn btn-default" href="{:url('category')}">{:lang('BACK')}</a>
  41 + </div>
  42 + </form>
  43 + </div>
  44 + </div>
  45 +</div>
  46 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  47 +</body>
  48 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">分类列表</a></li>
  7 + <li><a href="{:url('addCate')}">添加分类</a></li>
  8 + </ul>
  9 + <form method="post" class="js-ajax-form">
  10 + <table class="table table-hover table-bordered">
  11 + <thead>
  12 + <tr>
  13 + <th>id</th>
  14 + <th>名称</th>
  15 + <th>简介</th>
  16 + <th>父级分类</th>
  17 + <!--<th>分类图片</th>-->
  18 + <th>创建时间</th>
  19 + <th style="width: 100px;">操作</th>
  20 + </tr>
  21 + </thead>
  22 + <tbody>
  23 + <foreach name="all" item="vo">
  24 + <tr>
  25 + <td>{$vo.id}</td>
  26 + <td>{$vo.name}</td>
  27 + <td>{$vo.intro}</td>
  28 + <td>
  29 + <if condition="$vo.cid eq 0">
  30 + 一级分类,无父级
  31 + <else>
  32 + {$vo.cname}
  33 + </if>
  34 + </td>
  35 + <!--<td>-->
  36 + <!--<if condition="$vo.grade eq 2">-->
  37 + <!--二级分类无图片-->
  38 + <!--<else>-->
  39 + <!--<a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.more)}');">-->
  40 + <!--<i class="fa fa-photo fa-fw"></i>-->
  41 + <!--</a>-->
  42 + <!--</if>-->
  43 + <!--</td>-->
  44 + <td>{:date('Y-m-d H:i',$vo.create_time)}</td>
  45 + <td>
  46 + <a href="{:url('editCate',array('id'=>$vo['id']))}">编辑</a>
  47 + <if condition="$vo.grade eq 2">
  48 + <a href="{:url('delCate',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确定删除分类">删除</a>
  49 + </if>
  50 + </td>
  51 + </tr>
  52 + </foreach>
  53 + </tbody>
  54 + </table>
  55 + </form>
  56 +</div>
  57 +<script src="__STATIC__/js/admin.js"></script>
  58 +</body>
  59 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li><a href="{:url('category')}">分类列表</a></li>
  7 + <li><a href="{:url('addCate')}">添加分类</a></li>
  8 + <li class="active"><a href="javascript:;">编辑分类</a></li>
  9 + </ul>
  10 + <div class="row margin-top-20">
  11 + <div class="col-md-5">
  12 + <form class="js-ajax-form" action="{:url('editCatePost')}" method="post">
  13 + <div class="tab-content">
  14 + <div class="tab-pane active" id="A">
  15 + <div class="form-group">
  16 + <label for="name"><span class="form-required">*</span>分类名称</label>
  17 + <div>
  18 + <input type="text" class="form-control" placeholder="请输入名称" id="name" value="{$one.name}" name="name" maxlength="10" required>
  19 + </div>
  20 + </div>
  21 + <div class="form-group">
  22 + <label for="name">分类简介</label>
  23 + <div>
  24 + <input type="text" name="intro" maxlength="100" class="form-control" value="{$one.intro}" placeholder="请输入简介">
  25 + </div>
  26 + </div>
  27 + <if condition="$one.grade eq 2">
  28 + <div class="form-group">
  29 + <label><span class="form-required">*</span>所属分类</label>
  30 + <div>
  31 + <select class="form-control" name="cid">
  32 + <foreach name="all" item="vo">
  33 + <option value="{$vo.id}" <eq name="$vo.id" value="$one.cid"> selected </eq>>{$vo.name}</option>
  34 + </foreach>
  35 + </select>
  36 + </div>
  37 + </div>
  38 + </if>
  39 +
  40 + </div>
  41 + </div>
  42 + <div class="form-group">
  43 + <input type="hidden" name="id" value="{$one.id}">
  44 + <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
  45 + <a class="btn btn-default" href="{:url('category')}">{:lang('BACK')}</a>
  46 + </div>
  47 + </form>
  48 + </div>
  49 + </div>
  50 +</div>
  51 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  52 +</body>
  53 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">商品列表</a></li>
  7 + </ul>
  8 + <form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
  9 + id:
  10 + <input class="form-control" type="text" name="id" style="width: 200px;" value="{$id|default=''}"
  11 + placeholder="请输入id">
  12 + 一级分类:
  13 + <select name="step" class="form-control" style="width: 120px;">
  14 + <option value>选择分类</option>
  15 + </select>
  16 + 二级分类:
  17 + <select name="step" class="form-control" style="width: 120px;">
  18 + <option value>选择分类</option>
  19 + </select>
  20 + 商品名称:
  21 + <input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
  22 + placeholder="请输入商品名称">
  23 + 单价:
  24 + <input class="form-control" type="number" name="min" style="width: 200px;" value="{$min|default=''}"
  25 + placeholder="请输入最低价">-
  26 + <input class="form-control" type="number" name="max" style="width: 200px;" value="{$max|default=''}"
  27 + placeholder="请输入最高价">
  28 + <br/>
  29 + 商品状态:
  30 + <select name="zt" class="form-control" style="width: 120px;">
  31 + <option value>选择状态</option>
  32 + <option value="1">上架</option>
  33 + <option value="2">下架</option>
  34 + <option value="3">推荐</option>
  35 + <option value="4">未推荐</option>
  36 + </select>
  37 + <input type="hidden" name="uid" value="{$uid|default=''}">
  38 + <input type="submit" class="btn btn-primary" value="搜索"/>
  39 + <a class="btn btn-danger" href="{:url('index')}">清空</a>
  40 + </form>
  41 + <form method="post" class="js-ajax-form">
  42 + <table class="table table-hover table-bordered">
  43 + <thead>
  44 + <tr>
  45 + <th>id</th>
  46 + <th>一级分类</th>
  47 + <th>二级分类</th>
  48 + <th>添加时间</th>
  49 + <th>积分售价</th>
  50 + <th>金额售价</th>
  51 + <th>总价</th>
  52 + <th>商品状态</th>
  53 + <th>操作</th>
  54 + </tr>
  55 + </thead>
  56 + <tbody>
  57 + <foreach name="all" item="vo">
  58 + <tr>
  59 + <td>{$vo.id}</td>
  60 + <td>{$vo.caname}</td>
  61 + <td>{$vo.cname}</td>
  62 + <td>{:date('Y-m-d H:i'$vo.create_time)}</td>
  63 + <td>
  64 + <if condition="$vo.price_num eq 0">
  65 +
  66 + </if>
  67 + {$vo.price+num}
  68 + </td>
  69 + <td>{$vo.id}</td>
  70 + <td>{$vo.id}</td>
  71 + <td>{$vo.id}</td>
  72 + </tr>
  73 + </foreach>
  74 + </tbody>
  75 + </table>
  76 + <div class="pagination">{$page}</div>
  77 + </form>
  78 +</div>
  79 +<script src="__STATIC__/js/admin.js"></script>
  80 +</body>
  81 +</html>
@@ -14,13 +14,13 @@ @@ -14,13 +14,13 @@
14 <div class="form-group"> 14 <div class="form-group">
15 <label for="title"><span class="form-required">*</span>消息标题</label> 15 <label for="title"><span class="form-required">*</span>消息标题</label>
16 <div> 16 <div>
17 - <input type="text" class="form-control" placeholder="请输入标题" id="title" name="title" maxlength="30"> 17 + <input type="text" class="form-control" placeholder="请输入标题" id="title" name="title" maxlength="30" required>
18 </div> 18 </div>
19 </div> 19 </div>
20 <div class="form-group"> 20 <div class="form-group">
21 <label for="title"><span class="form-required">*</span>消息内容</label> 21 <label for="title"><span class="form-required">*</span>消息内容</label>
22 <div> 22 <div>
23 - <textarea class="form-control" name="content" 23 + <textarea class="form-control" name="content" required
24 placeholder="请输入内容(最多252字)" maxlength="252"></textarea> 24 placeholder="请输入内容(最多252字)" maxlength="252"></textarea>
25 </div> 25 </div>
26 </div> 26 </div>
@@ -15,13 +15,13 @@ @@ -15,13 +15,13 @@
15 <div class="form-group"> 15 <div class="form-group">
16 <label for="title"><span class="form-required">*</span>消息标题</label> 16 <label for="title"><span class="form-required">*</span>消息标题</label>
17 <div> 17 <div>
18 - <input type="text" class="form-control" placeholder="请输入标题" value="{$one.title}" id="title" name="title" maxlength="30"> 18 + <input type="text" required class="form-control" placeholder="请输入标题" value="{$one.title}" id="title" name="title" maxlength="30">
19 </div> 19 </div>
20 </div> 20 </div>
21 <div class="form-group"> 21 <div class="form-group">
22 <label for="title"><span class="form-required">*</span>消息内容</label> 22 <label for="title"><span class="form-required">*</span>消息内容</label>
23 <div> 23 <div>
24 - <textarea class="form-control" name="content" 24 + <textarea class="form-control" name="content" required
25 placeholder="请输入内容(最多252字)" maxlength="252">{$one.content}</textarea> 25 placeholder="请输入内容(最多252字)" maxlength="252">{$one.content}</textarea>
26 </div> 26 </div>
27 </div> 27 </div>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">待处理订单</a></li>
  7 + </ul>
  8 + <form class="well form-inline margin-top-20" method="post" action="{:url('backlog')}">
  9 + 订单号:
  10 + <input class="form-control" type="text" name="num" style="width: 200px;" value="{$num|default=''}"
  11 + placeholder="请输入订单号">
  12 + 订单状态:
  13 + <select name="step" class="form-control" style="width: 120px;">
  14 + <option value>订单状态</option>
  15 + <option value="1" <eq name="$step" value="1"> selected </eq> >待支付</option>
  16 + <option value="2" <eq name="$step" value="2"> selected </eq> >待发货</option>
  17 + <option value="3" <eq name="$step" value="3"> selected </eq> >待收货</option>
  18 + <option value="4" <eq name="$step" value="4"> selected </eq> >待评论</option>
  19 + <option value="5" <eq name="$step" value="5"> selected </eq> >已完成</option>
  20 + <option value="6" <eq name="$step" value="6"> selected </eq> >待审核</option>
  21 + <option value="7" <eq name="$step" value="7"> selected </eq> >待退货</option>
  22 + <option value="8" <eq name="$step" value="8"> selected </eq> >待退款</option>
  23 + <option value="9" <eq name="$step" value="9"> selected </eq> >已退款</option>
  24 + </select>
  25 + 收货人:
  26 + <input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
  27 + placeholder="请输入收货姓名">
  28 + 手机号:
  29 + <input class="form-control" type="number" name="mobile" style="width: 200px;" value="{$mobile|default=''}"
  30 + placeholder="请输入收货手机号">
  31 + 下单时间:
  32 + <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
  33 + value="{$start_time|default=''}"
  34 + style="width: 140px;" autocomplete="off">-
  35 + <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
  36 + value="{$end_time|default=''}"
  37 + style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
  38 + <input type="hidden" name="uid" value="{$uid|default=''}">
  39 + <input type="submit" class="btn btn-primary" value="搜索"/>
  40 + <a class="btn btn-danger" href="{:url('backlog')}">清空</a>
  41 + </form>
  42 + <form method="post" class="js-ajax-form">
  43 + <table class="table table-hover table-bordered">
  44 + <thead>
  45 + <tr>
  46 + <th>订单号</th>
  47 + <th>下单用户</th>
  48 + <th>收货人</th>
  49 + <th>收货手机号</th>
  50 + <th>收货地址</th>
  51 + <th>下单时间</th>
  52 + <th>支付方式</th>
  53 + <th>订单状态</th>
  54 + <th>订单金额</th>
  55 + <th>订单积分</th>
  56 + <th>操作</th>
  57 + </tr>
  58 + </thead>
  59 + <tbody>
  60 + <foreach name="all" item="vo">
  61 + <tr>
  62 + <td>{$vo.order_num}</td>
  63 + <td>{$vo['user_nickname']}</td>
  64 + <td>{$vo.name}</td>
  65 + <td>{$vo.mobile}</td>
  66 + <td>{$vo.site}</td>
  67 + <td>{:date('Y-m-d H:i',$vo.create_time)}</td>
  68 + <td>
  69 + <if condition="$vo.pay_type eq 1">
  70 + 微信支付
  71 + <elseif condition="$vo.pay_type eq 2">
  72 + 积分支付
  73 + <elseif condition="$vo.pay_type eq 3">
  74 + 组合支付
  75 + </if>
  76 + </td>
  77 + <td>
  78 + <if condition="$vo.step eq 2">
  79 + 待发货
  80 + <elseif condition="$vo.step eq 6">
  81 + 待审核
  82 + <elseif condition="$vo.step eq 8">
  83 + 待退款
  84 + </if>
  85 + </td>
  86 + <td>{$vo.whole}</td>
  87 + <td>{$vo.whole_num}</td>
  88 + <td>
  89 + <a href="{:url('detail',array('id'=>$vo['id'],'sta'=>'2'))}">订单详情</a>
  90 + <if condition="$vo.step eq 2">
  91 + <a href="javascript:parent.openIframeLayer('{:url('fahuo',array('id'=>$vo['id']))}','订单发货页面',{});">发货</a>
  92 + <elseif condition="$vo.step eq 6">
  93 + <a href="javascript:parent.openIframeLayer('{:url('check',array('id'=>$vo['id']))}','退款审核页面',{});">退款审核</a>
  94 + <elseif condition="$vo.step eq 8">
  95 + <a href="javascript:parent.openIframeLayer('{:url('refund',array('id'=>$vo['id']))}','退款审核页面',{});">退款</a>
  96 + </if>
  97 +
  98 + </td>
  99 + </tr>
  100 + </foreach>
  101 + </tbody>
  102 + </table>
  103 + <div class="pagination">{$page}</div>
  104 + </form>
  105 +</div>
  106 +<script src="__STATIC__/js/admin.js"></script>
  107 +</body>
  108 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">订单详情</a></li>
  7 + </ul>
  8 + <div class="row">
  9 + <div class="col-md-5">
  10 +
  11 + <table class="table table-bordered">
  12 +
  13 + <tr>
  14 + <th style="width: 40%;">订单编号</th>
  15 + <td>
  16 + <span>{$one.order_num}</span>
  17 + </td>
  18 + </tr>
  19 + <tr>
  20 + <th>订单状态</th>
  21 + <td>
  22 + <span>
  23 + <if condition="$one.step eq 1">
  24 + 待支付
  25 + <elseif condition="$one.step eq 2">
  26 + 待发货
  27 + <elseif condition="$one.step eq 3">
  28 + 待收货
  29 + <elseif condition="$one.step eq 4">
  30 + 待评价
  31 + <elseif condition="$one.step eq 5">
  32 + 已完成
  33 + <elseif condition="$one.step eq 6">
  34 + 待审核
  35 + <elseif condition="$one.step eq 7">
  36 + 待退货
  37 + <elseif condition="$one.step eq 8">
  38 + 待退款
  39 + <elseif condition="$one.step eq 9">
  40 + 已退款
  41 + </if>
  42 + </span>
  43 + </td>
  44 + </tr>
  45 + <tr>
  46 + <th>下单用户</th>
  47 + <td>
  48 + <span>{$one.user_nickname}</span>
  49 + </td>
  50 + </tr>
  51 + <tr>
  52 + <th>下单时间</th>
  53 + <td>
  54 + <span>{:date('Y-m-d H:i',$one.create_time)}</span>
  55 + </td>
  56 + </tr>
  57 + <tr>
  58 + <th>所购商品</th>
  59 + <td>
  60 + <foreach name="all" item="vo">
  61 + <span>{$vo.name}*{$vo.num} 单价{$vo.price}</span><br/>
  62 + </foreach>
  63 + </td>
  64 + </tr>
  65 + <tr>
  66 + <th>支付时间</th>
  67 + <td>
  68 + <span>{:date('Y-m-d H:i',$one.pay_time)}</span>
  69 + </td>
  70 + </tr>
  71 + <tr>
  72 + <th>支付方式</th>
  73 + <td>
  74 + <span>
  75 + <if condition="$one.pay_type eq 1">
  76 + 微信支付
  77 + <elseif condition="$one.pay_type eq 2">
  78 + 积分支付
  79 + <elseif condition="$one.pay_type eq 3">
  80 + 组合支付
  81 + </if>
  82 + </span>
  83 + </td>
  84 + </tr>
  85 + <tr>
  86 + <th>订单金额</th>
  87 + <td>
  88 + <span>{$one.whole}</span>
  89 + </td>
  90 + </tr>
  91 + </table>
  92 +
  93 + </div>
  94 + <div class="col-md-5">
  95 + <form action="{:url('checkPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  96 + <table class="table table-bordered">
  97 + <tr>
  98 + <th>收货人</th>
  99 + <td>
  100 + <span>{$one.name}</span>
  101 + </td>
  102 + </tr>
  103 + <tr>
  104 + <th>收货手机号</th>
  105 + <td>
  106 + <span>{$one.mobile}</span>
  107 + </td>
  108 + </tr>
  109 + <tr>
  110 + <th>收货地址</th>
  111 + <td>
  112 + <span>{$one.site}</span>
  113 + </td>
  114 + </tr>
  115 + <tr>
  116 + <th>快递单号</th>
  117 + <td>
  118 + <span>{$one.kd_num}</span>
  119 + </td>
  120 + </tr>
  121 + <tr>
  122 + <th>退款原因</th>
  123 + <td>
  124 + <span>{$one.cause}</span>
  125 + </td>
  126 + </tr>
  127 + </table>
  128 + <input type="hidden" value="{$one.id}" name="id">
  129 + <div class="form-group">
  130 + <div class="col-sm-offset-2 col-sm-10">
  131 + <button type="submit" class="btn btn-primary js-ajax-submit">通过</button>
  132 + <a href="{:url('checkPost',array('id'=>$one['id'],'sta'=>1))}" class="btn btn-primary js-ajax-dialog-btn" data-msg="确定驳回退款申请?">不通过</a>
  133 + </div>
  134 + </div>
  135 + </form>
  136 + </div>
  137 + </div>
  138 +</div>
  139 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  140 +</body>
  141 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">订单详情</a></li>
  7 + </ul>
  8 + <div class="row">
  9 + <div class="col-md-5">
  10 +
  11 + <table class="table table-bordered">
  12 +
  13 + <tr>
  14 + <th style="width: 40%;">订单编号</th>
  15 + <td>
  16 + <span>{$one.order_num}</span>
  17 + </td>
  18 + </tr>
  19 + <tr>
  20 + <th>订单状态</th>
  21 + <td>
  22 + <span>
  23 + <if condition="$one.step eq 1">
  24 + 待支付
  25 + <elseif condition="$one.step eq 2">
  26 + 待发货
  27 + <elseif condition="$one.step eq 3">
  28 + 待收货
  29 + <elseif condition="$one.step eq 4">
  30 + 待评价
  31 + <elseif condition="$one.step eq 5">
  32 + 已完成
  33 + <elseif condition="$one.step eq 6">
  34 + 待审核
  35 + <elseif condition="$one.step eq 7">
  36 + 待退货
  37 + <elseif condition="$one.step eq 8">
  38 + 待退款
  39 + <elseif condition="$one.step eq 9">
  40 + 已退款
  41 + </if>
  42 + </span>
  43 + </td>
  44 + </tr>
  45 + <tr>
  46 + <th>下单用户</th>
  47 + <td>
  48 + <span>{$one.user_nickname}</span>
  49 + </td>
  50 + </tr>
  51 + <tr>
  52 + <th>下单时间</th>
  53 + <td>
  54 + <span>{:date('Y-m-d H:i',$one.create_time)}</span>
  55 + </td>
  56 + </tr>
  57 + <tr>
  58 + <th>所购商品</th>
  59 + <td>
  60 + <foreach name="all" item="vo">
  61 + <span>{$vo.name}*{$vo.num}</span><br/>
  62 + </foreach>
  63 + </td>
  64 + </tr>
  65 + <tr>
  66 + <th>支付时间</th>
  67 + <td>
  68 + <span>{:date('Y-m-d H:i',$one.pay_time)}</span>
  69 + </td>
  70 + </tr>
  71 + <tr>
  72 + <th>支付方式</th>
  73 + <td>
  74 + <span>
  75 + <if condition="$one.pay_type eq 1">
  76 + 微信支付
  77 + <elseif condition="$one.pay_type eq 2">
  78 + 积分支付
  79 + <elseif condition="$one.pay_type eq 3">
  80 + 组合支付
  81 + </if>
  82 + </span>
  83 + </td>
  84 + </tr>
  85 + <tr>
  86 + <th>订单完成时间</th>
  87 + <td>
  88 + <span>
  89 + <if condition="$one.step eq 5||$one.step eq 9">
  90 + {:date('Y-m-d H:i',$vo.end_time)}
  91 + <elseif condition="$one.step lt 5">
  92 + 订单未完成
  93 + <elseif condition="$one.step gt 5&&$one.step neq 9">
  94 + 退款未完成
  95 + </if>
  96 + </span>
  97 + </td>
  98 + </tr>
  99 + <tr>
  100 + <th>订单金额</th>
  101 + <td>
  102 + <span>{$one.whole}</span>
  103 + </td>
  104 + </tr>
  105 + <tr>
  106 + <th>订单积分</th>
  107 + <td>
  108 + <span>{$one.whole_num}</span>
  109 + </td>
  110 + </tr>
  111 + </table>
  112 +
  113 + <if condition="$one.step gt 5">
  114 + <table class="table table-bordered">
  115 + <tr>
  116 + <th style="width: 40%;">申请退款时间</th>
  117 + <td>
  118 + <span>
  119 + <if condition="$one.refund_time neq 0">
  120 + {:date('Y-m-d H:i',$one.refund_time)}
  121 + </if>
  122 + </span>
  123 + </td>
  124 + </tr>
  125 + <tr>
  126 + <th>退款原因</th>
  127 + <td>
  128 + <span>{$one.cause}</span>
  129 + </td>
  130 + </tr>
  131 + <tr>
  132 + <th>退款快递</th>
  133 + <td>
  134 + <span>{$one.company}</span>
  135 + </td>
  136 + </tr>
  137 + <tr>
  138 + <th>退款快递单号</th>
  139 + <td>
  140 + <span>{$one.com_order}</span>
  141 + </td>
  142 + </tr>
  143 + <tr>
  144 + <th>订单退款完成备注</th>
  145 + <td>
  146 + <if condition="$one.remarkt neq ''">
  147 + <span>{$one.remarkt}</span>
  148 + </if>
  149 + </td>
  150 + </tr>
  151 + </table>
  152 + </if>
  153 +
  154 + </div>
  155 + <div class="col-md-5">
  156 +
  157 + <form action="{:url('detailPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  158 + <table class="table table-bordered">
  159 + <if condition="$one.step eq 2||$one.step eq 1">
  160 + <tr>
  161 + <th>收货人</th>
  162 + <td>
  163 + <input type="text" name="name" value="{$one.name}" class="form-control">
  164 + </td>
  165 + </tr>
  166 + <tr>
  167 + <th>收货手机号</th>
  168 + <td>
  169 + <input type="number" name="mobile" value="{$one.mobile}" class="form-control">
  170 + </td>
  171 + </tr>
  172 + <tr>
  173 + <th>收货地址</th>
  174 + <td>
  175 + <input type="text" name="site" value="{$one.site}" class="form-control">
  176 + </td>
  177 + </tr>
  178 + <elseif condition="$one.step gt 2&&$one.step lt 5">
  179 + <tr>
  180 + <th>收货人</th>
  181 + <td>
  182 + <span>{$one.name}</span>
  183 + </td>
  184 + </tr>
  185 + <tr>
  186 + <th>收货手机号</th>
  187 + <td>
  188 + <span>{$one.mobile}</span>
  189 + </td>
  190 + </tr>
  191 + <tr>
  192 + <th>收货地址</th>
  193 + <td>
  194 + <span>{$one.site}</span>
  195 + </td>
  196 + </tr>
  197 + <tr>
  198 + <th>快递公司</th>
  199 + <td>
  200 + <select name="step" class="form-control" style="width: 120px;">
  201 + <foreach name="kd" item="vo">
  202 + <option value="{$vo.id}" <eq name="$one.kid" value="$vo.id">selected</eq>>{$vo.name}</option>
  203 + </foreach>
  204 + </select>
  205 + </td>
  206 + </tr>
  207 + <tr>
  208 + <th>快递单号</th>
  209 + <td>
  210 + <input type="text" name="kd_num" value="{$one.kd_num}" class="form-control">
  211 + </td>
  212 + </tr>
  213 + <elseif condition="$one.step gt 5">
  214 + <tr>
  215 + <th>收货人</th>
  216 + <td>
  217 + <span>{$one.name}</span>
  218 + </td>
  219 + </tr>
  220 + <tr>
  221 + <th>收货手机号</th>
  222 + <td>
  223 + <span>{$one.mobile}</span>
  224 + </td>
  225 + </tr>
  226 + <tr>
  227 + <th>收货地址</th>
  228 + <td>
  229 + <span>{$one.site}</span>
  230 + </td>
  231 + </tr>
  232 + <tr>
  233 + <th>快递公司</th>
  234 + <td>
  235 + <span>$one.kname</span>
  236 + </td>
  237 + </tr>
  238 + <tr>
  239 + <th>快递单号</th>
  240 + <td>
  241 + <span>{$one.kd_num}</span>
  242 + </td>
  243 + </tr>
  244 + </if>
  245 + </table>
  246 + <if condition="$one.step elt 5">
  247 + <input type="hidden" value="{$one.id}" name="id">
  248 + <div class="form-group">
  249 + <div class="col-sm-offset-2 col-sm-10">
  250 + <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
  251 + <a href="{$url}" class="btn btn-primary" >返回</a>
  252 + </div>
  253 + </div>
  254 + </if>
  255 +
  256 + </form>
  257 + </div>
  258 + </div>
  259 +</div>
  260 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  261 +</body>
  262 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">订单详情</a></li>
  7 + </ul>
  8 + <div class="row">
  9 + <div class="col-md-5">
  10 +
  11 + <table class="table table-bordered">
  12 +
  13 + <tr>
  14 + <th style="width: 40%;">订单编号</th>
  15 + <td>
  16 + <span>{$one.order_num}</span>
  17 + </td>
  18 + </tr>
  19 + <tr>
  20 + <th>订单状态</th>
  21 + <td>
  22 + <span>
  23 + <if condition="$one.step eq 1">
  24 + 待支付
  25 + <elseif condition="$one.step eq 2">
  26 + 待发货
  27 + <elseif condition="$one.step eq 3">
  28 + 待收货
  29 + <elseif condition="$one.step eq 4">
  30 + 待评价
  31 + <elseif condition="$one.step eq 5">
  32 + 已完成
  33 + <elseif condition="$one.step eq 6">
  34 + 待审核
  35 + <elseif condition="$one.step eq 7">
  36 + 待退货
  37 + <elseif condition="$one.step eq 8">
  38 + 待退款
  39 + <elseif condition="$one.step eq 9">
  40 + 已退款
  41 + </if>
  42 + </span>
  43 + </td>
  44 + </tr>
  45 + <tr>
  46 + <th>下单用户</th>
  47 + <td>
  48 + <span>{$one.user_nickname}</span>
  49 + </td>
  50 + </tr>
  51 + <tr>
  52 + <th>下单时间</th>
  53 + <td>
  54 + <span>{:date('Y-m-d H:i',$one.create_time)}</span>
  55 + </td>
  56 + </tr>
  57 + <tr>
  58 + <th>所购商品</th>
  59 + <td>
  60 + <foreach name="all" item="vo">
  61 + <span>{$vo.name}*{$vo.num}</span><br/>
  62 + </foreach>
  63 + </td>
  64 + </tr>
  65 + <tr>
  66 + <th>支付时间</th>
  67 + <td>
  68 + <span>{:date('Y-m-d H:i',$one.pay_time)}</span>
  69 + </td>
  70 + </tr>
  71 + <tr>
  72 + <th>支付方式</th>
  73 + <td>
  74 + <span>
  75 + <if condition="$one.pay_type eq 1">
  76 + 微信支付
  77 + <elseif condition="$one.pay_type eq 2">
  78 + 积分支付
  79 + <elseif condition="$one.pay_type eq 3">
  80 + 组合支付
  81 + </if>
  82 + </span>
  83 + </td>
  84 + </tr>
  85 + <tr>
  86 + <th>订单金额</th>
  87 + <td>
  88 + <span>{$one.whole}</span>
  89 + </td>
  90 + </tr>
  91 + <tr>
  92 + <th>订单积分</th>
  93 + <td>
  94 + <span>{$one.whole_num}</span>
  95 + </td>
  96 + </tr>
  97 + </table>
  98 +
  99 + </div>
  100 + <div class="col-md-5">
  101 + <form action="{:url('fhPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  102 + <table class="table table-bordered">
  103 + <tr>
  104 + <th>收货人</th>
  105 + <td>
  106 + <span>{$one.name}</span>
  107 + </td>
  108 + </tr>
  109 + <tr>
  110 + <th>收货手机号</th>
  111 + <td>
  112 + <span>{$one.mobile}</span>
  113 + </td>
  114 + </tr>
  115 + <tr>
  116 + <th>收货地址</th>
  117 + <td>
  118 + <span>{$one.site}</span>
  119 + </td>
  120 + </tr>
  121 + <tr>
  122 + <th>快递公司</th>
  123 + <td>
  124 + <select name="kid" class="form-control">
  125 + <foreach name="kd" item="vo">
  126 + <option value="{$vo.id}">{$vo.name}</option>
  127 + </foreach>
  128 + </select>
  129 + </td>
  130 + </tr>
  131 + <tr>
  132 + <th>快递单号</th>
  133 + <td>
  134 + <input type="text" name="kd_num" class="form-control">
  135 + </td>
  136 + </tr>
  137 + </table>
  138 + <input type="hidden" value="{$one.id}" name="id">
  139 + <div class="form-group">
  140 + <div class="col-sm-offset-2 col-sm-10">
  141 + <button type="submit" class="btn btn-primary js-ajax-submit">发货</button>
  142 + </div>
  143 + </div>
  144 + </form>
  145 + </div>
  146 + </div>
  147 +</div>
  148 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  149 +</body>
  150 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">订单列表</a></li>
  7 + </ul>
  8 + <form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
  9 + 订单号:
  10 + <input class="form-control" type="text" name="num" style="width: 200px;" value="{$num|default=''}"
  11 + placeholder="请输入订单号">
  12 + 订单状态:
  13 + <select name="step" class="form-control" style="width: 120px;">
  14 + <option value>订单状态</option>
  15 + <option value="1" <eq name="$step" value="1"> selected </eq> >待支付</option>
  16 + <option value="2" <eq name="$step" value="2"> selected </eq> >待发货</option>
  17 + <option value="3" <eq name="$step" value="3"> selected </eq> >待收货</option>
  18 + <option value="4" <eq name="$step" value="4"> selected </eq> >待评论</option>
  19 + <option value="5" <eq name="$step" value="5"> selected </eq> >已完成</option>
  20 + <option value="6" <eq name="$step" value="6"> selected </eq> >待审核</option>
  21 + <option value="7" <eq name="$step" value="7"> selected </eq> >待退货</option>
  22 + <option value="8" <eq name="$step" value="8"> selected </eq> >待退款</option>
  23 + <option value="9" <eq name="$step" value="9"> selected </eq> >已退款</option>
  24 + </select>
  25 + 收货人:
  26 + <input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
  27 + placeholder="请输入收货姓名">
  28 + 手机号:
  29 + <input class="form-control" type="number" name="mobile" style="width: 200px;" value="{$mobile|default=''}"
  30 + placeholder="请输入收货手机号">
  31 + 下单时间:
  32 + <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
  33 + value="{$start_time|default=''}"
  34 + style="width: 140px;" autocomplete="off">-
  35 + <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
  36 + value="{$end_time|default=''}"
  37 + style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
  38 + <input type="hidden" name="uid" value="{$uid|default=''}">
  39 + <input type="submit" class="btn btn-primary" value="搜索"/>
  40 + <a class="btn btn-danger" href="{:url('index')}">清空</a>
  41 + </form>
  42 + <form method="post" class="js-ajax-form">
  43 + <table class="table table-hover table-bordered">
  44 + <thead>
  45 + <tr>
  46 + <th>订单号</th>
  47 + <th>下单用户</th>
  48 + <th>收货人</th>
  49 + <th>收货手机号</th>
  50 + <th>收货地址</th>
  51 + <th>下单时间</th>
  52 + <th>支付方式</th>
  53 + <th>完成时间</th>
  54 + <th>订单状态</th>
  55 + <th>订单金额</th>
  56 + <th>订单积分</th>
  57 + <th>操作</th>
  58 + </tr>
  59 + </thead>
  60 + <tbody>
  61 + <foreach name="all" item="vo">
  62 + <tr>
  63 + <td>{$vo.order_num}</td>
  64 + <td>{$vo['user_nickname']}</td>
  65 + <td>{$vo.name}</td>
  66 + <td>{$vo.mobile}</td>
  67 + <td>{$vo.site}</td>
  68 + <td>{:date('Y-m-d H:i',$vo.create_time)}</td>
  69 + <td>
  70 + <if condition="$vo.pay_type eq 1">
  71 + 微信支付
  72 + <elseif condition="$vo.pay_type eq 2">
  73 + 积分支付
  74 + <elseif condition="$vo.pay_type eq 3">
  75 + 组合支付
  76 + </if>
  77 + </td>
  78 + <td>
  79 + <if condition="$vo.step eq 5||$vo.step eq 9">
  80 + {:date('Y-m-d H:i',$vo.end_time)}
  81 + <elseif condition="$vo.step lt 5">
  82 + 订单未完成
  83 + <elseif condition="$vo.step gt 5&&$vo.step neq 9">
  84 + 退款未完成
  85 + </if>
  86 + </td>
  87 + <td>
  88 + <if condition="$vo.step eq 1">
  89 + 待支付
  90 + <elseif condition="$vo.step eq 2">
  91 + 待发货
  92 + <elseif condition="$vo.step eq 3">
  93 + 待收货
  94 + <elseif condition="$vo.step eq 4">
  95 + 待评价
  96 + <elseif condition="$vo.step eq 5">
  97 + 已完成
  98 + <elseif condition="$vo.step eq 6">
  99 + 待审核
  100 + <elseif condition="$vo.step eq 7">
  101 + 待退货
  102 + <elseif condition="$vo.step eq 8">
  103 + 待退款
  104 + <elseif condition="$vo.step eq 9">
  105 + 已退款
  106 + </if>
  107 + </td>
  108 + <td>{$vo.whole}</td>
  109 + <td>{$vo.whole_num}</td>
  110 + <td>
  111 + <a href="{:url('detail',array('id'=>$vo['id'],'sta'=>'1'))}">订单详情</a>
  112 + </td>
  113 + </tr>
  114 + </foreach>
  115 + </tbody>
  116 + </table>
  117 + <div class="pagination">{$page}</div>
  118 + </form>
  119 +</div>
  120 +<script src="__STATIC__/js/admin.js"></script>
  121 +</body>
  122 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">订单详情</a></li>
  7 + </ul>
  8 + <div class="row">
  9 + <div class="col-md-5">
  10 +
  11 + <table class="table table-bordered">
  12 +
  13 + <tr>
  14 + <th style="width: 40%;">订单编号</th>
  15 + <td>
  16 + <span>{$one.order_num}</span>
  17 + </td>
  18 + </tr>
  19 + <tr>
  20 + <th>订单状态</th>
  21 + <td>
  22 + <span>
  23 + <if condition="$one.step eq 1">
  24 + 待支付
  25 + <elseif condition="$one.step eq 2">
  26 + 待发货
  27 + <elseif condition="$one.step eq 3">
  28 + 待收货
  29 + <elseif condition="$one.step eq 4">
  30 + 待评价
  31 + <elseif condition="$one.step eq 5">
  32 + 已完成
  33 + <elseif condition="$one.step eq 6">
  34 + 待审核
  35 + <elseif condition="$one.step eq 7">
  36 + 待退货
  37 + <elseif condition="$one.step eq 8">
  38 + 待退款
  39 + <elseif condition="$one.step eq 9">
  40 + 已退款
  41 + </if>
  42 + </span>
  43 + </td>
  44 + </tr>
  45 + <tr>
  46 + <th>下单用户</th>
  47 + <td>
  48 + <span>{$one.user_nickname}</span>
  49 + </td>
  50 + </tr>
  51 + <tr>
  52 + <th>下单时间</th>
  53 + <td>
  54 + <span>{:date('Y-m-d H:i',$one.create_time)}</span>
  55 + </td>
  56 + </tr>
  57 + <tr>
  58 + <th>所购商品</th>
  59 + <td>
  60 + <foreach name="all" item="vo">
  61 + <span>{$vo.name}*{$vo.num} 单价{$vo.price}</span><br/>
  62 + </foreach>
  63 + </td>
  64 + </tr>
  65 + <tr>
  66 + <th>支付时间</th>
  67 + <td>
  68 + <span>{:date('Y-m-d H:i',$one.pay_time)}</span>
  69 + </td>
  70 + </tr>
  71 + <tr>
  72 + <th>支付方式</th>
  73 + <td>
  74 + <span>
  75 + <if condition="$one.pay_type eq 1">
  76 + 微信支付
  77 + <elseif condition="$one.pay_type eq 2">
  78 + 积分支付
  79 + <elseif condition="$one.pay_type eq 3">
  80 + 组合支付
  81 + </if>
  82 + </span>
  83 + </td>
  84 + </tr>
  85 + <tr>
  86 + <th>订单金额</th>
  87 + <td>
  88 + <span>{$one.whole}</span>
  89 + </td>
  90 + </tr>
  91 + </table>
  92 +
  93 + </div>
  94 + <div class="col-md-5">
  95 + <form action="{:url('refundPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  96 + <table class="table table-bordered">
  97 + <tr>
  98 + <th>收货人</th>
  99 + <td>
  100 + <span>{$one.name}</span>
  101 + </td>
  102 + </tr>
  103 + <tr>
  104 + <th>收货手机号</th>
  105 + <td>
  106 + <span>{$one.mobile}</span>
  107 + </td>
  108 + </tr>
  109 + <tr>
  110 + <th>收货地址</th>
  111 + <td>
  112 + <span>{$one.site}</span>
  113 + </td>
  114 + </tr>
  115 + <tr>
  116 + <th>快递单号</th>
  117 + <td>
  118 + <span>{$one.kd_num}</span>
  119 + </td>
  120 + </tr>
  121 + <tr>
  122 + <th>退款原因</th>
  123 + <td>
  124 + <span>{$one.cause}</span>
  125 + </td>
  126 + </tr>
  127 + <tr>
  128 + <th>退款额度</th>
  129 + <td>
  130 + <input type="number" name="tui" class="form-control">
  131 + </td>
  132 + </tr>
  133 + <tr>
  134 + <th>订单退款备注</th>
  135 + <td>
  136 + <input type="text" name="remarkt" class="form-control">
  137 + </td>
  138 + </tr>
  139 + </table>
  140 + <input type="hidden" value="{$one.id}" name="id">
  141 + <div class="form-group">
  142 + <div class="col-sm-offset-2 col-sm-10">
  143 + <button type="submit" class="btn btn-primary js-ajax-submit">确认退款</button>
  144 + </div>
  145 + </div>
  146 + </form>
  147 + </div>
  148 + </div>
  149 +</div>
  150 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  151 +</body>
  152 +</html>