Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

View File

@ -0,0 +1,46 @@
{extend name="default/shops/base" /}
{block name="title"}销售订单统计 - 卖家中心{__block__}{/block}
{block name="content"}
<style>
.wst-list tbody tr td {height: 35px;line-height: 35px;}
</style>
<div class="wst-body">
<div class="wst-shop-head"><span>销售订单统计</span></div>
<div class='wst-shop-tbar'>
日期:<input type='text' class="laydate-icon j-ipt" id='startDate' onclick="laydate()" value='{$startDate}'/>
<input type='text' class="laydate-icon j-ipt" id='endDate' onclick="laydate()" value='{$endDate}'/>
<a class="s-btn" onclick="loadStat()">查询</a>
</div>
<div class='wst-shop-content'>
<div id='main' style='height:300px;width:99%'></div>
<table id='mainTable' class='wst-list hide' style="font-size:13px;">
<thead>
<tr>
<th width='20'>&nbsp;&nbsp;</th>
<th width='100'>日期</th>
<th width='100'>取消订单</th>
<th width='130'>拒收订单</th>
<th width='130'>正常订单</th>
</tr>
</thead>
<tbody id='list-box'></tbody>
<script id="stat-tblist" type="text/html">
{{# for(var i = 0; i < d.length; i++){ }}
<tr>
<td>{{(i+1)}}</td>
</td>
<td>{{ d[i].day }}</td>
<td>{{ d[i].o3 }}</td>
<td>{{ d[i].o1 }}</td>
<td>{{ d[i].ou }}</td>
</tr>
{{# } }}
</script>
</table>
</div>
{/block}
{block name="js"}
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
<script src="__STATIC__/plugins/layer/laydate.js"></script>
<script type='text/javascript' src='__STYLE__/shops/reports/stat_orders.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,103 @@
function loadStat(){
var loading = WST.load({msg:'正在查询数据,请稍后...'});
$.post(WST.U('home/reports/getStatOrders'),WST.getParams('.j-ipt'),function(data,textStatus){
layer.close(loading);
var json = WST.toJson(data);
var myChart = echarts.init(document.getElementById('main'));
myChart.clear();
$('#mainTable').hide();
if(json.status=='1' && json.data){
var option = {
tooltip : {
trigger: 'axis'
},
toolbox: {
show : true,
y: 'top',
feature : {
mark : {show: true},
dataView : {show: false, readOnly: false},
magicType : {show: true, type: ['line', 'bar', 'tiled']},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
legend: {
data:['取消订单','拒收订单','正常订单']
},
xAxis : [
{
type : 'category',
splitLine : {show : false},
data : json.data.days
}
],
yAxis : [
{
type : 'value',
position: 'right'
}
],
series : [
{
name:'取消订单',
type:'line',
tooltip : {trigger: 'item'},
stack: '类型',
data:json.data['-1']
},
{
name:'拒收订单',
type:'line',
tooltip : {trigger: 'item'},
stack: '类型',
data:json.data['-3']
},
{
name:'正常订单',
type:'line',
tooltip : {trigger: 'item'},
stack: '类型',
data:json.data['1']
},
{
name:'订单总数',
type:'line',
data:json.data['total']
},
{
name:'订单类型细分',
type:'pie',
tooltip : {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
center: [160,130],
radius : [0, 50],
itemStyle : {
normal : {
labelLine : {
length : 20
}
}
},
data:[
{value:json.data.map['-3'], name:'取消订单'},
{value:json.data.map['-1'], name:'拒收订单'},
{value:json.data.map['1'], name:'正常订单'},
]
}
]
};
myChart.setOption(option);
var gettpl = document.getElementById('stat-tblist').innerHTML;
laytpl(gettpl).render(json.data.list, function(html){
$('#list-box').html(html);
$('#mainTable').show();
});
}else{
WST.msg('没有查询到记录',{icon:5});
}
});
}

View File

@ -0,0 +1,49 @@
{extend name="default/shops/base" /}
{block name="title"}销售额统计 - 卖家中心{__block__}{/block}
{block name="content"}
<style>
.wst-list tbody tr td {height: 35px;line-height: 35px;}
</style>
<div class="wst-body">
<div class="wst-shop-head"><span>销售额统计</span></div>
<div class='wst-shop-tbar'>
日期:<input type='text' class="laydate-icon j-ipt" id='startDate' onclick="laydate()" value='{$startDate}'/>
<input type='text' class="laydate-icon j-ipt" id='endDate' onclick="laydate()" value='{$endDate}'/>
支付方式:<select id='payType' class='j-ipt'>
<option value='-1'>全部</option>
<option value='0'>货到付款</option>
<option value='1'>在线支付</option>
</select>
<a class="s-btn" onclick="loadStat()">查询</a>
</div>
<div class='wst-shop-content'>
<div id='main' style='height:300px;width:99%'></div>
<table id='mainTable' class='wst-list hide' style="font-size:13px;">
<thead>
<tr>
<th width='20'>&nbsp;&nbsp;</th>
<th width='100'>日期</th>
<th width='100'>订单数</th>
<th width='130'>销售额</th>
</tr>
</thead>
<tbody id='list-box'></tbody>
<script id="stat-tblist" type="text/html">
{{# for(var i = 0; i < d.length; i++){ }}
<tr>
<td>{{(i+1)}}</td>
</td>
<td>{{ d[i].day }}</td>
<td>{{ d[i].num }}</td>
<td>{{ d[i].val }}</td>
</tr>
{{# } }}
</script>
</table>
</div>
{/block}
{block name="js"}
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
<script src="__STATIC__/plugins/layer/laydate.js"></script>
<script type='text/javascript' src='__STYLE__/shops/reports/stat_sales.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,54 @@
function loadStat(){
var loading = WST.load({msg:'正在查询数据,请稍后...'});
$.post(WST.U('home/reports/getStatSales'),WST.getParams('.j-ipt'),function(data,textStatus){
layer.close(loading);
var json = WST.toJson(data);
var myChart = echarts.init(document.getElementById('main'));
myChart.clear();
$('#mainTable').hide();
if(json.status=='1' && json.data){
var option = {
tooltip : {
trigger: 'axis'
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: false, readOnly: false},
magicType : {show: true, type: ['line', 'bar']},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
xAxis : [
{
type : 'category',
data : json.data.days
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'销售额',
type:'line',
data:json.data.dayVals
}
]
};
myChart.setOption(option);
var gettpl = document.getElementById('stat-tblist').innerHTML;
laytpl(gettpl).render(json.data.list, function(html){
$('#list-box').html(html);
$('#mainTable').show();
});
}else{
WST.msg('没有查询到记录',{icon:5});
}
});
}

View File

@ -0,0 +1,46 @@
{extend name="default/shops/base" /}
{block name="title"}商品销售排行 - 卖家中心{__block__}{/block}
{block name="content"}
<div class="wst-body">
<div class="wst-shop-head"><span>商品销售排行</span></div>
<div class='wst-shop-tbar'>
日期:<input type='text' class="laydate-icon j-ipt" id='startDate' onclick="laydate()" value='{$startDate}'/>
<input type='text' class="laydate-icon j-ipt" id='endDate' onclick="laydate()" value='{$endDate}'/>
<a class="s-btn" onclick="loadStat()">查询</a>
</div>
<div class='wst-shop-content'>
<table class='wst-list' style="font-size:13px;">
<thead>
<tr>
<th width='20'>&nbsp;&nbsp;</th>
<th width='100' colspan="2">商品</th>
<th width='130'>商品编号</th>
<th width='100'>销量</th>
</tr>
</thead>
<tbody id='list-box'></tbody>
<script id="top-sale-tblist" type="text/html">
{{# for(var i = 0; i < d.length; i++){ }}
<tr>
<td>{{(i+1)}}</td>
<td>
<div class='goods-img'>
<a target='_blank' href='{{WST.U("home/goods/detail","id="+d[i].goodsId)}}'>
<img class='j-lazyGoodsImg' data-original='__IMGURL__/{{d[i].goodsImg}}'/>
</a>
</div></td>
<td>{{ d[i].goodsName }}</td>
<td>{{ d[i].goodsSn }}</td>
<td>{{ d[i].goodsNum}}</td>
</td>
</tr>
{{# } }}
</script>
</table>
</div>
{/block}
{block name="js"}
<script src="__STATIC__/plugins/layer/laydate.js"></script>
<script type='text/javascript' src='__STYLE__/shops/reports/top_sale_goods.js?v={$v}'></script>
{/block}

View File

@ -0,0 +1,16 @@
function loadStat(){
var load = WST.load({msg:'正在加载数据,请稍后...'})
$.post(WST.U('home/reports/getTopSaleGoods'),WST.getParams('.j-ipt'),function(data,textStatus){
layer.close(load);
var json = WST.toJson(data);
if(json.status=='1' && json.data){
var gettpl = document.getElementById('top-sale-tblist').innerHTML;
laytpl(gettpl).render(json.data, function(html){
$('#list-box').html(html);
$('.j-lazyGoodsImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+window.conf.GOODS_LOGO});//商品默认图片
});
}else{
WST.msg('没有查询到记录',{icon:5});
}
});
}