Commit 95300acb by guanzhenshan

完成亚马逊+Ebay订单报表增加分类和站点搜索功能;解决利润平台统计报表按发货时间搜索的记录不准确的问题

parent 4966511e
......@@ -7,56 +7,70 @@
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>销售帐号:</label>
<select id="selleraccount" name="selleraccount" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</div>
@*<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>*@
<div class="form-group">
<label>仓库类型:</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">选择仓库类型</option>
<option value="自发货仓">自发货仓</option>
<option value="第三方仓">第三方仓</option>
</select>
</div>
<div class="form-group">
<label>&nbsp;</label>
<select id="warehousecode" name="warehousecode" class="form-control">
<option value="">选择仓库</option>
</select>
</div>
<div class="form-group">
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
</div>
<div id="leftcontain" style="position:relative;float:left;width:215px;margin-right:-220px;background-color:#fff;height:780px;border-top:solid 1px #E7EAEC;display:none;">
<div id="ztree" class="ztree" style="margin:5px 10px;max-height: 800px;overflow: auto;">
</div>
</div>
<div style="float:right;width:100%;">
<div id="rightcontain">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-success" onclick="showleft();">分类筛选</button>
</div>
<div class="form-group">
<label>销售帐号:</label>
<select id="selleraccount" name="selleraccount" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>
<div class="form-group">
<label>仓库类型:</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">选择仓库类型</option>
<option value="自发货仓">自发货仓</option>
<option value="第三方仓">第三方仓</option>
</select>
</div>
<div class="form-group">
<label>&nbsp;</label>
<select id="warehousecode" name="warehousecode" class="form-control">
<option value="">选择仓库</option>
</select>
</div>
<div class="form-group">
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
</div>
</div>
</form>
</div>
</form>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
@section css{
<link href="~/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<style>
.mules {
white-space: nowrap;
......@@ -71,6 +85,8 @@
</style>
}
@section scripts{
<script src="~/js/jquery.ztree.core.min.js"></script>
<script src="~/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript">
var tb;
$(document).ready(function () {
......@@ -84,7 +100,7 @@
listAccount();
//listWebsite();
listWebsite();
//listwarehousetype();
......@@ -92,7 +108,9 @@
$('#warehousetype').change(function () {
listwarehouse();
})
});
listcategory12();
})
function list() {
......@@ -178,7 +196,15 @@
{ field: 'profit_rate', title: '总实际利润率%', width: '130', sortable: true, iscount: true },
];
var url = '@Url.Content("~/Reports/Orders/EbaySaleStatisticsJson")' + '?' + $("#toolbar").serialize();
var s = '';
try {
s = getChkNode();
} catch (e) {
s = '';
}
var url = '@Url.Content("~/Reports/Orders/EbaySaleStatisticsJson")' + '?' + $("#toolbar").serialize() + '&skucategoryids=' + s;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", { showfooter: true, showCount: true });
......@@ -267,6 +293,48 @@
layer_show(platform + " " + website + " " + $('#start').val() + "至" + $('#end').val() + ' 订单明细', '@Url.Content("~/Reports/Orders/ListOrderDetail?platform=")' + platform + '&website=' + website + '&account=' + account + '&start=' + $('#start').val() + '&end=' + $('#end').val() + '&col=' + colval + '&coltitle=' + coltitle + '&showsingle=' + single, '90%', '90%');
}
function showleft() {
var c = $('#leftcontain').css('display');
if (c == 'none') {
$('#leftcontain').css('display', 'inline');
$("#rightcontain").animate({ marginLeft: "220px" });
}
else {
$('#leftcontain').css('display', 'none');
$("#rightcontain").animate({ marginLeft: "0px" });
}
}
function listcategory12() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListSkuCategoryOneAndSecondLevel")',
paramData: '',
type: 'POST',
func: function (result) {
var setting = {
check: {
chkStyle:'checkbox',
enable: true
}
};
zTreeObj = $.fn.zTree.init($("#ztree"), setting, eval('('+result+')'));
}
})
}
function getChkNode() {
var s = '';
var o = $.fn.zTree.getZTreeObj("ztree");
var nodes = o.getCheckedNodes();
for (var i in nodes) {
if (nodes[i].children == null || nodes[i].children.length <= 0) {
s += (nodes[i].id) + '|';
}
}
return s;
}
</script>
}
......@@ -7,56 +7,70 @@
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>销售帐号:</label>
<select id="selleraccount" name="selleraccount" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
<div id="leftcontain" style="position:relative;float:left;width:215px;margin-right:-220px;background-color:#fff;height:780px;border-top:solid 1px #E7EAEC;display:none;">
<div id="ztree" class="ztree" style="margin:5px 10px;max-height: 800px;overflow: auto;">
</div>
</div>
<div style="float:right;width:100%;">
<div id="rightcontain">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-success" onclick="showleft();">分类筛选</button>
</div>
<div class="form-group">
<label>销售帐号:</label>
<select id="selleraccount" name="selleraccount" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>
<div class="form-group">
<label>仓库类型:</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">选择仓库类型</option>
<option value="自发货仓">自发货仓</option>
<option value="第三方仓">第三方仓</option>
</select>
</div>
<div class="form-group">
<label>&nbsp;</label>
<select id="warehousecode" name="warehousecode" class="form-control">
<option value="">选择仓库</option>
</select>
</div>
<div class="form-group">
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
</div>
</div>
<div class="form-group">
<label>仓库类型:</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">选择仓库类型</option>
<option value="自发货仓">自发货仓</option>
<option value="第三方仓">第三方仓</option>
</select>
</div>
<div class="form-group">
<label>&nbsp;</label>
<select id="warehousecode" name="warehousecode" class="form-control">
<option value="">选择仓库</option>
</select>
</div>
<div class="form-group">
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
</div>
</form>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
</div>
</div>
@section css{
<link href="~/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<style>
.mules {
white-space: nowrap;
......@@ -71,6 +85,8 @@
</style>
}
@section scripts{
<script src="~/js/jquery.ztree.core.min.js"></script>
<script src="~/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript">
var tb;
$(document).ready(function () {
......@@ -93,6 +109,8 @@
$('#warehousetype').change(function () {
listwarehouse();
})
listcategory12();
})
function list() {
......@@ -173,7 +191,15 @@
{ field: 'profit_rate', title: '总实际利润率%', width: '130', sortable: true, iscount: true },
];
var url = '@Url.Content("~/Reports/Orders/EbayStatisticsByWebsiteJson")' + '?' + $("#toolbar").serialize();
var s = '';
try {
s = getChkNode();
} catch (e) {
s = '';
}
var url = '@Url.Content("~/Reports/Orders/EbayStatisticsByWebsiteJson")' + '?' + $("#toolbar").serialize() + '&skucategoryids=' + s;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", { showfooter: true, showCount: true });
......@@ -265,6 +291,48 @@
layer_show(platform + " " + website + " " + $('#start').val() + "至" + $('#end').val() + ' 订单明细', '@Url.Content("~/Reports/Orders/ListOrderDetail?platform=")' + platform + '&website=' + website + '&account=' + account + '&start=' + $('#start').val() + '&end=' + $('#end').val() + '&col=' + colval + '&coltitle=' + coltitle + '&showsingle=' + single, '90%', '90%');
}
function showleft() {
var c = $('#leftcontain').css('display');
if (c == 'none') {
$('#leftcontain').css('display', 'inline');
$("#rightcontain").animate({ marginLeft: "220px" });
}
else {
$('#leftcontain').css('display', 'none');
$("#rightcontain").animate({ marginLeft: "0px" });
}
}
function listcategory12() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListSkuCategoryOneAndSecondLevel")',
paramData: '',
type: 'POST',
func: function (result) {
var setting = {
check: {
chkStyle:'checkbox',
enable: true
}
};
zTreeObj = $.fn.zTree.init($("#ztree"), setting, eval('('+result+')'));
}
})
}
function getChkNode() {
var s = '';
var o = $.fn.zTree.getZTreeObj("ztree");
var nodes = o.getCheckedNodes();
for (var i in nodes) {
if (nodes[i].children == null || nodes[i].children.length <= 0) {
s += (nodes[i].id) + '|';
}
}
return s;
}
</script>
}
......
......@@ -44,6 +44,7 @@
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
<button type="button" class="btn btn-success" onclick="exportlist();">导出</button>
</div>
</div>
</form>
......@@ -113,6 +114,9 @@
{ field: 'cost_product', title: '产品成本', width: '100', sortable: true, iscount: true },
{ field: 'cost_first', title: '头程费', width: '90', sortable: true, iscount: true },
{ field: 'cost_package', title: '包装费', width: '90', sortable: true, iscount: true },
{ field: 'cost_handle_bailun', title: '百伦处理费', width: '130', sortable: true, iscount: true },
{ field: 'cost_handle_platform', title: '平台操作费', width: '90', sortable: true, iscount: true },
{ field: 'cost_logistics', title: '尾程费', width: '90', sortable: true, iscount: true },
{ field: 'cost_total', title: '总支出', width: '90', sortable: true, iscount: true },
{ field: 'salecount', title: '销售数量', width: '100', sortable: false, iscount: true },
{ field: 'profit_oms', title: '利润', width: '100', sortable: true, iscount: true },
......@@ -182,6 +186,13 @@
})
}
function exportlist() {
if (confirm("确定要导出吗?")) {
window.open('@Url.Content("~/Reports/Orders/ExportEbayOrders")' + '?' + $("#toolbar").serialize(), '_blank');
}
}
</script>
}
......@@ -7,57 +7,71 @@
<div class="row">
<div class="col-sm-12">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<input type="hidden" id="platform" name="platform" value="@ViewBag.platform" />
<div class="form-group">
<label>仓库类型</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">仓库类型</option>
<option value="国内仓">国内仓</option>
<option value="海外仓">海外仓</option>
<option value="第三方仓库">第三方仓库</option>
</select>
</div>
<div class="form-group">
<label>仓库</label>
<select id="warehousecode" name="warehousecode" class="form-control">
<option value="">选择仓库</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>
<div class="form-group">
<label>销售帐号:</label>
<select id="account" name="account" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</div>
<div class="form-group">
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
</div>
</div>
</form>
<div id="leftcontain" style="position:relative;float:left;width:215px;margin-right:-220px;background-color:#fff;height:780px;border-top:solid 1px #E7EAEC;display:none;">
<div id="ztree" class="ztree" style="margin:5px 10px;max-height: 800px;overflow: auto;">
</div>
</div>
<div style="float:right;width:100%;">
<div id="rightcontain">
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
<input type="hidden" id="platform" name="platform" value="@ViewBag.platform" />
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-success" onclick="showleft();">分类筛选</button>
</div>
<div class="form-group">
<label>仓库类型</label>
<select id="warehousetype" name="warehousetype" class="form-control">
<option value="">仓库类型</option>
<option value="国内仓">国内仓</option>
<option value="海外仓">海外仓</option>
<option value="第三方仓库">第三方仓库</option>
</select>
</div>
<div class="form-group">
<label>仓库</label>
<select id="warehousecode" name="warehousecode" class="form-control">
<option value="">选择仓库</option>
</select>
</div>
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>
<div class="form-group">
<label>销售帐号:</label>
<select id="account" name="account" class="form-control" style="width:160px;">
<option value="">选择帐号</option>
</select>
</div>
<div class="form-group">
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))" />
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
</div>
<div class="form-group">
<label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
</div>
</div>
</form>
</div>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
<div class="ibox-content m-b-sm border-bottom">
<table id="roletable" style="table-layout:fixed;"></table>
</div>
</div>
</div>
</div>
</div>
@section css{
<link href="~/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<style>
.mules {
white-space: nowrap;
......@@ -72,6 +86,8 @@
</style>
}
@section scripts{
<script src="~/js/jquery.ztree.core.min.js"></script>
<script src="~/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript">
var tb;
$(document).ready(function () {
......@@ -92,7 +108,7 @@
$('#warehousetype').change(function () {
listwarehouse();
})
listcategory12();
})
function list() {
......@@ -141,15 +157,22 @@
{ field: 'paid_time', title: '付款时间', width: '160', sortable: true, iscount: true },
];
var url = '@Url.Content("~/Reports/Orders/ListPlatformCostJson")' + '?' + $("#toolbar").serialize();
var s = '';
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {showfooter: true, showCount: true});
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
try {
s = getChkNode();
} catch (e) {
s = '';
}
var url = '@Url.Content("~/Reports/Orders/ListPlatformCostJson")' + '?' + $("#toolbar").serialize() + '&skucategoryids=' + s;
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {showfooter: true, showCount: true});
}
else {
tb.bootstrapTable('refresh', { url: url });
}
}
function listAccount() {
$.submit({
......@@ -202,6 +225,47 @@
}
function showleft() {
var c = $('#leftcontain').css('display');
if (c == 'none') {
$('#leftcontain').css('display', 'inline');
$("#rightcontain").animate({ marginLeft: "220px" });
}
else {
$('#leftcontain').css('display', 'none');
$("#rightcontain").animate({ marginLeft: "0px" });
}
}
function listcategory12() {
$.submit({
url: '@Url.Content("~/Reports/Orders/ListSkuCategoryOneAndSecondLevel")',
paramData: '',
type: 'POST',
func: function (result) {
var setting = {
check: {
chkStyle:'checkbox',
enable: true
}
};
zTreeObj = $.fn.zTree.init($("#ztree"), setting, eval('('+result+')'));
}
})
}
function getChkNode() {
var s = '';
var o = $.fn.zTree.getZTreeObj("ztree");
var nodes = o.getCheckedNodes();
for (var i in nodes) {
if (nodes[i].children == null || nodes[i].children.length <= 0) {
s += (nodes[i].id) + '|';
}
}
return s;
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment