fxc 3 weeks ago
commit 0eb2f8ec77

Binary file not shown.

Binary file not shown.

@ -227,3 +227,4 @@ C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.csproj.CoreCompileInputs.cache
C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.csproj.CopyComplete C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.csproj.CopyComplete
C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.dll C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.dll
C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.pdb C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.pdb
C:\wms新\erpnew\ERP\ApiNew\obj\Debug\ApiNew.csproj.AssemblyReference.cache

Binary file not shown.

Binary file not shown.

@ -67,8 +67,8 @@
<appSettings> <appSettings>
<!--<add key="ConnectionString" value="server=60.12.218.120;database=erp;uid=KJERP;pwd=KJERP123456"/>--> <!--<add key="ConnectionString" value="server=60.12.218.120;database=erp;uid=KJERP;pwd=KJERP123456"/>-->
<!--<add key="ConnectionString" value="server=101.37.88.86;database=erp;uid=sa;pwd=erp@yeyuan123456New"/>--> <!--<add key="ConnectionString" value="server=101.37.88.86;database=erp;uid=sa;pwd=erp@yeyuan123456New"/>-->
<!--<add key="ConnectionString" value="server=.;database=ERPYY;uid=sa;pwd=hz123456"/>--> <add key="ConnectionString" value="server=.;database=ERPYY;uid=sa;pwd=hz123456"/>
<add key="ConnectionString" value="server=192.168.1.16;database=newerpbak_cwk;uid=erpadmin;pwd=erp@12345;TrustServerCertificate=True;"/> <!--<add key="ConnectionString" value="server=192.168.1.16;database=newerpbak_cwk;uid=erpadmin;pwd=erp@12345;TrustServerCertificate=True;"/>-->
<add key="Alibaba_Appkey" value="4777502"/> <add key="Alibaba_Appkey" value="4777502"/>
<add key="Alibaba_DeveKey" value="QQEkGZe0G93"/> <add key="Alibaba_DeveKey" value="QQEkGZe0G93"/>
<add key="Amazon_AccessKeyId" value="AKIAJU3WI7WL7IZQZNYA"/> <add key="Amazon_AccessKeyId" value="AKIAJU3WI7WL7IZQZNYA"/>

Binary file not shown.

Binary file not shown.

@ -67,8 +67,8 @@
<appSettings> <appSettings>
<!--<add key="ConnectionString" value="server=60.12.218.120;database=erp;uid=KJERP;pwd=KJERP123456"/>--> <!--<add key="ConnectionString" value="server=60.12.218.120;database=erp;uid=KJERP;pwd=KJERP123456"/>-->
<!--<add key="ConnectionString" value="server=101.37.88.86;database=erp;uid=sa;pwd=erp@yeyuan123456New"/>--> <!--<add key="ConnectionString" value="server=101.37.88.86;database=erp;uid=sa;pwd=erp@yeyuan123456New"/>-->
<!--<add key="ConnectionString" value="server=.;database=ERPYY;uid=sa;pwd=hz123456"/>--> <add key="ConnectionString" value="server=.;database=ERPYY;uid=sa;pwd=hz123456"/>
<add key="ConnectionString" value="server=192.168.1.16;database=newerpbak_cwk;uid=erpadmin;pwd=erp@12345;TrustServerCertificate=True;"/> <!--<add key="ConnectionString" value="server=192.168.1.16;database=newerpbak_cwk;uid=erpadmin;pwd=erp@12345;TrustServerCertificate=True;"/>-->
<add key="Alibaba_Appkey" value="4777502"/> <add key="Alibaba_Appkey" value="4777502"/>
<add key="Alibaba_DeveKey" value="QQEkGZe0G93"/> <add key="Alibaba_DeveKey" value="QQEkGZe0G93"/>
<add key="Amazon_AccessKeyId" value="AKIAJU3WI7WL7IZQZNYA"/> <add key="Amazon_AccessKeyId" value="AKIAJU3WI7WL7IZQZNYA"/>

Binary file not shown.

@ -63,11 +63,11 @@
</scripting> </scripting>
</system.web.extensions> </system.web.extensions>
<appSettings> <appSettings>
<!--<add key="ConnectionString" value="server=.;database=ERPYY;uid=sa;pwd=hz123456" />--> <add key="ConnectionString" value="server=.;database=ERPYY;uid=sa;pwd=hz123456" />
<!--<add key="ConnectionString" value="server=101.37.88.86;database=erp;uid=sa;pwd=erp@yeyuan123456New"/>--> <!--<add key="ConnectionString" value="server=101.37.88.86;database=erp;uid=sa;pwd=erp@yeyuan123456New"/>-->
<!--<add key="ConnectionString" value="server=60.12.218.120;database=erp;uid=KJERP;pwd=KJERP123456"/>--> <!--<add key="ConnectionString" value="server=60.12.218.120;database=erp;uid=KJERP;pwd=KJERP123456"/>-->
<!--<add key="ConnectionString" value="server=192.168.1.16;database=newerp;uid=erpadmin;pwd=erp@12345" />--> <!--<add key="ConnectionString" value="server=192.168.1.16;database=newerp;uid=erpadmin;pwd=erp@12345" />-->
<add key="ConnectionString" value="server=192.168.1.16;database=newerpbak_cwk;uid=erpadmin;pwd=erp@12345;TrustServerCertificate=True;"/> <!--<add key="ConnectionString" value="server=192.168.1.16;database=newerpbak_cwk;uid=erpadmin;pwd=erp@12345;TrustServerCertificate=True;"/>-->
<add key="PDAversion" value="1.0.1"/> <add key="PDAversion" value="1.0.1"/>
</appSettings> </appSettings>
<system.webServer> <system.webServer>

@ -30466,6 +30466,9 @@ namespace TradeManageNew
public int Save_TemuShopGoodActive(TemuShopGoodActive Model) public int Save_TemuShopGoodActive(TemuShopGoodActive Model)
{ {
Pages.Login(this.Session); Pages.Login(this.Session);
Model.State = 1;
Model.CreateTime = DateTime.Now;
Model.CreateUserId= Convert.ToInt32(Session["UserId"]);
return DataNew.Save_TemuShopGoodActive(Model); return DataNew.Save_TemuShopGoodActive(Model);
} }
#endregion #endregion
@ -30562,6 +30565,7 @@ namespace TradeManageNew
ActiveInfo +="折扣:"+ddmd.OffNum.Value.ToString() + " 售价:"+ ddmd.SalePrice.Value.ToString() + " 活动库存:"+ ddmd.ActiveNum.Value.ToString() + " 已出订单:"+ ddmd.OutNum.Value.ToString() + "<br/>"; ActiveInfo +="折扣:"+ddmd.OffNum.Value.ToString() + " 售价:"+ ddmd.SalePrice.Value.ToString() + " 活动库存:"+ ddmd.ActiveNum.Value.ToString() + " 已出订单:"+ ddmd.OutNum.Value.ToString() + "<br/>";
} }
} }
omd.ActiveInfo = ActiveInfo;
} }
} }
} }

