fxc 3 weeks ago
commit fde259085c

Binary file not shown.

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 16
VisualStudioVersion = 17.11.35327.3 VisualStudioVersion = 16.0.32106.194
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TradeManageNew", "TradeManageNew\TradeManageNew.csproj", "{6D7B8380-17AA-410D-A119-E7A04C2822E3}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TradeManageNew", "TradeManageNew\TradeManageNew.csproj", "{6D7B8380-17AA-410D-A119-E7A04C2822E3}"
EndProject EndProject
@ -23,8 +23,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiNew", "ApiNew\ApiNew.csp
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetLibrary", "NetLibrary\NetLibrary.csproj", "{67D6D180-0BE1-46EA-9CFB-FF738E8BC158}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetLibrary", "NetLibrary\NetLibrary.csproj", "{67D6D180-0BE1-46EA-9CFB-FF738E8BC158}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ERPOMS", "ERPOMS\ERPOMS.csproj", "{A0751078-7160-4648-82A4-30E3ADEBAF2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TradeUsedSale", "TradeUsedSale\TradeUsedSale.csproj", "{F712279E-1070-4865-855C-9EFD7A8345F4}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TradeUsedSale", "TradeUsedSale\TradeUsedSale.csproj", "{F712279E-1070-4865-855C-9EFD7A8345F4}"
EndProject EndProject
Global Global
@ -61,10 +59,6 @@ Global
{67D6D180-0BE1-46EA-9CFB-FF738E8BC158}.Debug|Any CPU.Build.0 = Debug|Any CPU {67D6D180-0BE1-46EA-9CFB-FF738E8BC158}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67D6D180-0BE1-46EA-9CFB-FF738E8BC158}.Release|Any CPU.ActiveCfg = Release|Any CPU {67D6D180-0BE1-46EA-9CFB-FF738E8BC158}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67D6D180-0BE1-46EA-9CFB-FF738E8BC158}.Release|Any CPU.Build.0 = Release|Any CPU {67D6D180-0BE1-46EA-9CFB-FF738E8BC158}.Release|Any CPU.Build.0 = Release|Any CPU
{A0751078-7160-4648-82A4-30E3ADEBAF2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0751078-7160-4648-82A4-30E3ADEBAF2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0751078-7160-4648-82A4-30E3ADEBAF2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0751078-7160-4648-82A4-30E3ADEBAF2B}.Release|Any CPU.Build.0 = Release|Any CPU
{F712279E-1070-4865-855C-9EFD7A8345F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F712279E-1070-4865-855C-9EFD7A8345F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F712279E-1070-4865-855C-9EFD7A8345F4}.Debug|Any CPU.Build.0 = Debug|Any CPU {F712279E-1070-4865-855C-9EFD7A8345F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F712279E-1070-4865-855C-9EFD7A8345F4}.Release|Any CPU.ActiveCfg = Release|Any CPU {F712279E-1070-4865-855C-9EFD7A8345F4}.Release|Any CPU.ActiveCfg = Release|Any CPU

