Browse Source

Merge branch 'master' of https://gitee.com/zxyabc/COMONE

master
学 赵 4 years ago
parent
commit
55feca7f01
  1. 21
      Controller/SCP_ASK_CONTROLLER.cs
  2. 541
      Controller/SCP_ASN_CONTROLLER.cs
  3. 380
      Controller/SCP_BARCODE_CONTROLLER.cs
  4. 38
      Controller/SCP_BILLCODE_CONTROLLER.cs
  5. 7
      Controller/SCP_EXCEL_CONTROLLER.cs
  6. 74
      Controller/SCP_PALLET_CONTROLLER.cs
  7. 51
      Controller/SCP_PLAN_MONTH_CONTROLLER.cs
  8. 8
      Controller/SCP_PO_CONTROLLER.cs
  9. 142
      Controller/SCP_TS_BARCODE_CONTROLLER.cs
  10. 4
      Models/CK.SCP.Models.csproj
  11. 4
      Models/Enums/SCP_ENUM.cs.cs
  12. 2
      Models/ScpCache.cs
  13. 4
      Models/ScpEntities.cs
  14. 2
      Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs
  15. 17
      Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs
  16. 1
      Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_PART_EXPORT.cs
  17. 2
      Models/ScpEntity/TA_VENDER.cs
  18. 4
      Models/ScpEntity/TA_VEND_PART.cs
  19. 26
      Models/ScpEntity/TB_PALLETS.cs
  20. 32
      Models/ScpEntity/TS_BARCODE_RULE_SMALL.cs
  21. 101
      Models/ScpEntity/TS_BARCODE_SMALL.cs
  22. 2
      Models/ScpEntity/V_ASN_PRINT.cs
  23. 1
      Models/ScpEntity/V_TA_VEND_PART.cs
  24. 3
      Models/ScpEntity/V_TB_ASK_DETAIL.cs
  25. 22
      Models/ScpEntity/V_TB_PALLETS.cs
  26. 89
      SCP/Common/ReportHelper.cs
  27. 50
      SCP/SCP.csproj
  28. 1
      SCP/Views/BasicData/SCP_TA_VEND_PART.aspx
  29. 110
      SCP/Views/PlanData/PlanMonth.aspx
  30. 272
      SCP/Views/PlanData/PlanMonth.aspx.cs
  31. 133
      SCP/Views/PlanData/PlanMonth.aspx.designer.cs
  32. 44
      SCP/Views/PlanData/PlanMonthEdit.aspx
  33. 113
      SCP/Views/PlanData/PlanMonthEdit.aspx.cs
  34. 49
      SCP/Views/PlanData/PlanMonthEdit.aspx.designer.cs
  35. 2
      SCP/Views/PlanData/SCP_ASK_DETAIL.aspx
  36. 32
      SCP/Views/PlanData/SCP_ASN_DETAIL_View.aspx
  37. 7
      SCP/Views/PlanData/SCP_ASN_DETAIL_View.aspx.cs
  38. 8
      SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs
  39. 18
      SCP/Views/PlanData/SCP_PO.aspx
  40. 2
      SCP/Views/PlanData/SCP_PO.aspx.cs
  41. 12
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx
  42. 36
      SCP/Views/PlanData/SCP_PO_DETAIL.aspx
  43. 7
      SCP/Views/PlanData/SCP_PO_DETAIL.aspx.cs
  44. 104
      SCP/Views/SupplierData/PlanMonth.aspx
  45. 191
      SCP/Views/SupplierData/PlanMonth.aspx.cs
  46. 82
      SCP/Views/SupplierData/PlanMonth.aspx.designer.cs
  47. 2
      SCP/Views/SupplierData/SCP_ASK.aspx
  48. 3
      SCP/Views/SupplierData/SCP_ASN.aspx
  49. 15
      SCP/Views/SupplierData/SCP_ASN.aspx.cs
  50. 9
      SCP/Views/SupplierData/SCP_ASN.aspx.designer.cs
  51. 8
      SCP/Views/SupplierData/SCP_ASN_CREATE.aspx
  52. 9
      SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.designer.cs
  53. 19
      SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs
  54. 2
      SCP/Views/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx
  55. 39
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx
  56. 88
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.cs
  57. 82
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.designer.cs
  58. 76
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx
  59. 19
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx.cs
  60. 56
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx.designer.cs
  61. 80
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO_CREATE_ASK.aspx
  62. 84
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO_CREATE_ASK.aspx.cs
  63. 123
      SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs
  64. 99
      SCP/Views/青岛一汽法雷奥/SupplierData/PlanDetail.aspx
  65. 90
      SCP/Views/青岛一汽法雷奥/SupplierData/PlanDetail.aspx.cs
  66. 50
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK.aspx
  67. 73
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK.aspx.cs
  68. 130
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK.aspx.designer.cs
  69. 12
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK_DETAIL.aspx
  70. 135
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN.aspx
  71. 203
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN.aspx.cs
  72. 323
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN.aspx.designer.cs
  73. 12
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx
  74. 31
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.cs
  75. 42
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.designer.cs
  76. 184
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_DETAIL.aspx
  77. 573
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_DETAIL.aspx.cs
  78. 332
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs
  79. 57
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx
  80. 89
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx.cs
  81. 61
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_TS_BARCODE.aspx
  82. 82
      SCP/Views/青岛一汽法雷奥/SupplierData/SCP_TS_BARCODE.aspx.cs
  83. 4
      SCP/default.aspx
  84. 321
      SCP/default.aspx.designer.cs

21
Controller/SCP_ASK_CONTROLLER.cs

@ -1651,6 +1651,27 @@ namespace CK.SCP.Controller
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
if (p_state == AskState.Close)
{
var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList();
if (_ls.Count > 0)
{
_ls.ForEach(p => {
p.State = (int)AskState.Close;
var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList();
_list.ForEach(itm => itm.State = (int)AskState.Close);
db.TB_ASK_DETAIL.AddOrUpdate(itm => itm.UID, _list.ToArray());
}
);
db.TB_ASK.AddOrUpdate(p => p.AskBillNum, _ls.ToArray());
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.Message = "选择的记录,不能关闭!";
}
}
if (p_state == AskState.Confirm)
{
var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList();

541
Controller/SCP_ASN_CONTROLLER.cs

@ -117,6 +117,14 @@ namespace CK.SCP.Controller
//{
// q = q.Where(p => p.Contacter.Contains(p_entity.Contacter));
//}
if (p_entity.ShipTime != null)
{
q = q.Where(p => p.ShipTime == p_entity.ShipTime);
}
if (p_entity.ReceiveTime != null)
{
q = q.Where(p => p.ReceiveTime == p_entity.ReceiveTime);
}
if (!string.IsNullOrEmpty(p_entity.Buyer))
{
q = q.Where(p => p.Buyer.Contains(p_entity.Buyer));
@ -222,6 +230,84 @@ namespace CK.SCP.Controller
throw e;
}
}
public static void Get_TB_Pallet_List(V_TB_PALLETS p_entity, Action<ResultObject<IQueryable<V_TB_PALLETS>>> p_action)
{
ResultObject<IQueryable<V_TB_PALLETS>> _ret = new ResultObject<IQueryable<V_TB_PALLETS>>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
IQueryable<V_TB_PALLETS> q = db.V_TB_PALLETS;
if (!string.IsNullOrEmpty(p_entity.AsnBillNum))
{
q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum));
}
if (p_entity.Qty != 0)
{
q = q.Where(p => p.Qty == p_entity.Qty);
}
if (!string.IsNullOrEmpty(p_entity.PartCode))
{
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
}
if (!string.IsNullOrEmpty(p_entity.Batch))
{
q = q.Where(p => p.Batch.Contains(p_entity.Batch));
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.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_ASN_CONTROLLER), "Get_TB_Pallet_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_ASN_CONTROLLER), "Get_TB_Pallet_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_ASN_CONTROLLER), "Get_TB_Pallet_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_ASN_CONTROLLER), "Get_TB_Pallet_List", e.Message);
throw e;
}
}
public static void Get_V_TB_ASN_DETAIL_List(V_TB_ASN_DETAIL p_entity, Action<ResultObject<IQueryable<V_TB_ASN_DETAIL>>> p_action)
{
ResultObject<IQueryable<V_TB_ASN_DETAIL>> _ret = new ResultObject<IQueryable<V_TB_ASN_DETAIL>>();
@ -562,7 +648,7 @@ namespace CK.SCP.Controller
_print.CAAIPhone = "";
_print.CAAIFax = "";
_print.Site = _asn.Site;
_print.Total = "0";
using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance())
{
StringBuilder _buffer = new StringBuilder();
@ -619,6 +705,70 @@ namespace CK.SCP.Controller
return ds;
}
public static DataSet ASN_PALLET_REPORT(string p_AsnBillNum)
{
DataSet ds = new DataSet();
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(new V_TB_ASN { AsnBillNum = p_AsnBillNum }, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
if (ret.Result.Count() > 0)
{
var _asn = ret.Result.FirstOrDefault();
V_ASN_PRINT _print = new V_ASN_PRINT();
_print.FileNo = "";
_print.DeliveryNo = _asn.AsnBillNum;
_print.ChineseAddress = _asn.Site_Desc;
_print.EnglishAddress = "";
_print.SupplierNo = _asn.VendId;
_print.SupplierName = _asn.VendName;
_print.SupplierContacter = _asn.ShipUser;
_print.DueDeliveryDate = _asn.ReceiveTime.ToString();
_print.MaterialPlanner = _asn.Buyer;
_print.CAAIPhone = "";
_print.CAAIFax = "";
_print.Total = "0";
using (AppBoxContext _appdb = EntitiesFactory.CreateAppBoxInstance())
{
StringBuilder _buffer = new StringBuilder();
var _ls = _appdb.Users.Where(p => p.Roles.Select(itm => itm.Name).Contains("物流人员")).ToList();
_ls.ForEach(itm =>
{
_buffer.Append(itm.ChineseName + "/" + itm.CellPhone + ";");
});
_print.CAAIPhone = _buffer.ToString();
}
SCP_ASN_CONTROLLER.Get_TB_Pallet_List(new V_TB_PALLETS() { AsnBillNum = p_AsnBillNum }, (retobj) =>
{
if (retobj.State == ReturnStatus.Succeed)
{
List<V_TB_PALLETS> _lsDetail = new List<V_TB_PALLETS>();
var _ls = retobj.Result.ToList();
decimal count = 0;
_ls.ForEach(p =>
{
V_TB_PALLETS _detail = new V_TB_PALLETS();
_detail.PartCode = p.PartCode;
_detail.PartName = p.PartName;
_detail.PalletNum = p.PalletNum;
_detail.Batch = p.Batch;
_detail.Qty = p.Qty;
_detail.Box = p.Box;
count += p.Qty;
_lsDetail.Add(_detail);
});
_print.Total = count.ToString();
var tb = ConvertHelper.ToDataTable(_lsDetail);
ds.Tables.Add(tb);
}
});
var dt = ConvertHelper.ToDataTable(new List<V_ASN_PRINT> { _print });
ds.Tables.Add(dt);
}
}
});
return ds;
}
public static DataSet ARRIVE_REPORT(string p_AsnBillNum)
{
DataSet ds = new DataSet();
@ -968,8 +1118,184 @@ namespace CK.SCP.Controller
public static ResultObject<bool> Save_TB_CREATE_SMALLBARCODE(List<V_TB_ASN_DETAIL> p_list)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
List<TS_BARCODE_SMALL> _ls = new List<TS_BARCODE_SMALL>();
if (p_list.Count > 0)
{
string _asnBillNum = p_list[0].AsnBillNum;
var _asn = db.TB_ASN.Where(p => p.IsDeleted == false && p.AsnBillNum == _asnBillNum).FirstOrDefault();
List<V_TB_ASN_DETAIL> _asnList = new List<V_TB_ASN_DETAIL>();
p_list.ForEach(p =>
{
var _askDetail = db.TA_VEND_PART.Where(itm => itm.VendId == p.VendId && itm.PartCode == p.PartCode).FirstOrDefault();
if (_askDetail != null)
{
decimal _qty = 0;
decimal _smallpackQty = 0;
if (decimal.TryParse(p.Qty.ToString(), out _qty) && decimal.TryParse(_askDetail.MinPackQty.ToString(), out _smallpackQty))
{
if (_smallpackQty == 0)
{
_ret.MessageList.Add("供应商:" + p.VendId + "零件号:" + p.PartCode + "最小包装为0!");
}
else
{
decimal _n = _qty / _smallpackQty;
var _count = int.Parse(Math.Truncate(_n).ToString());
if (_qty / _smallpackQty > 0)
{
for (int i = 0; i < _count; i++)
{
V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL();
_asndetail.PoBillNum = p.PoBillNum;
_asndetail.Batch = p.Batch;
_asndetail.PartCode = p.PartCode;
_asndetail.ProduceDate = p.ProduceDate;
_asndetail.Qty = _smallpackQty;
_asndetail.AsnBillNum = p.AsnBillNum;
_asndetail.PoLine = p.PoLine;
_asndetail.VendId = p.VendId;
_asndetail.VendBatch = p.VendBatch;
_asndetail.CreateTime = p.CreateTime;
_asndetail.CreateUser = p.CreateUser;
_asndetail.Remark = p.Remark;
_asndetail.PackQty = _smallpackQty;//小包装
_asndetail.PoUnit = p.PoUnit;
_asndetail.Site = p.Site;
_asnList.Add(_asndetail);
}
if (_qty % _smallpackQty > 0)
{
V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL();
_asndetail.PoBillNum = p.PoBillNum;
_asndetail.Batch = p.Batch;
_asndetail.PartCode = p.PartCode;
_asndetail.ProduceDate = p.ProduceDate;
_asndetail.Qty = _qty % _smallpackQty;
_asndetail.AsnBillNum = p.AsnBillNum;
_asndetail.PoLine = p.PoLine;
_asndetail.VendId = p.VendId;
_asndetail.VendBatch = p.VendBatch;
_asndetail.CreateTime = p.CreateTime;
_asndetail.CreateUser = p.CreateUser;
_asndetail.Remark = p.Remark;
_asndetail.PackQty = _smallpackQty;//小包装
_asndetail.PoUnit = p.PoUnit;
_asndetail.Site = p.Site;
_asnList.Add(_asndetail);
}
}
else
{
if (_qty > 0)
{
V_TB_ASN_DETAIL _asndetail = new V_TB_ASN_DETAIL();
_asndetail.PoBillNum = p.PoBillNum;
_asndetail.Batch = p.Batch;
_asndetail.PartCode = p.PartCode;
_asndetail.ProduceDate = p.ProduceDate;
_asndetail.Qty = _qty;
_asndetail.AsnBillNum = p.AsnBillNum;
_asndetail.PoLine = p.PoLine;
_asndetail.VendId = p.VendId;
_asndetail.VendBatch = p.VendBatch;
_asndetail.CreateTime = p.CreateTime;
_asndetail.CreateUser = p.CreateUser;
_asndetail.Remark = p.Remark;
_asndetail.PackQty = _smallpackQty;//小包装
_asndetail.PoUnit = p.PoUnit;
_asndetail.Site = p.Site;
_asnList.Add(_asndetail);
}
}
}
}
}
});
foreach (var itm in _asnList)
{
var _bar = SCP_BARCODE_CONTROLLER.CreateSmallBarcode(itm);
_ls.Add(_bar);
}
db.TS_BARCODE_SMALL.AddOrUpdate(p => new { p.BarCode, p.BillNum }, _ls.ToArray());
}
else
{
_ret.MessageList.Add("选择的发货明细数量为零!");
}
if (_ret.MessageList.Count == 0)
{
if (db.SaveChanges() != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
}
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_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", 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_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", 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_ASN_CONTROLLER), "Save_TB_CREATE_BARCODE", 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_ASN_CONTROLLER), "Save_TB_ASN_DETAIL", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
public static ResultObject<bool> Save_TB_CREATE_BARCODE(List<V_TB_ASN_DETAIL> p_list)
{
@ -1145,6 +1471,219 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static ResultObject<bool> Save_TB_PALLET(List<V_TB_ASN_DETAIL> p_list)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
List<string> _list = new List<string>();
int codenum = 1; //标签计数器
string _oldpartcode = ""; //上一个托盘所装零件编号
decimal _oldbox = 0; //上一个托盘箱数计数
string _oldpalletnum = "";//上一个托盘码
List<string> _listm = new List<string>();
p_list.ForEach(p =>
{
var _askDetail = db.TA_VEND_PART.Where
(itm => itm.VendId == p.VendId
&& itm.PartCode == p.PartCode
).FirstOrDefault();
if (_askDetail != null)
{
var _palletPack = _askDetail.PalletPackQty;
#region 补充未满托盘
if (p.PartCode== _oldpartcode)
{
decimal _box1 = 0;
int _TempQty1 = Convert.ToInt32(p.Qty);
int _PackQty1 = Convert.ToInt32(p.PackQty);
if (_TempQty1 / _PackQty1 > 0)
{
int _count = _TempQty1 / _PackQty1;
_box1 += _count;
if (p.Qty % p.PackQty > 0)
{
_box1++;
}
}
else
{
if (_TempQty1 > 0)
{
_box1++;
}
}
if(_box1< _oldbox)
{
TB_PALLETS pallet = new TB_PALLETS();
pallet.AsnBillNum = p.AsnBillNum;
pallet.PartCode = p.PartCode;
pallet.Batch = p.Batch;
pallet.VendId = p.VendId;
pallet.Box = Convert.ToInt32(_box1);
pallet.Qty = p.Qty;
pallet.PalletNum = _oldpalletnum;
db.TB_PALLETS.Add(pallet);
p.Qty = 0;
}
else
{
TB_PALLETS pallet = new TB_PALLETS();
pallet.AsnBillNum = p.AsnBillNum;
pallet.PartCode = p.PartCode;
pallet.Batch = p.Batch;
pallet.VendId = p.VendId;
pallet.Box = Convert.ToInt32(_oldbox);
pallet.Qty = _oldbox* _PackQty1;
pallet.PalletNum = _oldpalletnum;
db.TB_PALLETS.Add(pallet);
p.Qty = p.Qty- _oldbox * _PackQty1;
}
}
#endregion
#region 新托盘
if (p.Qty != 0)
{
decimal _box = 0;
int _TempQty = Convert.ToInt32(p.Qty);
int _PackQty = Convert.ToInt32(p.PackQty);
if (_TempQty / _PackQty > 0)
{
int _count = _TempQty / _PackQty;
_box += _count;
if (p.Qty % p.PackQty > 0)
{
_box++;
}
}
else
{
if (_TempQty > 0)
{
_box++;
}
}
if (_box <= _palletPack)
{
TB_PALLETS pallet = new TB_PALLETS();
pallet.AsnBillNum = p.AsnBillNum;
pallet.PartCode = p.PartCode;
pallet.Batch = p.Batch;
pallet.VendId = p.VendId;
pallet.Box = Convert.ToInt32(_box);
pallet.Qty = p.Qty;
pallet.PalletNum = SCP_BILLCODE_CONTROLLER.MakePalletCode_QD(codenum);
db.TB_PALLETS.Add(pallet);
_oldpartcode = p.PartCode;
_oldbox = Convert.ToInt32(_palletPack) - _box;
_oldpalletnum = pallet.PalletNum;
codenum++;
}
else
{
decimal _pallet = 0;
_pallet += Convert.ToInt32(_box) / Convert.ToInt32(_palletPack);
if (_box % _palletPack > 0)
{
_pallet++;
}
for (int i = 1; i <= _pallet;i++)
{
TB_PALLETS pallet = new TB_PALLETS();
pallet.AsnBillNum = p.AsnBillNum;
pallet.PartCode = p.PartCode;
pallet.Batch = p.Batch;
pallet.VendId = p.VendId;
pallet.PalletNum = SCP_BILLCODE_CONTROLLER.MakePalletCode_QD(codenum);
if (i == _pallet)
{
pallet.Box = Convert.ToInt32(_box - Convert.ToDecimal(_palletPack) * (_pallet - 1));
pallet.Qty = p.Qty - Convert.ToDecimal(_palletPack) * (_pallet - 1) * _PackQty;
}
else
{
pallet.Box = Convert.ToInt32(_palletPack);
pallet.Qty = Convert.ToDecimal(_palletPack) * _PackQty;
}
db.TB_PALLETS.Add(pallet);
codenum++;
}
}
}
#endregion
}
else
{
string _str = string.Format("零件号:{0},供应商编号:{1},没有维护托盘标包数!请先维护供应商零件信息", p.PartCode, p.VendBatch);
_list.Add(_str);
}
});
int state = db.SaveChanges();
if (state != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.MessageList = _listm;
}
}
}
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_ASN_CONTROLLER), "Save_TB_PALLET", 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_ASN_CONTROLLER), "Save_TB_PALLET", 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_ASN_CONTROLLER), "Save_TB_PALLET", 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_ASN_CONTROLLER), "Save_TB_PALLET", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
public static ResultObject<bool> Save_TB_CREATE_BARCODE_SYJB(List<V_TB_ASN_DETAIL> p_list)
{
ResultObject<bool> _ret = new ResultObject<bool>();

380
Controller/SCP_BARCODE_CONTROLLER.cs

@ -331,6 +331,265 @@ namespace CK.SCP.Controller
}
public static void Get_TS_BARCODE_SMALL_List(TS_BARCODE_SMALL p_entity, Action<ResultObject<IQueryable<TS_BARCODE_SMALL>>> p_action)
{
ResultObject<IQueryable<TS_BARCODE_SMALL>> _ret = new ResultObject<IQueryable<TS_BARCODE_SMALL>>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
IQueryable<TS_BARCODE_SMALL> q = db.TS_BARCODE_SMALL;
if (!string.IsNullOrEmpty(p_entity.BarCode))
{
q = q.Where(p => p.BarCode == p_entity.BarCode);
}
if (!string.IsNullOrEmpty(p_entity.FullBarCode))
{
q = q.Where(p => p.FullBarCode == p_entity.FullBarCode);
}
if (!string.IsNullOrEmpty(p_entity.PartCode))
{
q = q.Where(p => p.PartCode == p_entity.PartCode);
}
if (!string.IsNullOrEmpty(p_entity.VendPartCode))
{
q = q.Where(p => p.VendPartCode == p_entity.VendPartCode);
}
if (!string.IsNullOrEmpty(p_entity.Batch))
{
q = q.Where(p => p.Batch == p_entity.Batch);
}
if (p_entity.ManageType != 0)
{
q = q.Where(p => p.ManageType == p_entity.ManageType);
}
if (!string.IsNullOrEmpty(p_entity.SerialNum))
{
q = q.Where(p => p.SerialNum.Contains(p_entity.SerialNum));
}
if (p_entity.Qty != 0)
{
q = q.Where(p => p.Qty == p_entity.Qty);
}
if (p_entity.BarCodeType != 0)
{
q = q.Where(p => p.BarCodeType == p_entity.BarCodeType);
}
if (!string.IsNullOrEmpty(p_entity.BillNum))
{
q = q.Where(p => p.BillNum.Contains(p_entity.BillNum));
}
if (p_entity.PoBillLine != 0)
{
q = q.Where(p => p.PoBillLine == p_entity.PoBillLine);
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (!string.IsNullOrEmpty(p_entity.VendBatch))
{
q = q.Where(p => p.VendBatch == p_entity.VendBatch);
}
if (p_entity.SmallPackQty != 0)
{
q = q.Where(p => p.SmallPackQty == p_entity.SmallPackQty);
}
if (!string.IsNullOrEmpty(p_entity.CreateOper))
{
q = q.Where(p => p.CreateOper.Contains(p_entity.CreateOper));
}
if (p_entity.State != 0)
{
q = q.Where(p => p.State == p_entity.State);
}
if (!string.IsNullOrEmpty(p_entity.Remark))
{
q = q.Where(p => p.Remark.Contains(p_entity.Remark));
}
if (!string.IsNullOrEmpty(p_entity.PoUnit))
{
q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit));
}
if (!string.IsNullOrEmpty(p_entity.LocUnit))
{
q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit));
}
_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_BARCODE_CONTROLLER), "Get_TS_BARCODE_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_BARCODE_CONTROLLER), "Get_TS_BARCODE_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_BARCODE_CONTROLLER), "Get_TS_BARCODE_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_BARCODE_CONTROLLER), "Get_TS_BARCODE_List", e.Message);
throw e;
}
}
public static ResultObject<List<TS_BARCODE_SMALL>> CreateSmallBarcodeList(V_TB_ASN_DETAIL p_entity, int cnt = 1)
{
ResultObject<List<TS_BARCODE_SMALL>> _ret = new ResultObject<List<TS_BARCODE_SMALL>>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var list = new List<TS_BARCODE_SMALL>();
var part = db.TA_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode);
if (part == null)
{
_ret.MessageList.Add("基础信息未找到该编号零件!");
}
var vendPart= db.TA_VEND_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode && p.VendId == p_entity.VendId);
var ret = GetSmallBarcodeRule(p_entity.PartCode, p_entity.Batch, cnt);
var _part = db.TA_PART.FirstOrDefault(p => p.PartCode == p_entity.PartCode && p.Site == p_entity.Site);
if (ret.State == ReturnStatus.Succeed)
{
var barcodeRule = ret.Result;
for (int i = cnt; i > 0; i--)
{
var createTime = ScpCache.GetServerTime();
var code = GetLastSmallBarCode(p_entity.PartCode, p_entity.Batch, barcodeRule.LastNumber - i + 1);
if (part.PartDesc1.ToUpper().Contains("左") || part.PartDesc1.ToUpper().Contains("LEFT") ||
part.PartDesc2.ToUpper().Contains("左") || part.PartDesc2.ToUpper().Contains("LEFT"))
p_entity.Remark = "L" + p_entity.Remark;
if (part.PartDesc1.ToUpper().Contains("右") || part.PartDesc1.ToUpper().Contains("RIGHT") ||
part.PartDesc2.ToUpper().Contains("右") || part.PartDesc2.ToUpper().Contains("RIGHT"))
p_entity.Remark = "R" + p_entity.Remark;
string _check = (_part.Ischeck == false || _part.Ischeck == null) ? "" : "(免检)";
var barcode = new TS_BARCODE_SMALL
{
BarCode = code,
PartCode = part.PartCode,
VendPartCode = vendPart?.VendPartCode,
Batch = p_entity.Batch,
ProduceDate = (DateTime)p_entity.ProduceDate,
SerialNum = barcodeRule.LastNumber.ToString(ScpCache.Config.),
PoUnit = p_entity.PoUnit,
Qty = p_entity.Qty,
BarCodeType = 1,
BillNum = p_entity.AsnBillNum,
PoBillNum = p_entity.PoBillNum,
PoBillLine = p_entity.PoLine,
VendId = p_entity.VendId,
VendBatch = p_entity.VendBatch,
CreateTime = p_entity.CreateTime,
CreateOper = p_entity.CreateUser,
State = 0,
Remark = p_entity.Remark,
SmallPackQty = p_entity.PackQty,
Site = p_entity.Site
};
if (_part == null)
{
_ret.MessageList.Add("未找到零件,可能是零件编号或地点信息错误,零件编号" + p_entity.PartCode);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateBarcodeList", "未找到零件,可能是零件编号或地点信息错误,零件编号" + p_entity.PartCode);
}
else
{
var _isCheck = (_part.Ischeck == null) ? false : _part.Ischeck;
barcode.Qlevel = _part.Qlevel;
barcode.QMark = (_isCheck == true) ? "免检" : "全检";
barcode.ProjectId = _part.ProjectId;
}
var fullCode = GetFullCode_Small(barcode);
barcode.FullBarCode = fullCode;
list.Add(barcode);
}
_ret.State = ReturnStatus.Succeed;
_ret.Result = list;
}
else
{
_ret.State = ReturnStatus.Failed;
_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.ErrorList.Add(dbEx);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BARCODE_CONTROLLER), "CreateSmallBarcodeList", 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_BARCODE_CONTROLLER), "CreateSmallBarcodeList", 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_BARCODE_CONTROLLER), "CreateSmallBarcodeList", 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_BARCODE_CONTROLLER), "CreateSmallBarcodeList", e.Message);
throw e;
}
return _ret;
}
public static ResultObject<List<TS_BARCODE>> CreateBarcodeList(V_TB_ASN_DETAIL p_entity, int cnt = 1)
{
@ -474,7 +733,19 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static string GetFullCode_Small(TS_BARCODE_SMALL barcode)
{
var fullcode = string.Empty;
switch (ScpCache.Config.)
{
case "1":
fullcode =
GetFullCode(barcode.BarCode, barcode.Qty, barcode.VendId, barcode.VendBatch, barcode.PoBillNum,
barcode.PoBillLine, barcode.ProduceDate, barcode.BillNum);
break;
}
return fullcode;
}
public static string GetFullCode(TS_BARCODE barcode)
{
var fullcode = string.Empty;
@ -533,8 +804,100 @@ namespace CK.SCP.Controller
return null;
}
public static TS_BARCODE_SMALL CreateSmallBarcode(V_TB_ASN_DETAIL p_entity)
{
var ret = CreateSmallBarcodeList(p_entity);
if (ret.State == ReturnStatus.Succeed)
{
return ret.Result[0];
}
return null;
}
private static ResultObject<TS_BARCODE_RULE_SMALL> GetSmallBarcodeRule(string partcode, string batch, int cnt = 1)
{
ResultObject<TS_BARCODE_RULE_SMALL> _ret = new ResultObject<TS_BARCODE_RULE_SMALL>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var ruleBatch = batch.Substring(0, 4);
var barcodeRule = db.TS_BARCODE_RULE_SMALL.Find(partcode, ruleBatch);
if (barcodeRule == null)
{
barcodeRule = new TS_BARCODE_RULE_SMALL
{
PartCode = partcode,
RuleBatch = ruleBatch,
LastNumber = cnt,
State = 0
};
}
else
{
barcodeRule.LastNumber += cnt;
}
barcodeRule.LastBarCode = GetLastSmallBarCode(partcode, batch, barcodeRule.LastNumber);
barcodeRule.LastTime = ScpCache.GetServerTime();
db.TS_BARCODE_RULE_SMALL.AddOrUpdate(p => new { p.PartCode, p.RuleBatch }, barcodeRule);
if (db.SaveChanges() != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = barcodeRule;
}
else
{
_ret.State = ReturnStatus.Failed;
}
}
}
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_BARCODE_CONTROLLER), "GetBarcodeRule", 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_BARCODE_CONTROLLER), "GetBarcodeRule", 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_BARCODE_CONTROLLER), "GetBarcodeRule", 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_BARCODE_CONTROLLER), "GetBarcodeRule", e.Message);
throw e;
}
return _ret;
}
private static ResultObject<TS_BARCODE_RULE> GetBarcodeRule( string partcode, string batch, int cnt = 1)
{
ResultObject<TS_BARCODE_RULE> _ret = new ResultObject<TS_BARCODE_RULE>();
@ -647,7 +1010,22 @@ namespace CK.SCP.Controller
return barcode;
}
private static string GetLastSmallBarCode(string partcode, string batch, int lastnum)
{
var barcode = string.Empty;
barcode += partcode + ScpCache.Config.;
if (ScpCache.Config.)
{
barcode += batch + ScpCache.Config.;
}
else
{
barcode += batch + ScpCache.Config.;
}
barcode += lastnum.ToString(ScpCache.Config.);
return barcode;
}
}
public class TS_BARCODE_S

