Commit bc7c674b by wangwanchang

sku仓库列表页增加超链,订单统计任务修改

parent 096e3a5e
......@@ -160,6 +160,16 @@ namespace Bailun.DataCenter.Application.Order
var endpaytime = DateTime.Parse(queryParam["endpaytime"].ToString());
query = query.Where(t => t.paytime < endpaytime);
}
if (!queryParam["shipstatus"].IsEmpty())
{
var shipstatus = queryParam["shipstatus"].ToInt();
query = query.Where(t => t.shipping_status == shipstatus);
}
if (!queryParam["status"].IsEmpty())
{
var status = queryParam["status"].ToInt();
query = query.Where(t => t.state == status);
}
if (!queryParam["warehousetype"].IsEmpty() && queryParam["Warehouse"].IsEmpty())
{
var warehousetype = queryParam["warehousetype"].ToInt();
......@@ -230,6 +240,11 @@ namespace Bailun.DataCenter.Application.Order
var datasource = queryParam["datasource"].ToString();
query = query.Where(t => t.datasource == datasource);
}
if (!queryParam["shipstatus"].IsEmpty())
{
var shipstatus = queryParam["shipstatus"].ToInt();
query = query.Where(t => t.shipping_status == shipstatus);
}
if (!queryParam["seller"].IsEmpty())
{
var seller = queryParam["seller"].ToString();
......
......@@ -14,6 +14,7 @@ using System.Linq.Expressions;
using System.Text;
using Bailun.DataCenter.Application.Common;
using MySql.Data.MySqlClient;
using Bailun.DataCenter.Application.BasicInfo;
namespace Bailun.DataCenter.Application.Statistic
{
......@@ -28,12 +29,15 @@ namespace Bailun.DataCenter.Application.Statistic
{
private readonly ISkuStatisticRepository _skuStatisticRepository;
private readonly ICommonAppService _commonAppService;
private readonly IWarehouseInfoAppService _warehouseInfoAppService;
public SkuStatisticAppService(ISkuStatisticRepository skuStatisticRepository,
ICommonAppService commonAppService)
ICommonAppService commonAppService,
IWarehouseInfoAppService warehouseInfoAppService)
{
_skuStatisticRepository = skuStatisticRepository;
_commonAppService = commonAppService;
_warehouseInfoAppService = warehouseInfoAppService;
}
#region 获取数据
......@@ -95,7 +99,7 @@ namespace Bailun.DataCenter.Application.Statistic
if (!queryParam["warehousetype"].IsEmpty() && queryParam["Warehouse"].IsEmpty())
{
var warehousetype = queryParam["warehousetype"].ToInt();
var data = _commonAppService.GetWarehouseList().Where(d => d.WH_Type.ToInt() == warehousetype).Select(d => d.WareCode).ToList();
var data = _warehouseInfoAppService.GetList(new { waretype = warehousetype }.ToJson()).Select(d => d.WareCode).ToList();
query = query.Where(d => data.Contains(d.warehouse_code));
}
}
......@@ -140,7 +144,7 @@ namespace Bailun.DataCenter.Application.Statistic
if (!queryParam["warehousetype"].IsEmpty() && queryParam["Warehouse"].IsEmpty())
{
var warehousetype = queryParam["warehousetype"].ToInt();
var data = _commonAppService.GetWarehouseList().Where(d => d.WH_Type.ToInt() == warehousetype).Select(d => d.WareCode).ToList();
var data = _warehouseInfoAppService.GetList(new { waretype = warehousetype }.ToJson()).Select(d => d.WareCode).ToList();
strsql.AppendFormat(" and warehouse_code in('{0}')", string.Join("','", data));
}
}
......
......@@ -41,10 +41,34 @@ namespace Bailun.DataCenter.Tasks.Jobs.SkuStatistics
string skuNumber = string.Empty;
do
{
List<System.Threading.Tasks.Task> tasklist = new List<System.Threading.Tasks.Task>();
skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
if (!string.IsNullOrEmpty(skuNumber))
{
tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
{
SkuStatistics(skuNumber);
}));
}
skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
if (!string.IsNullOrEmpty(skuNumber))
{
tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
{
SkuStatistics(skuNumber);
}));
}
skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
if (!string.IsNullOrEmpty(skuNumber))
{
tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
{
SkuStatistics(skuNumber);
}));
}
if (tasklist.Count > 0)
{
System.Threading.Tasks.Task.WaitAll(tasklist.ToArray());
}
}
while (!string.IsNullOrEmpty(skuNumber));
......@@ -228,7 +252,7 @@ namespace Bailun.DataCenter.Tasks.Jobs.SkuStatistics
}
//已发货总量
dssList[dssIndex].shipped_totalquantity += item.shipped_quantity;
//发货总量
//发货总量
dssList[dssIndex].notshipped_totalquantity += item.notshipped_quantity;
//已到货总量
dssList[dssIndex].arrived_totalquantity += item.arrived_quantity;
......
......@@ -148,7 +148,7 @@ namespace Bailun.DataCenter.Tasks.Jobs.WarehouseStatistics
}
catch (Exception)
{
log.ErrorFormat("仓库实时统计错误:仓库编码:{1},仓库名称:{2}",item.warehouse_code, item.warehouse_name);
log.ErrorFormat("仓库实时统计错误:仓库编码:{0},仓库名称:{1}",item.warehouse_code, item.warehouse_name);
}
string warehousecode = item.warehouse_code;
......
......@@ -13,6 +13,7 @@ using Bailun.DataCenter.Tasks.Jobs.SkuFbaOrder;
using Bailun.DataCenter.Tasks.Jobs.FbaSkuStock;
using Bailun.DataCenter.Common.Redis;
using Bailun.DataCenter.Tasks.Jobs.MaterialStock;
using System.Collections.Generic;
namespace Bailun.DataCenter.Tasks
{
......@@ -147,10 +148,34 @@ namespace Bailun.DataCenter.Tasks
//string skuNumber = string.Empty;
//do
//{
// List<System.Threading.Tasks.Task> tasklist = new List<System.Threading.Tasks.Task>();
// skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
// if (!string.IsNullOrEmpty(skuNumber))
// {
// tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
// {
// ss.SkuStatistics(skuNumber);
// }));
// }
// skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
// if (!string.IsNullOrEmpty(skuNumber))
// {
// tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
// {
// ss.SkuStatistics(skuNumber);
// }));
// }
// skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
// if (!string.IsNullOrEmpty(skuNumber))
// {
// tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
// {
// ss.SkuStatistics(skuNumber);
// }));
// }
// if (tasklist.Count > 0)
// {
// System.Threading.Tasks.Task.WaitAll(tasklist.ToArray());
// }
//}
//while (!string.IsNullOrEmpty(skuNumber));
......
......@@ -24,11 +24,27 @@
<td>
<div id="Warehouse" type="select" style="width: 200px;" class="ui-select"></div>
</td>
<td>
<label class="lb-title">
订单状态:
</label>
</td>
<td>
<div id="status" type="select" class="ui-select" style="width: 100px;"></div>
</td>
<td>
<label class="lb-title">
发货状态:
</label>
</td>
<td>
<div id="shipstatus" type="select" class="ui-select" style="width: 100px;"></div>
</td>
<td style="padding-center: 3px;">
<input id="txt_Sku" type="text" class="form-control" placeholder="请输入要查询的Sku编码" style="width: 200px;"/>
<input id="txt_Sku" type="text" class="form-control" placeholder="请输入要查询的Sku编码" style="width: 200px;" />
</td>
<td style="padding-center: 3px;">
<input id="txt_Onumber" type="text" class="form-control" placeholder="请输入要查询的订单编号" style="width: 200px;"/>
<input id="txt_Onumber" type="text" class="form-control" placeholder="请输入要查询的订单编号" style="width: 200px;" />
</td>
<td style="padding-center: 5px;">
<a id="btn_Search" class="btn btn-primary"><i class="fa fa-search"></i>查询</a>
......@@ -52,6 +68,50 @@
<script>
var warehouseList = [];
$(function () {
$("#status").ComboBox({
//url: "/ProductManage/Product/GetDeliverId",
id: "Id",
description: "全部",
text: "Name",
height: "200px",
allowSearch: false,
data: [{ Id: '1', Name: '进行中' }, { Id: '2', Name: '订单完成' }, { Id: '3', Name: '订单取消' }]
});
$("#shipstatus").ComboBox({
//url: "/ProductManage/Product/GetDeliverId",
id: "Id",
description: "全部",
text: "Name",
height: "200px",
allowSearch: false,
data: [{ Id: '1', Name: '未发货' }, { Id: '2', Name: '已发货' }, { Id: '3', Name: '部分发货' }]
});
$("#sel_warehouse_type").ComboBox({
//url: "/ProductManage/Product/GetDeliverId",
id: "Id",
description: "全部",
text: "TypeName",
height: "200px",
allowSearch: false,
data: [{ Id: '1', TypeName: '国内仓' }, { Id: '2', TypeName: '海外仓' }, { Id: '3', TypeName: 'fba仓' }, { Id: '4', TypeName: '第三方仓库' }]
});
//仓库
$("#Warehouse").ComboBox({
url: "../../Statistic/SkuStatistic/GetWarehouse",
description: "==请选择仓库==",
id: "WareCode",
text: "WH_Title",
allowSearch: true,
height: "200px",
successCallback: function (data) {
warehouseList = data;
//$("#queryWarehouseId").ComboBoxSetValue(initWareCode);
}
});
GetGrid();
InitialPage();
......@@ -127,15 +187,40 @@
}
function GetPostData() {
debugger;
var sku = request('sku');
var warehousecode = request("warehousecode");
var shipstatus = request("shipstatus");
var status = request("status");
var datasource = request("datasource");
if (sku) {
$("#txt_Sku").val(sku);
}
if (warehousecode) {
$("#Warehouse").ComboBoxSetValue(warehousecode);
}
if (status) {
$("#status").ComboBoxSetValue(status);
}
if (shipstatus) {
$("#shipstatus").ComboBoxSetValue(shipstatus);
}
if (sku || shipstatus || warehousecode || datasource || status) {
$(".titlePanel").hide();
}
var queryJson = {
Sku: $("#txt_Sku").val(),
Warehouse: $("#Warehouse").attr("data-value"),
Onumber: $("#txt_Onumber").val(),
datasource: "HQOMS",
seller: $("#seller").attr("data-value"),
startpaytime: $("#StartTime").val(),
endpaytime: $("#EndTime").val(),
warehousetype: $("#sel_warehouse_type").attr("data-value")
warehousetype: $("#sel_warehouse_type").attr("data-value"),
status: $("#status").attr("data-value"),
shipstatus: $("#shipstatus").attr("data-value")
}
if (datasource) {
queryJson.datasource = datasource;
}
return JSON.stringify(queryJson);
}
......@@ -158,10 +243,20 @@
autowidth: true,
height: $(window).height() - $('#gridTable').offset().top - gridHeight,
url: "../../Order/SkuOrder/GetPageListJson",
postData: {
queryJson: GetPostData()
},
datatype: "json",
colModel: [
{ label: '自增编号', name: 'Id', index: 'Id', align: 'center', sortable: true,hidden:true },
{ label: '自增编号', name: 'Id', index: 'Id', align: 'center', sortable: true, hidden: true },
{ label: '流水号', name: 'so_number', index: 'so_number', align: 'center', sortable: false },
{
label: '订单编号', name: 'o_number', index: 'o_number', align: 'center', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToOrder(\'' + cellvalue + '\',\'' + rowObject.datasource + '\')">' + cellvalue + '</a>';
}
},
{ label: '外部订单编号', name: 'o_number_external', index: 'o_number_external', align: 'center', sortable: false },
{ label: 'sku编码', name: 's_number', index: 's_number', align: 'center', sortable: false },
{ label: '刊登sku编码', name: 's_number_publish', index: 's_number_publish', align: 'center', sortable: false },
{ label: '主图', name: 'S_IMAGE_MAIN', index: 'S_IMAGE_MAIN', align: 'center', sortable: false, formatter: displayImgFormatter },
......@@ -186,17 +281,8 @@
} else {
return '否';
}
//switch (cellvalue) {
// case 0:
// return '否';
// case 1:
// return '是';
// default:
// return '否';
//}
}},
{ label: '订单编号', name: 'o_number', index: 'o_number', align: 'center', sortable: false },
{ label: '外部订单编号', name: 'o_number_external', index: 'o_number_external', align: 'center', sortable: false },
}
},
{
label: '订单状态', name: 'state', index: 'state', align: 'center', sortable: true, formatter: function (cellvalue, options, rowObject) {
switch (cellvalue) {
......@@ -219,13 +305,15 @@
return '未发货';
case 2:
return '已发货';
case 3:
return '部分发货';
default:
return '未发货';
}
}
},
{ label: '创建时间', name: 'createtime', index: 'createtime', align: 'center', sortable: true },
{ label: '更新时间', name: 'updatetime', index: 'updatetime', align: 'center', sortable: true },
{ label: '更新时间', name: 'updatetime', index: 'updatetime', align: 'center', sortable: true }
],
rowNum: 30,
rowList: [30, 50, 100],
......@@ -253,4 +341,13 @@
var imgUrlList = cellvalue.split(',');
return "<a target='_blank' href='/ProductManage/Product/FrontInfo/" + rowObject.Id + "' href1='" + imgUrlList[0] + "' class='tooltip1'><img src='" + imgUrlList[0] + "' title='" + rowObject['Title'] + "' width='50' height='50'/></a>";
};
//跳转到采购系统
var navigateToOrder = function (orderno, datasource) {
var url = 'http://tj.oa.com/OrderList/Order/OrderIndex?orderno=' + orderno;
if (datasource.toLowerCase() == "fba") {
url = "";
}
window.open(url, '_blank');
}
</script>
\ No newline at end of file
......@@ -123,7 +123,12 @@
}
},
{ label: '调拨在途金额', name: 'allot_transit_money', index: 'allot_transit_money', align: 'center', sortable: true },
{ label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true },
{
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.s_number + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
{ label: '昨日总销量', name: 'oneday_sales', index: 'oneday_sales', align: 'center', sortable: true },
{ label: '昨日总销量额', name: 'oneday_salesmoney', index: 'oneday_salesmoney', align: 'center', sortable: true },
......@@ -174,7 +179,7 @@
//{ label: 'fba库存数量', name: 'fba_stock_quantity', index: 'fba_stock_quantity', align: 'center', sortable: true },
{ label: '采购在途数量', name: 'purchase_transit_quantity', index: 'purchase_transit_quantity', align: 'center', sortable: true },
{ label: '调拨在途数量', name: 'allot_transit_quantity', index: 'allot_transit_quantity', align: 'center', sortable: true },
{ label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true },
{label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true},
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
{ label: '近一日销量', name: 'oneday_sales', index: 'oneday_sales', align: 'center', sortable: true },
{ label: '近七日销量', name: 'sevendays_sales', index: 'sevendays_sales', align: 'center', sortable: true },
......@@ -451,6 +456,10 @@
else if (type === 3) {
url = '/Statistic/SkuStatistic/skuwarehouseIndex?sku=' + sku;
}
//销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&shipstatus=1';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
......
......@@ -33,9 +33,9 @@
<td style="padding-left: 5px;">
<a id="btn_Search" class="btn btn-primary"><i class="fa fa-search"></i>查询</a>
</td>
<td style="padding-left: 5px;">
@*<td style="padding-left: 5px;">
<label style="color:red">半成品仓库数据单独统计。没有筛选半成品仓库时,汇总不算上半成品仓库数据</label>
</td>
</td>*@
</tr>
</table>
</div>
......@@ -59,17 +59,17 @@
$(function () {
//仓库
$("#Warehouse").ComboBox({
url: "../../Statistic/SkuStatistic/GetWarehouse",
description: "==请选择仓库==",
url: "../../Statistic/WarehouseActive/GetWarehouseList",
description: "全部仓库",
id: "WareCode",
text: "WH_Title",
text: "WareName",
allowSearch: true,
height: "200px",
successCallback: function (data) {
warehouseList = data;
//$("#queryWarehouseId").ComboBoxSetValue(initWareCode);
}
});
GetGrid();
InitialPage();
......@@ -103,7 +103,7 @@
text: "TypeName",
height: "200px",
allowSearch: false,
data: [{ Id: '1', TypeName: '国内仓' }, { Id: '2', TypeName: '海外仓' }, { Id: '3', TypeName: 'fba仓' }, { Id: '4', TypeName: '第三方仓库' }, { Id: '99', TypeName: '半成品仓库' }]
data: [{ Id: '1', TypeName: '成品仓' }, { Id: '2', TypeName: '海外仓' }, { Id: '3', TypeName: 'fba仓' }, { Id: '4', TypeName: '第三方仓库' }, { Id: '5', TypeName: '半成品仓' }]
});
$("#sel_warehouse_type").change(function () {
......@@ -111,22 +111,23 @@
//筛选仓库数据
var typeId = $(this).attr('data-value');
var result = [];
if (typeId == 3) {
$(".fbadisplay").show();
} else {
$(".fbadisplay").hide();
$("#selcountry").ResetComboBox("==请选择国家==");
$("#selaccount").ResetComboBox("=选择账号=");
}
if (!typeId) {
result = warehouseList;
} else {
if (typeId==99) {
result.push({ "WareCode": "MJYSMR", "WH_Title": "阳山美容仓" }, { "WareCode": "MJYS", "WH_Title": "阳山仓" });
} else {
} else
result = getWarehouseByType(typeId);
}
//result = getWarehouseByType(typeId);
}
$("#Warehouse").ComboBox({
//url: "/PurchaseAdvice/PurchaseMonitor/GetWarehouseList",
id: "WareCode",
description: "全部仓库",
text: "WH_Title",
text: "WareName",
height: "200px",
async: true,
allowSearch: true,
......@@ -140,7 +141,7 @@
var result = [];
if (warehouseList) {
$.each(warehouseList, function (index, value) {
if (value.WH_Type === parseInt(typeid)) {
if (value.WareType === parseInt(typeid)) {
result.push(value);
}
});
......@@ -165,7 +166,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + cellvalue + '\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuMsDetail(\'' + cellvalue + '\')">' + cellvalue + '</a>';
}
},
{ label: '所在仓库', name: 'warehouse_name', index: 'warehouse_name', align: 'left', sortable: false },
......@@ -175,98 +176,113 @@
{ label: '中文标题', name: 's_title_chinese', index: 's_title_chinese', align: 'left', sortable: false },
{ label: '库存总数量', name: 'stock_quantity', index: 'stock_quantity', align: 'center', sortable: true },
{ label: '库存总金额', name: 'stock_money', index: 'stock_quantity', align: 'center', sortable: true },
{ label: '采购在途数量', name: 'purchase_transit_quantity', index: 'purchase_transit_quantity', align: 'center', sortable: true },
{ label: '采购在途金额', name: 'purchase_transit_money', index: 'purchase_transit_money', align: 'center', sortable: true },
{ label: '调拨在途数量', name: 'allot_transit_quantity', index: 'allot_transit_quantity', align: 'center', sortable: true },
{ label: '调拨在途金额', name: 'allot_transit_money', index: 'allot_transit_money', align: 'center', sortable: true },
{ label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true },
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
{ label: '昨日总销量', name: 'oneday_sales', index: 'oneday_sales', align: 'left', sortable: true },
{ label: '昨日总销量额', name: 'oneday_salesmoney', index: 'oneday_salesmoney', align: 'left', sortable: true },
{ label: '七天总销量', name: 'sevendays_sales', index: 'sevendays_sales', align: 'left', sortable: true },
{ label: '十四天总销量', name: 'fourteendays_sales', index: 'fourteendays_sales', align: 'left', sortable: true },
{ label: '三十天总销量', name: 'thirtydays_sales', index: 'thirtydays_sales', align: 'left', sortable: true },
];
var waretype=$("#sel_warehouse_type").attr("data-value");
if(waretype==99){
columnArray=[
{ label: '自增编号', name: 'Id', index: 'Id', align: 'left', sortable: false, hidden: true },
{
label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + cellvalue + '\')">' + cellvalue + '</a>';
}
},
{ label: '所在仓库', name: 'warehouse_name', index: 'warehouse_name', align: 'left', sortable: false },
{ label: '英文标题', name: 's_title', index: 's_title',align: 'left', sortable: false },
{
label: '库存总数量', name: 'stock_quantity', index: 'stock_quantity', align: 'center', sortable: true},
{
label: '采购总数量', name: 'purchase_totalquantity', index: 'purchase_totalquantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue < 0) {
return 0;
} else {
return cellvalue;
}
}
},
{
label: '销售总数量', name: 'order_totalquantity', index: 'order_totalquantity', align: 'center', sortable: true,
label: '采购在途数量', name: 'purchase_transit_quantity', index: 'purchase_transit_quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue < 0) {
return 0;
} else {
return cellvalue;
}
}
},
{
label: '昨日总销量', name: 'oneday_sales', index: 'oneday_sales', align: 'left', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue < 0) {
return 0;
} else {
return cellvalue;
}
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.s_number + '\',\'' + rowObject.warehouse_code + '\',1,1,\'采购明细\')">' + cellvalue + '</a>';
}
},
{ label: '采购在途金额', name: 'purchase_transit_money', index: 'purchase_transit_money', align: 'center', sortable: true },
{
label: '七天总销量', name: 'sevendays_sales', index: 'sevendays_sales', align: 'left', sortable: true,
label: '调拨在途数量', name: 'allot_transit_quantity', index: 'allot_transit_quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue < 0) {
return 0;
} else {
return cellvalue;
}
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.s_number + '\',\'' + rowObject.warehouse_code + '\',1,2,\'调拨明细\')">' + cellvalue + '</a>';
}
},
{ label: '调拨在途金额', name: 'allot_transit_money', index: 'allot_transit_money', align: 'center', sortable: true },
{
label: '十四天总销量', name: 'fourteendays_sales', index: 'fourteendays_sales', align: 'left', sortable: true,
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue < 0) {
return 0;
} else {
return cellvalue;
}
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.s_number + '\',\'' + rowObject.warehouse_code + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
{
label: '三十天总销量', name: 'thirtydays_sales', index: 'thirtydays_sales', align: 'left', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue < 0) {
return 0;
} else {
return cellvalue;
}
}
}
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
{ label: '昨日总销量', name: 'oneday_sales', index: 'oneday_sales', align: 'left', sortable: true },
{ label: '昨日总销量额', name: 'oneday_salesmoney', index: 'oneday_salesmoney', align: 'left', sortable: true },
{ label: '七天总销量', name: 'sevendays_sales', index: 'sevendays_sales', align: 'left', sortable: true },
{ label: '十四天总销量', name: 'fourteendays_sales', index: 'fourteendays_sales', align: 'left', sortable: true },
{ label: '三十天总销量', name: 'thirtydays_sales', index: 'thirtydays_sales', align: 'left', sortable: true },
];
}
//var waretype=$("#sel_warehouse_type").attr("data-value");
//if(waretype==99){
// columnArray=[
// { label: '自增编号', name: 'Id', index: 'Id', align: 'left', sortable: false, hidden: true },
// {
// label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
// formatter: function (cellvalue, options, rowObject) {
// return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + cellvalue + '\')">' + cellvalue + '</a>';
// }
// },
// { label: '所在仓库', name: 'warehouse_name', index: 'warehouse_name', align: 'left', sortable: false },
// { label: '英文标题', name: 's_title', index: 's_title',align: 'left', sortable: false },
// {
// label: '库存总数量', name: 'stock_quantity', index: 'stock_quantity', align: 'center', sortable: true},
// {
// label: '采购总数量', name: 'purchase_totalquantity', index: 'purchase_totalquantity', align: 'center', sortable: true,
// formatter: function (cellvalue, options, rowObject) {
// if (cellvalue < 0) {
// return 0;
// } else {
// return cellvalue;
// }
// }
// },
// {
// label: '销售总数量', name: 'order_totalquantity', index: 'order_totalquantity', align: 'center', sortable: true,
// formatter: function (cellvalue, options, rowObject) {
// if (cellvalue < 0) {
// return 0;
// } else {
// return cellvalue;
// }
// }
// },
// {
// label: '昨日总销量', name: 'oneday_sales', index: 'oneday_sales', align: 'left', sortable: true,
// formatter: function (cellvalue, options, rowObject) {
// if (cellvalue < 0) {
// return 0;
// } else {
// return cellvalue;
// }
// }
// },
// {
// label: '七天总销量', name: 'sevendays_sales', index: 'sevendays_sales', align: 'left', sortable: true,
// formatter: function (cellvalue, options, rowObject) {
// if (cellvalue < 0) {
// return 0;
// } else {
// return cellvalue;
// }
// }
// },
// {
// label: '十四天总销量', name: 'fourteendays_sales', index: 'fourteendays_sales', align: 'left', sortable: true,
// formatter: function (cellvalue, options, rowObject) {
// if (cellvalue < 0) {
// return 0;
// } else {
// return cellvalue;
// }
// }
// },
// {
// label: '三十天总销量', name: 'thirtydays_sales', index: 'thirtydays_sales', align: 'left', sortable: true,
// formatter: function (cellvalue, options, rowObject) {
// if (cellvalue < 0) {
// return 0;
// } else {
// return cellvalue;
// }
// }
// }
// ];
//}
var url = "../../Statistic/SkuStatistic/GetPageListJson";
if (waretype == 99) {
url = "../../Statistic/MaterialStatistic/GetPageListJson";
}
//if (waretype == 99) {
// url = "../../Statistic/MaterialStatistic/GetPageListJson";
//}
var selectedRowIndex = 0;
var $gridTable = $('#gridTable');
$gridTable.jqGrid({
......@@ -345,11 +361,11 @@
"thirtydays_sales": 0
};
if (total > 0) {
var waretype = $("#sel_warehouse_type").attr("data-value");
//var waretype = $("#sel_warehouse_type").attr("data-value");
var url = "../../Statistic/SkuStatistic/SumSkuStatistic";
if (waretype == 99) {
url = "../../Statistic/MaterialStatistic/SumSkuStatistic";
}
//if (waretype == 99) {
// url = "../../Statistic/MaterialStatistic/SumSkuStatistic";
//}
$.SetForm({
url:url,
//type: 'post',
......@@ -383,10 +399,32 @@
}
var navigateToDetail = function (sku) {
var navigateToSkuMsDetail = function (sku) {
if (!isNullOrEmpty(sku)) {
var url = 'http://skums.bailuntec.com/ProductManage/Product/IframeDetail?Sku='+sku;
window.open(url, '_blank');
}
}
var navigateToDetail = function (sku, warehousecode, status, type, title) {
if (!isNullOrEmpty(sku)) {
var url = '../../Purchase/SkuPurchase/Index?sku=' + sku + '&status=' + status + '&warehousecode=' + warehousecode;
//调拨
if (type === 2) {
url = '/Allot/SkuAllot/Index?sku=' + sku + '&status=' + status + '&warehousecode=' + warehousecode;
}
//销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&warehousecode=' + warehousecode + '&shipstatus=1';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
closed: true,
replace: true,
icon: "fa fa-file-text-o",
url: url
});
}
}
</script>
\ No newline at end of file
......@@ -254,7 +254,12 @@
}
},
{ label: '调拨在途金额', name: 'allot_transit_money', index: 'allot_transit_money', align: 'center', sortable: true },
{ label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true },
{
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.warehouse_code + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
//{ label: '采购总量', name: 'purchase_totalquantity', index: 'purchase_totalquantity', align: 'center', sortable: true },
//{ label: '入库总量', name: 'storage_totalquantity', index: 'storage_totalquantity', align: 'center', sortable: true },
......@@ -291,52 +296,6 @@
subGrid: true,
subGridRowExpanded: function (subgrid_id, row_id) {
var warehousecode = $gridTable.jqGrid('getRowData', row_id)['warehouse_code'];
//var subgrid_table_id = subgrid_id + "_t";
//$("#" + subgrid_id).html("<table id='" + subgrid_table_id + "'></table>");
//$("#" + subgrid_table_id).jqGrid({
// autowidth: true,
// url: "../../Statistic/WarehouseActive/GetWarehouseChildList",
// postData: {
// warehouse: warehousecode
// },
// datatype: "json",
// height: "100%",
// colModel: [
// { label: 'sku编码', name: 's_number', index: 's_number', width: 150, align: 'left', sortable: false },
// { label: '采购数量', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true },
// { label: '已发货数量', name: 'shipped_quantity', index: 'shipped_quantity', width: 80, align: 'center', sortable: true },
// { label: '未发货数量', name: 'notshipped_quantity', index: 'notshipped_quantity', width: 80, align: 'center', sortable: true },
// { label: '已到货数量', name: 'arrived_quantity', index: 'arrived_quantity', width: 80, align: 'center', sortable: true },
// { label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', width: 80, align: 'center', sortable: true },
// { label: '校验数量', name: 'checked_quantity', index: 'checked_quantity', width: 60, align: 'center', sortable: true },
// { label: '校验通过数量', name: 'checked_passed_quantity', index: 'checked_passed_quantity', width: 90, align: 'center', sortable: true },
// { label: '校验不通过数量', name: 'checked_notpassed_quantity', index: 'checked_notpassed_quantity', width: 100, align: 'center', sortable: true },
// { label: '质检数量', name: 'testing_quantity', index: 'testing_quantity', width: 60, align: 'center', sortable: true },
// { label: '质检通过数量', name: 'testing_passed_quantity', index: 'testing_passed_quantity', width: 90, align: 'center', sortable: true },
// { label: '质检不通过数量', name: 'testing_notpassed_quantity', index: 'testing_notpassed_quantity', width: 100, align: 'center', sortable: true },
// { label: '缺失数量', name: 'deletion_quantity', index: 'deletion_quantity', width: 60, align: 'center', sortable: true },
// { label: '报损数量', name: 'damage_quantity', index: 'damage_quantity', width: 60, align: 'center', sortable: true },
// { label: '退货数量', name: 'return_quantity', index: 'return_quantity', width: 60, align: 'center', sortable: true },
// { label: '换货数量', name: 'exchange_quantity', index: 'exchange_quantity', width: 60, align: 'center', sortable: true },
// { label: '入库数量', name: 'storage_quantity', index: 'storage_quantity', width: 60, align: 'center', sortable: true },
// { label: '待调拨数量', name: 'stayallot_quantity', index: 'stayallot_quantity', width: 80, align: 'center', sortable: true },
// { label: '调拨数量', name: 'allot_quantity', index: 'allot_quantity', width: 60, align: 'center', sortable: true },
// { label: '调拨已到货', name: 'allot_arrived_quantity', index: 'allot_arrived_quantity', width: 80, align: 'center', sortable: true },
// { label: '调拨未到货', name: 'allot_notarrived_quantity', index: 'allot_notarrived_quantity', width: 80, align: 'center', sortable: true },
// { label: '调拨缺失数量', name: 'allot_deletion_quantity', index: 'allot_deletion_quantity', width: 90, align: 'center', sortable: true },
// { label: '调拨入库数量', name: 'allot_storage_quantity', index: 'allot_storage_quantity', width: 90, align: 'center', sortable: true },
// { label: '未发货数量', name: 'order_quantity', index: 'order_quantity', width: 90, align: 'center', sortable: true },
// ],
// caption: "sku状态",
// rowNum: "1000",
// rownumbers: true,
// shrinkToFit: true,
// gridview: true,
// hidegrid: false,
// loadComplete: function () {
// $(window).trigger("resize");
// },
//});
bindPurchaseSubGrid(subgrid_id, row_id, warehousecode);
bindAllotSubGrid(subgrid_id, row_id, warehousecode);
bindOrderSubGrid(subgrid_id, row_id, warehousecode);
......@@ -362,7 +321,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', width: 120, align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkums(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
}
},
{
......@@ -379,11 +338,30 @@
},
{ label: '起始仓', name: 'warehouse_name_from', index: 'warehouse_name_from', align: 'left', sortable: false },
{ label: '目标仓', name: 'warehouse_name_to', index: 'warehouse_name_to', align: 'left', sortable: false },
{ label: '采购数量', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true },
{ label: '采购总数量', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true },
{
label: '采购下单数', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue > 0) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,1,\'采购明细\')">' + rowObject.notshipped_quantity + '</a>';
} else {
return rowObject.notshipped_quantity;
}
}
},
//{ label: '已发货数量', name: 'shipped_quantity', index: 'shipped_quantity', width: 80, align: 'center', sortable: true },
{ label: '未发货数量', name: 'notshipped_quantity', index: 'notshipped_quantity', width: 80, align: 'center', sortable: true },
//{ label: '未发货数量', name: 'notshipped_quantity', index: 'notshipped_quantity', width: 80, align: 'center', sortable: true },
//{ label: '已到货数量', name: 'arrived_quantity', index: 'arrived_quantity', width: 80, align: 'center', sortable: true },
{ label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', width: 80, align: 'center', sortable: true },
{
label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', width: 80, align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue > 0) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,1,\'采购明细\')">' + cellvalue + '</a>';
} else {
return cellvalue;
}
}
},
//{ label: '校验数量', name: 'checked_quantity', index: 'checked_quantity', width: 60, align: 'center', sortable: true },
//{ label: '校验通过数量', name: 'checked_passed_quantity', index: 'checked_passed_quantity', width: 90, align: 'center', sortable: true },
{ label: '校验不通过数量', name: 'checked_notpassed_quantity', index: 'checked_notpassed_quantity', width: 100, align: 'center', sortable: true },
......@@ -426,7 +404,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkums(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
}
},
{ label: '起始仓', name: 'warehouse_name_from', index: 'warehouse_name_from', align: 'left', sortable: false },
......@@ -443,9 +421,18 @@
}
}
},
{ label: '调拨数量', name: 'allot_quantity', index: 'allot_quantity', align: 'center', sortable: true },
{ label: '调拨数量', name: 'allot_quantity', index: 'allot_quantity', align: 'center', sortable: true },
//{ label: '已到货数量', name: 'arrived_quantity', index: 'arrived_quantity', align: 'center', sortable: true },
{ label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', align: 'center', sortable: true },
{
label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue > 0) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,2,\'调拨明细\')">' + cellvalue + '</a>';
} else {
return cellvalue;
}
}
},
{ label: '缺失数量', name: 'deletion_quantity', index: 'deletion_quantity', align: 'center', sortable: true },
{ label: '入库数量', name: 'storage_quantity', index: 'storage_quantity', align: 'center', sortable: true },
],
......@@ -499,7 +486,12 @@
}
},
{ label: '发货仓', name: 'delivery_warehouse_name', index: 'delivery_warehouse_name', align: 'left', sortable: true },
{ label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true },
{
label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
],
caption: "未发货订单",
rowNum: 30,
......@@ -552,7 +544,12 @@
}
},
{ label: '发货仓', name: 'delivery_warehouse_name', index: 'delivery_warehouse_name', align: 'left', sortable: true },
{ label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true },
{
label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,5,\'订单明细\')">' + cellvalue + '</a>';
}
},
],
caption: "FBA未发货订单",
rowNum: 30,
......@@ -629,6 +626,11 @@
else if (type === 3) {
url = '/Statistic/SkuStatistic/skuwarehouseIndex?warehousecode=' + warehousecode;
}
//销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?warehousecode=' + warehousecode + '&status=' + status + '&shipstatus=1';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
......@@ -640,10 +642,40 @@
}
}
var navigateToSkuDetail = function (sku, status, type, title) {
var navigateToSkums = function (sku, status, type, title) {
if (!isNullOrEmpty(sku)) {
var url = 'http://skums.bailuntec.com/ProductManage/Product/IframeDetail?Sku=' + sku;
window.open(url, '_blank');
}
}
var navigateToSkuDetail = function (sku, status, type, title) {
if (!isNullOrEmpty(sku)) {
var url = '../../Purchase/SkuPurchase/Index?sku=' + sku + '&status=' + status;
//调拨
if (type === 2) {
url = '/Allot/SkuAllot/Index?sku=' + sku + '&status=' + status;
}
//sku仓库
else if (type === 3) {
url = '/Statistic/SkuStatistic/skuwarehouseIndex?sku=' + sku;
}
//HQOMS销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&shipstatus=1&datasource=HQOMS';
}
//FBA销售订单
else if (type === 5) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&shipstatus=1&datasource=FBA';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
closed: true,
replace: true,
icon: "fa fa-file-text-o",
url: url
});
}
}
</script>
\ No newline at end of file
......@@ -159,7 +159,7 @@
text: "WareName",
height: "200px",
async: true,
param: { queryJson:JSON.stringify(queryjson)},
param: { queryJson: JSON.stringify(queryjson) },
allowSearch: true
});
});
......@@ -254,7 +254,12 @@
}
},
{ label: '调拨在途金额', name: 'allot_transit_money', index: 'allot_transit_money', align: 'center', sortable: true },
{ label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true },
{
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.warehouse_code + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
//{ label: '采购总量', name: 'purchase_totalquantity', index: 'purchase_totalquantity', align: 'center', sortable: true },
//{ label: '入库总量', name: 'storage_totalquantity', index: 'storage_totalquantity', align: 'center', sortable: true },
......@@ -316,7 +321,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', width: 120, align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkums(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
}
},
{
......@@ -333,11 +338,30 @@
},
{ label: '起始仓', name: 'warehouse_name_from', index: 'warehouse_name_from', align: 'left', sortable: false },
{ label: '目标仓', name: 'warehouse_name_to', index: 'warehouse_name_to', align: 'left', sortable: false },
{ label: '采购数量', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true },
{ label: '采购总数量', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true },
{
label: '采购下单数', name: 'quantity', index: 'quantity', width: 60, align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue > 0) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,1,\'采购明细\')">' + rowObject.notshipped_quantity + '</a>';
} else {
return rowObject.notshipped_quantity;
}
}
},
//{ label: '已发货数量', name: 'shipped_quantity', index: 'shipped_quantity', width: 80, align: 'center', sortable: true },
{ label: '未发货数量', name: 'notshipped_quantity', index: 'notshipped_quantity', width: 80, align: 'center', sortable: true },
//{ label: '未发货数量', name: 'notshipped_quantity', index: 'notshipped_quantity', width: 80, align: 'center', sortable: true },
//{ label: '已到货数量', name: 'arrived_quantity', index: 'arrived_quantity', width: 80, align: 'center', sortable: true },
{ label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', width: 80, align: 'center', sortable: true },
{
label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', width: 80, align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue > 0) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,1,\'采购明细\')">' + cellvalue + '</a>';
} else {
return cellvalue;
}
}
},
//{ label: '校验数量', name: 'checked_quantity', index: 'checked_quantity', width: 60, align: 'center', sortable: true },
//{ label: '校验通过数量', name: 'checked_passed_quantity', index: 'checked_passed_quantity', width: 90, align: 'center', sortable: true },
{ label: '校验不通过数量', name: 'checked_notpassed_quantity', index: 'checked_notpassed_quantity', width: 100, align: 'center', sortable: true },
......@@ -380,7 +404,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkums(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
}
},
{ label: '起始仓', name: 'warehouse_name_from', index: 'warehouse_name_from', align: 'left', sortable: false },
......@@ -397,9 +421,18 @@
}
}
},
{ label: '调拨数量', name: 'allot_quantity', index: 'allot_quantity', align: 'center', sortable: true },
{ label: '调拨数量', name: 'allot_quantity', index: 'allot_quantity', align: 'center', sortable: true },
//{ label: '已到货数量', name: 'arrived_quantity', index: 'arrived_quantity', align: 'center', sortable: true },
{ label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', align: 'center', sortable: true },
{
label: '未到货数量', name: 'notarrived_quantity', index: 'notarrived_quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
if (cellvalue > 0) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,2,\'调拨明细\')">' + cellvalue + '</a>';
} else {
return cellvalue;
}
}
},
{ label: '缺失数量', name: 'deletion_quantity', index: 'deletion_quantity', align: 'center', sortable: true },
{ label: '入库数量', name: 'storage_quantity', index: 'storage_quantity', align: 'center', sortable: true },
],
......@@ -433,7 +466,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkums(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
}
},
{ label: '平台', name: 'platform', index: 'platform', align: 'left', sortable: false },
......@@ -453,7 +486,12 @@
}
},
{ label: '发货仓', name: 'delivery_warehouse_name', index: 'delivery_warehouse_name', align: 'left', sortable: true },
{ label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true },
{
label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
],
caption: "未发货订单",
rowNum: 30,
......@@ -486,7 +524,7 @@
{
label: 'sku编码', name: 's_number', index: 's_number', align: 'left', sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkums(\'' + cellvalue + '\',1,3,\'sku仓库\')">' + cellvalue + '</a>';
}
},
{ label: '平台', name: 'platform', index: 'platform', align: 'left', sortable: false },
......@@ -506,7 +544,12 @@
}
},
{ label: '发货仓', name: 'delivery_warehouse_name', index: 'delivery_warehouse_name', align: 'left', sortable: true },
{ label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true },
{
label: '未发货数量', name: 'quantity', index: 'quantity', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToSkuDetail(\'' + rowObject.s_number + '\',1,5,\'订单明细\')">' + cellvalue + '</a>';
}
},
],
caption: "FBA未发货订单",
rowNum: 30,
......@@ -583,6 +626,11 @@
else if (type === 3) {
url = '/Statistic/SkuStatistic/skuwarehouseIndex?warehousecode=' + warehousecode;
}
//销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?warehousecode=' + warehousecode + '&status=' + status + '&shipstatus=1';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
......@@ -594,10 +642,40 @@
}
}
var navigateToSkuDetail = function (sku, status, type, title) {
var navigateToSkums = function (sku, status, type, title) {
if (!isNullOrEmpty(sku)) {
var url = 'http://skums.bailuntec.com/ProductManage/Product/IframeDetail?Sku=' + sku;
window.open(url, '_blank');
}
}
var navigateToSkuDetail = function (sku, status, type, title) {
if (!isNullOrEmpty(sku)) {
var url = '../../Purchase/SkuPurchase/Index?sku=' + sku + '&status=' + status;
//调拨
if (type === 2) {
url = '/Allot/SkuAllot/Index?sku=' + sku + '&status=' + status;
}
//sku仓库
else if (type === 3) {
url = '/Statistic/SkuStatistic/skuwarehouseIndex?sku=' + sku;
}
//销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&shipstatus=1&datasource=HQOMS';
}
//销售订单
else if (type === 5) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&shipstatus=1&datasource=FBA';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
closed: true,
replace: true,
icon: "fa fa-file-text-o",
url: url
});
}
}
</script>
\ No newline at end of file
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