@ -30457,6 +30457,123 @@ namespace TradeManageNew
} }
return ""; return "";
} }
#endregion
#region TemuShopGoodActive页
#region 保存
[WebMethod(EnableSession = true)]
public int Save_TemuShopGoodActive(TemuShopGoodActive Model)
{
Pages.Login(this.Session);
return DataNew.Save_TemuShopGoodActive(Model);
}
#endregion
#region 删除
[WebMethod(EnableSession = true)]
public bool Delete_TemuShopGoodActive(int ID)
{
PagesNew.Login(this.Session);
DataNew.Delete_TemuShopGoodActive(ID);
return true;
}
#endregion
#region 结束活动
[WebMethod(EnableSession = true)]
public bool Update_TemuShopGoodActive(int ID)
{
PagesNew.Login(this.Session);
DataNew.Update_TemuShopGoodActive(ID);
return true;
}
#endregion
#region 返回Model
[WebMethod(EnableSession = true)]
public TemuShopGoodActive GetModel_TemuShopGoodActive(int ID)
{
Pages.Login(this.Session);
var Model = DataNew.GetModel_TemuShopGoodActive(ID);
return Model;
}
#endregion
#region 分页查询
[WebMethod(EnableSession = true)]
public JsonModel<List<TemuShopGoodActive>> GetListTemuShopGoodActive(DateTime? StartDate, DateTime? StopDate, int State, int PageIndex, int PageSize)
{
PagesNew.Login(this.Session);
RefParameterCollection where = new RefParameterCollection();
if (StartDate != null) where.Add(new RefParameter("InDate", ">=", StartDate, System.Data.DbType.DateTime));
if (StopDate != null) where.Add(new RefParameter("convert(varchar(10), InDate, 120)", "<=", StopDate, System.Data.DbType.DateTime));
if (State > -1) where.Add(new RefParameter("a.State", "=", State, DbType.Int32));
JsonModel<List<TemuShopGoodActive>> resultModel = new JsonModel<List<TemuShopGoodActive>>();
int RowCount = 0;
resultModel.DataSource = DataNew.GetListTemuShopGoodActive(where, PageIndex, PageSize, "", out RowCount);
resultModel.RowCount = RowCount;
return resultModel;
}
#endregion
#region 普通查询列表
[WebMethod(EnableSession = true)]
public List<TemuShopGoodActive> GetListTemuShopGoodActive3()
{
PagesNew.Login(this.Session);
var ListModel = DataNew.GetListTemuShopGoodActive();
return ListModel;
}
#endregion
#region 分页查询
[WebMethod(EnableSession = true)]
public JsonModel<List<TemuShopGoodActive>> GetListTemuShopGoodActive(string cs, int PageIndex, int PageSize)
{
PagesNew.Login(this.Session);
string where = CustomIO.Base64StringToString(cs);
if (where != "") where = "where " + where.Substring(4);
var resultModel = new JsonModel<List<TemuShopGoodActive>>();
int RowCount = 0;
resultModel.DataSource = DataNew.GetListTemuShopGoodActive(where, PageIndex, PageSize, "", out RowCount);
resultModel.RowCount = RowCount;
string ids = "";
if (resultModel.DataSource != null)
{
foreach (var omd in resultModel.DataSource)
{
ids += omd.ID + ",";
}
ids = ids.TrimEnd(',');
if (ids != "")
{
var dlist = DataNew.GetListTemuShopGoodActiveDetail(ids);
if (dlist != null)
{
foreach (var omd in resultModel.DataSource)
{
string ActiveInfo = "";
var dmd = dlist.FindAll(n => n.ActiveId == omd.ID);
if (dmd != null)
{
foreach (var ddmd in dmd)
{
ActiveInfo +="折扣:"+ddmd.OffNum.Value.ToString() + " 售价:"+ ddmd.SalePrice.Value.ToString() + " 活动库存:"+ ddmd.ActiveNum.Value.ToString() + " 已出订单:"+ ddmd.OutNum.Value.ToString() + "<br/>";
}
}
}
}
}
}
return resultModel;
}
#endregion
#endregion #endregion
} }