38
Controller/SCP_BILLCODE_CONTROLLER.cs

@ -42,6 +42,17 @@ namespace CK.SCP.Controller
return GetTablePK("G", "TB_PALLET", "PalletNum", "yyMMdd", 4);
}
/// <summary>
/// 生成托盘码(青岛)
/// </summary>
/// <param name="num"></param>
/// <returns></returns>
public static string MakePalletCode_QD(int num)
{
return GetTablePK_QD("G", "TB_PALLETS", "PalletNum", "yyMMdd", 4,num);
}
public static string MakeASKCode()
{
@ -114,6 +125,33 @@ namespace CK.SCP.Controller
}
return _result;
}
public static string GetTablePK_QD(string Ext, string TableName, string ColName, string Format, int len,int num)
{
var _result = string.Empty;
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
string time = Ext + DateTime.Now.ToString(Format);
string sql = "select max(right(" + ColName + "," + len.ToString() + ")+1) from " + TableName + " where " + ColName + " like '" + time + "%'";
DbRawSqlQuery<int?> result = db.Database.SqlQuery<int?>(sql);
var obj = result.FirstOrDefault();
if (obj == null)
{
_result = time + num.ToString().PadLeft(len, '0');
}
else
{
_result = time + (result.FirstOrDefault()+num).ToString().PadLeft(len, '0');
}
}
}
catch (Exception e)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message);
}
return _result;
}
}

7
Controller/SCP_EXCEL_CONTROLLER.cs

@ -204,9 +204,10 @@ namespace CK.SCP.Controller
//_entity.价格 = itm.Price.ToString();
_entity. = itm.AskQty.ToString();
_entity. = string.IsNullOrEmpty(itm.Remark)?string.Empty:itm.Remark.ToString();
_entity. = itm.OneMonth.ToString();
_entity.= itm.TwoMonth.ToString();
_entity. = itm.ThreeMonth.ToString();
_entity. = itm.EndTime == null ? string.Empty : itm.EndTime.Value.ToString("yyyyMMdd");
_entity. = itm.Extend1.ToString();
_entity.= itm.Extend2.ToString();
_entity. = itm.Extend3.ToString();
_exportDetailList.Add(_entity);
});

74
Controller/SCP_PALLET_CONTROLLER.cs

@ -175,8 +175,82 @@ namespace CK.SCP.Controller
}
}
public static void Get_TB_PALLETS_List(TB_PALLETS p_entity, Action<ResultObject<IQueryable<TB_PALLETS>>> p_action)
{
ResultObject<IQueryable<TB_PALLETS>> _ret = new ResultObject<IQueryable<TB_PALLETS>>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
IQueryable<TB_PALLETS> q = db.TB_PALLETS;
if (p_entity.UID != 0)
{
q = q.Where(p => p.UID == p_entity.UID);
}
if (!string.IsNullOrEmpty(p_entity.AsnBillNum))
{
q = q.Where(p => p.AsnBillNum.Contains(p_entity.AsnBillNum));
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (!string.IsNullOrEmpty(p_entity.PartCode))
{
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
}
_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_INVOICE_CONTROLLER), "Get_TB_PALLETS_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_INVOICE_CONTROLLER), "Get_TB_PALLETS_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_INVOICE_CONTROLLER), "Get_TB_PALLETS_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_INVOICE_CONTROLLER), "Get_TB_PALLETS_List", e.Message);
throw e;
}
}
public ResultObject<bool> Save_V_TB_PALLET(List<TB_PALLET> p_entitys)
{
ResultObject<bool> _ret = new ResultObject<bool>();

51
Controller/SCP_PLAN_MONTH_CONTROLLER.cs

@ -21,7 +21,58 @@ namespace CK.SCP.Controller
return db.TB_PlanMonth.SingleOrDefault(p => p.ID == id);
}
}
public static bool DeletePlanMonthById(TB_PlanMonth model)
{
bool _res=false;
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
db.TB_PlanMonth.Remove(model);
if (db.SaveChanges() != -1)
{
_res = true;
}
}
}
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);
});
}
Utils.LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "DeletePlanMonthById", sb.ToString());
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
}
catch (OptimisticConcurrencyException ex)//并发冲突异常
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "DeletePlanMonthById", ex.ToString());
throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
}
catch (ScpException ex)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "DeletePlanMonthById", 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)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PLAN_MONTH_CONTROLLER), "DeletePlanMonthById", e.Message); throw e;
}
return _res;
}
public static bool UpdatePlanMonthById(TB_PlanMonth model)
{
try

8
Controller/SCP_PO_CONTROLLER.cs

@ -1165,10 +1165,10 @@ namespace CK.SCP.Controller
IsDeleted = false,
GUID = System.Guid.NewGuid(),
};
_venderpart.VendPartCode = p..ToUpper();
_venderpart.VendPartCode = p..ToUpper();
_venderpart.VendPackQty = decimal.Parse(p.);
//_venderpart.MinPackQty = decimal.Parse(p.小包装数);
//_venderpart.PalletPackQty = decimal.Parse(p.托盘包装数);
_venderpart.MinPackQty = decimal.Parse(p.);
_venderpart.PalletPackQty = decimal.Parse(p.);
_venderpart.PoUnit = p.;
_venderpart.Remark = "";
_venderpart.UpdateTime = DateTime.Now;
@ -1925,7 +1925,7 @@ namespace CK.SCP.Controller
}
else
{
p_order_list = p_order_list.Where(p => int.Parse(p.) != 0).ToList();
var VenderList = p_order_list.Select(p => p.).Distinct();

142
Controller/SCP_TS_BARCODE_CONTROLLER.cs

@ -381,6 +381,148 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static void Get_TS_BARCODE_Small_List(TS_BARCODE_SMALL p_entity, Action<ResultObject<IQueryable<TS_BARCODE_SMALL>>> p_action)
{
ResultObject<IQueryable<TS_BARCODE_SMALL>> _ret = new ResultObject<IQueryable<TS_BARCODE_SMALL>>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
IQueryable<TS_BARCODE_SMALL> q = db.TS_BARCODE_SMALL;
if (p_entity.UIDList != null && p_entity.UIDList.Count > 0)
{
q = q.Where(p => p_entity.UIDList.Contains(p.UID));
}
if (!string.IsNullOrEmpty(p_entity.BarCode))
{
q = q.Where(p => p.BarCode.Contains(p_entity.BarCode));
}
if (!string.IsNullOrEmpty(p_entity.FullBarCode))
{
q = q.Where(p => p.FullBarCode.Contains(p_entity.FullBarCode));
}
if (!string.IsNullOrEmpty(p_entity.PartCode))
{
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
}
if (!string.IsNullOrEmpty(p_entity.VendPartCode))
{
q = q.Where(p => p.VendPartCode.Contains(p_entity.VendPartCode));
}
if (!string.IsNullOrEmpty(p_entity.Batch))
{
q = q.Where(p => p.Batch.Contains(p_entity.Batch));
}
if (p_entity.ManageType != 0)
{
q = q.Where(p => p.ManageType == p_entity.ManageType);
}
if (!string.IsNullOrEmpty(p_entity.SerialNum))
{
q = q.Where(p => p.SerialNum.Contains(p_entity.SerialNum));
}
if (p_entity.Qty != 0)
{
q = q.Where(p => p.Qty == p_entity.Qty);
}
if (p_entity.BarCodeType != 0)
{
q = q.Where(p => p.BarCodeType == p_entity.BarCodeType);
}
if (!string.IsNullOrEmpty(p_entity.BillNum))
{
q = q.Where(p => p.BillNum.Contains(p_entity.BillNum));
}
if (p_entity.PoBillLine != 0)
{
q = q.Where(p => p.PoBillLine == p_entity.PoBillLine);
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (!string.IsNullOrEmpty(p_entity.VendBatch))
{
q = q.Where(p => p.VendBatch.Contains(p_entity.VendBatch));
}
if (p_entity.SmallPackQty != 0)
{
q = q.Where(p => p.SmallPackQty == p_entity.SmallPackQty);
}
if (!string.IsNullOrEmpty(p_entity.CreateOper))
{
q = q.Where(p => p.CreateOper.Contains(p_entity.CreateOper));
}
if (p_entity.State != 0)
{
q = q.Where(p => p.State == p_entity.State);
}
if (!string.IsNullOrEmpty(p_entity.Remark))
{
q = q.Where(p => p.Remark.Contains(p_entity.Remark));
}
if (!string.IsNullOrEmpty(p_entity.PoUnit))
{
q = q.Where(p => p.PoUnit.Contains(p_entity.PoUnit));
}
if (!string.IsNullOrEmpty(p_entity.LocUnit))
{
q = q.Where(p => p.LocUnit.Contains(p_entity.LocUnit));
}
if (!string.IsNullOrEmpty(p_entity.PartName))
{
q = q.Where(p => p.PartName.Contains(p_entity.PartName));
}
_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_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_Small_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_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_Small_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_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_Small_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_TS_BARCODE_CONTROLLER), "Get_TS_BARCODE_Small_List", e.Message);
throw e;
}
}
public ResultObject<bool> Del_TS_BARCODE(List<TS_BARCODE> p_entitys)
{

4
Models/CK.SCP.Models.csproj

@ -339,6 +339,7 @@
<Compile Include="ScpEntity\ExcelExportEnttity\SCP_VENDER_PART_EXPORT.cs" />
<Compile Include="ScpEntity\TA_VENDER_EXTEND.cs" />
<Compile Include="ScpEntity\TB_CLAIM_APPEND.cs" />
<Compile Include="ScpEntity\TB_PALLETS.cs" />
<Compile Include="ScpEntity\TB_PLAN_CUSTOM.cs" />
<Compile Include="ScpEntity\TB_PO_PLAN_EXTEND.cs" />
<Compile Include="ScpEntity\TB_PO_PLAN.cs" />
@ -370,6 +371,8 @@
<Compile Include="ScpEntity\TB_PALLET_DETAIL.cs" />
<Compile Include="ScpEntity\TS_BARCODE_CUSTOM.cs" />
<Compile Include="ScpEntity\TS_BARCODE_RULE_CUSTOM.cs" />
<Compile Include="ScpEntity\TS_BARCODE_RULE_SMALL.cs" />
<Compile Include="ScpEntity\TS_BARCODE_SMALL.cs" />
<Compile Include="ScpEntity\V_ARRIVE_PRINT.cs" />
<Compile Include="ScpEntity\V_FORECAST_REPORT.cs" />
<Compile Include="ScpEntity\V_Pie_Chart.cs" />
@ -415,6 +418,7 @@
<Compile Include="ScpEntity\V_TB_FORECAST.cs" />
<Compile Include="ScpEntity\V_TB_INVOICE_ASK.cs" />
<Compile Include="ScpEntity\V_TB_PALLET.cs" />
<Compile Include="ScpEntity\V_TB_PALLETS.cs" />
<Compile Include="ScpEntity\V_TB_PALLET_DETAIL .cs" />
<Compile Include="ScpEntity\V_TB_INCOMPLETE_ASK.cs" />
<Compile Include="ScpEntity\V_TB_ASK_DETAIL.cs" />

4
Models/Enums/SCP_ENUM.cs.cs

@ -101,6 +101,8 @@ namespace CK.SCP.Models.Enums
NoConfirm = 7,
[Description("退回")]
Back = 8,
[Description("关闭")]
Close = -2,
}
@ -220,6 +222,8 @@ namespace CK.SCP.Models.Enums
ASN = 1,
[Description("发货单")]
BAR_CODE =2,
[Description("托盘")]
Pallet_CODE = 3,
}
public enum PalletType

2
Models/ScpCache.cs

@ -314,6 +314,6 @@ namespace CK.SCP.Models
public string { get; set; } = "1";
public string { get; set; } = "000000";
public string { get; set; } = "600000";
}
}

4
Models/ScpEntities.cs

@ -52,6 +52,7 @@ namespace CK.SCP.Models
public virtual DbSet<TL_BILL> TL_BILL { get; set; }
public virtual DbSet<TL_OPER> TL_OPER { get; set; }
public virtual DbSet<TS_BARCODE> TS_BARCODE { get; set; }
public virtual DbSet<TS_BARCODE_SMALL> TS_BARCODE_SMALL { get; set; }
public virtual DbSet<TS_STOCK> TS_STOCK { get; set; }
public virtual DbSet<TS_UNI_API> TS_UNI_API { get; set; }
public virtual DbSet<TS_UNI_API_HIS> TS_UNI_API_HIS { get; set; }
@ -93,6 +94,7 @@ namespace CK.SCP.Models
public virtual DbSet<V_TB_REJECT> V_TB_REJECT { get; set; }
public virtual DbSet<V_TB_REJECT_DETAIL> V_TB_REJECT_DETAIL { get; set; }
public virtual DbSet<TS_BARCODE_RULE> TS_BARCODE_RULE { get; set; }
public virtual DbSet<TS_BARCODE_RULE_SMALL> TS_BARCODE_RULE_SMALL { get; set; }
public virtual DbSet<V_TB_INVOICE_DETAIL> V_TB_INVOICE_DETAIL { get; set; }
public virtual DbSet<V_TB_INVOICE> V_TB_INVOICE { get; set; }
public virtual DbSet<V_TB_INVOICE_DETAIL_RED> V_TB_INVOICE_DETAIL_RED { get; set; }
@ -107,6 +109,8 @@ namespace CK.SCP.Models
public virtual DbSet<V_TB_PALLET> V_TB_PALLET { get; set; }
public virtual DbSet<TB_PALLET_DETAIL> TB_PALLET_DETAIL { get; set; }
public virtual DbSet<TB_PALLET> TB_PALLET { get; set; }
public virtual DbSet<TB_PALLETS> TB_PALLETS { get; set; }
public virtual DbSet<V_TB_PALLETS> V_TB_PALLETS { get; set; }
public virtual DbSet<TB_QUALITY> TB_QUALITY { get; set; }
public virtual DbSet<V_TB_QUALITY> V_TB_QUALITY { get; set; }
public virtual DbSet<V_TB_RETURN> V_TB_RETURN { get; set; }

2
Models/ScpEntity/ExcelExportEnttity/SCP_ASK_DETAIL_EXPORT.cs

@ -19,7 +19,7 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity
//public string 价格 {get;set;} //"Price"
public string {get;set;} //"AskQty"
public string { get; set; } //"ReMark"
public string { get; set; }
public string { get; set; } //"OneMonth"
public string { get; set; } //"TwoMonth"
public string { get; set; } //"ThreeMonth"

17
Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs

@ -106,23 +106,6 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity
public string { get; set; }
public string { get; set; }
public string { set; get; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
}
}

1
Models/ScpEntity/ExcelExportEnttity/SCP_VENDER_PART_EXPORT.cs

@ -11,6 +11,7 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }

2
Models/ScpEntity/TA_VENDER.cs

@ -19,7 +19,7 @@ namespace CK.SCP.Models.ScpEntity
public string VendName { get; set; }
[Required]
[StringLength(2)]
[StringLength(50)]
public string VendAbbCode { get; set; }
[StringLength(50)]

4
Models/ScpEntity/TA_VEND_PART.cs

@ -41,9 +41,9 @@ namespace CK.SCP.Models.ScpEntity
public int? TransportationTime { get; set; }
//public decimal? MinPackQty { get; set; }
public decimal? MinPackQty { get; set; }
//public decimal? PalletPackQty { get; set; }
public decimal? PalletPackQty { get; set; }
[NotMapped]
[DisplayName("¹©Ó¦ÉÌÃû³Æ")]

26
Models/ScpEntity/TB_PALLETS.cs

@ -0,0 +1,26 @@
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 partial class TB_PALLETS
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public long UID { get; set; }
[StringLength(50)]
public string AsnBillNum { get; set; }
public string PalletNum { get; set; }
public string PartCode { get; set; }
public string Batch { get; set; }
public string VendId { get; set; }
public int Box { get; set; }
public decimal Qty { get; set; }
}
}

32
Models/ScpEntity/TS_BARCODE_RULE_SMALL.cs

@ -0,0 +1,32 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace CK.SCP.Models.ScpEntity
{
public partial class TS_BARCODE_RULE_SMALL
{
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int UID { get; set; }
[Key]
[Column(Order = 0)]
[StringLength(50)]
public string PartCode { get; set; }
[Key]
[Column(Order = 1)]
[StringLength(50)]
public string RuleBatch { get; set; }
public int LastNumber { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(500)]
public string LastBarCode { get; set; }
public DateTime LastTime { get; set; }
public int State { get; set; }
}
}

101
Models/ScpEntity/TS_BARCODE_SMALL.cs

@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace CK.SCP.Models.ScpEntity
{
public partial class TS_BARCODE_SMALL
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long UID { get; set; }
[StringLength(50)]
public string BarCode { get; set; }
[Required]
[StringLength(500)]
public string FullBarCode { get; set; }
[Required]
[StringLength(50)]
public string PartCode { get; set; }
[StringLength(50)]
public string VendPartCode { get; set; }
[Required]
[StringLength(50)]
public string Batch { get; set; }
[Column(TypeName = "datetime2")]
public DateTime ProduceDate { get; set; }
public int ManageType { get; set; }
[Required]
[StringLength(50)]
public string SerialNum { get; set; }
[Column(TypeName = "money")]
public decimal Qty { get; set; }
public int BarCodeType { get; set; }
[Required]
[StringLength(50)]
public string BillNum { get; set; }
public int PoBillLine { get; set; }
[StringLength(50)]
public string VendId { get; set; }
[StringLength(50)]
public string VendBatch { get; set; }
[Column(TypeName = "money")]
public decimal SmallPackQty { get; set; }
[Required]
[StringLength(50)]
public string CreateOper { get; set; }
public DateTime CreateTime { get; set; }
public int State { get; set; }
[StringLength(500)]
public string Remark { get; set; }
public string PoUnit { get; set; }
public string LocUnit { get; set; }
public string Site { get; set; }
public string Qlevel { get; set; }
public string QMark { get; set; }
public string ProjectId { get; set; }
public string PoBillNum { get; set; }
[DisplayName("供应商名称")]
public string VendName => ScpCache.GetVendName(VendId, Site);
[DisplayName("零件名称")]
public string PartDesc => ScpCache.GetPartDesc1(PartCode, Site);
[DisplayName("零件名称")]
public string PartName => ScpCache.GetPartDesc1(PartCode, Site);
[NotMapped]
public List<long> UIDList { get; set; }
}
}

2
Models/ScpEntity/V_ASN_PRINT.cs

@ -22,7 +22,7 @@ namespace CK.SCP.Models.ScpEntity
public string MaterialPlanner{get;set;}
public string CAAIPhone{get;set;}
public string CAAIFax { get; set; }
public string Total { get; set; }
}

1
Models/ScpEntity/V_TA_VEND_PART.cs

@ -23,6 +23,7 @@ namespace CK.SCP.Models.ScpEntity
public long UID { get; set; }
public string VendId { get; set; }
public string PartCode { get; set; }
public string VendPartCode { get; set; }
public decimal VendPackQty { get; set; }
public string PoUnit { get; set; }
public string Site { get; set; }

3
Models/ScpEntity/V_TB_ASK_DETAIL.cs

@ -84,9 +84,6 @@ namespace CK.SCP.Models.ScpEntity
public decimal? ReduceQty { get; set; }
public decimal OneMonth { get; set; }
public decimal TwoMonth { get; set; }
public decimal ThreeMonth { get; set; }
public int ValidityDays { get; set; }

22
Models/ScpEntity/V_TB_PALLETS.cs

@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace CK.SCP.Models.ScpEntity
{
public partial class V_TB_PALLETS
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
public long UID { get; set; }
[StringLength(50)]
public string AsnBillNum { get; set; }
public string PalletNum { get; set; }
public string PartCode { get; set; }
public string PartName { get; set; }
public string Batch { get; set; }
public string VendId { get; set; }
public int Box { get; set; }
public decimal Qty { get; set; }
}
}

89
SCP/Common/ReportHelper.cs

@ -22,6 +22,9 @@ namespace SCP.Common
ASN = 102,
ARRIVE = 103,
CUSTOM_PAGE = 104,
ASN_PALLET =107,
PALLET=105,
SmallBARCODE = 106,
}
public class TextProvider
{
@ -60,8 +63,30 @@ namespace SCP.Common
case (int)PrintType.CUSTOM_PAGE:
ds =GET_CUSTOM_PAGE(p_request);
break;
case (int)PrintType.ASN_PALLET:
ds = GET_ASN_PALLET(p_request);
break;
case (int)PrintType.PALLET:
ds = GET_TB_PALLETS(p_request);
break;
case (int)PrintType.SmallBARCODE:
ds = GET_TS_BAR_Small(p_request);
break;
}
return ds;
}
/// <summary>
/// 获取发货单(带托盘明细的发货单)
/// </summary>
/// <param name="p_request"></param>
/// <returns></returns>
private static DataSet GET_ASN_PALLET(HttpRequest p_request)
{
DataSet ds = new DataSet();
if (!string.IsNullOrEmpty(p_request["AsnBillNum"]))
{
var AskBillNum = p_request["AsnBillNum"].ToString();
ds = SCP_ASN_CONTROLLER.ASN_PALLET_REPORT(AskBillNum);
}
return ds;
}
@ -74,6 +99,33 @@ namespace SCP.Common
ds=SCP_ASN_CONTROLLER.ASN_REPORT(AskBillNum);
}
return ds;
}
/// <summary>
/// 获取托盘
/// </summary>
/// <param name="p_request"></param>
/// <returns></returns>
private static DataSet GET_TB_PALLETS(HttpRequest p_request)
{
DataSet ds = new DataSet();
TB_PALLETS _pallet = new TB_PALLETS();
if (!string.IsNullOrEmpty(p_request["AsnBillNum"]))
{
_pallet.AsnBillNum = p_request["AsnBillNum"].ToString();
}
if (!string.IsNullOrEmpty(_pallet.AsnBillNum))
{
SCP_PALLET_CONTROLLER.Get_TB_PALLETS_List(_pallet, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
var _ls = ret.Result.DistinctBy(t=>t.PalletNum);
var dt = ConvertHelper.ToDataTable(_ls.ToList());
ds.Tables.Add(dt);
}
});
}
return ds;
}
private static DataSet GET_TS_BAR(HttpRequest p_request)
{
@ -112,7 +164,40 @@ namespace SCP.Common
return ds;
}
private static DataSet GET_TS_BAR_Small(HttpRequest p_request)
{
DataSet ds = new DataSet();
TS_BARCODE_SMALL _bar = new TS_BARCODE_SMALL();
if (!string.IsNullOrEmpty(p_request["AsnBillNum"]))
{
_bar.BillNum = p_request["AsnBillNum"].ToString();
}
if (!string.IsNullOrEmpty(p_request["Barcode"]))
{
var _ls = p_request["Barcode"].ToString().Split('_').ToList();
_bar.UIDList = new List<long>();
_ls.ForEach(p =>
{
if (!string.IsNullOrEmpty(p))
{
_bar.UIDList.Add(long.Parse(p));
}
});
}
if (!string.IsNullOrEmpty(_bar.BillNum) || _bar.UIDList != null)
{
SCP_TS_BARCODE_CONTROLLER.Get_TS_BARCODE_Small_List(_bar, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
var dt = ConvertHelper.ToDataTable(ret.Result.ToList());
ds.Tables.Add(dt);
}
});
}
return ds;
}
private static DataSet GET_TS_BAR_CUSTOM(HttpRequest p_request)
{

50
SCP/SCP.csproj

@ -2913,6 +2913,8 @@
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
<Content Include="main.aspx" />
<Content Include="Views\PlanData\ASN_STATE.aspx" />
<Content Include="Views\PlanData\PlanMonth.aspx" />
<Content Include="Views\PlanData\PlanMonthEdit.aspx" />
<Content Include="Views\PlanData\SCP_ASK.aspx" />
<Content Include="Views\PlanData\SCP_ASK_ADD.aspx" />
<Content Include="Views\PlanData\SCP_FORECAST.aspx" />
@ -2931,6 +2933,7 @@
<Content Include="Views\Report\SCP_OTD_REPORT.aspx" />
<Content Include="Views\Report\SCP_RECVICE_YEAR_REPORT.aspx" />
<Content Include="Views\Report\SCP_RECVICE_REPORT.aspx" />
<Content Include="Views\SupplierData\PlanMonth.aspx" />
<Content Include="Views\SupplierData\SCP_FORECAST.aspx" />
<Content Include="Views\SupplierData\SCP_PO_PLAN_EXTEND_VIEW.aspx" />
<Content Include="Views\SupplierData\SCP_PO_PLAN_VIEW.aspx" />
@ -4577,9 +4580,9 @@
<Content Include="Views\青岛一汽法雷奥\PlanData\SCP_PRODUCT_DETAIL.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASK.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASK_DETAIL.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN_CREATE.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_SHIP_DETAIL_BARCODE.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_TS_BARCODE.aspx" />
<Content Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN_DETAIL.aspx" />
<Content Include="Web.config">
<SubType>Designer</SubType>
</Content>
@ -5103,6 +5106,20 @@
<Compile Include="Views\PlanData\ASN_STATE.aspx.designer.cs">
<DependentUpon>ASN_STATE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\PlanMonth.aspx.cs">
<DependentUpon>PlanMonth.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\PlanData\PlanMonth.aspx.designer.cs">
<DependentUpon>PlanMonth.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\PlanMonthEdit.aspx.cs">
<DependentUpon>PlanMonthEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\PlanData\PlanMonthEdit.aspx.designer.cs">
<DependentUpon>PlanMonthEdit.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_ASK.aspx.cs">
<DependentUpon>SCP_ASK.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -5228,6 +5245,13 @@
<Compile Include="Views\Report\SCP_RECVICE_REPORT.aspx.designer.cs">
<DependentUpon>SCP_RECVICE_REPORT.aspx</DependentUpon>
</Compile>
<Compile Include="Views\SupplierData\PlanMonth.aspx.cs">
<DependentUpon>PlanMonth.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\SupplierData\PlanMonth.aspx.designer.cs">
<DependentUpon>PlanMonth.aspx</DependentUpon>
</Compile>
<Compile Include="Views\SupplierData\SCP_FORECAST.aspx.cs">
<DependentUpon>SCP_FORECAST.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -6102,6 +6126,13 @@
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASK_DETAIL.aspx.designer.cs">
<DependentUpon>SCP_ASK_DETAIL.aspx</DependentUpon>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN.aspx.cs">
<DependentUpon>SCP_ASN.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN.aspx.designer.cs">
<DependentUpon>SCP_ASN.aspx</DependentUpon>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN_CREATE.aspx.cs">
<DependentUpon>SCP_ASN_CREATE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -6109,19 +6140,12 @@
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN_CREATE.aspx.designer.cs">
<DependentUpon>SCP_ASN_CREATE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_SHIP_DETAIL_BARCODE.aspx.cs">
<DependentUpon>SCP_SHIP_DETAIL_BARCODE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_SHIP_DETAIL_BARCODE.aspx.designer.cs">
<DependentUpon>SCP_SHIP_DETAIL_BARCODE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_TS_BARCODE.aspx.cs">
<DependentUpon>SCP_TS_BARCODE.aspx</DependentUpon>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN_DETAIL.aspx.cs">
<DependentUpon>SCP_ASN_DETAIL.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_TS_BARCODE.aspx.designer.cs">
<DependentUpon>SCP_TS_BARCODE.aspx</DependentUpon>
<Compile Include="Views\青岛一汽法雷奥\SupplierData\SCP_ASN_DETAIL.aspx.designer.cs">
<DependentUpon>SCP_ASN_DETAIL.aspx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>

1
SCP/Views/BasicData/SCP_TA_VEND_PART.aspx

@ -61,6 +61,7 @@
<f:BoundField SortField="VendName" DataField="VendName" HeaderText="供应商名称" ColumnID="SupplierName" Width="200px" />
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PartCode" Width="100px"/>
<f:BoundField SortField="PartDesc" DataField="PartDesc" HeaderText="零件名称" ColumnID="PartDesc" Width="200px" />
<f:BoundField SortField="VendPartCode" DataField="VendPartCode" HeaderText="供应商零件号" ColumnID="VendPartCode" Width="100px"/>
<f:BoundField SortField="VendPackQty" DataField="VendPackQty" HeaderText="标包数" ColumnID="VendPackQty" Width="100px" />
<f:BoundField SortField="MinPackQty" DataField="MinPackQty" HeaderText="小包装数" ColumnID="MinPackQty" Width="100px" />
<f:BoundField SortField="PalletPackQty" DataField="PalletPackQty" HeaderText="托盘包装数" ColumnID="PalletPackQty" Width="100px" />

110
SCP/Views/PlanData/PlanMonth.aspx

@ -0,0 +1,110 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanMonth.aspx.cs" Inherits="SCP.PlanData.PlanMonth" %>
<!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">
<Items>
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload">
</f:Button>
<f:Button ID="btnAdd" runat="server" EnablePostBack="True" Text="新增" Icon="ApplicationAdd">
</f:Button>
<f:Button ID="btnEdit" runat="server" EnablePostBack="True" Text="修改" Icon="ApplicationEdit" OnClick="btnEdit_OnClick">
</f:Button>
<%-- <f:Button ID="btnDelete" runat="server" EnablePostBack="True" Text="删除" Icon="ApplicationDelete" OnClick="btnDelete_Click">
</f:Button>--%>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnPublish" runat="server" EnablePostBack="True" Text="发布" Icon="Accept" OnClick="btnPublish_OnClick">
</f:Button>
<f:Button ID="Button6" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="Button6_OnClick">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick">
</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">
<Items>
<f:Label runat="server" Label="供应商编号" />
<f:TextBox ID="txtSupplierCode" runat="server" />
<f:Label runat="server" Label="供应商名称" />
<f:TextBox ID="txtVendName" runat="server" />
<f:Label runat="server" Label="文件编号" />
<f:TextBox ID="txtCode" runat="server" />
<f:Label runat="server" Label="文件描述" />
<f:TextBox ID="txtName" runat="server" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Label runat="server" Label="版本号" />
<f:TextBox ID="txtVer" runat="server" />
<f:Label runat="server" Label="发布用户" />
<f:TextBox ID="txtUserName" runat="server" />
<f:Label runat="server" Label="是否发布" />
<f:CheckBox ID="txtIsSend" runat="server" />
<f:Label runat="server" Label="新增时间" />
<f:DatePicker ID="DatePicker1" runat="server" Required="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Label runat="server" Label="发布时间" />
<f:DatePicker ID="DatePicker2" runat="server" Required="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Button runat="server" ID="btnClose" Text="关闭" OnClick="btnClose_OnClick"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_OnClick" Text="快速查找">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="ID" IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True">
<Columns>
<f:BoundField runat="server" HeaderText="供应商编号" ColumnID="" DataField="SupplierCode" />
<f:BoundField runat="server" HeaderText="供应商名称" ColumnID="" DataField="VendName" />
<f:BoundField runat="server" HeaderText="文件编号" ColumnID="" DataField="Code" />
<f:BoundField runat="server" HeaderText="文件描述" ColumnID="" DataField="Name" />
<f:BoundField runat="server" HeaderText="版本号" ColumnID="" DataField="Ver" />
<f:HyperLinkField HeaderText="文件下载" DataToolTipField="FileName" DataTextField="FileName"
DataTextFormatString="{0}" DataNavigateUrlFields="FileName" DataNavigateUrlFormatString="../../uploadfiles/{0}"
DataNavigateUrlFieldsEncode="true" Target="_blank" ColumnID="FileName" Width="260px" />
<f:BoundField runat="server" HeaderText="新增时间" ColumnID="" DataField="AddTime" />
<f:BoundField runat="server" HeaderText="发布用户" ColumnID="" DataField="UserName" />
<f:BoundField runat="server" HeaderText="是否发布" ColumnID="" DataField="IsSend" />
<f:BoundField runat="server" HeaderText="发布时间" ColumnID="" DataField="SendTime" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True"
WindowPosition="Center" IsModal="true" Title="修改" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="640px" Width="700px" />
</form>
</body>
</html>

272
SCP/Views/PlanData/PlanMonth.aspx.cs

@ -0,0 +1,272 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Common;
using CK.SCP.Controller;
using FineUI;
using SCP.admin;
namespace SCP.PlanData
{
public partial class PlanMonth : PageBase
{
public List<V_PlanMonth> _list;
public static int num;
private TB_PlanMonth modelPlanMonth;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
DatePicker1.SelectedDate = DateTime.Now;
DatePicker2.SelectedDate = DateTime.Now;
btnAdd.OnClientClick = Window1.GetShowReference("../PlanData/PlanMonthEdit.aspx", "新增");
//OpenWindow_New("/PlanData/PlanMonthEdit.aspx", "新增");
}
}
public void BindData()
{
Expression<Func<V_PlanMonth, dynamic>> select = c => c;
Expression<Func<V_PlanMonth, bool>> where = c => true;
Expression<Func<V_PlanMonth, int>> order = c => c.ID;
List<V_PlanMonth> listsss = SCPDB.V_PlanMonth.Where(where.Compile()).ToList();
Grid1.DataSource = listsss;
Grid1.RecordCount = listsss.Count;
Grid1.DataBind();
}
//显示
protected void btnShow_OnClick(object sender, EventArgs e)
{
gp1.Hidden = false;
}
//关闭
protected void btnClose_OnClick(object sender, EventArgs e)
{
gp1.Hidden = true;
}
//查询
protected void BtnSearch_OnClick(object sender, EventArgs e)
{
_list = SearchData(out num);
Grid1.RecordCount = num;
Grid1.DataSource = _list;
Grid1.DataBind();
}
public List<V_PlanMonth> SearchData(out int num)
{
Expression<Func<V_PlanMonth, bool>> where = c => true;
if (!string.IsNullOrEmpty(txtSupplierCode.Text))
{
where = c => c.SupplierCode.Contains(txtSupplierCode.Text);
}
if (!string.IsNullOrEmpty(txtVendName.Text))
{
where = where.And(p => p.VendName.Contains(txtVendName.Text));
}
if (!string.IsNullOrEmpty(txtCode.Text))
{
where = where.And(p => p.Code.Contains(txtCode.Text));
}
if (!string.IsNullOrEmpty(txtName.Text))
{
where = where.And(p => p.Name.Contains(txtName.Text));
}
if (!string.IsNullOrEmpty(txtVer.Text))
{
where = where.And(p => p.Ver.Contains(txtVer.Text));
}
if (!string.IsNullOrEmpty(txtUserName.Text))
{
where = where.And(p => p.UserName.Contains(txtUserName.Text));
}
if (txtIsSend.Checked)
{
where = where.And(p => p.IsSend == "是");
}
if (!string.IsNullOrEmpty(DatePicker1.Text))
{
where = where.And(p => p.AddTime == DatePicker1.SelectedDate);
}
if (!string.IsNullOrEmpty(DatePicker1.Text))
{
where = where.And(p => p.SendTime == DatePicker2.SelectedDate);
}
List<V_PlanMonth> list = SCPDB.V_PlanMonth.Where(where.Compile()).ToList();
num = SCPDB.V_PlanMonth.Where(where.Compile()).Count();
return list;
}
//导出
protected void Button6_OnClick(object sender, EventArgs e)
{
DateTime dt1 = (DateTime)DatePicker1.SelectedDate;
DateTime dt2 = (DateTime)DatePicker2.SelectedDate;
//Expression<Func<V_QadOrder, dynamic>> select = c => c;
//Expression<Func<V_QadOrder, bool>> where = c => c.StartDate >= dt1 && c.EndDate <= dt2;
//Expression<Func<V_QadOrder, decimal>> order = c => c.ID;
//int total;
//var list = EntitiesHelper.GetPagedDataDesc(SCPDB,
// select,
// where,
// order,
// Grid1.PageIndex,
// Grid1.PageSize,
// out total).ToList();
//DataTable dtData = ListHelper.ListToDataTable(list);
//string downname = MyWebString.GetOrderNumber() + ".xls";
//string filename = Server.MapPath("~/exportfiles/" + downname);
//MyExcel excel = new MyExcel();
//excel.NewExcel(filename);
//excel.NewSheet("Sheet1");
//int rowindex = 0; //当前列所在位置
////创建第一行的字段
//excel.CreateRow(rowindex);
//int colindex = 0;
//for (int i = 0; i < dtData.Columns.Count; i++)
//{
// excel.CreateCell(rowindex, colindex);
// excel.SetCellValue(rowindex, colindex, Grid1.Columns[i].HeaderText.Trim());
// colindex++;
//}
//rowindex++;
//foreach (DataRow drOutput in dtData.Rows)
//{
// excel.CreateRow(rowindex);
// colindex = 0;
// for (int k = 0; k < Grid1.Columns.Count; k++)
// {
// excel.CreateCell(rowindex, colindex);
// excel.SetCellValue(rowindex, colindex, drOutput[k].ToString());
// colindex++;
// }
// rowindex++;
//}
//excel.Save();
//Alert.Show("<a href='/exportfiles/" + downname + "'>" + downname + "</a>", "文件导出成功,请点击文件名下载", MessageBoxIcon.Information);
}
//TODO 找不到email
public void SendMail(string Name)
{
TA_VENDER model = new TA_VENDER();
TA_VENDER modelVender = SCP_PLAN_MONTH_CONTROLLER.GetVend();
if (modelVender != null)
{
string mails = "";
mails += modelVender.Email + ",";
if (mails != "")
{
mails = mails.Substring(0, mails.Length - 1);
}
string mailbody = "";
mailbody += "尊敬的供应商<br>";
mailbody += "你好!<br><br>";
mailbody += "月计划 <b>" + Name + "</b> 已经发布,请到供应商协同网站打开查看!<br>";
mailbody += "<br><br><br><br>日期:" + DateTime.Now;
MyWebSmtpMail webmail = new MyWebSmtpMail();
webmail.Send(mails, mailbody, "月计划发布通知");
}
}
protected void btnEdit_OnClick(object sender, EventArgs e)
{
string id = GetSelectedDataKey(Grid1, 0);
string url = String.Format("../PlanData/PlanMonthEdit.aspx?ID={0}", id);
PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
protected void btnPublish_OnClick(object sender, EventArgs e)
{
//TODO 获取不到选中行 多选没测试
string id = GetSelectedDataKey(Grid1, 0);
if (id != null)
{
int ID = Convert.ToInt32(id);
modelPlanMonth = SCP_PLAN_MONTH_CONTROLLER.GetPlanMonthById(ID);
if (modelPlanMonth != null)
{
if (modelPlanMonth.IsSend != "是")
{
SCP_PLAN_MONTH_CONTROLLER.UpdatePlanMonthById(modelPlanMonth);
}
try
{
SendMail(modelPlanMonth.Name);
}
catch (Exception ex)
{
throw;
}
}
}
}
protected void btnDelete_Click(object sender, EventArgs e)
{
string id = GetSelectedDataKey(Grid1, 0);
if (id != null)
{
int ID = Convert.ToInt32(id);
modelPlanMonth = SCP_PLAN_MONTH_CONTROLLER.GetPlanMonthById(ID);
if (modelPlanMonth != null)
{
//if (modelPlanMonth.IsSend != "是")
//{
var _res = SCP_PLAN_MONTH_CONTROLLER.DeletePlanMonthById(modelPlanMonth);
if (_res)
{
BindData();
Alert.Show("删除成功");
}
else
{
Alert.Show("删除失败");
}
//}
//else
//{
// Alert.Show("发布信息不能删除!");
//}
}
}
}
}
}

