You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
320 lines
14 KiB
320 lines
14 KiB
<?php /*a:2:{s:63:"E:\waibao\ahbcqz\server\app\admin\view\user\ship_log\lists.html";i:1683783520;s:51:"E:\waibao\ahbcqz\server\app\admin\view\layout1.html";i:1679478874;}*/ ?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title><?php echo url(); ?></title>
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="/static/lib/layui/css/layui.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<link rel="stylesheet" href="/static/admin/css/app.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<link rel="stylesheet" href="/static/admin/css/like.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<script src="/static/lib/layui/layui.js?v=<?php echo htmlentities($front_version); ?>"></script>
|
|
<script src="/static/admin/js/app.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<?php echo $js_code; ?>
|
|
<script src="/static/admin/js/jquery.min.js"></script>
|
|
<script src="/static/admin/js/function.js"></script>
|
|
|
|
|
|
<div class="wrapper">
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
|
<div class="layui-colla-item">
|
|
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
|
<div class="layui-colla-content layui-show">
|
|
<p>*会员卡开通记录;</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-card-body layui-form">
|
|
<div class="layui-form-item">
|
|
<div class="layui-row">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">会员搜索:</label>
|
|
</div>
|
|
|
|
<div class="layui-inline">
|
|
<input type="text" name="keyword" id="keyword" placeholder="订单号/会员昵称/手机号"
|
|
autocomplete="off" class="layui-input">
|
|
</div>
|
|
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">类型:</label>
|
|
<div class="layui-input-block">
|
|
<select name="type" id="type">
|
|
<option value="">全部</option>
|
|
<option value="0">免费</option>
|
|
<option value="1">付费</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">订单来源:</label>
|
|
<div class="layui-input-block">
|
|
<select name="order_source" id="order_source">
|
|
<option value="">全部</option>
|
|
<?php foreach($order_source as $item => $val): ?>
|
|
<option value="<?php echo htmlentities($item); ?>"><?php echo htmlentities($val); ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">付款方式:</label>
|
|
<div class="layui-input-block">
|
|
<select name="pay_way" id="pay_way">
|
|
<option value="">全部</option>
|
|
<?php foreach($pay_way as $item => $val): ?>
|
|
<option value="<?php echo htmlentities($item); ?>"><?php echo htmlentities($val); ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-inline">
|
|
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad <?php echo htmlentities($view_theme_color); ?>" lay-submit
|
|
lay-filter="user-order-search">查询
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="layui-tab layui-tab-card" lay-filter="tab-all">
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-body">
|
|
|
|
<table id="user_order_lists" lay-filter="user_order_lists"></table>
|
|
<script type="text/html" id="image">
|
|
<img src="{{d.avatar}}" style="height:40px;width: 40px" class="image-show">
|
|
</script>
|
|
<script type="text/html" id="dayname">
|
|
{{# if(d.vip_day > 0){ }}
|
|
{{d.vip_day}}天
|
|
{{# }else{ }}
|
|
永久
|
|
{{# } }}
|
|
</script>
|
|
|
|
<script type="text/html" id="user_level-operation">
|
|
<!-- <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="edit">编辑</a>-->
|
|
<a class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del">删除</a>
|
|
</script>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.layui-table-cell {
|
|
height: auto;
|
|
}
|
|
</style>
|
|
<script>
|
|
layui.config({
|
|
version:"<?php echo htmlentities($front_version); ?>",
|
|
base: '/static/lib/' //静态资源所在路径
|
|
}).use(['table','form'], function(){
|
|
var $ = layui.$
|
|
,form = layui.form
|
|
,table = layui.table
|
|
,element = layui.element;
|
|
|
|
//图片放大
|
|
$(document).on('click', '.image-show', function () {
|
|
var src = $(this).attr('src');
|
|
like.showImg(src,600);
|
|
});
|
|
|
|
$('.layui-btn.layuiadmin-btn-user_level').on('click', function(){
|
|
var type = $(this).data('type');
|
|
active[type] ? active[type].call(this) : '';
|
|
});
|
|
layui.define(['table', 'form'], function(exports){
|
|
var $ = layui.$
|
|
,table = layui.table
|
|
,form = layui.form;
|
|
|
|
table.render({
|
|
id:'user_order_lists'
|
|
,elem: '#user_order_lists'
|
|
,url: '<?php echo url("user.shipLog/lists"); ?>' //模拟接口
|
|
,cols: [[
|
|
{field: 'order_sn',width:160, title: '订单号'}
|
|
,{field: 'nickname', title: '用户昵称',width:130}
|
|
,{field: 'avatar', title: '用户头像',width:100,toolbar:'#image'}
|
|
,{field: 'mobile', title: '手机号',width:130}
|
|
,{field: 'type_name',width:100, title: '类型'}
|
|
,{field: 'order_source_name',width:100, title:'客户端'}
|
|
,{field: 'pay_way_name',width:100, title:'支付类型'}
|
|
,{field: 'pay_money',width:100, title:'支付金额'}
|
|
,{field: 'ship_name',width:100, title:'会员卡名称'}
|
|
,{field: 'money',width:100, title:'原价'}
|
|
,{field: 'vip_day',width:100, title: '会员时间',toolbar:'#dayname'}
|
|
,{field: 'overdue_time_str',width:120, title:'会员到期'}
|
|
,{field: 'pay_time_str',width:160, title:'支付时间'}
|
|
,{field: 'create_time',width:160, title:'开通时间'}
|
|
,{fixed: 'right', title: '操作', width:160,align: 'center', toolbar: '#user_level-operation'}
|
|
]]
|
|
,page:true
|
|
,text: {none: '暂无数据!'}
|
|
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
|
|
return {
|
|
"code":res.code,
|
|
"msg":res.msg,
|
|
"count": res.data.count, //解析数据长度
|
|
"data": res.data.lists, //解析数据列表
|
|
};
|
|
}
|
|
,response: {
|
|
statusCode: 1
|
|
}
|
|
,done: function(res, curr, count){
|
|
// 解决操作栏因为内容过多换行问题
|
|
$(".layui-table-main tr").each(function (index, val) {
|
|
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
|
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
|
});
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
//监听搜索
|
|
form.on('submit(user-order-search)', function (data) {
|
|
var field = data.field;
|
|
console.log(field)
|
|
//执行重载
|
|
table.reload('user_order_lists', {
|
|
where: field,
|
|
page: {
|
|
curr: 1
|
|
}
|
|
});
|
|
});
|
|
|
|
//事件
|
|
var active = {
|
|
add: function(){
|
|
var index = layer.open({
|
|
type: 2
|
|
,title: '新增付费会员类型'
|
|
,content: '<?php echo url("user.ship/add"); ?>'
|
|
,area: ['90%', '90%']
|
|
,btn: ['保存', '取消']
|
|
,maxmin: true
|
|
,yes: function(index, layero){
|
|
var iframeWindow = window['layui-layer-iframe'+ index]
|
|
,submitID = 'add-user_level-submit'
|
|
,submit = layero.find('iframe').contents().find('#'+ submitID);
|
|
//监听提交
|
|
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
|
var field = data.field;
|
|
like.ajax({
|
|
url:'<?php echo url("user.ship/add"); ?>',
|
|
data:field,
|
|
type:"post",
|
|
success:function(res)
|
|
{
|
|
if(res.code == 1)
|
|
{
|
|
layui.layer.msg(res.msg, {
|
|
offset: '15px'
|
|
, icon: 1
|
|
, time: 1000
|
|
});
|
|
layer.close(index); //关闭弹层
|
|
table.reload('user_level-lists'); //数据刷新
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
submit.trigger('click');
|
|
}
|
|
});
|
|
},
|
|
|
|
}
|
|
|
|
table.on('tool(user_order_lists)', function(obj) {
|
|
var id = obj.data.id;
|
|
if (obj.event === 'edit') {
|
|
var index = layer.open({
|
|
type: 2
|
|
, title: '编辑付费会员类型'
|
|
, content: '<?php echo url("user.ship/edit"); ?>?id=' + id
|
|
, area: ['90%', '90%']
|
|
, btn: ['保存', '取消']
|
|
, maxmin: true
|
|
, yes: function (index, layero) {
|
|
var iframeWindow = window['layui-layer-iframe' + index]
|
|
, submitID = 'edit-user_level-submit'
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
//监听提交
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
var field = data.field;
|
|
like.ajax({
|
|
url: '<?php echo url("user.ship/edit"); ?>',
|
|
data: field,
|
|
type: "post",
|
|
success: function (res) {
|
|
if (res.code == 1) {
|
|
layui.layer.msg(res.msg, {
|
|
offset: '15px'
|
|
, icon: 1
|
|
, time: 1000
|
|
});
|
|
layer.close(index); //关闭弹层
|
|
table.reload('user_order_lists'); //数据刷新
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
submit.trigger('click');
|
|
}
|
|
});
|
|
|
|
}
|
|
if (obj.event === 'del') {
|
|
layer.confirm('确定删除开通记录?', function (index) {
|
|
like.ajax({
|
|
url: '<?php echo url("user.shipLog/del"); ?>',
|
|
data: {id: id},
|
|
type: "post",
|
|
success: function (res) {
|
|
if (res.code == 1) {
|
|
layui.layer.msg(res.msg, {
|
|
offset: '15px'
|
|
, icon: 1
|
|
, time: 1000
|
|
});
|
|
layer.close(index); //关闭弹层
|
|
table.reload('user_order_lists'); //数据刷新
|
|
}
|
|
}
|
|
});
|
|
layer.close(index);
|
|
})
|
|
|
|
}
|
|
})
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|