@ -30845,5 +30845,200 @@ end
} }
#endregion #endregion
#region 保存
public static int Save_TemuShopGoodActive(TemuShopGoodActive Model)
{
string tsql = @"
if @ID>0
begin
Update [TemuShopGoodActive] set [Shopid]=@Shopid,[SKU]=@SKU,[SPUID]=@SPUID,[BasePrice]=@BasePrice,[CreateUserId]=@CreateUserId,[CreateTime]=@CreateTime,[PostPrice]=@PostPrice,[State]=@State where ID=@ID
delete from TemuShopGoodActiveDetail where ActiveId=@ID
end
else
begin
INSERT INTO [TemuShopGoodActive]([Shopid],[SKU],[SPUID],[BasePrice],[CreateUserId],[CreateTime],[PostPrice],[State])values(@Shopid,@SKU,@SPUID,@BasePrice,@CreateUserId,@CreateTime,@PostPrice,@State)
set @ID=SCOPE_IDENTITY()
end
select @ID";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, "@ID", DbType.Int32, Model.ID);
db.AddInParameter(cmd, "@Shopid", DbType.Int32, Model.Shopid);
db.AddInParameter(cmd, "@SKU", DbType.String, Model.SKU);
db.AddInParameter(cmd, "@SPUID", DbType.String, Model.SPUID);
db.AddInParameter(cmd, "@BasePrice", DbType.Decimal, Model.BasePrice);
db.AddInParameter(cmd, "@CreateUserId", DbType.Int32, Model.CreateUserId);
db.AddInParameter(cmd, "@CreateTime", DbType.DateTime, Model.CreateTime);
db.AddInParameter(cmd, "@PostPrice", DbType.Decimal, Model.PostPrice);
db.AddInParameter(cmd, "@State", DbType.Int32, Model.State);
int a = Convert.ToInt32(db.ExecuteScalar(cmd));
tsql = @"INSERT INTO [TemuShopGoodActiveDetail]([ActiveId],[OffNum],[SalePrice],[ActiveNum],[OutNum])values(@ActiveId,@OffNum,@SalePrice,@ActiveNum,@OutNum)";
cmd = db.GetSqlStringCommand(tsql);
foreach (var item in Model.ListModel)
{
cmd.Parameters.Clear();
item.OutNum = 0;
db.AddInParameter(cmd, "@ActiveId", DbType.Int32, a);
db.AddInParameter(cmd, "@OffNum", DbType.Decimal, item.OffNum);
db.AddInParameter(cmd, "@SalePrice", DbType.Decimal, item.SalePrice);
db.AddInParameter(cmd, "@ActiveNum", DbType.Int32, item.ActiveNum);
db.AddInParameter(cmd, "@OutNum", DbType.Int32, item.OutNum);
db.ExecuteNonQuery(cmd);
}
return a;
}
#endregion
#region 删除
public static void Delete_TemuShopGoodActive(int ID)
{
string tsql = @"
delete from TemuShopGoodActive where ID=@ID
delete from TemuShopGoodActiveDetail where ActiveId=@ID";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, "@ID", DbType.Int32, ID);
db.ExecuteNonQuery(cmd);
}
#endregion
#region 删除
public static void Update_TemuShopGoodActive(int ID)
{
string tsql = @"
update TemuShopGoodActive set state=0 where ID=@ID";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, "@ID", DbType.Int32, ID);
db.ExecuteNonQuery(cmd);
}
#endregion
#region 删除明细
public static void DeleteDetail_TemuShopGoodActive(int Id)
{
string tsql = @"
delete from TemuShopGoodActiveDetail where Id=@Id";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, "@Id", DbType.Int32, Id);
db.ExecuteNonQuery(cmd);
}
#endregion
#region 返回Model
public static TemuShopGoodActive GetModel_TemuShopGoodActive(int ID)
{
TemuShopGoodActive model = null;
//string tsql = "select a.ID,a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State from TemuShopGoodActive";
string tsql = @"
select * from TemuShopGoodActive where ID=@ID
select * from TemuShopGoodActiveDetail where ActiveId=@ID";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, "@ID", DbType.Int32, ID);
DataSet ds = db.ExecuteDataSet(cmd);
if (ds.Tables[0].Rows.Count > 0)
{
model = ds.Tables[0].Rows[0].ToModel<TemuShopGoodActive>();
model.ListModel = ds.Tables[1].ToList<TemuShopGoodActiveDetail>();
}
return model;
}
#endregion
#region 分页查询
public static List<TemuShopGoodActive> GetListTemuShopGoodActive(RefParameterCollection where, int PageIndex, int PageSize, string Sort, out int RowCount)
{
if (where == null) where = new RefParameterCollection();
QueryService ser = new QueryService();
ser.Fields = @"ID=cast(a.ID as int),a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State";
ser.Tables = @"TemuShopGoodActive a";
ser.Filter = where.GetWhere(System.Data.CommandType.Text);
ser.PageIndex = PageIndex;
ser.PageSize = PageSize;
ser.Sort = Sort;
ser.KeyName = "ID";
string tsql = ser.GetText();
where.AddOutParameter("RowCount", System.Data.DbType.Int32); ;
List<TemuShopGoodActive> ListModel = null;
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, where);
DataTable tb = db.ExecuteDataTable(cmd);
RowCount = Convert.ToInt32(cmd.Parameters["@RowCount"].Value);
ListModel = tb.ToList<TemuShopGoodActive>();
return ListModel;
}
#endregion
#region 多条件普通查询
public static List<TemuShopGoodActive> GetListTemuShopGoodActive(RefParameterCollection where, string Sort)
{
if (where == null) where = new RefParameterCollection();
QueryOrdService ser = new QueryOrdService();
//ser.Fields = "a.ID,a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State";
ser.Fields = "a.*";
ser.Tables = @"TemuShopGoodActive a";
ser.Filter = where.GetWhere(System.Data.CommandType.Text);
ser.KeyName = "ID";
ser.Sort = Sort;
string tsql = ser.GetText();
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, where);
DataTable tb = db.ExecuteDataTable(cmd);
List<TemuShopGoodActive> ListModel = tb.ToList<TemuShopGoodActive>();
return ListModel;
}
#endregion
#region 返回列表
public static List<TemuShopGoodActive> GetListTemuShopGoodActive()
{
//string tsql = "select a.ID,a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State from TemuShopGoodActive";
string tsql = "select * from TemuShopGoodActive";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
DataTable tb = db.ExecuteDataTable(cmd);
List<TemuShopGoodActive> ListModel = tb.ToList<TemuShopGoodActive>();
return ListModel;
}
#endregion
#region 返回列表
public static List<TemuShopGoodActiveDetail> GetListTemuShopGoodActiveDetail(string ids)
{
//string tsql = "select a.ID,a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State from TemuShopGoodActive";
string tsql = "select * from TemuShopGoodActiveDetail where ActiveId in (" + ids+")";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
DataTable tb = db.ExecuteDataTable(cmd);
List<TemuShopGoodActiveDetail> ListModel = tb.ToList<TemuShopGoodActiveDetail>();
return ListModel;
}
#endregion
#region 分页动态条件查询
public static List<TemuShopGoodActive> GetListTemuShopGoodActive(string where, int PageIndex, int PageSize, string Sort, out int RowCount)
{
QueryService2 ser = new QueryService2();
ser.Tsql = @"select ID=cast(a.ID as int),a.Shopid,a.SKU,a.SPUID,a.BasePrice,a.CreateUserId,a.CreateTime,a.PostPrice,a.State,b.ShopName from TemuShopGoodActive a
left Join JC_Shop b on a.Shopid = b.Shopid";
ser.Tsql += " " + ser.Filter(where);
ser.PageIndex = PageIndex;
ser.PageSize = PageSize;
if (string.IsNullOrEmpty(Sort) == true) { ser.Sort = "a.ID desc"; }
else { ser.Sort = Sort; }
string tsql = ser.GetText();
List<TemuShopGoodActive> ListModel = null;
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddOutParameter(cmd, "@RowCount", DbType.Int32, 4);
DataTable tb = db.ExecuteDataTable(cmd);
RowCount = Convert.ToInt32(cmd.Parameters["@RowCount"].Value);
ListModel = tb.ToList<TemuShopGoodActive>();
return ListModel;
}
#endregion
} }
} }