133
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx.designer.cs → SCP/Views/PlanData/PlanMonth.aspx.designer.cs

@ -7,10 +7,10 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP..SupplierData {
namespace SCP.PlanData {
public partial class SCP_SHIP_DETAIL_BARCODE {
public partial class PlanMonth {
/// <summary>
/// form1 控件。
@ -22,112 +22,184 @@ namespace SCP.青岛一汽法雷奥.SupplierData {
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.PageManager PageManager1;
protected global::FineUI.Panel Panel1;
/// <summary>
/// Panel1 控件。
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Button3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button3;
/// <summary>
/// btnAdd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnAdd;
/// <summary>
/// Toolbar1 控件。
/// btnEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar1;
protected global::FineUI.Button btnEdit;
/// <summary>
/// ToolbarSeparator1 控件。
/// btnPublish 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
protected global::FineUI.Button btnPublish;
/// <summary>
/// btnRefresh 控件。
/// Button6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnRefresh;
protected global::FineUI.Button Button6;
/// <summary>
/// ToolbarSeparator2 控件。
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator2;
protected global::FineUI.Button btnShow;
/// <summary>
/// btnOutput 控件。
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// btnPrintRe 控件。
/// txtSupplierCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnPrintRe;
protected global::FineUI.TextBox txtSupplierCode;
/// <summary>
/// ToolbarFill1 控件。
/// txtVendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarFill ToolbarFill1;
protected global::FineUI.TextBox txtVendName;
/// <summary>
/// txtKeyword 控件。
/// txtCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtKeyword;
protected global::FineUI.TextBox txtCode;
/// <summary>
/// btnSearch 控件。
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnSearch;
protected global::FineUI.TextBox txtName;
/// <summary>
/// ToolbarText1 控件。
/// txtVer 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarText ToolbarText1;
protected global::FineUI.TextBox txtVer;
/// <summary>
/// txtUserName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtUserName;
/// <summary>
/// txtIsSend 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.CheckBox txtIsSend;
/// <summary>
/// DatePicker1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DatePicker1;
/// <summary>
/// DatePicker2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DatePicker2;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnClose;
/// <summary>
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// Grid1 控件。
@ -137,5 +209,14 @@ namespace SCP.青岛一汽法雷奥.SupplierData {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
}
}

44
SCP/Views/PlanData/PlanMonthEdit.aspx

@ -0,0 +1,44 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanMonthEdit.aspx.cs" Inherits="SCP.PlanData.PlanMonthEdit" %>
<!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="btnOK" runat="server" Text="保存关闭" OnClick="btnOK_OnClick">
</f:Button>
<f:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_OnClick">
</f:Button>
<f:Button ID="btnClose" runat="server" OnClick="btnClose_OnClick" Text="关闭" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:SimpleForm ID="SimpleForm1" runat="server" BodyPadding="20px"
ShowHeader="false" ShowBorder="False">
<Items>
<f:DropDownList runat="server" Label="供应商" ID="ddl"/>
<f:TextBox ID="txtCode" runat="server" Label="文件编号" Text="" MinLength="1" Required="True" MaxLength="50" NextFocusControl="txtName"></f:TextBox>
<f:TextBox ID="txtName" runat="server" Label="文件描述" Text="" MinLength="1" Required="True" MaxLength="50" NextFocusControl="txtVer"></f:TextBox>
<f:TextBox ID="txtVer" runat="server" Label="版本号" Text="" MinLength="1" Required="True" MaxLength="50" NextFocusControl="txtFileName"></f:TextBox>
<f:FileUpload ID="txtFileName" runat="server" Label="文件上传" NextFocusControl="linkFileName"></f:FileUpload>
<f:HyperLink ID="linkFileName" runat="server" Label="已经上传文件" NavigateUrl="" Target="_blank"
Text="HyperLink">
</f:HyperLink>
</Items>
</f:SimpleForm>
</Items>
</f:Panel>
</form>
</body>
</html>

113
SCP/Views/PlanData/PlanMonthEdit.aspx.cs

@ -0,0 +1,113 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Controller;
namespace SCP.PlanData
{
public partial class PlanMonthEdit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DDLBindData();
}
}
public void DDLBindData()
{
this.ddl.DataSource = SCP_PLAN_MONTH_CONTROLLER.GetVendList();
this.ddl.DataTextField = "VendName";
this.ddl.DataValueField = "VendId";
this.ddl.DataBind();
//TODO 权限控制 只能修改自己上传的数据
}
//关闭
protected void btnClose_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
//保存
protected void btnSave_OnClick(object sender, EventArgs e)
{
TB_PlanMonth model = new TB_PlanMonth();
model.SupplierCode = ddl.SelectedValue;
model.Code = txtCode.Text;
model.Name = txtName.Text;
model.Ver = txtVer.Text;
model.FileName = txtFileName.FileName;
model.AddTime=DateTime.Now;
if (txtFileName.FileName != "")
{
Upload(txtFileName, "");
}
SCP_PLAN_MONTH_CONTROLLER.SaveTbPlanMonth(model);
}
//保存关闭
protected void btnOK_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
public static string Upload(FineUI.FileUpload fUpload, string ext)
{
string[] allowedExtensions = { ".jpg", ".gif", ".jpeg", ".png", ".rar", ".zip", ".flv", ".doc", ".docx", ".xls", ".xlsx", ".pdf", ".cad", ".txt" };//允许上传的文件类型
string filename = ""; //MyWebString.GetOrderNumber();
bool fileOK = false;
string fileExtension = System.IO.Path.GetExtension(fUpload.FileName).ToLower();
for (int i = 0; i < allowedExtensions.Length; i++)
{
if (fileExtension == allowedExtensions[i])
{
fileOK = true;
}
}
if (ext != "")
{
if (fileExtension != ext.ToLower())
{
throw new Exception("只能上传 " + ext + " 类型的文件!");
}
}
if (fileOK)
{
if (fUpload.HasFile)
{
// filename = GetMD5HashFromFile(fUpload.PostedFile.InputStream); //TODO 将文件名改为MD5
//
// filename = filename + fileExtension;
filename = Path.GetFileName(fUpload.FileName);
if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath("~/uploadfiles/") + filename))
{
fUpload.SaveAs(System.Web.HttpContext.Current.Server.MapPath("~/uploadfiles/") + filename);
}
}
else
{
throw new Exception("文件上传失败!");
}
}
else
{
throw new Exception("上传文件格式不正确!");
}
return filename;
}
}
}

49
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_TS_BARCODE.aspx.designer.cs → SCP/Views/PlanData/PlanMonthEdit.aspx.designer.cs

@ -7,10 +7,10 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP..SupplierData {
namespace SCP.PlanData {
public partial class SCP_TS_BARCODE {
public partial class PlanMonthEdit {
/// <summary>
/// form1 控件。
@ -40,84 +40,93 @@ namespace SCP.青岛一汽法雷奥.SupplierData {
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Button1 控件。
/// btnOK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button1;
protected global::FineUI.Button btnOK;
/// <summary>
/// Button3 控件。
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button3;
protected global::FineUI.Button btnSave;
/// <summary>
/// Button2 控件。
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button2;
protected global::FineUI.Button btnClose;
/// <summary>
/// btnSearch 控件。
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnSearch;
protected global::FineUI.SimpleForm SimpleForm1;
/// <summary>
/// FormRow_1 控件。
/// ddl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Form FormRow_1;
protected global::FineUI.DropDownList ddl;
/// <summary>
/// txtBarCode 控件。
/// txtCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBarCode;
protected global::FineUI.TextBox txtCode;
/// <summary>
/// txtPartCode 控件。
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtPartCode;
protected global::FineUI.TextBox txtName;
/// <summary>
/// txtBatch 控件。
/// txtVer 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBatch;
protected global::FineUI.TextBox txtVer;
/// <summary>
/// Grid1 控件。
/// txtFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid1;
protected global::FineUI.FileUpload txtFileName;
/// <summary>
/// linkFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HyperLink linkFileName;
}
}

2
SCP/Views/PlanData/SCP_ASK_DETAIL.aspx

@ -31,7 +31,7 @@
</f:Button>
<f:Button ID="btnReduce" runat="server" EnablePostBack="True" OnClick="btnReduce_Click" Text="要货减增产并发邮件" Hidden="true" Icon="CssAdd" OnClientClick="if(!confirm('是否要货单减产?'))return false;">
</f:Button>
<f:Button ID="btnAdd" runat="server" EnablePostBack="True" OnClick="btnAdd_Click" Text="添加明细" Icon="CssAdd" OnClientClick="if(!confirm('是否添加明细?'))return false;">
<f:Button ID="btnAdd" runat="server" EnablePostBack="True" OnClick="btnAdd_Click" Text="添加明细" Icon="CssAdd" OnClientClick="if(!confirm('是否添加明细?'))return false;" Hidden="true">
</f:Button>
<f:Button ID="btnDeleted" runat="server" Hidden="true" EnablePostBack="True" OnClick="btnDeleted_Click" Text="删除明细内容" Icon="CssAdd" OnClientClick="if(!confirm('是否删除,明细将不可恢复?'))return false;">
</f:Button>

32
SCP/Views/PlanData/SCP_ASN_DETAIL_View.aspx

@ -10,7 +10,7 @@
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<f:Form runat="server" Title="">
@ -64,7 +64,7 @@
<f:Grid ID="Grid_V_TB_ASN_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="20" 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"
IsDatabasePaging="True" AllowPaging="True" OnSort="Grid_V_TB_ASN_DETAIL_Sort" AllowSorting="true"
EnableRowSelectEvent="True" AutoScroll="True"
SortField="AsnBillNum" SortDirection="DESC"
OnPageIndexChange="Grid_V_TB_ASN_DETAIL_PageIndexChange"
@ -92,22 +92,22 @@
</ItemTemplate>
</f:TemplateField>
<f:BoundField Width = "80px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单单号" />
<f:BoundField Width = "80px" DataField = "AskBillNum" DataFormatString = "{0}" HeaderText = "要货看板号" />
<f:BoundField Width = "80px" DataField = "AsnBillNum" DataFormatString = "{0}" HeaderText = "发货单号" />
<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 = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "50px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" Hidden="true"/>
<f:BoundField Width = "80px" SortField="PoBillNum" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单单号" />
<f:BoundField Width = "80px" SortField="AskBillNum" DataField = "AskBillNum" DataFormatString = "{0}" HeaderText = "要货看板号" />
<f:BoundField Width = "80px" SortField="AsnBillNum" DataField = "AsnBillNum" DataFormatString = "{0}" HeaderText = "发货单号" />
<f:BoundField Width = "100px" SortField="PackQty" DataField = "PackQty" DataFormatString = "{0:F}" HeaderText = "标包数量" />
<f:BoundField Width = "100px" SortField="Qty" DataField = "Qty" DataFormatString = "{0:F}" HeaderText = "发货数量" />
<f:BoundField Width = "100px" SortField="PartCode" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编号" />
<f:BoundField Width = "100px" SortField="PartDesc1" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "50px" SortField="CurrencyDesc" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" Hidden="true"/>
<f:BoundField Width = "100px" DataField = "VendName" 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 = "ShipTime" DataFormatString = "{0}" HeaderText = "发货日期" />
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0}" HeaderText = "承诺到货日期" />
<f:BoundField Width = "100px" SortField="Batch" DataField = "Batch" DataFormatString = "{0}" HeaderText = "批次" />
<f:BoundField Width = "100px" SortField="VendBatch" DataField = "VendBatch" DataFormatString = "{0}" HeaderText = "供应商批次" />
<f:BoundField Width = "100px" SortField="ShipTime" DataField = "ShipTime" DataFormatString = "{0}" HeaderText = "发货日期" />
<f:BoundField Width = "100px" SortField="EndTime" DataField = "EndTime" DataFormatString = "{0}" HeaderText = "承诺到货日期" />
<f:BoundField Width = "100px" DataField = "ReceiveTime" DataFormatString = "{0}" HeaderText = "实际到货日期" />
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" HeaderText = "单位" />
<f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/>
<f:BoundField Width = "50px" SortField="PoUnit" DataField = "PoUnit" DataFormatString = "{0}" HeaderText = "单位" />
<f:BoundField Width = "80px" SortField="Price" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/>
<f:BoundField SortField="ReduceQty" DataField="ReduceQty" HeaderText="已减数量" ColumnID="ReduceQty" Width="100px" Hidden="true" />
<f:BoundField SortField="ReceivedPort_Desc" DataField="ReceivedPort_Desc" HeaderText="收货口" ColumnID="ReceivedPort_Desc" Hidden="true" />

7
SCP/Views/PlanData/SCP_ASN_DETAIL_View.aspx.cs

@ -142,5 +142,12 @@ namespace SCP.PlanData
string url = EntityListToExcel2003(cellheader, ret.ToList(), "发货单明细");
});
}
protected void Grid_V_TB_ASN_DETAIL_Sort(object sender, GridSortEventArgs e)
{
Grid_V_TB_ASN_DETAIL.SortDirection = e.SortDirection;
Grid_V_TB_ASN_DETAIL.SortField = e.SortField;
BindDetail();
}
}
}

8
SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs

@ -108,8 +108,6 @@ namespace SCP.PlanData
{
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
//if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
//{
if (!CurrentUser.RoleList.Contains("要货看板所有记录"))
{
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count == 1)
@ -131,8 +129,6 @@ namespace SCP.PlanData
_entity.Buyer = txt_Planner.Text;
}
}
//}
}
}
}
@ -215,10 +211,6 @@ namespace SCP.PlanData
{ "EndTime", "到货日期" },
{ "Buyer", "计划员" },
{ "ValidityDays", "距到货日期(天)" },
{"SubSite","" },
{"Extend1","" },
{"Extend2","" },
{"Extend3","" },
};
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "未完成订单明细");
}

18
SCP/Views/PlanData/SCP_PO.aspx

