mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-01 03:18:33 +08:00
订单详情
This commit is contained in:
parent
37accedd62
commit
18c670ea1f
@ -314,7 +314,7 @@ class OrderController extends CommonController
|
||||
$params['user_id'] = $params['value'];
|
||||
$params['creator'] = $this->admin['id'];
|
||||
$params['creator_name'] = $this->admin['username'];
|
||||
$ret = OrderService::OrderConfirm($params);
|
||||
$ret = OrderService::OrderCollect($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
|
||||
|
@ -123,9 +123,12 @@ class CommonController extends Controller
|
||||
$this->assign('default_theme', $default_theme);
|
||||
|
||||
// 控制器静态文件状态css,js
|
||||
$module_css = MODULE_NAME.DS.$default_theme.DS.'Css'.DS.CONTROLLER_NAME.'.css';
|
||||
$module_css = MODULE_NAME.DS.$default_theme.DS.'Css'.DS.CONTROLLER_NAME;
|
||||
$module_css .= file_exists(ROOT_PATH.'Public'.DS.$module_css.'.'.ACTION_NAME.'.css') ? '.'.ACTION_NAME.'.css' : '.css';
|
||||
$this->assign('module_css', file_exists(ROOT_PATH.'Public'.DS.$module_css) ? $module_css : '');
|
||||
$module_js = MODULE_NAME.DS.$default_theme.DS.'Js'.DS.CONTROLLER_NAME.'.js';
|
||||
|
||||
$module_js = MODULE_NAME.DS.$default_theme.DS.'Js'.DS.CONTROLLER_NAME;
|
||||
$module_js .= file_exists(ROOT_PATH.'Public'.DS.$module_js.'.'.ACTION_NAME.'.js') ? '.'.ACTION_NAME.'.js' : '.js';
|
||||
$this->assign('module_js', file_exists(ROOT_PATH.'Public'.DS.$module_js) ? $module_js : '');
|
||||
|
||||
// 导航
|
||||
|
@ -92,6 +92,77 @@ class OrderController extends CommonController
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-08
|
||||
* @desc description
|
||||
*/
|
||||
public function Detail()
|
||||
{
|
||||
// 参数
|
||||
$params = array_merge($_POST, $_GET);
|
||||
$params['user'] = $this->user;
|
||||
|
||||
// 条件
|
||||
$where = OrderService::HomeOrderListWhere($params);
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
'limit_start' => 0,
|
||||
'limit_number' => 1,
|
||||
'where' => $where,
|
||||
);
|
||||
$data = OrderService::OrderList($data_params);
|
||||
if(!empty($data['data'][0]))
|
||||
{
|
||||
// 发起支付 - 支付方式
|
||||
$this->assign('buy_payment_list', ResourcesService::BuyPaymentList(['is_enable'=>1, 'is_open_user'=>1]));
|
||||
|
||||
$this->assign('data', $data['data'][0]);
|
||||
$this->display('Detail');
|
||||
} else {
|
||||
$this->assign('msg', L('common_not_data_tips'));
|
||||
$this->display('/Public/TipsError');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 评价页面
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-08
|
||||
* @desc description
|
||||
*/
|
||||
public function CommentsInfo()
|
||||
{
|
||||
// 参数
|
||||
$params = array_merge($_POST, $_GET);
|
||||
$params['user'] = $this->user;
|
||||
|
||||
// 条件
|
||||
$where = OrderService::HomeOrderListWhere($params);
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
'limit_start' => 0,
|
||||
'limit_number' => 1,
|
||||
'where' => $where,
|
||||
);
|
||||
$data = OrderService::OrderList($data_params);
|
||||
if(!empty($data['data'][0]))
|
||||
{
|
||||
$this->assign('data', $data['data'][0]);
|
||||
$this->display('CommentsInfo');
|
||||
} else {
|
||||
$this->assign('msg', L('common_not_data_tips'));
|
||||
$this->display('/Public/TipsError');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
* @author Devil
|
||||
@ -169,7 +240,7 @@ class OrderController extends CommonController
|
||||
* @date 2018-09-30
|
||||
* @desc description
|
||||
*/
|
||||
public function Confirm()
|
||||
public function Collect()
|
||||
{
|
||||
if(IS_POST)
|
||||
{
|
||||
@ -177,7 +248,7 @@ class OrderController extends CommonController
|
||||
$params['user_id'] = $this->user['id'];
|
||||
$params['creator'] = $this->user['id'];
|
||||
$params['creator_name'] = $this->user['user_name_view'];
|
||||
$ret = OrderService::OrderConfirm($params);
|
||||
$ret = OrderService::OrderCollect($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
} else {
|
||||
$this->assign('msg', L('common_unauthorized_access'));
|
||||
|
@ -112,7 +112,7 @@
|
||||
</empty>
|
||||
</div>
|
||||
|
||||
<!--订单 -->
|
||||
<!-- 商品列表 -->
|
||||
<div class="order-detail">
|
||||
<div class="goods-table">
|
||||
<h3>确认订单信息</h3>
|
||||
|
@ -0,0 +1,33 @@
|
||||
<include file="Public/Header" />
|
||||
|
||||
<!-- header top nav -->
|
||||
<include file="Public/HeaderTopNav" />
|
||||
|
||||
<!-- search -->
|
||||
<include file="Public/NavSearch" />
|
||||
|
||||
<!-- header nav -->
|
||||
<include file="Public/HeaderNav" />
|
||||
|
||||
<!-- goods category -->
|
||||
<include file="Public/GoodsCategory" />
|
||||
|
||||
<!-- content -->
|
||||
<div class="am-container user-main">
|
||||
|
||||
<!-- user menu start -->
|
||||
<include file="Public/UserMenu" />
|
||||
<!-- user menu end -->
|
||||
|
||||
<!-- content start -->
|
||||
<div class="user-content">
|
||||
<div class="user-content-body">
|
||||
hello
|
||||
</div>
|
||||
</div>
|
||||
<!-- content end -->
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
328
service/Application/Home/View/Default/Order/Detail.html
Normal file
328
service/Application/Home/View/Default/Order/Detail.html
Normal file
@ -0,0 +1,328 @@
|
||||
<include file="Public/Header" />
|
||||
|
||||
<!-- header top nav -->
|
||||
<include file="Public/HeaderTopNav" />
|
||||
|
||||
<!-- search -->
|
||||
<include file="Public/NavSearch" />
|
||||
|
||||
<!-- header nav -->
|
||||
<include file="Public/HeaderNav" />
|
||||
|
||||
<!-- goods category -->
|
||||
<include file="Public/GoodsCategory" />
|
||||
|
||||
<!-- content -->
|
||||
<div class="am-container user-main">
|
||||
|
||||
<!-- user menu start -->
|
||||
<include file="Public/UserMenu" />
|
||||
<!-- user menu end -->
|
||||
|
||||
<!-- content start -->
|
||||
<div class="user-content">
|
||||
<div class="user-content-body">
|
||||
<!-- 进度环节 -->
|
||||
<if condition="!in_array($data['status'], [5,6])">
|
||||
<ul class="progress">
|
||||
<li class="steps-success <if condition="$data['status'] LT 2">current</if>">
|
||||
<p class="digital">
|
||||
<i class="am-icon-check"></i>
|
||||
</p>
|
||||
<div class="base">
|
||||
<p class="title">拍下商品</p>
|
||||
<notempty name="data.add_time">
|
||||
<p class="date">{{:date('Y-m-d H:i:s', $data['add_time'])}}</p>
|
||||
</notempty>
|
||||
</div>
|
||||
</li>
|
||||
<li class="<if condition="$data['status'] GT 1">steps-success</if> <if condition="$data['status'] EQ 2">current</if>">
|
||||
<i class="step"></i>
|
||||
<p class="digital">
|
||||
<if condition="$data['status'] GT 1"><i class="am-icon-check"></i><else />2</if>
|
||||
</p>
|
||||
<div class="base">
|
||||
<p class="title">付款</p>
|
||||
<notempty name="data.pay_time">
|
||||
<p class="date">{{:date('Y-m-d H:i:s', $data['pay_time'])}}</p>
|
||||
</notempty>
|
||||
</div>
|
||||
</li>
|
||||
<li class="<if condition="$data['status'] GT 2">steps-success</if> <if condition="$data['status'] EQ 3">current</if>">
|
||||
<i class="step"></i>
|
||||
<p class="digital">
|
||||
<if condition="$data['status'] GT 2"><i class="am-icon-check"></i><else />3</if>
|
||||
</p>
|
||||
<div class="base">
|
||||
<p class="title">卖家发货</p>
|
||||
<notempty name="data.delivery_time">
|
||||
<p class="date">{{:date('Y-m-d H:i:s', $data['delivery_time'])}}</p>
|
||||
</notempty>
|
||||
</div>
|
||||
</li>
|
||||
<li class="<if condition="$data['status'] GT 3">steps-success</if> <if condition="$data['status'] EQ 4">current</if>">
|
||||
<i class="step"></i>
|
||||
<p class="digital">
|
||||
<if condition="$data['status'] GT 3"><i class="am-icon-check"></i><else />4</if>
|
||||
</p>
|
||||
<div class="base">
|
||||
<p class="title">确认收货</p>
|
||||
<notempty name="data.collect_time">
|
||||
<p class="date">{{:date('Y-m-d H:i:s', $data['collect_time'])}}</p>
|
||||
</notempty>
|
||||
</div>
|
||||
</li>
|
||||
<li class="<if condition="$data['user_is_comments'] GT 0">steps-success</if> <if condition="$data['user_is_comments'] GT 0">current</if>">
|
||||
<i class="step"></i>
|
||||
<p class="digital">
|
||||
<if condition="$data['user_is_comments'] GT 0"><i class="am-icon-check"></i><else />5</if>
|
||||
</p>
|
||||
<div class="base">
|
||||
<p class="title">评价</p>
|
||||
<notempty name="data.user_is_comments">
|
||||
<p class="date">{{:date('Y-m-d H:i:s', $data['user_is_comments'])}}</p>
|
||||
</notempty>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</if>
|
||||
|
||||
<!-- 基础信息 -->
|
||||
<div class="order-base">
|
||||
<div class="base-left">
|
||||
<div class="am-panel am-panel-default">
|
||||
<div class="am-panel-hd">订单信息</div>
|
||||
<div class="am-panel-bd">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">收货地址:</div>
|
||||
<div class="items-detail am-fl">{{$data.receive_name}}, {{$data.receive_tel}}, {{$data.receive_province_name}} {{$data.receive_city_name}} {{$data.receive_county_name}} {{$data.receive_address}}</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">订单编号:</div>
|
||||
<div class="items-detail am-fl">{{$data.order_no}}</div>
|
||||
</div>
|
||||
<notempty name="data.user_note">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">用户留言:</div>
|
||||
<div class="items-detail am-fl">{{$data.user_note}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.add_time">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">下单时间:</div>
|
||||
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['add_time'])}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.confirm_time">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">确认时间:</div>
|
||||
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['confirm_time'])}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.pay_time">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">付款时间:</div>
|
||||
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['pay_time'])}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.delivery_time">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">发货时间:</div>
|
||||
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['delivery_time'])}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.collect_time">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">收货时间:</div>
|
||||
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['collect_time'])}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.user_is_comments">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">评论时间:</div>
|
||||
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['user_is_comments'])}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="base-right">
|
||||
<div class="status">
|
||||
<if condition="$data['status'] EQ 4">
|
||||
<i class="am-icon-check-circle icon-success am-fl"></i>
|
||||
<else />
|
||||
<i class="am-icon-info-circle icon-tips am-fl"></i>
|
||||
</if>
|
||||
<p class="status-name am-fl">{{$data.status_name}}</p>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<!-- 0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭 -->
|
||||
<if condition="$data['status'] neq 2">
|
||||
<span>您可以</span>
|
||||
</if>
|
||||
<if condition="in_array($data['status'], [0,1])">
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius submit-ajax submit-cancel" data-url="{{:U('Home/Order/Cancel')}}" data-id="{{$data.id}}" data-view="reload">取消</button>
|
||||
</if>
|
||||
<if condition="in_array($data['status'], [1])">
|
||||
<button class="am-btn am-btn-primary am-btn-xs am-radius submit-pay" data-id="{{$data.id}}" data-payment-id="{{$data.payment_id}}" data-am-modal="{target: '#order-pay-popup'}">支付</button>
|
||||
</if>
|
||||
<if condition="in_array($data['status'], [3])">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius submit-ajax submit-confirm" data-url="{{:U('Home/Order/Collect')}}" data-id="{{$data.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?">收货</button>
|
||||
</if>
|
||||
<if condition="in_array($data['status'], [4]) and $data['user_is_comments'] eq 0">
|
||||
<a href="{{:U('Home/Order/CommentsInfo', ['id'=>$data['id']])}}" target="_blank" class="am-btn am-btn-primary am-btn-xs am-radius">评价</a>
|
||||
</if>
|
||||
<if condition="in_array($data['status'], [4,5,6])">
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius submit-delete" data-url="{{:U('Home/Order/Delete')}}" data-id="{{$data.id}}" data-view="jump" data-jump="{{:U('Home/Order/Index')}}">删除</button>
|
||||
</if>
|
||||
</div>
|
||||
<div class="logistics">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">快递公司:</div>
|
||||
<div class="items-detail am-fl">
|
||||
<notempty name="data.express_name">{{$data.express_name}}</notempty>
|
||||
</div>
|
||||
</div>
|
||||
<notempty name="data.express_number">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">快递单号:</div>
|
||||
<div class="items-detail am-fl">{{$data.express_number}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<notempty name="data.items">
|
||||
<div class="order-goods">
|
||||
<table class="am-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商品信息</th>
|
||||
<th class="am-hide-sm-only">单价</th>
|
||||
<th class="am-hide-sm-only">数量</th>
|
||||
<th class="am-hide-sm-only">金额</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<foreach name="data.items" item="goods">
|
||||
<tr id="data-list-{{$goods.id}}" data-id="{{$goods.id}}" data-goods-id="{{$goods.goods_id}}">
|
||||
<td class="base">
|
||||
<div class="goods-detail">
|
||||
<a href="{{$goods.goods_url}}" target="_blank">
|
||||
<img src="{{$goods.images}}">
|
||||
</a>
|
||||
<div class="goods-base">
|
||||
<a href="{{$goods.goods_url}}" target="_blank" class="goods-title">{{$goods.title}}</a>
|
||||
<notempty name="goods.attribute">
|
||||
<ul class="goods-attr">
|
||||
<foreach name="goods.attribute" item="attr">
|
||||
<li>{{$attr.attr_type_name}}:{{$attr.attr_name}}</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
</notempty>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wap-base am-show-sm-only">
|
||||
<if condition="$goods['original_price'] gt 0">
|
||||
<span class="original-price">¥{{$goods.original_price}}</span>
|
||||
</if>
|
||||
<strong class="total-price-content">¥{{$goods.price}}</strong>
|
||||
<span class="wap-number">x{{$goods.buy_number}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="price am-hide-sm-only">
|
||||
<if condition="$goods['original_price'] gt 0">
|
||||
<p class="original-price">¥{{$goods.original_price}}</p>
|
||||
</if>
|
||||
<p class="line-price">¥{{$goods.price}}</p>
|
||||
</td>
|
||||
<td class="number am-hide-sm-only">
|
||||
x{{$goods.buy_number}}
|
||||
</td>
|
||||
<td class="total-price am-hide-sm-only">
|
||||
<strong class="total-price-content">¥{{$goods.total_price}}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="am-alert am-alert-secondary">
|
||||
<notempty name="data.price">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">商品总价:</div>
|
||||
<div class="items-detail am-fl">¥{{$data.price}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.total_price">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">订单总价:</div>
|
||||
<div class="items-detail am-fl line-price">¥{{$data.total_price}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.preferential_price">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">优惠金额:</div>
|
||||
<div class="items-detail am-fl">-¥{{$data.preferential_price}}</div>
|
||||
</div>
|
||||
</notempty>
|
||||
<notempty name="data.pay_price">
|
||||
<div class="items">
|
||||
<div class="items-title am-fl">支付金额:</div>
|
||||
<div class="items-detail am-fl">
|
||||
<strong class="total-price-content">¥{{$data.pay_price}}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</notempty>
|
||||
</div>
|
||||
</notempty>
|
||||
</div>
|
||||
|
||||
<!-- 支付弹窗 -->
|
||||
<div class="am-popup am-radius" id="order-pay-popup">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">支付</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<form class="am-form pay-form" method="post" action="{{:U('Home/Order/Pay')}}">
|
||||
<!-- 支付方式 -->
|
||||
<div class="business-item">
|
||||
<h3>选择支付</h3>
|
||||
<notempty name="buy_payment_list">
|
||||
<ul class="payment-list" data-type="payment">
|
||||
<foreach name="buy_payment_list" item="payment">
|
||||
<li class="payment-items-{{$payment.id}}" data-value="{{$payment.id}}">
|
||||
<notempty name="payment.logo">
|
||||
<img src="{{$payment.logo}}" />
|
||||
</notempty>
|
||||
<span>{{$payment.name}}</span>
|
||||
<i class="icon-active"></i>
|
||||
</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
</notempty>
|
||||
<empty name="buy_payment_list">
|
||||
<div class="table-no"><i class="am-icon-warning"></i> {{:L('order_payment_not_data_tips')}}</div>
|
||||
</empty>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" value="0" />
|
||||
<input type="hidden" name="payment_id" value="0" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">确认支付</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content end -->
|
||||
</div>
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
@ -183,10 +183,13 @@
|
||||
<button class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block submit-pay" data-id="{{$order.id}}" data-payment-id="{{$order.payment_id}}" data-am-modal="{target: '#order-pay-popup'}">支付</button>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [3])">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-ajax submit-confirm" data-url="{{:U('Home/Order/Confirm')}}" data-id="{{$order.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?">收货</button>
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-ajax submit-confirm" data-url="{{:U('Home/Order/Collect')}}" data-id="{{$order.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?">收货</button>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [4]) and $order['user_is_comments'] eq 0">
|
||||
<a href="{{:U('Home/Order/CommentsInfo', ['id'=>$order['id']])}}" target="_blank" class="am-btn am-btn-primary am-btn-xs am-radius am-btn-block">评价</a>
|
||||
</if>
|
||||
<if condition="in_array($order['status'], [4,5,6])">
|
||||
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:U('Home/Order/Delete')}}" data-id="{{$order.id}}" data-view="reload">删除</button>
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:U('Home/Order/Delete')}}" data-id="{{$order.id}}" data-view="reload">删除</button>
|
||||
</if>
|
||||
</td>
|
||||
</if>
|
||||
|
@ -387,6 +387,12 @@ class OrderService
|
||||
'user_is_delete_time' => 0,
|
||||
];
|
||||
|
||||
// 订单id
|
||||
if(!empty($params['id']))
|
||||
{
|
||||
$where['id'] = intval($params['id']);
|
||||
}
|
||||
|
||||
// 用户id
|
||||
if(!empty($params['user']))
|
||||
{
|
||||
@ -511,12 +517,26 @@ class OrderService
|
||||
$detail_field = 'id,goods_id,title,images,original_price,price,attribute,buy_number';
|
||||
$images_host = C('IMAGE_HOST');
|
||||
$order_status_list = L('common_order_user_status');
|
||||
$order_pay_status = L('common_order_pay_status');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 订单基础
|
||||
$total_price = 0;
|
||||
$v['status_name'] = $order_status_list[$v['status']]['name'];
|
||||
$v['payment_name'] = '';
|
||||
|
||||
// 状态
|
||||
$v['status_name'] = $order_status_list[$v['status']]['name'];
|
||||
|
||||
// 支付状态
|
||||
$v['pay_status_name'] = $order_pay_status[$v['pay_status']]['name'];
|
||||
|
||||
// 快递公司
|
||||
$v['express_name'] = ResourcesService::ExpressName(['express_id'=>$v['express_id']]);
|
||||
|
||||
// 收件人地址
|
||||
$v['receive_province_name'] = ResourcesService::RegionName(['region_id'=>$v['receive_province']]);
|
||||
$v['receive_city_name'] = ResourcesService::RegionName(['region_id'=>$v['receive_city']]);
|
||||
$v['receive_county_name'] = ResourcesService::RegionName(['region_id'=>$v['receive_county']]);
|
||||
|
||||
// 订单详情
|
||||
$items = $detail_m->where(['order_id'=>$v['id']])->field($detail_field)->select();
|
||||
@ -527,7 +547,9 @@ class OrderService
|
||||
$vs['images'] = empty($vs['images']) ? null : $images_host.$vs['images'];
|
||||
$vs['attribute'] = empty($vs['attribute']) ? null : json_decode($vs['attribute'], true);
|
||||
$vs['goods_url'] = HomeUrl('Goods', 'Index', ['id'=>$vs['goods_id']]);
|
||||
$total_price += $vs['buy_number']*$vs['price'];
|
||||
$vs['total_price'] = $vs['buy_number']*$vs['price'];
|
||||
|
||||
$total_price += $vs['total_price'];
|
||||
}
|
||||
}
|
||||
$v['items'] = $items;
|
||||
@ -694,6 +716,7 @@ class OrderService
|
||||
'status' => 3,
|
||||
'express_id' => intval($params['express_id']),
|
||||
'express_number' => I('express_number', '', '', $params),
|
||||
'delivery_time' => time(),
|
||||
'upd_time' => time(),
|
||||
];
|
||||
if($m->where($where)->save($data))
|
||||
@ -719,7 +742,7 @@ class OrderService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function OrderConfirm($params = [])
|
||||
public static function OrderCollect($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
@ -755,8 +778,9 @@ class OrderService
|
||||
}
|
||||
|
||||
$data = [
|
||||
'status' => 4,
|
||||
'upd_time' => time(),
|
||||
'status' => 4,
|
||||
'collect_time' => time(),
|
||||
'upd_time' => time(),
|
||||
];
|
||||
if($m->where($where)->save($data))
|
||||
{
|
||||
|
@ -25,6 +25,20 @@ class ResourcesService
|
||||
return M('Region')->where(['id'=>intval($params['region_id'])])->getField('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取地区名称
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-09-19
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function ExpressName($params = [])
|
||||
{
|
||||
return M('Express')->where(['id'=>intval($params['express_id'])])->getField('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* 快递列表
|
||||
* @author Devil
|
||||
|
@ -702,6 +702,8 @@ function DataDelete(e)
|
||||
{
|
||||
var id = e.data('id');
|
||||
var url = e.data('url');
|
||||
var view = e.data('view') || 'delete';
|
||||
var jump = e.data('jump') || null;
|
||||
var title = e.data('title') || '温馨提示';
|
||||
var msg = e.data('msg') || '删除后不可恢复、确认操作吗?';
|
||||
|
||||
@ -727,6 +729,49 @@ function DataDelete(e)
|
||||
{
|
||||
Prompt(result.msg, 'success');
|
||||
|
||||
switch(view)
|
||||
{
|
||||
// 成功则删除数据列表
|
||||
case 'delete' :
|
||||
Prompt(result.msg, 'success');
|
||||
$('#data-list-'+id).remove();
|
||||
break;
|
||||
|
||||
// 刷新
|
||||
case 'reload' :
|
||||
Prompt(result.msg, 'success');
|
||||
setTimeout(function()
|
||||
{
|
||||
window.location.reload();
|
||||
}, 1500);
|
||||
break;
|
||||
|
||||
// 回调函数
|
||||
case 'fun' :
|
||||
if(IsExitsFunction(value))
|
||||
{
|
||||
window[value](result);
|
||||
} else {
|
||||
Prompt('['+value+']配置方法未定义');
|
||||
}
|
||||
break;
|
||||
|
||||
// 跳转
|
||||
case 'jump' :
|
||||
Prompt(result.msg, 'success');
|
||||
if(jump != null)
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
window.location.href = jump;
|
||||
}, 1500);
|
||||
}
|
||||
break;
|
||||
|
||||
// 默认提示成功
|
||||
default :
|
||||
Prompt(result.msg, 'success');
|
||||
}
|
||||
// 成功则删除数据列表
|
||||
$('#data-list-'+id).remove();
|
||||
} else {
|
||||
|
214
service/Public/Home/Default/Css/Order.Detail.css
Normal file
214
service/Public/Home/Default/Css/Order.Detail.css
Normal file
@ -0,0 +1,214 @@
|
||||
/**
|
||||
* 进度
|
||||
*/
|
||||
ul.progress {
|
||||
margin: 20px 0;
|
||||
}
|
||||
ul.progress li {
|
||||
position: relative;
|
||||
}
|
||||
ul.progress li i.step {
|
||||
display: block;
|
||||
background-color: #e1e1e1;
|
||||
}
|
||||
|
||||
ul.progress li .digital {
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 50px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
color: #e1e1e1;
|
||||
font-weight: 700;
|
||||
border: 6px solid #e1e1e1;
|
||||
}
|
||||
|
||||
ul.progress li .base .title {
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
ul.progress li .base .date {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
ul.progress li.steps-success .digital {
|
||||
border: 6px solid #4CAF50;
|
||||
color: #fff;
|
||||
}
|
||||
ul.progress li.steps-success .digital {
|
||||
background-color: #82cc85;
|
||||
}
|
||||
ul.progress li.steps-success i.step {
|
||||
background-color: #4CAF50;
|
||||
}
|
||||
ul.progress li.current .title {
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
.base-right .icon-tips, .base-right .icon-success {
|
||||
font-size: 50px;
|
||||
}
|
||||
.base-right .icon-tips {
|
||||
color: #6980d0;
|
||||
}
|
||||
.base-right .icon-success {
|
||||
color: #28801c;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 641px) {
|
||||
ul.progress {
|
||||
overflow: hidden;
|
||||
}
|
||||
ul.progress li {
|
||||
float: left;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
}
|
||||
ul.progress li i.step {
|
||||
display: block;
|
||||
height: 6px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
margin: 15px 0 0 -50%;
|
||||
z-index: 1;
|
||||
}
|
||||
ul.progress li .digital {
|
||||
position: absolute;
|
||||
margin-left: calc(50% - 18px);
|
||||
z-index: 2;
|
||||
}
|
||||
ul.progress li .base {
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 641px) {
|
||||
ul.progress li i.step {
|
||||
height: 60px;
|
||||
width: 6px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
ul.progress li .base {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
top: 0;
|
||||
}
|
||||
ul.progress li:not(:first-child) .base {
|
||||
margin-top: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文本列表
|
||||
*/
|
||||
.items {
|
||||
padding: 3px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.items-detail {
|
||||
width: calc(100% - 60px);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单详情基础
|
||||
*/
|
||||
.order-base .am-panel {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.order-base .am-panel-bd, .order-base .base-right {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.order-base, .order-base .status {
|
||||
overflow: hidden;
|
||||
}
|
||||
.order-base .status-name {
|
||||
line-height: 80px;
|
||||
}
|
||||
.order-base .operation .am-btn {
|
||||
margin-left: 15px;
|
||||
}
|
||||
.order-base .logistics {
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media only screen and (min-width: 641px) {
|
||||
.order-base .base-left, .order-base .base-right {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
.order-base {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.order-base .am-panel-default {
|
||||
border-color: #fff;
|
||||
}
|
||||
.order-base .am-panel {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.order-base .base-left {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.order-base .base-right {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 641px) {
|
||||
.order-base .base-right {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 支付弹窗
|
||||
*/
|
||||
.business-item h3 { border-bottom: 3px solid #e3e3e3; margin-top:5px; font-size: 14px;font-weight: 700; }
|
||||
.business-item ul { padding: 10px 3px 5px 5px; overflow: hidden; }
|
||||
.business-item ul li { border:1px solid transparent ;overflow: hidden; float: left; cursor: pointer; padding: 5px; border: 1px solid #eee; margin: 0 10px 10px 0; }
|
||||
.business-item ul li img { width: 36px; height: 36px; }
|
||||
.business-item ul li.selected { border-color: #d2364c ; position: relative; }
|
||||
.business-item ul li.selected i.icon-active { position: absolute; width: 10px; height: 10px; font-size: 0; line-height: 0; right: 0px; bottom: 0px; background: url(../Images/sys_item_selected.gif) no-repeat right bottom; }
|
||||
@media only screen and (min-width:640px) {
|
||||
.business-item ul li {width:calc(33% - 5px); }
|
||||
.business-item ul li:nth-child(3n) { margin-right: 0; }
|
||||
}
|
||||
@media only screen and (max-width:640px) {
|
||||
.business-item ul li { width: calc(50% - 5px); }
|
||||
.business-item ul li:nth-child(2n) { margin-right: 0; }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
.order-goods { margin-top: 20px; }
|
||||
.goods-detail img { width: 80px; height: 80px; }
|
||||
.goods-detail { position: relative; }
|
||||
.goods-title { display: block; max-height: 36px; overflow: hidden; text-overflow: ellipsis; }
|
||||
.goods-title:hover { text-decoration: underline; }
|
||||
.goods-base { position: absolute; top: 0; left: 85px; }
|
||||
.goods-attr { margin-top: 5px; }
|
||||
.goods-attr li { color: #888; line-height: 16px; }
|
||||
.original-price, .line-price { font-family: Verdana,Tahoma,arial; }
|
||||
.original-price { color: #9c9c9c; text-decoration: line-through; }
|
||||
.line-price { color: #3c3c3c; }
|
||||
.line-price, strong.total-price-content { font-weight: 700; }
|
||||
strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
.am-table { margin-bottom: 10px; }
|
||||
.am-table > tbody > tr > td { border-top: 1px solid #F5F5F5; }
|
||||
.am-table > thead > tr > th { border-bottom: 1px solid #f7f7f7; }
|
||||
|
||||
@media only screen and (min-width:640px) {
|
||||
.cart-content table tr .base { width: 40%; }
|
||||
.cart-content table tr .price { width: 20%; }
|
||||
.cart-content table tr .number { width: 20%; }
|
||||
.cart-content table tr .total-price { width: 20%; }
|
||||
.cart-content { margin-top: 20px; }
|
||||
}
|
63
shopxo.sql
63
shopxo.sql
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user