@ -0,0 +1,16 @@
<%@ 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>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TradeManageNew.Huowu
{
public partial class HW_GoodsFee : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <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,458 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TemuShopGoodPriceNew.aspx.cs" Inherits="TradeManageNew.Huowu.TemuShopGoodPriceNew" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Temu店铺商品活动</title>
<link rel="stylesheet" type="text/css" href="../css2/icon.css">
<link rel="stylesheet" type="text/css" href="../css2/DataGrid.css" />
<script src="../Scripts2/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../Scripts2/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts2/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../Scripts2/DataGrid.js?t=1" type="text/javascript"></script>
<script src="../Scripts2/DataPager.js?t=1" type="text/javascript"></script>
<script src="../Scripts2/Global.js?t=1" type="text/javascript"></script>
<script src="../Scripts2/WindowLoad.js?t=1" type="text/javascript"></script>
<link href="../css2/gray/easyui.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" />
<link href="../css2/New.css" rel="stylesheet" type="text/css" />
<link href="../Scripts2/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" />
<script src="../Scripts2/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
<script src="../Scripts2/MaskedTextBox.js?t=1" type="text/javascript"></script>
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../Scripts2/jquery.url.js" type="text/javascript"></script>
<script type="text/javascript">
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
var WindowLoadModel = new WindowLoad();
var Model = null;
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
//var CurrentDate = new Date();
//$("#txt_StartDate").val(CurrentDate.localeFormat("yyyy-MM-01"));
//$("#txt_StopDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
TableAveColWidth("MainTable");
CreateDataGrid();
CreateDataGrid2();
GetTemuShops();
ReadData();
$("#cmdAdd").click(function () {
Model = new Object();
Model.ID = 0;
Model.ListModel = new Array();
ClearControlValue("MainTable"); //清空内容
datagrid2.DataBind(Model.ListModel);
//var CurrentDate = new Date();
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
// $("#SelectHtml").hide();
ShowFancybox("MainTable");
});
$("#cmdGet").click(function () {
ReadData();
});
$("#cmdSave").click(function () {
Save();
});
$("#cmdBack").click(function () {
$("#SelectHtml").show();
$("#MainTable").hide();
});
$("#cmdAdd2").click(function () {
if ($("#txtBasePrice").val() == "") {
alert("请先填写基础价格");
return;
}
datagrid2.Add_NewRow();
});
$("input[ColName='OffNum']").live("keyup", function () {
hesl();
});
$("#DataGrid1 [CommandName]").live("click", function () {
var CommandName = $(this).attr("CommandName");
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid1.Get_Model(index);
if (CommandName == "cmdEdit") {
//有审核时用
//if (Model.State == 1 || Model.State == 2) { $("#cmdSave").hide(); }
//else { $("#cmdSave").show(); }
//if (Model.State == 2) { $("#tr1").show(); }
//else { $("#tr1").hide(); }
GetModel(Model.ID);
datagrid2.DataBind(Model.ListModel);
//var CurrentDate = new Date();
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
// $("#SelectHtml").hide();
ShowFancybox("MainTable");
}
if (CommandName == "cmdDel") {
Delete(Model.ID);
//datagrid1.Del_Row(index);
}
});
$("#DataGrid2 [CommandName]").live("click", function () {
var CommandName = $(this).attr("CommandName");
var index = $(this).parentsUntil("tr").parent().attr("index");
if (CommandName == "cmdDel") {
datagrid2.Del_Row(index);
}
});
});
//获取temu平台的所有店铺
function GetTemuShops() {
$("#select_shops2").append("<option value='0'>全部</option>");
$("#select_shops").append("<option value='-1'>选择</option>");
var param = new Object();
param.platid = 23;
WindowLoadModel.Show();
$.ajax({
url: "../DD_OrderServiceNew.asmx/GetAllShopsListByPlat",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
sync: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_shops").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
$("#select_shops2").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
})
}
}
});
}
function hesl() {
var jc = parseFloat($("#txtBasePrice").val());
$("input[ColName='OffNum']").each(function () {
var obj2 = $(this).parent().parent().find("input[ColName='SalePrice']");
if ($(this).val() != "" && jc>0) {
$(obj2).val(parseFloat($(this).val()* jc*0.1));
}
});
}
//#region 初始化DataGrid
function CreateDataGrid() {
col = new nblf.ui.DataGridColumn();
col.HeaderText = "店铺";
col.CellTemplate = "<span>{Bind ShopName}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "SKU";
col.CellTemplate = "<span>{Bind SKU}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "SPUID";
col.CellTemplate = "<span>{Bind SPUID}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "基础价格";
col.CellTemplate = "<span>{Bind BasePrice}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "创建人";
col.CellTemplate = "<span>{Bind CreateUserId}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "创建日期";
col.CellTemplate = "<span>{Bind CreateTime,yyyy-MM-dd}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "状态";
col.CellTemplate = "<span>{Bind State}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "160px";
col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>复制</span>&nbsp;&nbsp;<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>结束活动</span>";
Array.add(datagrid1.Columns, col);
//datagrid1.SetPageSize(20);
datagrid1.IsFixHeader = false;
datagrid1.ShowIndexColumn = false;
datagrid1.AllowPaging = true;
datagrid1.Width = "100%";
datagrid1.SelectMode = nblf.ui.SelectMode.None;
datagrid1.Init();
datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 初始化DataGrid2
function CreateDataGrid2() {
col = new nblf.ui.DataGridColumn();
col.HeaderText = "折扣";
col.CellTemplate = "<input ColName='OffNum' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind OffNum}' precision='1' min='0' max='99999999' ></input>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "售价";
col.CellTemplate = "<input ColName='SalePrice' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind SalePrice}' precision='1' min='0' max='99999999' disabled='disabled' ></input>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "活动库存数量";
col.CellTemplate = "<input ColName='ActiveNum' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind ActiveNum}' precision='0' min='0' max='99999999' ></input>";
Array.add(datagrid2.Columns, col);
//col = new nblf.ui.DataGridColumn();
//col.HeaderText = "已售数量";
//col.CellTemplate = "<input ColName='OutNum' colrequired='true' type='text' style='width:99%;text-align: center;' value='{Bind OutNum}' precision='0' min='0' max='99999999' ></input>";
//Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "80px";
col.CellTemplate = "<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>删除</span>";
Array.add(datagrid2.Columns, col);
//datagrid2.SetPageSize(20);
datagrid2.IsFixHeader = false;
datagrid2.ShowIndexColumn = false;
datagrid2.AllowPaging = false;
datagrid2.Width = "100%";
datagrid2.SelectMode = nblf.ui.SelectMode.None;
datagrid2.Init();
datagrid2.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 读取数据
function ReadData() {
var param = new Object();
CreateWhere("SelectHtml", param); //读取查询条件
param.cs = Base64.encode(param.cs);
param.PageIndex = datagrid1.Get_PageIndex();
param.PageSize = datagrid1.Get_PageSize();
$.ajax({
url: "../DD_OrderServiceNew.asmx/GetListTemuShopGoodActive",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
}
});
}
//#endregion
//#region 读取明细
function GetModel(ID) {
var param = new Object();
param.ID = ID;
$.ajax({
url: "../DD_OrderServiceNew.asmx/GetModel_TemuShopGoodActive",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
if (data.d == null) return;
Model = data.d;
Model.ID = 0;
CreateGetModel("MainTable", Model);
$("#select_shops").val(Model.ShopId );
datagrid2.DataBind(Model.ListModel);
}
});
}
//#endregion
//#region 删除
function Delete(ID) {
if (window.confirm("确定要删除吗?") == false) return;
var param = new Object();
param.ID = ID;
WindowLoadModel.Show();
$.ajax({
url: "../DD_OrderServiceNew.asmx/Delete_TemuShopGoodActive",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d == false) { alert("已经使用过,无法删除"); return; }
ReadData(); //刷新DataGrid
}
});
}
//#endregion
//#region 保存
function Save() {
if ($("#select_shops").val() == "-1") {
alert("请选择店铺");
return;
}
var error = CreateSaveModel("MainTable", Model);
if (error != "") { alert(error); return; }
Model.ShopId = $("#select_shops").val();
error = datagrid2.UpdateDataSource();
if (error != "") { alert(error); return; }
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "../DD_OrderServiceNew.asmx/Save_TemuShopGoodActive",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
//#region 显示弹出窗体
function ShowFancybox(id) {
$.fancybox({
'scrolling': 'no',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#' + id,
'onClosed': function () {
}
}, 0);
}
//#endregion
</script>
</head>
<body>
<table id="SelectHtml" border="1" cellpadding="0" cellspacing="0" align="center" style="width: 100%"
class="tableAll">
<colgroup>
<col style="width: 60px;" />
<col style="width: 240px;" />
<col style="width: 60px;" />
<col style="width: 120px;" />
<col style="width: 60px;" />
<col style="width: 120px;" />
<col style="width: 60px;" />
<col style="width: 120px;" />
<col />
</colgroup>
<tr>
<td class="f1" >店铺</td>
<td><select id="select_shops2"></select></td>
<td class="f1" >SKU</td>
<td><input id='txt_SKU' type='text' style='width: 99%' where="a.SKU like '%@value%'"/></td>
<td class="f1" >状态</td>
<td><select id='list_State' style="width: 99%;" where="State=@value" >
<option value="-1">全部</option>
<option value="0">已结束</option>
<option value="1">正常</option>
</select></td>
<td><input id="cmdGet" type="button" value = "查询" /></td>
</tr>
<tr>
<td colspan="9">
<input id="cmdAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="9">
<div id="DataGrid1" class="DataGridStyle"></div>
</td>
</tr>
</table>
<div style="display: none;">
<div id="MainTable" title="编辑" style="width: 800px; height: auto;">
<table border='1' cellpadding='0' cellspacing='0' align='center' style='width:95%;' class='tableAll' >
<colgroup>
<col style="width:80px;" />
<col />
<col style="width:80px;" />
<col />
<col style="width:80px;" />
<col />
<col style="width:80px;" />
<col />
</colgroup>
<tr>
<td class="f1" >店铺</td>
<td><select id="select_shops"></select></td>
<td class="f1" >SKU</td>
<td><input id='txtSKU' type='text' style='width: 99%' columnname="SKU" columndesc="SKU" columnrequired="true" validtype="" /></td>
<td class="f1" >SPUID</td>
<td><input id='txtSPUID' type='text' style='width: 99%' columnname="SPUID" columndesc="SPUID" columnrequired="false" validtype="" /></td>
</tr>
<tr>
<td class="f1" >基础价格</td>
<td><input id='txtBasePrice' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="BasePrice" columndesc="基础价格" columnrequired="true" /></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="8">
<input id="cmdAdd2" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="8">
<div id="DataGrid2" class="DataGridStyle"></div>
</td>
</tr>
<tr>
<td colspan="8" style="text-align: center;">
<input id="cmdSave" type="button" value="保存" />
<input id="cmdBack" type="button" value="返回" />
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TradeManageNew.Huowu
{
public partial class TemuShopGoodPriceNew : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}

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

@ -11264,5 +11264,74 @@ namespace TradeManageNew
} }
public class TemuShopGoodActive
{
/// <summary>
/// ID
/// </summary>
public Int32? ID { get; set; }
/// <summary>
/// Shopid
/// </summary>
public Int32? Shopid { get; set; }
public String ShopName { get; set; }
/// <summary>
/// SKU
/// </summary>
public String SKU { get; set; }
public String ActiveInfo { get; set; }
/// <summary>
/// SPUID
/// </summary>
public String SPUID { get; set; }
/// <summary>
/// 基础价格
/// </summary>
public Decimal? BasePrice { get; set; }
/// <summary>
/// CreateUserId
/// </summary>
public Int32? CreateUserId { get; set; }
/// <summary>
/// 创建日期
/// </summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// PostPrice
/// </summary>
public Decimal? PostPrice { get; set; }
/// <summary>
/// 1正常0已结束
/// </summary>
public Int32? State { get; set; }
public List<TemuShopGoodActiveDetail> ListModel { get; set; }
}
public class TemuShopGoodActiveDetail
{
/// <summary>
/// Id
/// </summary>
public Int32? Id { get; set; }
/// <summary>
/// ActiveId
/// </summary>
public Int32? ActiveId { get; set; }
/// <summary>
/// OffNum
/// </summary>
public Decimal? OffNum { get; set; }
/// <summary>
/// SalePrice
/// </summary>
public Decimal? SalePrice { get; set; }
/// <summary>
/// ActiveNum
/// </summary>
public Int32? ActiveNum { get; set; }
/// <summary>
/// LeftNum
/// </summary>
public Int32? OutNum { get; set; }
}
} }

