cmj 2 weeks ago
commit fbc53c0787

File diff suppressed because one or more lines are too long

@ -45,6 +45,7 @@
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
CreateDataGrid();
CreateDataGrid2();
ReadData();
});
@ -74,7 +75,7 @@
col = new nblf.ui.DataGridColumn();
col.HeaderText = "毛利";
col.CellTemplate = "<span>{Bind GrossProfit}</span>";
col.CellTemplate = "<a class='linka' onClick='showShopGrossProfitDialog({Bind GoodsId})'>{Bind GrossProfit}</a>";
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 = "<span>{Bind ShopName}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "毛利";
col.CellTemplate = "<span>{Bind GrossProfit}</span>";
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
</script>
</head>
@ -213,6 +270,11 @@
<td width="15%">
<input id="txt_GoodsCode" class="editTextbox" style="width: 150px;" type="text" />
</td>
<td class="f1" style="width: 10%;">运营人员:</td>
<td width="15%">
<input id="txt_Name" class="editTextbox" style="width: 150px;" type="text" />
</td>
<td class="f1" style="width: 10%;"><input id="txt_IsNegative" class="editTextbox" type="checkbox" />负毛利产品</td>
<td>
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" onclick="ReadData();" />&nbsp&nbsp
<input id="btn_dc3" onclick="ExportData();" class="btnClass btnClassExcelTemplate" type="button" value="导出" />
@ -224,6 +286,11 @@
</td>
</tr>
</table>
<!-- 各店铺毛利 -->
<div id="mlDialog" title="各店铺毛利" style="display:none;width: 700px; height: 500px;">
<div id="DataGrid2" class="DataGridStyle"></div>
</div>
</body>
</html>

@ -11289,6 +11289,17 @@ namespace TradeManageNew
}
public class TemuSKUShopGrossProfit
{
public string ShopName { get; set; }
public decimal? GrossProfit { get; set; }
}
public class TemuShopGoodActive
{

@ -2039,7 +2039,7 @@ namespace TradeManageNew.OuterService
var input = JsonConvert.DeserializeObject<GetDataList>(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; }
}

@ -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<TemuSKUData_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<TemuSKUShopGrossProfit> GetTemuShopGrossProfit(int GoodsId)
{
// 这里确保您的登录逻辑正确
//PagesNew.Login(this.Session);
var slist = new List<TemuSKUShopGrossProfit>();
try
{
Pages.Login(this.Session);
#region 信息查询
slist = DataNew.GetTemuShopGrossProfit(GoodsId);
#endregion
}
catch (Exception ex)
{
}
return slist;
}
#endregion
}
}

Loading…
Cancel
Save