@ -132,16 +132,16 @@
<Columns>
<f:BoundField Width = "60px" DataField = "State" DataFormatString = "{0}" HeaderText = "状态" Hidden="true" />
<f:BoundField Width = "60px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" />
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" />
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单编号" />
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="项目编号" />
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" />
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" />
<f:BoundField Width = "60px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" SortField="State_DESC" />
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" SortField="ModType_DESC"/>
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单编号" SortField="PoBillNum"/>
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="项目编号" SortField="ErpBillNum"/>
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" SortField="VendName"/>
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" SortField="VendId"/>
<%-- <f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%>
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" />
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" />
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" SortField="BeginTime"/>
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" SortField="Site_Desc" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" SortField="Buyer"/>
<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" />
</Columns>

2
SCP/Views/PlanData/SCP_PO.aspx.cs

@ -111,7 +111,7 @@ namespace SCP.PlanData
protected void Grid_V_TB_PO_Sort(object sender, FineUI.GridSortEventArgs e)
{
BindOrder();
}
protected void btnOutput_Click(object sender, EventArgs e)

12
SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx

@ -96,6 +96,8 @@
<f:Grid ID = "Grid_V_TB_PO_DETAIL" EnableCollapse = "true" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true"
DataKeyNames = "UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty,ReceivedPort,SubSite,Extend1,Extend2,Extend3"
SortField="PoLine"
OnSort="Grid_V_TB_PO_DETAIL_Sort"
AllowSorting="true"
AllowPaging="True"
AllowCellEditing="true" ClicksToEdit="2"
IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
@ -115,11 +117,11 @@
<Columns>
<%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态" SortField="State_DESC"></f:BoundField>
<f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" />
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" SortField="PoLine" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" SortField="PartDesc1" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" SortField="PartCode"/>
<%--<f:TemplateField HeaderText="要货数量" Width="70px">
<ItemTemplate>
<asp:TextBox ID="NB_PublishNum" runat="server" Width="60px" Text="0"></asp:TextBox>
@ -150,7 +152,7 @@
</f:RenderField>
<f:RenderField Width="120px" ColumnID="EndTime" DataField="EndTime" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="到货日期">
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="到货日期" SortField="EndTime">
<Editor>
<f:DatePicker ID="DatePicker1" Required="true" runat="server">
</f:DatePicker>

36
SCP/Views/PlanData/SCP_PO_DETAIL.aspx

@ -12,7 +12,7 @@
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
@ -58,9 +58,9 @@
</Items>
</f:Form>
<f:HiddenField ID="HF_GRID_INDEX" runat="server"></f:HiddenField>
<f:Grid ID = "Grid_V_TB_PO_DETAIL" EnableCollapse = "true" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true"
<f:Grid ID = "Grid_V_TB_PO_DETAIL" EnableCollapse = "true" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "false" runat ="server" EnableCheckBoxSelect = "true"
DataKeyNames = "UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty"
SortField="PoLine"
SortField="PoLine" OnSort="Grid_V_TB_PO_DETAIL_Sort" AllowSorting="true" BoxFlex="1" SortDirection="ASC"
AllowPaging="True"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
>
@ -81,18 +81,18 @@
<Columns>
<%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" />
<f:BoundField Width="50px" SortField="State_DESC" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width="80px" SortField="ProjectId" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "50px" SortField="PoLine" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
<f:BoundField Width = "100px" SortField="PartDesc1" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "80px" SortField="PartCode" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" />
<%-- <f:TemplateField HeaderText="要货数量" Width="70px">
<ItemTemplate>
<uc1:UserControl runat="server" ID="UserControl" />
<asp:TextBox ID="NB_PublishNum" runat="server" Width="60px"></asp:TextBox>
</ItemTemplate>
</f:TemplateField>--%>
<f:BoundField Width = "80px" DataField = "PlanQty" DataFormatString = "{0:F}" HeaderText = "订单数量" />
<f:BoundField Width = "100px" DataField = "TempQty" DataFormatString = "{0:F}" HeaderText = "已要数量" />
<f:BoundField Width = "80px" SortField="PlanQty" DataField = "PlanQty" DataFormatString = "{0:F}" HeaderText = "订单数量" />
<f:BoundField Width = "100px" SortField="TempQty" DataField = "TempQty" DataFormatString = "{0:F}" HeaderText = "已要数量" />
@ -101,16 +101,16 @@
<asp:TextBox ID="TXT_Price" Text=<%# Eval("Price") %> runat="server" Width="70px"></asp:TextBox>
</ItemTemplate>
</f:TemplateField>--%>
<f:BoundField Width = "80px" DataField = "ShippedQty" DataFormatString = "{0:F}" HeaderText = "发货数量" />
<f:BoundField Width = "80px" DataField = "ReceivedQty" DataFormatString = "{0:F}" HeaderText = "收货数量" />
<f:BoundField Width = "80px" DataField = "RejectQty" DataFormatString = "{0:F}" HeaderText = "退货数量" />
<f:BoundField Width = "80px" SortField="ShippedQty" DataField = "ShippedQty" DataFormatString = "{0:F}" HeaderText = "发货数量" />
<f:BoundField Width = "80px" SortField="ReceivedQty" DataField = "ReceivedQty" DataFormatString = "{0:F}" HeaderText = "收货数量" />
<f:BoundField Width = "80px" SortField="RejectQty" DataField = "RejectQty" DataFormatString = "{0:F}" HeaderText = "退货数量" />
<%-- <f:BoundField Width = "80px" DataField = "ArriveQty" DataFormatString = "{0}" HeaderText = "到货数量" />--%>
<%--<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "开始时间" />--%>
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "到货日期" />
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" />
<f:BoundField Width = "100px" SortField="EndTime" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "到货日期" />
<f:BoundField Width = "50px" SortField="PoUnit" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" />
<f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true" />
<f:BoundField Width = "50px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" Hidden="true" />
<f:BoundField Width = "80px" SortField="Price" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true" />
<f:BoundField Width = "50px" SortField="CurrencyDesc" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" Hidden="true" />
</Columns>

7
SCP/Views/PlanData/SCP_PO_DETAIL.aspx.cs

@ -110,7 +110,12 @@ namespace SCP.PlanData
Grid_V_TB_PO_DETAIL.DataBind();
});
}
protected void Grid_V_TB_PO_DETAIL_Sort(object sender, GridSortEventArgs e)
{
Grid_V_TB_PO_DETAIL.SortDirection = e.SortDirection;
Grid_V_TB_PO_DETAIL.SortField = e.SortField;
BindDetail();
}
protected void Grid_V_TB_PO_DETAIL_PageIndexChange(object sender, GridPageEventArgs e)
{
BindDetail();

104
SCP/Views/SupplierData/PlanMonth.aspx

@ -0,0 +1,104 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanMonth.aspx.cs" Inherits="SCP.SupplierData.PlanMonth" %>
<!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">
<Items>
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload">
</f:Button>
<f:Button ID="Button6" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="Button6_OnClick">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick">
</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">
<Items>
<f:Label runat="server" Label="供应商编号" />
<f:TextBox ID="txtSupplierCode" runat="server" />
<f:Label runat="server" Label="供应商名称" />
<f:TextBox ID="txtVendName" runat="server" />
<f:Label runat="server" Label="文件编号" />
<f:TextBox ID="txtCode" runat="server" />
<f:Label runat="server" Label="文件描述" />
<f:TextBox ID="txtName" runat="server" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Label runat="server" Label="版本号" />
<f:TextBox ID="txtVer" runat="server" />
<f:Label runat="server" Label="发布用户" />
<f:TextBox ID="txtUserName" runat="server" />
<f:Label runat="server" Label="是否发布" />
<f:CheckBox ID="txtIsSend" runat="server" />
<f:Label runat="server" Label="新增时间" />
<f:DatePicker ID="DatePicker1" runat="server" Required="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Label runat="server" Label="发布时间" />
<f:DatePicker ID="DatePicker2" runat="server" Required="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Button runat="server" ID="btnClose" Text="关闭" OnClick="btnClose_OnClick"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_OnClick" Text="快速查找">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="ID" IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True">
<Columns>
<f:BoundField runat="server" HeaderText="供应商编号" ColumnID="" DataField="SupplierCode" />
<f:BoundField runat="server" HeaderText="供应商名称" ColumnID="" DataField="VendName" />
<f:BoundField runat="server" HeaderText="文件编号" ColumnID="" DataField="Code" />
<f:BoundField runat="server" HeaderText="文件描述" ColumnID="" DataField="Name" />
<f:BoundField runat="server" HeaderText="版本号" ColumnID="" DataField="Ver" />
<f:HyperLinkField HeaderText="文件下载" DataToolTipField="FileName" DataTextField="FileName"
DataTextFormatString="{0}" DataNavigateUrlFields="FileName" DataNavigateUrlFormatString="/uploadfiles/{0}"
DataNavigateUrlFieldsEncode="true" Target="_blank" ColumnID="FileName" Width="260px" />
<f:BoundField runat="server" HeaderText="新增时间" ColumnID="" DataField="AddTime" />
<f:BoundField runat="server" HeaderText="发布用户" ColumnID="" DataField="UserName" />
<f:BoundField runat="server" HeaderText="是否发布" ColumnID="" DataField="IsSend" />
<f:BoundField runat="server" HeaderText="发布时间" ColumnID="" DataField="SendTime" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True"
WindowPosition="Center" IsModal="true" Title="修改" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="640px" Width="700px" />
<f:Window ID="WindowUpload" runat="server" Hidden="True"
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="200px" Width="400px">
</f:Window>
</form>
</body>
</html>

191
SCP/Views/SupplierData/PlanMonth.aspx.cs

@ -0,0 +1,191 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Common;
using CK.SCP.Controller;
using FineUI;
namespace SCP.SupplierData
{
public partial class PlanMonth : PageBase
{
public List<V_PlanMonth> _list;
public static int num;
private TB_PlanMonth modelPlanMonth;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
DatePicker1.SelectedDate = DateTime.Now;
DatePicker2.SelectedDate = DateTime.Now;
//OpenWindow_New("/PlanData/PlanMonthEdit.aspx", "新增");
}
}
public void BindData()
{
string name = GetIdentityName();
Expression<Func<V_PlanMonth, dynamic>> select = c => c;
Expression<Func<V_PlanMonth, bool>> where = c => c.IsSend == "是" && c.SupplierCode == name;
Expression<Func<V_PlanMonth, int>> order = c => c.ID;
List<V_PlanMonth> listsss = SCPDB.V_PlanMonth.Where(where.Compile()).ToList();
Grid1.DataSource = listsss;
Grid1.RecordCount = listsss.Count;
Grid1.DataBind();
// int total;
//
// var list = EntitiesHelper.GetPagedDataDesc(SCPDB,
// select,
// where,
// order,
// Grid1.PageIndex,
// Grid1.PageSize,
// out total).ToList();
// Grid1.RecordCount = total;
// Grid1.DataSource = list;
// Grid1.DataBind();
}
//显示
protected void btnShow_OnClick(object sender, EventArgs e)
{
gp1.Hidden = false;
}
//关闭
protected void btnClose_OnClick(object sender, EventArgs e)
{
gp1.Hidden = true;
}
//查询
protected void BtnSearch_OnClick(object sender, EventArgs e)
{
_list = SearchData(out num);
Grid1.RecordCount = num;
Grid1.DataSource = _list;
Grid1.DataBind();
}
public List<V_PlanMonth> SearchData(out int num)
{
Expression<Func<V_PlanMonth, bool>> where = c => true;
if (!string.IsNullOrEmpty(txtSupplierCode.Text))
{
where = c => c.SupplierCode.Contains(txtSupplierCode.Text);
}
if (!string.IsNullOrEmpty(txtVendName.Text))
{
where = where.And(p => p.VendName.Contains(txtVendName.Text));
}
if (!string.IsNullOrEmpty(txtCode.Text))
{
where = where.And(p => p.Code.Contains(txtCode.Text));
}
if (!string.IsNullOrEmpty(txtName.Text))
{
where = where.And(p => p.Name.Contains(txtName.Text));
}
if (!string.IsNullOrEmpty(txtVer.Text))
{
where = where.And(p => p.Ver.Contains(txtVer.Text));
}
if (!string.IsNullOrEmpty(txtUserName.Text))
{
where = where.And(p => p.UserName.Contains(txtUserName.Text));
}
if (txtIsSend.Checked)
{
where = where.And(p => p.IsSend == "是");
}
if (!string.IsNullOrEmpty(DatePicker1.Text))
{
where = where.And(p => p.AddTime == DatePicker1.SelectedDate);
}
if (!string.IsNullOrEmpty(DatePicker1.Text))
{
where = where.And(p => p.SendTime == DatePicker2.SelectedDate);
}
List<V_PlanMonth> list = SCPDB.V_PlanMonth.Where(where.Compile()).ToList();
num = SCPDB.V_PlanMonth.Where(where.Compile()).Count();
return list;
}
//导出
protected void Button6_OnClick(object sender, EventArgs e)
{
// DateTime dt1 = (DateTime)DatePicker1.SelectedDate;
// DateTime dt2 = (DateTime)DatePicker2.SelectedDate;
// Expression<Func<V_QadOrder, dynamic>> select = c => c;
// Expression<Func<V_QadOrder, bool>> where = c => c.StartDate >= dt1 && c.EndDate <= dt2;
// Expression<Func<V_QadOrder, decimal>> order = c => c.ID;
// int total;
// var list = EntitiesHelper.GetPagedDataDesc(SCPDB,
// select,
// where,
// order,
// Grid1.PageIndex,
// Grid1.PageSize,
// out total).ToList();
// DataTable dtData = ListHelper.ListToDataTable(list);
// string downname = MyWebString.GetOrderNumber() + ".xls";
// string filename = Server.MapPath("~/exportfiles/" + downname);
// MyExcel excel = new MyExcel();
// excel.NewExcel(filename);
// excel.NewSheet("Sheet1");
// int rowindex = 0; //当前列所在位置
// //创建第一行的字段
// excel.CreateRow(rowindex);
// int colindex = 0;
// for (int i = 0; i < dtData.Columns.Count; i++)
// {
// excel.CreateCell(rowindex, colindex);
// excel.SetCellValue(rowindex, colindex, Grid1.Columns[i].HeaderText.Trim());
// colindex++;
// }
// rowindex++;
// foreach (DataRow drOutput in dtData.Rows)
// {
// excel.CreateRow(rowindex);
// colindex = 0;
// for (int k = 0; k < Grid1.Columns.Count; k++)
// {
// excel.CreateCell(rowindex, colindex);
// excel.SetCellValue(rowindex, colindex, drOutput[k].ToString());
// colindex++;
// }
// rowindex++;
// }
// excel.Save();
// Alert.Show("<a href='/exportfiles/" + downname + "'>" + downname + "</a>", "文件导出成功,请点击文件名下载", MessageBoxIcon.Information);
}
}
}

82
SCP/Views/青岛一汽法雷奥/SupplierData/PlanDetail.aspx.designer.cs → SCP/Views/SupplierData/PlanMonth.aspx.designer.cs

@ -10,7 +10,7 @@
namespace SCP.SupplierData {
public partial class PlanDetail {
public partial class PlanMonth {
/// <summary>
/// form1 控件。
@ -40,103 +40,139 @@ namespace SCP.SupplierData {
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Button1 控件。
/// Button3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button1;
protected global::FineUI.Button Button3;
/// <summary>
/// btnConfirm 控件。
/// Button6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnConfirm;
protected global::FineUI.Button Button6;
/// <summary>
/// txtState 控件。
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtState;
protected global::FineUI.Button btnShow;
/// <summary>
/// txtbillnum 控件。
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtbillnum;
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// txtBillTime 控件。
/// txtSupplierCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBillTime;
protected global::FineUI.TextBox txtSupplierCode;
/// <summary>
/// txtSupplierCode 控件。
/// txtVendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtSupplierCode;
protected global::FineUI.TextBox txtVendName;
/// <summary>
/// txtCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtCode;
/// <summary>
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtName;
/// <summary>
/// txtVer 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtVer;
/// <summary>
/// txtUserName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtUserName;
/// <summary>
/// txtDeliveryAddress 控件。
/// txtIsSend 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtDeliveryAddress;
protected global::FineUI.CheckBox txtIsSend;
/// <summary>
/// txtDueTime 控件。
/// DatePicker1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtDueTime;
protected global::FineUI.DatePicker DatePicker1;
/// <summary>
/// txtRemark 控件。
/// DatePicker2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtRemark;
protected global::FineUI.DatePicker DatePicker2;
/// <summary>
/// btnCreate 控件。
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreate;
protected global::FineUI.Button btnClose;
/// <summary>
/// btnOutput 控件。
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
protected global::FineUI.Button BtnSearch;
/// <summary>
/// Grid1 控件。

2
SCP/Views/SupplierData/SCP_ASK.aspx

@ -129,7 +129,7 @@
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" />
<%--<f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%>
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "开始日期" />
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "交货日期" />
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "交货日期" />
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" />
<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" />

3
SCP/Views/SupplierData/SCP_ASN.aspx

@ -22,9 +22,6 @@
</f:Button>
<f:Button ID="btnDetail" runat="server" EnablePostBack="True" Text="明细" Icon="Find" OnClick="btnDetail_Click">
</f:Button>
<f:Button ID="btnBarCode" runat="server" EnablePostBack="True" Text="打印表皮标签" Icon="Printer" OnClick="btnBarCode_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">

15
SCP/Views/SupplierData/SCP_ASN.aspx.cs

@ -66,7 +66,7 @@ namespace SCP.SupplierData
V_TB_ASN _entity = new V_TB_ASN();
_entity.IsDeleted = false;
_entity.VendId = TXT_VenderName.Text;
_entity.PoBillNum = this.txtPO.Text;
_entity.PoBillNum = txtPO.Text;
_entity.AsnBillNum = txtBill.Text;
_entity.AskBillNum = TXT_ASK.Text;
_entity.UserInVendIds = CurrentUser.VenderList;
@ -97,15 +97,7 @@ namespace SCP.SupplierData
_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)
@ -179,10 +171,5 @@ namespace SCP.SupplierData
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_PALLET.aspx?AsnBillNum={0}", AsnBillNum)));
}
protected void btnBarCode_Click(object sender, EventArgs e)
{
}
}
}

9
SCP/Views/SupplierData/SCP_ASN.aspx.designer.cs

@ -68,15 +68,6 @@ namespace SCP.SupplierData
/// </remarks>
protected global::FineUI.Button btnDetail;
/// <summary>
/// btnBarCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnBarCode;
/// <summary>
/// btnNew 控件。
/// </summary>

8
SCP/Views/SupplierData/SCP_ASN_CREATE.aspx

@ -17,21 +17,13 @@
<Items>
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" OnClick="btnCreate_Click" Text="生成发货单" Icon="CssAdd">
</f:Button>
<%-- <f:Button ID="btnAll" runat="server" EnablePostBack="True" OnClick="btnAll_Click" Text="默认为要货数量" Icon="CssAdd" OnClientClick="if(!confirm('是否?'))return false;">
</f:Button>--%>
<%--<f:Button ID="btnSet" runat="server" EnablePostBack="True" OnClick="btnSet_Click" Text="默认发货批次为生产批次,生产时间为录入时间" Icon="CssAdd">
</f:Button>--%>
<f:ToolbarFill runat="server" />
</Items>
</f:Toolbar>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow1">
<Items>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1">
<Items>
<f:TextBox runat = "server" Label = "单据状态" Enabled="false" EmptyText = "" ID = "TXT_State_Desc" />

9
SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.designer.cs

@ -59,15 +59,6 @@ namespace SCP.SupplierData
/// </remarks>
protected global::FineUI.Button btnCreate;
/// <summary>
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// FormRow_1 控件。
/// </summary>

19
SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs

@ -41,7 +41,8 @@ namespace SCP.SupplierData
{
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) => {
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) =>
{
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
@ -72,7 +73,8 @@ namespace SCP.SupplierData
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 => {
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)
@ -85,12 +87,12 @@ namespace SCP.SupplierData
}
}
});
});
}
public void BindDetail()
{
SearchV_TB_ASN_DETAILData((ret) => {
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;
@ -462,15 +464,6 @@ namespace SCP.SupplierData
}
protected void SelectedBarCode_Click(object sender, EventArgs e)
{
}
protected void btnPrint_Click(object sender, EventArgs e)
{
string AsnBillNum = Request["AsnBillNum"];

2
SCP/Views/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx

@ -42,7 +42,7 @@
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="BarCode" DataField="BarCode" HeaderText="条码" ColumnID="BarCode" Width="200" />
<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"/>

39
SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx

@ -12,18 +12,18 @@
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<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:ToolbarSeparator runat="server" />
<f:Button ID="button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Add" OnClientClick="location.reload();">
<f:Button ID="button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Reload" OnClientClick="location.reload();">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnCopy" runat="server" Text="复制看板" Icon="Find" OnClick="btnCopy_Click" OnClientClick="if(!confirm('是否要复制订单,只能复制合同看板不能复制离散订单?'))return false;">
<f:Button ID="btnCopy" runat="server" Text="复制看板" Icon="PageCopy" OnClick="btnCopy_Click" OnClientClick="if(!confirm('是否要复制订单,只能复制合同看板不能复制离散订单?'))return false;">
</f:Button>
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_Click" >
</f:Button>
@ -34,14 +34,13 @@
<f:Button ID="btnCreateAsk" runat="server" Text="创建要货看板" Icon="Add" OnClick="btnCreateAsk_Click">
</f:Button>
<%-- <f:ToolbarSeparator runat="server" />
<f:Button ID="BtnPublish" runat="server" EnablePostBack="True" Text="发布" Icon="Add" OnClick="BtnPublish_Click" OnClientClick="if(!confirm('是否要发布?'))return false;">
</f:Button>
<f:Button ID="BtnStop" Hidden="true" runat="server" EnablePostBack="True" Text="关闭订单" Icon="Delete" OnClick="BtnStop_Click" OnClientClick="if(!confirm('是否要关闭订单?'))return false;">
</f:Button>
<f:Button ID="BtnCanclePublish" runat="server" EnablePostBack="True" Text="取消发布" Icon="Add" OnClick="BtnCanclePublish_Click" OnClientClick="if(!confirm('是否要取消发布?'))return false;">
</f:Button>--%>
<%--<f:Button ID="btnEdit" runat="server" Text="修改" Icon="PageExcel" >
</f:Button>--%>
<f:Button ID="btnShow" runat="server" Icon="Find" Text="查询面板" OnClick="btnShow_Click">
</f:Button>
<f:Button ID="btnShow" runat="server" Icon=" Zoom" Text="查询面板" OnClick="btnShow_Click">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Width="200" ButtonIcon="Add" ShowRedStar="true" > </f:FileUpload>
@ -73,14 +72,21 @@
<f:FormRow runat="server">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain">
</f:DropDownList>
<%-- <f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_SubSite" Hidden="true" />--%>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
<f:TextBox runat = "server" Label = "看板编号" EmptyText = "" ID = "TXT_AskBill" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" ></f:DropDownList>
<f:TextBox runat = "server" Label = "送货地点" EmptyText = "" ID = "TXT_Site_Desc" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" EmptyText="请选择日期" Label="至" ID="Date_EndDate" />
@ -90,8 +96,6 @@
<f:ListItem Text="发布" Value="1" />
<f:ListItem Text="已确认" Value="2" />
<f:ListItem Text="已发货" Value="3" />
<%-- <f:ListItem Text="已收货" Value="4" />
<f:ListItem Text="已完成" Value="5" />--%>
</f:DropDownList>
</Items>
</f:FormRow>
@ -115,9 +119,10 @@
</Items>
</f:GroupPanel>
<f:Grid ID = "Grid_V_TB_ASK" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true"
<f:Grid ID = "Grid_V_TB_ASK" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true" EnableTextSelection="true"
DataKeyNames = "UID,PoBillNum,AskBillNum,VendId,Site,Buyer,BuyerPhone,State,Remark,VendName,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID,ModType"
AllowSorting="true"
AllowSorting="true" BoxFlex="1"
PageSize="100"
OnRowDataBound="Grid_V_TB_ASK_RowDataBound"
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_ASK_Sort" SortField="State"
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_ASK_RowDoubleClick"
@ -145,11 +150,11 @@
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" />
<f:BoundField Width = "100px" DataField = "AskBillNum" DataFormatString = "{0}" HeaderText = "要货看板编号" SortField="AskBillNum" />
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="ERP订单号" />
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="项目编号" />
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" />
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商" SortField="VendId"/>
<%--<f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%>
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" SortField="BeginTime"/>
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" SortField="VendId"/>
<f:BoundField Width = "100px" ColumnID="BeginTime" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" SortField="BeginTime"/>
<f:BoundField Width = "100px" ColumnID="EndTime" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "到货日期" SortField="EndTime" />
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "计划员" />
<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "计划员电话" />

88
SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.cs

@ -33,7 +33,7 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
{
if (!IsPostBack)
{
BindVender(ddl_Vender);
LoadData();
}
@ -46,7 +46,22 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
Alert.Show("当前用户未选择地点!");
return;
}
else
{
var site=CurrentUser.FactoryList.FirstOrDefault();
if (site == "CQBMPT")//重庆北汽模塑
{
var column1= Grid_V_TB_ASK.FindColumn("BeginTime");
column1.HeaderText = "创建日期";
var column2= Grid_V_TB_ASK.FindColumn("EndTime");
column2.HeaderText = "需求日期";
column2.Hidden = false;
}
}
if (CurrentUser.Name == "admin" || CurrentUser.RoleList.Contains("分厂管理员"))
{
BtnStop.Hidden = false;
}
BindAsk();
}
public void BindAsk()
@ -64,12 +79,20 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
public void SearchV_TB_ASKData(Action<IQueryable<V_TB_ASK>> p_action)
{
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList();
DropDownList1.DataSource = ls;
DropDownList1.DataBind();
V_TB_ASK _entity = new V_TB_ASK();
_entity.IsDeleted = false;
_entity.PoBillNum = TXT_BillNo.Text;
_entity.VendName = TXT_VendName.Text;
_entity.VendId = ddl_Vender.SelectedValue;
_entity.State_DESC = TXT_Site_Desc.Text;
_entity.AskBillNum = TXT_AskBill.Text;
_entity.ErpBillNum = TXT_ProjectId.Text;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.Extend1 = TXT_Extend1.Text;
_entity.Extend2 = TXT_Extend2.Text;
_entity.Extend3 = TXT_Extend3.Text;
if (DP_StartDate.SelectedDate != null)
{
_entity.BeginTime = DP_StartDate.SelectedDate;
@ -84,12 +107,11 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
}
if (!string.IsNullOrEmpty(CurrentUser.Name))
{
_entity.CreateUser = CurrentUser.Name;
if (CurrentUser.Name != "admin")
{
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
{
if (!CurrentUser.RoleList.Contains("要货看板所有记录"))
{
_entity.CreateUser = CurrentUser.Name;
@ -97,12 +119,12 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
}
else
{
_entity.CreateUser = string.Empty;
this.txt_Planner.Hidden = false;
btn_planner.Hidden = false;
if (!string.IsNullOrEmpty(this.txt_Planner.Text))
{
_entity.Buyer = txt_Planner.Text;
}
}
}
@ -200,7 +222,31 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
Alert.Show(ret.Message);
}
}
protected void BtnStop_Click(object sender, EventArgs e)
{
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray;
List<string> _AskList = new List<string>();
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++)
{
if (_selections.Contains(i))
{
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i];
if (!string.IsNullOrEmpty(rowDataKeys[2].ToString()))
{
_AskList.Add(rowDataKeys[2].ToString());
}
}
}
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(_AskList, AskState.Close);
if (ret.State == ReturnStatus.Succeed)
{
BindAsk();
}
else
{
Alert.Show(ret.Message);
}
}
protected void BtnCanclePublish_Click(object sender, EventArgs e)
{
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray;
@ -310,7 +356,7 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
protected void BtnSearchDetail_Click (object sender , EventArgs e)
{
string AskBillNum = TXT_BillNo.Text;
string VendName = TXT_VendName.Text;
string VendName = ddl_Vender.SelectedValue;
string State = DDL_State.SelectedValue;
string PartCode = TXT_PartCode.Text;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../../PlanData/SCP_ASK_DETAIL.aspx?AskBillNum={0}&&VendName={1}&&State={2}&&PartCode={3}", AskBillNum, VendName, State, PartCode)));
@ -396,5 +442,31 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
Alert.Show(string.Join("<br>",ret.MessageList));
}
}
protected void btnDelete_Click(object sender, EventArgs e)
{
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray;
List<string> _AskList = new List<string>();
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++)
{
if (_selections.Contains(i))
{
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i];
if (!string.IsNullOrEmpty(rowDataKeys[2].ToString()))
{
_AskList.Add("'"+rowDataKeys[2].ToString()+"'");
}
}
}
string str = string.Format("update TB_ASN_DETAIL set State=-1,IsDeleted=1,UpdateUser='{1}' where AsnBillNum in (select AsnBillNum from tb_Asn b where b.AskBillNum in ({0}))", string.Join(",", _AskList.ToArray()), CurrentUser.Name);
int state = SCPDB.Database.ExecuteSqlCommand(str);
state = SCPDB.Database.ExecuteSqlCommand(string.Format("update tb_asn set state=-1,isdeleted=1 ,UpdateUser='{1}' where askbillnum in ({0})", string.Join(",", _AskList.ToArray()), CurrentUser.Name));
state = SCPDB.Database.ExecuteSqlCommand(string.Format("update tb_ask_detail set state=-1,isdeleted=1,UpdateUser='{1}' where askbillnum in ({0})", string.Join(",", _AskList.ToArray()), CurrentUser.Name));
state = SCPDB.Database.ExecuteSqlCommand(string.Format("update tb_ask set state=-1,isdeleted=1,UpdateUser='{1}' where askbillnum in ({0})", string.Join(",", _AskList.ToArray()),CurrentUser.Name));
if (SCPDB.SaveChanges() != -1)
{
BindAsk();
Alert.Show("删除看板成功");
}
}
}
}