@ -7137,6 +7137,89 @@ end
#endregion #endregion
#region 智能库存temu筛选
public static List<TemuSKUData_List> GetTemuSKUData()
{
List<TemuSKUData_List> model = null;
string tsql = @"
select b.GoodsCode,c.Name,a.YuGuJiaGe as temuChengben,b.JYPrice ,'' as GrossProfit,isnull(t1.SaleNum,0) as SaleNum1,isnull(t2.SaleNum,0) as SaleNum2,isnull(t3.SaleNum,0) as SaleNum3,isnull(t7.SaleNum,0) as SaleNum7,isnull(t14.SaleNum,0) as SaleNum14,isnull(t30.SaleNum,0) as SaleNum30,sumall.GoodsHJNum,sumall.LeftNumW,sumall.LeftNumE,'' as PositionAge
from [dbo].[TemuChengBen] a
inner join HW_GoodsInfo b on a.GoodsId=b.GoodsId
inner join JC_UserInfo c on a.mUserId=c.UserId
left join ( select t.GoodsId,SUM(ISNULL(t.GoodsNum,0)) SaleNum from (
select case when c.StoreId=9 then 6 when c.StoreId=6 then 6 when c.StoreId=11 then 11 end StoreId,isnull(e.GoodsId,0) GoodsId ,b.GoodsNum
from DT_OrderInfo a
inner join DT_OrderXXInfo c on a.OrderId=c.OrderId
inner join DT_OrderGoods b on a.OrderId=b.OrderId
inner join HW_GoodsDetail e on b.DetailId=e.DetailId
where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and DATEDIFF(day,a.OrderDate,getdate())<=1
) t group by t.GoodsId ) t1 on a.GoodsId=t1.GoodsId
left join ( select t.GoodsId,SUM(ISNULL(t.GoodsNum,0)) SaleNum from (
select case when c.StoreId=9 then 6 when c.StoreId=6 then 6 when c.StoreId=11 then 11 end StoreId,isnull(e.GoodsId,0) GoodsId ,b.GoodsNum
from DT_OrderInfo a
inner join DT_OrderXXInfo c on a.OrderId=c.OrderId
inner join DT_OrderGoods b on a.OrderId=b.OrderId
inner join HW_GoodsDetail e on b.DetailId=e.DetailId
where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and DATEDIFF(day,a.OrderDate,getdate())<=2
) t group by t.GoodsId ) t2 on a.GoodsId=t2.GoodsId
left join ( select t.GoodsId,SUM(ISNULL(t.GoodsNum,0)) SaleNum from (
select case when c.StoreId=9 then 6 when c.StoreId=6 then 6 when c.StoreId=11 then 11 end StoreId,isnull(e.GoodsId,0) GoodsId ,b.GoodsNum
from DT_OrderInfo a
inner join DT_OrderXXInfo c on a.OrderId=c.OrderId
inner join DT_OrderGoods b on a.OrderId=b.OrderId
inner join HW_GoodsDetail e on b.DetailId=e.DetailId
where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and DATEDIFF(day,a.OrderDate,getdate())<=3
) t group by t.GoodsId ) t3 on a.GoodsId=t3.GoodsId
left join ( select t.GoodsId,SUM(ISNULL(t.GoodsNum,0)) SaleNum from (
select case when c.StoreId=9 then 6 when c.StoreId=6 then 6 when c.StoreId=11 then 11 end StoreId,isnull(e.GoodsId,0) GoodsId ,b.GoodsNum
from DT_OrderInfo a
inner join DT_OrderXXInfo c on a.OrderId=c.OrderId
inner join DT_OrderGoods b on a.OrderId=b.OrderId
inner join HW_GoodsDetail e on b.DetailId=e.DetailId
where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and DATEDIFF(day,a.OrderDate,getdate())<=7
) t group by t.GoodsId ) t7 on a.GoodsId=t7.GoodsId
left join ( select t.GoodsId,SUM(ISNULL(t.GoodsNum,0)) SaleNum from (
select case when c.StoreId=9 then 6 when c.StoreId=6 then 6 when c.StoreId=11 then 11 end StoreId,isnull(e.GoodsId,0) GoodsId ,b.GoodsNum
from DT_OrderInfo a
inner join DT_OrderXXInfo c on a.OrderId=c.OrderId
inner join DT_OrderGoods b on a.OrderId=b.OrderId
inner join HW_GoodsDetail e on b.DetailId=e.DetailId
where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and DATEDIFF(day,a.OrderDate,getdate())<=14
) t group by t.GoodsId ) t14 on a.GoodsId=t14.GoodsId
left join ( select t.GoodsId,SUM(ISNULL(t.GoodsNum,0)) SaleNum from (
select case when c.StoreId=9 then 6 when c.StoreId=6 then 6 when c.StoreId=11 then 11 end StoreId,isnull(e.GoodsId,0) GoodsId ,b.GoodsNum
from DT_OrderInfo a
inner join DT_OrderXXInfo c on a.OrderId=c.OrderId
inner join DT_OrderGoods b on a.OrderId=b.OrderId
inner join HW_GoodsDetail e on b.DetailId=e.DetailId
where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and DATEDIFF(day,a.OrderDate,getdate())<=30
) t group by t.GoodsId ) t30 on a.GoodsId=t30.GoodsId
left join (select a.GoodsId,sum(GoodsHJNum) as GoodsHJNum,LeftNumW= sum(isnull(a.WestNum,0)+isnull(a.GoodsHJNum14,0)-isnull(a.GoodsPlanNumW,0)),
LeftNumE=sum(isnull(a.EastNum,0)+isnull(a.GoodsHJNum15,0)-isnull(a.GoodsPlanNumE,0) )
from HW_GoodsDetail a
inner join [TemuChengBen] b on a.goodsid=b.GoodsId
group by a.GoodsId) sumall on a.GoodsId=sumall.GoodsId
order by t30.SaleNum desc
";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
DataSet tb = db.ExecuteDataSet(cmd);
if (tb != null)
{
if (tb.Tables.Count > 0 && tb.Tables[0].Rows.Count > 0) model = tb.Tables[0].ToList<TemuSKUData_List>();
}
return model;
}
#endregion
#region 返回扫描订单Model #region 返回扫描订单Model
public static DT_OrderScanModel GetScanOrderModelForReturnFinal(string OrderCode, string OrderCode2, int UserId) public static DT_OrderScanModel GetScanOrderModelForReturnFinal(string OrderCode, string OrderCode2, int UserId)
{ {

@ -1,16 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsFee.aspx.cs" Inherits="TradeManageNew.Huowu.HW_GoodsFee" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

@ -1,25 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace TradeManageNew.Huowu
{
public partial class HW_GoodsFee
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

@ -0,0 +1,693 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_TemuGoodsFee.aspx.cs" Inherits="TradeManageNew.Huowu.HW_TemuGoodsFee" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>货物信息</title>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
<script src="../Scripts/DateBox.js" type="text/javascript"></script>
<script src="../Scripts/FixTable.js" type="text/javascript"></script>
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
<script src="../Scripts/Global2.js?t=1" type="text/javascript"></script>
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
<script src="../Scripts/jquery.cookies.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
media="screen" />
<script type="text/javascript" src="../Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="../Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
<script type="text/javascript">
var Name = '<%= Session["Name"].ToString() %>';
var UserId = '<%= Session["UserId"].ToString() %>';
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var WindowLoadModel = new WindowLoad();
var DId = 0;
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
CreateDataGrid();
ReadGroup();
ReadUser();
ReadData();
$("#select_groupname").bind("change", function () {
ReadUser();
ReadData();
});
$("#" + datagrid1.TableID + " a[CommandName='dgbtnKC']").live("click", function () {
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
var model = datagrid1.Get_Model(RowIndex);
var DId = model.Id;
$("#txt_OutDays2").val(model.OutDays2);
$("#txt_Price").val(model.Price);
$("#txt_Price2").val(model.Price2);
$("#txt_Num").val(model.Num);
$("#txt_Price3").val(model.Price3);
$("#txt_Num2").val(model.Num2);
$("#txt_Price4").val(model.Price4);
$("#txt_PlanInfo").val(model.PlanInfo);
$("#txt_AdviseInfo").val(model.AdviseInfo);
$("#txt_Remark").val(model.Remark);
fopen();
Model = model;
var snames = model.ShopNames;
ReadShopList(snames);
});
});
function ReadGroup() {
if(UserId==1||UserId==51||UserId==53)
$("#select_groupname").append("<option value='-1'>全部</option>");
$.ajax({
url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
$(data.d).each(function () {
$("#select_groupname").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
});
}
});
}
function ReadUser() {
$("#select_name").empty();
if(UserId==1||UserId==51||UserId==53)
$("#select_name").append("<option value=''>全部</option>");
var param = new Object();
param.groupid = $("#select_groupname").val();
$.ajax({
url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup3",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
$(data.d).each(function () {
//if(UserId!=1&&UserId!=51&&this.UserId==UserId&&UserId!=53)
// $("#select_name").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
// else
// if(UserId==1||UserId==51||UserId==53)
$("#select_name").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
});
if(UserId!=1&&UserId!=51&&UserId!=53)
$("#select_name").val(UserId);
}
});
}
//#region 读取分类
function ReadShopList(ShopNames) {
$("#div_shopnames").empty();
var param = new Object();
param.ShopNames = ShopNames;
$.ajax({
url: "../HuoWuServiceNew.asmx/GetZTShopList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: true,
success: function (data) {
if (data.d != null) {
$(data.d).each(function () {
if (this.IsCheck == true)
$("#div_shopnames").append("<input spid='" + this.ShopId + "' sname='" + this.ShopName + "' type='checkbox' checked='checked'/>"+this.ShopName);
else
$("#div_shopnames").append("<input spid='"+this.ShopId+"' sname='" + this.ShopName + "' type='checkbox' />"+this.ShopName);
});
}
}
});
}
//#endregion
function GetImage(Ids) {
$("#div_img").empty();
var param = new Object();
param.Ids = Ids;
$.ajax({
url: "../BaseData.asmx/GetResourceList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
if (data.d != null) {
$("#img_1").attr("src", '../' + data.d[0].FileUrl);
$(data.d).each(function () {
$("#div_img").append("<img src='../" + this.FileUrl + "' width='100px' height='80px' style='margin-right:5px'/>");
});
fopen();
}
}
});
}
function fopen() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test',
'onComplete': function () {
}
});
}
//#region 初始化DataGrid
function CreateDataGrid() {
Array.clear(datagrid1.Columns);
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "缩略图";
col.CellTemplate = "<a CommandName='cmdImg' class='linka'><img src='{Bind FirstImgUrl}' alt='' width='50px' height='50px'/></a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "货物SKU";
col.Width = "150px";
col.Align = "left";
col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind SKU1}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "人员";
col.CellTemplate = "<div>{Bind mname}</div>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "组长";
col.CellTemplate = "<div>{Bind groupname}</div>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "最长出单周期(天)";
col.CellTemplate = "<span>{Bind OutDays2}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "前期定价$";
col.CellTemplate = "<span>{Bind Price}</span>";
// col.SortExpression = "InPrice";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "稳定定价";
col.CellTemplate = "<span>{Bind Price2}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "第一名销量";
col.CellTemplate = "<span>{Bind Num}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "定价$";
col.CellTemplate = "<span>{Bind Price3}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "目标销量";
col.CellTemplate = "<span>{Bind Num2}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "定价$";
col.CellTemplate = "<span>{Bind Price4}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "重推店铺";
col.CellTemplate = "<div>{Bind ShopNames}</div>";
col.Width = "150px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "计划";
col.CellTemplate = "<div>{Bind PlanInfo}</div>";
col.Width = "150px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "要求";
col.CellTemplate = "<div>{Bind AdviseInfo}</div>";
col.Width = "150px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "备注";
col.CellTemplate = "<div>{Bind Remark}</div>";
col.Width = "150px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "周销量 | 金额";
col.CellTemplate = "<span>{Bind GoodsWeekHJNum}|{Bind GoodsWeekHJPrice}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "月销量|金额";
col.CellTemplate = "<span>{Bind GoodsHJNum2}|{Bind GoodsMonthHJPrice}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "未出单天数(天)";
col.CellTemplate = "<span GNum='{Bind NoOutDays}' SNum='{Bind OutDays2}'>{Bind NoOutDays}</span>";
// col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "80px";
col.CellTemplate = "<a CommandName='dgbtnKC' style='color: #23527c;cursor:pointer'>填写</a>";
Array.add(datagrid1.Columns, col);
datagrid1.SetPageSize(20);
datagrid1.SetPageIndex(1);
// datagrid1.SortExpression = "b.GoodsCode,b.Indate";
// datagrid1.ViewSortDirection = "ASC";
datagrid1.IsFixHeader = true;
datagrid1.Height = $(document).height() - 230;
datagrid1.ShowIndexColumn = false;
datagrid1.AllowPaging = true;
datagrid1.Width = "100%";
//datagrid1.Sorting(function () {
// ReadData();
//});
datagrid1.SelectMode = nblf.ui.SelectMode.None;
datagrid1.Init();
datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
function AddTr() {
$("span[GNum]").each(function () {
var GNum = $(this).attr("GNum");
var SNum = $(this).attr("SNum");
if (GNum == "")
GNum = 0;
if (SNum == "")
SNum = 0;
if (SNum>0&&parseInt(GNum) >parseInt(SNum)) {
$(this).css("color", "red");
}
});
//$("tr[name='DataGridRow']").each(function (i) {
// if (i % 2 == 0)
// $(this).css("background-color", "#EEEEEE");
// ;
//});
}
function ReadData() {
$("#_fixTableHeader").show();
var param = new Object();
CreateWhere("SelectHtml", param); //读取查询条件
param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex();
param.cs += " and b.State=1 and d.deptid=1 and d.state=1 and a.SKU1 not like 's-%' ";
param.cs = Base64.encode(param.cs);
WindowLoadModel.Show();
$.ajax({
url: "../HuoWuServiceNew.asmx/GetListGoodsUserPlanCount",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
AddTr();
}
});
}
//#endregion
//#region 删除
function DelCol(obj) {
if (window.confirm('确定要删除吗?') == false) return;
var rowindex = $(obj).parent().parent().attr("index");
var param = new Object();
var model = datagrid1.Get_Model(rowindex);
param.GoodsId = model.GoodsId;
$.ajax({
url: "HuoWuService.asmx/DeleteGoodsInfo",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
success: function (data) {
if (data.d == 0) {
alert("删除成功");
ReadData();
}
else {
alert("该货物有库存或者有订单匹配或者有采购单匹配,无法删除");
}
}
});
}
function UpdateGoodsSafeNum() {
datagrid2.UpdateDataSource();
var param = new Object();
param.list = datagrid2.DataSource;
$.ajax({
url: "HuoWuService.asmx/UpdateGoodsSafeNum",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
success: function (data) {
alert("备货成功");
ReadData();
$.fancybox.close();
}
});
}
var Model = null;
function Save() {
var param = new Object();
Model.DetailId = Model.Id;
Model.Id = 0;
if( $("#txt_OutDays2").val()!="")
Model.OutDays2 = $("#txt_OutDays2").val();
if( $("#txt_Price").val()!="")
Model.Price = $("#txt_Price").val();
if( $("#txt_Price2").val()!="")
Model.Price2 = $("#txt_Price2").val();
if( $("#txt_Price3").val()!="")
Model.Price3 = $("#txt_Price3").val();
if( $("#txt_Price4").val()!="")
Model.Price4 = $("#txt_Price4").val();
if( $("#txt_Num").val()!="")
Model.Num = $("#txt_Num").val();
if( $("#txt_Num2").val()!="")
Model.Num2 = $("#txt_Num2").val();
Model.PlanInfo=$("#txt_PlanInfo").val();
Model.AdviseInfo=$("#txt_AdviseInfo").val();
Model.Remark = $("#txt_Remark").val();
var snames = "";
$("input[spid]").each(function () {
if ($(this).is(":checked") == true)
snames += $(this).attr("sname")+",";
});
Model.ShopNames = snames;
param.Model =Model;
$.ajax({
url: "../HuoWuServiceNew.asmx/Save_GoodsUserPlanCount",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
success: function (data) {
alert("保存成功");
$.fancybox.close();
ReadData();
}
});
}
function SaveXP() {
var list = datagrid4.GetSelectListModel();
if (list == null || list.length == 0) {
alert("请选择一个货物");
return;
}
if (list[0].IsAdd == 1) {
alert("该选品货物已经添加过编号,不能新增");
return;
}
window.parent.addTab("货物编辑", "HuoWu/HW_GoodsAddForTM.aspx?Title=货物信息&GoodsId=0&XPId=" + list[0].Id + "&LinkUrl=" + list[0].LinkUrl, true);
}
function DeleteXP() {
var list = datagrid4.GetSelectListModel();
if (list == null || list.length == 0) {
alert("请选择一个货物");
return;
}
if (window.confirm('确定要删除该记录吗?') == false) return;
var param = new Object();
param.Id = list[0].Id;
$.ajax({
url: "../BaseData.asmx/DeleteXP",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
success: function (data) {
alert("删除成功");
ReadData();
}
});
}
function SyncPrice() {
var price = 0;
$("input[ColName='Price']").each(function () {
if (price == 0 && $(this).val() != "")
price = $(this).val();
});
if (price > 0)
$("input[ColName='Price']").val(price);
}
//#endregion
</script>
</head>
<body class="headbody">
<div class="title_ico">
货物SKU</div>
<div style="display: none">
<div id="test" title="" style="width: 550px; height: 400px;">
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
<tr>
<td class="f1" width="15%">
最长出单周期:
</td>
<td colspan="3">
<input id="txt_OutDays2" class="editTextbox" style="width: 120px;"
type="text" />天
</td>
</tr>
<tr>
<td class="f1" width="15%">
前期定价:
</td>
<td>
<input id="txt_Price" class="editTextbox" style="width: 120px;" type="text" />$
</td>
<td class="f1" width="15%">
稳定定价:
</td>
<td>
<input id="txt_Price2" class="editTextbox" style="width: 120px;"
type="text" />$
</td>
</tr>
<tr>
<td class="f1" width="15%">
第一名销量:
</td>
<td>
<input id="txt_Num" class="editTextbox" style="width: 120px;" type="text" />
</td>
<td class="f1" width="15%">
定价:
</td>
<td>
<input id="txt_Price3" class="editTextbox" style="width: 120px;"
type="text" />$
</td>
</tr>
<tr>
<td class="f1" width="15%">
目标销量:
</td>
<td>
<input id="txt_Num2" class="editTextbox" style="width: 120px;" type="text" />
</td>
<td class="f1" width="15%">
定价:
</td>
<td>
<input id="txt_Price4" class="editTextbox" style="width: 120px;"
type="text" />$
</td>
</tr>
<tr>
<td class="f1" width="15%">
重推店铺:
</td>
<td colspan="3">
<div id="div_shopnames"></div>
</td>
</tr>
<tr>
<td class="f1" width="15%">
计划:
</td>
<td colspan="3">
<textarea id="txt_PlanInfo" cols="20" style="width:99%" rows="3"></textarea>
</td>
</tr>
<tr>
<td class="f1" width="15%">
要求:
</td>
<td colspan="3">
<textarea id="txt_AdviseInfo" cols="20" style="width:99%" rows="3"></textarea>
</td>
</tr>
<tr>
<td class="f1" width="15%">
备注:
</td>
<td colspan="3">
<textarea id="txt_Remark" cols="20" rows="3" style="width:99%"></textarea>
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input id="btn_Save4" type="button" class="btnClass btnClassSave" value="确 定" onclick="Save();" />
</td>
</tr>
</table>
</div>
</div>
<table id="SelectHtml" class="tableAll" style="width: 100%;">
<tr>
<td class="f1">
SKU:
</td>
<td style="width:30%">
<input id="txt_Name" class="editTextbox" style="width: 120px;" type="text" where="a.SKU1 like '%@value%'"/>
</td>
<td class="f1">
分组/人员:
</td>
<td style="width:30%">
<select id="select_groupname" class="selectClass" style="width: 120px" name="D2" where="d.guserid=@value">
</select>组<select id="select_name" class="selectClass" style="width: 120px" name="D1" where="b.muserid=@value">
</select></td>
<td>
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" onclick="ReadData();" />
</td>
</tr>
<tr>
<td class="f1">
未出单天数:</td>
<td style="width:30%">
<input id="txt_SNum" class="editTextbox" style="width: 50px;" type="text" where="DATEDIFF(day,b.LastOrderDate,GETDATE())>=@value"/>-<input id="txt_ENum" class="editTextbox" style="width: 50px;" type="text" where="DATEDIFF(day,b.LastOrderDate,GETDATE())<=@value"/></td>
<td class="f1">
&nbsp;</td>
<td style="width:30%">
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
<tr>
<td valign="top" colspan="5">
<div id="DataGrid1" class="DataGridStyle" style="-webkit-overflow-scrolling: touch;
overflow: auto;">
</div>
</td>
</tr>
</table>
</body>
</html>