@ -1414,6 +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_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" />
@ -1426,6 +1427,7 @@
<Content Include="Huowu\HW_production.aspx" /> <Content Include="Huowu\HW_production.aspx" />
<Content Include="Huowu\TemuShopGoodPrice.aspx" /> <Content Include="Huowu\TemuShopGoodPrice.aspx" />
<Content Include="Huowu\TemuShopGoodPriceCheck.aspx" /> <Content Include="Huowu\TemuShopGoodPriceCheck.aspx" />
<Content Include="Huowu\TemuShopGoodPriceNew.aspx" />
<Content Include="IndexErp.aspx" /> <Content Include="IndexErp.aspx" />
<Content Include="Indexerpbook.aspx" /> <Content Include="Indexerpbook.aspx" />
<Content Include="IndexNew.aspx" /> <Content Include="IndexNew.aspx" />
@ -2780,6 +2782,13 @@
<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">
<DependentUpon>HW_GoodsFee.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Huowu\HW_GoodsFee.aspx.designer.cs">
<DependentUpon>HW_GoodsFee.aspx</DependentUpon>
</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>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -2864,6 +2873,13 @@
<Compile Include="Huowu\TemuShopGoodPriceCheck.aspx.designer.cs"> <Compile Include="Huowu\TemuShopGoodPriceCheck.aspx.designer.cs">
<DependentUpon>TemuShopGoodPriceCheck.aspx</DependentUpon> <DependentUpon>TemuShopGoodPriceCheck.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Huowu\TemuShopGoodPriceNew.aspx.cs">
<DependentUpon>TemuShopGoodPriceNew.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Huowu\TemuShopGoodPriceNew.aspx.designer.cs">
<DependentUpon>TemuShopGoodPriceNew.aspx</DependentUpon>
</Compile>
<Compile Include="ImageCompress.cs" /> <Compile Include="ImageCompress.cs" />
<Compile Include="IndexErp.aspx.cs"> <Compile Include="IndexErp.aspx.cs">
<DependentUpon>IndexErp.aspx</DependentUpon> <DependentUpon>IndexErp.aspx</DependentUpon>

@ -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>

@ -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>

Loading…
Cancel
Save