82
SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views..PlanData {
namespace SCP.Views..PlanData
{
public partial class SCP_ASK {
public partial class SCP_ASK
{
/// <summary>
/// form1 控件。
@ -84,6 +86,33 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.Button btnCreateAsk;
/// <summary>
/// BtnPublish 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnPublish;
/// <summary>
/// BtnStop 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnStop;
/// <summary>
/// BtnCanclePublish 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnCanclePublish;
/// <summary>
/// btnShow 控件。
/// </summary>
@ -192,6 +221,42 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// DropDownList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DropDownList1;
/// <summary>
/// TXT_Extend1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend1;
/// <summary>
/// TXT_Extend2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend2;
/// <summary>
/// TXT_Extend3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend3;
/// <summary>
/// TXT_AskBill 控件。
/// </summary>
@ -202,13 +267,13 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
protected global::FineUI.TextBox TXT_AskBill;
/// <summary>
/// TXT_VendName 控件。
/// ddl_Vender 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
protected global::FineUI.DropDownList ddl_Vender;
/// <summary>
/// TXT_Site_Desc 控件。
@ -219,6 +284,15 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.TextBox TXT_Site_Desc;
/// <summary>
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// DP_StartDate 控件。
/// </summary>

76
SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx

@ -6,38 +6,11 @@
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<%--<script src="../../Scripts/ajaxfileupload.js"></script>
<script>
function ajaxFileUpLoad() {
$.ajaxFileUpload(
{
url: '../../Handlers/FileUpload.ashx?method=ajaxFileUpload',
secureuri: false,
fileElementId: 'fileToUpload',
dataType: 'json',
success: function (data, status) {
$('#img1').attr("src", data.imgurl);
if (typeof (data.error) != 'undefined') {
if (data.error != '') {
alert(data.error);
} else {
alert(data.msg);
}
}
},
error: function (data, status, e) {
alert(e);
}
}
)
return false;
}
</script>--%>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<f:Form runat="server">
<Toolbars>
@ -89,9 +62,13 @@
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_Vendid" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "送货地点" EmptyText = "" ID = "TXT_Site_Desc" />
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain">
</f:DropDownList>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true"/>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" ></f:DropDownList>
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" />
</Items>
</f:FormRow>
@ -104,23 +81,19 @@
<f:ListItem Text="关闭" Value="0" />
<f:ListItem Text="开放" Value="1" />
</f:DropDownList>
<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>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox runat="server" Required ="true" Label="零件编号" EmptyText="查询请填写零件编号" ID="TXT_PartCode" />
<f:DropDownList runat="server" ID="DropDownList1" Label="零件状态">
<%-- <f:DropDownList runat="server" ID="DropDownList1" Label="零件状态">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="开发" Value="0" />
<f:ListItem Text="关闭" Value="1" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<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>
</f:DropDownList> --%>
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细">
</f:Button>
</Items>
@ -132,9 +105,10 @@
</Items>
</f:GroupPanel>
<f:Grid ID = "Grid_V_TB_PO" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true" DataKeyNames = "UID,PoBillNum,ErpBillNum,VendId,ModType,Contacter,Site,Buyer,BuyerPhone,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,VendName,State_DESC,ModType_DESC"
<f:Grid ID = "Grid_V_TB_PO" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true" EnableTextSelection="true"
DataKeyNames = "UID,PoBillNum,ErpBillNum,VendId,ModType,Contacter,Site,Buyer,BuyerPhone,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,VendName,State_DESC,ModType_DESC"
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_PO_Sort" SortField="BeginTime"
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_PO_RowDoubleClick"
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_PO_RowDoubleClick" BoxFlex="1"
AutoScroll="True" PageSize="50" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
@ -153,16 +127,16 @@
<Columns>
<f:BoundField Width = "60px" DataField = "State" DataFormatString = "{0}" HeaderText = "状态" Hidden="true" />
<f:BoundField Width = "60px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" />
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" />
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="ERP订单号" />
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" />
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" />
<f:BoundField Width = "60px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" SortField="State_DESC" />
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" SortField="ModType_DESC"/>
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" SortField="PoBillNum"/>
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="项目编号" SortField="ErpBillNum"/>
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" SortField="VendName"/>
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" SortField="VendId"/>
<%-- <f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%>
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" />
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" />
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" SortField="BeginTime"/>
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" SortField="Site_Desc" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" SortField="Buyer"/>
<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" />
</Columns>

19
SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx.cs

@ -51,6 +51,9 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
}
public void SearchV_TB_PO(Action<IQueryable<V_TB_PO>> p_action)
{
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList();
DropDownList1.DataSource = ls;
DropDownList1.DataBind();
V_TB_PO _entity = new V_TB_PO();
_entity.IsDeleted = false;
if (this.DP_StartDate.SelectedDate != null)
@ -65,20 +68,24 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
{
_entity.State = int.Parse(DDL_State.SelectedValue);
}
_entity.VendId = TXT_Vendid.Text;
_entity.VendId =ddl_Vender.SelectedValue;
_entity.PoBillNum = TXT_BillNo.Text;
_entity.VendName = TXT_VendName.Text;
_entity.ErpBillNum = TXT_ProjectId.Text;
if (!string.IsNullOrEmpty(rblist.SelectedValue))
{
_entity.ModType =ConvertHelper.To<int> (rblist.SelectedValue);
}
_entity.Site_Desc =TXT_Site_Desc.Text;
_entity.IsDeleted = false;
_entity.UserInVendIds = CurrentUser.VenderList;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
_entity.PartCode = TXT_PartCode.Text;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.Extend1 = TXT_Extend1.Text;
_entity.Extend2 = TXT_Extend2.Text;
_entity.Extend3 = TXT_Extend3.Text;
SCP_PO_CONTROLLER.Get_V_TB_PO_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
@ -103,7 +110,7 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
protected void Grid_V_TB_PO_Sort(object sender, FineUI.GridSortEventArgs e)
{
BindOrder();
}
protected void btnOutput_Click(object sender, EventArgs e)
@ -219,10 +226,10 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
protected void BtnSearchDetail_Click(object sender, EventArgs e)
{
string PoBillNum = TXT_BillNo.Text ;
string VendName = TXT_VendName.Text;
//string VendName = TXT_VendName.Text;
string State = DDL_State.SelectedValue;
string PartCode = TXT_PartCode.Text;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../../PlanData/SCP_PO_DETAIL.aspx?PoBillNum={0}&&VendName={1}&&State={2}&&PartCode={3}", PoBillNum,VendName,State,PartCode)));
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../../PlanData/SCP_PO_DETAIL.aspx?PoBillNum={0}&&VendName={1}&&State={2}&&PartCode={3}", PoBillNum,State,PartCode)));
}
protected void btnModeType1_Click(object sender, EventArgs e)
{

56
SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views..PlanData {
namespace SCP.Views..PlanData
{
public partial class SCP_PO {
public partial class SCP_PO
{
/// <summary>
/// form1 控件。
@ -148,76 +150,85 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// TXT_Vendid 控件。
/// DropDownList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Vendid;
protected global::FineUI.DropDownList DropDownList1;
/// <summary>
/// TXT_VendName 控件。
/// TXT_Extend1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
protected global::FineUI.TextBox TXT_Extend1;
/// <summary>
/// TXT_Site_Desc 控件。
/// TXT_Extend2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Site_Desc;
protected global::FineUI.TextBox TXT_Extend2;
/// <summary>
/// DP_StartDate 控件。
/// TXT_Extend3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
protected global::FineUI.TextBox TXT_Extend3;
/// <summary>
/// DP_EndDate 控件。
/// ddl_Vender 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_EndDate;
protected global::FineUI.DropDownList ddl_Vender;
/// <summary>
/// DDL_State 控件。
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// TXT_PartCode 控件。
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// DropDownList1 控件。
/// DP_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DropDownList1;
protected global::FineUI.DatePicker DP_EndDate;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// BtnClose 控件。
@ -237,6 +248,15 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// BtnSearchDetail 控件。
/// </summary>

80
SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO_CREATE_ASK.aspx

@ -25,6 +25,8 @@
</f:Button>--%>
<%-- <f:Button ID="btnContract" runat="server" EnablePostBack="True" OnClick="btnContract_Click" Text="合同校验" Icon="CssAdd" OnClientClick="if(!confirm('是否作废该订单?'))return false;">
</f:Button> --%>
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@ -39,6 +41,14 @@
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_SubSite" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
@ -57,10 +67,33 @@
</Items>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" >
<Items>
<f:Form runat="server" BodyPadding="5px" Width="900px">
<Rows>
<f:FormRow runat="server" ColumnWidths="100%">
<Items>
<f:TextArea LabelAlign="Top" ID="TextArea_PartCode" Label="零件编码 (零件编码之间请用,号隔开)" runat="server" Height="100px">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<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:HiddenField ID="HF_GRID_INDEX" runat="server"></f:HiddenField>
<f:Grid ID = "Grid_V_TB_PO_DETAIL" EnableCollapse = "true" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true"
DataKeyNames = "UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty,ReceivedPort"
DataKeyNames = "UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty,ReceivedPort,SubSite,Extend1,Extend2,Extend3"
SortField="PoLine"
OnSort="Grid_V_TB_PO_DETAIL_Sort"
AllowSorting="true"
AllowPaging="True"
AllowCellEditing="true" ClicksToEdit="2"
IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
@ -81,10 +114,11 @@
<Columns>
<%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" />
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态" SortField="State_DESC"></f:BoundField>
<f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" SortField="PoLine" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" SortField="PartDesc1" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" SortField="PartCode"/>
<%--<f:TemplateField HeaderText="要货数量" Width="70px">
<ItemTemplate>
<asp:TextBox ID="NB_PublishNum" runat="server" Width="60px" Text="0"></asp:TextBox>
@ -115,16 +149,48 @@
</f:RenderField>
<f:RenderField Width="120px" ColumnID="EndTime" DataField="EndTime" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="到货日期">
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="到货日期" SortField="EndTime">
<Editor>
<f:DatePicker ID="DatePicker1" Required="true" runat="server">
</f:DatePicker>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="SubSite" DataField="SubSite" FieldType="String"
HeaderText="子网站" Hidden="true">
<Editor>
<f:NumberBox ID="NumberBox2" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Extend1" DataField="Extend1" FieldType="String"
HeaderText="子网站" Hidden="true">
<Editor>
<f:NumberBox ID="NumberBox3" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Extend2" DataField="Extend2" FieldType="String"
HeaderText="子网站" Hidden="true" >
<Editor>
<f:NumberBox ID="NumberBox4" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Extend3" DataField="Extend3" FieldType="String"
HeaderText="子网站" Hidden="true">
<Editor>
<f:NumberBox ID="NumberBox5" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" />
<f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/>
<%-- <f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> --%>
<f:RenderField Width="100px" ColumnID="Price" DataField = "Price" FieldType="Float" Hidden="true"
HeaderText="价格">
<Editor>

84
SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO_CREATE_ASK.aspx.cs

@ -77,6 +77,10 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
this.TXT_VendName.Text = _result.VendName;
this.txtRemark.Text = _result.Remark;
this.TXT_SubSite.Text = _result.SubSite;
this.TXT_Extend1.Text = _result.Extend1;
this.TXT_Extend2.Text = _result.Extend2;
this.TXT_Extend3.Text = _result.Extend3;
}
});
}
@ -84,6 +88,16 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
{
var qadOrder = Session["order"] as V_TB_PO;
SearchV_TB_PO_DETAIL((ret)=> {
if (!string.IsNullOrEmpty(TextArea_PartCode.Text))
{
List<string> _strlist = new List<string>();
string[] sArray = TextArea_PartCode.Text.Trim().Split(',');
foreach (string y in sArray)
{
_strlist.Add(y);
}
ret = ret.Where(p => _strlist.Contains(p.PartCode));
}
this.Grid_V_TB_PO_DETAIL.RecordCount = ret.Count();
var list = SortAndPage<V_TB_PO_DETAIL>(ret, Grid_V_TB_PO_DETAIL);
var _ls= SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(SCP_PO_CONTROLLER.LOAD_PO_DETAIL_SUM(list.ToList()));
@ -105,8 +119,12 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
{
_ls.ForEach(p =>
{
var _tempQty = (p.TempQty == null) ? 0 : (decimal)p.TempQty;
if (_tempQty <= p.PlanQty)
{
p.PublishQty = p.PlanQty - _tempQty;
}
p.EndTime = DateTime.Now;
});
}
@ -115,6 +133,20 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
Grid_V_TB_PO_DETAIL.DataSource = _ls;
Grid_V_TB_PO_DETAIL.DataBind();
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
{
if (qadOrder != null)
{
if (qadOrder.ModType == (int)BillModType.Non_Contract)
{
var _column = Grid_V_TB_PO_DETAIL.FindColumn("PublishQty");
_column.Hidden = true;
}
}
}
}
});
}
protected void Grid_V_TB_PO_DETAIL_PageIndexChange(object sender, GridPageEventArgs e)
@ -135,6 +167,10 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
protected void btnRelease_Click(object sender, EventArgs e)
{
var qadOrder = Session["order"] as V_TB_PO;
qadOrder.SubSite =TXT_SubSite.Text;
qadOrder.Extend1 = TXT_Extend1.Text;
qadOrder.Extend2 = TXT_Extend2.Text;
qadOrder.Extend3 = TXT_Extend3.Text;
//qadOrder.ReceivedPort = DDL_PORT.SelectedValue;
if (DP_BeginTime.SelectedDate == null )
{
@ -190,6 +226,7 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
_entity.PartDesc2 = rowDataKeys[34] as string;
_entity.TempQty = ConvertHelper.To<Decimal>(rowDataKeys[35]);
_entity.BeginTime = DP_BeginTime.SelectedDate;
_entity.PublishQty= ConvertHelper.To<Decimal>(rowDataKeys[36]);
if (qadOrder.ModType == (int)BillModType.Non_Contract)
{
_entity.PublishQty = ConvertHelper.To<Decimal>(rowDataKeys[36]);
@ -202,6 +239,22 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
{
var modifyValue = modifiedDict[i];
if (modifyValue.Keys.Contains("SubSite"))
{
_entity.SubSite = modifyValue["SubSite"].ToString();
}
if (modifyValue.Keys.Contains("Extend1"))
{
_entity.Extend1 = modifyValue["Extend1"].ToString();
}
if (modifyValue.Keys.Contains("Extend2"))
{
_entity.Extend2 = modifyValue["Extend2"].ToString();
}
if (modifyValue.Keys.Contains("Extend3"))
{
_entity.Extend3 = modifyValue["Extend3"].ToString();
}
if (modifyValue.Keys.Contains("PublishQty"))
{
@ -310,6 +363,8 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
}
}
if(CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0)
{
if (qadOrder.ModType == 2)
{
int i = 0;
@ -327,6 +382,7 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
}
}
}
var _ls=qadOrderList.Where(itm => string.IsNullOrEmpty(itm.PartDesc1) && string.IsNullOrEmpty(itm.PartDesc2)).ToList();
@ -338,6 +394,14 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
Alert.Show(_str);
return;
}
if(CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0)
{
if(CurrentUser.FactoryList.FirstOrDefault()== "CQBMPT")
{
qadOrder.Remark = "";
qadOrderList.ForEach(p => { p.Remark = string.Empty; });
}
}
var ret = SCP_PO_CONTROLLER.Save_PO_TO_ASK(qadOrder, qadOrderList, CurrentUser.ChineseName, str,CurrentUser.Name);
if (ret.Result == true)
{
@ -363,7 +427,21 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData
BindDetail();
}
protected void Grid_V_TB_PO_DETAIL_Sort(object sender, GridSortEventArgs e)
{
BindDetail();
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindDetail();
}
protected void BtnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
protected void btnShow_Click(object sender, EventArgs e)
{
gp1.Hidden = false;
}
}
}

123
SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views..PlanData {
namespace SCP.Views..PlanData
{
public partial class SCP_PO_CREATE_ASK {
public partial class SCP_PO_CREATE_ASK
{
/// <summary>
/// form1 控件。
@ -57,6 +59,15 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.Button btnRelease;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// TXT_State_DESC 控件。
/// </summary>
@ -93,6 +104,42 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.TextBox TXT_VendId;
/// <summary>
/// TXT_SubSite 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_SubSite;
/// <summary>
/// TXT_Extend1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend1;
/// <summary>
/// TXT_Extend2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend2;
/// <summary>
/// TXT_Extend3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend3;
/// <summary>
/// DP_BeginTime 控件。
/// </summary>
@ -120,6 +167,42 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.TextBox txtRemark;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// TextArea_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextArea TextArea_PartCode;
/// <summary>
/// BtnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnClose;
/// <summary>
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// HF_GRID_INDEX 控件。
/// </summary>
@ -192,6 +275,42 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData {
/// </remarks>
protected global::FineUI.DatePicker DatePicker1;
/// <summary>
/// NumberBox2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox NumberBox2;
/// <summary>
/// NumberBox3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox NumberBox3;
/// <summary>
/// NumberBox4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox NumberBox4;
/// <summary>
/// NumberBox5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox NumberBox5;
/// <summary>
/// NumberBox1 控件。
/// </summary>

99
SCP/Views/青岛一汽法雷奥/SupplierData/PlanDetail.aspx

@ -1,99 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanDetail.aspx.cs" Inherits="SCP.SupplierData.PlanDetail" %>
<!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="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="box">
</f:Button>
<f:Button ID="btnConfirm" runat="server" EnablePostBack="True" Text="确认订单" Icon="Accept" OnClick="btnConfirm_OnClick" OnClientClick="if(!confirm('是否要确认订单?'))return false;">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<%-- <f:Label runat="server" Label="状态"/>--%>
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" Width="600">
</f:TextBox>
<f:TextBox ID="txtbillnum" runat="server" Label="订单号" Text="" Width="600">
</f:TextBox>
<f:TextBox runat="server" ID="txtBillTime" Label="创建时间" Text="" Readonly="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox runat="server" ID="txtSupplierCode" Label="供应商" Text="" Readonly="true" />
<f:TextBox ID="txtDeliveryAddress" runat="server" Label="发往地点" Text="">
</f:TextBox>
<f:Label runat="server" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox ID="txtDueTime" runat="server" Label="截止日期" Text="" Readonly="true" />
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="">
</f:TextBox>
<f:Label runat="server" />
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Toolbar runat="server">
<Items>
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" OnClick="btnCreate_OnClick" Text="生成发货单" Icon="CssAdd">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel">
</f:Button>
<f:ToolbarFill runat="server" />
</Items>
</f:Toolbar>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="10" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True">
<Columns>
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" />
<f:BoundField SortField="Line" DataField="Line" HeaderText="行号" ColumnID="Line" Width="40px" />
<f:BoundField SortField="ProductCode" DataField="PartCode" HeaderText="零件号" ColumnID="ProductCode" Width="100px" />
<f:BoundField SortField="ProductName" DataField="PartDesc1" HeaderText="零件描述" ColumnID="ProductName" Width="300px" />
<f:BoundField SortField="UnitCode" DataField="Unit" HeaderText="单位" ColumnID="UnitCode" Width="40px" />
<f:BoundField SortField="PackageQty" DataField="PackQty" HeaderText="标包数量" ColumnID="PackageQty" Width="40px" />
<f:BoundField SortField="CurrencyCode" DataField="Currency" HeaderText="币种" ColumnID="CurrencyCode" Width="40px" />
<f:BoundField SortField="Price" DataField="Price" HeaderText="价格" ColumnID="Price" Width="80px" />
<f:BoundField SortField="PlanQty" DataField="BillQty" HeaderText="订单数量" ColumnID="PlanQty" Width="60px" />
<f:BoundField SortField="OpenQty" DataField="ShippedQty" HeaderText="发货数量" ColumnID="OpenQty" Width="60px" />
<f:BoundField SortField="ShipQty" DataField="ShippedQty" HeaderText="发货数量" ColumnID="ShipQty" Width="60px" />
<f:BoundField SortField="ReceiveQty" DataField="ReceiveQty" HeaderText="收货数量" ColumnID="ReceiveQty" Width="60px" />
<f:BoundField SortField="RejectQty" DataField="Expr3" HeaderText="说明" ColumnID="RejectQty" Width="60px" />
</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="640px" Width="700px" />
<f:Window ID="WindowUpload" runat="server" Hidden="True"
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="200px" Width="400px">
</f:Window>
</form>
</body>
</html>

90
SCP/Views/青岛一汽法雷奥/SupplierData/PlanDetail.aspx.cs

@ -1,90 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.Enums;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Common;
using CK.SCP.Controller;
using FineUI;
namespace SCP.SupplierData
{
public partial class PlanDetail : PageBase
{
//private List<V_POAllDetail> _list;
//private V_POAllDetail _Model;
public V_POAll model;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string id = GetQueryValue("ID");
model = POController.GetPOAlllistByBillNum(id);
txtState.Text = EnumHelper.GetDescription((PlanState) model.State);
txtbillnum.Text = model.BillNum;
txtBillTime.Text = Convert.ToDateTime(model.BillTime).ToString("yyyy-MM-dd");
txtSupplierCode.Text = model.VendName;
txtDeliveryAddress.Text = model.ShipToSite;
txtDueTime.Text = Convert.ToDateTime(model.DueDate).ToString("yyyy-MM-dd");
txtRemark.Text = model.Remark;
BindData(id);
//this.btnEdit.OnClientClick = OpenWindow_Edit("/BillData/PlanDetailEdit.aspx?ParentID=" + ParentID, "修改");
}
}
public void BindData(string id)
{
Expression<Func<V_POAllDetail, dynamic>> select = c => c;
Expression<Func<V_POAllDetail, bool>> where = c => c.BillNum == id;
Expression<Func<V_POAllDetail, int>> order = c => c.UID;
int total;
var list = EntitiesHelper.GetPagedDataDesc(SCPDB,
select,
where,
order,
Grid1.PageIndex,
Grid1.PageSize,
out total).ToList();
Grid1.RecordCount = total;
Grid1.DataSource = list;
Grid1.DataBind();
}
//订单作废
protected void Button5_OnClick(object sender, EventArgs e)
{
string id = GetQueryValue("ID");
TF_PO POModel = POController.GetlistByBillNum(id);
TF_PO order = POController.GetlistByID(POModel.UID);
order.State = (int) PlanState.Reject;
POController.UpdatePOState(order);
PageContext.Refresh();
}
//确认订单
protected void btnConfirm_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
//生产发货单
protected void btnCreate_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
}

50
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK.aspx

@ -10,23 +10,33 @@
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<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:ToolbarSeparator runat="server" />
<f:Button ID="button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Add" OnClientClick="location.reload();">
<f:Button ID="button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Reload" OnClientClick="location.reload();">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_Click" >
</f:Button>
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_Click">
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Find" OnClick="btnDetail_Click">
</f:Button>
<f:Button ID="btnAsn" runat="server" Text="生成发货单" Icon="Zoom" OnClick="btnAsn_Click">
<f:Button ID="btnAsn" runat="server" Text="生成发货单" Icon="Add" OnClick="btnAsn_Click">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="查询面板" OnClick="btnShow_Click">
<f:Button ID="btnShow" runat="server" Text="查询面板" Icon="Zoom" OnClick="btnShow_Click">
</f:Button>
<f:Button ID="Button6" runat="server" Text="全部" Icon="Reload" OnClick="Button6_Click" >
</f:Button>
<%-- <f:Button ID="Button1" runat="server" Text="新建" Icon="Reload" OnClick="Button1_Click" >
</f:Button>--%>
<f:Button ID="Button2" runat="server" Text="发布" Icon="Reload" OnClick="Button2_Click" >
</f:Button>
<f:Button ID="Button4" runat="server" Text="已确认" Icon="Reload" OnClick="Button4_Click" >
</f:Button>
<f:Button ID="Button5" runat="server" Text="已发货" Icon="Reload" OnClick="Button5_Click" >
</f:Button>
<f:ToolbarSeparator runat="server" />
@ -41,16 +51,21 @@
<f:FormRow runat="server" ID="FormRow_1">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain">
</f:DropDownList>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
<f:TextBox runat = "server" Label = "看板编号" EmptyText = "" ID = "TXT_AskBillNo" />
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_VendId" />
<f:TextBox runat = "server" Label = "送货地点" EmptyText = "" ID = "TXT_Site_Desc" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_2">
<Items>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="至" ID="Date_EndDate" />
<f:DropDownList runat="server" ID="DDL_State" Label="状态">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="新建" Value="0" />
@ -60,6 +75,8 @@
<f:ListItem Text="已收货" Value="4" />
<f:ListItem Text="已完成" Value="5" />
</f:DropDownList>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="至" ID="Date_EndDate" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_3">
@ -75,11 +92,11 @@
</Items>
</f:GroupPanel>
<f:Grid ID = "Grid_V_TB_ASK" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true"
<f:Grid ID = "Grid_V_TB_ASK" PageSize="100" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true"
DataKeyNames = "UID,PoBillNum,AskBillNum,VendId,Site,Buyer,BuyerPhone,State,Remark,VendName,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID"
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_ASK_Sort" SortField="CreateTime"
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_ASK_RowDoubleClick"
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_ASK_PageIndexChange">
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_ASK_PageIndexChange" OnRowDataBound="Grid_V_TB_ASK_RowDataBound" BoxFlex="1">
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
@ -92,14 +109,19 @@
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField Width = "60px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" />
<f:TemplateField HeaderText="状态" Width="70px" ColumnID="State_DESC1">
<ItemTemplate>
<asp:label ID="State_DESC" runat="server" Width="65px" Text='<%# Eval("State_DESC") %>' ></asp:label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" />
<f:BoundField Width = "100px" DataField = "AskBillNum" DataFormatString = "{0}" HeaderText = "要货看板号" />
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单编号" />
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="ERP订单号" />
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" />
<%--<f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%>
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" />
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "开始日期" />
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "交货日期" />
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" />
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" />
<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" />
@ -107,7 +129,9 @@
</f:Grid>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" CloseAction="HidePostBack"
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
<f:Window runat="server" ID="Window1" Hidden="True" AutoScroll="True" Width="1024px" Height="600px" CloseAction="HidePostBack"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" OnClose="Window1_Close"
IFrameUrl="about:blank" />
<f:Window ID="WindowUpload" runat="server" Hidden="True" OnClose="WindowUpload_Close"

73
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK.aspx.cs

@ -21,6 +21,7 @@ using SCP.Code;
using EntitiesHelper = CK.SCP.Controller.EntitiesHelper;
using System.IO;
using CK.SCP.Models.ScpEntity.ExcelImportEntity;
using System.Drawing;
namespace SCP.Views..SupplierData
{
@ -30,7 +31,7 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
{
if (!IsPostBack)
{
LoadData();
BindAsk();
CheckRolesMenu();
TranslatorAgents(FormRow_1);
TranslatorAgents(FormRow_2);
@ -39,16 +40,13 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
TranslatorAgents(Toolbar2);
}
}
public void LoadData()
{
BindAsk();
}
public void BindAsk()
{
SearchV_TB_ASKData((result) => {
Grid_V_TB_ASK.RecordCount = result.Count();
var list = SortAndPage<V_TB_ASK>(result, Grid_V_TB_ASK);
Grid_V_TB_ASK.DataSource = list.OrderBy("State");
var ls=SCP_ASK_CONTROLLER.GET_IS_COMPLETED_SEND(list.ToList());
Grid_V_TB_ASK.DataSource = ls;
Grid_V_TB_ASK.DataBind();
});
@ -83,11 +81,20 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
}
public void SearchV_TB_ASKData(Action<IQueryable<V_TB_ASK>> p_action)
{
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList();
DropDownList1.DataSource = ls;
DropDownList1.DataBind();
V_TB_ASK _entity = new V_TB_ASK();
_entity.IsDeleted = false;
_entity.PoBillNum = TXT_BillNo.Text;
_entity.VendName = TXT_VendName.Text;
_entity.VendId = TXT_VendId.Text;
_entity.State_DESC = TXT_Site_Desc.Text;
_entity.AskBillNum = TXT_AskBillNo.Text;
_entity.ErpBillNum = TXT_ProjectId.Text;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.Extend1 = TXT_Extend1.Text;
_entity.Extend2 = TXT_Extend2.Text;
_entity.Extend3 = TXT_Extend3.Text;
if (DP_StartDate.SelectedDate != null)
{
_entity.BeginTime = DP_StartDate.SelectedDate;
@ -101,10 +108,14 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
_entity.BillStateList = new List<int>() { int.Parse(DDL_State.SelectedValue) };
}
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
if (CurrentUser.RoleList.Contains("供应商"))
{
_entity.BillStateList = new List<int> { (int)AskState.Confirm, (int)AskState.Release, (int)AskState.Ship, (int)AskState.Receive };
if(CurrentUser.VenderList==null && CurrentUser.VenderList.Count==0)
{
CurrentUser.VenderList = new List<string>() { "00000000000" };
}
_entity.UserInVendIds = CurrentUser.VenderList;
}
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
@ -118,7 +129,7 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
{
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[e.RowIndex];
string AskBillNum = rowDataKeys[2] as string;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum)));
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum)));
}
protected void Grid_V_TB_ASK_Sort(object sender, GridSortEventArgs e)
@ -164,7 +175,7 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
string AskBillNum = rowDataKeys[2] as string;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum)));
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum)));
}
protected void BtnPublish_Click(object sender, EventArgs e)
@ -252,7 +263,7 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
}
string AskBillNum = rowDataKeys[2] as string;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("SCP_ASN_CREATE.aspx?AskBillNum={0}", AskBillNum)));
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_CREATE.aspx?AskBillNum={0}&State=1", AskBillNum)));
}
}
@ -264,6 +275,44 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
if (Session["Ask"] != null)
{
Session["Ask"] = null;
}
BindAsk();
}
protected void Grid_V_TB_ASK_RowDataBound(object sender, GridRowEventArgs e)
{
var itm = e.DataItem as V_TB_ASK;
if (itm.IsComplete==false)
{
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_ASK.Rows[e.RowIndex].FindControl("State_DESC");
_label.ForeColor = Color.Red;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
DDL_State.SelectedValue = "0";
BindAsk();
}
protected void Button2_Click(object sender, EventArgs e)
{
DDL_State.SelectedValue = "1";
BindAsk();
}
protected void Button4_Click(object sender, EventArgs e)
{
DDL_State.SelectedValue = "2";
BindAsk();
}
protected void Button6_Click(object sender, EventArgs e)
{
DDL_State.SelectedValue = string.Empty;
BindAsk();
}
protected void Button5_Click(object sender, EventArgs e)
{
DDL_State.SelectedValue = "3";
BindAsk();
}
}

