301 lines
12 KiB
PHP
Executable File
301 lines
12 KiB
PHP
Executable File
<?php /*a:2:{s:89:"/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html";i:1639301896;s:84:"/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/layout1.html";i:1639291789;}*/ ?>
|
|
<?php if(!$admin['pjax']): ?>
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="renderer" content="webkit">
|
|
<?php endif; ?>
|
|
|
|
<title><?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?></title>
|
|
|
|
<?php if(!$admin['pjax']): ?>
|
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
|
<link rel="stylesheet" href="/static/layui-admin/dist/layuiadmin/layui/css/layui.css?v=2.6.6.20211117" media="all">
|
|
<link rel="stylesheet" href="/static/layui-admin/dist/layuiadmin/style/like.css?v=2.6.6.20211117" media="all">
|
|
<script src="/static/layui-admin/dist/layuiadmin/layui/layui.js?v=2.6.6.20211117"></script>
|
|
</head>
|
|
<body class="hold-transition skin-blue sidebar-mini">
|
|
<?php endif; ?>
|
|
<!-- 内容 -->
|
|
<div id="pjax-container">
|
|
|
|
<style>
|
|
.layui-form-label{
|
|
width:180px;
|
|
}
|
|
.div-flex {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: left;
|
|
}
|
|
|
|
.width-160 {
|
|
width: 200px;
|
|
float: left;
|
|
display: block;
|
|
padding: 9px 15px;
|
|
font-weight: 400;
|
|
}
|
|
.layui-table th {
|
|
text-align: center;
|
|
}
|
|
.table-margin{
|
|
margin-left: 50px;
|
|
margin-right: 50px;
|
|
text-align: center;
|
|
}
|
|
.image{
|
|
height:80px;
|
|
width: 80px;
|
|
}
|
|
|
|
.mt50{
|
|
margin-left: 50px;
|
|
}
|
|
</style>
|
|
|
|
<div class="layui-card-body" >
|
|
<!--基本信息-->
|
|
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
|
|
<input type="hidden" class="order_id" name="order_id" value="<?php echo htmlentities($detail['id']); ?>">
|
|
|
|
<div class="layui-form-item">
|
|
<fieldset class="layui-elem-field layui-field-title">
|
|
<legend>订单信息</legend>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="layui-form-item div-flex">
|
|
<label class="layui-form-label ">订单编号:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['order_sn']); ?></div>
|
|
<label class="layui-form-label ">订单状态:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['order_status_text']); ?></div>
|
|
<label class="layui-form-label ">下单时间:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['create_time']); ?></div>
|
|
<label class="layui-form-label ">支付时间:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['pay_time']); ?></div>
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
<fieldset class="layui-elem-field layui-field-title">
|
|
<legend>会员信息</legend>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="layui-form-item div-flex">
|
|
<label class="layui-form-label ">会员编号:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['user']['sn']); ?></div>
|
|
<label class="layui-form-label ">会员昵称:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['user']['nickname']); ?></div>
|
|
<label class="layui-form-label ">手机号码:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['user']['mobile']); ?></div>
|
|
<label class="layui-form-label ">注册时间:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['user']['create_time']); ?></div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<fieldset class="layui-elem-field layui-field-title">
|
|
<legend>收货信息</legend>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="layui-form-item div-flex">
|
|
<label class="layui-form-label ">收货人:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['consignee']); ?></div>
|
|
<label class="layui-form-label ">手机号:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['mobile']); ?></div>
|
|
<label class="layui-form-label ">收货地址:</label>
|
|
<div class="width-160"><?php echo htmlentities($detail['delivery_address']); ?></div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<fieldset class="layui-elem-field layui-field-title">
|
|
<legend>快递信息</legend>
|
|
</fieldset>
|
|
</div>
|
|
<?php if(empty($detail['invoice_no']) || (($detail['invoice_no'] instanceof \think\Collection || $detail['invoice_no'] instanceof \think\Paginator ) && $detail['invoice_no']->isEmpty())): ?>
|
|
<div class="layui-form-item div-flex">
|
|
<label class="layui-form-label"></label>
|
|
<div class="width-160">暂无物流信息</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="layui-form-item div-flex">
|
|
<label class="layui-form-label ">发货时间:</label>
|
|
<div class="width-160"><?php echo htmlentities((isset($detail['shipping_time']) && ($detail['shipping_time'] !== '')?$detail['shipping_time']: "未知")); ?></div>
|
|
<label class="layui-form-label ">快递公司:</label>
|
|
<div class="width-160"><?php echo htmlentities((isset($detail['invoice_name']) && ($detail['invoice_name'] !== '')?$detail['invoice_name']:"未知")); ?></div>
|
|
<label class="layui-form-label ">快递单号:</label>
|
|
<div class="width-160"><?php echo htmlentities((isset($detail['invoice_no']) && ($detail['invoice_no'] !== '')?$detail['invoice_no']: "未知")); ?></div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="layui-form-item">
|
|
<fieldset class="layui-elem-field layui-field-title">
|
|
<legend>商品信息</legend>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="layui-form-item table-margin">
|
|
<table class="layui-table">
|
|
<colgroup>
|
|
<col width="250">
|
|
<col width="100">
|
|
<col width="100">
|
|
<col width="100">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>商品信息</th>
|
|
<th>价格(元)</th>
|
|
<th>数量</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($detail['order_goods'] as $k => $goods): ?>
|
|
<tr>
|
|
<td>
|
|
<div style="text-align: left">
|
|
<div class="layui-col-md3">
|
|
<img src="<?php echo htmlentities($goods['img']); ?>" class="image-show image" >
|
|
</div>
|
|
<div class="layui-col-md9">
|
|
<p style="margin-top: 10px"><?php echo htmlentities($goods['goods_name']); ?></p>
|
|
<br>
|
|
<p><?php echo htmlentities($goods['item_value']); ?></p>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>¥<?php echo htmlentities($goods['goods_price']); ?></td>
|
|
<td><?php echo htmlentities($goods['goods_num']); ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr>
|
|
<td colspan="2"></td>
|
|
<td style="text-align: left">
|
|
<p>商品金额:¥<?php echo htmlentities($detail['goods_price']); ?></p>
|
|
<p>应付金额:¥<?php echo htmlentities($detail['order_amount']); ?></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
<fieldset class="layui-elem-field layui-field-title">
|
|
<legend>订单操作</legend>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="layui-form-item div-flex ">
|
|
<div class="layui-input-block ">
|
|
|
|
<?php if($detail['order_status'] == '1'): ?>
|
|
<!-- <button type="submit" class="layui-btn layui-btn-normal width_160 " id="refund">退款</button>-->
|
|
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="delivery">发货</button>
|
|
<?php endif; if($detail['order_status'] == '2'): ?>
|
|
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 " id="confirm">确认收货</button>
|
|
<?php endif; ?>
|
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary width_160 " id="back">返回</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
|
layui.config({
|
|
version:"2.6.6.20211117",
|
|
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
}).use(['index', 'element', 'jquery', 'like'], function () {
|
|
var $ = layui.$;
|
|
var like = layui.like;
|
|
|
|
//主图放大
|
|
$(document).on('click', '.image-show', function () {
|
|
var src = $(this).attr('src');
|
|
like.showImg(src,600);
|
|
});
|
|
|
|
|
|
$('#back').click(function () {
|
|
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
|
|
parent.layer.close(index);
|
|
parent.layui.table.reload('order-lists');
|
|
return true;
|
|
});
|
|
|
|
//取消订单
|
|
$('#cancel').click(function () {
|
|
var order_id = $('.order_id').val();
|
|
layer.confirm('确认取消订单吗?', {
|
|
btn: ['确认','取消'] //按钮
|
|
}, function(){
|
|
like.ajax({
|
|
url: '<?php echo url("order/cancel"); ?>'
|
|
, data: {'order_id': order_id}
|
|
, type: 'post'
|
|
, success: function (res) {
|
|
if (res.code == 1) {
|
|
layui.layer.msg(res.msg, {
|
|
offset: '15px'
|
|
, icon: 1
|
|
, time: 1000
|
|
},function () {
|
|
location.reload();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
//发货
|
|
$('#delivery').click(function () {
|
|
var id = $('.order_id').val();
|
|
layer.open({
|
|
type: 2
|
|
,title: '订单发货'
|
|
,content: '<?php echo url("order/delivery"); ?>?id='+id
|
|
,area: ['90%', '90%']
|
|
,yes: function(index, layero){
|
|
}
|
|
})
|
|
});
|
|
|
|
//确认收货
|
|
$('#confirm').click(function () {
|
|
var id = $('.order_id').val();
|
|
layer.confirm('确认订单商品已收货吗??', {
|
|
btn: ['确认','取消'] //按钮
|
|
}, function(){
|
|
like.ajax({
|
|
url: '<?php echo url("order/confirm"); ?>'
|
|
, data: {'order_id': id}
|
|
, type: 'post'
|
|
, success: function (res) {
|
|
if (res.code == 1) {
|
|
layui.layer.msg(res.msg, {
|
|
offset: '15px'
|
|
, icon: 1
|
|
, time: 1000
|
|
},function () {
|
|
location.reload();
|
|
});
|
|
}
|
|
},
|
|
});
|
|
});
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
<?php if(!$admin['pjax']): ?>
|
|
<?php endif; if(!$admin['pjax']): ?>
|
|
</body>
|
|
</html>
|
|
<?php endif; ?>
|