lvzb
4 years ago
100 changed files with 5985 additions and 595 deletions
@ -0,0 +1,445 @@ |
|||
using CK.SCP.Models; |
|||
using CK.SCP.Models.Enums; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Models.ScpEntity.ExcelExportEnttity; |
|||
using CK.SCP.Utils; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data.Entity.Core; |
|||
using System.Data.Entity.Migrations; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace CK.SCP.Controller |
|||
{ |
|||
public class SCP_FORECAST_CONTROLLER |
|||
{ |
|||
/// <summary>
|
|||
/// 获取数据
|
|||
/// </summary>
|
|||
/// <param name="p_entity"></param>
|
|||
/// <param name="p_action"></param>
|
|||
public static void Get_V_TB_FORECAST_List(V_TB_FORECAST p_entity, Action<ResultObject<IQueryable<V_TB_FORECAST>>> p_action) |
|||
{ |
|||
ResultObject<IQueryable<V_TB_FORECAST>> _ret = new ResultObject<IQueryable<V_TB_FORECAST>>(); |
|||
try |
|||
{ |
|||
using (Models.ScpEntities db = EntitiesFactory.CreateScpInstance()) |
|||
{ |
|||
IQueryable<V_TB_FORECAST> q = db.V_TB_FORECAST; |
|||
|
|||
if (!string.IsNullOrEmpty(p_entity.PartCode)) |
|||
{ |
|||
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); |
|||
} |
|||
if (!string.IsNullOrEmpty(p_entity.VendId)) |
|||
{ |
|||
q = q.Where(p => p.VendId == p_entity.VendId); |
|||
} |
|||
if (p_entity.BillStateList != null && p_entity.BillStateList.Count > 0) |
|||
{ |
|||
q = q.Where(p => p_entity.BillStateList.Contains((int)p.State)); |
|||
} |
|||
if (!string.IsNullOrEmpty(p_entity.State_DESC)) |
|||
{ |
|||
q = q.Where(p => p.State_DESC.Contains(p_entity.State_DESC)); |
|||
} |
|||
//if (!string.IsNullOrEmpty(p_entity.Month))
|
|||
//{
|
|||
// q = q.Where(p => p.Month == p_entity.Month);
|
|||
//}
|
|||
q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); |
|||
if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) |
|||
{ |
|||
q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); |
|||
} |
|||
if (!string.IsNullOrEmpty(p_entity.CreateUser)) |
|||
{ |
|||
q = q.Where(p => p.CreateUser == p_entity.CreateUser); |
|||
} |
|||
if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) |
|||
{ |
|||
q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); |
|||
} |
|||
_ret.State = ReturnStatus.Succeed; |
|||
_ret.Result = q; |
|||
p_action(_ret); |
|||
} |
|||
} |
|||
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
|||
{ |
|||
var sb = new StringBuilder(); |
|||
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
|||
{ |
|||
error.ValidationErrors.ToList().ForEach(i => |
|||
{ |
|||
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
|||
}); |
|||
} |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.ErrorList.Add(dbEx); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", sb.ToString()); |
|||
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
|||
} |
|||
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
|||
{ |
|||
|
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.ErrorList.Add(ex); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", ex.ToString()); |
|||
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
|||
} |
|||
catch (ScpException ex) |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.ErrorList.Add(ex); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", ex.ToString()); |
|||
|
|||
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
|||
{ |
|||
var inner = (UpdateException)ex.InnerException; |
|||
|
|||
|
|||
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
|||
} |
|||
else |
|||
{ |
|||
if (ex.InnerException != null) throw ex.InnerException; |
|||
} |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.ErrorList.Add(e); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Get_V_TB_FORECAST_List", e.Message); |
|||
throw e; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// EXCEL导入
|
|||
/// </summary>
|
|||
/// <param name="p_order_list"></param>
|
|||
/// <param name="p_creator"></param>
|
|||
/// <returns></returns>
|
|||
public static ResultObject<bool> EXCEL_FORECAST_MOD(List<SCP_FORECAST_EXPORT> p_order_list, string p_creator, string site) |
|||
{ |
|||
ResultObject<bool> _ret = new ResultObject<bool>(); |
|||
try |
|||
{ |
|||
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
|||
{ |
|||
int number = 1; |
|||
List<string> lineError = new List<string>(); |
|||
List<string> ErrorList = new List<string>(); |
|||
var _lst = p_order_list; |
|||
_lst.ForEach |
|||
(p => |
|||
{ |
|||
var _ls = CheckExcelMode_Forecast(db, p); |
|||
if (_ls.Count > 0) |
|||
{ |
|||
lineError.Add(number.ToString()); |
|||
ErrorList.Add(string.Join("<br>", _ls.ToArray())); |
|||
} |
|||
number++; |
|||
}); |
|||
if (lineError.Count > 0) |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.MessageList.AddRange(ErrorList); |
|||
_ret.Result = false; |
|||
} |
|||
else |
|||
{ |
|||
_lst.ForEach(p => |
|||
{ |
|||
// var _item = db.TB_FORECAST.SingleOrDefault(t => t.PartCode == p.零件编号.ToUpper() && t.VendId == p.供应商编码 && t.Month == p.月份) ??
|
|||
// new TB_FORECAST { PartCode = p.零件编号.ToUpper(), VendId = p.供应商编码, Month = p.月份, GUID = System.Guid.NewGuid() };
|
|||
var _item = new TB_FORECAST(); |
|||
_item.PoType = p.订单; |
|||
_item.VendId = p.供应商编码; |
|||
_item.GUID = System.Guid.NewGuid(); |
|||
_item.PartCode = p.零件编号; |
|||
_item.PoLine =Int32.Parse(p.图号); |
|||
_item.ShippdedPlace = p.规格; |
|||
_item.Unit = p.单位; |
|||
_item.Qty = decimal.Parse(p.当次订单数量); |
|||
_item.ProductStatus = p.产品状态; |
|||
_item.IsUrgent = p.紧急; |
|||
_item.ShippdedTime = DateTime.Parse(p.要求到货日期); |
|||
_item.ShippdedPlace = p.到货地; |
|||
_item.MonthQty = decimal.Parse(p.当月); |
|||
_item.MonthQty1 = decimal.Parse(p.预测1); |
|||
_item.MonthQty2 = decimal.Parse(p.预测2); |
|||
_item.MonthQty3 = decimal.Parse(p.预测3); |
|||
_item.Ontime = p.是否按期交货; |
|||
_item.Datetime = p.不能按期交付日期; |
|||
_item.Remark = p.备注; |
|||
_item.IsDeleted = false; |
|||
_item.CreateUser = p_creator; |
|||
_item.CreateTime = DateTime.Now; |
|||
_item.State = (int)ForecastState.New; |
|||
_item.UpdateInfo = ""; |
|||
_item.Site = site; |
|||
db.TB_FORECAST.AddOrUpdate(_item); |
|||
}); |
|||
if (_ret.MessageList.Count == 0) |
|||
{ |
|||
int state = db.SaveChanges(); |
|||
if (state != -1) |
|||
{ |
|||
_ret.State = ReturnStatus.Succeed; |
|||
_ret.Result = true; |
|||
} |
|||
else |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
|||
{ |
|||
var sb = new StringBuilder(); |
|||
|
|||
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
|||
{ |
|||
|
|||
error.ValidationErrors.ToList().ForEach(i => |
|||
{ |
|||
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
|||
}); |
|||
} |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(dbEx); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", sb.ToString()); |
|||
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
|||
} |
|||
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
|||
{ |
|||
|
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(ex); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", ex.ToString()); |
|||
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
|||
} |
|||
catch (ScpException ex) |
|||
{ |
|||
|
|||
|
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(ex); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", ex.ToString()); |
|||
|
|||
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
|||
{ |
|||
var inner = (UpdateException)ex.InnerException; |
|||
|
|||
|
|||
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
|||
} |
|||
else |
|||
{ |
|||
if (ex.InnerException != null) throw ex.InnerException; |
|||
} |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "EXCEL_FORECAST_MOD", e.Message); |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(e); |
|||
throw e; |
|||
} |
|||
return _ret; |
|||
} |
|||
/// <summary>
|
|||
/// 导入验证
|
|||
/// </summary>
|
|||
/// <param name="db"></param>
|
|||
/// <param name="p_excel"></param>
|
|||
/// <returns></returns>
|
|||
private static List<string> CheckExcelMode_Forecast(ScpEntities db, SCP_FORECAST_EXPORT p_excel) |
|||
{ |
|||
List<string> ErrorList = new List<string>(); |
|||
if ( |
|||
string.IsNullOrEmpty(p_excel.零件编号) || |
|||
string.IsNullOrEmpty(p_excel.供应商编码) || |
|||
string.IsNullOrEmpty(p_excel.图号) || |
|||
string.IsNullOrEmpty(p_excel.当次订单数量) || |
|||
string.IsNullOrEmpty(p_excel.要求到货日期) || |
|||
string.IsNullOrEmpty(p_excel.当月) || |
|||
string.IsNullOrEmpty(p_excel.预测1) || |
|||
string.IsNullOrEmpty(p_excel.预测2) || |
|||
string.IsNullOrEmpty(p_excel.预测3)) |
|||
{ |
|||
ErrorList.Add(string.Format("零件编号【{0}】有填写为空!", p_excel.零件编号)); |
|||
} |
|||
return ErrorList; |
|||
} |
|||
|
|||
public static ResultObject<bool> Save_TB_FORECAST_STATE(List<long> p_list, string p_user, ForecastState State) |
|||
{ |
|||
ResultObject<bool> _ret = new ResultObject<bool>(); |
|||
try |
|||
{ |
|||
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
|||
{ |
|||
if (State == ForecastState.Confirm) |
|||
{ |
|||
var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList(); |
|||
int count = _ls.Count(p => p.State == (int)ForecastState.New); |
|||
if (count == _ls.Count && _ls.Count > 0) |
|||
{ |
|||
_ls.ForEach(p => |
|||
{ |
|||
p.State = (int)ForecastState.Confirm; |
|||
p.UpdateTime = DateTime.Now; |
|||
p.UpdateUser = p_user; |
|||
p.UpdateInfo = "供应商确认"; |
|||
} |
|||
); |
|||
db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray()); |
|||
} |
|||
else |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.Message = "选择的记录,有已经确认的数据!"; |
|||
} |
|||
} |
|||
if (State == ForecastState.Reject) |
|||
{ |
|||
var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList(); |
|||
int count = _ls.Count(p => p.State == (int)ForecastState.New); |
|||
if (count == _ls.Count && _ls.Count > 0) |
|||
{ |
|||
_ls.ForEach(p => |
|||
{ |
|||
p.State = (int)ForecastState.Reject; |
|||
p.UpdateTime = DateTime.Now; |
|||
p.UpdateUser = p_user; |
|||
p.UpdateInfo = "作废"; |
|||
p.IsDeleted = true ; |
|||
} |
|||
); |
|||
db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray()); |
|||
} |
|||
else |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.Message = "选择的记录,有已经确认的数据!"; |
|||
} |
|||
} |
|||
if (State == ForecastState.New) |
|||
{ |
|||
var _ls = db.TB_FORECAST.Where(p => p_list.Contains(p.UID)).ToList(); |
|||
int count = _ls.Count(p => p.State == (int)ForecastState.Confirm); |
|||
if (count == _ls.Count && _ls.Count > 0) |
|||
{ |
|||
_ls.ForEach(p => |
|||
{ |
|||
p.State = (int)ForecastState.New; |
|||
p.UpdateTime = DateTime.Now; |
|||
p.UpdateUser = p_user; |
|||
p.UpdateInfo = "取消确认"; |
|||
} |
|||
); |
|||
db.TB_FORECAST.AddOrUpdate(p => p.UID, _ls.ToArray()); |
|||
} |
|||
else |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.Message = "选择的记录,有不是确认的数据!"; |
|||
} |
|||
} |
|||
if (string.IsNullOrEmpty(_ret.Message)) |
|||
{ |
|||
if (db.SaveChanges() != -1) |
|||
{ |
|||
_ret.State = ReturnStatus.Succeed; |
|||
_ret.Result = true; |
|||
} |
|||
else |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.Message = "数据更新失败!"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
|||
{ |
|||
var sb = new StringBuilder(); |
|||
|
|||
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
|||
{ |
|||
|
|||
error.ValidationErrors.ToList().ForEach(i => |
|||
{ |
|||
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
|||
}); |
|||
} |
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(dbEx); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", sb.ToString()); |
|||
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
|||
} |
|||
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
|||
{ |
|||
|
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(ex); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); |
|||
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
|||
} |
|||
catch (ScpException ex) |
|||
{ |
|||
|
|||
|
|||
_ret.State = ReturnStatus.Failed; |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(ex); |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", ex.ToString()); |
|||
|
|||
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
|||
{ |
|||
var inner = (UpdateException)ex.InnerException; |
|||
|
|||
|
|||
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
|||
} |
|||
else |
|||
{ |
|||
if (ex.InnerException != null) throw ex.InnerException; |
|||
} |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
_ret.State = ReturnStatus.Failed; |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_FORECAST_CONTROLLER), "Save_TB_FORECAST_STATE", e.Message); |
|||
_ret.Result = false; |
|||
_ret.ErrorList.Add(e); |
|||
throw e; |
|||
} |
|||
|
|||
return _ret; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity |
|||
{ |
|||
public class SCP_OTD_REPORT_EXPORT |
|||
{ |
|||
public string 要货看板号 { get; set; } |
|||
public string 供应商编号 { get; set; } //VendId
|
|||
public string 供应商名称 { get; set; } //VendId
|
|||
public string 零件号 { get; set; } |
|||
public string 零件名称 { get; set; } |
|||
public string 要求到货时间 { get; set; } |
|||
public string 到货数量 { get; set; } //ArriveQty
|
|||
public string 订单要货数量 { get; set; } //AskQty
|
|||
public string 差额 { get; set; } //Qty
|
|||
public string 及时数量 { get; set; } //NntimelyQty
|
|||
public string 及时率 { get; set; }//OTD
|
|||
public string 到货率 { get; set; }//ArriveOTD
|
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace CK.SCP.Models.ScpEntity |
|||
{ |
|||
public class V_FORECAST_REPORT |
|||
{ |
|||
public string VendId { get; set; } //供应商编号
|
|||
public string PartCode { get; set; } //零件号
|
|||
public decimal AskQty { get; set; } //订单要货数量
|
|||
public int Month { get; set; } //月份
|
|||
public decimal MonthQty1 { get; set; } //N+1
|
|||
public decimal MonthQty2 { get; set; } //N+2
|
|||
public decimal MonthQty3 { get; set; } //N+3
|
|||
[NotMapped] |
|||
public string VendName => ScpCache.GetVendName(VendId);//供应商名称
|
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace CK.SCP.Models.ScpEntity |
|||
{ |
|||
public class V_TB_FORECAST : RecordEntity |
|||
{ |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public long UID { get; set; } |
|||
[StringLength(50)] |
|||
public string PoType { get; set; } |
|||
[StringLength(50)] |
|||
public string VendId { get; set; } |
|||
[StringLength(50)] |
|||
public string PartCode { get; set; } |
|||
public int PoLine { get; set; } |
|||
[StringLength(50)] |
|||
public string Specifications { get; set; } |
|||
public string Unit { get; set; } |
|||
|
|||
public decimal Qty { get; set; } |
|||
public string ProductStatus { get; set; } |
|||
public string IsUrgent { get; set; } |
|||
public DateTime? ShippdedTime { get; set; } |
|||
public string ShippdedPlace { get; set; } |
|||
public decimal MonthQty { get; set; } |
|||
public decimal MonthQty1 { get; set; } |
|||
public decimal MonthQty2 { get; set; } |
|||
public decimal MonthQty3 { get; set; } |
|||
public string Ontime { get; set; } |
|||
public string Datetime { get; set; } |
|||
[StringLength(50)] |
|||
public string Remark { get; set; } |
|||
public int? State { get; set; } |
|||
|
|||
[StringLength(50)] |
|||
public string State_DESC { get; set; } |
|||
[StringLength(50)] |
|||
public string Site { get; set; } |
|||
|
|||
} |
|||
} |
@ -1,28 +0,0 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <auto-generated>
|
|||
// 此代码已从模板生成。
|
|||
//
|
|||
// 手动更改此文件可能导致应用程序出现意外的行为。
|
|||
// 如果重新生成代码,将覆盖对此文件的手动更改。
|
|||
// </auto-generated>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace CK.SCP.Models.ScpEntity |
|||
{ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
public partial class V_TB_PO_INCOMPLETE |
|||
{ |
|||
public string PoBillNum { get; set; } |
|||
public Nullable<System.DateTime> EndTime { get; set; } |
|||
public string Buyer { get; set; } |
|||
public string Site { get; set; } |
|||
public string VendId { get; set; } |
|||
public string PartCode { get; set; } |
|||
public decimal PlanQty { get; set; } |
|||
public decimal QTY { get; set; } |
|||
public string VendName { get; set; } |
|||
public string partdesc { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace ChangKeTec.Wms.Models.Wms |
|||
{ |
|||
public partial class VIEW_STOCK_QTY |
|||
{ |
|||
[Key] |
|||
[Column(Order = 0)] |
|||
[StringLength(50)] |
|||
public string PartCode { get; set; } |
|||
[Key] |
|||
[Column(Order = 1)] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.None)] |
|||
public System.DateTime LogTime { get; set; } |
|||
|
|||
public decimal qty { get; set; } |
|||
|
|||
public string VendId { get; set; } |
|||
|
|||
public string status { get; set; } |
|||
|
|||
[NotMapped] |
|||
public DateTime? BeginTime { get; set; } |
|||
|
|||
[NotMapped] |
|||
public DateTime? EndTime { get; set; } |
|||
[NotMapped] |
|||
public List<string> UserInVendIds { set; get; } |
|||
} |
|||
} |
@ -0,0 +1,113 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_FORECAST.aspx.cs" Inherits="SCP.Views.PlanData.SCP_FORECAST" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar1" runat="server"> |
|||
<Items> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Button ID="btnRefresh" runat="server" Text="刷新" EnablePostBack="True" Icon="Reload" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:Button ID="btnSave" runat="server" Hidden="true" Text="确认" Icon="CssValid" OnClick="btnSave_Click" ></f:Button> |
|||
<f:Button ID="btnCancleSave" runat="server" Hidden="true" Text="取消确认" Icon="CssGo" OnClick="BtnCancleSave_Click" OnClientClick="if(!confirm('是否取消确认?'))return false;"></f:Button> |
|||
<f:Button ID="btnDelete" runat="server" Text="删除" Icon="CssDelete" OnClick="btnDelete_Click" OnClientClick="if(!confirm('是否删除?'))return false;" ></f:Button> |
|||
<f:ToolbarSeparator runat="server" /> |
|||
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Width="200" ButtonIcon="Add" ShowRedStar="true"></f:FileUpload> |
|||
<f:Button ID="btnInput" runat="server" Text="导入" Icon="PageExcel" OnClick="btnInput_Click"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
<f:Form BodyPadding="10px" Height="50px" ID="extForm1" |
|||
runat="server" Title="" ShowHeader="false"> |
|||
<Rows> |
|||
<f:FormRow ColumnWidths="33% 33% 33% " ID="FormRow_2" runat="server"> |
|||
<Items> |
|||
<f:TextBox runat="server" Label="零件号" ID="TextPartCode"> |
|||
</f:TextBox> |
|||
<f:TextBox runat="server" Label="供应商编码" ID="TextVendId"> |
|||
</f:TextBox> |
|||
<%-- <f:DropDownList ID="ddl_Day" runat="server" Label="查询月份"> |
|||
<f:ListItem Text="全部" Value="0" Selected="true" /> |
|||
<f:ListItem Text="1月" Value="1" /> |
|||
<f:ListItem Text="2月" Value="2" /> |
|||
<f:ListItem Text="3月" Value="3" /> |
|||
<f:ListItem Text="4月" Value="4" /> |
|||
<f:ListItem Text="5月" Value="5" /> |
|||
<f:ListItem Text="6月" Value="6" /> |
|||
<f:ListItem Text="7月" Value="7" /> |
|||
<f:ListItem Text="8月" Value="8" /> |
|||
<f:ListItem Text="9月" Value="9" /> |
|||
<f:ListItem Text="10月" Value="10" /> |
|||
<f:ListItem Text="11月" Value="11" /> |
|||
<f:ListItem Text="12月" Value="12" /> |
|||
</f:DropDownList>--%> |
|||
<f:DropDownList runat="server" ID="DDL_State" Label="状态"> |
|||
<f:ListItem Text="-" Value=""/> |
|||
<f:ListItem Text="新建" Value="0" /> |
|||
<f:ListItem Text="已确认" Value="1" /> |
|||
</f:DropDownList> |
|||
<f:Button runat="server" ID="Button1" Text="查询" OnClick="btnSearch_Click"></f:Button> |
|||
</Items> |
|||
</f:FormRow> |
|||
</Rows> |
|||
</f:Form> |
|||
<f:Grid ID="Grid_V_TB_FORECAST" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" EnableCheckBoxSelect="true" |
|||
runat="server" DataKeyNames="UID,PartCode,Month,MonthQty1,MonthQty2,MonthQty3,State,CreateUser,CreateTime" |
|||
IsDatabasePaging="true" AllowPaging="true" SortField="PartCode" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_FORECAST_PageIndexChange" |
|||
AutoScroll="True" EnableRowDoubleClickEvent="True"> |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField runat="server" HeaderText="UID" Hidden="true" ColumnID="" DataField="UID" /> |
|||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|||
<f:BoundField runat="server" HeaderText="订单" ColumnID="" DataField="PoType" /> |
|||
<f:BoundField runat="server" HeaderText="供应商编号" ColumnID="" DataField="VendId" /> |
|||
<f:BoundField runat="server" HeaderText="零件编号" ColumnID="" DataField="PartCode" /> |
|||
<f:BoundField runat="server" HeaderText="图号" ColumnID="" DataField="PoLine" /> |
|||
<f:BoundField runat="server" HeaderText="规格" ColumnID="" DataField="Specifications" /> |
|||
<f:BoundField runat="server" HeaderText="单位" ColumnID="" DataField="Unit" /> |
|||
<f:BoundField runat="server" HeaderText="当次订单数量" DataFormatString="{0:F0}" ColumnID="" DataField="Qty" /> |
|||
<f:BoundField runat="server" HeaderText="产品状态" ColumnID="" DataField="ProductStatus" /> |
|||
<f:BoundField runat="server" HeaderText="紧急" ColumnID="" DataField="IsUrgent" /> |
|||
<f:BoundField Width="100px" DataField="ShippdedTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="要求到货日期" /> |
|||
<f:BoundField runat="server" HeaderText="到货地" ColumnID="" DataField="ShippdedPlace" /> |
|||
<f:BoundField runat="server" HeaderText="当月" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty" /> |
|||
<f:BoundField runat="server" HeaderText="N+1" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty1" /> |
|||
<f:BoundField runat="server" HeaderText="N+2" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty2" /> |
|||
<f:BoundField runat="server" HeaderText="N+3" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty3" /> |
|||
<f:BoundField runat="server" HeaderText="是否按期交货" ColumnID="" DataField="Ontime" /> |
|||
<f:BoundField runat="server" HeaderText="不能按期交付日期" ColumnID="" DataField="Datetime" /> |
|||
<f:BoundField runat="server" HeaderText="状态" Hidden="true" ColumnID="" DataField="State" /> |
|||
<f:BoundField runat="server" HeaderText="创建者" ColumnID="" DataField="CreateUser" /> |
|||
<f:BoundField Width="100px" DataField="CreateTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="创建日期" /> |
|||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,239 @@ |
|||
using CK.SCP.Controller; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Models.ScpEntity.ExcelExportEnttity; |
|||
using CK.SCP.Utils; |
|||
using FineUI; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.Enums; |
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
public partial class SCP_FORECAST : PageBase |
|||
{ |
|||
/// <summary>
|
|||
/// 页面加载
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
LoadData(); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 加载数据
|
|||
/// </summary>
|
|||
public void LoadData() |
|||
{ |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 数据绑定
|
|||
/// </summary>
|
|||
public void BindData() |
|||
{ |
|||
SearchV_TB_FORECAST_Data((result) => |
|||
{ |
|||
Grid_V_TB_FORECAST.RecordCount = result.Count(); |
|||
var list = SortAndPage<V_TB_FORECAST>(result, Grid_V_TB_FORECAST); |
|||
Grid_V_TB_FORECAST.DataSource = list; |
|||
Grid_V_TB_FORECAST.DataBind(); |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 获取数据
|
|||
/// </summary>
|
|||
/// <param name="p_action"></param>
|
|||
public void SearchV_TB_FORECAST_Data(Action<IQueryable<V_TB_FORECAST>> p_action) |
|||
{ |
|||
V_TB_FORECAST _entity = new V_TB_FORECAST(); |
|||
_entity.IsDeleted = false; |
|||
if (!string.IsNullOrEmpty(TextPartCode.Text)) |
|||
{ |
|||
_entity.PartCode = TextPartCode.Text; |
|||
} |
|||
if (!string.IsNullOrEmpty(TextVendId.Text)) |
|||
{ |
|||
_entity.VendId = TextVendId.Text; |
|||
} |
|||
//if (ddl_Day.SelectedValue != "0")
|
|||
//{
|
|||
// _entity.Month = ddl_Day.SelectedValue;
|
|||
//}
|
|||
_entity.UserInAddress = CurrentUser.FactoryList; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
|||
{ |
|||
_entity.BillStateList = new List<int>() { int.Parse(DDL_State.SelectedValue) }; |
|||
} |
|||
SCP_FORECAST_CONTROLLER.Get_V_TB_FORECAST_List(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 查询
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
protected void Grid_V_TB_FORECAST_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 导入
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnInput_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
string _fileName = FileUp.FileName; |
|||
if (string.IsNullOrEmpty(_fileName)) |
|||
{ |
|||
Alert.Show("选择文件为空!"); |
|||
return; |
|||
} |
|||
string _lx = _fileName.Split('.')[1]; |
|||
Stream _stream = FileUp.PostedFile.InputStream; |
|||
DataTable _dt = new DataTable(); |
|||
if (_lx == "xls") |
|||
{ |
|||
_dt = ExcelHelper.GetDataTable(_stream); |
|||
} |
|||
else |
|||
{ |
|||
_dt = ExcelHelper.GetDataTableOfXlsx(_stream); |
|||
} |
|||
var list = ConvertHelper.ToList<SCP_FORECAST_EXPORT>(ExcelHelper.RemoveEmpty(_dt)).ToList(); |
|||
var ret = SCP_FORECAST_CONTROLLER.EXCEL_FORECAST_MOD(list, CurrentUser.Name, CurrentUser.FactoryList[0]); |
|||
if (ret.State == ReturnStatus.Succeed && ret.Result == true) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(string.Join("<br>", ret.MessageList)); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Alert.Show(ex.Message); |
|||
} |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 确认数据
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSave_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray; |
|||
List<long> _UidList = new List<long>(); |
|||
for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++) |
|||
{ |
|||
if (_selections.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i]; |
|||
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
|||
{ |
|||
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
|||
} |
|||
} |
|||
} |
|||
var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Confirm); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 删除数据
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnDelete_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray; |
|||
List<long> _UidList = new List<long>(); |
|||
for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++) |
|||
{ |
|||
if (_selections.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i]; |
|||
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
|||
{ |
|||
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
|||
} |
|||
} |
|||
} |
|||
var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Reject); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 取消确认
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void BtnCancleSave_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray; |
|||
List<long> _UidList = new List<long>(); |
|||
for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++) |
|||
{ |
|||
if (_selections.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i]; |
|||
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
|||
{ |
|||
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
|||
} |
|||
} |
|||
} |
|||
var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.New); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,197 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_FORECAST |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// btnRefresh 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnRefresh; |
|||
|
|||
/// <summary>
|
|||
/// btnSave 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnSave; |
|||
|
|||
/// <summary>
|
|||
/// btnCancleSave 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnCancleSave; |
|||
|
|||
/// <summary>
|
|||
/// btnDelete 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnDelete; |
|||
|
|||
/// <summary>
|
|||
/// FileUp 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FileUpload FileUp; |
|||
|
|||
/// <summary>
|
|||
/// btnInput 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnInput; |
|||
|
|||
/// <summary>
|
|||
/// extForm1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Form extForm1; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_2; |
|||
|
|||
/// <summary>
|
|||
/// TextPartCode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextPartCode; |
|||
|
|||
/// <summary>
|
|||
/// TextVendId 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextVendId; |
|||
|
|||
/// <summary>
|
|||
/// DDL_State 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList DDL_State; |
|||
|
|||
/// <summary>
|
|||
/// Button1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button Button1; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_FORECAST 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_FORECAST; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_UNI_API.aspx.cs" Inherits="SCP.Views.PlanData.SCP_UNI_API" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar1" runat="server"> |
|||
<Items> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Button ID="btnRefresh" runat="server" Text="刷新" EnablePostBack="True" Icon="Reload" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
<f:Form BodyPadding="10px" Height="50px" ID="extForm1" |
|||
runat="server" Title="" ShowHeader="false"> |
|||
<Rows> |
|||
<f:FormRow ColumnWidths="33% 33% 33% " ID="FormRow_2" runat="server"> |
|||
<Items> |
|||
<f:TextBox runat="server" Label="发票号" ID="TextInvBill"> |
|||
</f:TextBox> |
|||
<f:TextBox runat="server" Label="零件号" ID="TextPartCode"> |
|||
</f:TextBox> |
|||
<f:TextBox runat="server" Label="供应商编码" ID="TextVendId"> |
|||
</f:TextBox> |
|||
<f:Button runat="server" ID="Button1" Text="查询" OnClick="btnSearch_Click"></f:Button> |
|||
</Items> |
|||
</f:FormRow> |
|||
</Rows> |
|||
</f:Form> |
|||
<f:Grid ID="Grid_UNI_API" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" EnableCheckBoxSelect="true" |
|||
runat="server" DataKeyNames="UID,BillNum,Invoice,VendId,PartCode,Receiver,Qty,Price" |
|||
IsDatabasePaging="true" AllowPaging="true" SortField="PartCode" SortDirection="DESC" OnPageIndexChange="Grid_UNI_API_PageIndexChange" |
|||
AutoScroll="True" EnableRowDoubleClickEvent="True"> |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField runat="server" HeaderText="UID" Hidden="true" ColumnID="" DataField="UID" /> |
|||
<f:BoundField runat="server" HeaderText="发票号" ColumnID="" DataField="BillNum" /> |
|||
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="Invoice" /> |
|||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendId" /> |
|||
<f:BoundField runat="server" HeaderText="零件编码" ColumnID="" DataField="PartCode" /> |
|||
<f:BoundField runat="server" HeaderText="ERP收货单号" ColumnID="" DataField="Receiver" /> |
|||
<f:BoundField runat="server" HeaderText="数量" DataFormatString="{0:F0}" ColumnID="" DataField="Qty" /> |
|||
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,100 @@ |
|||
using CK.SCP.Controller; |
|||
using CK.SCP.Models.Enums; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using FineUI; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
public partial class SCP_UNI_API : PageBase |
|||
{ |
|||
/// <summary>
|
|||
/// 页面加载
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
LoadData(); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 加载数据
|
|||
/// </summary>
|
|||
public void LoadData() |
|||
{ |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 数据绑定
|
|||
/// </summary>
|
|||
public void BindData() |
|||
{ |
|||
SearchV_TS_UNIAPI_Data((result) => |
|||
{ |
|||
Grid_UNI_API.RecordCount = result.Count(); |
|||
var list = SortAndPage<TS_UNI_API>(result, Grid_UNI_API); |
|||
Grid_UNI_API.DataSource = list; |
|||
Grid_UNI_API.DataBind(); |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 获取数据
|
|||
/// </summary>
|
|||
/// <param name="p_action"></param>
|
|||
public void SearchV_TS_UNIAPI_Data(Action<IQueryable<TS_UNI_API>> p_action) |
|||
{ |
|||
TS_UNI_API _entity = new TS_UNI_API(); |
|||
_entity.State = 1; |
|||
_entity.InterfaceType = UniApiType.Invoice.ToString(); |
|||
if (!string.IsNullOrEmpty(TextPartCode.Text)) |
|||
{ |
|||
_entity.PartCode = TextPartCode.Text; |
|||
} |
|||
if (!string.IsNullOrEmpty(TextVendId.Text)) |
|||
{ |
|||
_entity.VendId = TextVendId.Text; |
|||
} |
|||
if (!string.IsNullOrEmpty(TextInvBill.Text)) |
|||
{ |
|||
_entity.BillNum = TextInvBill.Text; |
|||
|
|||
} |
|||
// _entity.UserInAddress = CurrentUser.FactoryList;
|
|||
// _entity.UserInVendIds = CurrentUser.VenderList;
|
|||
UniApiController.Get_TS_UNI_API_List(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 查询
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_UNI_API.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
protected void Grid_UNI_API_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
Grid_UNI_API.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,152 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_UNI_API |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// btnRefresh 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnRefresh; |
|||
|
|||
/// <summary>
|
|||
/// extForm1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Form extForm1; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_2; |
|||
|
|||
/// <summary>
|
|||
/// TextInvBill 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextInvBill; |
|||
|
|||
/// <summary>
|
|||
/// TextPartCode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextPartCode; |
|||
|
|||
/// <summary>
|
|||
/// TextVendId 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextVendId; |
|||
|
|||
/// <summary>
|
|||
/// Button1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button Button1; |
|||
|
|||
/// <summary>
|
|||
/// Grid_UNI_API 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_UNI_API; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
} |
|||
} |
@ -0,0 +1,94 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_OTD_REPORT.aspx.cs" Inherits="SCP.Views.Report.SCP_OTD_REPORT" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start" > |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar1" runat="server"> |
|||
<Items> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Button ID="btnRefresh" runat="server" Text="刷新" EnablePostBack="True" Icon="Reload" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_Click" > |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
<f:Form BodyPadding="10px" Height="40px" ID="extForm1" runat="server" Title="" ShowHeader="false"> |
|||
<Rows> |
|||
<f:FormRow ColumnWidths="16% 16% 16% 16% 16% 16%" ID="FormRow_1" runat="server"> |
|||
<Items> |
|||
<f:TextBox LabelWidth="50px" runat="server" Label="供应商" ID="TextVendId" > |
|||
</f:TextBox> |
|||
<f:TextBox LabelWidth="50px" runat="server" Label="零件号" ID="TextPartCode"> |
|||
</f:TextBox> |
|||
<f:DatePicker LabelWidth="80px" runat="server" Label="到货日期" ID="TextBeginTime"></f:DatePicker> |
|||
<f:DatePicker LabelWidth="80px" runat="server" Label="至" ID="TextEndTime"></f:DatePicker> |
|||
<f:DropDownList LabelWidth="100px" runat="server" ID="TextM" Label="到货月份"> |
|||
<f:ListItem Text="-" Value="0"/> |
|||
<f:ListItem Text="一月" Value="01" /> |
|||
<f:ListItem Text="二月" Value="02" /> |
|||
<f:ListItem Text="三月" Value="03" /> |
|||
<f:ListItem Text="四月" Value="04" /> |
|||
<f:ListItem Text="五月" Value="05" /> |
|||
<f:ListItem Text="六月" Value="06" /> |
|||
<f:ListItem Text="七月" Value="07" /> |
|||
<f:ListItem Text="八月" Value="08" /> |
|||
<f:ListItem Text="九月" Value="09" /> |
|||
<f:ListItem Text="十月" Value="10" /> |
|||
<f:ListItem Text="十一月" Value="11" /> |
|||
<f:ListItem Text="十二月" Value="12" /> |
|||
</f:DropDownList> |
|||
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnSearch_Click"></f:Button> |
|||
</Items> |
|||
</f:FormRow> |
|||
</Rows> |
|||
</f:Form> |
|||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" |
|||
runat="server" DataKeyNames="PartCode,PartName,AskQty,ArriveQty,Qty,NntimelyQty,OTD,ArriveOTD" |
|||
IsDatabasePaging="true" AllowPaging="true" SortField="PartCode" SortDirection="DESC" OnPageIndexChange="Grid_PageIndexChange" |
|||
AutoScroll="True" EnableRowDoubleClickEvent="True" OnSort="Grid1_Sort" AllowSorting="true" > |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField runat="server" SortField="AskBillNum" HeaderText="要货看板看号" Width="150px" ColumnID="" DataField="AskBillNum" /> |
|||
<f:BoundField runat="server" SortField="VendId" HeaderText="供应商编号" Width="150px" ColumnID="" DataField="VendId" /> |
|||
<f:BoundField runat="server" SortField="VendName" HeaderText="供应商名称" Width="150px" ColumnID="" DataField="VendName" /> |
|||
|
|||
<f:BoundField runat="server" SortField="PartCode" HeaderText="零件号" Width="150px" ColumnID="" DataField="PartCode" /> |
|||
<f:BoundField runat="server" SortField="PartName" HeaderText="零件名称" Width="150px" ColumnID="" DataField="PartName" /> |
|||
<f:BoundField runat="server" SortField="EndTime" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "到货日期" /> |
|||
<f:BoundField runat="server" HeaderText="订单要货数量" Width="150px" ColumnID="" DataField="AskQty" /> |
|||
<f:BoundField runat="server" HeaderText="到货数量" Width="150px" ColumnID="" DataField="ArriveQty" /> |
|||
<f:BoundField runat="server" HeaderText="差额" Width="150px" ColumnID="" DataField="Qty" /> |
|||
<f:BoundField runat="server" HeaderText="及时到货数量" Width="150px" ColumnID="" DataField="NntimelyQty" /> |
|||
<f:BoundField runat="server" HeaderText="及时率" Width="150px" ColumnID="" DataField="OTD" /> |
|||
<f:BoundField runat="server" HeaderText="完成率" Width="150px" ColumnID="" DataField="ArriveOTD" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,137 @@ |
|||
using CK.SCP.Controller; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using FineUI; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
|
|||
namespace SCP.Views.Report |
|||
{ |
|||
public partial class SCP_OTD_REPORT : PageBase |
|||
{ |
|||
/// <summary>
|
|||
/// 加载
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
TextBeginTime.SelectedDate = DateTime.Now.AddDays(1 - DateTime.Now.Day);//当前时间的月初
|
|||
TextEndTime.SelectedDate = DateTime.Now;//当前时间
|
|||
LoadData(); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 加载数据
|
|||
/// </summary>
|
|||
public void LoadData() |
|||
{ |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 数据绑定
|
|||
/// </summary>
|
|||
public void BindData() |
|||
{ |
|||
SearchV_OTD_REPORT_Data((result) => { |
|||
Grid1.RecordCount = result.Count(); |
|||
var list = SortAndPage<SCP_OTD_EXPORT>(result, Grid1); |
|||
Grid1.DataSource = list; |
|||
Grid1.DataBind(); |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 查询数据
|
|||
/// </summary>
|
|||
/// <param name="p_action"></param>
|
|||
public void SearchV_OTD_REPORT_Data(Action<IQueryable<SCP_OTD_EXPORT>> p_action) |
|||
{ |
|||
SCP_OTD_EXPORT _entity = new SCP_OTD_EXPORT(); |
|||
if (!string.IsNullOrEmpty(TextM.SelectedValue)) |
|||
{ |
|||
if (TextM.SelectedValue != "0") |
|||
{ |
|||
TextBeginTime.SelectedDate = DateTime.Parse(DateTime.Now.ToString(DateTime.Now.Year + "-" + TextM.SelectedValue + "-01")); |
|||
TextEndTime.SelectedDate = DateTime.Parse(DateTime.Now.ToString(DateTime.Now.Year + "-" + TextM.SelectedValue + "-01")).AddMonths(1).AddDays(-1); |
|||
} |
|||
} |
|||
if (TextBeginTime.SelectedDate != null) |
|||
{ |
|||
_entity.BeginTime = (DateTime)TextBeginTime.SelectedDate; |
|||
} |
|||
if (TextEndTime.SelectedDate != null) |
|||
{ |
|||
_entity.EndTime = (DateTime)TextEndTime.SelectedDate; |
|||
} |
|||
if (TextPartCode.Text != null) |
|||
{ |
|||
_entity.PartCode = TextPartCode.Text; |
|||
} |
|||
if (TextVendId.Text != null) |
|||
{ |
|||
_entity.VendId = TextVendId.Text; |
|||
} |
|||
SCP_REPORT_CONTROLLER.Get_V_SCP_OTD_REPORT_List(1, _entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 查询事件
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 分页条数change事件
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 页面索引change事件
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void Grid_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
|
|||
protected void Grid1_Sort(object sender, GridSortEventArgs e) |
|||
{ |
|||
Grid1.SortDirection = e.SortDirection; |
|||
Grid1.SortField = e.SortField; |
|||
BindData(); |
|||
} |
|||
|
|||
protected void btnOutput_Click(object sender, EventArgs e) |
|||
{ |
|||
SearchV_OTD_REPORT_Data((result) => { |
|||
Grid1.RecordCount = result.Count(); |
|||
List<SCP_OTD_EXPORT> _ls = result.ToList(); |
|||
|
|||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_OTD_REPORT_EXECEL(_ls); |
|||
PageBase.DataSetToExcel(ds, "供应商及时率"); |
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,179 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.Report |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_OTD_REPORT |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// btnRefresh 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnRefresh; |
|||
|
|||
/// <summary>
|
|||
/// btnOutput 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnOutput; |
|||
|
|||
/// <summary>
|
|||
/// extForm1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Form extForm1; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_1; |
|||
|
|||
/// <summary>
|
|||
/// TextVendId 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextVendId; |
|||
|
|||
/// <summary>
|
|||
/// TextPartCode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextPartCode; |
|||
|
|||
/// <summary>
|
|||
/// TextBeginTime 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker TextBeginTime; |
|||
|
|||
/// <summary>
|
|||
/// TextEndTime 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker TextEndTime; |
|||
|
|||
/// <summary>
|
|||
/// TextM 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList TextM; |
|||
|
|||
/// <summary>
|
|||
/// btnQuery 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnQuery; |
|||
|
|||
/// <summary>
|
|||
/// Grid1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
} |
|||
} |
@ -0,0 +1,113 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_FORECAST.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_FORECAST" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar1" runat="server"> |
|||
<Items> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Button ID="btnRefresh" runat="server" Text="刷新" EnablePostBack="True" Icon="Reload" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:Button ID="btnSave" runat="server" Text="确认" Icon="CssValid" OnClick="btnSave_Click" ></f:Button> |
|||
<f:Button ID="btnCancleSave" runat="server" Text="取消确认" Icon="CssGo" OnClick="BtnCancleSave_Click" OnClientClick="if(!confirm('是否取消确认?'))return false;"></f:Button> |
|||
<f:Button ID="btnDelete" runat="server" Hidden="true" Text="删除" Icon="CssDelete" OnClick="btnDelete_Click" OnClientClick="if(!confirm('是否删除?'))return false;" ></f:Button> |
|||
<f:ToolbarSeparator runat="server" /> |
|||
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Hidden="true" Width="200" ButtonIcon="Add" ShowRedStar="true"></f:FileUpload> |
|||
<f:Button ID="btnInput" runat="server" Text="导入" Icon="PageExcel" Hidden="true" OnClick="btnInput_Click"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
<f:Form BodyPadding="10px" Height="50px" ID="extForm1" |
|||
runat="server" Title="" ShowHeader="false"> |
|||
<Rows> |
|||
<f:FormRow ColumnWidths="33% 33% 33% " ID="FormRow_2" runat="server"> |
|||
<Items> |
|||
<f:TextBox runat="server" Label="零件号" ID="TextPartCode"> |
|||
</f:TextBox> |
|||
<f:TextBox runat="server" Label="供应商编码" ID="TextVendId"> |
|||
</f:TextBox> |
|||
<%-- <f:DropDownList ID="ddl_Day" runat="server" Label="查询月份"> |
|||
<f:ListItem Text="全部" Value="0" Selected="true" /> |
|||
<f:ListItem Text="1月" Value="1" /> |
|||
<f:ListItem Text="2月" Value="2" /> |
|||
<f:ListItem Text="3月" Value="3" /> |
|||
<f:ListItem Text="4月" Value="4" /> |
|||
<f:ListItem Text="5月" Value="5" /> |
|||
<f:ListItem Text="6月" Value="6" /> |
|||
<f:ListItem Text="7月" Value="7" /> |
|||
<f:ListItem Text="8月" Value="8" /> |
|||
<f:ListItem Text="9月" Value="9" /> |
|||
<f:ListItem Text="10月" Value="10" /> |
|||
<f:ListItem Text="11月" Value="11" /> |
|||
<f:ListItem Text="12月" Value="12" /> |
|||
</f:DropDownList>--%> |
|||
<f:DropDownList runat="server" ID="DDL_State" Label="状态"> |
|||
<f:ListItem Text="-" Value=""/> |
|||
<f:ListItem Text="新建" Value="0" /> |
|||
<f:ListItem Text="已确认" Value="1" /> |
|||
</f:DropDownList> |
|||
<f:Button runat="server" ID="Button1" Text="查询" OnClick="btnSearch_Click"></f:Button> |
|||
</Items> |
|||
</f:FormRow> |
|||
</Rows> |
|||
</f:Form> |
|||
<f:Grid ID="Grid_V_TB_FORECAST" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" EnableCheckBoxSelect="true" |
|||
runat="server" DataKeyNames="UID,PartCode,Month,MonthQty1,MonthQty2,MonthQty3,State,CreateUser,CreateTime" |
|||
IsDatabasePaging="true" AllowPaging="true" SortField="PartCode" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_FORECAST_PageIndexChange" |
|||
AutoScroll="True" EnableRowDoubleClickEvent="True"> |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField runat="server" HeaderText="UID" Hidden="true" ColumnID="" DataField="UID" /> |
|||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|||
<f:BoundField runat="server" HeaderText="订单" ColumnID="" DataField="PoType" /> |
|||
<f:BoundField runat="server" HeaderText="供应商编号" ColumnID="" DataField="VendId" /> |
|||
<f:BoundField runat="server" HeaderText="零件编号" ColumnID="" DataField="PartCode" /> |
|||
<f:BoundField runat="server" HeaderText="图号" ColumnID="" DataField="PoLine" /> |
|||
<f:BoundField runat="server" HeaderText="规格" ColumnID="" DataField="Specifications" /> |
|||
<f:BoundField runat="server" HeaderText="单位" ColumnID="" DataField="Unit" /> |
|||
<f:BoundField runat="server" HeaderText="当次订单数量" DataFormatString="{0:F0}" ColumnID="" DataField="Qty" /> |
|||
<f:BoundField runat="server" HeaderText="产品状态" ColumnID="" DataField="ProductStatus" /> |
|||
<f:BoundField runat="server" HeaderText="紧急" ColumnID="" DataField="IsUrgent" /> |
|||
<f:BoundField Width="100px" DataField="ShippdedTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="要求到货日期" /> |
|||
<f:BoundField runat="server" HeaderText="到货地" ColumnID="" DataField="ShippdedPlace" /> |
|||
<f:BoundField runat="server" HeaderText="当月" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty" /> |
|||
<f:BoundField runat="server" HeaderText="N+1" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty1" /> |
|||
<f:BoundField runat="server" HeaderText="N+2" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty2" /> |
|||
<f:BoundField runat="server" HeaderText="N+3" DataFormatString="{0:F0}" ColumnID="" DataField="MonthQty3" /> |
|||
<f:BoundField runat="server" HeaderText="是否按期交货" ColumnID="" DataField="Ontime" /> |
|||
<f:BoundField runat="server" HeaderText="不能按期交付日期" ColumnID="" DataField="Datetime" /> |
|||
<f:BoundField runat="server" HeaderText="状态" Hidden="true" ColumnID="" DataField="State" /> |
|||
<f:BoundField runat="server" HeaderText="创建者" ColumnID="" DataField="CreateUser" /> |
|||
<f:BoundField Width="100px" DataField="CreateTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="创建日期" /> |
|||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,240 @@ |
|||
using CK.SCP.Controller; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Models.ScpEntity.ExcelExportEnttity; |
|||
using CK.SCP.Utils; |
|||
using FineUI; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.Enums; |
|||
|
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
public partial class SCP_FORECAST : PageBase |
|||
{ |
|||
/// <summary>
|
|||
/// 页面加载
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
LoadData(); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 加载数据
|
|||
/// </summary>
|
|||
public void LoadData() |
|||
{ |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 数据绑定
|
|||
/// </summary>
|
|||
public void BindData() |
|||
{ |
|||
SearchV_TB_FORECAST_Data((result) => |
|||
{ |
|||
Grid_V_TB_FORECAST.RecordCount = result.Count(); |
|||
var list = SortAndPage<V_TB_FORECAST>(result, Grid_V_TB_FORECAST); |
|||
Grid_V_TB_FORECAST.DataSource = list; |
|||
Grid_V_TB_FORECAST.DataBind(); |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 获取数据
|
|||
/// </summary>
|
|||
/// <param name="p_action"></param>
|
|||
public void SearchV_TB_FORECAST_Data(Action<IQueryable<V_TB_FORECAST>> p_action) |
|||
{ |
|||
V_TB_FORECAST _entity = new V_TB_FORECAST(); |
|||
_entity.IsDeleted = false; |
|||
if (!string.IsNullOrEmpty(TextPartCode.Text)) |
|||
{ |
|||
_entity.PartCode = TextPartCode.Text; |
|||
} |
|||
if (!string.IsNullOrEmpty(TextVendId.Text)) |
|||
{ |
|||
_entity.VendId = TextVendId.Text; |
|||
} |
|||
//if (ddl_Day.SelectedValue != "0")
|
|||
//{
|
|||
// _entity.Month = ddl_Day.SelectedValue;
|
|||
//}
|
|||
_entity.UserInAddress = CurrentUser.FactoryList; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
|||
{ |
|||
_entity.BillStateList = new List<int>() { int.Parse(DDL_State.SelectedValue) }; |
|||
} |
|||
SCP_FORECAST_CONTROLLER.Get_V_TB_FORECAST_List(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 查询
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
protected void Grid_V_TB_FORECAST_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
Grid_V_TB_FORECAST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindData(); |
|||
} |
|||
/// <summary>
|
|||
/// 导入
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnInput_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
string _fileName = FileUp.FileName; |
|||
if (string.IsNullOrEmpty(_fileName)) |
|||
{ |
|||
Alert.Show("选择文件为空!"); |
|||
return; |
|||
} |
|||
string _lx = _fileName.Split('.')[1]; |
|||
Stream _stream = FileUp.PostedFile.InputStream; |
|||
DataTable _dt = new DataTable(); |
|||
if (_lx == "xls") |
|||
{ |
|||
_dt = ExcelHelper.GetDataTable(_stream); |
|||
} |
|||
else |
|||
{ |
|||
_dt = ExcelHelper.GetDataTableOfXlsx(_stream); |
|||
} |
|||
var list = ConvertHelper.ToList<SCP_FORECAST_EXPORT>(ExcelHelper.RemoveEmpty(_dt)).ToList(); |
|||
var ret = SCP_FORECAST_CONTROLLER.EXCEL_FORECAST_MOD(list, CurrentUser.Name, CurrentUser.FactoryList[0]); |
|||
if (ret.State == ReturnStatus.Succeed && ret.Result == true) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(string.Join("<br>", ret.MessageList)); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Alert.Show(ex.Message); |
|||
} |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 确认数据
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSave_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray; |
|||
List<long> _UidList = new List<long>(); |
|||
for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++) |
|||
{ |
|||
if (_selections.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i]; |
|||
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
|||
{ |
|||
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
|||
} |
|||
} |
|||
} |
|||
var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Confirm); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 删除数据
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnDelete_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray; |
|||
List<long> _UidList = new List<long>(); |
|||
for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++) |
|||
{ |
|||
if (_selections.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i]; |
|||
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
|||
{ |
|||
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
|||
} |
|||
} |
|||
} |
|||
var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.Reject); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 取消确认
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void BtnCancleSave_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] _selections = Grid_V_TB_FORECAST.SelectedRowIndexArray; |
|||
List<long> _UidList = new List<long>(); |
|||
for (int i = 0, count = Grid_V_TB_FORECAST.Rows.Count; i < count; i++) |
|||
{ |
|||
if (_selections.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_FORECAST.DataKeys[i]; |
|||
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
|||
{ |
|||
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
|||
} |
|||
} |
|||
} |
|||
var ret = SCP_FORECAST_CONTROLLER.Save_TB_FORECAST_STATE(_UidList, CurrentUser.Name, ForecastState.New); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
BindData(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,197 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_FORECAST |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// btnRefresh 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnRefresh; |
|||
|
|||
/// <summary>
|
|||
/// btnSave 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnSave; |
|||
|
|||
/// <summary>
|
|||
/// btnCancleSave 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnCancleSave; |
|||
|
|||
/// <summary>
|
|||
/// btnDelete 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnDelete; |
|||
|
|||
/// <summary>
|
|||
/// FileUp 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FileUpload FileUp; |
|||
|
|||
/// <summary>
|
|||
/// btnInput 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnInput; |
|||
|
|||
/// <summary>
|
|||
/// extForm1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Form extForm1; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_2; |
|||
|
|||
/// <summary>
|
|||
/// TextPartCode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextPartCode; |
|||
|
|||
/// <summary>
|
|||
/// TextVendId 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TextVendId; |
|||
|
|||
/// <summary>
|
|||
/// DDL_State 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList DDL_State; |
|||
|
|||
/// <summary>
|
|||
/// Button1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button Button1; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_FORECAST 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_FORECAST; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_STOCK_DETAIL.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_STOCK_DETAIL" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<f:Label ID="Label2" LabelWidth="60px" runat="server" Label="零件号"> |
|||
</f:Label> |
|||
<f:TextBox ID="txtPartcode" runat="server" Label="" Text=""> |
|||
</f:TextBox> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Label ID="Label3" runat="server" Label="时间" > |
|||
</f:Label> |
|||
|
|||
<f:DatePicker ID="DatePicker1" runat="server" > |
|||
</f:DatePicker> |
|||
<f:Label ID="Label1" runat="server" Label="-" Text="-" ShowLabel="false"> |
|||
</f:Label> |
|||
<f:DatePicker ID="DatePicker2" runat="server" > |
|||
</f:DatePicker> |
|||
<f:Button ID="btnSearch" runat="server" Text="查找" OnClick="btnSearch_Click" Icon="SystemSearch"> |
|||
</f:Button> |
|||
<f:Button ID="Button1" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
<f:Grid ID="Grid1" runat="server" EnableCheckBoxSelect="false" Title="" ShowHeader="False" SortField="LogTime" BoxFlex="1" |
|||
AllowPaging="true" PageSize="100" IsDatabasePaging="true" OnPageIndexChange="Grid1_PageIndexChange" |
|||
ShowBorder="False" AllowSorting="true" DataKeyNames="PartCode,status,VendId,qty,LogTime"> |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
<f:ListItem Text="1000" Value="1000" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField SortField="status" DataField="status" Width="250px" HeaderText="类别" ColumnID="status" /> |
|||
<f:BoundField SortField="PartCode" DataField="PartCode" Width="250px" HeaderText="零件号" ColumnID="PartCode" /> |
|||
<f:BoundField SortField="LogTime" DataField="LogTime" DataFormatString = "{0:yyyy-MM-dd}" Width="250px" HeaderText="LogTime" ColumnID="LogTime" /> |
|||
<f:BoundField SortField="VendId" DataField="VendId" HeaderText="供应商编号" Width="250px" ColumnID="VendId" /> |
|||
<f:BoundField SortField="qty" DataField="qty" HeaderText="库存数量" Width="250px" ColumnID="qty" DataFormatString="{0:#.####}" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window ID="Window1" runat="server" Hidden="True" |
|||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|||
IFrameUrl="about:blank" Height="400px" Width="700px"> |
|||
</f:Window> |
|||
<script type="text/javascript"> |
|||
</script> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,116 @@ |
|||
using ChangKeTec.Wms.Models.Wms; |
|||
using CK.SCP.Controller; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
public partial class SCP_STOCK_DETAIL : PageBase |
|||
{ |
|||
/// <summary>
|
|||
/// 页面加载
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 数据绑定
|
|||
/// </summary>
|
|||
public void BindDetail() |
|||
{ |
|||
SearchV_TB_ASN_DETAILData((ret) => |
|||
{ |
|||
Grid1.RecordCount = ret.Count(); |
|||
|
|||
var list = SortAndPage<VIEW_STOCK_QTY>(ret, Grid1); |
|||
Grid1.DataSource = list; |
|||
Grid1.DataBind(); |
|||
}); |
|||
} |
|||
/// <summary>
|
|||
/// 获取数据
|
|||
/// </summary>
|
|||
/// <param name="p_action"></param>
|
|||
public void SearchV_TB_ASN_DETAILData(Action<IQueryable<VIEW_STOCK_QTY>> p_action) |
|||
{ |
|||
VIEW_STOCK_QTY _entity = new VIEW_STOCK_QTY(); |
|||
_entity.PartCode = txtPartcode.Text; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
if (DatePicker1.SelectedDate != null) |
|||
{ |
|||
_entity.BeginTime = DatePicker1.SelectedDate; |
|||
} |
|||
if (DatePicker2.SelectedDate != null) |
|||
{ |
|||
_entity.EndTime = DatePicker2.SelectedDate; |
|||
} |
|||
SCP_WMS_CONTROLLER.Get_VIEW_STOCK_DETAIL(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 查询
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindDetail(); |
|||
} |
|||
protected void Grid1_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
/// <summary>
|
|||
/// 导出
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnOutput_Click(object sender, EventArgs e) |
|||
{ |
|||
List<VIEW_STOCK_QTY> _ls = new List<VIEW_STOCK_QTY>(); |
|||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|||
{ |
|||
VIEW_STOCK_QTY inv = new VIEW_STOCK_QTY(); |
|||
|
|||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|||
inv.status = rowDataKeys[1].ToString();//类型
|
|||
inv.PartCode = rowDataKeys[0].ToString();//零件号
|
|||
inv.LogTime =Convert.ToDateTime( rowDataKeys[4]);//零件名称
|
|||
inv.VendId = rowDataKeys[2].ToString();//供应商编码
|
|||
if (rowDataKeys[3] != null) |
|||
{ |
|||
inv.qty = decimal.Parse(rowDataKeys[4].ToString());//数量
|
|||
} |
|||
_ls.Add(inv); |
|||
} |
|||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|||
{ |
|||
{ "status", "类别" }, |
|||
{ "PartCode", "零件号" }, |
|||
{ "LogTime", "LogTime" }, |
|||
{ "VendId", "供应商编号" }, |
|||
{ "qty", "库存数量" } |
|||
}; |
|||
string url = EntityListToExcel2003(cellheader, _ls, "库存明细"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,179 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_STOCK_DETAIL |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// PageManager1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.PageManager PageManager1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar2; |
|||
|
|||
/// <summary>
|
|||
/// Label2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Label Label2; |
|||
|
|||
/// <summary>
|
|||
/// txtPartcode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox txtPartcode; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|||
|
|||
/// <summary>
|
|||
/// Label3 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Label Label3; |
|||
|
|||
/// <summary>
|
|||
/// DatePicker1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker DatePicker1; |
|||
|
|||
/// <summary>
|
|||
/// Label1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Label Label1; |
|||
|
|||
/// <summary>
|
|||
/// DatePicker2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker DatePicker2; |
|||
|
|||
/// <summary>
|
|||
/// btnSearch 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnSearch; |
|||
|
|||
/// <summary>
|
|||
/// Button1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button Button1; |
|||
|
|||
/// <summary>
|
|||
/// Grid1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
|
|||
/// <summary>
|
|||
/// Window1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window Window1; |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_UNPAID.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_UNPAID" %> |
|||
|
|||
<!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="form2" runat="server"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<%-- <f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:Button ID="BtnOutPut" runat="server" EnablePostBack="True" Text="导出" Icon="Add" OnClick="BtnOutPut_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnDetail" runat="server" EnablePostBack="True" Text="明细" Icon="Add" OnClick="btnDetail_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnNew" runat="server" EnablePostBack="True" Text="新建发货单" Icon="Add" OnClick="btnNew_Click"> |
|||
</f:Button> |
|||
|
|||
<f:Button ID="btnShow" runat="server" Icon="Add" Text="显示查询面板" OnClick="btnShow_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnPallet" runat="server" Icon="Add" Text="创建托盘" OnClick="btnPallet_Click" > |
|||
</f:Button> |
|||
<f:Button ID="btnPalletDetail" runat="server" Icon="Add" Text="查看托盘" OnClick="btnPalletDetail_Click" > |
|||
</f:Button>--%> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
|
|||
|
|||
|
|||
<f:Grid ID="Grid1" runat="server"> |
|||
</f:Grid> |
|||
<f:Grid ID="Grid2" runat="server"> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window runat="server" ID="Window1" Hidden="True" |
|||
WindowPosition="Center" IsModal="true" Title="发货明细" Target="Parent" EnableIFrame="true" CloseAction="HidePostBack" |
|||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" /> |
|||
</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 SCP.Views.SupplierData |
|||
{ |
|||
public partial class SCP_UNPAID : System.Web.UI.Page |
|||
{ |
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.SupplierData { |
|||
|
|||
|
|||
public partial class SCP_UNPAID { |
|||
|
|||
/// <summary>
|
|||
/// form2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form2; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar2; |
|||
|
|||
/// <summary>
|
|||
/// Grid1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid1; |
|||
|
|||
/// <summary>
|
|||
/// Grid2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid2; |
|||
|
|||
/// <summary>
|
|||
/// Window1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window Window1; |
|||
} |
|||
} |
@ -0,0 +1,132 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN.aspx.cs" Inherits="SCP.锦州锦恒.SupplierData.SCP_ASN" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:Button ID="BtnOutPut" runat="server" EnablePostBack="True" Text="导出" Icon="Add" OnClick="BtnOutPut_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnDetail" runat="server" EnablePostBack="True" Text="明细" Icon="Add" OnClick="btnDetail_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnNew" runat="server" EnablePostBack="True" Text="新建发货单" Icon="Add" OnClick="btnNew_Click"> |
|||
</f:Button> |
|||
<%--<f:Button ID="btnDelete" runat="server" EnablePostBack="True" Text="删除" Icon="Add" OnClick="btnDelete_Click" Hidden="True"> |
|||
</f:Button>--%> |
|||
<f:Button ID="btnShow" runat="server" Icon="Add" Text="显示查询面板" OnClick="btnShow_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnPallet" runat="server" Icon="Add" Text="创建托盘" OnClick="btnPallet_Click" > |
|||
</f:Button> |
|||
<f:Button ID="btnPalletDetail" runat="server" Icon="Add" Text="查看托盘" OnClick="btnPalletDetail_Click" > |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Rows> |
|||
<f:FormRow runat="server" ID="FormRow_1" Hidden="true"> |
|||
<Items> |
|||
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
|||
<f:ListItem Text="-" Value=""/> |
|||
<f:ListItem Text="新建" Value="0" /> |
|||
<f:ListItem Text="已发货" Value="1" /> |
|||
<f:ListItem Text="已收货" Value="2" /> |
|||
<f:ListItem Text="已作废" Value="-1" /> |
|||
</f:DropDownList> |
|||
</Items> |
|||
</f:FormRow> |
|||
<f:FormRow runat="server" ID="FormRow_2"> |
|||
<Items> |
|||
|
|||
<f:TextBox ID="txtBill" runat="server" Label="发货单号"/> |
|||
<f:TextBox ID="TXT_VenderName" runat="server" Label="供应商"/> |
|||
<f:TextBox ID="TXT_ASK" runat="server" Label="看板编号" /> |
|||
<f:TextBox ID="txtPO" runat="server" Label="订单编号" /> |
|||
<f:TextBox ID="TXT_SubSite" runat="server" Label="子网站" Hidden="true" /> |
|||
<f:TextBox ID="TXT_Extend1" runat="server" Label="子网站" Hidden="true" /> |
|||
<f:TextBox ID="TXT_Extend2" runat="server" Label="子网站" Hidden="true" /> |
|||
<f:TextBox ID="TXT_Extend3" runat="server" Label="子网站" Hidden="true" /> |
|||
</Items> |
|||
</f:FormRow> |
|||
<f:FormRow runat="server" ID="FormRow_3" Hidden="true"> |
|||
<Items> |
|||
<f:Label runat="server" Label="发往地点" /> |
|||
<f:TextBox ID="txtShipTosite" runat="server" /> |
|||
<f:DatePicker ID="dateShip" runat="server" Required="True" Label="发货时间" /> |
|||
<f:Label runat="server" Label="发货时间" /> |
|||
<f:DatePicker ID="dateReceive" runat="server" Required="true" /> |
|||
</Items> |
|||
</f:FormRow> |
|||
<f:FormRow runat="server" ID="FormRow_4"> |
|||
<Items> |
|||
<f:Button runat="server" Text="关闭" ID="btnClose" OnClick="btnClose_Click"></f:Button> |
|||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:FormRow> |
|||
</Rows> |
|||
</f:Form> |
|||
</Items> |
|||
</f:GroupPanel> |
|||
|
|||
|
|||
<f:Grid ID="Grid_V_TB_ASN" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|||
runat="server" DataKeyNames="UID,AsnBillNum,AskBillNum,PoBillNum,VendId,State,Remark,ShipTime,ShipUser,ReceiveTime,ReceiveUser,ErpBillNum,ModType,Contacter,Buyer,BuyerPhone,VendName,Site,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID" |
|||
IsDatabasePaging="true" AllowPaging="true" SortDirection="DESC" SortField="ShipTime" |
|||
AutoScroll="True" EnableRowDoubleClickEvent="True" OnRowDoubleClick="Grid_V_TB_ASN_RowDoubleClick" OnPageIndexChange="Grid_V_TB_ASN_PageIndexChange"> |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
<f:ListItem Text="20" Value="10" /> |
|||
<f:ListItem Text="40" Value="40" /> |
|||
<f:ListItem Text="80" Value="80" /> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
|
|||
</f:DropDownList> |
|||
</PageItems> |
|||
|
|||
<Columns> |
|||
<f:BoundField Width = "100px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" /> |
|||
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
|||
<f:BoundField runat="server" HeaderText="要货单号" ColumnID="" DataField="AskBillNum" /> |
|||
<f:BoundField runat="server" HeaderText="车牌号" ColumnID="" DataField="PlateNumber" Hidden="false"></f:BoundField> |
|||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|||
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
|||
<f:BoundField Width = "100px" DataField = "ShipTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "发货时间" Hidden="true" /> |
|||
<f:BoundField Width = "100px" DataField = "ShipUser" DataFormatString = "{0}" HeaderText = "发货人" /> |
|||
<f:BoundField Width = "100px" DataField = "ReceiveTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "收货时间" Hidden="true" /> |
|||
<f:BoundField Width = "100px" DataField = "ReceiveUser" DataFormatString = "{0}" HeaderText = "收货人" /> |
|||
<f:BoundField runat="server" HeaderText="发往地点" ColumnID="" DataField="Site_Desc" /> |
|||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" Hidden="true" /> |
|||
|
|||
|
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window runat="server" ID="Window1" Hidden="True" |
|||
WindowPosition="Center" IsModal="true" Title="发货明细" Target="Parent" EnableIFrame="true" CloseAction="HidePostBack" |
|||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" /> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,168 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Controller; |
|||
using FineUI; |
|||
using System.Data; |
|||
|
|||
namespace SCP.锦州锦恒.SupplierData |
|||
{ |
|||
public partial class SCP_ASN : PageBase |
|||
{ |
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
LoadData(); |
|||
TranslatorAgents(Toolbar2); |
|||
TranslatorAgent(Grid_V_TB_ASN); |
|||
TranslatorAgents(FormRow_1); |
|||
TranslatorAgents(FormRow_2); |
|||
TranslatorAgents(FormRow_3); |
|||
TranslatorAgents(FormRow_4); |
|||
} |
|||
} |
|||
public void LoadData() |
|||
{ |
|||
//if (!CurrentUser.RoleList.Contains("供应商"))
|
|||
//{
|
|||
// Alert.Show("当前用户角色不能操作模块!");
|
|||
// return;
|
|||
//}
|
|||
if (CurrentUser.VenderList.Count == 0 && CurrentUser.Name!="admin") |
|||
{ |
|||
Alert.Show("当前用户未分配供应商!"); |
|||
return; |
|||
} |
|||
BindASN(); |
|||
} |
|||
|
|||
public void BindASN() |
|||
{ |
|||
SearchV_TB_ASN((result) => { |
|||
Grid_V_TB_ASN.RecordCount = result.Count(); |
|||
var list = SortAndPage<V_TB_ASN>(result, Grid_V_TB_ASN); |
|||
Grid_V_TB_ASN.DataSource = list; |
|||
Grid_V_TB_ASN.DataBind(); |
|||
}); |
|||
} |
|||
public void SearchV_TB_ASN(Action<IQueryable<V_TB_ASN>> p_action) |
|||
{ |
|||
V_TB_ASN _entity = new V_TB_ASN(); |
|||
_entity.IsDeleted = false; |
|||
_entity.VendId = TXT_VenderName.Text; |
|||
_entity.PoBillNum = this.txtPO.Text; |
|||
_entity.AsnBillNum = txtBill.Text; |
|||
_entity.AskBillNum = TXT_ASK.Text; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
_entity.UserInAddress = CurrentUser.FactoryList; |
|||
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => { |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
protected void Grid_V_TB_ASN_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
|||
{ |
|||
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[e.RowIndex]; |
|||
string AsnBillNum = rowDataKeys[1] as string; |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); |
|||
} |
|||
|
|||
protected void BtnOutPut_Click(object sender, EventArgs e) |
|||
{ |
|||
List<string> _ls = new List<string>(); |
|||
SearchV_TB_ASN(rs => { |
|||
_ls=rs.Select(p => p.AsnBillNum).ToList(); |
|||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_ASN_EXECEL(_ls); |
|||
PageBase.DataSetToExcel(ds, "发货单"); |
|||
|
|||
}); |
|||
|
|||
//for (int i = 0, count = Grid_V_TB_ASN.Rows.Count; i < count; i++)
|
|||
//{
|
|||
// object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[i];
|
|||
// _ls.Add(rowDataKeys[1] as string);
|
|||
//}
|
|||
|
|||
} |
|||
|
|||
protected void btnDetail_Click(object sender, EventArgs e) |
|||
{ |
|||
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
|||
return; |
|||
} |
|||
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
|||
string AsnBillNum = rowDataKeys[1] as string; |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); |
|||
} |
|||
protected void btnShow_Click(object sender, EventArgs e) |
|||
{ |
|||
gp1.Hidden = false; |
|||
} |
|||
protected void btnClose_Click(object sender, EventArgs e) |
|||
{ |
|||
gp1.Hidden = true; |
|||
} |
|||
protected void BtnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindASN(); |
|||
} |
|||
protected void Grid_V_TB_ASN_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
BindASN(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_V_TB_ASN.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
BindASN(); |
|||
} |
|||
protected void BtnOutPut_Click1(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
protected void btnNew_Click(object sender, EventArgs e) |
|||
{ |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference("../../SupplierData/SCP_ASK.aspx")); |
|||
} |
|||
|
|||
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
|||
{ |
|||
BindASN(); |
|||
} |
|||
|
|||
protected void btnPallet_Click(object sender, EventArgs e) |
|||
{ |
|||
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0 ) |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
|||
return; |
|||
} |
|||
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
|||
string AsnBillNum = rowDataKeys[1] as string; |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../../SupplierData/SCP_PALLET_CREATE.aspx?AsnBillNum={0}", AsnBillNum))); |
|||
|
|||
} |
|||
|
|||
protected void btnPalletDetail_Click(object sender, EventArgs e) |
|||
{ |
|||
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
|||
return; |
|||
} |
|||
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
|||
string AsnBillNum = rowDataKeys[1] as string; |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../../SupplierData/SCP_PALLET.aspx?AsnBillNum={0}", AsnBillNum))); |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,287 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.锦州锦恒.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_ASN |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar2; |
|||
|
|||
/// <summary>
|
|||
/// Button1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button Button1; |
|||
|
|||
/// <summary>
|
|||
/// BtnOutPut 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnOutPut; |
|||
|
|||
/// <summary>
|
|||
/// btnDetail 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnDetail; |
|||
|
|||
/// <summary>
|
|||
/// btnNew 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnNew; |
|||
|
|||
/// <summary>
|
|||
/// btnShow 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnShow; |
|||
|
|||
/// <summary>
|
|||
/// btnPallet 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnPallet; |
|||
|
|||
/// <summary>
|
|||
/// btnPalletDetail 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnPalletDetail; |
|||
|
|||
/// <summary>
|
|||
/// gp1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.GroupPanel gp1; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_1; |
|||
|
|||
/// <summary>
|
|||
/// ddl 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddl; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_2; |
|||
|
|||
/// <summary>
|
|||
/// txtBill 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox txtBill; |
|||
|
|||
/// <summary>
|
|||
/// TXT_VenderName 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_VenderName; |
|||
|
|||
/// <summary>
|
|||
/// TXT_ASK 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_ASK; |
|||
|
|||
/// <summary>
|
|||
/// txtPO 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox txtPO; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_3 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_3; |
|||
|
|||
/// <summary>
|
|||
/// txtShipTosite 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox txtShipTosite; |
|||
|
|||
/// <summary>
|
|||
/// dateShip 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker dateShip; |
|||
|
|||
/// <summary>
|
|||
/// dateReceive 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker dateReceive; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_4 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_4; |
|||
|
|||
/// <summary>
|
|||
/// btnClose 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnClose; |
|||
|
|||
/// <summary>
|
|||
/// BtnSearch 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnSearch; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_ASN 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_ASN; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
|
|||
/// <summary>
|
|||
/// Window1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window Window1; |
|||
} |
|||
} |
@ -0,0 +1,184 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN_DETAIL.aspx.cs" Inherits="SCP.锦州锦恒.SupplierData.SCP_ASN_DETAIL" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<f:Button ID="btnRefresh" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:Button ID="btnSend" runat="server" EnablePostBack="True" Text="确认发货" Icon="Car" OnClick="btnSend_Click" OnClientClick="send();if(!confirm('是否要发货?一旦发货,就将不能删除和修改此发货单!'))return false;"> |
|||
</f:Button> |
|||
<f:Button ID="btnPrint" runat="server" EnablePostBack="true" Text="打印发货单" Icon="Printer" OnClick="btnPrint_Click"> |
|||
</f:Button> |
|||
<f:Button ID="btnPackage" runat="server" EnablePostBack="true" Text="修改发货单" Icon="CupEdit" OnClick="btnPackage_Click" Hidden="true" OnClientClick="if(!confirm('是否要作废?新建状态作废,数量批次填写错误可以作废,如果作废单据再用之前送货单发货,一律按退货处理!'))return false;"/> |
|||
<f:Button ID="btnCancel" runat="server" EnablePostBack="true" Text="作废发货单" Icon="Printer" OnClick="btnCancel_Click" OnClientClick="if(!confirm('是否要作废?新建状态作废,数量批次填写错误可以作废,如果作废单据再用之前送货单发货,一律按退货处理!'))return false;"/> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
<Items> |
|||
<f:Form runat="server" Title=""> |
|||
<Items> |
|||
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1"> |
|||
<Items> |
|||
|
|||
<f:TextBox runat = "server" Label = "单据状态" EmptyText = "" ID = "TXT_StateDesc" /> |
|||
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_AsnBillNum" /> |
|||
<f:TextBox runat = "server" Label = "供应商" EmptyText = "" ID = "TXT_VendName" /> |
|||
<f:TextBox runat = "server" Label = "收货地点" EmptyText = "" ID = "TXT_Site" /> |
|||
|
|||
</Items> |
|||
</f:FormRow> |
|||
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2"> |
|||
<Items> |
|||
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="发货日期" EmptyText="请选择日期" ID="DP_ShipTime" /> |
|||
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" /> |
|||
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" /> |
|||
<f:TextBox runat = "server" Label = "收货人" EmptyText = "" ID = "TXT_ReceiveUser" /> |
|||
</Items> |
|||
</f:FormRow> |
|||
<f:FormRow runat="server" ID="FormRow_3"> |
|||
<Items> |
|||
<f:TextBox runat = "server" Label = "车牌号" EmptyText = "" ID = "TXT_PlateNumber" /> |
|||
<f:TextBox runat = "server" Label = "备注" EmptyText = "" ID = "TXT_Remark" /> |
|||
</Items> |
|||
</f:FormRow> |
|||
</Items> |
|||
</f:Form> |
|||
<f:Toolbar runat="server"> |
|||
<Items> |
|||
<f:Toolbar runat="server" ID="Toolbar1"> |
|||
<Items> |
|||
<%-- <f:Button runat="server" ID="btnEdit" Text="修改" Icon="ApplicationEdit" OnClick="btnEdit_Click"></f:Button> |
|||
<f:Button runat="server" ID="btnDel" Text="删除" Icon="ApplicationDelete" OnClick="btnDel_OnClick"></f:Button>--%> |
|||
<f:Button runat="server" ID="btnCreateBarCode" Text="创建条码" Icon="Printer" OnClick="CreateBarCode_Click"></f:Button> |
|||
<f:Button runat="server" ID="btnSelectedBarCode" Text="打印全部条码" EnablePostBack="true" Icon="Printer" OnClick="btnSelectedBarCode_Click"></f:Button> |
|||
<f:Button runat="server" ID="btnOutputPallet" Text="导出或打印托盘" Icon="Printer" OnClick="btnOutputPallet_Click" Hidden="true"></f:Button> |
|||
<f:Button runat="server" ID="btnBarCodeList" Text="显示条码列表" Icon="Layers" OnClick="btnBarCodeList_Click"></f:Button> |
|||
<f:Button runat="server" ID="btnOutPut" Text="导出明细" Icon="PageExcel" OnClick="btnOutput_Click"></f:Button> |
|||
<f:TextBox runat = "server" Label = "模板规格" EmptyText = "" ID = "TXT_MarkType" Readonly="true" /> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Items> |
|||
</f:Toolbar> |
|||
<f:Grid ID="Grid_V_TB_ASN_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="500" BoxFlex="1" CssClass="maingrid" |
|||
runat="server" DataKeyNames="UID,PoBillNum,PoLine,PartCode,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AsnBillNum,Qty,VendBatch,ProduceDate,Batch,VendId,AskBillNum,CanQty,Guid,ReceivedPort" |
|||
IsDatabasePaging="True" AllowPaging="True" |
|||
EnableRowSelectEvent="True" AutoScroll="True" |
|||
SortField="PartCode" SortDirection="DESC" |
|||
OnPageIndexChange="Grid_V_TB_ASN_DETAIL_PageIndexChange" |
|||
> |
|||
<PageItems> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
|||
</f:ToolbarText> |
|||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|||
runat="server"> |
|||
|
|||
<f:ListItem Text="1000" Value="1000" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
|
|||
<f:BoundField Width = "80px" DataField = "AsnBillNum" DataFormatString = "{0}" HeaderText = "发货单号" /> |
|||
|
|||
<%-- <f:TemplateField HeaderText="标包数量" Width="80px"> |
|||
<ItemTemplate> |
|||
<asp:TextBox ID="TXT_PackQty" runat="server" Width="60px" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" |
|||
Text='<%# Eval("PackQty") %>' MaxLength="6"></asp:TextBox> |
|||
</ItemTemplate> |
|||
</f:TemplateField> |
|||
<f:TemplateField HeaderText="发货数量" Width="80px"> |
|||
<ItemTemplate> |
|||
<asp:TextBox ID="TXT_Qty" runat="server" Width="60px" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" |
|||
Text='<%# Eval("Qty") %>' MaxLength="6"></asp:TextBox> |
|||
</ItemTemplate> |
|||
</f:TemplateField> --%> |
|||
<f:BoundField Width = "100px" DataField = "PackQty" DataFormatString = "{0:F}" HeaderText = "标包数量" /> |
|||
<f:BoundField Width = "100px" DataField = "Qty" DataFormatString = "{0:F}" HeaderText = "发货数量" /> |
|||
<f:BoundField Width = "100px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编号" /> |
|||
<f:BoundField Width = "100px" DataField = "VendPartCode" DataFormatString = "{0}" HeaderText = "供应商零件编号" /> |
|||
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" /> |
|||
|
|||
<f:BoundField Width = "50px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" /> |
|||
<%--<f:BoundField Width = "100px" DataField = "Site" DataFormatString = "{0}" HeaderText = "收货地点" />--%> |
|||
<f:BoundField Width = "100px" DataField = "Batch" DataFormatString = "{0}" HeaderText = "批次" /> |
|||
<f:BoundField Width = "100px" DataField = "VendBatch" DataFormatString = "{0}" HeaderText = "供应商批次" /> |
|||
<f:BoundField Width = "100px" DataField = "ProduceDate" DataFormatString = "{0}" HeaderText = "生产日期" /> |
|||
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0}" HeaderText = "到货截至日期" /> |
|||
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" HeaderText = "单位" /> |
|||
<f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> |
|||
<%-- <f:TemplateField HeaderText="供应商批次" Width="110px"> |
|||
<ItemTemplate> |
|||
<asp:TextBox ID="TXT_VenBatch" runat="server" Width="100px" |
|||
Text='<%# Eval("VendBatch") %>' MaxLength="20"></asp:TextBox> |
|||
</ItemTemplate> |
|||
</f:TemplateField> |
|||
|
|||
|
|||
<f:TemplateField HeaderText="生产日期" Width="110px"> |
|||
<ItemTemplate> |
|||
<asp:TextBox ID="TXT_ProduceDate" runat="server" Width="100px" |
|||
Text='<%# Eval("ProduceDate") %>' MaxLength="30"></asp:TextBox> |
|||
</ItemTemplate> |
|||
</f:TemplateField>--%> |
|||
|
|||
<f:BoundField Width = "100px" DataField = "State" DataFormatString = "{0}" HeaderText = "" Hidden="true" /> |
|||
<f:BoundField SortField="ReceivedPort" DataField="ReceivedPort" HeaderText="收货口" ColumnID="ReceivedPort_Desc" /> |
|||
<f:BoundField Width = "100px" DataField = "Remark" DataFormatString = "{0}" HeaderText = "备注" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window runat="server" ID="Window1" Hidden="True" |
|||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|||
IFrameUrl="about:blank" Height="500px" Width="900px" /> |
|||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|||
WindowPosition="Center" IsModal="true" Title="选择标签规格" Target="Self" EnableIFrame="true" |
|||
IFrameUrl="about:blank" Height="200px" Width="400px" OnClose="WindowUpload1_Close"> |
|||
</f:Window> |
|||
</form> |
|||
<script> |
|||
var _btnSend = '<%= btnSend.ClientID %>'; |
|||
function update(num) { |
|||
var secs = 60 * 5; |
|||
if (num == secs) { |
|||
$("#"+_btnSend).val("发货"); |
|||
$("#"+_btnSend).attr("disabled", false); |
|||
} |
|||
else { |
|||
printnr = secs - num; |
|||
$("#" + _btnSend).val("发货中" + printnr + "秒"); |
|||
$("#" + _btnSend).attr("disabled", true); |
|||
} |
|||
alert('3434'); |
|||
} |
|||
function send() |
|||
{ |
|||
|
|||
for (i = 1; i <= 60 * 5; i++) { |
|||
window.setTimeout("update( " + i + ") ", i * 1000); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
</script> |
|||
|
|||
|
|||
</body> |
|||
</html> |
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,561 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Controller; |
|||
using System.Data; |
|||
using CK.SCP.Models.Enums; |
|||
using FineUI; |
|||
using CK.SCP.Utils; |
|||
using System.Data.Entity.Migrations; |
|||
|
|||
namespace SCP.锦州锦恒.SupplierData |
|||
{ |
|||
public partial class SCP_ASN_DETAIL : PageBase |
|||
{ |
|||
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
GetV_TB_ASNData(); |
|||
BindDetail(); |
|||
SetRoleRule(); |
|||
TranslatorAgents(Toolbar2); |
|||
TranslatorAgents(Toolbar1); |
|||
TranslatorAgent(Grid_V_TB_ASN_DETAIL); |
|||
TranslatorAgents(FormRow_1); |
|||
TranslatorAgents(FormRow_2); |
|||
TranslatorAgents(FormRow_3); |
|||
string openUrl = string.Format("SCP_SELECT_MAKE.aspx?select=<script>encodeURIComponent({0})</script>", TXT_MarkType.GetValueReference()); |
|||
btnSelectedBarCode.OnClientClick = WindowUpload.GetSaveStateReference(TXT_MarkType.ClientID) + WindowUpload.GetShowReference(openUrl); |
|||
} |
|||
} |
|||
private void SetRoleRule() |
|||
{ |
|||
IsPriceVisible(Grid_V_TB_ASN_DETAIL, "价格"); |
|||
} |
|||
|
|||
public void SearchV_TB_ASN_DETAILData(Action<IQueryable<V_TB_ASN_DETAIL>> p_action) |
|||
{ |
|||
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
|||
_entity.AsnBillNum= Request["AsnBillNum"]; |
|||
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => { |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
|
|||
} |
|||
public void GetV_TB_ASNData() |
|||
{ |
|||
V_TB_ASN _entity = new V_TB_ASN(); |
|||
_entity.AsnBillNum = Request["AsnBillNum"]; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
_entity.UserInAddress= CurrentUser.FactoryList; |
|||
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
var _result = _ret.Result.FirstOrDefault(); |
|||
Session["Asn"] = _result; |
|||
TXT_AsnBillNum.Text = _result.AsnBillNum; |
|||
TXT_PlateNumber.Text = _result.PlateNumber; |
|||
TXT_ReceiveUser.Text = _result.ReceiveUser; |
|||
TXT_ShipUser.Text = _result.ShipUser; |
|||
TXT_Site.Text = _result.Site_Desc; |
|||
TXT_Remark.Text = _result.Remark; |
|||
TXT_VendName.Text = _result.VendName; |
|||
DP_ReceiveTime.SelectedDate = _result.ReceiveTime; |
|||
DP_ShipTime.SelectedDate = _result.ShipTime; |
|||
TXT_StateDesc.Text = _result.State_DESC; |
|||
} |
|||
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum= TXT_AsnBillNum.Text.Trim() }, retobj => { |
|||
if (retobj.State == ReturnStatus.Succeed) |
|||
{ |
|||
if (retobj.Result.Count() > 0) |
|||
{ |
|||
this.btnCreateBarCode.Enabled = false; |
|||
} |
|||
else |
|||
{ |
|||
this.btnCreateBarCode.Enabled = true; |
|||
} |
|||
} |
|||
}); |
|||
|
|||
}); |
|||
} |
|||
public void BindDetail() |
|||
{ |
|||
SearchV_TB_ASN_DETAILData((ret) => { |
|||
Grid_V_TB_ASN_DETAIL.RecordCount = ret.Count(); |
|||
var list = SortAndPage<V_TB_ASN_DETAIL>(ret, Grid_V_TB_ASN_DETAIL); |
|||
Grid_V_TB_ASN_DETAIL.DataSource = list; |
|||
Grid_V_TB_ASN_DETAIL.DataBind(); |
|||
}); |
|||
} |
|||
|
|||
protected void btnOutput_Click(object sender, EventArgs e) |
|||
{ |
|||
List<V_TB_ASN_DETAIL> _ls = new List<V_TB_ASN_DETAIL>(); |
|||
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++) |
|||
{ |
|||
V_TB_ASN_DETAIL inv = new V_TB_ASN_DETAIL(); |
|||
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i]; |
|||
|
|||
if (rowDataKeys[24] != null) |
|||
{ |
|||
inv.AsnBillNum = rowDataKeys[24].ToString();//发货单号
|
|||
} |
|||
if (rowDataKeys[8] != null) |
|||
{ |
|||
inv.PackQty = decimal.Parse(rowDataKeys[8].ToString());//标包数量
|
|||
} |
|||
if (rowDataKeys[25] != null) |
|||
{ |
|||
inv.Qty = decimal.Parse(rowDataKeys[25].ToString());//发货数量
|
|||
} |
|||
inv.PartCode = rowDataKeys[3].ToString();//零件编号
|
|||
if (rowDataKeys[19] != null) |
|||
{ |
|||
inv.PartDesc1 = rowDataKeys[19].ToString();//零件名称
|
|||
} |
|||
if (rowDataKeys[20] != null) |
|||
{ |
|||
inv.CurrencyDesc = rowDataKeys[20].ToString();//货种
|
|||
} |
|||
if (rowDataKeys[28] != null) |
|||
{ |
|||
inv.Batch = rowDataKeys[28].ToString();//批次
|
|||
} |
|||
if (rowDataKeys[26] != null) |
|||
{ |
|||
inv.VendBatch = rowDataKeys[26].ToString();//供应商批次
|
|||
} |
|||
if (rowDataKeys[27] != null) |
|||
{ |
|||
inv.ProduceDate = DateTime.Parse(rowDataKeys[27].ToString());//生产日期
|
|||
} |
|||
//if (rowDataKeys[26] != null)
|
|||
//{
|
|||
// inv.EndTime = DateTime.Parse(rowDataKeys[34].ToString());//到货截至日期
|
|||
//}
|
|||
inv.PoUnit = rowDataKeys[4].ToString();//采购单位
|
|||
// if (rowDataKeys[6] != null)
|
|||
// {
|
|||
// inv.Price = decimal.Parse(rowDataKeys[6].ToString());//价格
|
|||
// }
|
|||
// if (rowDataKeys[34] != null)
|
|||
//{
|
|||
// inv.ReceivedPort_Desc = rowDataKeys[34].ToString();//收货口
|
|||
//}
|
|||
_ls.Add(inv); |
|||
} |
|||
|
|||
|
|||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|||
{ |
|||
{ "AsnBillNum", "发货单号" }, |
|||
{ "PackQty", "标包数量" }, |
|||
{ "Qty", "发货数量" }, |
|||
{ "PartCode", "零件编号" }, |
|||
{ "PartDesc1", "零件名称" }, |
|||
{ "Batch", "批次" }, |
|||
{ "VendBatch", "供应商批次" }, |
|||
{ "ProduceDate", "生产日期" }, |
|||
{ "EndTime", "到货截至日期" }, |
|||
{ "PoUnit", "单位" } |
|||
}; |
|||
|
|||
string url = EntityListToExcel2003(cellheader, _ls, "发货明细"); |
|||
} |
|||
|
|||
protected void btnCreate_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
|
|||
BindDetail(); |
|||
} |
|||
|
|||
protected void btnEdit_Click(object sender, EventArgs e) |
|||
{ |
|||
var _asn=Session["Asn"] as V_TB_ASN; |
|||
if (_asn == null) |
|||
{ |
|||
Alert.Show("发货订单信息不能为空!"); |
|||
} |
|||
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>(); |
|||
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++) |
|||
{ |
|||
GridRow row = Grid_V_TB_ASN_DETAIL.Rows[i]; |
|||
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
|||
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i]; |
|||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|||
_entity.PoBillNum = rowDataKeys[1] as string; |
|||
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
|||
_entity.PartCode = rowDataKeys[3] as string; |
|||
_entity.PoUnit = rowDataKeys[4] as string; |
|||
_entity.LocUnit = rowDataKeys[5] as string; |
|||
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|||
_entity.Currency = rowDataKeys[7] as string; |
|||
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[8]); |
|||
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[9]); |
|||
_entity.DockCode = rowDataKeys[10] as string; |
|||
_entity.State = ConvertHelper.To<int?>(rowDataKeys[11]); |
|||
_entity.Remark = rowDataKeys[12] as string; |
|||
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[13]); |
|||
_entity.CreateUser = rowDataKeys[14] as string; |
|||
_entity.UpdateTime = ConvertHelper.To<DateTime>(rowDataKeys[15]); |
|||
_entity.UpdateUser = rowDataKeys[16] as string; |
|||
_entity.UpdateInfo = rowDataKeys[17] as string; |
|||
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[18]); |
|||
_entity.PartDesc1 = rowDataKeys[19] as string; |
|||
_entity.CurrencyDesc = rowDataKeys[20] as string; |
|||
_entity.Site = rowDataKeys[21] as string; |
|||
_entity.VendName = rowDataKeys[22] as string; |
|||
_entity.PartDesc2 = rowDataKeys[23] as string; |
|||
_entity.AsnBillNum = rowDataKeys[24] as string; |
|||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[25]); |
|||
_entity.VendBatch = rowDataKeys[26] as string; |
|||
_entity.Batch = rowDataKeys[28] as string; |
|||
_entity.VendId = rowDataKeys[29] as string; |
|||
System.Web.UI.WebControls.TextBox TXT_VenBatch = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_VenBatch"); |
|||
System.Web.UI.WebControls.TextBox TXT_PackQty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_PackQty"); |
|||
System.Web.UI.WebControls.TextBox TXT_Qty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_Qty"); |
|||
System.Web.UI.WebControls.TextBox TXT_ProduceDate = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_ProduceDate"); |
|||
_entity.VendBatch= TXT_VenBatch.Text; |
|||
|
|||
|
|||
if (string.IsNullOrEmpty(TXT_ProduceDate.Text)) |
|||
{ |
|||
Alert.Show("包装量填写错误!"); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
_entity.ProduceDate =DateTime.Parse(TXT_ProduceDate.Text); |
|||
} |
|||
_list.Add(_entity); |
|||
} |
|||
if (_list.Count > 0) |
|||
{ |
|||
var _first = _list.FirstOrDefault(); |
|||
if (_first.State != (int)AsnState.New) |
|||
{ |
|||
Alert.Show("不是新建状态,不能保存信息!"); |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
protected void btnRefresh_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
|
|||
private List<V_TB_ASN_DETAIL> GetSelectedList() |
|||
{ |
|||
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>(); |
|||
int _flag = 0; |
|||
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++) |
|||
{ |
|||
GridRow row = Grid_V_TB_ASN_DETAIL.Rows[i]; |
|||
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
|||
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i]; |
|||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|||
_entity.PoBillNum = rowDataKeys[1] as string; |
|||
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
|||
_entity.PartCode = rowDataKeys[3] as string; |
|||
_entity.PoUnit = rowDataKeys[4] as string; |
|||
_entity.LocUnit = rowDataKeys[5] as string; |
|||
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|||
_entity.Currency = rowDataKeys[7] as string; |
|||
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[8]); |
|||
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[9]); |
|||
_entity.DockCode = rowDataKeys[10] as string; |
|||
_entity.State = ConvertHelper.To<int>(rowDataKeys[11]); |
|||
_entity.Remark = rowDataKeys[12] as string; |
|||
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[13]); |
|||
_entity.CreateUser = rowDataKeys[14] as string; |
|||
_entity.UpdateTime = ConvertHelper.To<DateTime?>(rowDataKeys[15]); |
|||
_entity.UpdateUser = rowDataKeys[16] as string; |
|||
_entity.UpdateInfo = rowDataKeys[17] as string; |
|||
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[18]); |
|||
_entity.PartDesc1 = rowDataKeys[19] as string; |
|||
_entity.CurrencyDesc = rowDataKeys[20] as string; |
|||
_entity.Site = rowDataKeys[21] as string; |
|||
_entity.VendName = rowDataKeys[22] as string; |
|||
_entity.PartDesc2 = rowDataKeys[23] as string; |
|||
_entity.AsnBillNum = rowDataKeys[24] as string; |
|||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[25]); |
|||
_entity.VendBatch = rowDataKeys[26] as string; |
|||
_entity.ProduceDate = ConvertHelper.To<DateTime>(rowDataKeys[27]); |
|||
_entity.Batch = rowDataKeys[28] as string; |
|||
_entity.VendId = rowDataKeys[29] as string; |
|||
_entity.Guid=ConvertHelper.To<Guid>(rowDataKeys[29]); |
|||
|
|||
_list.Add(_entity); |
|||
} |
|||
if (_flag == 1) |
|||
{ _list = new List<V_TB_ASN_DETAIL>(); } |
|||
return _list; |
|||
} |
|||
protected void btnSend_Click(object sender, EventArgs e) |
|||
{ |
|||
var _asn = Session["Asn"] as V_TB_ASN; |
|||
if (_asn == null) |
|||
{ |
|||
Alert.Show("发货订单信息不能为空!"); |
|||
} |
|||
var _list = GetSelectedList(); |
|||
if (_list.Count > 0) |
|||
{ |
|||
var _first = _list.FirstOrDefault(); |
|||
if (_first.State != (int)AsnState.New) |
|||
{ |
|||
Alert.Show("不是新建状态,不能保存信息!"); |
|||
} |
|||
else |
|||
{ |
|||
var result=SCP_BARCODE_CONTROLLER.Get_TB_PRINT_COUNT_List(new TB_PRINT_COUNT() { BillNo=_asn.AsnBillNum }); |
|||
if (result.State == ReturnStatus.Succeed) |
|||
{ |
|||
if (result.Result.Count(p => p.PrintType == (int)PrintType.ASN) == 0) |
|||
{ |
|||
Alert.Show(_asn.AsnBillNum + "发货单未打印!"); |
|||
return; |
|||
} |
|||
if (result.Result.Count(p => p.PrintType == (int)PrintType.BAR_CODE) == 0) |
|||
{ |
|||
Alert.Show(_asn.AsnBillNum + "标签未打印!"); |
|||
return; |
|||
} |
|||
} |
|||
var check = SCP_ASN_CONTROLLER.Get_TS_UNI_API(_asn); |
|||
if(check.State == ReturnStatus.Failed) |
|||
{ |
|||
Alert.Show(_asn.AsnBillNum + "请勿重复提交数据!"); |
|||
return; |
|||
} |
|||
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_DETAIL(_asn, _list); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
SET_ASN_STATE("发货成功", AsnState.Ship); |
|||
GetV_TB_ASNData(); |
|||
BindDetail(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(string.Join("\n\r", ret.MessageList.ToArray())); |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
private void SET_ASN_STATE(string p_msg, AsnState p_state) |
|||
{ |
|||
if (Session["Asn"] != null) |
|||
{ |
|||
|
|||
if (CurrentUser.Name == "admin") |
|||
{ |
|||
if (p_state == AsnState.Reject) |
|||
{ |
|||
var _asn = Session["Asn"] as V_TB_ASN; |
|||
|
|||
|
|||
var asn = SCPDB.TB_ASN.Where(p => p.AsnBillNum == _asn.AsnBillNum).FirstOrDefault(); |
|||
var detail = SCPDB.TB_ASN_DETAIL.Where(p => p.AsnBillNum == _asn.AsnBillNum).ToArray(); |
|||
if (asn != null) |
|||
{ |
|||
asn.State = -1; |
|||
asn.IsDeleted = true; |
|||
SCPDB.TB_ASN.AddOrUpdate(asn); |
|||
} |
|||
if (detail.Count() > 0) |
|||
{ |
|||
foreach (var itm in detail) |
|||
{ |
|||
itm.IsDeleted = true; |
|||
itm.State = -1; |
|||
|
|||
} |
|||
SCPDB.TB_ASN_DETAIL.AddOrUpdate(detail); |
|||
} |
|||
if (SCPDB.SaveChanges() != -1) |
|||
{ |
|||
Alert.Show("发货单删除成功"); |
|||
} |
|||
} |
|||
|
|||
} |
|||
else |
|||
{ |
|||
var _ask = Session["Asn"] as V_TB_ASN; |
|||
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_STATE(new List<string>() { _ask.AsnBillNum }, p_state); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
Alert.Show(p_msg); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(ret.Message); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
protected void btnCancel_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
SET_ASN_STATE("发货单作废成功", AsnState.Reject); |
|||
|
|||
} |
|||
|
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_V_TB_ASN_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
|
|||
BindDetail(); |
|||
} |
|||
|
|||
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
|
|||
protected void CreateBarCode_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
var _list=GetSelectedList(); |
|||
if (_list.Count > 0) |
|||
{ |
|||
btnCreateBarCode.Enabled = false; |
|||
var ret=SCP_ASN_CONTROLLER.Save_TB_CREATE_BARCODE(_list); |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
Alert.Show("条码创建成功!"); |
|||
} |
|||
else |
|||
{ |
|||
btnCreateBarCode.Enabled = true; |
|||
Alert.Show(string.Join("<BR>", ret.MessageList.ToArray())); |
|||
} |
|||
} |
|||
} |
|||
|
|||
protected void btnBarCodeList_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
string AsnBillNum = Request["AsnBillNum"]; |
|||
string script = Window1.GetShowReference("SCP_SHIP_DETAIL_BARCODE.aspx?BillNo=" + AsnBillNum, "条码列表"); |
|||
PageContext.RegisterStartupScript(script); |
|||
|
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
Alert.Show(ex.Message); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
protected void SelectedBarCode_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
protected void btnPrint_Click(object sender, EventArgs e) |
|||
{ |
|||
string AsnBillNum = Request["AsnBillNum"]; |
|||
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=SendBill&data=102&type=pdf&filename=SendBill.pdf&AsnBillNum={0}&open=\")", AsnBillNum); |
|||
PageContext.RegisterStartupScript(str); |
|||
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.ASN}); |
|||
} |
|||
|
|||
protected void btnSelectedBarCode_Click(object sender, EventArgs e) |
|||
{ |
|||
string openUrl = string.Format("SCP_SELECT_MAKE.aspx?select={0}", HttpUtility.UrlEncode(TXT_MarkType.Text)); |
|||
PageContext.RegisterStartupScript(WindowUpload.GetSaveStateReference(TXT_MarkType.ClientID) + WindowUpload.GetShowReference(openUrl)); |
|||
} |
|||
|
|||
protected void btnOutputPallet_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
#region 计算托盘数量和发货数量是否相等
|
|||
|
|||
SearchV_TB_ASN_DETAILData((ret) => { |
|||
|
|||
var _asn = Session["Asn"] as V_TB_ASN; |
|||
if (_asn == null) |
|||
{ |
|||
Alert.Show("发货单不存在!"); |
|||
return; |
|||
} |
|||
|
|||
|
|||
var _ls=SCP_ASN_CONTROLLER.Get_CAN_PALLET_QTY(ret.ToList()); |
|||
var _errList = new List<string>(); |
|||
_ls.ForEach(p => { |
|||
if(p.CanQty>0) |
|||
{ |
|||
_errList.Add(string.Format("编号:{0}名称:{1},托盘数量总和小于发货单数量",p.PartCode,(p.PartDesc1+p.PartDesc2))); |
|||
} |
|||
}); |
|||
if (_errList.Count > 0) |
|||
{ |
|||
Alert.Show(string.Join("<BR>", _errList.ToArray())); |
|||
return; |
|||
} |
|||
|
|||
|
|||
|
|||
List<string> _list = new List<string>(); |
|||
_list.Add(_asn.AsnBillNum); |
|||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_PALLET_EXECEL(_list); |
|||
PageBase.DataSetToExcel(ds, "打印导出托盘!"); |
|||
|
|||
}); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
#endregion
|
|||
|
|||
|
|||
} |
|||
|
|||
protected void btnPackage_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected void WindowUpload1_Close(object sender, WindowCloseEventArgs e) |
|||
{ |
|||
if(string.IsNullOrEmpty(TXT_MarkType.Text)) |
|||
{ |
|||
Alert.Show("没有选择标签模板!"); |
|||
return; |
|||
} |
|||
string AsnBillNum = Request["AsnBillNum"]; |
|||
if (!string.IsNullOrEmpty(AsnBillNum)) |
|||
{ |
|||
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report={1}&data=101&type=pdf&filename=标签.pdf&AsnBillNum={0}&open=\")", AsnBillNum, TXT_MarkType.Text); |
|||
PageContext.RegisterStartupScript(str); |
|||
} |
|||
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.BAR_CODE }); |
|||
TXT_MarkType.Text = ""; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,323 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.锦州锦恒.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_ASN_DETAIL |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar2; |
|||
|
|||
/// <summary>
|
|||
/// btnRefresh 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnRefresh; |
|||
|
|||
/// <summary>
|
|||
/// btnSend 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnSend; |
|||
|
|||
/// <summary>
|
|||
/// btnPrint 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnPrint; |
|||
|
|||
/// <summary>
|
|||
/// btnPackage 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnPackage; |
|||
|
|||
/// <summary>
|
|||
/// btnCancel 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnCancel; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_1; |
|||
|
|||
/// <summary>
|
|||
/// TXT_StateDesc 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_StateDesc; |
|||
|
|||
/// <summary>
|
|||
/// TXT_AsnBillNum 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_AsnBillNum; |
|||
|
|||
/// <summary>
|
|||
/// TXT_VendName 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_VendName; |
|||
|
|||
/// <summary>
|
|||
/// TXT_Site 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_Site; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_2; |
|||
|
|||
/// <summary>
|
|||
/// DP_ShipTime 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker DP_ShipTime; |
|||
|
|||
/// <summary>
|
|||
/// TXT_ShipUser 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_ShipUser; |
|||
|
|||
/// <summary>
|
|||
/// DP_ReceiveTime 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DatePicker DP_ReceiveTime; |
|||
|
|||
/// <summary>
|
|||
/// TXT_ReceiveUser 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_ReceiveUser; |
|||
|
|||
/// <summary>
|
|||
/// FormRow_3 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.FormRow FormRow_3; |
|||
|
|||
/// <summary>
|
|||
/// TXT_PlateNumber 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_PlateNumber; |
|||
|
|||
/// <summary>
|
|||
/// TXT_Remark 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_Remark; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// btnCreateBarCode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnCreateBarCode; |
|||
|
|||
/// <summary>
|
|||
/// btnSelectedBarCode 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnSelectedBarCode; |
|||
|
|||
/// <summary>
|
|||
/// btnOutputPallet 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnOutputPallet; |
|||
|
|||
/// <summary>
|
|||
/// btnBarCodeList 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnBarCodeList; |
|||
|
|||
/// <summary>
|
|||
/// btnOutPut 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnOutPut; |
|||
|
|||
/// <summary>
|
|||
/// TXT_MarkType 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_MarkType; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_ASN_DETAIL 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_ASN_DETAIL; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// ddlGridPageSize 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.DropDownList ddlGridPageSize; |
|||
|
|||
/// <summary>
|
|||
/// Window1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window Window1; |
|||
|
|||
/// <summary>
|
|||
/// WindowUpload 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window WindowUpload; |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_SELECT_MAKE.aspx.cs" Inherits="SCP.Views.锦州锦恒.SupplierData.SCP_SELECT_MAKE" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager runat="server" AutoSizePanelID="Panel1" ID="PageManager1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="Fit" ShowBorder="false" ShowHeader="false" BodyPadding="5px"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar1" runat="server"> |
|||
<Items> |
|||
<f:Button ID="btnClose" Text="关闭" runat="server" Icon="SystemClose" OnClick="btnClose_Click"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
<Items> |
|||
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="false" ShowHeader="false" LabelAlign="Top" Title="标签规格" BodyPadding="5px" EnableCollapse="true"> |
|||
<Items> |
|||
<f:RadioButtonList ID="RadioButtonList1" Label="请选择标签规格" runat="server" ColumnNumber="3" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" > |
|||
<f:RadioItem Text="A4-4" Value="Material-A4-4"/> |
|||
<f:RadioItem Text="A4-10" Value="Material-A4-10"/> |
|||
<f:RadioItem Text="lbl-5437" Value="Material-lbl-5437"/> |
|||
<f:RadioItem Text="lbl-7035" Value="Material-lbl-7035"/> |
|||
<f:RadioItem Text="lbl-8652" Value="Material-lbl-8652"/> |
|||
</f:RadioButtonList> |
|||
</Items> |
|||
</f:SimpleForm> |
|||
</Items> |
|||
</f:Panel> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,33 @@ |
|||
using CK.SCP.Controller; |
|||
using CK.SCP.Models.Enums; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using FineUI; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
|
|||
namespace SCP.Views.锦州锦恒.SupplierData |
|||
{ |
|||
public partial class SCP_SELECT_MAKE : PageBase |
|||
{ |
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
protected void btnClose_Click(object sender, EventArgs e) |
|||
{ |
|||
PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference()); |
|||
} |
|||
|
|||
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(RadioButtonList1.SelectedValue)+ActiveWindow.GetHidePostBackReference()); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,80 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.锦州锦恒.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_SELECT_MAKE |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// PageManager1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.PageManager PageManager1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// btnClose 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnClose; |
|||
|
|||
/// <summary>
|
|||
/// SimpleForm1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.SimpleForm SimpleForm1; |
|||
|
|||
/// <summary>
|
|||
/// RadioButtonList1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.RadioButtonList RadioButtonList1; |
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_SHIP_DETAIL_BARCODE.aspx.cs" Inherits="SCP.Views.锦州锦恒.SupplierData.SCP_SHIP_DETAIL_BARCODE" %> |
|||
|
|||
<!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"> |
|||
<f:PageManager ID="PageManager1" runat="server" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|||
<Items> |
|||
<f:Toolbar ID="Toolbar1" runat="server"> |
|||
<Items> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Button ID="btnRefresh" runat="server" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
|||
</f:Button> |
|||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|||
</f:ToolbarSeparator> |
|||
<f:Button ID="btnOutput" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel" > |
|||
</f:Button> |
|||
<f:Button ID="btnPrintRe" runat="server" Text="补打条码" OnClick="btnPrintRe_Click" Icon="Printer"> |
|||
</f:Button> |
|||
<f:ToolbarFill ID="ToolbarFill1" runat="server"> |
|||
</f:ToolbarFill> |
|||
<f:TextBox ID="txtKeyword" runat="server" Label="" Text=""> |
|||
</f:TextBox> |
|||
<f:Button ID="btnSearch" runat="server" Text="快速查找" OnClick="btnSearch_Click" Icon="SystemSearch"> |
|||
</f:Button> |
|||
<f:TextBox runat = "server" Label = "模板规格" EmptyText = "" ID = "TXT_MarkType" Readonly="true" /> |
|||
<f:ToolbarText ID="ToolbarText1" runat="server" Text=" "> |
|||
</f:ToolbarText> |
|||
</Items> |
|||
</f:Toolbar> |
|||
|
|||
|
|||
<f:Grid ID="Grid1" runat="server" EnableCheckBoxSelect="true" ShowHeader="False" |
|||
AllowPaging="True" PageSize="100" OnPageIndexChange="Grid1_PageIndexChange" |
|||
ShowBorder="False" AutoScroll="true" |
|||
DataKeyNames="UID,BarCode" AllowSorting="true" IsDatabasePaging="true" > |
|||
<Columns> |
|||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|||
<f:BoundField SortField="BarCode" DataField="BarCode" HeaderText="条码" ColumnID="BarCode" Width="100" /> |
|||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="ProductCode"/> |
|||
<f:BoundField SortField="PartName" DataField="PartName" HeaderText="零件名称" ColumnID="ProductName" Width="300px"/> |
|||
<f:BoundField SortField="Batch" DataField="Batch" HeaderText="批次" ColumnID="Batch"/> |
|||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="数量" ColumnID="Qty"/> |
|||
<f:BoundField SortField="PackQty" DataField="PackQty" HeaderText="标包数量" ColumnID="PackageQty"/> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|||
WindowPosition="Center" IsModal="true" Title="选择标签规格" Target="Parent" EnableIFrame="true" |
|||
IFrameUrl="about:blank" Height="200px" Width="400px" OnClose="WindowUpload1_Close"> |
|||
</f:Window> |
|||
</form> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,130 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.UI; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Controller; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Utils; |
|||
using FineUI; |
|||
|
|||
namespace SCP.Views.锦州锦恒.SupplierData |
|||
{ |
|||
public partial class SCP_SHIP_DETAIL_BARCODE : PageBase |
|||
{ |
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
TranslatorAgents(Toolbar1); |
|||
TranslatorAgent(Grid1); |
|||
BindData(); |
|||
string openUrl = string.Format("SCP_SELECT_MAKE.aspx?select=<script>encodeURIComponent({0})</script>", TXT_MarkType.GetValueReference()); |
|||
btnPrintRe.OnClientClick = WindowUpload.GetSaveStateReference(TXT_MarkType.ClientID) + WindowUpload.GetShowReference(openUrl); |
|||
} |
|||
} |
|||
|
|||
public void BindData() |
|||
{ |
|||
Search(ret => { |
|||
Grid1.RecordCount = ret.Count(); |
|||
Grid1.DataSource = ret.ToList(); |
|||
Grid1.DataBind(); |
|||
}); |
|||
|
|||
} |
|||
public void Search(Action<IQueryable<TS_BARCODE>> p_action) |
|||
{ |
|||
string billnum = GetQueryValue("BillNo"); |
|||
TS_BARCODE _code = new TS_BARCODE(); |
|||
_code.BillNum = billnum; |
|||
if (!string.IsNullOrEmpty(txtKeyword.Text)) |
|||
{ |
|||
_code.PartCode = txtKeyword.Text; |
|||
} |
|||
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(_code, ret => { |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
//查询
|
|||
protected void btnSearch_OnClick(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
//导出
|
|||
|
|||
|
|||
|
|||
protected void btnOutput_Click(object sender, EventArgs e) |
|||
{ |
|||
string billnum = GetQueryValue("BillNo"); |
|||
TS_BARCODE _code = new TS_BARCODE(); |
|||
_code.BillNum = billnum; |
|||
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(_code, ret => |
|||
{ |
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|||
{ |
|||
{ "BarCode", "包装箱码" }, |
|||
{ "Qty", "数量" }, |
|||
{ "PartCode", "零件编号" }, |
|||
{ "PartDesc", "零件名称" }, |
|||
{ "Batch", "批次" }, |
|||
{ "VendBatch", "供应商批次" }, |
|||
{ "ProduceDate", "生产日期" }, |
|||
{ "PoUnit", "单位" } |
|||
}; |
|||
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "条码明细"); |
|||
} |
|||
}); |
|||
|
|||
} |
|||
//补打条码
|
|||
protected void btnPrintRe_Click(object sender, EventArgs e) |
|||
{ |
|||
string openUrl = string.Format("SCP_SELECT_MAKE.aspx?select={0}", HttpUtility.UrlEncode(TXT_MarkType.Text)); |
|||
PageContext.RegisterStartupScript(WindowUpload.GetSaveStateReference(TXT_MarkType.ClientID) + WindowUpload.GetShowReference(openUrl)); |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
//查询
|
|||
protected void btnSearch_Click(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
|
|||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
protected void WindowUpload1_Close(object sender, WindowCloseEventArgs e) |
|||
{ |
|||
if (string.IsNullOrEmpty(TXT_MarkType.Text)) |
|||
{ |
|||
Alert.Show("没有选择标签模板!"); |
|||
return; |
|||
} |
|||
List<string> _ls = new List<string>(); |
|||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|||
{ |
|||
if (Grid1.SelectedRowIndexArray.Contains(i)) |
|||
{ |
|||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|||
int id = ConvertHelper.To<int>(rowDataKeys[0]); |
|||
_ls.Add(id.ToString()); |
|||
} |
|||
} |
|||
|
|||
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report={1}&data=101&type=pdf&filename=标签.pdf&Barcode={0}&open=\")", string.Join("_", _ls.ToArray()), TXT_MarkType.Text); |
|||
PageContext.RegisterStartupScript(str); |
|||
TXT_MarkType.Text = ""; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,161 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.锦州锦恒.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_SHIP_DETAIL_BARCODE |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// form1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|||
|
|||
/// <summary>
|
|||
/// PageManager1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.PageManager PageManager1; |
|||
|
|||
/// <summary>
|
|||
/// Panel1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Panel Panel1; |
|||
|
|||
/// <summary>
|
|||
/// Toolbar1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Toolbar Toolbar1; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|||
|
|||
/// <summary>
|
|||
/// btnRefresh 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnRefresh; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarSeparator2 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|||
|
|||
/// <summary>
|
|||
/// btnOutput 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnOutput; |
|||
|
|||
/// <summary>
|
|||
/// btnPrintRe 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnPrintRe; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarFill1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarFill ToolbarFill1; |
|||
|
|||
/// <summary>
|
|||
/// txtKeyword 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox txtKeyword; |
|||
|
|||
/// <summary>
|
|||
/// btnSearch 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnSearch; |
|||
|
|||
/// <summary>
|
|||
/// TXT_MarkType 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_MarkType; |
|||
|
|||
/// <summary>
|
|||
/// ToolbarText1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.ToolbarText ToolbarText1; |
|||
|
|||
/// <summary>
|
|||
/// Grid1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid1; |
|||
|
|||
/// <summary>
|
|||
/// WindowUpload 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window WindowUpload; |
|||
} |
|||
} |
Loading…
Reference in new issue