diff --git a/TradeManageNew/DataNew.cs b/TradeManageNew/DataNew.cs index 4276025..0056991 100644 --- a/TradeManageNew/DataNew.cs +++ b/TradeManageNew/DataNew.cs @@ -7138,7 +7138,7 @@ end #region 智能库存temu筛选 - public static List GetTemuSKUData(int PageSize, int PageIndex, string GoodsCode, out int rowCount) + public static List GetTemuSKUData(int PageSize, int PageIndex, string GoodsCode, string Name, bool? IsNegative, out int rowCount) { List model = null; string sqlPage = string.Empty; @@ -7158,7 +7158,15 @@ end } if (!string.IsNullOrEmpty(GoodsCode)) { - where = " and GoodsCode='" + GoodsCode + "' "; + where += " and GoodsCode='" + GoodsCode + "' "; + } + if (!string.IsNullOrEmpty(Name)) + { + where += " and Name like '%" + Name + "%' "; + } + if (IsNegative!=null && IsNegative==true) + { + where += " and GrossProfit <= 0 "; } //string tsql = @"select count(1) count 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" string tsql = @"select count(1) count from ( select ROW_NUMBER() OVER(order by t30.SaleNum desc) row,a.GoodsId, b.GoodsCode,c.Name,a.YuGuJiaGe as temuChengben,b.JYPrice ,Gr.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,isnull(tall.SaleNum,0) GoodsHJNum,sumall.LeftNumW,sumall.LeftNumE,'' as PositionAge,sumall.LeftNumAll 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 and a.PlatId=23 ) 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 and a.PlatId=23 ) 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 and a.PlatId=23 ) 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 and a.PlatId=23 ) 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 and a.PlatId=23 ) 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 and a.PlatId=23 ) t group by t.GoodsId ) t30 on a.GoodsId=t30.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 a.PlatId=23 ) t group by t.GoodsId ) tall on a.GoodsId=tall.GoodsId left join (select a.GoodsId,sum(GoodsHJNum) as GoodsHJNum,LeftNumW= sum(isnull(a.WestNum,0)), LeftNumE=sum(isnull(a.EastNum,0) ),LeftNumAll= sum(isnull(a.WestNum,0))+sum(isnull(a.EastNum,0) ) from HW_GoodsDetail a inner join [TemuChengBen] b on a.goodsid=b.GoodsId group by a.GoodsId) sumall on a.GoodsId=sumall.GoodsId left join (select GoodsId,sum(GrossProfit) as GrossProfit from ( select a.orderid,isnull(e.GoodsId,0) GoodsId , CONVERT(DECIMAL(10, 2),a.TotalPrice-isnull(b.yj,0)-isnull(a.escrowFee,0)-(isnull(b.cb,0)+isnull(b.hwsf,0))/isnull(b.moneyrate,1)-isnull(b.yf,0)-isnull(b.tc,0)-isnull(a.DR_PostFee,0)-isnull(a.Other_Fee,0)+isnull(a.DR_SSFee,0)-ISNULL(b.md,0)+Isnull( b.SubsidyFee,0)-isnull(a.Ad_Fee,0)) GrossProfit from DT_OrderInfo a with(nolock) inner join DT_OrderXXInfo c on a.OrderId=c.OrderId inner join DT_OrderGoods g on a.OrderId=g.OrderId inner join HW_GoodsDetail e on g.DetailId=e.DetailId left Join DT_Fees b with(nolock) on a.OrderId=b.orderid where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and a.PlatId=23)t group by GoodsId) Gr on a.GoodsId=Gr.GoodsId ) t where 1=1 " + where + @@ -7237,8 +7245,8 @@ inner join DT_OrderGoods g on a.OrderId=g.OrderId inner join HW_GoodsDetail e on g.DetailId=e.DetailId left Join DT_Fees b with(nolock) on a.OrderId=b.orderid where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and a.PlatId=23)t group by GoodsId) Gr on a.GoodsId=Gr.GoodsId -) t -where 1=1 " + sqlPage + where + " order by GoodsHJNum desc "; + where 1=1 "+ where + @") t +where 1=1 " + sqlPage + " order by GoodsHJNum desc "; Database db = DatabaseFactory.CreateDatabase(); DbCommand cmd = db.GetSqlStringCommand(tsql); @@ -7255,6 +7263,46 @@ where 1=1 " + sqlPage + where + " order by GoodsHJNum desc "; #endregion + #region 智能库存temu筛选 根据sku显示各个店铺毛利 + public static List GetTemuShopGrossProfit(int GoodsId) + { + List model = null; + + string where = string.Empty; + + + if (GoodsId>0) + { + where = " and e.GoodsId=" + GoodsId + " "; + } + //string tsql = @"select count(1) count 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" + string tsql = @"select ShopName,sum(GrossProfit) as GrossProfit from ( +select a.orderid,OrderCode,sh.ShopName,isnull(e.GoodsId,0) GoodsId , CONVERT(DECIMAL(10, 2),a.TotalPrice-isnull(b.yj,0)-isnull(a.escrowFee,0)-(isnull(b.cb,0)+isnull(b.hwsf,0))/isnull(b.moneyrate,1)-isnull(b.yf,0)-isnull(b.tc,0)-isnull(a.DR_PostFee,0)-isnull(a.Other_Fee,0)+isnull(a.DR_SSFee,0)-ISNULL(b.md,0)+Isnull( b.SubsidyFee,0)-isnull(a.Ad_Fee,0)) GrossProfit +from DT_OrderInfo a with(nolock) +inner join DT_OrderXXInfo c on a.OrderId=c.OrderId +inner join DT_OrderGoods g on a.OrderId=g.OrderId +inner join HW_GoodsDetail e on g.DetailId=e.DetailId +left Join DT_Fees b with(nolock) on a.OrderId=b.orderid +left join JC_Shop sh on a.ShopId=sh.ShopId +where a.State>0 and c.StoreId in (6,9,11) and a.State<3 and a.PlatId=23 " + where +@" +) t +group by ShopName "; + Database db = DatabaseFactory.CreateDatabase(); + DbCommand cmd = db.GetSqlStringCommand(tsql); + + DataSet tb = db.ExecuteDataSet(cmd); + //rowCount = (int)tb.Tables[0].Rows[0]["count"]; + if (tb != null) + { + if (tb.Tables.Count > 0 && tb.Tables[0].Rows.Count > 0) model = tb.Tables[0].ToList(); + } + + + return model; + } + #endregion + + diff --git a/TradeManageNew/Huowu/HW_GoodsDetailList2TemuSku.aspx b/TradeManageNew/Huowu/HW_GoodsDetailList2TemuSku.aspx index 645176e..8e1ec4b 100644 --- a/TradeManageNew/Huowu/HW_GoodsDetailList2TemuSku.aspx +++ b/TradeManageNew/Huowu/HW_GoodsDetailList2TemuSku.aspx @@ -45,6 +45,7 @@ WindowLoadModel.Load(); ajaxInit(WindowLoadModel); CreateDataGrid(); + CreateDataGrid2(); ReadData(); }); @@ -74,7 +75,7 @@ col = new nblf.ui.DataGridColumn(); col.HeaderText = "毛利"; - col.CellTemplate = "{Bind GrossProfit}"; + col.CellTemplate = "{Bind GrossProfit}"; Array.add(datagrid1.Columns, col); col = new nblf.ui.DataGridColumn(); @@ -153,6 +154,32 @@ } var PState = 0; //#endregion + + //#region 初始化DataGrid2 + function CreateDataGrid2() { + + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "店铺"; + col.CellTemplate = "{Bind ShopName}"; + Array.add(datagrid2.Columns, col); + + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "毛利"; + col.CellTemplate = "{Bind GrossProfit}"; + Array.add(datagrid2.Columns, col); + + datagrid2.SortExpression = "Id "; + datagrid2.ViewSortDirection = "desc"; + datagrid2.IsFixHeader = false; + datagrid2.ShowIndexColumn = false; + datagrid2.AllowPaging = false; + datagrid2.AllowPaging2 = false; + datagrid2.ShowIndexColumn = true; + datagrid2.Width = "100%"; + datagrid2.SelectMode = nblf.ui.SelectMode.None; + datagrid2.Init(); + } + //#endregion // 读取数据 //#region 读取数据 @@ -161,6 +188,8 @@ PageSize: datagrid1.Get_PageSize(), PageIndex: datagrid1.Get_PageIndex(), GoodsCode: $('#txt_GoodsCode').val() || null, + Name: $('#txt_Name').val() || null, + IsNegative: $('#txt_IsNegative').is(':checked'), } WindowLoadModel.Show(); $.ajax({ @@ -176,10 +205,12 @@ } //#endregion - //#region 读取数据 + //#region 导出数据 function ExportData() { var param = { GoodsCode: $('#txt_GoodsCode').val() || null, + Name: $('#txt_Name').val() || null, + IsNegative: $('#txt_IsNegative').is(':checked'), } WindowLoadModel.Show(); $.ajax({ @@ -199,6 +230,32 @@ }); } //#endregion + + //#region 显示各店铺毛利 + function showShopGrossProfitDialog(GoodsId) { + var param = { GoodsId } + WindowLoadModel.Show(); + $.ajax({ + url: "../SysManageServiceNew.asmx/GetTemuShopGrossProfit", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + success: function (res) { + WindowLoadModel.Hide(); + data = res.d + datagrid2.Set_RowCount(data.length); + datagrid2.DataBind(data); + $.fancybox({ + 'width': '40%', + 'height': '', + 'autoScale': false, + 'transitionIn': 'elastic', + 'transitionOut': 'elastic', + 'href': '#mlDialog', + 'onComplete': function () { } + }); + } + }); + } + //#endregion @@ -213,6 +270,11 @@ + 运营人员: + + + + 负毛利产品    @@ -224,6 +286,11 @@ + + + diff --git a/TradeManageNew/ModelNew.cs b/TradeManageNew/ModelNew.cs index 33e00eb..9c37259 100644 --- a/TradeManageNew/ModelNew.cs +++ b/TradeManageNew/ModelNew.cs @@ -11289,6 +11289,17 @@ namespace TradeManageNew } + public class TemuSKUShopGrossProfit + { + + public string ShopName { get; set; } + + public decimal? GrossProfit { get; set; } + + } + + + public class TemuShopGoodActive { diff --git a/TradeManageNew/OuterService/ShageService.ashx.cs b/TradeManageNew/OuterService/ShageService.ashx.cs index 7d58252..2021f38 100644 --- a/TradeManageNew/OuterService/ShageService.ashx.cs +++ b/TradeManageNew/OuterService/ShageService.ashx.cs @@ -2039,7 +2039,7 @@ namespace TradeManageNew.OuterService var input = JsonConvert.DeserializeObject(ResponseContent); - var ordermodel = DataNew.GetTemuSKUData(input.PageSize,input.PageIndex,input.GoodsCode, out int rowCount); + var ordermodel = DataNew.GetTemuSKUData(input.PageSize,input.PageIndex,input.GoodsCode, input.Name,input.IsNegative, out int rowCount); if (ordermodel != null) { @@ -2133,6 +2133,8 @@ namespace TradeManageNew.OuterService public class GetDataList { public string GoodsCode { get; set; } + public string Name { get; set; } + public bool? IsNegative { get; set; } public int PageSize { get; set; } public int PageIndex { get; set; } } diff --git a/TradeManageNew/SysManageServiceNew.asmx.cs b/TradeManageNew/SysManageServiceNew.asmx.cs index 38f0c9f..730a522 100644 --- a/TradeManageNew/SysManageServiceNew.asmx.cs +++ b/TradeManageNew/SysManageServiceNew.asmx.cs @@ -18032,7 +18032,7 @@ where a.storeid in (6,9,11) and a.OrderGoodsId=0 and a.KCNum>0 " + tj + " gr #region 智能库存temu sku数据导出 [WebMethod(EnableSession = true)] - public string GetExcelTemuSKUData( string GoodsCode) + public string GetExcelTemuSKUData( string GoodsCode, string Name, bool? IsNegative) { // 这里确保您的登录逻辑正确 //PagesNew.Login(this.Session); @@ -18042,7 +18042,7 @@ where a.storeid in (6,9,11) and a.OrderGoodsId=0 and a.KCNum>0 " + tj + " gr //Pages.Login(this.Session); #region 信息查询 var slist = new List(); - slist = DataNew.GetTemuSKUData(999999, 1, GoodsCode, out int rowCount); + slist = DataNew.GetTemuSKUData(999999, 1, GoodsCode, Name, IsNegative, out int rowCount); #endregion TableColumnCollection listColumns = new TableColumnCollection(); // 添加列信息 @@ -18076,5 +18076,32 @@ where a.storeid in (6,9,11) and a.OrderGoodsId=0 and a.KCNum>0 " + tj + " gr return failMsg; } #endregion + + #region 智能库存temu筛选 根据sku显示各个店铺毛利 + [WebMethod(EnableSession = true)] + public List GetTemuShopGrossProfit(int GoodsId) + { + // 这里确保您的登录逻辑正确 + //PagesNew.Login(this.Session); + var slist = new List(); + try + { + Pages.Login(this.Session); + #region 信息查询 + + slist = DataNew.GetTemuShopGrossProfit(GoodsId); + #endregion + + + } + catch (Exception ex) + { + + } + return slist; + } + #endregion + + } }