cmj 4 days ago
commit eda2aea36b

@ -136,7 +136,15 @@
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "意向箱数";
col.CellTemplate = "<span class='ms'>{Bind Cantidad}</span>";
col.CellTemplate = `{Bind orginData}`;
col.CellFormatter = function (data) {
var num = data.Cantidad
if (data.IsCustomerUpdate) {
return `<span class='ms' style="color:red">${num}</span>`
} else {
return `<span class='ms'>${num}</span>`
}
}
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "总体积";
@ -193,7 +201,7 @@
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作员工";
col.CellTemplate = "<span class='ms'>{Bind UserName}</span>";
col.CellTemplate = "<span class='ms'>{Bind UpdateName}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "报价时间";
@ -313,7 +321,9 @@
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
data.d.data.datas.forEach(item => {
item.orginData = JSON.parse(JSON.stringify(item))
})
var newDatas = data.d.data.datas;
$(newDatas).each(function (i) {
newDatas[i].newCreateDate = GetNewDate(newDatas[i].CreateDate);

@ -27859,11 +27859,11 @@ end ";
string tsql = @"
if @Id>0
begin
UPDATE [dbo].[DT_Quote_New] SET [Foto] = @Foto, [Nombre] = @Nombre, [Caracteristicas] =@Caracteristicas, [Modelo] =@Modelo, [Recio] =@Recio, [QtyOrCtn] = @QtyOrCtn, [Cbm] = @Cbm, [AllCbm] = @AllCbm, [Gw] =@Gw, [Nw] = @Nw, [CompanyId] = @CompanyId, [UserId] = @UserId, [CreateDate] = @CreateDate, [IsAuthority] =@IsAuthority, [FactoryName] =@FactoryName, [FactoryImg] = @FactoryImg, [Cantidad] = @Cantidad, [Valor] = @Valor, [ClientId] = @ClientId, [CityName] = @CityName, [DTQuoteNo] = @DTQuoteNo WHERE [Id] = @Id;
UPDATE [dbo].[DT_Quote_New] SET [Foto] = @Foto, [Nombre] = @Nombre, [Caracteristicas] =@Caracteristicas, [Modelo] =@Modelo, [Recio] =@Recio, [QtyOrCtn] = @QtyOrCtn, [Cbm] = @Cbm, [AllCbm] = @AllCbm, [Gw] =@Gw, [Nw] = @Nw, [CompanyId] = @CompanyId, [UserId] = @UserId, [CreateDate] = @CreateDate, [IsAuthority] =@IsAuthority, [FactoryName] =@FactoryName, [FactoryImg] = @FactoryImg, [Cantidad] = @Cantidad, [Valor] = @Valor, [ClientId] = @ClientId, [CityName] = @CityName, [DTQuoteNo] = @DTQuoteNo, [IsCustomerUpdate] = @IsCustomerUpdate, [UpdateName] = @UpdateName WHERE [Id] = @Id;
end
else
begin
INSERT INTO [dbo].[DT_Quote_New] ([Foto], [Nombre], [Caracteristicas], [Modelo], [Recio], [QtyOrCtn], [Cbm],[AllCbm], [Gw], [Nw], [CompanyId], [UserId], [CreateDate], [IsAuthority], [FactoryName], [FactoryImg], [Cantidad], [Valor], [ClientId], [CityName], [DTQuoteNo]) VALUES (@Foto,@Nombre,@Caracteristicas,@Modelo,@Recio, @QtyOrCtn,@Cbm,@AllCbm,@Gw, @Nw,@CompanyId, @UserId, @CreateDate,@IsAuthority, @FactoryName, @FactoryImg,@Cantidad,@Valor,@ClientId,@CityName,@DTQuoteNo);
INSERT INTO [dbo].[DT_Quote_New] ([Foto], [Nombre], [Caracteristicas], [Modelo], [Recio], [QtyOrCtn], [Cbm],[AllCbm], [Gw], [Nw], [CompanyId], [UserId], [CreateDate], [IsAuthority], [FactoryName], [FactoryImg], [Cantidad], [Valor], [ClientId], [CityName], [DTQuoteNo],[IsCustomerUpdate],[UpdateName]) VALUES (@Foto,@Nombre,@Caracteristicas,@Modelo,@Recio, @QtyOrCtn,@Cbm,@AllCbm,@Gw, @Nw,@CompanyId, @UserId, @CreateDate,@IsAuthority, @FactoryName, @FactoryImg,@Cantidad,@Valor,@ClientId,@CityName,@DTQuoteNo,@IsCustomerUpdate,@UpdateName);
set @Id=SCOPE_IDENTITY()
end
select @Id";
@ -27889,8 +27889,10 @@ select @Id";
db.AddInParameter(cmd, "@CityName", DbType.String, Model.CityName);
db.AddInParameter(cmd, "@DTQuoteNo", DbType.String, Model.DTQuoteNo);
db.AddInParameter(cmd, "@Cantidad", DbType.Int32, Model.Cantidad);
db.AddInParameter(cmd, "@Valor", DbType.Decimal, Model.Valor);
db.AddInParameter(cmd, "@Valor", DbType.Decimal, Model.Valor);
db.AddInParameter(cmd, "@ClientId", DbType.Int32, Model.ClientId);
db.AddInParameter(cmd, "@IsCustomerUpdate", DbType.Boolean, Model.IsCustomerUpdate);
db.AddInParameter(cmd, "@UpdateName", DbType.String, Model.UpdateName);
resultId = Convert.ToInt32(db.ExecuteScalar(cmd));
}
@ -27918,6 +27920,25 @@ select @Id";
return model;
}
//不传时间
public static appShowMsg GetMsg_ClientToday_Nodate(int ClientId,string QuoteNo)
{
string sql = $"SELECT SUM(Valor) as AllValor,SUM(AllCbm) as AllCbm FROM [dbo].[DT_Quote_New] where ClientId = {ClientId} and DTQuoteNo = '{QuoteNo}';SELECT Id as ClientId,ClientName from JC_Client where Id = {ClientId};";
Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(sql);
DataSet ds = db.ExecuteDataSet(cmd);
var model1 = ds.Tables[0].Rows[0].ToModel<appShowMsg>();
var model2 = ds.Tables[1].Rows[0].ToModel<appShowMsg>();
appShowMsg model = new appShowMsg();
model.ClientName = model2.ClientName;
model.ClientId = model2.ClientId;
model.AllValor = model1.AllValor;
model.AllCbm = model1.AllCbm;
return model;
}
public static DT_Quote_NewTable GetModel_DT_QuoteNewTable(int Id)
{
string tsql = $"SELECT * FROM [dbo].[DT_Quote_New] where Id = {Id} ";

@ -9739,6 +9739,15 @@ namespace TradeManageNew
/// 报价单号
/// </summary>
public string DTQuoteNo { get; set; }
/// <summary>
/// 是否为客户修改
/// </summary>
public bool? IsCustomerUpdate { get; set; }
/// <summary>
/// UpdateName
/// </summary>
public string UpdateName { get; set; }
}
public class appShowMsg

@ -15932,13 +15932,13 @@ where a.storeid in (6,9,11) and a.OrderGoodsId=0 and a.KCNum>0 " + tj + " gr
#endregion
#region 返回单个客户今天的报价总金额和总体积 ok
[WebMethod(EnableSession = true)]
public AppResultModel<appShowMsg> GetMsg_ClientToday(int ClientId,string newDate)
public AppResultModel<appShowMsg> GetMsg_ClientToday(int ClientId,string QuoteNo)
{
var resultModel = new AppResultModel<appShowMsg>();
try
{
//var newDate = DateTime.Now.ToShortDateString();
var newappShowMsg = DataNew.GetMsg_ClientToday(ClientId, newDate);
var newappShowMsg = DataNew.GetMsg_ClientToday_Nodate(ClientId, QuoteNo);
if (newappShowMsg == null)
{

Loading…
Cancel
Save