@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace TradeManageNew.Huowu namespace TradeManageNew.Huowu
{ {
public partial class HW_GoodsFee : System.Web.UI.Page public partial class HW_TemuGoodsFee : System.Web.UI.Page
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {

@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace TradeManageNew.Huowu
{
public partial class HW_TemuGoodsFee
{
}
}

@ -182,6 +182,10 @@
col.HeaderText = "基础价格"; col.HeaderText = "基础价格";
col.CellTemplate = "<span>{Bind BasePrice}</span>"; col.CellTemplate = "<span>{Bind BasePrice}</span>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "活动信息";
col.CellTemplate = "<span>{Bind ActiveInfo}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "创建人"; col.HeaderText = "创建人";
@ -198,6 +202,13 @@
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "状态"; col.HeaderText = "状态";
col.CellTemplate = "<span>{Bind State}</span>"; col.CellTemplate = "<span>{Bind State}</span>";
col.CellFormatter = function (value) {
switch (value) {
case 1: return "正常";
case 0: return "已结束";
default: return "";
}
};
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
@ -290,7 +301,7 @@
Model = data.d; Model = data.d;
Model.ID = 0; Model.ID = 0;
CreateGetModel("MainTable", Model); CreateGetModel("MainTable", Model);
$("#select_shops").val(Model.ShopId ); $("#select_shops").val(Model.Shopid);
datagrid2.DataBind(Model.ListModel); datagrid2.DataBind(Model.ListModel);
} }
@ -299,12 +310,12 @@
//#endregion //#endregion
//#region 删除 //#region 删除
function Delete(ID) { function Delete(ID) {
if (window.confirm("确定要删除吗?") == false) return; if (window.confirm("确定要结束该活动吗?") == false) return;
var param = new Object(); var param = new Object();
param.ID = ID; param.ID = ID;
WindowLoadModel.Show(); WindowLoadModel.Show();
$.ajax({ $.ajax({
url: "../DD_OrderServiceNew.asmx/Delete_TemuShopGoodActive", url: "../DD_OrderServiceNew.asmx/Update_TemuShopGoodActive",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) { success: function (data) {
WindowLoadModel.Hide(); WindowLoadModel.Hide();

@ -11264,6 +11264,30 @@ namespace TradeManageNew
} }
public class TemuSKUData_List
{
public int GoodsId { get; set; }
public string GoodsCode { get; set; }
public string Name { get; set; }
public decimal? temuChengben { get; set; }
public decimal? JYPrice { get; set; }
public string GrossProfit { get; set; }
public int SaleNum1 { get; set; }
public int SaleNum2 { get; set; }
public int SaleNum3 { get; set; }
public int SaleNum7 { get; set; }
public int SaleNum14 { get; set; }
public int SaleNum30 { get; set; }
public int GoodsHJNum { get; set; }
public int LeftNumW { get; set; }
public int LeftNumE { get; set; }
public string PositionAge { get; set; }
}
public class TemuShopGoodActive public class TemuShopGoodActive
{ {
/// <summary> /// <summary>

@ -2034,9 +2034,29 @@ namespace TradeManageNew.OuterService
md.Data = null; md.Data = null;
} }
if (Method == "GetTemuSKUData")
{
var ordermodel = DataNew.GetTemuSKUData();
if (ordermodel != null)
{
md.Code = "100";
md.Result = "Success";
md.Data = JsonConvert.SerializeObject(ordermodel);
}
else
{
md.Code = "400";
md.Result = "false";
md.Data = null;
}
}
} }
} }

@ -3055,9 +3055,9 @@ where a.CompanyId=1 " + tj1 + " order by " + Sort;
#endregion #endregion
#region 报表18 #region 报表18(备份文凯的)
[WebMethod(EnableSession = true)] [WebMethod(EnableSession = true)]
public string GetReportTable18(DateTime? InDate, int DeptId, int ShopId, int PlatId, string MoneyCode, string Sort, bool isyc) public string GetReportTable18_250210(DateTime? InDate, int DeptId, int ShopId, int PlatId, string MoneyCode, string Sort, bool isyc)
{ {
string dd = ""; string dd = "";
try try
@ -3161,6 +3161,185 @@ left join ( select sid, CONVERT(decimal(12,2), SUM(t.cost)) as Rate3,CONVERT(dec
return GetReport3(dt, 18);
}
catch (Exception ex)
{
string a = dd;
return "";
}
}
#endregion
#region 报表18
[WebMethod(EnableSession = true)]
public string GetReportTable18(DateTime? InDate, int DeptId, int ShopId, int PlatId, string MoneyCode, string Sort, bool isyc)
{
string dd = "";
try
{
var obj = new BaseService();
string tj = "";
string tj1 = "";
//if (DeptId > 0)
//{
// tj += " and b.DeptId=" + DeptId + " ";
// tj1 += " and a.DeptId=" + DeptId + " ";
//}
if (PlatId > 0)
{
tj += " and a.PlatId=" + PlatId + " ";
tj1 += " and a.PlatId=" + PlatId + " ";
}
if (ShopId > 0)
{
tj += " and a.ShopId=" + ShopId + " ";
tj1 += " and a.ShopId=" + ShopId + " ";
}
string tj2 = "";
if (PlatId > 0)
{
tj2 += " where c.PlatType=" + PlatId + " ";
}
if (ShopId > 0)
{
tj2 += " where c.ShopId=" + ShopId + " ";
}
string tj3 = "";
if (PlatId > 0)
{
tj3 += " where d.PlatType=" + PlatId + " ";
}
if (ShopId > 0)
{
tj3 += " where d.ShopId=" + ShopId + " ";
}
//if (MoneyCode != "0")
// tj += " and a.MoneyCode='" + MoneyCode + "' ";
// string sql = @"
//declare @moneyrate decimal(18,4)
//select @moneyrate=MRate from JC_Money where MCode='USD' and PlatId=2
//select a.ShopId,a.TotalPrice,escrowFee=isnull(a.escrowFee,0),a.RMBPrice,c.yj,yf=c.yf,cb=c.cb,hwsf=c.hwsf,c.tc,c.ck,c.md,a.Ad_Fee,a.DR_BackFee,a.DR_PostFee,a.DR_SSFee,a.Other_Fee,moneyrate=isnull(c.moneyrate,@moneyrate) into #ls from DT_OrderInfo a with(nolock)
//inner join DT_OrderXXInfo b with(nolock) on a.OrderId=b.OrderId
//left join DT_Fees c with(nolock) on a.OrderId=c.orderid
//where DATEDIFF(day,a.OrderDate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 " + tj + @" and a.State>0 and a.State<3
//select a.*,Num2=isnull(b.Num2,0) into #ls2 from (
//select b.ShopId,Num=COUNT(0) from HW_GoodsInfo a with(nolock)
//inner join HW_Shop b with(nolock) on a.GoodsId=b.GoodsId
//group by b.ShopId)a
//left join (
//select a.ShopId,Num2=COUNT(distinct c.GoodsId) from DT_OrderInfo a with(nolock)
//inner join DT_OrderGoods b with(nolock) on a.OrderId=b.OrderId
//inner join HW_GoodsDetail c with(nolock) on b.DetailId=c.DetailId
//where a.State>0 and a.State<3 and DATEDIFF(day,a.OrderDate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 group by a.ShopId)b on a.ShopId=b.ShopId
//select d.ShopName,Master=case when d.Master=d.buyer then d.Master when d.buyer is not null and d.buyer<>'' then d.Master+'-'+d.buyer else d.Master end,a.OrderNum,a.RMBMoney,a.USDMoney,AvgPrice=case when a.OrderNum>0 then cast(a.USDMoney/a.OrderNum as decimal(18,2)) else 0 end,a.InPrice,LR=cast(b.ml as decimal(18,2)),MLL=case when b.TotalPrice>0 then cast(b.ml*100/b.TotalPrice as decimal(18,2)) else 0 end,ShopTJGoods=e.Num,ShopCDGoods=e.Num2,ckfee,a.mdfee,a.adfee,bz=case when a.InPrice>0 then CAST(a.RMBMoney/a.InPrice as decimal(18,2)) else 0 end,c.GoodRate,c.ODR,c.DSRService,c.DSRGoods,h.DSRPost,c.USDUseMoney,c.USDNoMoney,c.RMBUseMoney,c.RMBNoMoney,c.Rate1,c.Rate2,f.Rate3,c.Rate4,c.PropertyViolate,c.Rate5,g.Rate6,Rate7=isnull(c.Rate7,d.dayfee),JL=cast(b.ml as decimal(18,2))+isnull(ckfee,0)+isnull(mdfee,0)-isnull(c.Rate3,0)-isnull(c.Rate7,d.dayfee),FeeDate=isnull(c.FeeDate,d.FeeDate),TXFee=isnull(c.TXFee,d.TXFee) from
//JC_Shop d left join (
//select ShopId,OrderNum=COUNT(0),RMBMoney=SUM(RMBPrice),escrowFee=sum(escrowFee),USDMoney=SUM(TotalPrice),InPrice=SUM(cb),ckfee=SUM(ck),mdfee=SUM(md),adfee=SUM(Ad_Fee) from #ls
//group by ShopId)a on d.ShopId=a.ShopId
//left join (select ShopId,TotalPrice=sum(TotalPrice),ml=sum(isnull(TotalPrice,0)-isnull(escrowFee,0)-isnull(yj,0)-isnull(yf,0)-((isnull(cb,0)+isnull(hwsf,0))/moneyrate)-isnull(tc,0)-isnull(ck,0)-isnull(md,0)-isnull(Ad_Fee,0)) from #ls where yf>0
//group by ShopId)b on a.ShopId=b.ShopId
//left join (
//select GoodRate,ODR,DSRService,DSRGoods,DSRPost,USDUseMoney,USDNoMoney,RMBUseMoney, RMBNoMoney,Rate1,Rate2,Rate3,Rate4,PropertyViolate,Rate5,Rate6,Rate7,FeeDate,TXFee
//TXFee,ShopId from JC_ShopData
//where DATEDIFF(day,indate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 )c on a.ShopId=c.ShopId
//left Join #ls2 e on a.ShopId=e.ShopId
// left join (select shopid,SUM(ABS(adfee)) Rate3 from AD_FeeList where DATEDIFF(day,addate,'" + InDate.Value.AddDays(-2).ToString("yyyy-MM-dd") + "')=0 group by shopid) f on d.ShopId=f.shopid "+
// " left join ( select shopid,SUM(ABS(adfee)) Rate6 from AD_FeeList where CONVERT(varchar(7), addate, 120)='"+ InDate.Value.ToString("yyyy-MM") + "' group by shopid) g on d.ShopId=g.shopid "+
// " left join(select b.name shopName,case when a.Spend=0 or a.ad_sale_amount=0 then 0 else cast((Spend/ad_sale_amount)*100 as decimal(12,2)) end DSRPost from ( select sid,SUM(ISNULL(ABS(spend),0)) Spend, SUM(ISNULL(ad_sales_amount,0)) ad_sale_amount from [192.168.1.187].[UpGoods].dbo.LxERP_ProductPerformance where summary_field='Asin' and RequestDate='" + InDate.Value.AddDays(-2).ToString("yyyy-MM-dd") + "' group by sid) a left join [192.168.1.187].[UpGoods].dbo.LxERP_Amazon_Shop b on a.sid=b.sid) h on d.ShopName=h.shopName "
// + " order by " + Sort;
//string sql = @"
//declare @moneyrate decimal(18,4)
//select @moneyrate=MRate from JC_Money where MCode='USD' and PlatId=2
//select a.ShopId,a.TotalPrice,escrowFee=isnull(a.escrowFee,0),a.RMBPrice,c.yj,yf=c.yf,cb=c.cb,hwsf=c.hwsf,c.tc,c.ck,c.md,a.Ad_Fee,a.DR_BackFee,a.DR_PostFee,a.DR_SSFee,a.Other_Fee,moneyrate=isnull(c.moneyrate,@moneyrate),ISnull( c.SubsidyFee,0) SubsidyFee into #ls from DT_OrderInfo a with(nolock)
//inner join DT_OrderXXInfo b with(nolock) on a.OrderId=b.OrderId
//left join DT_Fees c with(nolock) on a.OrderId=c.orderid
//where DATEDIFF(day,a.OrderDate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 " + tj + @" and a.State>0 and a.State<3
//select a.*,Num2=isnull(b.Num2,0) into #ls2 from (
//select b.ShopId,Num=COUNT(0) from HW_GoodsInfo a with(nolock)
//inner join HW_Shop b with(nolock) on a.GoodsId=b.GoodsId
//left join jc_shop c on b.ShopId=c.ShopId " + tj2 + @"
//group by b.ShopId)a
//left join (
//select a.ShopId,Num2=COUNT(distinct c.GoodsId) from DT_OrderInfo a with(nolock)
//inner join DT_OrderGoods b with(nolock) on a.OrderId=b.OrderId
//inner join HW_GoodsDetail c with(nolock) on b.DetailId=c.DetailId
//where a.State>0 and a.State<3 and DATEDIFF(day,a.OrderDate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 group by a.ShopId)b on a.ShopId=b.ShopId
//select * from (
//select d.ShopName,Master=case when d.Master=d.buyer then d.Master when d.buyer is not null and d.buyer<>'' then d.Master+'-'+d.buyer else d.Master end,a.OrderNum,a.RMBMoney,a.USDMoney,AvgPrice=case when a.OrderNum>0 then cast(a.USDMoney/a.OrderNum as decimal(18,2)) else 0 end,a.InPrice,LR=cast(b.ml as decimal(18,2)),MLL=case when b.TotalPrice>0 then cast(b.ml*100/b.TotalPrice as decimal(18,2)) else 0 end,ShopTJGoods=e.Num,ShopCDGoods=e.Num2,ckfee,a.mdfee,a.adfee,bz=case when a.InPrice>0 then CAST(a.RMBMoney/a.InPrice as decimal(18,2)) else 0 end,a.yf,c.GoodRate,c.ODR,DSRService=0,DSRGoods=null,DSRPost=0,c.USDUseMoney, USDNoMoney=0,c.RMBUseMoney,c.RMBNoMoney,Rate1=null,Rate2=null,Rate4=null, PropertyViolate=0, Rate5=0,Rate6=0,Rate7=isnull(c.Rate7,d.dayfee),JL=cast(b.ml as decimal(18,2))+isnull(ckfee,0)-isnull(c.Rate3,0)-isnull(c.Rate7,d.dayfee),FeeDate=null,TXFee=0 from
//JC_Shop d left join (
//select ShopId,OrderNum=COUNT(0),RMBMoney=SUM(RMBPrice),escrowFee=sum(escrowFee),USDMoney=SUM(TotalPrice),InPrice=SUM(cb),ckfee=SUM(ck),mdfee=SUM(md),adfee=SUM(Ad_Fee),yf=SUM(yf) from #ls
//group by ShopId)a on d.ShopId=a.ShopId
//left join (select ShopId,TotalPrice=sum(TotalPrice),ml=sum(isnull(TotalPrice,0)-isnull(escrowFee,0)-isnull(yj,0)-isnull(yf,0)-((isnull(cb,0)+isnull(hwsf,0))/moneyrate)-isnull(tc,0)-isnull(ck,0)-isnull(md,0)-isnull(Ad_Fee,0)+SubsidyFee) from #ls where yf>0
//group by ShopId)b on a.ShopId=b.ShopId
//left join (
//select GoodRate,ODR,DSRService,DSRGoods,DSRPost,USDUseMoney,USDNoMoney,RMBUseMoney, RMBNoMoney,Rate1,Rate2,Rate3,Rate4,PropertyViolate,Rate5,Rate6,Rate7,FeeDate,TXFee
//TXFee,ShopId from JC_ShopData
//where DATEDIFF(day,indate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 )c on a.ShopId=c.ShopId
//left Join #ls2 e on a.ShopId=e.ShopId "+ tj3 + @"
//) a order by " + Sort;
string sql = @"
declare @moneyrate decimal(18,4)
select @moneyrate=MRate from JC_Money where MCode='USD' and PlatId=2
select a.ShopId,a.TotalPrice,escrowFee=isnull(a.escrowFee,0),a.RMBPrice,c.yj,yf=c.yf,cb=c.cb,hwsf=c.hwsf,c.tc,c.ck,c.md,a.Ad_Fee,a.DR_BackFee,a.DR_PostFee,a.DR_SSFee,a.Other_Fee,moneyrate=isnull(c.moneyrate,@moneyrate),ISnull( c.SubsidyFee,0) SubsidyFee into #ls from DT_OrderInfo a with(nolock)
inner join DT_OrderXXInfo b with(nolock) on a.OrderId=b.OrderId
left join DT_Fees c with(nolock) on a.OrderId=c.orderid
where DATEDIFF(day,a.OrderDate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 " + tj + @" and a.State>0 and a.State<3
select a.*,Num2=isnull(b.Num2,0) into #ls2 from (
select b.ShopId,Num=COUNT(0) from HW_GoodsInfo a with(nolock)
inner join HW_Shop b with(nolock) on a.GoodsId=b.GoodsId
inner join jc_shop c on b.ShopId=c.ShopId " + tj2 + @"
group by b.ShopId)a
left join (
select a.ShopId,Num2=COUNT(distinct c.GoodsId) from DT_OrderInfo a with(nolock)
inner join DT_OrderGoods b with(nolock) on a.OrderId=b.OrderId
inner join HW_GoodsDetail c with(nolock) on b.DetailId=c.DetailId
where a.State>0 and a.State<3 and DATEDIFF(day,a.OrderDate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 group by a.ShopId)b on a.ShopId=b.ShopId
select * from (
select d.ShopName,Master=case when d.Master=d.buyer then d.Master when d.buyer is not null and d.buyer<>'' then d.Master+'-'+d.buyer else d.Master end,a.OrderNum,a.RMBMoney,a.USDMoney,AvgPrice=case when a.OrderNum>0 then cast(a.USDMoney/a.OrderNum as decimal(18,2)) else 0 end,a.InPrice,LR=cast(b.ml as decimal(18,2)),MLL=case when b.TotalPrice>0 then cast(b.ml*100/b.TotalPrice as decimal(18,2)) else 0 end,ShopTJGoods=e.Num,ShopCDGoods=e.Num2,ckfee,a.mdfee,a.adfee,bz=case when a.InPrice>0 then CAST(a.RMBMoney/a.InPrice as decimal(18,2)) else 0 end,a.yf,c.GoodRate,c.ODR,t3.CVR DSRService,t3.user_sessions DSRGoods,f.DSRPost,c.USDUseMoney, n1.originalTotalCurrencyAmount as USDNoMoney,c.RMBUseMoney,c.RMBNoMoney,t2.orderDefectRate Rate1,t2.validTrackingRate Rate2,Case when d.PlatType=2 then f.Rate3 else c.Rate3 end Rate3,t4.RefundRate as Rate4, ABS( ISNULL( t4.RefundAmount,0) ) as PropertyViolate,t2.cancelRate Rate5,Case when d.PlatType=2 then g.Rate6 else (select SUM(ISNULL(Rate3,0)) from JC_ShopData where ShopId=d.ShopId and DATEDIFF(MONTH,InDate,'2023-10-18')=0) end Rate6,Rate7=isnull(c.Rate7,d.dayfee),JL=cast(b.ml as decimal(18,2))+isnull(ckfee,0)-isnull(c.Rate3,0)-isnull(c.Rate7,d.dayfee),t1.financialEventGroupEndLocale as FeeDate,t1.originalTotalCurrencyAmount as TXFee from
JC_Shop d left join (
select ShopId,OrderNum=COUNT(0),RMBMoney=SUM(RMBPrice),escrowFee=sum(escrowFee),USDMoney=SUM(TotalPrice),InPrice=SUM(cb),ckfee=SUM(ck),mdfee=SUM(md),adfee=SUM(Ad_Fee),yf=SUM(yf) from #ls
group by ShopId)a on d.ShopId=a.ShopId
left join (select ShopId,TotalPrice=sum(TotalPrice),ml=sum(isnull(TotalPrice,0)-isnull(escrowFee,0)-isnull(yj,0)-isnull(yf,0)-((isnull(cb,0)+isnull(hwsf,0))/moneyrate)-isnull(tc,0)-isnull(ck,0)-isnull(md,0)-isnull(Ad_Fee,0)+SubsidyFee) from #ls where yf>0
group by ShopId)b on a.ShopId=b.ShopId
left join (
select GoodRate,ODR,DSRService,DSRGoods,DSRPost,USDUseMoney,USDNoMoney,RMBUseMoney, RMBNoMoney,Rate1,Rate2,Rate3,Rate4,PropertyViolate,Rate5,Rate6,Rate7,FeeDate,TXFee
TXFee,ShopId from JC_ShopData
where DATEDIFF(day,indate,'" + InDate.Value.ToString("yyyy-MM-dd") + @"')=0 )c on a.ShopId=c.ShopId
inner Join #ls2 e on a.ShopId=e.ShopId
left join [192.168.1.187].[UpGoods].dbo.LxERP_Amazon_Shop o on d.ShopName=o.name
left join ( select sid, CONVERT(decimal(12,2), SUM(t.cost)) as Rate3,CONVERT(decimal(12,2), SUM(t.sales)) as ad_sales , case when CONVERT(decimal(12,2), SUM(t.sales))<=0 then '∞' else CONVERT(nvarchar(20), convert(decimal(12,2), (CONVERT(decimal(12,2), SUM(t.cost))/CONVERT(decimal(12,2), SUM(t.sales)))*100)) end DSRPost from( select sid, SUM( ISNULL(cost,0)) as cost,SUM(ISNULL(sales,0))sales from [192.168.1.187].[UpGoods].dbo.LxERP_SPAdGroupReports where CONVERT(date,report_date)='" + InDate.Value.AddDays(-2).Date.ToString("yyyy-MM-dd") + "' group by sid union all select sid, SUM( ISNULL(cost,0)) as cost,SUM(ISNULL(sales,0))sales from [192.168.1.187].[UpGoods].dbo.LxERP_SBCampaignReports where CONVERT(date,report_date)='" + InDate.Value.AddDays(-2).Date.ToString("yyyy-MM-dd") + "' group by sid union all select sid, SUM( ISNULL(cost,0)) as cost,SUM(ISNULL(sales,0))sales from [192.168.1.187].[UpGoods].dbo.LxERP_SDAdGroupReports where CONVERT(date,report_date)='" + InDate.Value.AddDays(-2).Date.ToString("yyyy-MM-dd") + "' group by sid) t group by sid ) f on f.sid=o.sid" +
" \r\n left join (select sid, CONVERT(decimal(12,2), SUM(t.cost)) as Rate6 from( select sid, SUM( ISNULL(cost,0)) as cost from [192.168.1.187].[UpGoods].dbo.LxERP_SPAdGroupReports where CONVERT(date,report_date)<='" + InDate.Value.AddDays(-2).ToString("yyyy-MM-dd") + "' and CONVERT(date,report_date)>='" + InDate.Value.AddDays(-31).ToString("yyyy-MM-dd") + "' group by sid union all select sid, SUM( ISNULL(cost,0)) as cost from [192.168.1.187].[UpGoods].dbo.LxERP_SBCampaignReports where CONVERT(date,report_date)<='" + InDate.Value.AddDays(-2).ToString("yyyy-MM-dd") + "' and CONVERT(date,report_date)>='" + InDate.Value.AddDays(-31).ToString("yyyy-MM-dd") + "' group by sid union all select sid, SUM( ISNULL(cost,0)) as cost from [192.168.1.187].[UpGoods].dbo.LxERP_SDAdGroupReports where CONVERT(date,report_date)<='" + InDate.Value.AddDays(-2).ToString("yyyy-MM-dd") + "' and CONVERT(date,report_date)>='" + InDate.Value.AddDays(-31).ToString("yyyy-MM-dd") + "' group by sid) t group by sid) g on o.sid=g.sid " +
" \r\n left join(select t.row, t.storename,t.financialEventGroupEndLocale,t.originCurrencyIcon,CAST(ISNULL( t.originalTotalCurrencyAmount,0) as decimal(12,2)) as originalTotalCurrencyAmount from ( select ROW_NUMBER() over(PARTITION BY storename ORDER BY requestDate DESC) row,storename, financialEventGroupEndLocale,originCurrencyIcon,originalTotalCurrencyAmount from [192.168.1.187].[UpGoods].dbo.LxERP_SettlementSummaryData where accountType='Standard' and processingStatus='Closed ') t where t.row=1) t1 on d.ShopName=t1.storeName left join (select storename,CONVERT(decimal(12,2), SUM(ISNULL(originalTotalCurrencyAmount,0))) originalTotalCurrencyAmount from [192.168.1.187].[UpGoods].dbo.LxERP_SettlementSummaryData where processingStatus='Open' and accountType='Standard' group by storename) n1 on d.ShopName=n1.storeName " +
"\r\n" +
" left join (select sid, CAST( orderDefectRate *100 as decimal(12,2)) orderDefectRate,CAST( validTrackingRate *100 as decimal(12,2)) validTrackingRate,cast(CancelRate *100 as decimal(12,2)) cancelRate from (\r\nselect ROW_NUMBER() over(PARTITION BY sid ORDER BY requestDate DESC) row,sid, orderDefectRate,validTrackingRate,CancelRate from [192.168.1.187].[UpGoods].dbo.Amazon_V2_SELLER_PERFORMANCE_REPORT where CONVERT(date, RequestDate)='" + InDate.Value.AddDays(-1).Date.ToString("yyyy-MM-dd") + "') t where t.row=1)t2 on t2.sid=o.sid \r\nleft join (select sid, user_sessions,totalOrderItems, case when user_sessions=0 or totalOrderItems=0 then 0 else convert(decimal(12,2),(totalOrderItems*1.00/user_sessions)*100 ) end as CVR from [192.168.1.187].[UpGoods].dbo.Amazon_SALES_AND_TRAFFIC_REPORT where CONVERT(date, ReportDate)='" + InDate.Value.AddDays(-2).Date.ToString("yyyy-MM-dd") + "') t3 on t3.sid=o.sid\r\nleft join [192.168.1.187].[UpGoods].dbo.AmazonStoreRefundAmountAndRate t4 on t4.sid=o.sid and Convert(date, t4.ReportDate)='" + InDate.Value.AddDays(-2).Date.ToString("yyyy-MM-dd") + "'\r\n"
+ " where d.PlatType=2 union all\r\n select d.ShopName,Master=case when d.Master=d.buyer then d.Master when d.buyer is not null and d.buyer<>'' then d.Master+'-'+d.buyer else d.Master end,a.OrderNum,a.RMBMoney,a.USDMoney,AvgPrice=case when a.OrderNum>0 then cast(a.USDMoney/a.OrderNum as decimal(18,2)) else 0 end,a.InPrice,LR=cast(b.ml as decimal(18,2)),MLL=case when b.TotalPrice>0 then cast(b.ml*100/b.TotalPrice as decimal(18,2)) else 0 end,ShopTJGoods=e.Num,ShopCDGoods=e.Num2,ckfee,a.mdfee,a.adfee,bz=case when a.InPrice>0 then CAST(a.RMBMoney/a.InPrice as decimal(18,2)) else 0 end,a.yf,c.GoodRate,c.ODR,c.DSRService,c.DSRGoods,case when ISNULL(c.DSRPost,0)=0 then '' else CONVERT(nvarchar(20),c.DSRPost) end DSRPost,c.USDUseMoney,c.USDNoMoney,c.RMBUseMoney,c.RMBNoMoney,c.Rate1,c.Rate2,c.Rate3,c.Rate4,c.PropertyViolate,c.Rate5,c.Rate6,Rate7=isnull(c.Rate7,d.dayfee),JL=cast(b.ml as decimal(18,2))+isnull(ckfee,0)-isnull(c.Rate3,0)-isnull(c.Rate7,d.dayfee),FeeDate=isnull(c.FeeDate,d.FeeDate),TXFee=isnull(c.TXFee,d.TXFee) from \r\nJC_Shop d left join (\r\nselect ShopId,OrderNum=COUNT(0),RMBMoney=SUM(RMBPrice),escrowFee=sum(escrowFee),USDMoney=SUM(TotalPrice),InPrice=SUM(cb),ckfee=SUM(ck),mdfee=SUM(md),adfee=SUM(Ad_Fee),yf=SUM(yf) from #ls\r\ngroup by ShopId)a on d.ShopId=a.ShopId\r\nleft join (select ShopId,TotalPrice=sum(TotalPrice),ml=sum(isnull(TotalPrice,0)-isnull(escrowFee,0)-isnull(yj,0)-isnull(yf,0)-((isnull(cb,0)+isnull(hwsf,0))/moneyrate)-isnull(tc,0)-isnull(ck,0)-isnull(md,0)-isnull(Ad_Fee,0) + SubsidyFee) from #ls where yf>0\r\ngroup by ShopId)b on a.ShopId=b.ShopId\r\nleft join (\r\nselect GoodRate,ODR,DSRService,DSRGoods,DSRPost,USDUseMoney,USDNoMoney,RMBUseMoney, RMBNoMoney,Rate1,Rate2,Rate3,Rate4,PropertyViolate,Rate5,Rate6,Rate7,FeeDate,TXFee\r\nTXFee,ShopId from JC_ShopData\r\nwhere DATEDIFF(day,indate,'" + InDate.Value.ToString("yyyy-MM-dd") + "')=0 )c on a.ShopId=c.ShopId\r\nleft Join #ls2 e on a.ShopId=e.ShopId where d.PlatType!=2 " + (isyc ? " and d.Master!='东南亚专用'" : "") + "\r\n) a order by " + Sort;
DataTable dt = obj.GetReportData(sql);
return GetReport3(dt, 18); return GetReport3(dt, 18);
} }
catch (Exception ex) catch (Exception ex)

@ -1414,7 +1414,7 @@
<Content Include="Huowu\HW_GoodsDetailList4.aspx" /> <Content Include="Huowu\HW_GoodsDetailList4.aspx" />
<Content Include="Huowu\HW_GoodsDetailList5.aspx" /> <Content Include="Huowu\HW_GoodsDetailList5.aspx" />
<Content Include="Huowu\HW_GoodsDetailList_EN.aspx" /> <Content Include="Huowu\HW_GoodsDetailList_EN.aspx" />
<Content Include="Huowu\HW_GoodsFee.aspx" /> <Content Include="Huowu\HW_TemuGoodsFee.aspx" />
<Content Include="Huowu\HW_GoodsInfoForTM2_EN.aspx" /> <Content Include="Huowu\HW_GoodsInfoForTM2_EN.aspx" />
<Content Include="Huowu\HW_GoodsInfoForTM4.aspx" /> <Content Include="Huowu\HW_GoodsInfoForTM4.aspx" />
<Content Include="Huowu\HW_GoodsNumCount.aspx" /> <Content Include="Huowu\HW_GoodsNumCount.aspx" />
@ -2782,12 +2782,12 @@
<Compile Include="Huowu\HW_GoodsDetailList_EN.aspx.designer.cs"> <Compile Include="Huowu\HW_GoodsDetailList_EN.aspx.designer.cs">
<DependentUpon>HW_GoodsDetailList_EN.aspx</DependentUpon> <DependentUpon>HW_GoodsDetailList_EN.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Huowu\HW_GoodsFee.aspx.cs"> <Compile Include="Huowu\HW_TemuGoodsFee.aspx.cs">
<DependentUpon>HW_GoodsFee.aspx</DependentUpon> <DependentUpon>HW_TemuGoodsFee.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="Huowu\HW_GoodsFee.aspx.designer.cs"> <Compile Include="Huowu\HW_TemuGoodsFee.aspx.designer.cs">
<DependentUpon>HW_GoodsFee.aspx</DependentUpon> <DependentUpon>HW_TemuGoodsFee.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Huowu\HW_GoodsInfoForTM2_EN.aspx.cs"> <Compile Include="Huowu\HW_GoodsInfoForTM2_EN.aspx.cs">
<DependentUpon>HW_GoodsInfoForTM2_EN.aspx</DependentUpon> <DependentUpon>HW_GoodsInfoForTM2_EN.aspx</DependentUpon>

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save