130
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views..SupplierData {
namespace SCP.Views..SupplierData
{
public partial class SCP_ASK {
public partial class SCP_ASK
{
/// <summary>
/// form1 控件。
@ -84,6 +86,42 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData {
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// Button6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button6;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button2;
/// <summary>
/// Button4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button4;
/// <summary>
/// Button5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button5;
/// <summary>
/// gp1 控件。
/// </summary>
@ -112,13 +150,58 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData {
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// TXT_VendName 控件。
/// DropDownList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DropDownList1;
/// <summary>
/// TXT_Extend1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend1;
/// <summary>
/// TXT_Extend2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend2;
/// <summary>
/// TXT_Extend3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend3;
/// <summary>
/// TXT_AskBillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AskBillNo;
/// <summary>
/// TXT_VendId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
protected global::FineUI.TextBox TXT_VendId;
/// <summary>
/// TXT_Site_Desc 控件。
@ -139,31 +222,40 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData {
protected global::FineUI.FormRow FormRow_2;
/// <summary>
/// DP_StartDate 控件。
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// Date_EndDate 控件。
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker Date_EndDate;
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// DDL_State 控件。
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// Date_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker Date_EndDate;
/// <summary>
/// FormRow_3 控件。
@ -228,6 +320,24 @@ namespace SCP.Views.青岛一汽法雷奥.SupplierData {
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// State_DESC 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label State_DESC;
/// <summary>
/// highlightRows 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField highlightRows;
/// <summary>
/// Window1 控件。
/// </summary>

12
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASK_DETAIL.aspx

@ -22,17 +22,7 @@
<f:Button ID="btnNoConfirm" runat="server" EnablePostBack="True" OnClick="btnNoConfirm_Click" Text="取消确认" Icon="CssAdd">
</f:Button>
<%-- <f:Button ID="btnRelease" runat="server" EnablePostBack="True" OnClick="btnRelease_Click" Text="发布" Icon="CssAdd" OnClientClick="if(!confirm('是否要发布?'))return false;">
</f:Button>
<f:Button ID="btnReleaseCancel" runat="server" EnablePostBack="True" OnClick="btnReleaseCancel_Click" Text="取消发布" Icon="CssAdd" OnClientClick="if(!confirm('是否要取消发布?'))return false;">
</f:Button>
<f:Button ID="btnCompleteForce" runat="server" EnablePostBack="True" OnClick="btnCompleteForce_Click" Text="强制完结" Icon="CssAdd" OnClientClick="if(!confirm('是否要强制完结该订单?'))return false;">
</f:Button>
<f:Button ID="btnReject" runat="server" EnablePostBack="True" OnClick="btnReject_Click" Text="看板作废" Icon="CssAdd" OnClientClick="if(!confirm('是否作废该订单?'))return false;">
</f:Button>
<f:Button ID="BTN_SAVE" runat="server" EnablePostBack="True" Text="保存" Icon="CssAdd" OnClick="BTN_SAVE_Click" >
</f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
@ -106,7 +96,7 @@
<%--<f:BoundField SortField="TempQty" DataField="TempQty" HeaderText="待发数" ColumnID="TempQty" Width="60px" />
<f:BoundField SortField="ShipQty" DataField="ShippedQty" HeaderText="发货数" ColumnID="ShipQty" Width="60px" />
<f:BoundField SortField="ReceiveQty" DataField="ReceiveQty" HeaderText="收货数" ColumnID="ReceiveQty" Width="60px" />--%>
<f:BoundField SortField="RejectQty" DataField="Remark" HeaderText="说明" ColumnID="RejectQty" />
<f:BoundField SortField="Remrk" DataField="Remark" HeaderText="说明" ColumnID="RejectQty" />
<f:BoundField SortField="ReceivedPort_Desc" DataField="ReceivedPort_Desc" HeaderText="收货口" ColumnID="ReceivedPort_Desc" />
</Columns>
</f:Grid>

135
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN.aspx

@ -0,0 +1,135 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN.aspx.cs" Inherits="SCP.Views.青岛一汽法雷奥.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="Reload" OnClientClick="location.reload();">
</f:Button>
<f:Button ID="BtnOutPut" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="BtnOutPut_Click">
</f:Button>
<f:Button ID="btnDetail" runat="server" EnablePostBack="True" Text="明细" Icon="Find" OnClick="btnDetail_Click">
</f:Button>
<f:Button ID="btnNew" runat="server" EnablePostBack="True" Text="新建发货单" Hidden="true" 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="Find" Text="显示查询面板" OnClick="btnShow_Click">
</f:Button>
<f:Button ID="btnPallet" runat="server" Icon="Add" Text="创建托盘" OnClick="btnPallet_Click" Hidden="true">
</f:Button>
<f:Button ID="btnPalletDetail" runat="server" Icon="Zoom" Text="查看托盘" OnClick="btnPalletDetail_Click" Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Label runat="server" Label="物料发出前,请确认发货单是【已发货】状态,如果是发货单是【新建】状态请进入明细,点击【确认发货】按钮。" LabelWidth="800" ColumnWidth="800" Width="800" />
<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:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain">
</f:DropDownList>
<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>

203
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN.aspx.cs

@ -0,0 +1,203 @@
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.Views..SupplierData
{
public partial class SCP_ASN : 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()
{
if (!CurrentUser.RoleList.Contains("供应商"))
{
Alert.Show("当前用户角色不能操作模块!");
return;
}
if (CurrentUser.VenderList.Count == 0)
{
Alert.Show("当前用户分配供应商!");
return;
}
BindASN();
}
/// <summary>
/// 数据绑定
/// </summary>
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();
});
}
/// <summary>
/// 获取数据
/// </summary>
/// <param name="p_action"></param>
public void SearchV_TB_ASN(Action<IQueryable<V_TB_ASN>> p_action)
{
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList();
DropDownList1.DataSource = ls;
DropDownList1.DataBind();
V_TB_ASN _entity = new V_TB_ASN();
_entity.IsDeleted = false;
_entity.VendId = TXT_VenderName.Text;
_entity.PoBillNum = txtPO.Text;
_entity.AsnBillNum = txtBill.Text;
_entity.AskBillNum = TXT_ASK.Text;
_entity.UserInVendIds = CurrentUser.VenderList;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.Extend1 = TXT_Extend1.Text;
_entity.Extend2 = TXT_Extend2.Text;
_entity.Extend3 = TXT_Extend3.Text;
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
/// <summary>
/// Grid双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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)));
}
/// <summary>
/// 导出发货单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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, "发货单");
});
}
/// <summary>
/// 查看明细
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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)));
}
/// <summary>
/// 显示查询面板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnShow_Click(object sender, EventArgs e)
{
gp1.Hidden = false;
}
/// <summary>
/// 关闭查询面板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
/// <summary>
/// 查询事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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("../../Views/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)));
}
}
}

323
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN.aspx.designer.cs

@ -0,0 +1,323 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views..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>
/// DropDownList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DropDownList1;
/// <summary>
/// TXT_Extend1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend1;
/// <summary>
/// TXT_Extend2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend2;
/// <summary>
/// TXT_Extend3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend3;
/// <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;
}
}

12
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx

@ -29,6 +29,14 @@
<f:TextBox runat = "server" Label = "供应商" Enabled="false" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Enabled="false" Label = "发往地点" EmptyText = "" ID = "TXT_Site" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_SubSite" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true"/>
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" />
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2">
<Items>
@ -51,7 +59,7 @@
</Items>
</f:Form>
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL"
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,ShippedQty,ReceivedQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AskBillNum,AskQty,TempQty,ReceivedPort,ProduceDate,ReduceQty,ValidityDays"
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,ShippedQty,ReceivedQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AskBillNum,AskQty,TempQty,ReceivedPort,ProduceDate,ReduceQty,ValidityDays,Batch,SubSite,Extend1,Extend2,Extend3"
IsDatabasePaging="True" AllowPaging="True" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange" OnRowDataBound="Grid_V_TB_ASK_DETAIL_RowDataBound"
EnableRowSelectEvent="True" PageSize="500" AutoScroll="True" SortField="PoLine" SortDirection="DESC" AllowCellEditing="true" ClicksToEdit="1" >
<PageItems>
@ -74,7 +82,7 @@
<f:RenderField Width="100px" ColumnID="PackQty" DataField="PackQty" FieldType="Float"
HeaderText="标包数量">
<Editor>
<f:NumberBox ID="TXT_PackQty" runat="server" MinValue="0"
<f:NumberBox ID="TXT_PackQty" runat="server" MinValue="0" Enabled="false"
MaxValue="99999999" DecimalPrecision="2" >
</f:NumberBox>
</Editor>

31
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.cs

@ -59,6 +59,7 @@ namespace SCP.青岛一汽法雷奥.SupplierData
if (_ret.State == ReturnStatus.Succeed)
{
var _result = _ret.Result.FirstOrDefault();
Session["Ask"]= null;
Session["Ask"] = _result;
this.TXT_AskBillNum.Text = _result.AskBillNum;
this.TXT_State.Text = _result.State.ToString();
@ -66,6 +67,10 @@ namespace SCP.青岛一汽法雷奥.SupplierData
this.TXT_State_Desc.Text = _result.State_DESC;
this.TXT_VendName.Text = _result.VendName;
this.TXT_Remark.Text = _result.Remark;
this.TXT_SubSite.Text = _result.SubSite;
this.TXT_Extend1.Text = _result.Extend1;
this.TXT_Extend2.Text = _result.Extend2;
this.TXT_Extend3.Text = _result.Extend3;
DP_ShipTime.SelectedDate = DateTime.Now;
DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID));
DDL_PORT.DataBind();
@ -301,6 +306,11 @@ namespace SCP.青岛一汽法雷奥.SupplierData
_entity.ShippedQty = _entity.ShippedQty + QtyAll;
}
}
if(_model.AskBillNum!= _askDetaillist[0].AskBillNum)
{
Alert.Show("要货看板号不对应请关闭页面重新生成发货单!");
return;
}
_model.ShipTime = DP_ShipTime.SelectedDate;
_model.ShipUser = TXT_ShipUser.Text;
_model.ReceiveTime = DP_ReceiveTime.SelectedDate;
@ -310,12 +320,12 @@ namespace SCP.青岛一汽法雷奥.SupplierData
Alert.Show("发货数量未填写");
return;
}
SCP_ASK_CONTROLLER_PACKAGE.IS_CHECK_PACKAGE(_askDetaillist, (rs) => {
//SCP_ASK_CONTROLLER_PACKAGE.IS_CHECK_PACKAGE(_askDetaillist, (rs) => {
// if (rs.State == ReturnStatus.Succeed)
// {
// if (rs.Result == true)
if (rs.State == ReturnStatus.Succeed)
{
if (rs.Result == true)
{
var ret = SCP_ASK_CONTROLLER.Save_ASK_TO_ASN(_model, _askDetaillist, TXT_PlateNumber.Text, CurrentUser.Name, CurrentUser.CellPhone);
if (ret.State == ReturnStatus.Succeed)
{
@ -323,20 +333,11 @@ namespace SCP.青岛一汽法雷奥.SupplierData
GetV_TB_POData();
BindDetail();
}
}
else
{
Alert.Show(string.Join("<br>", rs.MessageList));
//Alert.Show("超出托盘容纳的箱数!");
Alert.Show("生成发货单失败!");
}
}
});
}
private string GetBatch(DateTime dt)

42
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP..SupplierData {
namespace SCP..SupplierData
{
public partial class SCP_ASN_CREATE {
public partial class SCP_ASN_CREATE
{
/// <summary>
/// form1 控件。
@ -102,6 +104,42 @@ namespace SCP.青岛一汽法雷奥.SupplierData {
/// </remarks>
protected global::FineUI.TextBox TXT_Site;
/// <summary>
/// TXT_SubSite 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_SubSite;
/// <summary>
/// TXT_Extend1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend1;
/// <summary>
/// TXT_Extend2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend2;
/// <summary>
/// TXT_Extend3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Extend3;
/// <summary>
/// FormRow_2 控件。
/// </summary>

184
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_DETAIL.aspx

@ -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="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="打印全部条码" Icon="Printer" OnClick="btnSelectedBarCode_Click"></f:Button>
<f:Button runat="server" ID="btnBarCodeList" Text="显示条码列表" Icon="Layers" OnClick="btnBarCodeList_Click"></f:Button>
<f:Button runat="server" ID="btnCreatePallet" Text="生成托盘" Icon="Printer" OnClick="btnCreatePallet_Click"></f:Button>
<f:Button runat="server" ID="btnOutputPallet" Text="导出或打印托盘" Icon="Printer" OnClick="btnOutputPallet_Click"></f:Button>
<f:Button runat="server" ID="btnCreateSmallBarCode" Text="生成小包装" Icon="Printer" OnClick="CreateSmallBarCode_Click"></f:Button>
<f:Button runat="server" ID="btnOutputSmallBarCode" Text="导出或打印小包装" Icon="Printer" OnClick="btnOutputSmallBarCode_Click"></f:Button>
<f:Button runat="server" ID="btnOutPut" Text="导出明细" Icon="PageExcel" OnClick="btnOutput_Click"></f:Button>
</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 = "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="明细" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="500px" Width="1000px" />
<f:Window ID="WindowUpload" runat="server" Hidden="True"
WindowPosition="Center" IsModal="true" Title="明细" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="200px" Width="400px">
</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>

573
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_DETAIL.aspx.cs

@ -0,0 +1,573 @@
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);
}
}
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;
}
}
});
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_SMALL_List(new TS_BARCODE_SMALL() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj =>
{
if (retobj.State == ReturnStatus.Succeed)
{
if (retobj.Result.Count() > 0)
{
this.btnCreateSmallBarCode.Enabled = false;
}
else
{
this.btnCreateSmallBarCode.Enabled = true;
}
}
});
SCP_PALLET_CONTROLLER.Get_TB_PALLETS_List(new TB_PALLETS() { AsnBillNum = TXT_AsnBillNum.Text.Trim()}, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
if (ret.Result.Count() > 0)
{
this.btnCreatePallet.Enabled = false;
}
else
{
this.btnCreatePallet.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"|| CurrentUser.RoleList.Contains("分厂管理员"))
{
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()));
}
}
}
/// <summary>
/// 打印小包装条码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void CreateSmallBarCode_Click(object sender, EventArgs e)
{
var _list = GetSelectedList();
if (_list.Count > 0)
{
btnCreateSmallBarCode.Enabled = false;
var ret = SCP_ASN_CONTROLLER.Save_TB_CREATE_SMALLBARCODE(_list);
if (ret.State == ReturnStatus.Succeed)
{
Alert.Show("小包装条码创建成功!");
}
else
{
btnCreateSmallBarCode.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 btnSelectedBarCode_Click(object sender, EventArgs e)
{
string AsnBillNum = Request["AsnBillNum"];
if (!string.IsNullOrEmpty(AsnBillNum))
{
var str = string.Format("window.open(\"../../../Handlers/GenerateReport.ashx?report=Material&data=101&type=pdf&filename=标签.pdf&AsnBillNum={0}&open=\")", AsnBillNum);
PageContext.RegisterStartupScript(str);
}
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.BAR_CODE });
}
protected void btnPrint_Click(object sender, EventArgs e)
{
string AsnBillNum = Request["AsnBillNum"];
var str = string.Format("window.open(\"../../../Handlers/GenerateReport.ashx?report=SendBill_Pallet&data=107&type=pdf&filename=SendBill_Pallet.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 btnOutputSmallBarCode_Click(object sender, EventArgs e)
{
string AsnBillNum = Request["AsnBillNum"];
if (!string.IsNullOrEmpty(AsnBillNum))
{
var str = string.Format("window.open(\"../../../Handlers/GenerateReport.ashx?report=Small_Material&data=106&type=pdf&filename=Small_Material.pdf&AsnBillNum={0}&open=\")", AsnBillNum);
PageContext.RegisterStartupScript(str);
}
}
protected void btnOutputPallet_Click(object sender, EventArgs e)
{
string AsnBillNum = Request["AsnBillNum"];
if (!string.IsNullOrEmpty(AsnBillNum))
{
var str = string.Format("window.open(\"../../../Handlers/GenerateReport.ashx?report=Pallet&data=105&type=pdf&filename=托盘标签.pdf&AsnBillNum={0}&open=\")", AsnBillNum);
PageContext.RegisterStartupScript(str);
}
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.Pallet_CODE });
}
protected void btnCreatePallet_Click(object sender, EventArgs e)
{
var _list = GetSelectedList();
if (_list.Count > 0)
{
btnCreatePallet.Enabled = false;
var ret = SCP_ASN_CONTROLLER.Save_TB_PALLET(_list);
if (ret.State == ReturnStatus.Succeed)
{
Alert.Show("托码创建成功!");
}
else
{
btnCreatePallet.Enabled = true;
Alert.Show(string.Join("<br>", ret.MessageList));
}
}
}
}
}

332
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs

@ -0,0 +1,332 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
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>
/// 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>
/// btnBarCodeList 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnBarCodeList;
/// <summary>
/// btnCreatePallet 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreatePallet;
/// <summary>
/// btnOutputPallet 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutputPallet;
/// <summary>
/// btnCreateSmallBarCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreateSmallBarCode;
/// <summary>
/// btnOutputSmallBarCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutputSmallBarCode;
/// <summary>
/// btnOutPut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutPut;
/// <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;
}
}

57
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx

@ -1,57 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_SHIP_DETAIL_BARCODE.aspx.cs" Inherits="SCP.青岛一汽法雷奥.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:ToolbarText ID="ToolbarText1" runat="server" Text="&nbsp;&nbsp;">
</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="200" />
<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="PackQty" DataField="PackQty" HeaderText="标包数量" ColumnID="PackageQty"/>
</Columns>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>

89
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_SHIP_DETAIL_BARCODE.aspx.cs

@ -1,89 +0,0 @@
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..SupplierData
{
public partial class SCP_SHIP_DETAIL_BARCODE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TranslatorAgents(Toolbar1);
TranslatorAgent(Grid1);
BindData();
}
}
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;
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)
{
}
//补打条码
protected void btnPrintRe_Click(object sender, EventArgs e)
{
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=Material&data=101&type=pdf&filename=标签.pdf&Barcode={0}&open=\")",string.Join("_",_ls.ToArray()));
PageContext.RegisterStartupScript(str);
}
//查询
protected void btnSearch_Click(object sender, EventArgs e)
{
BindData();
}
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindData();
}
}
}

61
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_TS_BARCODE.aspx

@ -1,61 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_TS_BARCODE.aspx.cs" Inherits="SCP.青岛一汽法雷奥.SupplierData.SCP_TS_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 runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add">
</f:Button>
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="Button3_OnClick">
</f:Button>
<f:Button ID="Button2" runat="server" EnablePostBack="True" Text="补打条码" Icon="Printer" OnClick="Button2_OnClick">
</f:Button>
<f:Button ID="btnSearch" runat="server" Text="快速查找" Icon="Printer" OnClick="btnSearch_OnClick">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Layout="Column" ID="FormRow_1">
<Items>
<f:FormRow runat="server" BoxFlex="1">
<Items>
<f:Label runat="server" Label="条码" />
<f:TextBox ID="txtBarCode" runat="server" />
<f:Label runat="server" Label="零件号" />
<f:TextBox ID="txtPartCode" runat="server" />
<f:Label runat="server" Label="批次" />
<f:TextBox ID="txtBatch" runat="server" />
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="10" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="BarCode" SortDirection="DESC"
EnableRowSelectEvent="True" AutoScroll="True">
<Columns>
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" />
<f:BoundField SortField="BarCode" DataField="BarCode" HeaderText="条码" ColumnID="BarCode" Width="100px" />
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PartCode" Width="100px" />
<f:BoundField SortField="PartName" DataField="PartName" HeaderText="零件名称" ColumnID="PartName" Width="300px" />
<f:BoundField SortField="Batch" DataField="Batch" HeaderText="批次" ColumnID="Batch" Width="100px" />
<f:BoundField SortField="PackQty" DataField="PackQty" HeaderText="装箱数量" ColumnID="PackQty" Width="100px" DataFormatString = "{0:F}" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>

82
SCP/Views/青岛一汽法雷奥/SupplierData/SCP_TS_BARCODE.aspx.cs

@ -1,82 +0,0 @@
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;
namespace SCP..SupplierData
{
public partial class SCP_TS_BARCODE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TranslatorAgents(Toolbar2);
TranslatorAgent(Grid1);
TranslatorAgents(FormRow_1);
LoadData();
}
}
public void LoadData()
{
SearchData((ret) => {
Grid1.RecordCount = ret.Count();
var list = SortAndPage<TS_BARCODE>(ret, Grid1);
Grid1.DataSource = list;
Grid1.DataBind();
});
}
//查询
protected void btnSearch_OnClick(object sender, EventArgs e)
{
LoadData();
}
public void SearchData(Action<IQueryable<TS_BARCODE>> p_action)
{
string billnum = GetQueryValue("BillNum");
var _barCode = new TS_BARCODE();
_barCode.BillNum = billnum;
SCP_TS_BARCODE_CONTROLLER.Get_TS_BARCODE_List(_barCode, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
p_action(ret.Result);
}
});
}
//导出
protected void Button3_OnClick(object sender, EventArgs e)
{
SearchData((ret)=> {
var list = SortAndPage<TS_BARCODE>(ret, Grid1).ToList();
// 2.设置单元格抬头
// key:实体对象属性名称,可通过反射获取值
// value:Excel列的名称
Dictionary<string, string> cellheader = new Dictionary<string, string> {
{ "BarCode", "条码" },
{ "PartCode", "零件号" },
{ "PartName", "零件名称" },
{ "Batch", "批次" },
{ "PackQty", "装箱数量" },
};
string url = EntityListToExcel2003(cellheader, list, "条码列表");
});
}
//补打条码
protected void Button2_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
}

4
SCP/default.aspx

@ -111,10 +111,10 @@
for (var i = 0; obj.options.length; i++)
{
if ('CNS' == obj.options[i].value) {
if ('QDVALEO' == obj.options[i].value) {
obj.options[i].selected = true;
_factory = document.getElementById(_factoryValue);
_factory.value = 'CNS';
_factory.value = 'QDVALEO';
}
}

321
SCP/default.aspx.designer.cs

@ -0,0 +1,321 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP {
public partial class _default {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// div1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl div1;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl Label1;
/// <summary>
/// factory 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlSelect factory;
/// <summary>
/// div_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_1;
/// <summary>
/// lb_name 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_name;
/// <summary>
/// textName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputText textName;
/// <summary>
/// div_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_3;
/// <summary>
/// lb_mobile 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_mobile;
/// <summary>
/// textMobile 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl textMobile;
/// <summary>
/// lab1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lab1;
/// <summary>
/// textUserName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputText textUserName;
/// <summary>
/// div_2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_2;
/// <summary>
/// lb_Mail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_Mail;
/// <summary>
/// textEmail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl textEmail;
/// <summary>
/// lab2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lab2;
/// <summary>
/// textPassword 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputPassword textPassword;
/// <summary>
/// div_4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_4;
/// <summary>
/// lb_PwdNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_PwdNew;
/// <summary>
/// textPassword1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputText textPassword1;
/// <summary>
/// div_5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl div_5;
/// <summary>
/// lb_PwdConf 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl lb_PwdConf;
/// <summary>
/// textConfim 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputText textConfim;
/// <summary>
/// btn_pass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputButton btn_pass;
/// <summary>
/// btn_Login 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Button btn_Login;
/// <summary>
/// btn_MailLogin 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Button btn_MailLogin;
/// <summary>
/// btn_back 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputButton btn_back;
/// <summary>
/// factoryValue 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputText factoryValue;
/// <summary>
/// p_content 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl p_content;
/// <summary>
/// p_title4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl p_title4;
/// <summary>
/// p_title1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlAnchor p_title1;
/// <summary>
/// p_title2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlAnchor p_title2;
/// <summary>
/// p_title3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlAnchor p_title3;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.PageManager PageManager1;
}
}
Loading…
Cancel
Save