作者 徐治堂

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

<?php
/**
* Created by PhpStorm.
* User: wz
* Date: 2018/9/26
* Time: 14:29
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
use think\Db;
class ZjGoodsController extends AdminBaseController
{
/**
* 商品列表
*/
public function index(){
$where['g.delete_time']=0;
$param=[];
if ($this->request->param()){
$param=input('param.');
if (!empty($param['cate'])){
$where['ca.id']=$param['cate'];
}
}
$all=Db::name('zj_goods')->alias('g')->join('zj_category c','g.cid=c.id')->join('zj_category ca','c.cid=ca.id')
->where($where)->field('g.*,c.name as cname,ca.name as caname')->order('create_time','desc')->paginate(15);
$all->appends($param);
$this->assign('all',$all->items());
$this->assign('page',$all->render());
return $this->fetch();
}
/**
* 商品分类列表
*/
public function category(){
$all=Db::name('zj_category')->alias('c')->join('zj_category ca','c.cid=ca.id','left')
->field('c.*,ca.name as cname')->where('c.delete_time','0')->select();
$this->assign('all',$all);
return $this->fetch();
}
/**
* 添加商品分类
*/
public function addCate(){
$all=Db::name('zj_category')->where('grade','1')->select();
$this->assign('all',$all);
return $this->fetch();
}
/**
* 添加商品分类提交
*/
public function addCatePost(){
if ($this->request->param()){
$param=input('param.');
$param['create_time']=time();
$add=Db::name('zj_category')->insert($param);
if (empty($add)){
$this->error('添加分类失败');
}else{
$this->success('添加分类成功');
}
}
}
/**
* 编辑分类
*/
public function editCate(){
if ($this->request->param()){
$param=input('param.id');
$one=Db::name('zj_category')->where('id',$param)->find();
$all=Db::name('zj_category')->where('grade','1')->select();
$this->assign('all',$all);
$this->assign('one',$one);
return $this->fetch();
}
}
/**
* 编辑分类提交
*/
public function editCatePost(){
if ($this->request->param()){
$param=input('param.');
$edit=Db::name('zj_category')->update($param);
if (empty($edit)){
$this->error('保存失败');
}else{
$this->success('保存成功');
}
}
}
/**
* 删除分类
*/
public function delCate(){
if ($this->request->isAjax()){
$param=input('param.id');
$edit=Db::name('zj_category')->where(['id'=>$param,'grade'=>'2'])->update(['delete_time'=>time()]);
if (empty($edit)){
$this->error('删除失败');
}else{
$this->success('删除成功');
}
}
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: wz
* Date: 2018/9/25
* Time: 11:29
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
use think\Db;
class ZjOrderController extends AdminBaseController
{
/**
* 订单列表
*/
public function index(){
$where['o.delete_time']=0;
$arr=[];
$where1=[];
if ($this->request->param()){
$arr=input('param.');
if (!empty($arr['uid'])){
$where['o.uid']=$arr['uid'];
}
if (!empty($arr['step'])){
$where['o.step']=$arr['step'];
}
if (!empty($arr['num'])){
$where['o.order_num']=$arr['num'];
}
if (!empty($arr['name'])){
$where['o.name']=$arr['name'];
}
if (!empty($arr['mobile'])){
$where['o.mobile']=$arr['mobile'];
}
if (!empty($arr['start_time'])){
$where['o.create_time']=['egt',strtotime($arr['start_time'])];
}
if (!empty($arr['end_time'])){
$where1['o.create_time']=['elt',strtotime($arr['end_time'])];
}
}
$all=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where($where)->where($where1)
->order('create_time','desc')->field('o.*,u.user_nickname')->paginate(15);
$all->appends($arr);
$this->assign('start_time', !empty($arr['start_time']) ? $arr['start_time'] : '');
$this->assign('end_time', !empty($arr['end_time']) ? $arr['end_time'] : '');
$this->assign('uid',!empty($arr['uid'])?$arr['uid']:'');
$this->assign('step',!empty($arr['step'])?$arr['step']:'');
$this->assign('num',!empty($arr['num'])?$arr['num']:'');
$this->assign('name',!empty($arr['name'])?$arr['name']:'');
$this->assign('mobile',!empty($arr['mobile'])?$arr['mobile']:'');
$this->assign('page',$all->render());
$this->assign('all',$all->items());
return $this->fetch();
}
/**
* 订单详情
*/
public function detail(){
if ($this->request->param()){
$id=input('param.id');
$url=input('param.sta');
if ($url==1){
$url=url('index');
}elseif ($url==2){
$url=url('backlog');
}
$one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->join('zj_kd k','o.kid=k.id','left')
->where('o.id',$id)->field('o.*,u.user_nickname,k.name as kname')->find();
$kd=Db::name('zj_kd')->select();
$all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$id)
->field('g.name,og.num')->select();
$this->assign('kd',$kd);
$this->assign('url',$url);
$this->assign('one',$one);
$this->assign('all',$all);
return $this->fetch();
}
}
/**
* 订单详情修改提交
*/
public function detailPost(){
if ($this->request->param()){
$param=input('param.');
$edit=Db::name('zj_order')->update($param);
if (empty($edit)){
$this->error('修改失败');
}else{
$this->success('修改成功');
}
}
}
/**
* 待处理订单列表
*/
public function backlog(){
$where['o.delete_time']=0;
$arr=[];
$where1['o.step']=['in',['2','6','8']];
if ($this->request->param()){
$arr=input('param.');
if (!empty($arr['uid'])){
$where['o.uid']=$arr['uid'];
}
if (!empty($arr['step'])){
$where['o.step']=$arr['step'];
}
if (!empty($arr['num'])){
$where['o.order_num']=$arr['num'];
}
if (!empty($arr['name'])){
$where['o.name']=$arr['name'];
}
if (!empty($arr['mobile'])){
$where['o.mobile']=$arr['mobile'];
}
if (!empty($arr['start_time'])){
$where['o.create_time']=['egt',strtotime($arr['start_time'])];
}
if (!empty($arr['end_time'])){
$where1['o.create_time']=['elt',strtotime($arr['end_time'])];
}
}
$all=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where($where)->where($where1)
->order('create_time','desc')->field('o.*,u.user_nickname')->paginate(15);
$all->appends($arr);
$this->assign('start_time', !empty($arr['start_time']) ? $arr['start_time'] : '');
$this->assign('end_time', !empty($arr['end_time']) ? $arr['end_time'] : '');
$this->assign('uid',!empty($arr['uid'])?$arr['uid']:'');
$this->assign('step',!empty($arr['step'])?$arr['step']:'');
$this->assign('num',!empty($arr['num'])?$arr['num']:'');
$this->assign('name',!empty($arr['name'])?$arr['name']:'');
$this->assign('mobile',!empty($arr['mobile'])?$arr['mobile']:'');
$this->assign('page',$all->render());
$this->assign('all',$all->items());
return $this->fetch();
}
/**
* 订单发货
*/
public function fahuo(){
if ($this->request->param()){
$param=input('param.id');
//获取订单数据
$one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')
->where('o.id',$param)->field('o.*,u.user_nickname')->find();
//获取快递公司数据
$kd=Db::name('zj_kd')->select();
//获取订单商品
$all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$param)
->field('g.name,og.num')->select();
if ($one['step']>2){
echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单已发货</p></div>";
}elseif ($one['step']==1){
echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单未支付</p></div>";
}else{
$this->assign('kd',$kd);
$this->assign('one',$one);
$this->assign('all',$all);
return $this->fetch();
}
}
}
/**
* 订单发货提交
*/
public function fhPost(){
if ($this->request->param()){
$param=input('param.');
if (empty($param['kd_num'])){
$this->error('快递单号不能为空');
}
$param['step']=3;
$edit=Db::name('zj_order')->update($param);
if (empty($edit)){
$this->error('订单状态更新失败');
}else{
$this->success('订单状态更新成功');
}
}
}
/**
* 订单退款审核
*/
public function check(){
if ($this->request->param()){
$param=input('param.id');
//获取订单数据
$one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where('o.id',$param)
->field('o.*,u.user_nickname')->find();
//获取订单商品
$all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$param)
->field('g.name,g.price,og.num')->select();
if ($one['step']<6){
echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单未退货</p></div>";
}elseif ($one['step']>6){
echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>退款审核通过</p></div>";
}else{
$this->assign('one',$one);
$this->assign('all',$all);
return $this->fetch();
}
}
}
/**
* 订单退款审核提交
*/
public function checkPost(){
if ($this->request->param()){
$param=input('param.');
//判断审核是否通过
if (!empty($param['sta'])){
$param['step']=5;
unset($param['sta']);
$edit=Db::name('zj_order')->update($param);
}else{
$param['step']=7;
$edit=Db::name('zj_order')->update($param);
}
if (empty($edit)){
$this->error('订单状态更新失败');
}else{
$this->success('订单状态更新成功');
}
}
}
/**
* 订单退款
*/
public function refund(){
if ($this->request->param()){
$param=input('param.id');
//获取订单数据
$one=Db::name('zj_order')->alias('o')->join('user u','o.uid=u.id','left')->where('o.id',$param)
->field('o.*,u.user_nickname')->find();
//获取订单商品
$all=Db::name('zj_order_goods')->alias('og')->join('zj_goods g','og.gid=g.id')->where('oid',$param)
->field('g.name,g.price,og.num')->select();
if ($one['step']>8){
echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单已退款</p></div>";
}elseif ($one['step']<8){
echo "<div style='width: 100%;text-align: center;padding-top: 50px'><p style='font-size: 25px'>订单状态错误</p></div>";
}else{
$this->assign('one',$one);
$this->assign('all',$all);
return $this->fetch();
}
}
}
/**
* 订单退款提交
*/
public function refundPost(){
if ($this->request->param()){
$param=input('param.');
if ($param['tui']<=0){
$this->error('退款金额需大于0');
}
$param['step']=9;
unset($param['tui']);//删除无用数据
$edit=Db::name('zj_order')->update($param);
if (empty($edit)){
$this->error('订单退款失败');
}else{
$this->success('订单退款成功');
}
}
}
}
\ No newline at end of file
... ...
VXjedLb2uAcqtBPC
\ No newline at end of file
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('category')}">分类列表</a></li>
<li class="active"><a href="{:url('addCate')}">添加分类</a></li>
</ul>
<div class="row margin-top-20">
<div class="col-md-5">
<form class="js-ajax-form" action="{:url('addCatePost')}" method="post">
<div class="tab-content">
<div class="tab-pane active" id="A">
<div class="form-group">
<label for="name"><span class="form-required">*</span>分类名称</label>
<div>
<input type="text" class="form-control" placeholder="请输入名称" id="name" name="name" maxlength="10" required>
</div>
</div>
<div class="form-group">
<label for="name">分类简介</label>
<div>
<input type="text" name="intro" maxlength="100" class="form-control" placeholder="请输入简介">
</div>
</div>
<div class="form-group">
<label><span class="form-required">*</span>所属分类</label>
<div>
<select class="form-control" name="cid">
<foreach name="all" item="vo">
<option value="{$vo.id}">{$vo.name}</option>
</foreach>
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
<a class="btn btn-default" href="{:url('category')}">{:lang('BACK')}</a>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">分类列表</a></li>
<li><a href="{:url('addCate')}">添加分类</a></li>
</ul>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>id</th>
<th>名称</th>
<th>简介</th>
<th>父级分类</th>
<!--<th>分类图片</th>-->
<th>创建时间</th>
<th style="width: 100px;">操作</th>
</tr>
</thead>
<tbody>
<foreach name="all" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td>{$vo.intro}</td>
<td>
<if condition="$vo.cid eq 0">
一级分类,无父级
<else>
{$vo.cname}
</if>
</td>
<!--<td>-->
<!--<if condition="$vo.grade eq 2">-->
<!--二级分类无图片-->
<!--<else>-->
<!--<a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.more)}');">-->
<!--<i class="fa fa-photo fa-fw"></i>-->
<!--</a>-->
<!--</if>-->
<!--</td>-->
<td>{:date('Y-m-d H:i',$vo.create_time)}</td>
<td>
<a href="{:url('editCate',array('id'=>$vo['id']))}">编辑</a>
<if condition="$vo.grade eq 2">
<a href="{:url('delCate',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确定删除分类">删除</a>
</if>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('category')}">分类列表</a></li>
<li><a href="{:url('addCate')}">添加分类</a></li>
<li class="active"><a href="javascript:;">编辑分类</a></li>
</ul>
<div class="row margin-top-20">
<div class="col-md-5">
<form class="js-ajax-form" action="{:url('editCatePost')}" method="post">
<div class="tab-content">
<div class="tab-pane active" id="A">
<div class="form-group">
<label for="name"><span class="form-required">*</span>分类名称</label>
<div>
<input type="text" class="form-control" placeholder="请输入名称" id="name" value="{$one.name}" name="name" maxlength="10" required>
</div>
</div>
<div class="form-group">
<label for="name">分类简介</label>
<div>
<input type="text" name="intro" maxlength="100" class="form-control" value="{$one.intro}" placeholder="请输入简介">
</div>
</div>
<if condition="$one.grade eq 2">
<div class="form-group">
<label><span class="form-required">*</span>所属分类</label>
<div>
<select class="form-control" name="cid">
<foreach name="all" item="vo">
<option value="{$vo.id}" <eq name="$vo.id" value="$one.cid"> selected </eq>>{$vo.name}</option>
</foreach>
</select>
</div>
</div>
</if>
</div>
</div>
<div class="form-group">
<input type="hidden" name="id" value="{$one.id}">
<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
<a class="btn btn-default" href="{:url('category')}">{:lang('BACK')}</a>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">商品列表</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
id:
<input class="form-control" type="text" name="id" style="width: 200px;" value="{$id|default=''}"
placeholder="请输入id">
一级分类:
<select name="step" class="form-control" style="width: 120px;">
<option value>选择分类</option>
</select>
二级分类:
<select name="step" class="form-control" style="width: 120px;">
<option value>选择分类</option>
</select>
商品名称:
<input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
placeholder="请输入商品名称">
单价:
<input class="form-control" type="number" name="min" style="width: 200px;" value="{$min|default=''}"
placeholder="请输入最低价">-
<input class="form-control" type="number" name="max" style="width: 200px;" value="{$max|default=''}"
placeholder="请输入最高价">
<br/>
商品状态:
<select name="zt" class="form-control" style="width: 120px;">
<option value>选择状态</option>
<option value="1">上架</option>
<option value="2">下架</option>
<option value="3">推荐</option>
<option value="4">未推荐</option>
</select>
<input type="hidden" name="uid" value="{$uid|default=''}">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('index')}">清空</a>
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>id</th>
<th>一级分类</th>
<th>二级分类</th>
<th>添加时间</th>
<th>积分售价</th>
<th>金额售价</th>
<th>总价</th>
<th>商品状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="all" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.caname}</td>
<td>{$vo.cname}</td>
<td>{:date('Y-m-d H:i'$vo.create_time)}</td>
<td>
<if condition="$vo.price_num eq 0">
</if>
{$vo.price+num}
</td>
<td>{$vo.id}</td>
<td>{$vo.id}</td>
<td>{$vo.id}</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -14,13 +14,13 @@
<div class="form-group">
<label for="title"><span class="form-required">*</span>消息标题</label>
<div>
<input type="text" class="form-control" placeholder="请输入标题" id="title" name="title" maxlength="30">
<input type="text" class="form-control" placeholder="请输入标题" id="title" name="title" maxlength="30" required>
</div>
</div>
<div class="form-group">
<label for="title"><span class="form-required">*</span>消息内容</label>
<div>
<textarea class="form-control" name="content"
<textarea class="form-control" name="content" required
placeholder="请输入内容(最多252字)" maxlength="252"></textarea>
</div>
</div>
... ...
... ... @@ -15,13 +15,13 @@
<div class="form-group">
<label for="title"><span class="form-required">*</span>消息标题</label>
<div>
<input type="text" class="form-control" placeholder="请输入标题" value="{$one.title}" id="title" name="title" maxlength="30">
<input type="text" required class="form-control" placeholder="请输入标题" value="{$one.title}" id="title" name="title" maxlength="30">
</div>
</div>
<div class="form-group">
<label for="title"><span class="form-required">*</span>消息内容</label>
<div>
<textarea class="form-control" name="content"
<textarea class="form-control" name="content" required
placeholder="请输入内容(最多252字)" maxlength="252">{$one.content}</textarea>
</div>
</div>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">待处理订单</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('backlog')}">
订单号:
<input class="form-control" type="text" name="num" style="width: 200px;" value="{$num|default=''}"
placeholder="请输入订单号">
订单状态:
<select name="step" class="form-control" style="width: 120px;">
<option value>订单状态</option>
<option value="1" <eq name="$step" value="1"> selected </eq> >待支付</option>
<option value="2" <eq name="$step" value="2"> selected </eq> >待发货</option>
<option value="3" <eq name="$step" value="3"> selected </eq> >待收货</option>
<option value="4" <eq name="$step" value="4"> selected </eq> >待评论</option>
<option value="5" <eq name="$step" value="5"> selected </eq> >已完成</option>
<option value="6" <eq name="$step" value="6"> selected </eq> >待审核</option>
<option value="7" <eq name="$step" value="7"> selected </eq> >待退货</option>
<option value="8" <eq name="$step" value="8"> selected </eq> >待退款</option>
<option value="9" <eq name="$step" value="9"> selected </eq> >已退款</option>
</select>
收货人:
<input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
placeholder="请输入收货姓名">
手机号:
<input class="form-control" type="number" name="mobile" style="width: 200px;" value="{$mobile|default=''}"
placeholder="请输入收货手机号">
下单时间:
<input type="text" class="form-control js-bootstrap-datetime" name="start_time"
value="{$start_time|default=''}"
style="width: 140px;" autocomplete="off">-
<input type="text" class="form-control js-bootstrap-datetime" name="end_time"
value="{$end_time|default=''}"
style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
<input type="hidden" name="uid" value="{$uid|default=''}">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('backlog')}">清空</a>
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>订单号</th>
<th>下单用户</th>
<th>收货人</th>
<th>收货手机号</th>
<th>收货地址</th>
<th>下单时间</th>
<th>支付方式</th>
<th>订单状态</th>
<th>订单金额</th>
<th>订单积分</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="all" item="vo">
<tr>
<td>{$vo.order_num}</td>
<td>{$vo['user_nickname']}</td>
<td>{$vo.name}</td>
<td>{$vo.mobile}</td>
<td>{$vo.site}</td>
<td>{:date('Y-m-d H:i',$vo.create_time)}</td>
<td>
<if condition="$vo.pay_type eq 1">
微信支付
<elseif condition="$vo.pay_type eq 2">
积分支付
<elseif condition="$vo.pay_type eq 3">
组合支付
</if>
</td>
<td>
<if condition="$vo.step eq 2">
待发货
<elseif condition="$vo.step eq 6">
待审核
<elseif condition="$vo.step eq 8">
待退款
</if>
</td>
<td>{$vo.whole}</td>
<td>{$vo.whole_num}</td>
<td>
<a href="{:url('detail',array('id'=>$vo['id'],'sta'=>'2'))}">订单详情</a>
<if condition="$vo.step eq 2">
<a href="javascript:parent.openIframeLayer('{:url('fahuo',array('id'=>$vo['id']))}','订单发货页面',{});">发货</a>
<elseif condition="$vo.step eq 6">
<a href="javascript:parent.openIframeLayer('{:url('check',array('id'=>$vo['id']))}','退款审核页面',{});">退款审核</a>
<elseif condition="$vo.step eq 8">
<a href="javascript:parent.openIframeLayer('{:url('refund',array('id'=>$vo['id']))}','退款审核页面',{});">退款</a>
</if>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单详情</a></li>
</ul>
<div class="row">
<div class="col-md-5">
<table class="table table-bordered">
<tr>
<th style="width: 40%;">订单编号</th>
<td>
<span>{$one.order_num}</span>
</td>
</tr>
<tr>
<th>订单状态</th>
<td>
<span>
<if condition="$one.step eq 1">
待支付
<elseif condition="$one.step eq 2">
待发货
<elseif condition="$one.step eq 3">
待收货
<elseif condition="$one.step eq 4">
待评价
<elseif condition="$one.step eq 5">
已完成
<elseif condition="$one.step eq 6">
待审核
<elseif condition="$one.step eq 7">
待退货
<elseif condition="$one.step eq 8">
待退款
<elseif condition="$one.step eq 9">
已退款
</if>
</span>
</td>
</tr>
<tr>
<th>下单用户</th>
<td>
<span>{$one.user_nickname}</span>
</td>
</tr>
<tr>
<th>下单时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.create_time)}</span>
</td>
</tr>
<tr>
<th>所购商品</th>
<td>
<foreach name="all" item="vo">
<span>{$vo.name}*{$vo.num} 单价{$vo.price}</span><br/>
</foreach>
</td>
</tr>
<tr>
<th>支付时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.pay_time)}</span>
</td>
</tr>
<tr>
<th>支付方式</th>
<td>
<span>
<if condition="$one.pay_type eq 1">
微信支付
<elseif condition="$one.pay_type eq 2">
积分支付
<elseif condition="$one.pay_type eq 3">
组合支付
</if>
</span>
</td>
</tr>
<tr>
<th>订单金额</th>
<td>
<span>{$one.whole}</span>
</td>
</tr>
</table>
</div>
<div class="col-md-5">
<form action="{:url('checkPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<table class="table table-bordered">
<tr>
<th>收货人</th>
<td>
<span>{$one.name}</span>
</td>
</tr>
<tr>
<th>收货手机号</th>
<td>
<span>{$one.mobile}</span>
</td>
</tr>
<tr>
<th>收货地址</th>
<td>
<span>{$one.site}</span>
</td>
</tr>
<tr>
<th>快递单号</th>
<td>
<span>{$one.kd_num}</span>
</td>
</tr>
<tr>
<th>退款原因</th>
<td>
<span>{$one.cause}</span>
</td>
</tr>
</table>
<input type="hidden" value="{$one.id}" name="id">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">通过</button>
<a href="{:url('checkPost',array('id'=>$one['id'],'sta'=>1))}" class="btn btn-primary js-ajax-dialog-btn" data-msg="确定驳回退款申请?">不通过</a>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单详情</a></li>
</ul>
<div class="row">
<div class="col-md-5">
<table class="table table-bordered">
<tr>
<th style="width: 40%;">订单编号</th>
<td>
<span>{$one.order_num}</span>
</td>
</tr>
<tr>
<th>订单状态</th>
<td>
<span>
<if condition="$one.step eq 1">
待支付
<elseif condition="$one.step eq 2">
待发货
<elseif condition="$one.step eq 3">
待收货
<elseif condition="$one.step eq 4">
待评价
<elseif condition="$one.step eq 5">
已完成
<elseif condition="$one.step eq 6">
待审核
<elseif condition="$one.step eq 7">
待退货
<elseif condition="$one.step eq 8">
待退款
<elseif condition="$one.step eq 9">
已退款
</if>
</span>
</td>
</tr>
<tr>
<th>下单用户</th>
<td>
<span>{$one.user_nickname}</span>
</td>
</tr>
<tr>
<th>下单时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.create_time)}</span>
</td>
</tr>
<tr>
<th>所购商品</th>
<td>
<foreach name="all" item="vo">
<span>{$vo.name}*{$vo.num}</span><br/>
</foreach>
</td>
</tr>
<tr>
<th>支付时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.pay_time)}</span>
</td>
</tr>
<tr>
<th>支付方式</th>
<td>
<span>
<if condition="$one.pay_type eq 1">
微信支付
<elseif condition="$one.pay_type eq 2">
积分支付
<elseif condition="$one.pay_type eq 3">
组合支付
</if>
</span>
</td>
</tr>
<tr>
<th>订单完成时间</th>
<td>
<span>
<if condition="$one.step eq 5||$one.step eq 9">
{:date('Y-m-d H:i',$vo.end_time)}
<elseif condition="$one.step lt 5">
订单未完成
<elseif condition="$one.step gt 5&&$one.step neq 9">
退款未完成
</if>
</span>
</td>
</tr>
<tr>
<th>订单金额</th>
<td>
<span>{$one.whole}</span>
</td>
</tr>
<tr>
<th>订单积分</th>
<td>
<span>{$one.whole_num}</span>
</td>
</tr>
</table>
<if condition="$one.step gt 5">
<table class="table table-bordered">
<tr>
<th style="width: 40%;">申请退款时间</th>
<td>
<span>
<if condition="$one.refund_time neq 0">
{:date('Y-m-d H:i',$one.refund_time)}
</if>
</span>
</td>
</tr>
<tr>
<th>退款原因</th>
<td>
<span>{$one.cause}</span>
</td>
</tr>
<tr>
<th>退款快递</th>
<td>
<span>{$one.company}</span>
</td>
</tr>
<tr>
<th>退款快递单号</th>
<td>
<span>{$one.com_order}</span>
</td>
</tr>
<tr>
<th>订单退款完成备注</th>
<td>
<if condition="$one.remarkt neq ''">
<span>{$one.remarkt}</span>
</if>
</td>
</tr>
</table>
</if>
</div>
<div class="col-md-5">
<form action="{:url('detailPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<table class="table table-bordered">
<if condition="$one.step eq 2||$one.step eq 1">
<tr>
<th>收货人</th>
<td>
<input type="text" name="name" value="{$one.name}" class="form-control">
</td>
</tr>
<tr>
<th>收货手机号</th>
<td>
<input type="number" name="mobile" value="{$one.mobile}" class="form-control">
</td>
</tr>
<tr>
<th>收货地址</th>
<td>
<input type="text" name="site" value="{$one.site}" class="form-control">
</td>
</tr>
<elseif condition="$one.step gt 2&&$one.step lt 5">
<tr>
<th>收货人</th>
<td>
<span>{$one.name}</span>
</td>
</tr>
<tr>
<th>收货手机号</th>
<td>
<span>{$one.mobile}</span>
</td>
</tr>
<tr>
<th>收货地址</th>
<td>
<span>{$one.site}</span>
</td>
</tr>
<tr>
<th>快递公司</th>
<td>
<select name="step" class="form-control" style="width: 120px;">
<foreach name="kd" item="vo">
<option value="{$vo.id}" <eq name="$one.kid" value="$vo.id">selected</eq>>{$vo.name}</option>
</foreach>
</select>
</td>
</tr>
<tr>
<th>快递单号</th>
<td>
<input type="text" name="kd_num" value="{$one.kd_num}" class="form-control">
</td>
</tr>
<elseif condition="$one.step gt 5">
<tr>
<th>收货人</th>
<td>
<span>{$one.name}</span>
</td>
</tr>
<tr>
<th>收货手机号</th>
<td>
<span>{$one.mobile}</span>
</td>
</tr>
<tr>
<th>收货地址</th>
<td>
<span>{$one.site}</span>
</td>
</tr>
<tr>
<th>快递公司</th>
<td>
<span>$one.kname</span>
</td>
</tr>
<tr>
<th>快递单号</th>
<td>
<span>{$one.kd_num}</span>
</td>
</tr>
</if>
</table>
<if condition="$one.step elt 5">
<input type="hidden" value="{$one.id}" name="id">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
<a href="{$url}" class="btn btn-primary" >返回</a>
</div>
</div>
</if>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单详情</a></li>
</ul>
<div class="row">
<div class="col-md-5">
<table class="table table-bordered">
<tr>
<th style="width: 40%;">订单编号</th>
<td>
<span>{$one.order_num}</span>
</td>
</tr>
<tr>
<th>订单状态</th>
<td>
<span>
<if condition="$one.step eq 1">
待支付
<elseif condition="$one.step eq 2">
待发货
<elseif condition="$one.step eq 3">
待收货
<elseif condition="$one.step eq 4">
待评价
<elseif condition="$one.step eq 5">
已完成
<elseif condition="$one.step eq 6">
待审核
<elseif condition="$one.step eq 7">
待退货
<elseif condition="$one.step eq 8">
待退款
<elseif condition="$one.step eq 9">
已退款
</if>
</span>
</td>
</tr>
<tr>
<th>下单用户</th>
<td>
<span>{$one.user_nickname}</span>
</td>
</tr>
<tr>
<th>下单时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.create_time)}</span>
</td>
</tr>
<tr>
<th>所购商品</th>
<td>
<foreach name="all" item="vo">
<span>{$vo.name}*{$vo.num}</span><br/>
</foreach>
</td>
</tr>
<tr>
<th>支付时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.pay_time)}</span>
</td>
</tr>
<tr>
<th>支付方式</th>
<td>
<span>
<if condition="$one.pay_type eq 1">
微信支付
<elseif condition="$one.pay_type eq 2">
积分支付
<elseif condition="$one.pay_type eq 3">
组合支付
</if>
</span>
</td>
</tr>
<tr>
<th>订单金额</th>
<td>
<span>{$one.whole}</span>
</td>
</tr>
<tr>
<th>订单积分</th>
<td>
<span>{$one.whole_num}</span>
</td>
</tr>
</table>
</div>
<div class="col-md-5">
<form action="{:url('fhPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<table class="table table-bordered">
<tr>
<th>收货人</th>
<td>
<span>{$one.name}</span>
</td>
</tr>
<tr>
<th>收货手机号</th>
<td>
<span>{$one.mobile}</span>
</td>
</tr>
<tr>
<th>收货地址</th>
<td>
<span>{$one.site}</span>
</td>
</tr>
<tr>
<th>快递公司</th>
<td>
<select name="kid" class="form-control">
<foreach name="kd" item="vo">
<option value="{$vo.id}">{$vo.name}</option>
</foreach>
</select>
</td>
</tr>
<tr>
<th>快递单号</th>
<td>
<input type="text" name="kd_num" class="form-control">
</td>
</tr>
</table>
<input type="hidden" value="{$one.id}" name="id">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">发货</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单列表</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
订单号:
<input class="form-control" type="text" name="num" style="width: 200px;" value="{$num|default=''}"
placeholder="请输入订单号">
订单状态:
<select name="step" class="form-control" style="width: 120px;">
<option value>订单状态</option>
<option value="1" <eq name="$step" value="1"> selected </eq> >待支付</option>
<option value="2" <eq name="$step" value="2"> selected </eq> >待发货</option>
<option value="3" <eq name="$step" value="3"> selected </eq> >待收货</option>
<option value="4" <eq name="$step" value="4"> selected </eq> >待评论</option>
<option value="5" <eq name="$step" value="5"> selected </eq> >已完成</option>
<option value="6" <eq name="$step" value="6"> selected </eq> >待审核</option>
<option value="7" <eq name="$step" value="7"> selected </eq> >待退货</option>
<option value="8" <eq name="$step" value="8"> selected </eq> >待退款</option>
<option value="9" <eq name="$step" value="9"> selected </eq> >已退款</option>
</select>
收货人:
<input class="form-control" type="text" name="name" style="width: 200px;" value="{$name|default=''}"
placeholder="请输入收货姓名">
手机号:
<input class="form-control" type="number" name="mobile" style="width: 200px;" value="{$mobile|default=''}"
placeholder="请输入收货手机号">
下单时间:
<input type="text" class="form-control js-bootstrap-datetime" name="start_time"
value="{$start_time|default=''}"
style="width: 140px;" autocomplete="off">-
<input type="text" class="form-control js-bootstrap-datetime" name="end_time"
value="{$end_time|default=''}"
style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
<input type="hidden" name="uid" value="{$uid|default=''}">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('index')}">清空</a>
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>订单号</th>
<th>下单用户</th>
<th>收货人</th>
<th>收货手机号</th>
<th>收货地址</th>
<th>下单时间</th>
<th>支付方式</th>
<th>完成时间</th>
<th>订单状态</th>
<th>订单金额</th>
<th>订单积分</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="all" item="vo">
<tr>
<td>{$vo.order_num}</td>
<td>{$vo['user_nickname']}</td>
<td>{$vo.name}</td>
<td>{$vo.mobile}</td>
<td>{$vo.site}</td>
<td>{:date('Y-m-d H:i',$vo.create_time)}</td>
<td>
<if condition="$vo.pay_type eq 1">
微信支付
<elseif condition="$vo.pay_type eq 2">
积分支付
<elseif condition="$vo.pay_type eq 3">
组合支付
</if>
</td>
<td>
<if condition="$vo.step eq 5||$vo.step eq 9">
{:date('Y-m-d H:i',$vo.end_time)}
<elseif condition="$vo.step lt 5">
订单未完成
<elseif condition="$vo.step gt 5&&$vo.step neq 9">
退款未完成
</if>
</td>
<td>
<if condition="$vo.step eq 1">
待支付
<elseif condition="$vo.step eq 2">
待发货
<elseif condition="$vo.step eq 3">
待收货
<elseif condition="$vo.step eq 4">
待评价
<elseif condition="$vo.step eq 5">
已完成
<elseif condition="$vo.step eq 6">
待审核
<elseif condition="$vo.step eq 7">
待退货
<elseif condition="$vo.step eq 8">
待退款
<elseif condition="$vo.step eq 9">
已退款
</if>
</td>
<td>{$vo.whole}</td>
<td>{$vo.whole_num}</td>
<td>
<a href="{:url('detail',array('id'=>$vo['id'],'sta'=>'1'))}">订单详情</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">订单详情</a></li>
</ul>
<div class="row">
<div class="col-md-5">
<table class="table table-bordered">
<tr>
<th style="width: 40%;">订单编号</th>
<td>
<span>{$one.order_num}</span>
</td>
</tr>
<tr>
<th>订单状态</th>
<td>
<span>
<if condition="$one.step eq 1">
待支付
<elseif condition="$one.step eq 2">
待发货
<elseif condition="$one.step eq 3">
待收货
<elseif condition="$one.step eq 4">
待评价
<elseif condition="$one.step eq 5">
已完成
<elseif condition="$one.step eq 6">
待审核
<elseif condition="$one.step eq 7">
待退货
<elseif condition="$one.step eq 8">
待退款
<elseif condition="$one.step eq 9">
已退款
</if>
</span>
</td>
</tr>
<tr>
<th>下单用户</th>
<td>
<span>{$one.user_nickname}</span>
</td>
</tr>
<tr>
<th>下单时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.create_time)}</span>
</td>
</tr>
<tr>
<th>所购商品</th>
<td>
<foreach name="all" item="vo">
<span>{$vo.name}*{$vo.num} 单价{$vo.price}</span><br/>
</foreach>
</td>
</tr>
<tr>
<th>支付时间</th>
<td>
<span>{:date('Y-m-d H:i',$one.pay_time)}</span>
</td>
</tr>
<tr>
<th>支付方式</th>
<td>
<span>
<if condition="$one.pay_type eq 1">
微信支付
<elseif condition="$one.pay_type eq 2">
积分支付
<elseif condition="$one.pay_type eq 3">
组合支付
</if>
</span>
</td>
</tr>
<tr>
<th>订单金额</th>
<td>
<span>{$one.whole}</span>
</td>
</tr>
</table>
</div>
<div class="col-md-5">
<form action="{:url('refundPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<table class="table table-bordered">
<tr>
<th>收货人</th>
<td>
<span>{$one.name}</span>
</td>
</tr>
<tr>
<th>收货手机号</th>
<td>
<span>{$one.mobile}</span>
</td>
</tr>
<tr>
<th>收货地址</th>
<td>
<span>{$one.site}</span>
</td>
</tr>
<tr>
<th>快递单号</th>
<td>
<span>{$one.kd_num}</span>
</td>
</tr>
<tr>
<th>退款原因</th>
<td>
<span>{$one.cause}</span>
</td>
</tr>
<tr>
<th>退款额度</th>
<td>
<input type="number" name="tui" class="form-control">
</td>
</tr>
<tr>
<th>订单退款备注</th>
<td>
<input type="text" name="remarkt" class="form-control">
</td>
</tr>
</table>
<input type="hidden" value="{$one.id}" name="id">
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">确认退款</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
... ...