235 lines
6.0 KiB
HTML
235 lines
6.0 KiB
HTML
{extend name="app/shop/view/base.html"/}
|
|
{block name="resources"}
|
|
<style>
|
|
.member-face img{width: 100%;height: auto;max-width: 100%;max-height: 100%;}
|
|
</style>
|
|
{/block}
|
|
{block name="main"}
|
|
<div class="ns-tips layui-collapse">
|
|
<div class="layui-colla-item">
|
|
<h2 class="layui-colla-title">操作提示</h2>
|
|
<ul class="layui-colla-content layui-show">
|
|
<li>当前显示来自各与市场订单</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- 筛选面板 -->
|
|
<form class="layui-colla-content layui-form layui-show" >
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">订单号:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="search_text" name="search_text" placeholder="请输入订单号|交易订单号" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">购买时间:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" class="layui-input" name="start_time" id="start_time" autocomplete="off" placeholder="开始时间" readonly>
|
|
<i class="ns-calendar"></i>
|
|
</div>
|
|
<div class="layui-form-mid">-</div>
|
|
<div class="layui-input-inline">
|
|
<input type="text" class="layui-input" name="end_time" id="end_time" autocomplete="off" placeholder="结束时间" readonly>
|
|
<i class="ns-calendar"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ns-form-row">
|
|
<button class="layui-btn ns-bg-color" lay-submit lay-filter="search">筛选</button>
|
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
|
</div>
|
|
</form>
|
|
<div class="ns-form-row" style="margin-left:0px;padding: 5px;">
|
|
<button class="layui-btn bg-color" lay-button="addCode">订购注册</button>
|
|
<!-- <button class="layui-btn layui-btn-warm" style="background-color:#FFB800;" lay-button="AuthMini">授权接入</button>-->
|
|
</div>
|
|
<!-- 列表 -->
|
|
<table id="order_list" lay-filter="order_list"></table>
|
|
<!-- 操作 -->
|
|
<script type="text/html" id="action">
|
|
<div class="table-btn">
|
|
<!-- <a class="layui-btn" lay-event="info">详情</a>-->
|
|
|
|
{{# if(d.appid ==null) { }}
|
|
<a class="layui-btn" lay-event="AuthMini">接入已有小程序</a>
|
|
{{# }}}
|
|
|
|
{{# if(d.appid !=null) { }}
|
|
<a class="layui-btn" lay-event="AuthMini">重新授权小程序</a>
|
|
{{# }}}
|
|
<!-- <a class="layui-btn" lay-event="aliAppreg">新注册小程序</a>-->
|
|
{{# if(d.order_status==0 || d.appid =='') { }}
|
|
<a class="layui-btn" lay-event="aliAppreg">新注册小程序</a>
|
|
{{# }}}
|
|
<!-- {{# if(d.type=='aliapp' && d.status !=null) { }}-->
|
|
<!-- <a class="layui-btn" lay-event="seeMini">查看详情</a>-->
|
|
<!-- {{# }}}-->
|
|
</div>
|
|
</script>
|
|
{/block}
|
|
{block name="script"}
|
|
<script>
|
|
layui.use(['form', 'laydate','util','laytpl'], function () {
|
|
var form = layui.form,
|
|
laydate = layui.laydate;
|
|
util = layui.util;
|
|
form.render();
|
|
//渲染时间
|
|
laydate.render({
|
|
elem: '#start_time',
|
|
type: 'datetime'
|
|
});
|
|
laydate.render({
|
|
elem: '#end_time',
|
|
type: 'datetime'
|
|
});
|
|
var table = new Table({
|
|
elem: '#order_list',
|
|
url: ns.url("saasagent://shop/saas/cloudorder"),
|
|
cols: [
|
|
[
|
|
{
|
|
title: '订单号',
|
|
field: 'order_id',
|
|
unresize: true,
|
|
width: '14%',
|
|
},
|
|
{
|
|
title: '归属',
|
|
field: 'site_id',
|
|
unresize: 'false',
|
|
width: '5%',
|
|
},
|
|
{
|
|
title: '商品名称',
|
|
field: 'goods_name',
|
|
unresize: 'false',
|
|
width: '6%'
|
|
},
|
|
{
|
|
title: '联系人',
|
|
field: 'contact_name',
|
|
unresize: 'false',
|
|
width: '5%'
|
|
},
|
|
{
|
|
title: '电话',
|
|
field: 'mobile',
|
|
unresize: 'false',
|
|
width: '8%'
|
|
},
|
|
{
|
|
title: '云市场',
|
|
unresize: 'false',
|
|
field: 'type',
|
|
width: '5%',
|
|
},
|
|
// {
|
|
// title: '云账号',
|
|
// unresize: 'false',
|
|
// field: 'cloud_account',
|
|
// width: '10%',
|
|
// },
|
|
{
|
|
title: '规格',
|
|
unresize: 'false',
|
|
field: 'spec',
|
|
width: '10%',
|
|
},
|
|
// {
|
|
// title: '套餐类型',
|
|
// unresize: 'false',
|
|
// field: 'is_trial',
|
|
// width: '10%',
|
|
// },
|
|
// {
|
|
// title: '购买时长',
|
|
// unresize: 'false',
|
|
// field: 'timeSpan',
|
|
// width: '10%',
|
|
// templet: function (data) {
|
|
// return ns.time_to_date(data.expire_time);
|
|
// }
|
|
// },
|
|
{
|
|
title: '下单时间',
|
|
unresize: 'false',
|
|
field: 'create_time',
|
|
width: '10%',
|
|
templet: function (data) {
|
|
return ns.time_to_date(data.create_time);
|
|
}
|
|
},
|
|
{
|
|
title: '操作',
|
|
toolbar: '#action',
|
|
unresize: 'false',
|
|
width: '15%'
|
|
}
|
|
]
|
|
]
|
|
});
|
|
/**
|
|
* 搜索功能
|
|
*/
|
|
form.on('submit(search)', function (data) {
|
|
table.reload({
|
|
page: {
|
|
curr: 1
|
|
},
|
|
where: data.field
|
|
});
|
|
return false;
|
|
});
|
|
/**
|
|
* 监听工具栏操作
|
|
*/
|
|
table.tool(function(obj) {
|
|
var data = obj.data;
|
|
console.log(data)
|
|
switch (obj.event) {
|
|
case 'info': //店铺管理
|
|
var url = ns.url("saasagent://shop/saas/orderInfo?unisid=" + data.site_id);
|
|
location.href=ns.url(url);
|
|
break;
|
|
case 'aliAppreg': //店铺管理
|
|
var url = ns.url("saasagent://shop/mincode/aliappreg?order_id=" + data.id);
|
|
location.href=ns.url(url);
|
|
break;
|
|
case 'AuthMini' :
|
|
location.href="{:addon_url('saasagent/shop/mincode/miniauth')}"+'?type=aliapp&site_id=' + data.site_id+'&order_id='+data.id;
|
|
break;
|
|
case "seeMini" :
|
|
var url = ns.url("saasagent://shop/saas/orderInfo?order_id=" + data.id);
|
|
location.href=ns.url(url);
|
|
break;
|
|
}
|
|
});
|
|
//处理属性为 lay-active 的所有元素事件
|
|
util.event('lay-button', {
|
|
addCode: function(){
|
|
layer.open({
|
|
title: '订单注册',
|
|
id: 'bind_recharge_layer',
|
|
type: 2,
|
|
area: ['500px', '350px'],
|
|
content: "{:addon_url('saasagent/shop/mincode/onlinebuy')}",
|
|
});
|
|
// location.href="{:addon_url('saasagent/shop/mincode/aliappreg')}";
|
|
},
|
|
AuthMini:function (){
|
|
layer.open({
|
|
title: '充值',
|
|
id: 'bind_recharge_layer',
|
|
type: 2,
|
|
area: ['650px', '450px'],
|
|
content: ns.url('saasagent://shop/saas/recharge'),
|
|
});
|
|
}
|
|
});
|
|
})
|
|
</script>
|
|
{/block} |