Commit 95300acb by guanzhenshan

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

parent 4966511e
......@@ -7,21 +7,32 @@
<div class="row">
<div class="col-sm-12">
<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">
<div class="form-group">
<label>站点:</label>
<select id="website" name="website" class="form-control">
<option value="">选择站点</option>
</select>
</div>*@
</div>
<div class="form-group">
<label>仓库类型:</label>
<select id="warehousetype" name="warehousetype" class="form-control">
......@@ -49,14 +60,17 @@
</div>
</form>
</div>
<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 () {
......@@ -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,10 +7,21 @@
<div class="row">
<div class="col-sm-12">
<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>
......@@ -54,9 +65,12 @@
<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,11 +7,22 @@
<div class="row">
<div class="col-sm-12">
<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>
......@@ -56,8 +67,11 @@
<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,8 +157,15 @@
{ field: 'paid_time', title: '付款时间', width: '160', sortable: true, iscount: true },
];
var url = '@Url.Content("~/Reports/Orders/ListPlatformCostJson")' + '?' + $("#toolbar").serialize();
var s = '';
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});
}
......@@ -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>
......
......@@ -7,10 +7,21 @@
<div class="row">
<div class="col-sm-12">
<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="currency" name="currency" class="form-control">
<option value="CNY">人民币</option>
......@@ -31,9 +42,9 @@
</div>
<div class="form-group">
<label>发货时间</label>
<input id="shipstart" name="shipstart" type="text" class="form-control" style="width:130px;" placeholder="发货开始时间"/>
<input id="shipstart" name="shipstart" type="text" class="form-control" style="width:130px;" placeholder="发货开始时间" />
<span>至</span>
<input id="shipend" name="shipend" type="text" class="form-control" style="width:130px;" placeholder="发货结束时间"/>
<input id="shipend" name="shipend" type="text" class="form-control" style="width:130px;" placeholder="发货结束时间" />
</div>
<div class="form-group">
<label>&nbsp;</label>
......@@ -64,25 +75,29 @@
<th>退款率%</th>
</tr>
</thead>
<tbody id="tb">
</tbody>
<tbody id="tb"></tbody>
<tfoot id="footer">
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
@section css{
<link href="~/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
<style>
.mules {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.alink{color:cornflowerblue;cursor:pointer;}
.alink {
color: cornflowerblue;
cursor: pointer;
}
.tablesorter-headerDesc {
background-position: right;
......@@ -97,10 +112,11 @@
padding-right: 30px;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==');
}
</style>
}
@section scripts{
<script src="~/js/jquery.ztree.core.min.js"></script>
<script src="~/js/jquery.ztree.excheck.min.js"></script>
<script src="~/js/jquery.tablesorter.min.js" type="text/javascript"></script>
<script type="text/javascript">
var tb;
......@@ -117,6 +133,8 @@
list();
listPlatform();
listcategory12();
})
function list() {
......@@ -134,12 +152,19 @@
return false;
}
var s = '';
try {
s = getChkNode();
} catch (e) {
s = '';
}
var lindex = layer.load(1, { shade: false }); //0代表加载的风格,支持0-2
$.submit({
type:'POST',
url: '@Url.Content("~/Reports/Orders/PlatformProfitCountJson")',
paramData: $("#toolbar").serialize(),
paramData: $("#toolbar").serialize() + '&skucategoryids=' + s,
func: function (result) {
layer.close(lindex);
if (result && result.length > 0) {
......@@ -188,6 +213,8 @@
$('#footer').append(foot_s);
}
else {
$('#tb').html('');
$('#footer').html('');
layer.alert('没有找到相应数据!');
}
}
......@@ -228,6 +255,48 @@
}
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