Browse Source

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

master
学 赵 4 years ago
parent
commit
815a1385c1
  1. 94
      Controller/SCP_ASK_CONTROLLER.cs
  2. 295
      Controller/SCP_ASN_CONTROLLER.cs
  3. 202
      Controller/SCP_BARCODE_CONTROLLER.cs
  4. 67
      Controller/SCP_BILLCODE_CONTROLLER.cs
  5. 917
      Controller/SCP_DC_UNI_CONTROLLER.cs
  6. 20
      Controller/SCP_INVOICE_CONTROLLER.cs
  7. 6
      Controller/SCP_PLAN_CONTROLLER.cs
  8. 618
      Controller/SCP_PO_CONTROLLER.cs
  9. 5
      Controller/SCP_RECEIVE_CONTROLLER.cs
  10. 8
      Controller/SCP_TA_LANGUAGE_CONTROLLER.cs
  11. 9
      Controller/SCP_TB_VENDER_CONTROLLER.cs
  12. 9
      Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs
  13. 8
      Controller/SCP_WMS_CONTROLLER.cs
  14. 2
      Models/AppBoxEntity/User.cs
  15. 1
      Models/CK.SCP.Models.csproj
  16. 5
      Models/ScpCache.cs
  17. 1
      Models/ScpEntities.cs
  18. 18
      Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs
  19. 1
      Models/ScpEntity/TB_ASN_DETAIL.cs
  20. 2
      Models/ScpEntity/TB_INVOICE.cs
  21. 5
      Models/ScpEntity/TB_INVOICE_DETAIL.cs
  22. 9
      Models/ScpEntity/TB_PALLETS.cs
  23. 33
      Models/ScpEntity/TB_PALLETS_RULL.cs
  24. 4
      Models/ScpEntity/TB_PRICE.cs
  25. 2
      Models/ScpEntity/V_ASN_PRINT.cs
  26. 6
      Models/ScpEntity/V_TA_VEND_PART.cs
  27. 1
      Models/ScpEntity/V_TB_RECEIVE_LIST.cs
  28. 4
      Models/UniApiEntity/xxwms_rc_det.cs
  29. 2
      SCP/Admin/UNIAPI.aspx
  30. 27
      SCP/Admin/UNIAPI.aspx.designer.cs
  31. 22
      SCP/Admin/default.aspx
  32. 2
      SCP/Admin/default.aspx.cs
  33. 22
      SCP/Business/PageBase.cs
  34. 35
      SCP/Common/MailHelper.cs
  35. 15
      SCP/Default.aspx.designer.cs
  36. 4
      SCP/Properties/AssemblyInfo.cs
  37. 83
      SCP/SCP.csproj
  38. 15
      SCP/VersionUpdateInfo.txt
  39. 2
      SCP/Views/BasicData/Part.aspx
  40. 40
      SCP/Views/BasicData/SCP_INFO_EDIT.aspx.cs
  41. 112
      SCP/Views/BasicData/SCP_LANGUAGE.aspx
  42. 209
      SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs
  43. 78
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx
  44. 124
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs
  45. 152
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs
  46. 43
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx
  47. 130
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs
  48. 134
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs
  49. 6
      SCP/Views/BasicData/SCP_TA_VEND_PART.aspx
  50. 5
      SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs
  51. 28
      SCP/Views/PlanData/SCP_ASK.aspx
  52. 4
      SCP/Views/PlanData/SCP_ASK.aspx.cs
  53. 36
      SCP/Views/PlanData/SCP_ASK.aspx.designer.cs
  54. 15
      SCP/Views/PlanData/SCP_ASK_DETAIL.aspx
  55. 1
      SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs
  56. 27
      SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.designer.cs
  57. 57
      SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx
  58. 34
      SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs
  59. 29
      SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs
  60. 163
      SCP/Views/PlanData/SCP_INVOICE.aspx
  61. 206
      SCP/Views/PlanData/SCP_INVOICE.aspx.cs
  62. 314
      SCP/Views/PlanData/SCP_INVOICE.aspx.designer.cs
  63. 153
      SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx
  64. 528
      SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.cs
  65. 359
      SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.designer.cs
  66. 6
      SCP/Views/PlanData/SCP_PO.aspx
  67. 59
      SCP/Views/PlanData/SCP_PO.aspx.cs
  68. 18
      SCP/Views/PlanData/SCP_PO.aspx.designer.cs
  69. 6
      SCP/Views/PlanData/SCP_PO_ASK.aspx
  70. 10
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx
  71. 27
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs
  72. 4
      SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs
  73. 66
      SCP/Views/PlanData/SCP_PO_EXTEND.aspx
  74. 85
      SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs
  75. 64
      SCP/Views/PlanData/SCP_PO_EXTEND.aspx.designer.cs
  76. 5
      SCP/Views/PlanData/SCP_PO_PLAN.aspx
  77. 1
      SCP/Views/PlanData/SCP_PO_PLAN.aspx.cs
  78. 15
      SCP/Views/PlanData/SCP_PO_PLAN.aspx.designer.cs
  79. 2
      SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx
  80. 246
      SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx
  81. 529
      SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.cs
  82. 404
      SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.designer.cs
  83. 88
      SCP/Views/Quality/SCP_QUALITY_CREATE.aspx
  84. 109
      SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs
  85. 107
      SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs
  86. 107
      SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx
  87. 143
      SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs
  88. 251
      SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs
  89. 59
      SCP/Views/Quality/SCP_SQE.aspx
  90. 96
      SCP/Views/Quality/SCP_SQE.aspx.cs
  91. 98
      SCP/Views/Quality/SCP_SQE.aspx.designer.cs
  92. 1
      SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs
  93. 127
      SCP/Views/SupplierData/SCP_ARRIVE.aspx
  94. 255
      SCP/Views/SupplierData/SCP_ARRIVE.aspx.cs
  95. 94
      SCP/Views/SupplierData/SCP_ARRIVE.aspx.designer.cs
  96. 115
      SCP/Views/SupplierData/SCP_ARRIVE_DETAIL.aspx
  97. 132
      SCP/Views/SupplierData/SCP_ARRIVE_DETAIL.aspx.cs
  98. 206
      SCP/Views/SupplierData/SCP_ARRIVE_DETAIL.aspx.designer.cs
  99. 4
      SCP/Views/SupplierData/SCP_ASK_DETAIL.aspx
  100. 19
      SCP/Views/SupplierData/SCP_ASN_CREATE.aspx

94
Controller/SCP_ASK_CONTROLLER.cs

@ -375,17 +375,25 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1));
}
if (p_entity.BeginTime != null)
if (p_entity.BeginTimeStart != null)
{
q = q.Where(p => p.BeginTime >= p_entity.BeginTime);
q = q.Where(p => p.BeginTime >= p_entity.BeginTimeStart);
}
if (p_entity.BeginTimeEnd != null)
{
q = q.Where(p => p.BeginTime <= p_entity.BeginTimeEnd);
}
if (p_entity.EndTime != null)
if (p_entity.EndTimeStart != null)
{
q = q.Where(p => p.EndTime >= p_entity.EndTimeStart);
}
if (p_entity.EndTimeEnd != null)
{
q = q.Where(p => p.EndTime < p_entity.EndTime);
q = q.Where(p => p.EndTime <= p_entity.EndTimeEnd);
}
if (p_entity.VendId != null)
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0)
{
@ -912,6 +920,81 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static ResultObject<bool> Update_TB_ASK(TB_ASK p_entitys)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var ret= db.TB_ASK.Where(p => p.AskBillNum == p_entitys.AskBillNum).FirstOrDefault();
ret.Extend1 = p_entitys.Extend1;
db.TB_ASK.AddOrUpdate(ret);
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_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", 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_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", 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_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", 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_ASK_CONTROLLER), "Save_TB_ASK_DETAIL", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
/// <summary>
///
/// </summary>
@ -1140,6 +1223,7 @@ namespace CK.SCP.Controller
_t.CreateTime = DateTime.Now;
_t.CreateUser = p_buyer;
_t.Site = p_ask.Site;
_t.SubSite = p_ask.SubSite;
_t.Remark = p_ask.Remark;
_t.State = (int)AsnState.New;
_t.Remark = p_ask.Remark;
@ -1183,6 +1267,8 @@ namespace CK.SCP.Controller
_tDetail.UpdateInfo = itm.UpdateInfo;
_tDetail.ReceivedPort = itm.ReceivedPort;
_tDetail.GUID = Guid.NewGuid();
_tDetail.SubSite = itm.SubSite;
_tDetail.Site = itm.Site;
db.TB_ASN_DETAIL.Add(_tDetail);
var _order_detail = db.TB_ASK_DETAIL.Where(p => p.UID == itm.UID).FirstOrDefault();
_order_detail.ShippedQty = (decimal)itm.ShippedQty;

295
Controller/SCP_ASN_CONTROLLER.cs

@ -863,6 +863,7 @@ namespace CK.SCP.Controller
_detail.LineNO = p.PoLine.ToString();
_detail.Memo = p.Remark;
_detail.Batch = p.Batch;
_detail.VendBatch = p.VendBatch;
_detail.DockCode = p.DockCode;
_detail.ProjectId = _lst.Where(itm => itm.PartCode == p.PartCode).FirstOrDefault().ProjectId;
_lsDetail.Add(_detail);
@ -1665,7 +1666,6 @@ namespace CK.SCP.Controller
string _oldpartcode = ""; //上一个托盘所装零件编号
decimal _oldbox = 0; //上一个托盘箱数计数
string _oldpalletnum = "";//上一个托盘码
List<string> _listm = new List<string>();
p_list.ForEach(p =>
{
var _askDetail = db.TA_VEND_PART.Where
@ -1676,7 +1676,7 @@ namespace CK.SCP.Controller
{
var _palletPack = _askDetail.PalletPackQty;
#region 补充未满托盘
if (p.PartCode== _oldpartcode)
if (p.PartCode == _oldpartcode)
{
decimal _box1 = 0;
int _TempQty1 = Convert.ToInt32(p.Qty);
@ -1697,7 +1697,7 @@ namespace CK.SCP.Controller
_box1++;
}
}
if(_box1< _oldbox)
if (_box1 < _oldbox)
{
TB_PALLETS pallet = new TB_PALLETS();
pallet.AsnBillNum = p.AsnBillNum;
@ -1707,6 +1707,11 @@ namespace CK.SCP.Controller
pallet.Box = Convert.ToInt32(_box1);
pallet.Qty = p.Qty;
pallet.PalletNum = _oldpalletnum;
pallet.BarCode = _oldpalletnum;
pallet.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
db.TB_PALLETS.Add(pallet);
p.Qty = 0;
}
@ -1718,10 +1723,15 @@ namespace CK.SCP.Controller
pallet.Batch = p.Batch;
pallet.VendId = p.VendId;
pallet.Box = Convert.ToInt32(_oldbox);
pallet.Qty = _oldbox* _PackQty1;
pallet.Qty = _oldbox * _PackQty1;
pallet.PalletNum = _oldpalletnum;
pallet.BarCode = _oldpalletnum;
pallet.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
db.TB_PALLETS.Add(pallet);
p.Qty = p.Qty- _oldbox * _PackQty1;
p.Qty = p.Qty - _oldbox * _PackQty1;
}
}
#endregion
@ -1757,6 +1767,12 @@ namespace CK.SCP.Controller
pallet.Box = Convert.ToInt32(_box);
pallet.Qty = p.Qty;
pallet.PalletNum = SCP_BILLCODE_CONTROLLER.MakePalletCode_QD(codenum);
pallet.BarCode = pallet.PalletNum;
pallet.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
db.TB_PALLETS.Add(pallet);
_oldpartcode = p.PartCode;
_oldbox = Convert.ToInt32(_palletPack) - _box;
@ -1771,7 +1787,7 @@ namespace CK.SCP.Controller
{
_pallet++;
}
for (int i = 1; i <= _pallet;i++)
for (int i = 1; i <= _pallet; i++)
{
TB_PALLETS pallet = new TB_PALLETS();
pallet.AsnBillNum = p.AsnBillNum;
@ -1779,6 +1795,11 @@ namespace CK.SCP.Controller
pallet.Batch = p.Batch;
pallet.VendId = p.VendId;
pallet.PalletNum = SCP_BILLCODE_CONTROLLER.MakePalletCode_QD(codenum);
pallet.BarCode = pallet.PalletNum;
pallet.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
if (i == _pallet)
{
pallet.Box = Convert.ToInt32(_box - Convert.ToDecimal(_palletPack) * (_pallet - 1));
@ -1802,6 +1823,8 @@ namespace CK.SCP.Controller
_list.Add(_str);
}
});
if (_list.Count == 0)
{
int state = db.SaveChanges();
if (state != -1)
{
@ -1812,7 +1835,15 @@ namespace CK.SCP.Controller
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.MessageList = _listm;
_ret.MessageList = _list;
}
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.MessageList = _list;
}
}
}
@ -1866,6 +1897,256 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static ResultObject<bool> Save_TB_PALLET_JZJH(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>();
string _oldpartcode = ""; //上一个托盘所装零件编号
decimal _oldbox = 0; //上一个托盘箱数计数
string _oldpalletnum = "";//上一个托盘码
string _oldpalletfullnum = "";//上一个托盘码
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;
pallet.BarCode = _oldpalletnum;
pallet.FullBarCode = _oldpalletfullnum;
pallet.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate =Convert.ToDateTime( p.ProduceDate);
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;
pallet.BarCode = _oldpalletnum;
pallet.FullBarCode = _oldpalletfullnum;
pallet.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
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.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
var ret = SCP_BARCODE_CONTROLLER.CreatePallets(pallet);
if (ret.State == ReturnStatus.Succeed)
{
pallet.BarCode = pallet.PalletNum;
db.TB_PALLETS.Add(pallet);
_oldpartcode = p.PartCode;
_oldbox = Convert.ToInt32(_palletPack) - _box;
_oldpalletnum = pallet.PalletNum;
_oldpalletfullnum= pallet.FullBarCode;
}
}
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.VendBatch = p.VendBatch;
pallet.PoBillLine = p.PoLine;
pallet.PoBillNum = p.PoBillNum;
pallet.ProduceDate = Convert.ToDateTime(p.ProduceDate);
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;
}
var ret = SCP_BARCODE_CONTROLLER.CreatePallets(pallet);
if (ret.State == ReturnStatus.Succeed)
{
pallet.BarCode = pallet.PalletNum;
db.TB_PALLETS.Add(pallet);
}
}
}
}
#endregion
}
else
{
string _str = string.Format("零件号:{0},供应商编号:{1},没有维护托盘标包数!请先维护供应商零件信息", p.PartCode, p.VendBatch);
_list.Add(_str);
}
});
int state = db.SaveChanges();
if (_list.Count == 0)
{
if (state != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.MessageList = _list;
}
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.MessageList = _list;
}
}
}
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_JZJH", 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_JZJH", 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_JZJH", 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>();

202
Controller/SCP_BARCODE_CONTROLLER.cs

@ -594,6 +594,83 @@ namespace CK.SCP.Controller
}
return _ret;
}
public static ResultObject<TB_PALLETS> CreatePallets(TB_PALLETS p_entity, int cnt = 1)
{
ResultObject<TB_PALLETS> _ret = new ResultObject<TB_PALLETS>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var ret = GetPalletsRule(p_entity.PartCode, p_entity.Batch, cnt);
if (ret.State == ReturnStatus.Succeed)
{
var barcodeRule = ret.Result;
for (int i = cnt; i > 0; i--)
{
var createTime = ScpCache.GetServerTime();
var code = GetLastPalletsBarCode(p_entity.PartCode, p_entity.Batch, barcodeRule.LastNumber - i + 1);
p_entity.PalletNum = code;
}
var fullCode = GetFullCode_Pallets(p_entity);
p_entity.FullBarCode = fullCode;
_ret.State = ReturnStatus.Succeed;
_ret.Result = p_entity;
}
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)
{
@ -751,6 +828,20 @@ namespace CK.SCP.Controller
}
return fullcode;
}
public static string GetFullCode_Pallets(TB_PALLETS barcode)
{
var fullcode = string.Empty;
switch (ScpCache.Config.)
{
case "1":
fullcode =
GetFullCode(barcode.PalletNum, barcode.Qty, barcode.VendId, barcode.VendBatch, barcode.PoBillNum,
barcode.PoBillLine, barcode.ProduceDate, barcode.AsnBillNum);
break;
}
return fullcode;
}
public static string GetFullCode(TS_BARCODE barcode)
{
var fullcode = string.Empty;
@ -997,6 +1088,101 @@ namespace CK.SCP.Controller
}
return _ret;
}
private static ResultObject<TB_PALLETS_RULL> GetPalletsRule(string partcode, string batch, int cnt = 1)
{
ResultObject<TB_PALLETS_RULL> _ret = new ResultObject<TB_PALLETS_RULL>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var ruleBatch = batch.Substring(0, 4);
var barcodeRule = db.TB_PALLETS_RULL.Find(partcode, ruleBatch);
if (barcodeRule == null)
{
barcodeRule = new TB_PALLETS_RULL
{
PartCode = partcode,
RuleBatch = ruleBatch,
LastNumber = cnt,
State = 0
};
}
else
{
barcodeRule.LastNumber += cnt;
}
barcodeRule.LastBarCode = GetLastPalletsBarCode(partcode, batch, barcodeRule.LastNumber);
barcodeRule.LastTime = ScpCache.GetServerTime();
db.TB_PALLETS_RULL.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), "GetPalletsRule", 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), "GetPalletsRule", 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), "GetPalletsRule", 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), "GetPalletsRule", e.Message);
throw e;
}
return _ret;
}
private static string GetLastBarCode(string partcode, string batch, int lastnum)
{
@ -1014,7 +1200,23 @@ namespace CK.SCP.Controller
barcode += lastnum.ToString(ScpCache.Config.ÌõÂëÐòÁкŸñʽ);
return barcode;
}
private static string GetLastPalletsBarCode(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;
}
private static string GetLastSmallBarCode(string partcode, string batch, int lastnum)
{

67
Controller/SCP_BILLCODE_CONTROLLER.cs

@ -54,6 +54,19 @@ namespace CK.SCP.Controller
return GetTablePK_QD("G", "TB_PALLETS", "PalletNum", "yyMMdd", 4,num);
}
/// <summary>
/// 生成订单编号
/// </summary>
/// <param name="num"></param>
/// <returns></returns>
public static string MakePoNum(int num = 1)
{
return GetTablePO("P", "TB_PO", "PoBillNum", 7, num);
}
public static string MakeASKCodeByNum(int num)
{
return GetTablePKByNum("K", "TB_ASK", "AskBillNum", "yyMMdd", 4, num);
}
public static string MakeASKCode()
{
@ -107,6 +120,60 @@ namespace CK.SCP.Controller
return GetTablePK(p_Header, p_TableName, p_ColumnName, "yyMMdd",4);
}
public static string GetTablePO(string Ext, string TableName, string ColName, int len, int num)
{
var _result = string.Empty;
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
string sql = "select max(right(" + ColName + "," + len.ToString() + ")+" + num + ") from " + TableName + " where " + ColName + " like '%P[0-9]%' ";
DbRawSqlQuery<int?> result = db.Database.SqlQuery<int?>(sql);
var obj = result.FirstOrDefault();
if (obj == null)
{
_result = Ext + num.ToString().PadLeft(len, '0');
}
else
{
_result = Ext + result.FirstOrDefault().ToString().PadLeft(len, '0');
}
}
}
catch (Exception e)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message);
}
return _result;
}
public static string GetTablePKByNum(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() + ")+" + num + ") 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().ToString().PadLeft(len, '0');
}
}
}
catch (Exception e)
{
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_BILLCODE_CONTROLLER), "GetTablePK", e.Message);
}
return _result;
}
public static string GetTablePK(string Ext, string TableName, string ColName, string Format, int len)
{
var _result = string.Empty;

917
Controller/SCP_DC_UNI_CONTROLLER.cs

File diff suppressed because it is too large

20
Controller/SCP_INVOICE_CONTROLLER.cs

@ -212,7 +212,7 @@ namespace CK.SCP.Controller
}
if (!string.IsNullOrEmpty(p_entity.InvcBillNum))
{
q = q.Where(p => p.InvcBillNum.Contains(p_entity.InvcBillNum));
q = q.Where(p => p.InvcBillNum==p_entity.InvcBillNum);
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
@ -497,11 +497,11 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.VendName.Contains(p_entity.VendName));
}
if (p_entity.BeginTime != null && !p_entity.BeginTime.ToString().Contains("0001/1/1"))
if (p_entity.BeginTime != null && !p_entity.BeginTime.ToString("yyyy-M-d").Contains("0001-1-1"))
{
q = q.Where(p => p.CreateTime >= p_entity.BeginTime);
}
if (p_entity.EndTime != null && !p_entity.EndTime.ToString().Contains("0001/1/1"))
if (p_entity.EndTime != null && !p_entity.EndTime.ToString("yyyy-M-d").Contains("0001-1-1"))
{
q = q.Where(p => p.CreateTime <= p_entity.EndTime);
}
@ -628,7 +628,7 @@ namespace CK.SCP.Controller
}
if (!string.IsNullOrEmpty(p_entity.InvcBillNum))
{
q = q.Where(p => p.InvcBillNum.Contains(p_entity.InvcBillNum));
q = q.Where(p => p.InvcBillNum==(p_entity.InvcBillNum));
}
if (!string.IsNullOrEmpty(p_entity.PoBillNum))
{
@ -714,7 +714,7 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.CreateUser.Contains(p_entity.CreateUser));
}
q = q.Where(p => p.IsRed == p_entity.IsRed);
// q = q.Where(p => p.IsRed == p_entity.IsRed);
_ret.State = ReturnStatus.Succeed;
_ret.Result = q;
@ -956,6 +956,7 @@ namespace CK.SCP.Controller
invoice.CreateUser = p_entity.CreateUser;
invoice.CreateTime = DateTime.Now;
invoice.Site = p_entity.Site;
invoice.SubSite = p_entity.SubSite;
invoice.State = (int)InvoiceState.New;
invoice.IsDeleted = false;
invoice.GUID = Guid.NewGuid();
@ -976,6 +977,8 @@ namespace CK.SCP.Controller
p_list.ForEach(p => {
TB_INVOICE_DETAIL invocieDetail = new TB_INVOICE_DETAIL();
invocieDetail.Site = invoice.Site;
invocieDetail.SubSite = invoice.SubSite;
invocieDetail.InvcBillNum= invoice.InvcBillNum;
invocieDetail.AsnBillNum = p.AsnBillNum;
invocieDetail.PoBillNum = p.PoBillNum;
@ -1097,6 +1100,7 @@ namespace CK.SCP.Controller
{
ResultObject<bool> _ret = new ResultObject<bool>();
List<string> _list = new List<string>();
List<string> _listpartcode = new List<string>();//超过分摊零件集合
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
@ -1151,9 +1155,13 @@ namespace CK.SCP.Controller
var _num = _moldsharing.Count + p.Qty;
if (_moldsharing.Qty < _num)
{
string _str ="供应商"+ _moldsharing .VendId+ "零件名称"+ _moldsharing.PartCode+"超过分摊数量"+ (_num- _moldsharing.Qty).ToString();
string _str = "供应商" + _moldsharing.VendId + "零件名称" + _moldsharing.PartCode + "超过分摊数量,分摊数量剩余" + (_moldsharing.Qty - _moldsharing.Count).ToString();
if (!_listpartcode.Contains(_moldsharing.PartCode))
{
_listpartcode.Add(_moldsharing.PartCode);
_list.Add(_str);
}
}
else
{
_moldsharing.Count = _num;

6
Controller/SCP_PLAN_CONTROLLER.cs

@ -922,6 +922,10 @@ namespace CK.SCP.Controller
{
_ret.MessageList.Add("版本号、计划天数、零件编码、订单编号、行号、供应商编码、域、单位为必填列");
}
if (string.IsNullOrEmpty(_dayList.FirstOrDefault().ToString()))
{
_ret.MessageList.Add("计划天数不能为空!");
}
#endregion
if (_ret.MessageList.Count == 0)
{
@ -1023,6 +1027,8 @@ namespace CK.SCP.Controller
{
if (_dayList.Count > 0)
{
var _askday = int.Parse(_dayList.FirstOrDefault());
var _planDayList = _ls.Select(p => p.EndTime).Distinct();
if (_askday > _planDayList.Count())

618
Controller/SCP_PO_CONTROLLER.cs

@ -12,6 +12,7 @@ using CK.SCP.Utils;
using System.Data.Entity.Core;
using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
using System.Text.RegularExpressions;
using System.Threading;
namespace CK.SCP.Controller
{
@ -634,9 +635,622 @@ namespace CK.SCP.Controller
return ErrorList;
}
public static ResultObject<bool> Save_EXCEL_PO_MOD(List<SCP_PO_EXPORT_IMPORT_MODEL> p_order_list, string site, string p_creator, DateTime p_time, BillModType p_modtype, string subsite, string p_chineseName, string p_buyerPhone)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
List<string> lineError = new List<string>();
List<string> ErrorList = new List<string>();
var _lst = p_order_list;
string _polist = "";
int _num = 1;
var OrderList = _lst.GroupBy(p => p.).ToList();
OrderList.ForEach((p) =>
{
var list = p.ToList();
if (list.Count > 0)
{
#region 日程单
if (p_modtype == BillModType.Contract)
{
var _entity = list.FirstOrDefault();
var _po = db.TB_PO.SingleOrDefault(t => t.PoBillNum == _entity./* && t.State == state*/ && t.Site == site && t.SubSite == subsite && t.VendId == _entity..ToUpper()) ??
new TB_PO { GUID = Guid.NewGuid(), PoBillNum = _entity..ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite, VendId = _entity..ToUpper() };
_po.ErpBillNum = _entity..ToUpper();
_po.ModType = (int)p_modtype;
_po.Contacter = p_chineseName;// _entity.联系人;
_po.Buyer = p_chineseName;// _entity.联系人;
_po.BuyerPhone = p_buyerPhone;
_po.Site = site;
_po.Remark = _entity.;
_po.IsDeleted = false;
_po.CreateTime = DateTime.Parse(_entity.);
_po.CreateUser = p_creator;
_po.BeginTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now : DateTime.Parse(_entity.);
_po.EndTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.);
db.TB_PO.AddOrUpdate(_po);
list.ForEach((itm) =>
{
int _poline = Int32.Parse(itm.);
var _PO_Detail = db.TB_PO_DETAIL.FirstOrDefault(t => t.PartCode == itm. && t.PoLine == _poline && t.PoBillNum == itm. /*&& t.State == state*/ && t.Site == site && t.SubSite == subsite) ??
new TB_PO_DETAIL { GUID = Guid.NewGuid(), PartCode = itm..ToUpper(), PoLine = _poline, PoBillNum = itm..ToUpper(), State = (int)PoState.Open, Site = site, SubSite = subsite };
_PO_Detail.Currency = "CNY";
_PO_Detail.PoUnit = itm.;
_PO_Detail.CreateTime = DateTime.Parse(itm.);
_PO_Detail.CreateUser = p_creator;
_PO_Detail.BeginTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now : DateTime.Parse(_entity.);
_PO_Detail.EndTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.);
_PO_Detail.PlanQty = decimal.Parse(itm.);
_PO_Detail.IsDeleted = false;
_PO_Detail.LocUnit = itm.;
_PO_Detail.PoUnit = itm.;
_PO_Detail.UnConv = 1;
_PO_Detail.Price = string.IsNullOrEmpty(itm.) ? 0 : decimal.Parse(itm.);
db.TB_PO_DETAIL.AddOrUpdate(_PO_Detail);
});
_polist = _polist + _po.PoBillNum + ",";
}
#endregion
#region 离散单
if (p_modtype == BillModType.Non_Contract)
{
var _entity = list.FirstOrDefault();
TB_PO _po = new TB_PO();
_po.GUID = Guid.NewGuid();
_po.PoBillNum = SCP_BILLCODE_CONTROLLER.MakePoNum(_num);
_po.State = (int)PoState.Open;
_po.Site = site;
_po.SubSite = subsite;
_po.VendId = _entity..ToUpper();
_po.ErpBillNum = _po.PoBillNum;
_po.ModType = (int)p_modtype;
_po.Contacter = p_chineseName;// _entity.联系人;
_po.Buyer = p_chineseName;// _entity.联系人;
_po.BuyerPhone = p_buyerPhone;
_po.Site = site;
_po.Remark = _entity.;
_po.IsDeleted = false;
_po.CreateTime = DateTime.Parse(_entity.);
_po.CreateUser = p_creator;
_po.BeginTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now : DateTime.Parse(_entity.);
_po.EndTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.);
db.TB_PO.AddOrUpdate(_po);
TB_ASK _ask = new TB_ASK();
_ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCodeByNum(_num);
_ask.GUID = Guid.NewGuid();
_ask.PoBillNum = _po.PoBillNum;
_ask.VendId = _entity..ToUpper();
_ask.IsDeleted = false;
_ask.CreateTime = DateTime.Now;
_ask.CreateUser = p_creator;
_ask.Site = site;
_ask.ReceivedPort = "";//交货口
_ask.State = (int)AskState.New;
_ask.Remark = _entity.;
_ask.ModType = (int)p_modtype;
_ask.ErpBillNum = _po.PoBillNum;
_ask.BeginTime = p_time;
_ask.EndTime = DateTime.Parse(_entity.);
_ask.Buyer = p_chineseName;
_ask.BuyerPhone = p_buyerPhone;
_ask.SubSite = subsite;
db.TB_ASK.Add(_ask);
int _number = 1;
list.ForEach((itm) =>
{
TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL();
_PO_Detail.GUID = Guid.NewGuid();
_PO_Detail.PartCode = itm..Trim().ToUpper();
_PO_Detail.PoLine = _number;
_PO_Detail.PoBillNum = _po.PoBillNum;
_PO_Detail.State = (int)PoState.Open;
_PO_Detail.Site = site;
_PO_Detail.SubSite = subsite;
_PO_Detail.Currency = "CNY";
_PO_Detail.PoUnit = itm.;
_PO_Detail.CreateTime = DateTime.Parse(itm.);
_PO_Detail.CreateUser = p_creator;
_PO_Detail.BeginTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now : DateTime.Parse(_entity.);
_PO_Detail.EndTime = string.IsNullOrEmpty(_entity.) ? DateTime.Now.AddYears(30) : DateTime.Parse(_entity.);
_PO_Detail.PlanQty = decimal.Parse(itm.);
_PO_Detail.IsDeleted = false;
_PO_Detail.LocUnit = itm.;
_PO_Detail.PoUnit = itm.;
_PO_Detail.UnConv = 1;
_PO_Detail.Price = string.IsNullOrEmpty(itm.) ? 0 : decimal.Parse(itm.);
_PO_Detail.TempQty = decimal.Parse(itm.);
TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL();
_tDetail.Remark = itm.;
_tDetail.PoBillNum = _po.PoBillNum;
_tDetail.AskBillNum = _ask.AskBillNum;
_tDetail.PoLine = _number;
_tDetail.PoUnit = itm.;
_tDetail.CreateTime = DateTime.Now;
_tDetail.CreateUser = p_creator;
_tDetail.PartCode = itm..Trim().ToUpper();
_tDetail.ReceivedPort = "";
_tDetail.BeginTime = p_time;
_tDetail.EndTime = Convert.ToDateTime(itm.);
_tDetail.TempQty = 0;
_tDetail.AskQty = Decimal.Parse(itm.);
_tDetail.IsDeleted = false;
_tDetail.LocUnit = itm.;
_tDetail.UnConv = 1;
_tDetail.State = (int)PoState.Open;
_tDetail.SubSite = subsite;
_tDetail.Site = site;
_tDetail.Price = Decimal.Parse(itm.);
_tDetail.GUID = Guid.NewGuid();
_tDetail.Currency = itm.;
db.TB_ASK_DETAIL.Add(_tDetail);
db.TB_PO_DETAIL.AddOrUpdate(_PO_Detail);
_number++;
});
_polist = _polist + _po.PoBillNum + "</br>";
}
#endregion
}
else
{
_ret.MessageList.Add("订单导入有误!");
return;
}
_num++;
Thread.Sleep(10);
}
);
if (_ret.MessageList.Count == 0)
{
int state = db.SaveChanges();
if (state != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
_ret.Message = _polist;
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
}
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
{
var sb = new StringBuilder();
foreach (var error in dbEx.EntityValidationErrors.ToList())
{
error.ValidationErrors.ToList().ForEach(i =>
{
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage);
});
}
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(dbEx);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString());
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
}
catch (OptimisticConcurrencyException ex)//并发冲突异常
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString());
throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
}
catch (ScpException ex)
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString());
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{
var inner = (UpdateException)ex.InnerException;
throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
}
else
{
if (ex.InnerException != null) throw ex.InnerException;
}
}
catch (Exception e)
{
_ret.State = ReturnStatus.Failed;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
public static ResultObject<bool> Check_EXCEL_PO_MOD(List<SCP_PO_EXPORT_IMPORT_MODEL> p_order_list, BillModType p_modtype, string site, string subsite)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
int number = 1;
List<string> lineError = new List<string>();
List<string> ErrorList = new List<string>();
var _lst = p_order_list;
p_order_list.ForEach(p =>
{
var _count1 = _lst.Count(itm => itm. == p. && itm. == p.);
var _count2 = _lst.Count(itm => itm. == p. && itm. == p.);
if (_count1 > 1 && p_modtype == BillModType.Contract)
{
lineError.Add(string.Format("导入订单编号【{0}】行号【{1}】有重复", p., p.));
ErrorList = lineError;
}
if (_count2 > 1)
{
lineError.Add(string.Format("导入订单编号【{0}】零件编码【{1}】有重复", p., p.));
ErrorList = lineError;
}
});
p_order_list.ForEach
(p =>
{
var _ls = CheckExcelMode_Po(db, p, p_modtype, site, subsite);
if (_ls.Count > 0)
{
lineError.Add(number.ToString());
ErrorList.Add(string.Join("<br>", _ls.ToArray()));
}
number++;
});
if (lineError.Count > 0)
{
_ret.State = ReturnStatus.Failed;
_ret.MessageList.AddRange(ErrorList);
_ret.Result = false;
}
else
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = 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);
});
}
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(dbEx);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString());
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
}
catch (OptimisticConcurrencyException ex)//并发冲突异常
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString());
throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
}
catch (ScpException ex)
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString());
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException))
{
var inner = (UpdateException)ex.InnerException;
throw new ScpException(ResultCode.Exception, "0000", ex.ToString());
}
else
{
if (ex.InnerException != null) throw ex.InnerException;
}
}
catch (Exception e)
{
_ret.State = ReturnStatus.Failed;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
/// <summary>
/// 订单导入检查
/// </summary>
/// <param name="db"></param>
/// <param name="p_excel"></param>
/// <returns></returns>
private static List<string> CheckExcelMode_Po(ScpEntities db, SCP_PO_EXPORT_IMPORT_MODEL p_excel, BillModType p_modtype, string site = null, string subsite = null)
{
List<string> ErrorList = new List<string>();
decimal _result = 0;
if (!decimal.TryParse(p_excel., out _result))
{
ErrorList.Add(string.Format("订单编号【{0}】零件编号【{1}】数量填写有问题", p_excel., p_excel.));
}
var _checkpart = db.TA_PART.FirstOrDefault(p => p.PartCode == p_excel.);
if (_checkpart != null)
{
if (_checkpart.State.ToUpper() != "SP")
{
p_excel. = _checkpart.Unit;
}
else
{
ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表零件停用,无法导入!", p_excel., p_excel.));
}
}
else
{
ErrorList.Add(string.Format("订单编号为【{0}】的零件编号【{1}】零件表里无数据,无法导入!", p_excel., p_excel.));
}
DateTime _d = DateTime.Now;
#region 日程单验证
if (p_modtype == BillModType.Contract)
{
if (string.IsNullOrEmpty(p_excel.) || string.IsNullOrEmpty(p_excel.) || string.IsNullOrEmpty(p_excel.) ||
string.IsNullOrEmpty(p_excel.) || string.IsNullOrEmpty(p_excel.) || string.IsNullOrEmpty(p_excel.))
{
ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel., p_excel.));
}
else
{
if (!string.IsNullOrEmpty(p_excel.))
{
DateTime year = DateTime.Parse(p_excel.);
if (year.Year > 2049)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的零件截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
}
}
if (!string.IsNullOrEmpty(p_excel.))
{
DateTime year = DateTime.Parse(p_excel.);
if (year.Year > 2049)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
}
}
string _ponumber = p_excel..ToUpper() + subsite.Substring(1, 1) + subsite.Substring(3, 1);
if (p_excel..ToUpper() != _ponumber.ToUpper())
{
ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】零件号【{2}】的订单编号不正确,请更换订单编号!", p_excel., p_excel., p_excel.));
}
int _polinr = Int32.Parse(p_excel.);
var _partlist = db.TB_PO_DETAIL.Where(p => p.PoBillNum == p_excel. && p.PartCode == p_excel. && p.PoLine != _polinr).ToList();
if (_partlist.Count > 0)
{
ErrorList.Add(string.Format("订单编号【{0}】零件号【{1}】已经存在(系统:行号-【{2}】),请更换零件号!", p_excel., p_excel., _partlist[0].PoLine));
}
int linecount = db.TB_PO_DETAIL.Count(p => p.PoBillNum == p_excel. && p.PoLine == _polinr && p.PartCode != p_excel.);
if (linecount > 0)
{
ErrorList.Add(string.Format("订单编号【{0}】行号【{1}】已经存在,请更换行号!", p_excel., p_excel.));
}
var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel. && p.Site == site && p.VendId == p_excel. && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList();
if (checkcount.Count == 0)
{
ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel., p_excel.));
}
else
{
p_excel. = checkcount[0].Amt.ToString();
p_excel. = checkcount[0].Unit;
p_excel. = checkcount[0].Curr;
}
if (p_excel. != "0")
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的要货数量应该为零!", p_excel., p_excel., p_excel.));
}
if (DateTime.TryParse(p_excel., out _d) && DateTime.TryParse(p_excel., out _d))
{
if (DateTime.Parse(p_excel.) < DateTime.Parse(p_excel.))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】要求到货日期不能小于订单创建时间日期!", p_excel., p_excel., p_excel.));
}
}
else
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单创建日期或要求到货日期要求为文本格式!", p_excel., p_excel., p_excel.));
}
if (!Regex.IsMatch(p_excel., "^[0-9]{1,2}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大应为2位整数!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.))
{
if (p_excel..ToUpper() == "S")
{
if (string.IsNullOrEmpty(p_excel.) || !Regex.IsMatch(p_excel., "^[0-9]{1,8}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel., p_excel., p_excel.));
}
if (string.IsNullOrEmpty(p_excel.) || !Regex.IsMatch(p_excel., "^[0-9]{1,6}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel., p_excel., p_excel.));
}
}
else
{
ErrorList.Add(string.Format("{0}订单类型必须填写为S为转包订单,不填写为正常订单", p_excel.));
}
//注释结束
}
if (!string.IsNullOrEmpty(p_excel.) && p_excel..Length > 8)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && !Regex.IsMatch(p_excel., "^[0-9]{1,4}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】固定天数最大4位整数!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && !Regex.IsMatch(p_excel., "^[0-9]{1,3}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程天数最大3位整数!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && !Regex.IsMatch(p_excel., "^[0-9]{1,3}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程周数最大3位整数!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && !Regex.IsMatch(p_excel., "^[0-9]{1,3}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】日程月数最大3位整数!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && p_excel..Length > 2)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】发货样式最大2位字符!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && p_excel..Length > 2)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】发货时间样式最大2位字符!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && !Regex.IsMatch(p_excel., "^[0-9]{1,3}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】运输周期最大3位整数!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.) && p_excel..Length > 8)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel., p_excel., p_excel.));
}
}
}
#endregion
#region 离散单验证
if (p_modtype == BillModType.Non_Contract)
{
if (/*string.IsNullOrEmpty(p_excel.订单编号) ||string.IsNullOrEmpty(p_excel.行号) ||*/ string.IsNullOrEmpty(p_excel.) ||
string.IsNullOrEmpty(p_excel.) || string.IsNullOrEmpty(p_excel.) || string.IsNullOrEmpty(p_excel.) ||
string.IsNullOrEmpty(p_excel.)/* || string.IsNullOrEmpty(p_excel.税率)*/)
{
ErrorList.Add(string.Format("分组【{1}】零件名称【{0}】有填写为空!", p_excel., p_excel.));
}
else
{
decimal a = decimal.Parse(p_excel.);
if (a <= 0)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的数量不能小于等于0", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.))
{
DateTime year = DateTime.Parse(p_excel.);
if (year.Year > 2049)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的零件截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
}
}
if (!string.IsNullOrEmpty(p_excel.))
{
DateTime year = DateTime.Parse(p_excel.);
if (year.Year > 2049)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
}
}
var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel. && p.Site == site&& p.VendId == p_excel. && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList();
if (checkcount.Count == 0)
{
ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel., p_excel.));
}
else
{
p_excel. = checkcount[0].Amt.ToString();
p_excel. = checkcount[0].Unit;
p_excel. = checkcount[0].Curr;
}
//if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$"))
//{
// ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号));
//}
if (DateTime.TryParse(p_excel., out _d) && DateTime.TryParse(p_excel., out _d))
{
if (DateTime.Parse(p_excel.) < DateTime.Parse(p_excel.))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】要求到货日期不能小于订单创建时间日期!", p_excel., p_excel., p_excel.));
}
}
else
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单创建日期或要求到货日期要求为文本格式!", p_excel., p_excel., p_excel.));
}
if (!string.IsNullOrEmpty(p_excel.))
{
if (p_excel..ToUpper() != "S" && p_excel..ToUpper() != "M")
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单类型只能为M或S!", p_excel., p_excel., p_excel.));
}
//注释结束
if (p_excel..ToUpper() == "S")
{
if (string.IsNullOrEmpty(p_excel.) || !Regex.IsMatch(p_excel., "^[0-9]{1,8}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】加工单最大8位整数!", p_excel., p_excel., p_excel.));
}
if (string.IsNullOrEmpty(p_excel.) || !Regex.IsMatch(p_excel., "^[0-9]{1,6}$"))
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】工序最大6位整数!", p_excel., p_excel., p_excel.));
}
}
}
if (!string.IsNullOrEmpty(p_excel.) && p_excel..Length > 8)
{
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】库位最大8位字符!", p_excel., p_excel., p_excel.));
}
}
}
#endregion
return ErrorList;
}
private static List<string> CheckExcelMode(ScpEntities db, SCP_PO_DETAIL_EXPORT_MODEL p_excel)
{
List<string> ErrorList = new List<string>();
@ -1772,7 +2386,7 @@ namespace CK.SCP.Controller
_PO_Detail.CreateUser = p_creator;
_PO_Detail.PartCode = itm..ToUpper();
_PO_Detail.BeginTime = p_time;
_PO_Detail.EndTime = DateTime.Parse(_entity.);
_PO_Detail.EndTime = DateTime.Parse(itm.);
_PO_Detail.PlanQty = decimal.Parse(itm.);
_PO_Detail.IsDeleted = false;
_PO_Detail.LocUnit = itm.;
@ -1781,6 +2395,7 @@ namespace CK.SCP.Controller
_PO_Detail.State = (int)PoState.Open;
_PO_Detail.Price = string.IsNullOrEmpty(itm.) ? 0 : decimal.Parse(itm.);
_PO_Detail.GUID = Guid.NewGuid();
_PO_Detail.Site = site;
db.TB_PO_DETAIL.Add(_PO_Detail);
// _number++;
});
@ -2169,6 +2784,7 @@ namespace CK.SCP.Controller
_tDetail.Price = itm.Price;
_tDetail.GUID = Guid.NewGuid();
_tDetail.Currency = itm.Currency;
_tDetail.Site = itm.Site;
_tDetail.SubSite = itm.SubSite;
_tDetail.Extend1 = itm.Extend1;
_tDetail.Extend2 = itm.Extend2;

5
Controller/SCP_RECEIVE_CONTROLLER.cs

@ -102,11 +102,12 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p_entity.UserInAddress.Contains(p.Site));
}
if (p_entity.ShipTimeStart != null && !p_entity.ShipTimeStart.ToString().Contains("0001/1/1"))
if (p_entity.ShipTimeStart != null && !p_entity.ShipTimeStart.ToString("yyyy-M-d").Contains("0001-1-1"))
{
q = q.Where(p => p.ShipTime >= p_entity.ShipTimeStart);
}
if (p_entity.ShipTimeEnd != null && !p_entity.ShipTimeEnd.ToString().Contains("0001/1/1"))
if (p_entity.ShipTimeEnd != null && !p_entity.ShipTimeEnd.ToString("yyyy-M-d").Contains("0001-1-1"))
{
q = q.Where(p => p.ShipTime <= p_entity.ShipTimeEnd);
}

8
Controller/SCP_TA_LANGUAGE_CONTROLLER.cs

@ -208,14 +208,16 @@ namespace CK.SCP.Controller
public static ResultObject<bool> Del_TA_LANGUAGE(TA_LANGUAGE p_entity)
public static ResultObject<bool> Del_TA_LANGUAGE(string _ls)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var _entity = db.TA_LANGUAGE.Where(itm => itm.GUID == p_entity.GUID).FirstOrDefault();
var _entity = db.TA_LANGUAGE.Where(p=>p.UID.ToString()==_ls).FirstOrDefault();
db.TA_LANGUAGE.Remove(_entity);
if (db.SaveChanges() != -1)
@ -294,6 +296,4 @@ namespace CK.SCP.Controller
}

9
Controller/SCP_TB_VENDER_CONTROLLER.cs

@ -53,7 +53,14 @@ namespace CK.SCP.Controller
return query.ToList();
}
}
public static List<TA_VENDER> Getlist(List<string> lsVenderID,List<string> p_list)
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
var query = db.TA_VENDER.Where(p => lsVenderID.Contains(p.VendId)&& p_list.Contains(p.Site));
return query.ToList();
}
}
public static TA_VENDER GetVender(string p_VenderID,string p_Site)
{

9
Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs

@ -71,7 +71,14 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.PartDesc.Contains(p_entity.PartDesc));
}
if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0)
{
q = q.Where(p => p_entity.UserInAddress.Contains(p.Site));
}
if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0)
{
q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId));
}
_ret.State = ReturnStatus.Succeed;
_ret.Result = q;

8
Controller/SCP_WMS_CONTROLLER.cs

@ -208,6 +208,10 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0)
{
q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId));
@ -283,6 +287,10 @@ namespace CK.SCP.Controller
{
q = q.Where(p => p.PartCode.Contains(p_entity.PartCode));
}
if (!string.IsNullOrEmpty(p_entity.VendId))
{
q = q.Where(p => p.VendId.Contains(p_entity.VendId));
}
if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0)
{
q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId));

2
Models/AppBoxEntity/User.cs

@ -98,7 +98,7 @@ namespace CK.SCP.Models.AppBoxEntity
public Dictionary<string,string> ConfigList { set; get; }
[NotMapped]
public List<string> SiteList { set; get; }
public List<string> SubSiteList { set; get; }
[NotMapped]
public string UsedDomain { set; get; }

1
Models/CK.SCP.Models.csproj

@ -345,6 +345,7 @@
<Compile Include="ScpEntity\TA_VENDER_EXTEND.cs" />
<Compile Include="ScpEntity\TB_CLAIM_APPEND.cs" />
<Compile Include="ScpEntity\TB_PALLETS.cs" />
<Compile Include="ScpEntity\TB_PALLETS_RULL.cs" />
<Compile Include="ScpEntity\TB_PLAN_CUSTOM.cs" />
<Compile Include="ScpEntity\TB_PO_PLAN_EXTEND.cs" />
<Compile Include="ScpEntity\TB_PO_PLAN.cs" />

5
Models/ScpCache.cs

@ -286,7 +286,7 @@ namespace CK.SCP.Models
public static string GetPartDesc1(string partCode,string p_site)
{
var _ta = PartList.SingleOrDefault(p => p.PartCode == partCode && p.Site==p_site);
var _ta = PartList.SingleOrDefault(p => p.PartCode == partCode && p.Site.ToUpper()==p_site.ToUpper());
if (_ta != null)
{
return _ta.PartDesc1 + _ta.PartDesc2;
@ -314,7 +314,10 @@ namespace CK.SCP.Models
public string { get; set; } = "1";
public string { get; set; } = "000000";
public string { get; set; } = "700000";
public string { get; set; } = "600000";
public bool { get; set; } = false;
public bool { get; set; } = true;
public bool { get; set; } = false;
}
}

1
Models/ScpEntities.cs

@ -96,6 +96,7 @@ namespace CK.SCP.Models
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<TB_PALLETS_RULL> TB_PALLETS_RULL { 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; }

18
Models/ScpEntity/ExcelExportEnttity/SCP_PO_DETAIL_EXPORT.cs

@ -81,6 +81,22 @@ 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/TB_ASN_DETAIL.cs

@ -56,5 +56,6 @@ namespace CK.SCP.Models.ScpEntity
public string Extend2 { get; set; }
public string Extend3 { get; set; }
public string SubSite { get; set; }
public string Site { get; set; }
}
}

2
Models/ScpEntity/TB_INVOICE.cs

@ -16,6 +16,8 @@ namespace CK.SCP.Models.ScpEntity
[StringLength(50)]
public string Site { get; set; }
[StringLength(50)]
public string SubSite { get; set; }
[StringLength(50)]
public string InvoiceNum { get; set; }
[StringLength(50)]
public string ExpressNum { get; set; }

5
Models/ScpEntity/TB_INVOICE_DETAIL.cs

@ -52,7 +52,10 @@ namespace CK.SCP.Models.ScpEntity
[StringLength(50)]
public string DiscountRemark { get; set; }
public Nullable<System.Boolean> IsRed { get; set; }
[StringLength(50)]
public string Site { get; set; }
[StringLength(50)]
public string SubSite { get; set; }
}
}

9
Models/ScpEntity/TB_PALLETS.cs

@ -16,11 +16,20 @@ namespace CK.SCP.Models.ScpEntity
[StringLength(50)]
public string AsnBillNum { get; set; }
public string PalletNum { get; set; }
public string BarCode { get; set; }
public string FullBarCode { 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; }
//--新添加
public string VendBatch { get; set; }
public string PoBillNum { get; set; }
public int PoBillLine { get; set; }
[Column(TypeName = "datetime2")]
public DateTime ProduceDate { get; set; }
}
}

33
Models/ScpEntity/TB_PALLETS_RULL.cs

@ -0,0 +1,33 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace CK.SCP.Models.ScpEntity
{
public partial class TB_PALLETS_RULL
{
[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; }
}
}

4
Models/ScpEntity/TB_PRICE.cs

@ -27,7 +27,7 @@ namespace CK.SCP.Models.ScpEntity
public string Extend1 { get; set; }
public string Extend2 { get; set; }
public string Extend3 { get; set; }
public int State { get; set; }
public decimal? VendAmt { get; set; }
//public int State { get; set; }
//public decimal? VendAmt { get; set; }
}
}

2
Models/ScpEntity/V_ASN_PRINT.cs

@ -40,7 +40,7 @@ namespace CK.SCP.Models.ScpEntity
public string Memo { get; set; }
public string DockCode { get; set; }
public string Batch { get; set; }
public string VendBatch { get; set; }
public string ProjectId { get; set; }
public string DockCode_Desc => ScpCache.PortList.Where(p => p.PORT_NO == DockCode).FirstOrDefault() == null ? "" : ScpCache.PortList.Where(p => p.PORT_NO == DockCode).FirstOrDefault().PORT_DESCRIPTION;

6
Models/ScpEntity/V_TA_VEND_PART.cs

@ -36,5 +36,11 @@ namespace CK.SCP.Models.ScpEntity
public string ProjectId { get; set; }
[NotMapped]
public string PartDesc { get; set; }
[NotMapped]
public List<string> UserInAddress { set; get; }
[NotMapped]
public List<string> UserInVendIds { set; get; }
}
}

1
Models/ScpEntity/V_TB_RECEIVE_LIST.cs

@ -31,6 +31,7 @@ namespace CK.SCP.Models.ScpEntity
public System.Guid GUID { get; set; }
public string AsnBillNum { get; set; }
public string Site { get; set; }
public string SubSite { get; set; }
public string VendId { get; set; }
public Nullable<System.DateTime> ShipTime { get; set; }
public string OperName { get; set; }

4
Models/UniApiEntity/xxwms_rc_det.cs

@ -51,11 +51,11 @@ namespace CK.SCP.Models.UniApiEntity
public string xxwms_rc_loc { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(2)]
[StringLength(8)]
public string xxwms_rc_po_um { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(2)]
[StringLength(8)]
public string xxwms_rc_loc_um { get; set; }
public decimal xxwms_rc_conv { get; set; }

2
SCP/Admin/UNIAPI.aspx

@ -40,7 +40,7 @@
</f:Form>
<f:Grid ID="Grid" EnableCollapse="true" ShowBorder="true" ShowHeader="true" runat="server">
<f:Grid ID="Grid" EnableCollapse="true" ShowBorder="true" ShowHeader="true" runat="server" BoxFlex="1" >
<Columns>

27
SCP/Admin/UNIAPI.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Admin {
namespace SCP.Admin
{
public partial class UNIAPI {
public partial class UNIAPI
{
/// <summary>
/// form1 控件。
@ -31,13 +33,13 @@ namespace SCP.Admin {
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
protected global::FineUI.Toolbar Toolbar1;
/// <summary>
/// DDL_State 控件。
@ -49,22 +51,31 @@ namespace SCP.Admin {
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// TXT_billnum 控件。
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextArea TXT_billnum;
protected global::FineUI.Button BtnSearch;
/// <summary>
/// BtnSearch 控件。
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// TXT_billnum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextArea TXT_billnum;
/// <summary>
/// Grid 控件。

22
SCP/Admin/default.aspx

@ -11,14 +11,14 @@
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" Layout="Column" ShowBorder="false" ShowHeader="false" AutoScroll="true"
<f:Panel ID="Panel1" Layout="HBox" ShowBorder="false" ShowHeader="false" AutoScroll="true"
runat="server">
<Items>
<f:Panel BodyPadding="5px" ShowBorder="false" Width="600"
ShowHeader="false" runat="server">
<f:Panel BodyPadding="5px" ShowBorder="false" Width="600" BoxFlex="1"
ShowHeader="false" runat="server" Layout="HBox">
<Items>
<f:Panel ID="Panel2" Title="系统公告" runat="server" CssStyle="margin-bottom:5px;"
BodyPadding="5px" ShowBorder="true" ShowHeader="true">
<f:Panel ID="Panel2" Title="系统公告" runat="server" CssStyle="margin-bottom:5px;" BoxFlex="1"
BodyPadding="5px" ShowBorder="true" ShowHeader="true" Layout="VBox">
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="ID" IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid2_OnRowDoubleClick" OnPageIndexChange="Grid2_PageIndexChange"
@ -40,7 +40,7 @@
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="true" EnableCollapse="true" Hidden="true" Title="每天在 1:00:00 和 23:59:59 之间、每 3 小时 执行更新。"
runat="server" DataKeyNames="VendId,VendName,Number,Year" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid3_RowDoubleClick"
AutoScroll="True" >
AutoScroll="True" BoxFlex="1" >
<Columns>
<f:BoundField runat="server" HeaderText="年份" ColumnID="" DataField="Year" Width="80px" />
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" Width="100px" />
@ -51,7 +51,7 @@
</f:Grid>
<f:Grid ID="Grid4" ShowBorder="true" ShowHeader="true" EnableCollapse="true" Hidden="true" Title="每天在 1:00:00 和 23:59:59 之间、每 3 小时 执行更新。"
runat="server" DataKeyNames="VendId,VendName,Number,Year" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid4_RowDoubleClick"
AutoScroll="True" >
AutoScroll="True" BoxFlex="1">
<Columns>
<f:BoundField runat="server" HeaderText="年份" ColumnID="" DataField="Year" Width="80px" />
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" Width="100px" />
@ -61,7 +61,7 @@
</f:Grid>
<f:Grid ID="Grid5" ShowBorder="true" ShowHeader="true" EnableCollapse="true" Hidden="true"
runat="server" DataKeyNames="VendId,VendName,Number,Year" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid5_RowDoubleClick"
AutoScroll="True" >
AutoScroll="True" BoxFlex="1">
<Columns>
<f:BoundField runat="server" HeaderText="年份" ColumnID="" DataField="Year" Width="80px" />
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" Width="100px" />
@ -82,10 +82,10 @@
</f:Panel>--%>
</Items>
</f:Panel>
<f:Panel ID="Panel5" BodyPadding="5px 5px 5px 0" ColumnWidth="100%" ShowBorder="false"
ShowHeader="false" runat="server" >
<f:Panel ID="Panel5" BodyPadding="5px 5px 5px 0" ColumnWidth="100%" ShowBorder="false" BoxFlex="1"
ShowHeader="false" runat="server" Layout="VBox" >
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" EnableCollapse="true" Title="通知"
runat="server" IsDatabasePaging="False" AllowPaging="True" DataKeyNames = "SENDING_TIME,ITEM_NO,UID" MinHeight="500"
EnableRowSelectEvent="True" AutoScroll="True" SortField="SENDING_TIME" SortDirection="ASC" AllowSorting="True" OnRowClick="Grid1_RowClick">
<Columns>

2
SCP/Admin/default.aspx.cs

@ -30,7 +30,7 @@ namespace SCP.admin
public void BindData()
{
SearchData(ret => {
if (CurrentUser.RoleList !=null && CurrentUser.RoleList.Contains("供应商"))
if (CurrentUser.RoleList !=null && CurrentUser.RoleList.Contains("供应商")&& !CurrentUser.RoleList.Contains("管理员"))
{
ret = SetV_INFO(ret);
}

22
SCP/Business/PageBase.cs

@ -145,7 +145,27 @@ namespace SCP
return queryIntValue;
}
public void BindVenderByUser(DropDownList p_dl)
{
var _entity = CurrentUser.VenderList;
var _p = CurrentUser.FactoryList;
if (_entity.Count>0)
{
var ls = SCP_TB_VENDER_CONTROLLER.Getlist(_entity,_p);
var lsVender = ls;
lsVender.ForEach(p =>
{
p.VendName = string.Format("{0}({1})", p.VendName, p.VendId);
});
p_dl.DataSource = lsVender;
p_dl.DataTextField = "VendName";
p_dl.DataValueField = "VendId";
p_dl.DataBind();
p_dl.Items.Insert(0, new FineUI.ListItem("--无供应商--", string.Empty));
}
}
protected void BindVender(DropDownList p_dl)
{
var _entity = CurrentUser.FactoryList;
@ -595,7 +615,7 @@ namespace SCP
_currentUser.RoleList = _currentUser.Roles.Select(p => p.Name).ToList();
var _userVerders = DB.VenderUsers.Where(p => p.UserId == _currentUser.ID).Select(p => p.VenderId).ToList();
_currentUser.FactoryList = _factoryList;
_currentUser.SiteList = _siteList;
_currentUser.SubSiteList = _siteList;
_currentUser.VenderList = _userVerders;
_currentUser.ConfigList = new Dictionary<string, string>();
if (_currentUser.FactoryList.Count > 0)

35
SCP/Common/MailHelper.cs

@ -101,6 +101,41 @@ namespace SCP.Common
}
}
}
public static void SendMails(string p_VendId, string p_Content, string p_title)
{
using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance())
{
StringBuilder _buffer = new StringBuilder();
_buffer.Append("SELECT b.Email ");
_buffer.Append(" FROM VenderUsers AS a INNER JOIN ");
_buffer.Append(" Users AS b ON a.UserId = b.ID INNER JOIN ");
_buffer.Append(" RoleUsers AS g ON a.UserId = g.UserID INNER JOIN ");
_buffer.Append(" Roles AS h ON g.RoleID = h.ID ");
_buffer.AppendFormat(" WHERE(h.Name = '供应商' and a.VenderId in ({0}) and b.enabled=1 ) ", p_VendId);
var _userList = db.Database.SqlQuery<string>(_buffer.ToString()).ToList();
//var _vender = ScpCache.VenderList.Where(itm => itm.VendId == p_VendId).FirstOrDefault();
if (_userList != null && _userList.Count > 0)
{
foreach (var itm in _userList)
{
string mails = "";
mails += itm + ",";
if (mails != "")
{
mails = mails.Substring(0, mails.Length - 1);
}
string mailbody = "";
mailbody += "尊敬的供应商<br>";
mailbody += "你好!<br><br>";
mailbody += "<b>" + p_Content + "</b> ,请到供应商SCP网站" + ConfigurationManager.AppSettings["ResetPassWord"] + "打开查看下载!<br>";
mailbody += "<br><br><br><br>日期:" + DateTime.Now;
MyWebSmtpMail webmail = new MyWebSmtpMail();
webmail.Send(mails, mailbody, p_title);
}
}
}
}
/// <summary>
/// 发邮件给采购
/// </summary>

15
SCP/Default.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP {
namespace SCP
{
public partial class _default {
public partial class _default
{
/// <summary>
/// form1 控件。
@ -309,6 +311,15 @@ namespace SCP {
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlAnchor p_title3;
/// <summary>
/// Versiontxt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlInputText Versiontxt;
/// <summary>
/// PageManager1 控件。
/// </summary>

4
SCP/Properties/AssemblyInfo.cs

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值,
// 方法是按如下所示使用 "*":
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.21.0204.1")]
[assembly: AssemblyFileVersion("1.21.0204.1")]

83
SCP/SCP.csproj

@ -253,6 +253,7 @@
<Content Include="Scripts\ECharts\chart\wordCloud.js" />
<Content Include="Scripts\ECharts\echarts-all.js" />
<Content Include="Scripts\ECharts\echarts.js" />
<Content Include="VersionUpdateInfo.txt" />
<Content Include="Views\BasicData\Price.aspx" />
<Content Include="Views\BasicData\SCP_INFO.aspx" />
<Content Include="Views\BasicData\SCP_INFO_EDIT.aspx" />
@ -264,7 +265,8 @@
<Content Include="Views\BasicData\PublicDataEdit.aspx" />
<Content Include="Views\BasicData\SCP_FACTORY.aspx" />
<Content Include="Views\BasicData\SCP_FACTORY_EDIT.aspx" />
<Content Include="Views\BasicData\SCP_LANGUAGE.aspx" />
<Content Include="Views\BasicData\SCP_LANGUAGE_1.aspx" />
<Content Include="Views\BasicData\SCP_LANGUAGE_DETAIL.aspx" />
<Content Include="Views\BasicData\SCP_MoldSharing.aspx" />
<Content Include="Views\BasicData\SCP_MOLDSHARING_DETAIL.aspx" />
<Content Include="Views\BasicData\SCP_RECIVE_PORT.aspx" />
@ -2933,6 +2935,8 @@
<Content Include="Views\PlanData\SCP_ASK.aspx" />
<Content Include="Views\PlanData\SCP_ASK_ADD.aspx" />
<Content Include="Views\PlanData\SCP_FORECAST.aspx" />
<Content Include="Views\PlanData\SCP_INVOICE.aspx" />
<Content Include="Views\PlanData\SCP_INVOICE_EDIT.aspx" />
<Content Include="Views\PlanData\SCP_PART_LIFE.aspx" />
<Content Include="Views\PlanData\SCP_PART_LIFE_DETAIL.aspx" />
<Content Include="Views\PlanData\SCP_INCOMPLETE_ASK.aspx" />
@ -2944,12 +2948,18 @@
<Content Include="Views\PlanData\SCP_PO_PLAN_EXTEND_EDIT.aspx" />
<Content Include="Views\PlanData\SCP_RECEIVE_EXTEND.aspx" />
<Content Include="Views\PlanData\SCP_ASK_UNCOMPLETE.aspx" />
<Content Include="Views\PlanData\SCP_RECEIVE_LIST.aspx" />
<Content Include="Views\PlanData\SCP_UNI_API.aspx" />
<Content Include="Views\Quality\SCP_QUALITY_CREATE.aspx" />
<Content Include="Views\Quality\SCP_QUALITY_MANAGER.aspx" />
<Content Include="Views\Quality\SCP_SQE.aspx" />
<Content Include="Views\Report\SCP_ARRIVE_REPORT.aspx" />
<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_ARRIVE.aspx" />
<Content Include="Views\SupplierData\SCP_ARRIVE_DETAIL.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" />
@ -5007,12 +5017,19 @@
<Compile Include="Views\BasicData\SCP_FACTORY_EDIT.aspx.designer.cs">
<DependentUpon>SCP_FACTORY_EDIT.aspx</DependentUpon>
</Compile>
<Compile Include="Views\BasicData\SCP_LANGUAGE.aspx.cs">
<DependentUpon>SCP_LANGUAGE.aspx</DependentUpon>
<Compile Include="Views\BasicData\SCP_LANGUAGE_1.aspx.cs">
<DependentUpon>SCP_LANGUAGE_1.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\BasicData\SCP_LANGUAGE.aspx.designer.cs">
<DependentUpon>SCP_LANGUAGE.aspx</DependentUpon>
<Compile Include="Views\BasicData\SCP_LANGUAGE_1.aspx.designer.cs">
<DependentUpon>SCP_LANGUAGE_1.aspx</DependentUpon>
</Compile>
<Compile Include="Views\BasicData\SCP_LANGUAGE_DETAIL.aspx.cs">
<DependentUpon>SCP_LANGUAGE_DETAIL.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\BasicData\SCP_LANGUAGE_DETAIL.aspx.designer.cs">
<DependentUpon>SCP_LANGUAGE_DETAIL.aspx</DependentUpon>
</Compile>
<Compile Include="Views\BasicData\SCP_MoldSharing.aspx.cs">
<DependentUpon>SCP_MoldSharing.aspx</DependentUpon>
@ -5193,6 +5210,20 @@
<Compile Include="Views\PlanData\SCP_FORECAST.aspx.designer.cs">
<DependentUpon>SCP_FORECAST.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_INVOICE.aspx.cs">
<DependentUpon>SCP_INVOICE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\PlanData\SCP_INVOICE.aspx.designer.cs">
<DependentUpon>SCP_INVOICE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_INVOICE_EDIT.aspx.cs">
<DependentUpon>SCP_INVOICE_EDIT.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\PlanData\SCP_INVOICE_EDIT.aspx.designer.cs">
<DependentUpon>SCP_INVOICE_EDIT.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_PART_LIFE.aspx.cs">
<DependentUpon>SCP_PART_LIFE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -5269,6 +5300,13 @@
<Compile Include="Views\PlanData\SCP_ASK_UNCOMPLETE.aspx.designer.cs">
<DependentUpon>SCP_ASK_UNCOMPLETE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_RECEIVE_LIST.aspx.cs">
<DependentUpon>SCP_RECEIVE_LIST.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\PlanData\SCP_RECEIVE_LIST.aspx.designer.cs">
<DependentUpon>SCP_RECEIVE_LIST.aspx</DependentUpon>
</Compile>
<Compile Include="Views\PlanData\SCP_UNI_API.aspx.cs">
<DependentUpon>SCP_UNI_API.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -5276,6 +5314,27 @@
<Compile Include="Views\PlanData\SCP_UNI_API.aspx.designer.cs">
<DependentUpon>SCP_UNI_API.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_CREATE.aspx.cs">
<DependentUpon>SCP_QUALITY_CREATE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_CREATE.aspx.designer.cs">
<DependentUpon>SCP_QUALITY_CREATE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_MANAGER.aspx.cs">
<DependentUpon>SCP_QUALITY_MANAGER.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_MANAGER.aspx.designer.cs">
<DependentUpon>SCP_QUALITY_MANAGER.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Quality\SCP_SQE.aspx.cs">
<DependentUpon>SCP_SQE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\Quality\SCP_SQE.aspx.designer.cs">
<DependentUpon>SCP_SQE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Report\SCP_ARRIVE_REPORT.aspx.cs">
<DependentUpon>SCP_ARRIVE_REPORT.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -5311,6 +5370,20 @@
<Compile Include="Views\SupplierData\PlanMonth.aspx.designer.cs">
<DependentUpon>PlanMonth.aspx</DependentUpon>
</Compile>
<Compile Include="Views\SupplierData\SCP_ARRIVE.aspx.cs">
<DependentUpon>SCP_ARRIVE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\SupplierData\SCP_ARRIVE.aspx.designer.cs">
<DependentUpon>SCP_ARRIVE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\SupplierData\SCP_ARRIVE_DETAIL.aspx.cs">
<DependentUpon>SCP_ARRIVE_DETAIL.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\SupplierData\SCP_ARRIVE_DETAIL.aspx.designer.cs">
<DependentUpon>SCP_ARRIVE_DETAIL.aspx</DependentUpon>
</Compile>
<Compile Include="Views\SupplierData\SCP_FORECAST.aspx.cs">
<DependentUpon>SCP_FORECAST.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

15
SCP/VersionUpdateInfo.txt

@ -0,0 +1,15 @@

////////////
Version: 1.21.0128.1
Info: TB_INVOICE 添加 SubSite
V_TB_RECEIVE_LIST 添加 SubSite
TB_INVOIC 添加 SubSite和Site
登陆界面添加版本号
////////////
////////////
Version: 1.21.0204.1
Info: TB_PRICE 去掉 State/VendAmt
添加订单导入并且自动创建要货看板传接口共呢
////////////

2
SCP/Views/BasicData/Part.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="" AutoScroll="True" Layout="VBox">
<Items>
<f:Form runat="server">
<Toolbars>

40
SCP/Views/BasicData/SCP_INFO_EDIT.aspx.cs

@ -100,7 +100,7 @@ namespace SCP.BasicData
protected void Button3_OnClick(object sender, EventArgs e)
{
Int32 id = GetQueryIntValue("id");
string mailVendIds = "";
if (id != -1)
{
User modelUsers = DB.Users.FirstOrDefault(p => p.Name == txtSupplierCode.SelectedValue);
@ -179,6 +179,7 @@ namespace SCP.BasicData
{
model.SupplierCode = GetSupplierCodes("All");
model.SupplierName = GetSupplierNames("All");
mailVendIds = GetSupplierCodes_Mail("All");
}
else
{
@ -191,6 +192,7 @@ namespace SCP.BasicData
model.SupplierCode = GetSupplierCodes("Some");
model.SupplierName = GetSupplierNames("Some");
mailVendIds = GetSupplierCodes_Mail("Some");
}
// model.FactoryCode=txt 用户登陆名字
model.Content = txtContent.Text;
@ -209,6 +211,7 @@ namespace SCP.BasicData
var ret = SCP_INFO_CONTROLLER.SaveInfo(model);
if (ret.State == ReturnStatus.Succeed)
{
SCP.Common.MailManager.SendMails(mailVendIds, "信息发布:" + model.Content, CurrentUser.FactoryList.FirstOrDefault());
Alert.ShowInParent("保存成功!");
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
@ -259,6 +262,41 @@ namespace SCP.BasicData
}
}
private string GetSupplierCodes_Mail(string type)
{
string strResult = "";
if ("All".Equals(type))
{
foreach (FineUI.ListItem vender in txtSupplierCode.Items)
{
if (string.IsNullOrEmpty(strResult))
{
strResult ="'"+ vender.Value+"'";
}
else
{
strResult = strResult + "," + "'" + vender.Value + "'";
}
}
}
else if ("Some".Equals(type))
{
foreach (FineUI.ListItem item in txtSupplierCode.SelectedItemArray)
{
if (string.IsNullOrEmpty(strResult))
{
strResult = "'" + item.Value + "'";
}
else
{
strResult = strResult + "," + "'" + item.Value + "'";
}
}
}
return strResult;
}
private string GetSupplierCodes(string type)
{

112
SCP/Views/BasicData/SCP_LANGUAGE.aspx

@ -1,112 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE.aspx.cs" Inherits="SCP.BasicData.SCP_LANGUAGE" %>
<!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" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="0px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelTopRegion" RegionPosition="Top" RegionSplit="true" EnableCollapse="true"
Title="顶部面板" ShowBorder="true" ShowHeader="false" BodyPadding="0" >
<Items>
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Btn_Add" runat="server" EnablePostBack="True" Text="新建" Icon="Add" OnClick="Btn_Add_Click">
</f:Button>
<f:Button ID="Btn_Save" runat="server" EnablePostBack="True" Text="保存" Icon="SystemSave" OnClick="Btn_Save_Click">
</f:Button>
<f:Button ID="Btn_Delete" runat="server" Text="删除" Icon="Delete" OnClick="Btn_Delete_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
Title="左侧面板(有提示信息)" ShowBorder="true" ShowHeader="false" Width="300px"
BodyPadding="10px" >
<Items>
<f:TextBox runat = "server" Label = "键值" EmptyText = "" ID = "TXT_GUID" />
<f:TextBox runat = "server" Label = "中文" EmptyText = "" ID = "TXT_CH" />
<f:TextBox runat = "server" Label = "英文" EmptyText = "" ID = "TXT_EN" />
<f:TextBox runat = "server" Label = "俄文" EmptyText = "" ID = "TXT_RU" />
<f:TextBox runat = "server" Label = "德文" EmptyText = "" ID = "TXT_DE" />
<f:TextBox runat = "server" Label = "法文" EmptyText = "" ID = "TXT_FR" />
<f:TextBox runat = "server" Label = "阿拉伯" EmptyText = "" ID = "TXT_AR" />
<f:TextBox runat = "server" Label = "日文" EmptyText = "" ID = "TXT_JP" />
<f:CheckBox Hidden="true" ID = "CB_IsDeleted" ShowLabel = "false" runat = "server" Text ="" Checked = "FALSE" />
<f:Button Text="查找名称" runat="server" id="BtnSearch" OnClick="BtnSearch_Click"></f:Button>
<%--<f:NumberBox Hidden="true" Label="" ID="NB_State" runat="server" NoDecimal="true" NoNegative="True" Required="True" EmptyText="" ShowRedStar="True" />
<f:DatePicker Hidden="true" runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="" EmptyText="请选择日期" ID="DP_CreateTime" />
<f:TextBox Hidden="true" runat = "server" Label = "" EmptyText = "" ID = "TXT_CreateUser" />
<f:DatePicker Hidden="true" runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="" EmptyText="请选择日期" ID="DP_UpdateTime" />
<f:TextBox Hidden="true" runat = "server" Label = "" EmptyText = "" ID = "TXT_UpdateUser" />
<f:TextBox Hidden="true" runat = "server" Label = "" EmptyText = "" ID = "TXT_UpdateInfo" />
<f:CheckBox Hidden="true" ID = "CB_IsDeleted" ShowLabel = "false" runat = "server" Text ="" Checked = "FALSE" />
<f:TextBox runat = "server" Label = "工厂编号" EmptyText = "" ID = "TXT_FactoryId" />
<f:TextBox runat = "server" Label = "工厂名称" EmptyText = "" ID = "TXT_FactoryName" />
<f:TextBox Hidden="true" runat = "server" Label = "ERP地点" EmptyText = "" ID = "TXT_ErpSite" />
<f:TextBox Hidden="true" runat = "server" Label = "ERP区域" EmptyText = "" ID = "TXT_ErpDomain" />
<f:TextBox runat = "server" Label = "工厂地址" EmptyText = "" ID = "TXT_Address" />
<f:TextBox runat = "server" Label = "邮编号码" EmptyText = "" ID = "TXT_ZipCode" />
<f:TextBox runat = "server" Label = "备注" EmptyText = "" ID = "TXT_Remark" />--%>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" AutoScroll="true"
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px" >
<Items>
<f:Grid SortField="UID"
ID = "Grid_TA_LANGUAGE"
ShowBorder = "true"
ShowHeader = "false" Width = "800px" AutoScroll="true"
runat ="server" EnableRowSelectEvent="true"
OnRowSelect="Grid_TA_LANGUAGE_RowSelect"
DataKeyNames = "UID,GUID,CH,EN,RU,DE,FR,EL,AR,JP,IsDeleted" >
<Columns>
<f:BoundField Width = "200px" DataField = "UID" DataFormatString = "{0}" HeaderText = "" Hidden="true"/>
<f:BoundField Width = "200px" DataField = "CH" DataFormatString = "{0}" HeaderText = "中文" />
<f:RenderField Width="100px" ColumnID="EN" DataField="EN" FieldType="String" HeaderText="英文">
<Editor>
<f:TextBox ID="txtBatch1" Text="" runat="server" ></f:TextBox>
</Editor>
</f:RenderField>
<f:BoundField Width = "200px" DataField = "EN" DataFormatString = "{0}" HeaderText = "英文" />
<f:BoundField Width = "200px" DataField = "DE" DataFormatString = "{0}" HeaderText = "德文" />
<f:BoundField Width = "200px" DataField = "JP" DataFormatString = "{0}" HeaderText = "日文" />
<f:BoundField Width = "200px" DataField = "FR" DataFormatString = "{0}" HeaderText = "法文" />
<f:BoundField Width = "200px" DataField = "RU" DataFormatString = "{0}" HeaderText = "俄文" />
<f:BoundField Width = "200px" DataField = "AR" DataFormatString = "{0}" HeaderText = "阿拉伯文" />
<f:TemplateField HeaderText="GUID" Width="350px">
<ItemTemplate>
<asp:TextBox ID="GURID" runat="server" Width="300px"
Text='<%# Eval("GUID") %>' ></asp:TextBox>
</ItemTemplate>
</f:TemplateField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
</form>
</body>
</html>

209
SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs

@ -1,209 +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.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Controller;
using FineUI;
namespace SCP.BasicData
{
public partial class SCP_LANGUAGE : PageBase
{
private List<TA_LANGUAGE> _list=new List<TA_LANGUAGE>();
public int num;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
public void BindData()
{
_list = SearchData();
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
Grid_TA_LANGUAGE.DataSource = list;
Grid_TA_LANGUAGE.RecordCount = list.Count();
Grid_TA_LANGUAGE.DataBind();
}
//导出
public void BtnOutPut_OnClick(object sender, EventArgs e)
{
//var _ret = Controller.SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE());
//if (_ret.State == ReturnStatus.Succeed)
//{
// _list = _ret.Result;
// var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE).ToList();
// Dictionary<string, string> cellheader = new Dictionary<string, string>(){
// { "AddressNo", "地点编号" },
// { "Region", "所属区域" },
// { "AccountingUnit", "会计单位" },
// { "AddressDescription", "地点描述" }
//};
// string url = EntityListToExcel2003(cellheader, list, "地址");
//}
}
//查询
protected void btnSearch_OnClick(object sender, EventArgs e)
{
BindData();
}
public List<TA_LANGUAGE> SearchData()
{
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.GUID = TXT_GUID.Text;
_entity.CH = TXT_CH.Text;
var _ret =SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(_entity);
if (_ret.State == ReturnStatus.Succeed)
{
_list = _ret.Result;
}
else
{
_list = new List<TA_LANGUAGE>();
}
return _list;
}
//显示
protected void btnShow_OnClick(object sender, EventArgs e)
{
//gp1.Hidden = false;
}
//关闭
protected void btnClose_OnClick(object sender, EventArgs e)
{
//gp1.Hidden = true;
}
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e)
{
Grid_TA_LANGUAGE.PageIndex = e.NewPageIndex;
}
protected void Grid1_OnSort(object sender, GridSortEventArgs e)
{
_list = SearchData();
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
Grid_TA_LANGUAGE.DataSource = list;
Grid_TA_LANGUAGE.RecordCount = list.Count();
Grid_TA_LANGUAGE.DataBind();
}
protected void Btn_Add_Click(object sender, EventArgs e)
{
TXT_GUID.Text=Guid.NewGuid().ToString("N").ToUpper();
TXT_CH.Text=string.Empty;
TXT_EN.Text=string.Empty;
TXT_RU.Text=string.Empty;
TXT_DE.Text=string.Empty;
TXT_FR.Text=string.Empty;
TXT_AR.Text=string.Empty;
TXT_JP.Text = string.Empty;
CB_IsDeleted.Checked = false;
}
protected void Grid_TA_LANGUAGE_RowSelect(object sender, GridRowSelectEventArgs e)
{
object[] rowDataKeys = Grid_TA_LANGUAGE.DataKeys[e.RowIndex];
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]);
_entity.GUID = rowDataKeys[1] as string;
_entity.CH = rowDataKeys[2] as string;
_entity.EN = rowDataKeys[3] as string;
_entity.RU = rowDataKeys[4] as string;
_entity.DE = rowDataKeys[5] as string;
_entity.FR = rowDataKeys[6] as string;
_entity.EL = rowDataKeys[7] as string;
_entity.AR = rowDataKeys[8] as string;
_entity.JP = rowDataKeys[9] as string;
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[10]);
TXT_GUID.Text = _entity.GUID;
TXT_CH.Text = _entity.CH;
TXT_EN.Text = _entity.EN;
TXT_RU.Text = _entity.RU;
TXT_DE.Text = _entity.DE;
TXT_FR.Text = _entity.FR;
TXT_AR.Text = _entity.AR;
TXT_JP.Text = _entity.JP;
CB_IsDeleted.Checked = _entity.IsDeleted;
}
protected void Btn_Save_Click(object sender, EventArgs e)
{
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.GUID = TXT_GUID.Text;
_entity.CH = TXT_CH.Text;
_entity.EN = TXT_EN.Text;
_entity.RU = TXT_RU.Text;
_entity.DE = TXT_DE.Text;
_entity.FR = TXT_FR.Text;
_entity.AR = TXT_AR.Text;
_entity.JP = TXT_JP.Text;
_entity.IsDeleted = CB_IsDeleted.Checked;
var ret=SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text });
if (ret.State == ReturnStatus.Succeed)
{
if (ret.Result.Count > 0)
{
Alert.ShowInTop("中文名称重复!");
return;
}
else
{
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity });
if (ret1.State == ReturnStatus.Succeed)
{
var _ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE());
if (_ret.State == ReturnStatus.Succeed)
{
_list = _ret.Result;
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
Grid_TA_LANGUAGE.DataSource = list;
Grid_TA_LANGUAGE.RecordCount = list.Count();
Grid_TA_LANGUAGE.DataBind();
}
}
}
}
}
protected void Btn_Delete_Click(object sender, EventArgs e)
{
var ret = SCP_TA_LANGUAGE_CONTROLLER.Del_TA_LANGUAGE(new TA_LANGUAGE { GUID = TXT_GUID.Text });
if (ret.State == ReturnStatus.Succeed)
{
BindData();
}
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindData();
}
}
}

78
SCP/Views/BasicData/SCP_LANGUAGE_1.aspx

@ -0,0 +1,78 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_1.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_1" %>
<!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="Button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Reload" OnClientClick="location.reload();">
</f:Button>
<f:Button ID="Insert" runat="server" Text="新建" Icon="Add" OnClick="Button2_Click" >
</f:Button>
<f:Button ID="Delete" runat="server" Text="删除" Icon="Delete" OnClick="Buttondelete_Click" OnClientClick="if(!confirm('是否要将数据删除'))return false;" >
</f:Button>
<f:Button ID="Update" runat="server" Text="修改" Icon="BasketEdit" OnClick="Button4_Click" >
</f:Button>
<f:TextBox runat = "server" Label = "中文" EmptyText = "请输入中文" ID = "TextCH" LabelWidth="50px" />
<f:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="快速查找" Icon="Find">
</f:Button>
<f:ToolbarSeparator runat="server" />
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Grid ID = "Grid_TA_LANGUAGE" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableTextSelection="true"
DataKeyNames = "UID,GUID,CH,EN,RU,DE,FR,EL,AR,JP,IsDeleted"
AllowSorting="true" BoxFlex="1"
PageSize="100"
EnableRowDoubleClickEvent="True" SortField="UID"
IsDatabasePaging="True" AllowPaging="True"
AutoScroll="True" SortDirection="ASC" OnPageIndexChange="Grid_TA_LANGUAGE_PageIndexChange" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText2" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged"
runat="server">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
</f:DropDownList>
</PageItems>
<Columns >
<f:BoundField runat="server" Width = "250px" DataField = "UID" DataFormatString = "{0}" HeaderText = "" Hidden="true"/>
<f:BoundField runat="server" Width = "250px" DataField = "GUID" DataFormatString = "{0}" HeaderText = "" Hidden="true"/>
<f:BoundField runat="server" Width = "250px" DataField = "CH" DataFormatString = "{0}" HeaderText = "中文" />
<f:BoundField runat="server" Width = "350px" DataField = "EN" DataFormatString = "{0}" HeaderText = "英文"/>
<f:BoundField runat="server" Width = "80px" DataField = "RU" DataFormatString = "{0}" HeaderText ="俄文" />
<f:BoundField runat="server" Width = "80px" DataField = "DE" DataFormatString = "{0}" HeaderText = "德文" />
<f:BoundField runat="server" Width = "80px" DataField = "FP" DataFormatString = "{0}" HeaderText ="法文" />
<f:BoundField runat="server" Width = "80px" DataField = "AR" DataFormatString = "{0}" HeaderText ="阿拉伯" />
<f:BoundField runat="server" Width = "80px" DataField = "JP" DataFormatString = "{0}" HeaderText ="日文" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
<f:Window runat="server" ID="Window1" Hidden="True" AutoScroll="false" Width="800px" Height="350px" CloseAction="HidePostBack"
WindowPosition="Center" IsModal="true" Title="多语言明细" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
</body>
</html>

124
SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs

@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
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;
using CK.SCP.Models.AppBoxEntity;
using CK.SCP.Models.Enums;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Common;
using CK.SCP.Controller;
using EntityFramework.Audit;
using FineUI;
using Microsoft.Diagnostics.Instrumentation.Extensions.Intercept;
using SCP.Code;
using EntitiesHelper = CK.SCP.Controller.EntitiesHelper;
using System.IO;
using CK.SCP.Models.ScpEntity.ExcelImportEntity;
using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
using System.Drawing;
using System.Linq.Dynamic;
namespace SCP.Views.BasicData
{
public partial class SCP_LANGUAGE_1 : PageBase
{
private List<TA_LANGUAGE> _list = new List<TA_LANGUAGE>();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindLANGUAGE();
}
}
public void BindLANGUAGE()
{
_list = SearchData();
var list = Sort<TA_LANGUAGE>(_list.AsQueryable(), Grid_TA_LANGUAGE);
Grid_TA_LANGUAGE.DataSource = list;
Grid_TA_LANGUAGE.RecordCount = list.Count();
Grid_TA_LANGUAGE.DataBind();
}
public List<TA_LANGUAGE> SearchData()
{
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.CH = TextCH.Text;
var _ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(_entity);
if (_ret.State == ReturnStatus.Succeed)
{
_list = _ret.Result;
}
else
{
_list = new List<TA_LANGUAGE>();
}
return _list;
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../BasicData/SCP_LANGUAGE_DETAIL.aspx?")));
}
protected void Buttondelete_Click(object sender, EventArgs e)
{
string ID = GetSelectedDataKey(Grid_TA_LANGUAGE, 0);
var ret = SCP_TA_LANGUAGE_CONTROLLER.Del_TA_LANGUAGE(ID);
if (ret.State == ReturnStatus.Succeed)
{
BindLANGUAGE();
}
}
protected void Button4_Click(object sender, EventArgs e)
{
string GUID = GetSelectedDataKey(Grid_TA_LANGUAGE, 1);
string CH = GetSelectedDataKey(Grid_TA_LANGUAGE, 2);
string EN = GetSelectedDataKey(Grid_TA_LANGUAGE, 3);
string url = String.Format("../BasicData/SCP_LANGUAGE_DETAIL.aspx?CH={0}&&EN={1}&&GUID={2}", CH, EN,GUID);
PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
protected void btnShow_Click1(object sender, EventArgs e)
{
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid_TA_LANGUAGE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
}
protected void Grid_TA_LANGUAGE_Sort(object sender, GridSortEventArgs e)
{
}
protected void btnSearch_Click(object sender, EventArgs e)
{
BindLANGUAGE();
}
protected void Grid_TA_LANGUAGE_PageIndexChange(object sender, GridPageEventArgs e)
{
}
}
}

152
SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs

@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.BasicData
{
public partial class SCP_LANGUAGE_1
{
/// <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>
/// Button3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button3;
/// <summary>
/// Insert 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Insert;
/// <summary>
/// Delete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Delete;
/// <summary>
/// Update 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Update;
/// <summary>
/// TextCH 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TextCH;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnSearch;
/// <summary>
/// Grid_TA_LANGUAGE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_TA_LANGUAGE;
/// <summary>
/// ToolbarSeparator3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator3;
/// <summary>
/// ToolbarText2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarText ToolbarText2;
/// <summary>
/// ddlGridPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// highlightRows 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField highlightRows;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
}
}

43
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx

@ -0,0 +1,43 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_DETAIL.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_DETAIL" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server" >
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"/>
<f:Panel ID="Panel1" CssClass="blockpanel" runat="server" ShowBorder="true" ShowHeader="true" Layout="Region">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Btn_Save" runat="server" EnablePostBack="True" Text="保存" Icon="SystemSave" OnClick="Btn_Save_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Width="550px" BodyPadding="25 25 30 25">
<Items>
<f:TextBox runat = "server" Label = "编码" EmptyText = "" ID = "TXT_GUID" Hidden="true"/>
<f:TextBox runat = "server" Label = "中文" EmptyText = "" ID = "TXT_CH" />
<f:TextBox runat = "server" Label = "英文" EmptyText = "" ID = "TXT_EN" />
<f:TextBox runat = "server" Label = "俄文" EmptyText = "" ID = "TXT_RU" />
<f:TextBox runat = "server" Label = "德文" EmptyText = "" ID = "TXT_DE" />
<f:TextBox runat = "server" Label = "法文" EmptyText = "" ID = "TXT_FR" />
<f:TextBox runat = "server" Label = "阿拉伯" EmptyText = "" ID = "TXT_AR" />
<f:TextBox runat = "server" Label = "日文" EmptyText = "" ID = "TXT_JP" />
</Items>
</f:Form>
</Items>
</f:Panel>
</form>
</body>
</html>

130
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs

@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
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;
using CK.SCP.Models.AppBoxEntity;
using CK.SCP.Models.Enums;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Common;
using CK.SCP.Controller;
using EntityFramework.Audit;
using FineUI;
using Microsoft.Diagnostics.Instrumentation.Extensions.Intercept;
using SCP.Code;
using EntitiesHelper = CK.SCP.Controller.EntitiesHelper;
using System.IO;
using CK.SCP.Models.ScpEntity.ExcelImportEntity;
using System.Drawing;
namespace SCP.Views.BasicData
{
public partial class SCP_LANGUAGE_DETAIL : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Bind();
}
}
private void Bind()
{
if (!string.IsNullOrEmpty(Request["CH"]))
{
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.CH = Request["CH"];
_entity.EN = Request["EN"];
_entity.GUID = Request["GUID"];
TXT_CH.Text = _entity.CH;
TXT_EN.Text = _entity.EN;
TXT_GUID.Text = _entity.GUID;
}
}
protected void Btn_Save_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(Request["CH"]))
{
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.GUID = Request["GUID"];
_entity.CH = TXT_CH.Text;
_entity.EN = TXT_EN.Text;
_entity.RU = TXT_RU.Text;
_entity.DE = TXT_DE.Text;
_entity.FR = TXT_FR.Text;
_entity.AR = TXT_AR.Text;
_entity.JP = TXT_JP.Text;
TXT_GUID.Text = _entity.GUID;
var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text });
if (ret.State == ReturnStatus.Succeed)
{
if (String.IsNullOrEmpty(TXT_CH.Text))
{
Alert.ShowInTop("中文名不能为空!");
return;
}
if (ret.Result.Count > 0)
{
Alert.ShowInTop("中文名称重复!");
return;
}
else
{
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity });
if (ret1.State == ReturnStatus.Succeed)
{
Alert.Show("保存成功");
}
}
}
}
else
{
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.GUID = Guid.NewGuid().ToString("N").ToUpper();
_entity.CH = TXT_CH.Text;
_entity.EN = TXT_EN.Text;
_entity.RU = TXT_RU.Text;
_entity.DE = TXT_DE.Text;
_entity.FR = TXT_FR.Text;
_entity.AR = TXT_AR.Text;
_entity.JP = TXT_JP.Text;
var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text });
if (ret.State == ReturnStatus.Succeed)
{
if (String.IsNullOrEmpty(_entity.CH))
{
Alert.ShowInTop("中文名不能为空!");
return;
}
if (ret.Result.Count > 0)
{
Alert.ShowInTop("中文名称重复!");
return;
}
else
{
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity });
if (ret1.State == ReturnStatus.Succeed)
{
Alert.Show("保存成功");
}
}
}
}
}
}
}

134
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.BasicData
{
public partial class SCP_LANGUAGE_DETAIL
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Btn_Save 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Btn_Save;
/// <summary>
/// TXT_GUID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_GUID;
/// <summary>
/// TXT_CH 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_CH;
/// <summary>
/// TXT_EN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_EN;
/// <summary>
/// TXT_RU 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_RU;
/// <summary>
/// TXT_DE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_DE;
/// <summary>
/// TXT_FR 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_FR;
/// <summary>
/// TXT_AR 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AR;
/// <summary>
/// TXT_JP 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_JP;
}
}

6
SCP/Views/BasicData/SCP_TA_VEND_PART.aspx

@ -10,8 +10,8 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True" Layout="VBox">
<Items>
<f:Toolbar ID="Toolbar1" runat="server">
<Items>
@ -50,7 +50,7 @@
</Items>
</f:Toolbar>
<f:Grid ID="Grid1" runat="server" EnableCheckBoxSelect="false"
<f:Grid ID="Grid1" runat="server" EnableCheckBoxSelect="false" BoxFlex="1"
ShowHeader="False"
AllowPaging="True" PageSize="50" OnPageIndexChange="Grid1_OnPageIndexChange"
ShowBorder="False"

5
SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs

@ -44,6 +44,11 @@ namespace SCP.Views.BasicData
_entity.VendId = txtVendId.Text;
_entity.PartCode = txtPartCode.Text;
_entity.ProjectId = txtVendId.Text;
if (!CurrentUser.RoleList.Contains("管理员"))
{
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
}
SCP_V_TA_VEND_PART_CONTROLLER.Get_V_TA_VEND_PART_List(_entity, (rs) => {
if (rs.State == ReturnStatus.Succeed)
{

28
SCP/Views/PlanData/SCP_ASK.aspx

@ -59,27 +59,23 @@
</f:Toolbar>
</Toolbars>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" >
<f:GroupPanel runat="server" ID="gp1" Hidden="true" ColumnWidth="100%" >
<Items>
<f:Form runat="server" >
<f:Form runat="server" ColumnWidth="100%" Margin="5" BodyPadding ="5">
<Rows>
<f:FormRow runat="server">
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%">
<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: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">
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%">
<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" />
@ -92,21 +88,21 @@
<f:ListItem Text="已确认" Value="2" />
<f:ListItem Text="已发货" Value="3" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox runat="server" Required ="true" Label="零件编号" EmptyText="查询请填写零件编号" ID="TXT_PartCode" />
</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:Panel ID="Panel5" runat="server" ShowBorder="false" CssClass="mypanel" ShowHeader="false">
<Items>
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click" Margin="5"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找" Margin="5">
</f:Button>
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细">
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细" Margin="5">
</f:Button>
</Items>
</f:Panel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
@ -114,7 +110,7 @@
</Items>
</f:GroupPanel>
<f:Grid ID = "Grid_V_TB_ASK" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true" EnableTextSelection="true"
<f:Grid ID = "Grid_V_TB_ASK" 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" BoxFlex="1"
PageSize="100"

4
SCP/Views/PlanData/SCP_ASK.aspx.cs

@ -91,9 +91,6 @@ namespace SCP.PlanData
_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;
@ -295,6 +292,7 @@ namespace SCP.PlanData
var ret = SCP_PO_CONTROLLER.EXCEL_PO_TO_ASK_MOD(list, CurrentUser.Name, CurrentUser.ChineseName, DateTime.Now, BillModType.Non_Contract, _isAutoPublish);
if (ret.State == ReturnStatus.Succeed && ret.Result == true)
{
Alert.Show("导入成功!");
BindAsk();
}
else

36
SCP/Views/PlanData/SCP_ASK.aspx.designer.cs

@ -212,33 +212,6 @@ namespace SCP.PlanData
/// </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>
@ -311,6 +284,15 @@ namespace SCP.PlanData
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// Panel5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel5;
/// <summary>
/// BtnClose 控件。
/// </summary>

15
SCP/Views/PlanData/SCP_ASK_DETAIL.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="" AutoScroll="True" Layout="VBox">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
@ -39,7 +39,7 @@
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="" ID="F_PO_DETAIL" Hidden="true">
<f:Form runat="server" Title="" ID="F_PO_DETAIL" Hidden="true" ColumnWidth="100%">
<Items>
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%">
<Items>
@ -50,12 +50,15 @@
<f:TextBox runat = "server" Label = "发往地点" EmptyText = "" ID = "TXT_Site" />
</Items>
</f:FormRow>
<f:FormRow runat="server" >
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%">
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="" Hidden="true">
</f:TextBox>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_BeginTime" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="到货日期" EmptyText="请选择日期" ID="DP_EndTime" />
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="">
</f:TextBox>
<f:TextBox ID="TXT_AskBillNum" runat="server" Label="要货看板号" EmptyText="" Readonly="true">
</f:TextBox>
<f:Button ID="btnModifyDate" runat="server" Hidden="true" EnablePostBack="True" OnClick="btnModifyDate_Click" Text="修改明细记录订货和发货日期" Icon="CssAdd" OnClientClick="if(!confirm('是否修改明细订货和到货时间?'))return false;">
</f:Button>
</Items>
@ -63,7 +66,7 @@
</Items>
</f:Form>
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL"
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL" BoxFlex="1"
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,PartDesc1,PartDesc2,AskBillNum,AskQty,ReduceQty,ShippedQty,CanQty"
IsDatabasePaging="True" AllowPaging="True" PageSize="100" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange" EnableCheckBoxSelect="true"
AutoScroll="True" SortField="PoLine" SortDirection="DESC" OnRowDataBound="Grid_V_TB_ASK_DETAIL_RowDataBound" >

1
SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs

@ -112,6 +112,7 @@ namespace SCP.PlanData
this.txtRemark.Text = _result.Remark;
DP_BeginTime.SelectedDate = _result.BeginTime;
TXT_VendId.Text = _result.VendId;
TXT_AskBillNum.Text = _result.AskBillNum;
//DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID));
//DDL_PORT.DataBind();
//DDL_PORT.SelectedValue = _result.ReceivedPort;

27
SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.PlanData {
namespace SCP.PlanData
{
public partial class SCP_ASK_DETAIL {
public partial class SCP_ASK_DETAIL
{
/// <summary>
/// form1 控件。
@ -175,31 +177,40 @@ namespace SCP.PlanData {
protected global::FineUI.TextBox TXT_Site;
/// <summary>
/// txtRemark 控件。
/// DP_BeginTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtRemark;
protected global::FineUI.DatePicker DP_BeginTime;
/// <summary>
/// DP_BeginTime 控件。
/// DP_EndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_BeginTime;
protected global::FineUI.DatePicker DP_EndTime;
/// <summary>
/// DP_EndTime 控件。
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_EndTime;
protected global::FineUI.TextBox txtRemark;
/// <summary>
/// TXT_AskBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AskBillNum;
/// <summary>
/// btnModifyDate 控件。

57
SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx

@ -4,13 +4,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<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">
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True" Layout="VBox">
<Items>
<f:Form runat="server">
<Toolbars>
@ -23,15 +23,15 @@
<f:Button ID="btnOutput" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel">
</f:Button>
<f:TextBox ID="txt_Planner" runat="server" Hidden="true" Text="计划员姓名"></f:TextBox>
<f:Button ID="btn_planner" runat="server" Text="查询计划员" Hidden="true" Icon="Find" OnClick="btn_planner_Click" ></f:Button>
<f:Button ID="btn_planner" runat="server" Text="查询计划员" Hidden="true" Icon="Find" OnClick="btn_planner_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Form BodyPadding="10px" Height="100px" ID="extForm1"
runat="server" Title="" ShowHeader="false" >
<f:Form BodyPadding="10px" Height="130px" ID="extForm1"
runat="server" Title="" ShowHeader="false">
<Rows>
<f:FormRow ColumnWidths="33% 33% 33%" ID="FormRow_1" runat="server">
<Items>
@ -52,22 +52,14 @@
</f:TextBox>
<f:TextBox runat="server" Label="零件名称" ID="TextPartName">
</f:TextBox>
<f:TextBox runat="server" Label="子网站" ID="TextSubSite" Hidden="true">
</f:TextBox>
<f:TextBox runat="server" Label="子网站" ID="TextExtend1" Hidden="true">
</f:TextBox>
<f:TextBox runat="server" Label="子网站" ID="TextExtend2" Hidden="true">
</f:TextBox>
<f:TextBox runat="server" Label="子网站" ID="TextExtend3" Hidden="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 25% 25%" ID="FormRow_3" runat="server">
<f:FormRow ColumnWidths="33% 33% 33%" ID="FormRow_3" runat="server">
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnSearch_Click"></f:Button>
<%-- <f:DropDownList ID="ddl_DayState" runat="server" Label="发货预警">
<f:ListItem Text="全部" Value="-1" Selected="true"/>
<f:TextBox runat="server" Label="供应商编码" ID="TextVendId">
</f:TextBox>
<f:DropDownList ID="ddl_DayState" runat="server" Label="发货预警">
<f:ListItem Text="全部" Value="-1" Selected="true" />
<f:ListItem Text="已超期" Value="0" />
<f:ListItem Text="1天" Value="1" />
<f:ListItem Text="2天" Value="2" />
@ -79,21 +71,25 @@
<f:ListItem Text="8天" Value="8" />
<f:ListItem Text="9天" Value="9" />
<f:ListItem Text="10天" Value="10" />
</f:DropDownList>--%>
</f:DropDownList>
<f:RadioButtonList ID="rb_SendState" Label="发货状态" runat="server">
<f:RadioItem Text="全部" Value="0" />
<f:RadioItem Text="未发货" Value="1" Selected="true"/>
<f:RadioItem Text="未发货" Value="1" Selected="true" />
<f:RadioItem Text="已发货" Value="2" />
</f:RadioButtonList>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="33% 33% 33%" ID="FormRow1" runat="server">
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnSearch_Click"></f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="GridINCOM" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="PoBillNum,AskBillNum,PartCode,PartDesc1,PoLine,AskQty,Qty,Number,ValidityDays,SubSite,Extend1,Extend2,Extend3"
IsDatabasePaging="true" AllowPaging="true" SortField="BeginTime" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_INCOMPLETE_ASK_PageIndexChange"
AutoScroll="True" EnableRowDoubleClickEvent="True" >
AutoScroll="True" EnableRowDoubleClickEvent="True">
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
</f:ToolbarSeparator>
@ -107,6 +103,7 @@
</PageItems>
<Columns>
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" />
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="VendId" />
<f:BoundField runat="server" HeaderText="要货单号" ColumnID="" DataField="AskBillNum" />
<f:BoundField runat="server" HeaderText="零件编号" ColumnID="" DataField="PartCode" />
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" />
@ -117,15 +114,15 @@
<f:BoundField runat="server" HeaderText="未发货数量" ColumnID="" DataField="Number" />
<f:BoundField runat="server" HeaderText="计划员" ColumnID="" DataField="Buyer" />
<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 = "ShipTime" 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="ShipTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="最后发货日期" />
<f:BoundField Width = "100px" DataField = "ValidityDays" HeaderText = "距到货日期(天)" />
<f:BoundField Width = "100px" DataField = "SubSite" HeaderText = "子网站" />
<f:BoundField Width = "100px" DataField = "Extend1" HeaderText = "子网站" Hidden="true"/>
<f:BoundField Width = "100px" DataField = "Extend2" HeaderText = "子网站" Hidden="true"/>
<f:BoundField Width = "100px" DataField = "Extend3" HeaderText = "子网站" Hidden="true" />
<f:BoundField Width="100px" DataField="ValidityDays" HeaderText="距到货日期(天)" />
<f:BoundField Width="100px" DataField="SubSite" HeaderText="子网站" />
<f:BoundField Width="100px" DataField="Extend1" HeaderText="子网站" Hidden="true" />
<f:BoundField Width="100px" DataField="Extend2" HeaderText="子网站" Hidden="true" />
<f:BoundField Width="100px" DataField="Extend3" HeaderText="子网站" Hidden="true" />
</Columns>
</f:Grid>

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

@ -74,6 +74,10 @@ namespace SCP.PlanData
{
_entity.EndTimeEnd = (DateTime)dp_EndTimeEnd.SelectedDate;
}
if (TextVendId.Text != null)
{
_entity.VendId = TextVendId.Text;
}
if (TextBoxAskNo.Text != null)
{
_entity.AskBillNum = TextBoxAskNo.Text;
@ -86,22 +90,6 @@ namespace SCP.PlanData
{
_entity.PartDesc1 = TextPartName.Text;
}
if (TextSubSite.Text != null)
{
_entity.SubSite = TextSubSite.Text;
}
if (TextExtend1.Text != null)
{
_entity.Extend1 = TextExtend1.Text;
}
if (TextExtend2.Text != null)
{
_entity.Extend2 = TextExtend2.Text;
}
if (TextExtend3.Text != null)
{
_entity.Extend3 = TextExtend3.Text;
}
if (!string.IsNullOrEmpty(CurrentUser.Name))
{
if (CurrentUser.Name != "admin")
@ -133,7 +121,7 @@ namespace SCP.PlanData
}
}
_entity.SendState = int.Parse(rb_SendState.SelectedValue);
//_entity.DayState = int.Parse(ddl_DayState.SelectedValue);
_entity.DayState = int.Parse(ddl_DayState.SelectedValue);
_entity.IsDeleted = false;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
@ -175,6 +163,18 @@ namespace SCP.PlanData
{
_ls.EndTimeEnd = (DateTime)dp_EndTimeEnd.SelectedDate;
}
if (dp_EndTimeStart.SelectedDate != null)
{
_ls.EndTimeStart = (DateTime)dp_EndTimeStart.SelectedDate;
}
if (dp_EndTimeEnd.SelectedDate != null)
{
_ls.EndTimeEnd = (DateTime)dp_EndTimeEnd.SelectedDate;
}
if (TextVendId.Text != null)
{
_ls.VendId = TextVendId.Text;
}
if (TextBoxAskNo.Text != null)
{
_ls.AskBillNum = TextBoxAskNo.Text;

29
SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs

@ -186,49 +186,49 @@ namespace SCP.PlanData
protected global::FineUI.TextBox TextPartName;
/// <summary>
/// TextSubSite 控件。
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TextSubSite;
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// TextExtend1 控件。
/// TextVendId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TextExtend1;
protected global::FineUI.TextBox TextVendId;
/// <summary>
/// TextExtend2 控件。
/// ddl_DayState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TextExtend2;
protected global::FineUI.DropDownList ddl_DayState;
/// <summary>
/// TextExtend3 控件。
/// rb_SendState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TextExtend3;
protected global::FineUI.RadioButtonList rb_SendState;
/// <summary>
/// FormRow_3 控件。
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// btnQuery 控件。
@ -239,15 +239,6 @@ namespace SCP.PlanData
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// rb_SendState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.RadioButtonList rb_SendState;
/// <summary>
/// GridINCOM 控件。
/// </summary>

163
SCP/Views/PlanData/SCP_INVOICE.aspx

@ -0,0 +1,163 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE.aspx.cs" Inherits="SCP.Views.PlanData.SCP_INVOICE" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1"/>
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar1" runat="server">
<Items>
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();">
</f:Button>
<f:Button ID="btnView" runat="server" EnablePostBack="True" Text="查看发票" Icon="Zoom" OnClick="btnView_OnClick">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="显示查询面板" Icon="Find" OnClick="btnShow_OnClick">
</f:Button>
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/>
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认供应商发票管理" OnClick="BTN_INV_Click" Hidden="true"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox">
<Items>
<f:Form runat="server">
<Rows>
<f:FormRow runat="server" ID="FormRow_1">
<Items>
<f:CheckBoxList runat="server" ID="ckb" Label="状态">
<%--<f:CheckItem Text="新建" Value="0" Selected="True" />
<f:CheckItem Text="供应商申请" Value="1" />
<f:CheckItem Text="采购审核退回" Value="2" />
<f:CheckItem Text="采购审核通过" Value="3" />
<f:CheckItem Text="发票寄出" Value="4" />
<f:CheckItem Text="财务退回" Value="5" />
<f:CheckItem Text="财务收票" Value="6" />
<f:CheckItem Text="发票作废" Value="-1" />--%>
</f:CheckBoxList>
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_2">
<Items>
<f:TextBox ID="TXT_InvcBillNum" runat="server" Label="发票单号"/>
<f:TextBox ID="TXT_VendName" runat="server" Label="供应商"/>
<f:TextBox ID="TXT_InvoiceNum" runat="server" Label="金税票号" MaxLength="22"/>
<f:TextBox ID="TXT_PO" runat="server" Label="订单编号"/>
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_3">
<Items>
<f:TextBox ID="TXT_Site" runat="server" Label="收货地点"/>
<f:TextBox ID="TXT_ASN" runat="server" Label="发货单号"/>
<f:DatePicker ID="DP_CreateTime1" runat="server" Required="true" Label="收货时间" />
<f:DatePicker ID="DP_CreateTime2" runat="server" Required="true" Label="至" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_4">
<Items>
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button>
<f:Button ID="BTN_SEARCH" runat="server" OnClick="BTN_SEARCH_Click" Text="快速查找">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="true" ShowHeader="False"
AllowPaging="True" PageSize="20" OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange"
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" BoxFlex="1"
DataKeyNames="UID, InvcBillNum" AllowSorting="true" IsDatabasePaging="true" SortField="State" OnRowDataBound="Grid_V_TB_INVOICE_RowDataBound" >
<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="20" />
<f:ListItem Text="50" Value="50" />
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" />
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="" DataField="InvcBillNum" />
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="InvoiceNum" />
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="" DataField="ExpressNum" />
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" />
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" />
<f:BoundField runat="server" HeaderText="金额" ColumnID="" DataField="Amount" DataFormatString = "{0:F}"/>
<f:BoundField runat="server" HeaderText="采购金额" ColumnID="" DataField="PurCost" DataFormatString = "{0:F}" />
<f:BoundField runat="server" HeaderText="成本金额" ColumnID="" DataField="StdCost" DataFormatString = "{0:F}"/>
<f:BoundField runat="server" HeaderText="税率" ColumnID="" DataField="Tax" DataFormatString = "{0:F}"/>
<f:BoundField runat="server" HeaderText="税额" ColumnID="" DataField="TaxAmount" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="Total" />--%>
<f:TemplateField HeaderText="税后金额" Width="70px" ColumnID="Total">
<ItemTemplate>
<asp:label ID="Total1" runat="server" Width="60px" Text='<%# Eval("Total") %>' ></asp:label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="DiscountPrice" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="折扣税额" ColumnID="" DataField="DiscountPriceTax" DataFormatString = "{0:F}"/> --%>
<f:BoundField runat="server" HeaderText="索赔金额" ColumnID="" DataField="ContractPrice" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="索赔税额" ColumnID="" DataField="ContractPriceTax" DataFormatString = "{0:F}"/>--%>
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="RealTotal" DataFormatString = "{0:F}"/> --%>
<%--<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%>
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" runat="server" Hidden="True" AutoScroll="True"
WindowPosition="Center" IsModal="true" Title="发票编辑" Target="Parent" EnableIFrame="true" OnClose="Window1_Close"
IFrameUrl="about:blank" Height="550px" Width="1024px">
</f:Window>
<f:Window ID="Window2" runat="server" Hidden="True" AutoScroll="True"
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="300px" Width="400px">
</f:Window>
<f:Window ID="WindowUpload" runat="server" Hidden="True" AutoScroll="True"
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="200px" Width="400px" OnClose="WindowUpload_Close" >
</f:Window>
<script type="text/javascript">
</script>
</form>
</body>
</html>

206
SCP/Views/PlanData/SCP_INVOICE.aspx.cs

@ -0,0 +1,206 @@
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;
using System.Drawing;
namespace SCP.Views.PlanData
{
public partial class SCP_INVOICE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
IsRoleRight();
if (!IsPostBack)
{
//TranslatorAgents(Toolbar1);
//TranslatorAgent(Grid_V_TB_INVOICE);
//TranslatorAgents(FormRow_1);
//TranslatorAgents(FormRow_2);
//TranslatorAgents(FormRow_3);
//TranslatorAgents(FormRow_4);
BindInvoice();
BindVenderByUser(DDL_VEND_LIST);
}
}
public void IsRoleRight()
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
DDL_VEND_LIST.Hidden = false;
BTN_INV.Hidden = false;
}
}
public void BindInvoice()
{
SearchInvoice(ret => {
Grid_V_TB_INVOICE.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_INVOICE);
Grid_V_TB_INVOICE.DataSource = ret;
Grid_V_TB_INVOICE.DataBind();
});
}
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action)
{
V_TB_INVOICE _entity = new V_TB_INVOICE();
_entity.InvcBillNum = TXT_InvcBillNum.Text;
_entity.VendName = TXT_VendName.Text;
_entity.InvoiceNum = TXT_InvoiceNum.Text;
_entity.UserInVendIds = CurrentUser.VenderList;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("选择开票的供应商,并点击确认!");
return;
}
var _venderId = DDL_VEND_LIST.SelectedValue;
_entity.VendId = _venderId;
}
else
{
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
_entity.VendId = CurrentUser.VenderList[0];
}
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_entity.Site = CurrentUser.FactoryList[0];
}
if (string.IsNullOrEmpty(_entity.VendId))
{
return;
}
if (DP_CreateTime1.SelectedDate != null || DP_CreateTime2.SelectedDate != null || !string.IsNullOrEmpty(TXT_PO.Text) || !string.IsNullOrEmpty(TXT_ASN.Text))
{
_entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text, TXT_PO.Text, TXT_ASN.Text);
}
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(_entity, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
//if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0)
//{
// Alert.Show("未查询到符合条件的发票!");
//}
p_action(ret.Result);
}
});
}
protected void btnView_OnClick(object sender, EventArgs e)
{
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length != 1)
{
Alert.Show("请选择一行要操作的记录!");
return;
}
string roleID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1);
string url = String.Format("../PlanData/SCP_INVOICE_EDIT.aspx?ID={0}", roleID);
PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
//显示面板
protected void btnShow_OnClick(object sender, EventArgs e)
{
gp1.Hidden = false;
}
//关闭面板
protected void OnClick(object sender, EventArgs e)
{
gp1.Hidden = true;
}
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
BindInvoice();
}
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e)
{
//string roleID = GetSelectedDataKey(Grid1, 1);
//string url = String.Format("../SupplierData/InvoiceDetail.aspx?ID={0}", roleID);
//PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindInvoice();
}
protected void BTN_SEARCH_Click(object sender, EventArgs e)
{
BindInvoice();
}
//导出
protected void btnOutput_OnClick(object sender, EventArgs e)
{
int[] _selections = Grid_V_TB_INVOICE.SelectedRowIndexArray;
if (_selections.Count() == 0)
{
Alert.Show("请选择发票记录导出!");
}
List<string> _ls = new List<string>();
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++)
{
if (_selections.Contains(i))
{
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i];
_ls.Add(rowDataKeys[1] as string);
}
}
if (_ls.Count == 0)
{
Alert.Show("请选择记录导出!");
return;
}
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls);
ds.Tables[1].Columns.Remove("成本价");
PageBase.DataSetToExcel(ds, "导出发票");
}
protected void Grid_V_TB_INVOICE_RowDataBound(object sender, GridRowEventArgs e)
{
int i = 0;
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_INVOICE.Rows[e.RowIndex].FindControl("Total1");
if (!string.IsNullOrEmpty(_label.Text))
{
try
{
if (decimal.Parse(_label.Text) < 0)
{
_label.ForeColor = Color.Red;
i++;
}
}
catch
{ }
}
}
protected void BTN_INV_Click(object sender, EventArgs e)
{
BindInvoice();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
}
}
}

314
SCP/Views/PlanData/SCP_INVOICE.aspx.designer.cs

@ -0,0 +1,314 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.PlanData
{
public partial class SCP_INVOICE
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar1;
/// <summary>
/// Button3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button3;
/// <summary>
/// btnView 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnView;
/// <summary>
/// btnOutput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// DDL_VEND_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_VEND_LIST;
/// <summary>
/// BTN_INV 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BTN_INV;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// ckb 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.CheckBoxList ckb;
/// <summary>
/// FormRow_2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_2;
/// <summary>
/// TXT_InvcBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_InvcBillNum;
/// <summary>
/// TXT_VendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
/// <summary>
/// TXT_InvoiceNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_InvoiceNum;
/// <summary>
/// TXT_PO 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PO;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// TXT_Site 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Site;
/// <summary>
/// TXT_ASN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ASN;
/// <summary>
/// DP_CreateTime1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_CreateTime1;
/// <summary>
/// DP_CreateTime2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_CreateTime2;
/// <summary>
/// FormRow_4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_4;
/// <summary>
/// BTN_SEARCH 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BTN_SEARCH;
/// <summary>
/// Grid_V_TB_INVOICE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_INVOICE;
/// <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>
/// Total1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Total1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window2;
/// <summary>
/// WindowUpload 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window WindowUpload;
}
}

153
SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx

@ -0,0 +1,153 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_EDIT.aspx.cs" Inherits="SCP.Views.PlanData.SCP_INVOICE_EDIT" %>
<!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" Title="">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server">
</f:ToolbarSeparator>
<f:Button ID="btnOK" runat="server" Text="修改数据" Hidden="true" OnClientClick="if(!confirm('是否要修改发票?'))return false;" Icon="ApplicationEdit" OnClick="btnOK_Click">
</f:Button>
<f:Button ID="btnApply" runat="server" Text="提交申请" Hidden="true" OnClientClick="if(!confirm('是否要提交申请?'))return false;" Icon="Accept" OnClick="btnApply_Click">
</f:Button>
<f:Button ID="btnMail" runat="server" Text="寄出发票" Hidden="true" OnClientClick="if(!confirm('是否寄出发票?寄出前请检查发票时间和纸质发票时间是否一致!'))return false;" Icon="Mail" OnClick="btnMail_Click" ValidateForms="extForm1">
</f:Button>
<f:Button ID="btnReject" runat="server" Text="发票作废" Hidden="true" OnClientClick="if(!confirm('是否要作废收票?'))return false;" Icon="Exclamation" OnClick="btnReject_Click">
</f:Button>
<f:Button ID="btnRed" runat="server" Hidden="true" Text="添加红字发票" OnClientClick="if(!confirm('是否要添加红字发票?'))return false;" Icon="Exclamation" OnClick="btnRed_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Layout="HBox" >
<Items>
<f:Form runat="server">
<Rows>
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_1">
<Items>
<f:TextBox ID="txtBillNo" runat="server" Label="发票单号" Text="" MaxLength="100" Readonly="true" Enabled="false">
</f:TextBox>
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" MaxLength="100" Readonly="true" Enabled="false">
</f:TextBox>
<f:TextBox ID="txtBillTime" runat="server" Label="创建时间" Text="" MaxLength="100" Readonly="true" Enabled="false" />
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text="" MaxLength="100" Readonly="true" Enabled="false" />
<f:Label runat="server" ID="Label3" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_2">
<Items>
<f:TextBox ID="txtAmount" runat="server" Label="金额" Text="" Readonly="true" Enabled="false" />
<f:Label runat="server" ID="Label1" Text="税率" /><f:DropDownList runat="server" Label="税率" ID="txtTax" AutoPostBack="true" >
<f:ListItem Text="0.16" Value="0.16" />
<f:ListItem Text="0.13" Value="0.13" />
<f:ListItem Text="0" Value="0" />
</f:DropDownList>
<f:TextBox ID="txtTaxAmount" runat="server" Label="税额" Text="" Readonly="true" Enabled="false">
</f:TextBox>
<f:TextBox ID="txtTotal" runat="server" Label="税后金额" Text="" Readonly="true" Enabled="false" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_3">
<Items>
<f:NumberBox ID="txtContractPrice1" runat="server" Label="索赔金额" Readonly="true" />
<f:NumberBox ID="txtDiscountPrice" runat="server" Label="折扣金额" />
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" />
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" MaxLength="22">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_4">
<Items>
<f:TextBox ID="txtExpressNumber" runat="server" Label="快递单号" Text="" MaxLength="100">
</f:TextBox>
<f:DatePicker runat="server" ID ="dpUpdateTime" Label="发票时间"></f:DatePicker>
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="" MaxLength="100">
</f:TextBox>
<f:Label runat="server" ID="l1" />
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="500" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,InvcBillNum,Qty,CanQty,State" IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoBillNum" OnRowDataBound="Grid1_RowDataBound">
<Columns>
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" />
<f:BoundField SortField="ProjectId" DataField="ProjectId" HeaderText="项目编号" ColumnID="ProjectId" Width="100px" />
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单" ColumnID="Line" Width="100px" />
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="ProductCode" Width="80px" />
<%--<f:BoundField SortField="ProductName" DataField="AsnBillNum" HeaderText="收货单" ColumnID="ProductName" Width="100px" />--%>
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单" ColumnID="UnitCode" Width="120px" />
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="80px" />
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="300px" />
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Price" Width="80px" />
<f:TemplateField Width="90px" HeaderText="单价">
<ItemTemplate>
<asp:TextBox ID="txtPrice" runat="server" Width="80px" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"
Text='<%# Eval("Price") %>' MaxLength="12" ></asp:TextBox>
</ItemTemplate>
</f:TemplateField>
<f:BoundField SortField="PurCost" runat="server" HeaderText="采购价格" ColumnID="" DataField="PurCost" />
<f:BoundField SortField="UpdateTime" runat="server" HeaderText="收货日期" ColumnID="" DataField="UpdateTime" />
<f:BoundField SortField="CanQty" DataField="CanQty" HeaderText="可开票数量" ColumnID="OpenQty" Width="80px" />
<f:TemplateField HeaderText="开票数量" Width="90px">
<ItemTemplate>
<asp:TextBox ID="txtQty" runat="server" Width="80px"
Text='<%# Eval("Qty") %>' MaxLength="12"></asp:TextBox>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField HeaderText="备注" Width="100px">
<ItemTemplate>
<asp:TextBox ID="txtLineMemo" runat="server" Width="300px"
Text='<%# Eval("Remark") %>' MaxLength="200" ></asp:TextBox>
</ItemTemplate>
</f:TemplateField>
</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" OnClose="Window1_OnClose"/>
<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>

528
SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.cs

@ -0,0 +1,528 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Common;
using CK.SCP.Controller;
using CK.SCP.Models.Enums;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using FineUI;
using System.Drawing;
namespace SCP.Views.PlanData
{
public partial class SCP_INVOICE_EDIT : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
IsRoleRight();
if (!IsPostBack)
{
TranslatorAgents(Toolbar2);
TranslatorAgent(Grid1);
TranslatorAgents(FormRow_1);
TranslatorAgents(FormRow_2);
TranslatorAgents(FormRow_3);
TranslatorAgents(FormRow_4);
BindData();
GetInvoice();
SetRoleRule();
}
}
public void IsRoleRight()
{
//if (!CurrentUser.RoleList.Contains("供应商"))
//{
// Alert.Show("当前用户角色不能操作该模块!");
// return;
//}
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
//{
// Alert.Show("当前用户未选择地点!");
// return;
//}
}
private void SetRoleRule()
{
//IsPriceVisible(Grid1, "合同价格");
//IsPriceVisible(Grid1, "合同差额");
IsPriceVisible(Grid1, "要货日期");
}
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list)
{
string id = GetQueryValue("ID");
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL();
_tb.InvcBillNum = id;
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb, (ret) => {
if (ret.State == ReturnStatus.Succeed)
{
p_list(ret.Result);
}
});
}
public void BindData()
{
Search(ret =>
{
Grid1.RecordCount = ret.Count();
var list = SortAndPage(ret, Grid1);
//Grid1.DataSource =SCP_RECIVECE_CONTROLLER.Get_V_TB_INVOICE_LIST(list.ToList());
List<V_TB_INVOICE_DETAIL> temp = SCP_RECIVECE_CONTROLLER.Get_V_TB_INVOICE_LIST(list.ToList());
temp = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(temp);
GetInvoice();
Grid1.DataSource = temp;
Grid1.DataBind();
});
}
private void GetInvoice()
{
string id = GetQueryValue("ID");
string vendid = "";
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
vendid = CurrentUser.VenderList[0];
}
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(new V_TB_INVOICE { InvcBillNum = id, VendId = vendid }, (ret) => {
if (ret.State == ReturnStatus.Succeed)
{
var _ls = ret.Result.ToList();
if (_ls != null && _ls.Count > 0)
{
var _Model = _ls[0];
Session["Invoice"] = _Model;
txtState.Text = _Model.State_DESC;
txtBillNo.Text = _Model.InvcBillNum;
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd");
txtSupplierName.Text = _Model.VendName;
txtInvoiceNumber.Text = _Model.InvoiceNum;
txtExpressNumber.Text = _Model.ExpressNum;
dpUpdateTime.SelectedDate = _Model.UpdateTime;
txtTax.SelectedValue = _Model.Tax != null ? _Model.Tax.Value.ToString() : "0";
txtTaxAmount.Text = _Model.TaxAmount != null ? _Model.TaxAmount.Value.ToString() : "0";
txtDiscountPrice.Text = _Model.DiscountPrice != null ? _Model.DiscountPrice.Value.ToString() : "0";
//if (_Model.State != (int)InvoiceState.New)
//{
txtContractPrice1.Text = _Model.ContractPrice != null ? _Model.ContractPrice.ToString() : string.Empty;
txtBlancePrice1.Text = _Model.BlancePrice != null ? _Model.BlancePrice.ToString() : string.Empty;
//}
txtAmount.Text = _Model.Amount.ToString();
txtTotal.Text = _Model.Total != null ? _Model.Total.ToString() : string.Empty;
txtMemo.Text = _Model.Remark;
if (_Model.State == (int)InvoiceState.New )
{
this.btnOK.Hidden = false;
this.btnApply.Hidden = false;
this.btnReject.Hidden = false;
}
if (_Model.State == (int)InvoiceState.Reject)
{
this.btnReject.Hidden = true;
this.btnOK.Hidden = false;
}
//提交之后不能作废
if (_Model.State == (int)InvoiceState.New)
{
this.btnOK.Hidden = false;
this.btnReject.Hidden = false;
}
if (_Model.State == (int)InvoiceState.Apply)
{
this.btnOK.Hidden = false;
this.btnApply.Hidden = true;//提交申请
this.btnReject.Hidden = true;//发票作废
this.btnMail.Hidden = true;//寄出发票
}
if (_Model.State == (int)InvoiceState.Mail)
{
this.btnOK.Hidden = true;//确定修改
this.btnApply.Hidden = true;//提交申请
this.btnReject.Hidden = true;//发票作废
this.btnMail.Hidden = true;//寄出发票
txtInvoiceNumber.Readonly = true;
txtInvoiceNumber.Required = false;
txtExpressNumber.Readonly = true;
txtExpressNumber.Required = false;
txtContractPrice1.Readonly = true;
txtContractPrice1.Required = false;
txtBlancePrice1.Readonly = true;
txtBlancePrice1.Required = false;
}
if (_Model.State == (int)InvoiceState.FinanceFail || _Model.State == (int)InvoiceState.CheckSuccess)
{
txtInvoiceNumber.Readonly = false;
txtInvoiceNumber.Required = true;
txtExpressNumber.Readonly = false;
txtContractPrice1.Readonly = false;
txtContractPrice1.Required = false;
txtBlancePrice1.Readonly = false;
txtBlancePrice1.Required = false;
this.btnMail.Hidden = false;
this.btnReject.Hidden = false;
this.btnOK.Hidden = false;
}
if (_Model.State == (int)InvoiceState.CheckSuccess)
{
this.btnOK.Hidden = true;
txtMemo.Enabled = false;
for (int i = 0, count = Grid1.Rows.Count; i < count; i++)
{
object[] rowDataKeys = Grid1.DataKeys[i];
GridRow row = Grid1.Rows[i];
var txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice");
var txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty");
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo");
txtPrice.ReadOnly = true;
txtPrice.Enabled = false;
txtQty.ReadOnly = true;
txtQty.Enabled = false;
txtLineMemo.ReadOnly = true;
txtLineMemo.Enabled = false;
}
}
}
}
});
}
protected void btnOK_Click(object sender, EventArgs e)
{
var _invoice = Session["Invoice"] as V_TB_INVOICE;
string InvoiceNumber = MyWebString.GetString(this.txtInvoiceNumber.Text.Trim());
string Memo = MyWebString.GetString(this.txtMemo.Text.Trim());
string ExpressNumber = MyWebString.GetString(this.txtExpressNumber.Text.Trim());
string ContractPrice1 = MyWebString.GetString(this.txtContractPrice1.Text.Trim());//合同价格
string BlancePrice1 = MyWebString.GetString(this.txtBlancePrice1.Text.Trim());//合同差额
string DiscountPrice1 = MyWebString.GetString(this.txtDiscountPrice.Text.Trim());
//if (_invoice.State != (int)InvoiceState.New &&
// _invoice.State != (int)InvoiceState.CheckFail)
//{
// Alert.Show(_invoice.InvcBillNum + " 不允许修改,只有状态为 " + "新建" + " 或 " +
// "采购退回" + " 才能修改");
// return;
//}
if (!string.IsNullOrEmpty(txtTax.SelectedValue))
{
_invoice.Tax = decimal.Parse(txtTax.SelectedValue);
}
_invoice.InvoiceNum = InvoiceNumber;
_invoice.Remark = Memo;
_invoice.ExpressNum = ExpressNumber;
//_invoice.UpdateTime = dpUpdateTime.SelectedDate.Value;
//_invoice.State = (int)InvoiceState.Apply;
if (string.IsNullOrEmpty(ContractPrice1))
{
_invoice.ContractPrice = 0;
}
if (string.IsNullOrEmpty(BlancePrice1))
{
_invoice.BlancePrice = 0;
}
if (string.IsNullOrEmpty(DiscountPrice1))
{
_invoice.DiscountPrice = 0;
}
if (_invoice.State == (int)InvoiceState.CheckSuccess)
{
if (dpUpdateTime.SelectedDate == null)
{
Alert.Show("发票时间必须填写,时间为纸质发票开票时间");
return;
}
else
{
_invoice.UpdateTime = dpUpdateTime.SelectedDate.Value;
}
}
decimal c1;
decimal b1;
decimal d1;
if (decimal.TryParse(ContractPrice1, out c1))
{
_invoice.ContractPrice = c1;
}
//else
//{
// Alert.Show("折扣金额请填写数字!");
// return;
//}
if (decimal.TryParse(BlancePrice1, out b1))
{
_invoice.BlancePrice = b1;
}
if (decimal.TryParse(DiscountPrice1, out d1))
{
_invoice.DiscountPrice = d1;
}
//else
//{
// Alert.Show("调整请填写数字!");
// return;
//}
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>();
if (this.txtQty.ReadOnly == false)
{
for (int i = 0, count = Grid1.Rows.Count; i < count; i++)
{
object[] rowDataKeys = Grid1.DataKeys[i];
GridRow row = Grid1.Rows[i];
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL();
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]);
_entity.InvcBillNum = rowDataKeys[1] as string;
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]);
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]);
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[4]);
var txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty");
var txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice");
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo");
//var txtContractPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtContractPrice");
//var txtBlancePrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBlancePrice");
decimal QtyNew = 0;
try
{
if (txtQty.Text.Trim() != "")
{
QtyNew = Convert.ToDecimal(txtQty.Text.Trim());
}
}
catch
{
Alert.Show("开票数量输入不正确");
return;
}
if (QtyNew > _entity.CanQty + _entity.Qty)
{
Alert.Show("开票数量不能大于可用开数票");
return;
}
decimal PriceNew = 0;
try
{
if (txtPrice.Text.Trim() != "")
{
PriceNew = Convert.ToDecimal(txtPrice.Text.Trim());
}
}
catch
{
Alert.Show("单价输入不正确");
return;
}
_entity.Remark = txtLineMemo.Text;
_entity.Price = PriceNew;
_entity.Qty = QtyNew;
_ls.Add(_entity);
}
}
// SCPDB.Database.SqlQuery<V_TB_INVOICE>("select * from V_TB_INVOICE WHERE STATE==0 AND ").ToArray
if (_ls.Count > 0)
{
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice, _ls);
if (ret.State == ReturnStatus.Succeed)
{
Alert.Show("发票明细修改成功!");
BindData();
}
}
else
{
Alert.Show("更改记录数为零");
}
}
private void SET_INVOICE_STATE(string p_msg, InvoiceState p_state)
{
if (Session["Invoice"] != null)
{
var _Invoice = Session["Invoice"] as V_TB_INVOICE;
string InvoiceNumber = MyWebString.GetString(this.txtInvoiceNumber.Text.Trim());//金税票号
string ExpressNumber = MyWebString.GetString(this.txtExpressNumber.Text.Trim());//快递单号
string ContractPrice1 = MyWebString.GetString(this.txtContractPrice1.Text.Trim());//合同价格
string BlancePrice1 = MyWebString.GetString(this.txtBlancePrice1.Text.Trim());//合同差额
string DiscountPrice1 = MyWebString.GetString(this.txtDiscountPrice.Text.Trim());
_Invoice.InvoiceNum = InvoiceNumber;
_Invoice.ExpressNum = ExpressNumber;
_Invoice.UpdateTime = dpUpdateTime.SelectedDate;
if (string.IsNullOrEmpty(ContractPrice1))
{
_Invoice.ContractPrice = 0;
}
if (string.IsNullOrEmpty(BlancePrice1))
{
_Invoice.BlancePrice = 0;
}
decimal c1;
decimal b1;
decimal d1;
if (decimal.TryParse(ContractPrice1, out c1))
{
_Invoice.ContractPrice = c1;
}
else
{
_Invoice.ContractPrice = 0;
}
if (decimal.TryParse(BlancePrice1, out b1))
{
_Invoice.BlancePrice = b1;
}
else
{
_Invoice.BlancePrice = 0;
}
if (decimal.TryParse(DiscountPrice1, out d1))
{
_Invoice.DiscountPrice = d1;
}
else
{
_Invoice.DiscountPrice = 0;
}
if (p_state == InvoiceState.Mail)
{
if (string.IsNullOrEmpty(InvoiceNumber))
{
Alert.Show("请填写金税票号!");
return;
}
if (string.IsNullOrEmpty(ExpressNumber))
{
Alert.Show("请填写快递单号!");
return;
}
if (dpUpdateTime.SelectedDate == null)
{
Alert.Show("发票时间必须填写,时间为纸质发票开票时间");
return;
}
}
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice, p_state, CurrentUser.ChineseName);
if (ret.State == ReturnStatus.Succeed)
{
Alert.Show(p_msg);
BindData();
GetInvoice();
}
else
{
Alert.Show(ret.Message);
}
}
}
protected void btnApply_Click(object sender, EventArgs e)
{
SET_INVOICE_STATE("发票申请成功!", InvoiceState.Mail);
}
protected void btnMail_Click(object sender, EventArgs e)
{
SET_INVOICE_STATE("发票已经寄出!", InvoiceState.Mail);
}
protected void btnReject_Click(object sender, EventArgs e)
{
SET_INVOICE_STATE("发票已经作废!", InvoiceState.Reject);
}
protected void Window1_OnClose(object sender, WindowCloseEventArgs e)
{
//string id = GetQueryValue("ID");
//TB_INVOICE model = InvoiceController.GetDataByBillInvoiceBillNum(id);
//InvoiceController.UpdateDataRemark(e.CloseArgument, model);
}
protected void btnRed_Click(object sender, EventArgs e)
{
string id = GetQueryValue("ID");
V_TB_INVOICE _tb = new V_TB_INVOICE();
_tb.InvcBillNum = id;
var ret = SCP_INVOICE_CONTROLLER.Add_New_Red_Invoice(_tb);
if (ret.State == ReturnStatus.Succeed)
{
BindData();
GetInvoice();
}
}
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
System.Web.UI.WebControls.TextBox _label = (System.Web.UI.WebControls.TextBox)Grid1.Rows[e.RowIndex].FindControl("txtQty");
if (!string.IsNullOrEmpty(_label.Text))
{
if (decimal.Parse(_label.Text) < 0)
{
_label.ForeColor = Color.Red;
}
}
}
}
}

359
SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.designer.cs

@ -0,0 +1,359 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.PlanData
{
public partial class SCP_INVOICE_EDIT
{
/// <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>
/// ToolbarSeparator3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator3;
/// <summary>
/// btnOK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOK;
/// <summary>
/// btnApply 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnApply;
/// <summary>
/// btnMail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnMail;
/// <summary>
/// btnReject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnReject;
/// <summary>
/// btnRed 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnRed;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// txtBillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBillNo;
/// <summary>
/// txtState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtState;
/// <summary>
/// txtBillTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBillTime;
/// <summary>
/// txtSupplierName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtSupplierName;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Label Label3;
/// <summary>
/// FormRow_2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_2;
/// <summary>
/// txtAmount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtAmount;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Label Label1;
/// <summary>
/// txtTax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList txtTax;
/// <summary>
/// txtTaxAmount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtTaxAmount;
/// <summary>
/// txtTotal 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtTotal;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// txtContractPrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtContractPrice1;
/// <summary>
/// txtDiscountPrice 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtDiscountPrice;
/// <summary>
/// txtBlancePrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtBlancePrice1;
/// <summary>
/// txtInvoiceNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtInvoiceNumber;
/// <summary>
/// FormRow_4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_4;
/// <summary>
/// txtExpressNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtExpressNumber;
/// <summary>
/// dpUpdateTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker dpUpdateTime;
/// <summary>
/// txtMemo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtMemo;
/// <summary>
/// l1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Label l1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid1;
/// <summary>
/// txtPrice 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPrice;
/// <summary>
/// txtQty 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtQty;
/// <summary>
/// txtLineMemo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtLineMemo;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
/// <summary>
/// WindowUpload 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window WindowUpload;
}
}

6
SCP/Views/PlanData/SCP_PO.aspx

@ -48,7 +48,11 @@
</f:RadioButtonList>
<f:ToolbarSeparator runat="server" />
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Width="200" ButtonIcon="Add" ShowRedStar="true" > </f:FileUpload>
<f:Button ID="btnInput" runat="server" Text="导入" Icon="PageExcel" OnClick="btnInput_Click" >
<f:Button ID="btnInput_Contract" runat="server" Text="日程单导入" Hidden="true" Icon="PageExcel" OnClick="btnInput_Click_Contract" >
</f:Button>
<f:Button ID="btnInput_Non_Contract" runat="server" Text="离散单导入" Hidden="true" Icon="PageExcel" OnClick="btnInput_Click_Non_Contract" >
</f:Button>
<f:Button ID="btnInput" runat="server" Text="导入" Icon="PageExcel" OnClick="btnInput_Click" Hidden="true" >
</f:Button>
</Items>
</f:Toolbar>

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

@ -9,6 +9,7 @@ using CK.SCP.Utils;
using CK.SCP.Controller;
using FineUI;
using System.IO;
using CK.SCP.Models;
using System.Data;
using CK.SCP.Models.ScpEntity.ExcelImportEntity;
using CK.SCP.Models.Enums;
@ -202,6 +203,64 @@ namespace SCP.PlanData
}
}
protected void btnInput_Click_Contract(object sender, EventArgs e)
{
Excel_Input(BillModType.Contract);
}
protected void btnInput_Click_Non_Contract(object sender, EventArgs e)
{
Excel_Input(BillModType.Non_Contract);
}
protected void Excel_Input(BillModType p_modtype)
{
ResultObject<bool> saveret = new ResultObject<bool>();
string _fileName = FileUp.FileName;
if (string.IsNullOrEmpty(_fileName))
{
Alert.Show("选择文件为空!");
return;
}
string _lx = _fileName.Split('.')[1];
Stream _stream = FileUp.PostedFile.InputStream;
DataTable _dt = new DataTable();
if (_lx == "xls")
{
_dt = ExcelHelper.GetDataTable(_stream);
}
else
{
_dt = ExcelHelper.GetDataTableOfXlsx(_stream);
}
var list = ConvertHelper.ToList<SCP_PO_EXPORT_IMPORT_MODEL>(ExcelHelper.RemoveEmpty(_dt)).ToList();
var checkret = SCP_PO_CONTROLLER.Check_EXCEL_PO_MOD(list, p_modtype, CurrentUser.FactoryList[0], CurrentUser.SubSiteList[0]);
if (checkret.State == ReturnStatus.Failed && checkret.Result == false)
{
Alert.Show(string.Join("<br>", checkret.MessageList));
return;
}
if (ScpCache.Config.)
{
saveret = SCP_DC_UNI_CONTROLLER.WritePo(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, p_modtype, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone);
}
else
{
saveret = SCP_PO_CONTROLLER.Save_EXCEL_PO_MOD(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, p_modtype, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone);
}
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true)
{
BindOrder();
Alert.Show("订单编号" + saveret.Message + "导入成功!");
return;
}
else
{
//Alert.Show(string.Join("<br>", saveret.MessageList));
Alert.Show(saveret.Message);
return;
}
}
protected void BTN_CREATE_Click(object sender, EventArgs e)
{
if (Grid_V_TB_PO.SelectedRowIndexArray.Count() == 0)

18
SCP/Views/PlanData/SCP_PO.aspx.designer.cs

@ -122,6 +122,24 @@ namespace SCP.PlanData
/// </remarks>
protected global::FineUI.FileUpload FileUp;
/// <summary>
/// btnInput_Contract 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnInput_Contract;
/// <summary>
/// btnInput_Non_Contract 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnInput_Non_Contract;
/// <summary>
/// btnInput 控件。
/// </summary>

6
SCP/Views/PlanData/SCP_PO_ASK.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="" AutoScroll="True" Layout="VBox">
<Items>
<f:Form runat="server">
<Toolbars>
@ -82,10 +82,10 @@
</Items>
</f:GroupPanel>
<f:Grid ID = "Grid_V_TB_PO" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" 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" ShowBorder = "true" ShowHeader = "true" runat ="server" 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"
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" >
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" BoxFlex="1" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>

10
SCP/Views/PlanData/SCP_PO_CREATE_ASK.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="" AutoScroll="True" Layout="VBox">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
@ -50,7 +50,7 @@
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="要货日期" EmptyText="请选择日期" ID="DP_BeginTime" />
@ -60,7 +60,7 @@
<%-- <f:DropDownList ID="DDL_PORT" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server" Label="收货口">
</f:DropDownList>--%>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="">
<f:TextBox ID="TXT_Remark" runat="server" Label="备注" Text="">
</f:TextBox>
</Items>
@ -93,7 +93,7 @@
<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" 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"
AllowSorting="true"
@ -101,7 +101,7 @@
AllowCellEditing="true" ClicksToEdit="2"
IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
OnRowDataBound="Grid_V_TB_PO_DETAIL_RowDataBound"
>
BoxFlex="1">
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>

27
SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs

@ -72,9 +72,8 @@ namespace SCP.PlanData
this.TXT_Site.Text = _result.Site_Desc;
this.TXT_State_DESC.Text = _result.State_DESC;
this.TXT_VendName.Text = _result.VendName;
this.txtRemark.Text = _result.Remark;
this.TXT_Remark.Text = _result.Extend1;
this.TXT_SubSite.Text = _result.SubSite;
this.TXT_Extend1.Text = _result.Extend1;
this.TXT_Extend2.Text = _result.Extend2;
this.TXT_Extend3.Text = _result.Extend3;
@ -157,7 +156,7 @@ namespace SCP.PlanData
{
var qadOrder = Session["order"] as V_TB_PO;
qadOrder.SubSite =TXT_SubSite.Text;
qadOrder.Extend1 = TXT_Extend1.Text;
qadOrder.Extend1 = TXT_Remark.Text;
qadOrder.Extend2 = TXT_Extend2.Text;
qadOrder.Extend3 = TXT_Extend3.Text;
//qadOrder.ReceivedPort = DDL_PORT.SelectedValue;
@ -215,6 +214,7 @@ namespace SCP.PlanData
_entity.BuyerPhone = rowDataKeys[32] as string;
_entity.VendName = rowDataKeys[33] as string;
_entity.PartDesc2 = rowDataKeys[34] as string;
_entity.SubSite = rowDataKeys[38] as string;
_entity.TempQty = ConvertHelper.To<Decimal>(rowDataKeys[35]);
_entity.BeginTime = DP_BeginTime.SelectedDate;
@ -230,27 +230,6 @@ namespace SCP.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"))
{
var _publishQty = modifyValue["PublishQty"];

4
SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs

@ -159,13 +159,13 @@ namespace SCP.PlanData
protected global::FineUI.TextBox TXT_Site;
/// <summary>
/// txtRemark 控件。
/// TXT_Remark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtRemark;
protected global::FineUI.TextBox TXT_Remark;
/// <summary>
/// gp1 控件。

66
SCP/Views/PlanData/SCP_PO_EXTEND.aspx

@ -37,7 +37,7 @@
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True" Layout="Column">
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True" Layout="VBox" >
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
@ -63,31 +63,30 @@
<f:RadioItem Text="日程单" Value="1" />
<f:RadioItem Text="离散单" Value="2"/>
</f:RadioButtonList>
<f:ToolbarSeparator runat="server" />
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Width="200" ButtonIcon="Add" ShowRedStar="true" > </f:FileUpload>
<f:Button ID="btnInput_Contract" runat="server" Text="日程单导入" Icon="PageExcel" OnClick="btnInput_Click_Contract" >
</f:Button>
<f:Button ID="btnInput_Non_Contract" runat="server" Text="离散单导入" Icon="PageExcel" OnClick="btnInput_Click_Non_Contract" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" ColumnWidth="100%" ID="gp1" Hidden="true">
<f:Form runat="server" Margin="5" ID="gp1" Hidden="true" BodyPadding ="5">
<Rows>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<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" />--%>
<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_Vendid" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<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="至" EmptyText="请选择日期" ID="DP_EndDate" />
<f:TextBox runat="server" Required ="true" Label="零件编号" EmptyText="查询请填写零件编号" ID="TXT_PartCode" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" />
<f:DropDownList runat="server" ID="DDL_State" Label="状态">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="关闭" Value="0" />
@ -95,21 +94,40 @@
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找订单">
<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="至" EmptyText="请选择日期" ID="DP_EndDate" />
<f:TextBox runat="server" Required ="true" Label="零件编号" EmptyText="查询请填写零件编号" ID="TXT_PartCode" />
</Items>
</f:FormRow>
<f:FormRow runat="server" >
<Items>
<f:Panel ID="Panel5" runat="server" ShowBorder="false" CssClass="mypanel" ShowHeader="false">
<Items>
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click" Margin="5" ></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找订单" Margin="5" >
</f:Button>
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细">
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细" Margin="5" >
</f:Button>
</Items>
</f:Panel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID = "Grid_V_TB_PO" ColumnWidth="45%" PageSize="50" 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:Panel ID="Panel2"
runat="server" BodyPadding="0px" ShowBorder="true" BoxFlex="1" ShowHeader="false" Layout="HBox" AutoScroll="True">
<Items>
<f:Panel ID="Panel3"
runat="server" BodyPadding="0px" ShowBorder="true" ShowHeader="false" BoxFlex="1" Layout="VBox" AutoScroll="True" >
<Items>
<f:Grid ID = "Grid_V_TB_PO" ColumnWidth="45%" PageSize="50" 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"
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_PO_Sort" SortField="BeginTime"
IsDatabasePaging="True" AllowPaging="True" OnRowSelect="Grid_V_TB_PO_RowSelect" EnableRowSelectEvent="true"
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" >
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" BoxFlex="1" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
@ -138,12 +156,17 @@
<%--<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" />--%>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Panel ID="Panel4"
runat="server" BodyPadding="0px" ShowBorder="true" ShowHeader="false" Layout="VBox" BoxFlex="1" >
<Items>
<f:Grid ID = "Grid_V_TB_PO_DETAIL" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server"
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"
AllowPaging="True"
ColumnWidth="55%" SortDirection="DESC"
IsDatabasePaging="true" PageSize="500" >
PageSize="500" BoxFlex="1" >
<Columns>
<f:BoundField Width = "80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "40px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
@ -159,7 +182,12 @@
</Columns>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="950px" AutoScroll="True" OnClose="Window1_Close"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true"

85
SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs

@ -13,7 +13,9 @@ using System.Data;
using CK.SCP.Models.ScpEntity.ExcelImportEntity;
using CK.SCP.Models.Enums;
using CK.SCP.Common;
using CK.SCP.Models;
using System.Text;
using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
namespace SCP.PlanData
{
@ -76,9 +78,6 @@ namespace SCP.PlanData
}
_entity.ErpBillNum = TXT_ProjectId.Text;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.Extend1 = TxT_Extend1.Text;
_entity.Extend2 = TxT_Extend2.Text;
_entity.Extend3 = TxT_Extend3.Text;
_entity.IsDeleted = false;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
@ -111,13 +110,33 @@ namespace SCP.PlanData
protected void btnOutput_Click(object sender, EventArgs e)
{
int[] _selections = Grid_V_TB_PO.SelectedRowIndexArray;
if (_selections.Count() == 0)
{
Alert.Show("请选择订单记录导出!");
}
List<string> _ls = new List<string>();
for (int i = 0, count = Grid_V_TB_PO.Rows.Count; i < count; i++)
{
if (_selections.Contains(i))
{
object[] rowDataKeys = Grid_V_TB_PO.DataKeys[i];
_ls.Add(rowDataKeys[1] as string);
}
DataSet ds=SCP_EXCEL_CONTROLLER.GET_PO_EXECEL(_ls);
}
if (_ls.Count == 0)
{
Alert.Show("请选择记录导出!");
return;
}
//List<string> _ls = new List<string>();
//for (int i = 0, count = Grid_V_TB_PO.Rows.Count; i < count; i++)
//{
// object[] rowDataKeys = Grid_V_TB_PO.DataKeys[i];
// _ls.Add(rowDataKeys[1] as string);
//}
DataSet ds =SCP_EXCEL_CONTROLLER.GET_PO_EXECEL(_ls);
PageBase.DataSetToExcel(ds, "采购订单");
}
@ -226,5 +245,63 @@ namespace SCP.PlanData
});
}
protected void btnInput_Click_Contract(object sender, EventArgs e)
{
Excel_Input(BillModType.Contract);
}
protected void btnInput_Click_Non_Contract(object sender, EventArgs e)
{
Excel_Input(BillModType.Non_Contract);
}
protected void Excel_Input(BillModType p_modtype)
{
ResultObject<bool> saveret = new ResultObject<bool>();
string _fileName = FileUp.FileName;
if (string.IsNullOrEmpty(_fileName))
{
Alert.Show("选择文件为空!");
return;
}
string _lx = _fileName.Split('.')[1];
Stream _stream = FileUp.PostedFile.InputStream;
DataTable _dt = new DataTable();
if (_lx == "xls")
{
_dt = ExcelHelper.GetDataTable(_stream);
}
else
{
_dt = ExcelHelper.GetDataTableOfXlsx(_stream);
}
var list = ConvertHelper.ToList<SCP_PO_EXPORT_IMPORT_MODEL>(ExcelHelper.RemoveEmpty(_dt)).ToList();
var checkret = SCP_PO_CONTROLLER.Check_EXCEL_PO_MOD(list, p_modtype, CurrentUser.FactoryList[0], CurrentUser.SubSiteList[0]);
if (checkret.State == ReturnStatus.Failed && checkret.Result == false)
{
Alert.Show(string.Join("<br>", checkret.MessageList));
return;
}
if (ScpCache.Config.)
{
saveret = SCP_DC_UNI_CONTROLLER.WritePo(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, p_modtype, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone);
}
else
{
saveret = SCP_PO_CONTROLLER.Save_EXCEL_PO_MOD(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, p_modtype, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone);
}
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true)
{
BindOrder();
Alert.Show("订单编号" + saveret.Message + "导入成功!");
return;
}
else
{
//Alert.Show(string.Join("<br>", saveret.MessageList));
Alert.Show(saveret.Message);
return;
}
}
}
}

64
SCP/Views/PlanData/SCP_PO_EXTEND.aspx.designer.cs

@ -114,58 +114,58 @@ namespace SCP.PlanData
protected global::FineUI.RadioButtonList rblist;
/// <summary>
/// gp1 控件。
/// FileUp 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Form gp1;
protected global::FineUI.FileUpload FileUp;
/// <summary>
/// TXT_BillNo 控件。
/// btnInput_Contract 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_BillNo;
protected global::FineUI.Button btnInput_Contract;
/// <summary>
/// DropDownList1 控件。
/// btnInput_Non_Contract 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DropDownList1;
protected global::FineUI.Button btnInput_Non_Contract;
/// <summary>
/// TxT_Extend1 控件。
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TxT_Extend1;
protected global::FineUI.Form gp1;
/// <summary>
/// TxT_Extend2 控件。
/// TXT_BillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TxT_Extend2;
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// TxT_Extend3 控件。
/// DropDownList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TxT_Extend3;
protected global::FineUI.DropDownList DropDownList1;
/// <summary>
/// TXT_Vendid 控件。
@ -194,6 +194,15 @@ namespace SCP.PlanData
/// </remarks>
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// DP_StartDate 控件。
/// </summary>
@ -222,13 +231,13 @@ namespace SCP.PlanData
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// DDL_State 控件。
/// Panel5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
protected global::FineUI.Panel Panel5;
/// <summary>
/// BtnClose 控件。
@ -257,6 +266,24 @@ namespace SCP.PlanData
/// </remarks>
protected global::FineUI.Button BtnSearchDetail;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel2;
/// <summary>
/// Panel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel3;
/// <summary>
/// Grid_V_TB_PO 控件。
/// </summary>
@ -293,6 +320,15 @@ namespace SCP.PlanData
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// Panel4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel4;
/// <summary>
/// Grid_V_TB_PO_DETAIL 控件。
/// </summary>

5
SCP/Views/PlanData/SCP_PO_PLAN.aspx

@ -20,8 +20,9 @@
</f:Button>
<f:Button ID="btnExecl" runat="server" Text="横向导出" Icon="PageExcel" OnClick="btnExecl_Click" >
</f:Button>
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" ></f:DropDownList>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="交货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" LabelWidth="50px" ></f:DropDownList>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="交货日期" EmptyText="请选择日期" ID="DP_StartDate" LabelWidth="60px" />
<f:TextBox runat = "server" Label = "版本号" EmptyText = "请输入版本号" ID = "TXT_VersionNo" LabelWidth="50px" />
<f:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="快速查找" Icon="Find">
</f:Button>
<f:Button ID="btnMake" runat="server" OnClick="btnMake_Click" Text="生成看板" Icon="Add">

1
SCP/Views/PlanData/SCP_PO_PLAN.aspx.cs

@ -48,6 +48,7 @@ namespace SCP.Views.PlanData
V_TB_PO_PLAN _entity = new V_TB_PO_PLAN();
_entity.PoBillNum= ddl_Vender.SelectedValue;
_entity.EndTime = DP_StartDate.SelectedDate;
_entity.Version = TXT_VersionNo.Text;
if (CurrentUser.RoleList.Contains("供应商"))
{
if (CurrentUser.RoleList.Contains("计划人员") || CurrentUser.RoleList.Contains("采购人员") || CurrentUser.Name=="admin")

15
SCP/Views/PlanData/SCP_PO_PLAN.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.PlanData {
namespace SCP.Views.PlanData
{
public partial class SCP_PO_PLAN {
public partial class SCP_PO_PLAN
{
/// <summary>
/// form1 控件。
@ -75,6 +77,15 @@ namespace SCP.Views.PlanData {
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// TXT_VersionNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VersionNo;
/// <summary>
/// btnSearch 控件。
/// </summary>

2
SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx

@ -50,7 +50,7 @@
</Items>
</f:GroupPanel>
<f:Grid ID = "Grid_V_TB_PO" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true" EnableTextSelection="true"
<f:Grid ID = "Grid_V_TB_PO" 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" BoxFlex="1"

246
SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx

@ -0,0 +1,246 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.Views.PlanData.SCP_RECEIVE_LIST" %><%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<%@ Import Namespace="CK.SCP.Utils" %>
<%@ Import Namespace="CK.SCP.Models.Enums" %>
<!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>
<style>
.totalpanel .x-panel-body {
border-top-width: 0 !important;
}
</style>
</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="btnCreate" runat="server" EnablePostBack="True" Text="生成发票" OnClick="btnCreate_OnClick" Icon="Add" Hidden="true">
</f:Button>
<f:Button ID="btnCreateAll" runat="server" EnablePostBack="True" Text="生成发票" Icon="Add" OnClick="btnCreateAll_Click" OnClientClick="if(!confirm('生成发票时请先处理退货数量,如发现收票时还有退货数量未处理,造成不能收票自行负责!'))return false;">
</f:Button>
<f:Button ID="btn" runat="server" EnablePostBack="True" Text="补开发票" Icon="Add" Hidden="true">
</f:Button>
<f:Button ID="Button2" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick">
</f:Button>
<f:Button ID="btnCanIn" runat="server" EnablePostBack="True" Text="只看可开票零件" Icon="Zoom" OnClick="btnCanIn_Click" Hidden="true">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="查询面板" Icon="Zoom" OnClick="btnShow_Click">
</f:Button>
<f:ToolbarFill runat="server" Hidden="true"/>
<f:TextBox ID="tb_RecvBillNum" runat="server" Label="单据号" Hidden="true"/>
<f:Button ID="btn_Search" runat="server" EnablePostBack="True" Text="快速查找" OnClick="btnSearch_Click" Hidden="true"></f:Button>
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/>
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认" OnClick="BTN_INV_Click" Hidden="true" Icon="Accept" ></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" >
<Items>
<f:Form runat="server" >
<Rows>
<f:FormRow runat="server" ID="FormRow_1">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_ASNBill" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_2">
<Items>
<f:TextBox runat = "server" Label = "项目编号" EmptyText = "" ID = "TXT_ProjectId" />
<f:TextBox runat = "server" Label = "零件编号" EmptyText = "" ID = "TXT_PartCode" />
<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" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_3">
<Items>
<f:TextBox runat = "server" Label = "ERP收(退)货单号" EmptyText = "" ID = "TXT_ERPBillNo" />
<f:TextBox runat = "server" Label = "WMS收(退)货单号" EmptyText = "" ID = "TXT_RECEIVE" />
<f:DropDownList runat="server" ID="DDL_State" Label="单据类型" Text="单据类型">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="退货单" Value="退货单" />
<f:ListItem Text="收货单" Value="收货单" />
</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>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow1">
<Items>
<f:NumberBox ID="txtContractPrice1" runat="server" Label="折扣金额" Hidden="true" />
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" Hidden="true" />
<f:Label runat="server"></f:Label>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow2">
<Items>
<f:DropDownList runat="server" Label="供应商税率" ID="lbTaxRate" AutoPostBack="true" >
<f:ListItem Text="0.16" Value="0.16" />
<f:ListItem Text="0.13" Value="0.13" />
<f:ListItem Text="0" Value="0" />
</f:DropDownList>
<f:Button ID="btnTax" runat="server" Text="使用税率" OnClientClick="updateTotal();" Icon="Accept" ></f:Button>
<f:Label runat="server"></f:Label>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid id="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="200" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine,Qty,Price" IsDatabasePaging="true" AllowPaging="True" SortField="BillType;PartCode" OnSort="Grid1_Sort" AllowSorting="true"
AutoScroll="True" OnPageIndexChange="Grid_V_TB_RECEIVE_LIST_PageIndexChange" EnableCheckBoxSelect = "true" OnRowDataBound="Grid_V_TB_RECEIVE_LIST_RowDataBound" >
<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_OnSelectedIndexChanged" runat="server">
<f:ListItem Text="200" Value="200" />
<f:ListItem Text="500" Value="500" />
<f:ListItem Text="1000" Value="1000" />
<f:ListItem Text="5000" Value="5000" />
</f:DropDownList>
</PageItems>
<Columns>
<%-- <f:RowNumberField runat="server" ID="chb" HeaderText="行号" />--%>
<%-- <f:TemplateField HeaderText="否可开票" Width="120px" ColumnID="IsCheck">
<ItemTemplate>
<asp:Label runat="server" DataField="Qty" ID="Label1" Text='<%# Eval("IsCheck") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:BoundField runat="server" HeaderText="项目编码" SortField="ProjectId" DataField="ProjectId" width="80"/>
<f:BoundField runat="server" HeaderText="单据类型" SortField="BillType_DESC" ColumnID="BillType_DESC" DataField="BillType_DESC" width="80"/>
<f:BoundField runat="server" HeaderText="ERP单据号" SortField="ErpRecvBillNum" ColumnID="ErpRecvBillNum" DataField="ErpRecvBillNum" width="80" />
<f:BoundField runat="server" HeaderText="WMS单据号" SortField="RecvBillNum" ColumnID="RecvBillNum" DataField="RecvBillNum" width="80" />
<f:BoundField runat="server" HeaderText="发货单号" SortField="AsnBillNum" ColumnID="AsnBillNum" DataField="AsnBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="供应商" SortField="VendName" ColumnID="VendName" DataField="VendName" />
<f:BoundField runat="server" HeaderText="供应商编码" SortField="VendId" DataField="VendId" width="80"/>
<f:BoundField runat="server" HeaderText="订单号" SortField="PoBillNum" ColumnID="PoBillNum" DataField="PoBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="订单行" SortField="PoLine" ColumnID="PoLine" DataField="PoLine" width="50" />
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" width="80"/>
<f:BoundField runat="server" HeaderText="采购价格" ColumnID="" DataField="PurPrice" width="80"/>
<f:TemplateField HeaderText="可开票数量" ColumnID="Qty" width="100">
<ItemTemplate>
<input type="hidden" class="price" runat="server" value='<%# Eval("Price") %>' />
<input type="hidden" class="number" runat="server" value='<%# Eval("CanQty") %>' />
<asp:Label runat="server" DataField="Qty" ID="Qty1" Text='<%# Eval("CanQty") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField runat="server" HeaderText="零件号" SortField="PartCode" ColumnID="PartCode" DataField="PartCode" width="80"/>
<f:BoundField runat="server" HeaderText="零件名称" SortField="PartDesc1" ColumnID="PartDesc1" DataField="PartDesc1" />
<f:BoundField runat="server" HeaderText="单位" SortField="LocUnit" ColumnID="LocUnit" DataField="LocUnit" width="50"/>
<f:BoundField runat="server" HeaderText="币种" SortField="Currency" ColumnID="Currency" DataField="Currency" width="50"/>
<f:BoundField runat="server" HeaderText="Erp收货单税率" SortField="Tax" ColumnID="Tax" DataField="Tax" width="50" Hidden="true"/>
<f:BoundField runat="server" HeaderText="要货日期" SortField="BeginTime" ColumnID="BeginTime" DataField="BeginTime" Hidden="true"/>
<f:BoundField runat="server" HeaderText="收货时间" SortField="ShipTime" ColumnID="ShipTime" DataField="ShipTime" DataFormatString="{0:yyyy-MM-dd}" />
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" />
</Columns>
</f:Grid>
<f:ContentPanel runat="server" CssClass="totalpanel" ShowBorder="true" ShowHeader="false" ColumnWidth="50%">
<div style="margin-bottom: 10px; ">
<input type="hidden" id="TOTAL_PRICE" name="TOTAL_PRICE" />
总计:<span id="totalPrice" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
<input type="hidden" id="TOTAL_PRICE1" name="TOTAL_PRICE1" />
<input type="hidden" id="TOTAL_PRICE_TAX" name="TOTAL_PRICE_TAX" />
税额:<span id="totalPriceTax" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
税后金额:<span id="totalPrice1" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
</div>
<%--<div style="margin-bottom: 10px;">
</div>
<div style="margin-bottom: 10px;">
</div>--%>
</f:ContentPanel>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
<script src="../../res/js/jquery.min.js"></script>
<script type="text/javascript">
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>';
var taxRateClientID = '<%= lbTaxRate.ClientID %>';
var priceSelector = '.f-grid-tpl input.price';
var numberSelector = '.f-grid-tpl input.number';
function getRowPrice(row) {
return parseFloat(row.find(priceSelector).val());
}
function getRowNumber(row) {
var num = parseFloat(row.find(numberSelector).val(), 10);
return num;
}
function updateTotal() {
var grid = F(gridClientID);
var tax = F(taxRateClientID);
var selection = grid.getSelectionModel().getSelection();
var store = grid.getStore();
var total = 0;
$.each(selection, function (index, item) {
var rowIndex = store.indexOf(item);
var row = $(grid.body.el.dom).find('.x-grid-item').eq(rowIndex);
total += getRowNumber(row) * getRowPrice(row);
});
$('#totalPrice').text( total.toFixed(4));
$('#TOTAL_PRICE').val(total.toFixed(4));
var _tax = total.toFixed(4) * parseFloat(tax.value);
var _totalPrice1 =parseFloat(total) + parseFloat(_tax);
$('#totalPriceTax').text( _tax.toFixed(4));
$('#TOTAL_PRICE_TAX').val(_tax.toFixed(4));
$('#totalPrice1').text( _totalPrice1.toFixed(4));
$('#TOTAL_PRICE1').val(_totalPrice1);
}
function registerSelectionChangeEvents() {
var grid = F(gridClientID);
grid.on('selectionchange', function (cmp, selected) {
updateTotal();
});
}
// 页面第一次加载完成后调用的函数
F.ready(function () {
registerSelectionChangeEvents();
updateTotal();
});
</script>
</body>
</html>

529
SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.cs

@ -0,0 +1,529 @@
using System;
using System.Collections.Generic;
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.AppBoxEntity;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Controller;
using FineUI;
using SCP.Code;
using System.Drawing;
using CK.SCP.Models.Enums;
using CK.SCP.Models;
namespace SCP.Views.PlanData
{
public partial class SCP_RECEIVE_LIST : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
IsRoleRight();
if (!IsPostBack)
{
TranslatorAgents(Toolbar2);
TranslatorAgent(Grid_V_TB_RECEIVE_LIST);
TranslatorAgents(FormRow_1);
TranslatorAgents(FormRow_2);
TranslatorAgents(FormRow_3);
LoadData();
SetRoleRule();
BindVenderByUser(DDL_VEND_LIST);
}
}
public void IsRoleRight()
{
//if (!CurrentUser.RoleList.Contains("供应商"))
//{
// Alert.Show("当前用户角色不能操作该模块!");
// return;
//}
//else
//{
//}
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
//{
// Alert.Show("当前用户未选择地点!");
// return;
//}
}
private void SetRoleRule()
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
DDL_VEND_LIST.Hidden = false;
BTN_INV.Hidden = false;
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
var _site = CurrentUser.FactoryList.FirstOrDefault();
if (_site == "CNS")
{
txtContractPrice1.Enabled = false;
}
}
}
}
public void LoadData()
{
// 每页记录数
Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize;
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
BindData();
}
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.PoBillNum = TXT_BillNo.Text;
_ls.VendName = TXT_VendName.Text;
_ls.AsnBillNum = TXT_ASNBill.Text;
_ls.PartCode = TXT_PartCode.Text;
_ls.VendId = TXT_VendId.Text;
_ls.ProjectId = TXT_ProjectId.Text;
_ls.ErpRecvBillNum = TXT_ERPBillNo.Text;
_ls.RecvBillNum = TXT_RECEIVE.Text;
if (DP_StartDate.SelectedDate != null)
{
_ls.BeginTime = DP_StartDate.SelectedDate;
}
if (Date_EndDate.SelectedDate != null)
{
_ls.ShipTime = Date_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_ls.BillType_DESC = DDL_State.SelectedValue;
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_ls.Site = CurrentUser.FactoryList[0];
}
_ls.State = 1;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
var _venderId = DDL_VEND_LIST.SelectedValue;
_ls.VendId = DDL_VEND_LIST.SelectedValue;
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax > 0 && _vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.SelectedValue = "0";
}
}
}
else
{
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
var _venderId = CurrentUser.VenderList.FirstOrDefault();
_ls.VendId = _venderId;
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax > 0 && _vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.SelectedValue = "0";
}
}
}
}
if (string.IsNullOrEmpty(_ls.VendId))
{
return;
}
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
p_action(ret.Result);
}
});
}
public void BindData()
{
SearchData(ret =>
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST, "DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
Grid_V_TB_RECEIVE_LIST.DataSource = temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
}
else
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST, "DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
Grid_V_TB_RECEIVE_LIST.DataSource = temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
}
});
// 排列和数据库分页
}
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e)
{
Grid_V_TB_RECEIVE_LIST.PageIndex = e.NewPageIndex;
BindData();
}
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_RECEIVE_LIST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindData();
}
//生成发票
protected void btnCreate_OnClick(object sender, EventArgs e)
{
CreateInvoice("0");
}
private void CreateInvoice(string p_all)
{
try
{
string vender = string.Empty;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
vender = DDL_VEND_LIST.SelectedValue;
}
else
{
vender = CurrentUser.VenderList[0];
}
TM_HYANTOLIN_REVIEW _entity = new TM_HYANTOLIN_REVIEW();
_entity.UltimateName = vender;
_entity.State = 0;
var _state = 0;
SCP_QUALITY_CONTROLLER.Get_TM_HYANTOLIN_REVIEW_List(_entity, (rs) =>
{
if (rs.State == ReturnStatus.Succeed)
{
var _ls = rs.Result.ToList();
if (_ls != null && _ls.Count > 0)
{
var _sum = _ls.Sum(p => p.ClaimAmount);
var _ary = _ls.Select(p => p.ReviewBillNum).ToList();
_state = 1;
if (_sum == 0)
{
_state = 0;
}
if (_sum > 0)
{
Alert.Show(string.Format("索赔金额合计{0}供应商存在未处理索赔单{1}!", _sum.ToString(), string.Join(",", _ary.ToArray())), "索赔管理查看");
}
}
}
});
if (_state == 1)
{
return;
}
var _tax = lbTaxRate.SelectedValue;
var _cj = string.IsNullOrEmpty(txtContractPrice1.Text) ? "0" : txtContractPrice1.Text;
var _tz = string.IsNullOrEmpty(txtBlancePrice1.Text) ? "0" : txtBlancePrice1.Text;
string IsCreate = "0";
if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0)
{
Alert.Show("请选择要创建发票的记录!");
return;
}
string IDS = "";
List<string> _list = new List<string>();
List<string> _projectList = new List<string>();
List<string> _rejList = new List<string>();
string _projectId = string.Empty;
List<string> _recList = new List<string>();
List<int> IdList = new List<int>();
decimal _total = 0;
for (int i = 0; i < Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length; i++)
{
int rowIndex = Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray[i];
int ID = Convert.ToInt32(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][0]);
decimal _qty = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][5].ToString());
decimal _price = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][6].ToString());
_total += (_qty * _price);
IDS += ID + ",";
_projectId = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][1].ToString();
_projectList.Add(_projectId);
var _recbill = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][2].ToString();
if (!string.IsNullOrEmpty(_recbill) && _recbill.IndexOf("R.") > 0)
{
_rejList.Add(_projectId);
}
IdList.Add(ID);
}
if (!ScpCache.Config.)
{
if (_total < 0)
{
Alert.Show("不允许开负数发票!退货、索赔零件数量有问题,请联系工厂库房和质量解决!");
return;
}
}
if (IdList.Count > 1000)
{
Alert.Show("选择发票条数" + IdList.Count + "超过1000条,发票允许条数!");
return;
}
if (_list.Distinct().Count() > 1)
{
Alert.Show("请选择的记录不是同一个供应商,请选择供应商!");
return;
}
if (IDS != "") IDS = IDS.Substring(0, IDS.Length - 1);
if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI" && CurrentUser.FactoryList.FirstOrDefault() != "JZ1")
{
var _ls = GetIsAllChecked(vender, IDS);
if (_ls.Count > 0)
{
Alert.Show(string.Format("退货或索赔单{0}未开票!", string.Join(",", _ls.ToArray())));
return;
}
}
InvoiceCreateQueryParm parm = new InvoiceCreateQueryParm();
parm.ReceiveID = IDS;
parm.VendId = vender;
parm.Modify = IsCreate;
parm.IsAll = p_all;
parm.Tax = _tax;
parm.CJ = _cj;
parm.TZ = _tz;
Session["InvoiceCreateQueryParm"] = parm;
string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx", "生成发票");
PageContext.RegisterStartupScript(ret);
}
catch (Exception ex)
{
Alert.Show(ex.Message);
}
}
private List<string> GetIsAllChecked(string p_VendId, string p_VendIds)
{
List<string> unSelected = new List<string>();
var _ls = SCPDB.V_TB_RECEIVE_LIST.Where(p => p.VendId == p_VendId && p.State == 1 && (p.BillType_DESC == "索赔单" || p.BillType_DESC == "退货单")).Select(p => new { p.UID, p.RecvBillNum }).ToList();
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ent, (ret) =>
//{
// if (ret.State == ReturnStatus.Succeed)
// {
var _lsCompare = p_VendIds.Split(new char[] { ',' });
// var _ls = ret.Result.Select(p => new { p.UID, p.RecvBillNum }).ToList();
foreach (var itm in _ls)
{
if (!_lsCompare.Contains(itm.UID.ToString()))
{
unSelected.Add(itm.RecvBillNum);
}
}
// }
//});
return unSelected.Distinct().ToList();
}
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e)
{
BindData();
}
//导出
protected void btnOutput_OnClick(object sender, EventArgs e)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.PoBillNum = TXT_BillNo.Text;
_ls.VendName = TXT_VendName.Text;
_ls.UserInVendIds = CurrentUser.VenderList;
_ls.AsnBillNum = TXT_ASNBill.Text;
_ls.PartCode = TXT_PartCode.Text;
_ls.VendId = TXT_VendId.Text;
_ls.ProjectId = TXT_ProjectId.Text;
_ls.RecvBillNum = TXT_RECEIVE.Text;
_ls.ErpRecvBillNum = TXT_ERPBillNo.Text;
if (DP_StartDate.SelectedDate != null)
{
_ls.BeginTime = DP_StartDate.SelectedDate;
}
if (Date_EndDate.SelectedDate != null)
{
_ls.ShipTime = Date_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_ls.BillType_DESC = DDL_State.SelectedValue;
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_ls.Site = CurrentUser.FactoryList[0];
}
_ls.State = 1;
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
var _venderId = CurrentUser.VenderList.FirstOrDefault();
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax > 0 && _vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.Text = "0";
}
}
}
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
var _lst = ret.Result.ToList();
Dictionary<string, string> cellheader = new Dictionary<string, string>
{
{ "ProjectId", "项目编号" },
{ "BillType_DESC", "单据类型" },
{ "ErpRecvBillNum", "ERP单据编号" },
{ "RecvBillNum", "WMS单据编号" },
{ "AsnBillNum", "发货单号" },
{ "VendName", "供应商" },
{ "VendId", "供应商编码" },
{ "PoBillNum", "订单号" },
{ "PoLine", "订单行" },
{ "PartCode", "零件号" },
{ "PartDesc1", "零件名称" },
{ "LocUnit", "单位" },
{ "Currency", "币种" },
{ "CanQty", "可开票数量" },
{ "Price", "单价" },
{ "ShipTime", "收货时间" }
};
string url = EntityListToExcel2003(cellheader, _lst, "审核明细");
}
});
}
//快速查找
protected void btnSearch_Click(object sender, EventArgs e)
{
}
protected void btnShow_Click(object sender, EventArgs e)
{
gp1.Hidden = false;
}
protected void BtnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindData();
}
protected void Grid_V_TB_RECEIVE_LIST_RowDataBound(object sender, GridRowEventArgs e)
{
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE_LIST.Rows[e.RowIndex].FindControl("Qty1");
if (!string.IsNullOrEmpty(_label.Text))
{
if (decimal.Parse(_label.Text) < 0)
{
_label.ForeColor = Color.Red;
}
}
}
protected void btnCanIn_Click(object sender, EventArgs e)
{
}
protected void BTN_INV_Click(object sender, EventArgs e)
{
BindData();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
Session["InvoiceCreateQueryParm"] = null;
BindData();
}
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
Grid_V_TB_RECEIVE_LIST.SortDirection = e.SortDirection;
Grid_V_TB_RECEIVE_LIST.SortField = e.SortField;
BindData();
}
protected void btnCreateAll_Click(object sender, EventArgs e)
{
CreateInvoice("1");
}
}
}

404
SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.designer.cs

@ -0,0 +1,404 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.PlanData
{
public partial class SCP_RECEIVE_LIST
{
/// <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>
/// btnCreate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreate;
/// <summary>
/// btnCreateAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreateAll;
/// <summary>
/// btn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btn;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button2;
/// <summary>
/// btnCanIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCanIn;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// tb_RecvBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox tb_RecvBillNum;
/// <summary>
/// btn_Search 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btn_Search;
/// <summary>
/// DDL_VEND_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_VEND_LIST;
/// <summary>
/// BTN_INV 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BTN_INV;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// TXT_BillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// TXT_ASNBill 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ASNBill;
/// <summary>
/// TXT_VendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
/// <summary>
/// TXT_VendId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendId;
/// <summary>
/// FormRow_2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_2;
/// <summary>
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// Date_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker Date_EndDate;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// TXT_ERPBillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ERPBillNo;
/// <summary>
/// TXT_RECEIVE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_RECEIVE;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// BtnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnClose;
/// <summary>
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// txtContractPrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtContractPrice1;
/// <summary>
/// txtBlancePrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtBlancePrice1;
/// <summary>
/// FormRow2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow2;
/// <summary>
/// lbTaxRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList lbTaxRate;
/// <summary>
/// btnTax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnTax;
/// <summary>
/// Grid_V_TB_RECEIVE_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_RECEIVE_LIST;
/// <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>
/// Qty1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Qty1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
}
}

88
SCP/Views/Quality/SCP_QUALITY_CREATE.aspx

@ -0,0 +1,88 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_QUALITY_CREATE.aspx.cs" Inherits="SCP.Views.Quality.SCP_QUALITY_CREATE" %>
<!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="btnRelease" runat="server" EnablePostBack="True" OnClick="btnRelease_Click" Text="生成不合格记录" Icon="CssAdd" OnClientClick="if(!confirm('是否要生成不合格单据?'))return false;">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="" Margin="5">
<Items>
<f:FormRow runat="server" ColumnWidths="100%">
<Items>
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_AsnBillNum" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></f:Button>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid_V_TB_ASN_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,PoBillNum,PoLine,PartCode,AsnBillNum,Batch,VendId"
IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True"
SortField="PartCode" SortDirection="DESC"
AllowCellEditing="true" ClicksToEdit="2"
OnPageIndexChange="Grid_V_TB_ASN_DETAIL_PageIndexChange">
<Columns>
<f:BoundField Width = "80px" DataField = "AsnBillNum" DataFormatString = "{0}" HeaderText = "发货单号" />
<f:BoundField Width = "80px" DataField = "PackQty" 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 = "100px" DataField = "Batch" DataFormatString = "{0}" HeaderText = "供应商批次" />
<f:BoundField Width = "100px" DataField = "VendBatch" DataFormatString = "{0}" HeaderText = "批次" />
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" HeaderText = "单位" />
<f:RenderField Width="100px" ColumnID="Failqty" DataField="Failqty" FieldType="Float"
HeaderText="不合格数量">
<Editor>
<f:NumberBox ID="NB_PublishNum" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="FailReason" DataField="FailReason" FieldType="String" HeaderText="不合格原因">
<Editor>
<f:DropDownList ID="fail" Required="true" runat="server" EnableMultiSelect="true">
<f:ListItem Text="成分" Value="成分" />
<f:ListItem Text="颜色" Value="颜色" />
<f:ListItem Text="新能" Value="新能" />
<f:ListItem Text="包装" Value="包装" />
<f:ListItem Text="其他" Value="其他" />
</f:DropDownList>
</Editor>
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
</form>
</body>
</html>

109
SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs

@ -0,0 +1,109 @@
using CK.SCP.Controller;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using FineUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_CREATE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDetail();
}
}
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.AskBillNum = "";
_entity.AsnBillNum = !string.IsNullOrEmpty(TXT_AsnBillNum.Text) ? TXT_AsnBillNum.Text : "9999999";
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
/// <summary>
/// 绑定明细
/// </summary>
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);
var ls = list.ToList();
Grid_V_TB_ASN_DETAIL.DataSource = ls;
Grid_V_TB_ASN_DETAIL.DataBind();
});
}
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
BindDetail();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindDetail();
}
protected void btnRelease_Click(object sender, EventArgs e)
{
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>();
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid_V_TB_ASN_DETAIL.GetModifiedDict();
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++)
{
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i];
_entity.UID = ConvertHelper.To<long>(rowDataKeys[0]);
_entity.PoBillNum = rowDataKeys[1] as string;
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]);
_entity.PartCode = rowDataKeys[3] as string;
_entity.AsnBillNum = rowDataKeys[4] as string;
_entity.Batch = rowDataKeys[5] as string;
_entity.VendId = rowDataKeys[6] as string;
if (modifiedDict.Keys.Contains(i))
{
var modifyValue = modifiedDict[i];
var _FailQty = modifyValue.Keys.Contains("Failqty") ? modifyValue["Failqty"] : 0;
var _FailReason = modifyValue.Keys.Contains("FailReason") ? modifyValue["FailReason"] : string.Empty;
_entity.FailQty = ConvertHelper.To<decimal>(_FailQty);
_entity.FailReason = _FailReason.ToString();
_list.Add(_entity);
}
}
var ret = SCP_QUALITY_CONTROLLER.Save_ASN_TO_QUALITY(_list, CurrentUser.ChineseName);
if (ret.Result == true)
{
Alert.Show("添加不合格品信息成功!");
}
//var ret = SCP_ASK_CONTROLLER.Save_ASK_TO_ASN(_model, _askDetaillist, TXT_PlateNumber.Text, CurrentUser.ChineseName, CurrentUser.CellPhone);
//if (ret.State == ReturnStatus.Succeed)
//{
// Alert.Show("生成发货单成功!");
// GetV_TB_POData();
// BindDetail();
//}
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindDetail();
}
}
}

107
SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs

@ -0,0 +1,107 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_CREATE
{
/// <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>
/// btnRelease 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnRelease;
/// <summary>
/// TXT_AsnBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AsnBillNum;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// Grid_V_TB_ASN_DETAIL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_ASN_DETAIL;
/// <summary>
/// NB_PublishNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox NB_PublishNum;
/// <summary>
/// fail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList fail;
/// <summary>
/// highlightRows 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField highlightRows;
}
}

107
SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx

@ -0,0 +1,107 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_QUALITY_MANAGER.aspx.cs" Inherits="SCP.Views.Quality.SCP_QUALITY_MANAGER" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" ID="pmg1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button runat="server" ID="btnNew" Text="新建" OnClick="btnNew_Click" Icon="Add"></f:Button>
<f:Button ID="btnOutput" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel">
</f:Button>
<f:Button runat="server" ID="btnDelete" Text="删除" OnClick="btnDelete_Click" Icon="Delete"></f:Button>
<f:Button runat="server" ID="btnSQE" Text="供应商质量统计" OnClick="btnSQE_Click" Icon="Report"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow1">
<Items>
<f:TextBox ID="TXT_Code" runat="server" Label="质检单号"/>
<f:TextBox ID="TXT_AsnBill" runat="server" Label="发货单号"/>
<f:TextBox ID="TXT_PoBillNum" runat="server" Label="订单编号"/>
<f:TextBox ID="TXT_PageCode" runat="server" Label="包装箱号"/>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1">
<Items>
<f:DropDownList ID="TXT_Vendid" runat="server" Label="供应商编码" EnableMultiSelect="false" EnableEdit="true"></f:DropDownList>
<f:TextBox ID="TXT_PartCode" runat="server" Label="零件编号" />
<f:TextBox ID="TXT_Batch" runat="server" Label="批次" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" >
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></f:Button>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID = "Grid_TB_QUALITY" Title = "质量列表"
EnableCollapse = "true"
ShowBorder = "true"
ShowHeader = "true"
runat ="server"
EnableCheckBoxSelect = "true"
DataKeyNames = "UID,Type,Barcode,Loccode,Pobillnum,Poline,Inspecttype,Partcode,Batch,ReceiveQty,SampleQty,Inspqty,Passqty,Failqty,Crackqty,Inspresult,Failreason,Vendid,Vendbatch,state,Billtime,Domain,Site,By1,By2,By3,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID,UserInAddress,UserInVendIds,BillStateList"
PageSize="100"
IsDatabasePaging="true" AllowPaging="true"
AutoScroll="True"
SortDirection="DESC" SortField="Billtime"
>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged"
runat="server">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField Width = "100px" DataField = "UID" HeaderText = "" Hidden="true"/>
<f:BoundField Width = "100px" DataField = "QualityNo" HeaderText = "检验单据号" />
<f:BoundField Width = "100px" DataField = "By1" HeaderText = "发货单号" />
<f:BoundField Width = "100px" DataField = "Barcode" HeaderText = "箱码" />
<f:BoundField Width = "100px" DataField = "Pobillnum" HeaderText = "订单号" />
<f:BoundField Width = "100px" DataField = "Poline" HeaderText = "订单行" />
<f:BoundField Width = "100px" DataField = "Partcode" HeaderText = "零件编号" />
<f:BoundField Width = "100px" DataField = "VendName" HeaderText = "供应商名称" />
<f:BoundField Width = "100px" DataField = "PartDesc1" HeaderText = "零件名称" />
<f:BoundField Width = "100px" DataField = "PartDesc2" HeaderText = "零件名称" />
<f:BoundField Width = "100px" DataField = "Batch" DataFormatString = "{0}" HeaderText = "批次" />
<f:BoundField Width = "100px" DataField = "Failqty" DataFormatString = "{0:F}" HeaderText = "不合格数" />
<f:BoundField Width = "100px" DataField = "Failreason" 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" CloseAction="HidePostBack"
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" />
<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>
<f:HiddenField runat="server" ID ="TXT_State"></f:HiddenField>
</form>
</body>
</html>

143
SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs

@ -0,0 +1,143 @@
using System;
using System.Collections.Generic;
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.AppBoxEntity;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Controller;
using FineUI;
using SCP.Code;
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_MANAGER : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Bind();
BindVender(TXT_Vendid);
}
}
public void Bind()
{
Search((result) => {
Grid_TB_QUALITY.RecordCount = result.Count();
var list = SortAndPage<V_TB_QUALITY>(result, Grid_TB_QUALITY);
Grid_TB_QUALITY.DataSource = list;
Grid_TB_QUALITY.DataBind();
});
}
public void Search(Action<IQueryable<V_TB_QUALITY>> p_action)
{
V_TB_QUALITY _entity = new V_TB_QUALITY();
_entity.Pobillnum = TXT_PoBillNum.Text;
_entity.Barcode = TXT_PageCode.Text;
_entity.Partcode = TXT_PartCode.Text;
_entity.By1 = TXT_AsnBill.Text;
_entity.Vendid = TXT_Vendid.SelectedValue;
_entity.Batch = TXT_Batch.Text;
_entity.IsDeleted = false;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
SCP_QUALITY_CONTROLLER.Get_TB_QUALITY_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
protected void btnOutput_Click(object sender, EventArgs e)
{
Search((rs) => {
Dictionary<string, string> cellheader = new Dictionary<string, string>();
cellheader.Add("Type_Desc", "检验类型");
cellheader.Add("Barcode", "箱码");
cellheader.Add("Pobillnum", "订单编号");
cellheader.Add("Poline", "订单行号");
cellheader.Add("Partcode", "零件编码");
cellheader.Add("Batch", "发货批次");
cellheader.Add("Failqty", "不合格数");
cellheader.Add("Failreason", "不合格原因");
cellheader.Add("Vendbatch", "供应商批次");
cellheader.Add("Billtime", "检查日期");
cellheader.Add("PartDesc1", "零件名1");
cellheader.Add("PartDesc2", "零件名2");
cellheader.Add("ProjectId", "项目名称");
cellheader.Add("Qlevel", "质检等级");
cellheader.Add("VendName", "供应商名称");
string url = EntityListToExcel2003(cellheader, rs.ToList(), "质量不合格零件导出");
});
}
protected void btnQuery_Click(object sender, EventArgs e)
{
Bind();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Bind();
}
protected void btnSave_Click(object sender, EventArgs e)
{
}
protected void btnDelete_Click(object sender, EventArgs e)
{
if (Grid_TB_QUALITY.SelectedRowIndexArray.Count() == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!"));
return;
}
List<TB_QUALITY> _ls = new List<TB_QUALITY>();
for (int i = 0, count = Grid_TB_QUALITY.Rows.Count; i < count; i++)
{
if (Grid_TB_QUALITY.SelectedRowIndexArray.Contains(i))
{
object[] rowDataKeys = Grid_TB_QUALITY.DataKeys[i];
var _entity = new TB_QUALITY();
_entity.UID = long.Parse(rowDataKeys[0].ToString());
_ls.Add(_entity);
}
}
var _ret = SCP_QUALITY_CONTROLLER.Del_TB_QUALITY(_ls);
if (_ret.State == ReturnStatus.Succeed)
{
Bind();
Alert.Show("删除不合格评审成功!");
}
}
protected void btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference("../Quality/SCP_QUALITY_CREATE.aspx"));
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
Bind();
}
protected void btnSQE_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference("../Quality/SCP_SQE.aspx"));
}
}
}

251
SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs

@ -0,0 +1,251 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_MANAGER
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// pmg1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.PageManager pmg1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnNew;
/// <summary>
/// btnOutput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnDelete;
/// <summary>
/// btnSQE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnSQE;
/// <summary>
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// TXT_Code 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Code;
/// <summary>
/// TXT_AsnBill 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AsnBill;
/// <summary>
/// TXT_PoBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PoBillNum;
/// <summary>
/// TXT_PageCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PageCode;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// TXT_Vendid 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList TXT_Vendid;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// TXT_Batch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Batch;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// Grid_TB_QUALITY 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_TB_QUALITY;
/// <summary>
/// ToolbarSeparator2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator2;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarText ToolbarText1;
/// <summary>
/// ddlGridPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
/// <summary>
/// WindowUpload 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window WindowUpload;
/// <summary>
/// TXT_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField TXT_State;
}
}

59
SCP/Views/Quality/SCP_SQE.aspx

@ -0,0 +1,59 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_SQE.aspx.cs" Inherits="SCP.Views.Quality.SCP_SQE" %>
<!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" Title="" Margin="5">
<Items>
<f:FormRow runat="server" ColumnWidths="100%">
<Items>
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" ></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" ColumnWidths="33% 33% 33%">
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></f:Button>
<f:Button runat="server" ID="btnExcel" Text="导出" OnClick="btnExcel_Click"></f:Button>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid_SQE" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server"
IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True"
SortField="VendId" SortDirection="DESC"
OnPageIndexChange="Grid_SQE_PageIndexChange">
<Columns>
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" />
<f:BoundField Width = "200px" DataField = "VendName" DataFormatString = "{0:F}" HeaderText = "供应商名称" />
<f:BoundField Width = "100px" DataField ="FailQty" DataFormatString = "{0}" HeaderText = "不合格数量" />
<f:BoundField Width = "100px" DataField ="RecQty" DataFormatString = "{0}" HeaderText = "收货数量" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
</form>
</body>
</html>

96
SCP/Views/Quality/SCP_SQE.aspx.cs

@ -0,0 +1,96 @@
using CK.SCP.Controller;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using FineUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace SCP.Views.Quality
{
public partial class SCP_SQE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDetail();
BindVender(ddl_Vender);
}
}
public void SearchData(Action<IQueryable<SCP_TB_SQE>> p_action)
{
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
if (!string.IsNullOrEmpty(DP_StartDate.Text))
{
_entity.SQE_BeginTime = DP_StartDate.SelectedDate.Value.ToShortDateString();
}
if (!string.IsNullOrEmpty(Date_EndDate.Text))
{
_entity.SQE_EndTime = Date_EndDate.SelectedDate.Value.ToShortDateString();
}
_entity.VendId = ddl_Vender.SelectedValue;
SCP_REPORT_CONTROLLER.Get_SQE(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
/// <summary>
/// 绑定明细
/// </summary>
public void BindDetail()
{
SearchData((ret) => {
Grid_SQE.RecordCount = ret.Count();
var list = SortAndPage<SCP_TB_SQE>(ret, Grid_SQE);
var ls = list.ToList();
Grid_SQE.DataSource = ls;
Grid_SQE.DataBind();
});
}
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
BindDetail();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindDetail();
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindDetail();
}
protected void Grid_SQE_PageIndexChange(object sender, GridPageEventArgs e)
{
BindDetail();
}
protected void btnExcel_Click(object sender, EventArgs e)
{
SearchData((ret) => {
Dictionary<string, string> cellheader = new Dictionary<string, string>(){
{"VendId" , "供应商编码" },
{"VendName" , "供应商名称" },
{ "FailQty" , "不合格数量" },
{ "RecQty" , "收货数量" },
};
string url = EntityListToExcel2003(cellheader, ret.ToList(), "SQE导出");
});
}
}
}

98
SCP/Views/Quality/SCP_SQE.aspx.designer.cs

@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.Quality
{
public partial class SCP_SQE
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// ddl_Vender 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddl_Vender;
/// <summary>
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// Date_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker Date_EndDate;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// btnExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnExcel;
/// <summary>
/// Grid_SQE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_SQE;
/// <summary>
/// highlightRows 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField highlightRows;
}
}

1
SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs

@ -132,7 +132,6 @@ namespace SCP.Views.Report
{ "AskBillNum", "要货单号" },
{ "RecvBillNum", "收货单" },
{ "PoBillNum", "订单号" },
{ "AskBillNum", "要货单号" },
{ "PoLine", "行号" }
};

127
SCP/Views/SupplierData/SCP_ARRIVE.aspx

@ -0,0 +1,127 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ARRIVE.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_ARRIVE" %>
<!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">
<Items>
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:ToolbarSeparator runat="server" />
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();">
</f:Button>
<f:Button ID="btnCheck" runat="server" EnablePostBack="True" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要将勾选的单据通过审核?'))return false;">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick">
</f:Button>
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_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:DropDownList runat="server" ID="ddtype" Label="单据类型">
<f:ListItem Text="-" Value="" />
<f:ListItem Text="收货单" Value="收货单" />
<f:ListItem Text="退货单" Value="退货单" />
</f:DropDownList>
<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:DropDownList>
<f:TextBox ID="txtReceiveBill" runat="server" Label="单据号" />
<f:TextBox ID="txtSupplier" runat="server" Label="供应商"/>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtPO" runat="server" Label="订单号"/>
<f:TextBox ID="AsnBillNum" runat="server" Label="发货单号" />
<f:TextBox ID="OperName" runat="server" Label="操作员" />
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:Button runat="server" Text="关闭" OnClick="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="Grid_V_TB_ARRIVE" ShowBorder="true" ShowHeader="true" PageSize="10" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ArrvBillNum" IsDatabasePaging="True" AllowPaging="True" EnableRowDoubleClickEvent="True"
OnRowDoubleClick="Grid1_OnRowDoubleClick" SortDirection="DESC" SortField="ShipTime" EnableCheckBoxSelect="True"
EnableRowSelectEvent="False" OnPageIndexChange="Grid1_OnPageIndexChange">
<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_OnSelectedIndexChanged"
runat="server">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="50" Value="50" />
<f:ListItem Text="100" Value="100" />
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField runat="server" HeaderText="State" ColumnID="" DataField="State" Hidden="true" />
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" />
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" />
<f:BoundField runat="server" HeaderText="单据号" ColumnID="" DataField="ArrvBillNum" />
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" />
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" />
<f:BoundField runat="server" HeaderText="时间" ColumnID="" DataField="ShipTime" />
<f:BoundField runat="server" HeaderText="地点" ColumnID="" DataField="Site_Desc" />
<f:BoundField runat="server" HeaderText="类型" ColumnID="" DataField="BillType_DESC" hidden="true" />
<f:BoundField runat="server" HeaderText="审核员" ColumnID="" DataField="OperName" />
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" />
</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="600px" Width="1024px" AutoScroll="True" />
<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>
<script>
var basePath = '<%=ResolveUrl("~/")%>';
function btnDetail_OnClick(id) {
parent.addExampleTab.apply(null, ['id', basePath + 'WarehouseData/ReceiveDetail.aspx?ID=' + 2, '明细', basePath + 'res/images/filetype/vs_aspx.png', undefined, true]);
}
</script>
</body>
</html>

255
SCP/Views/SupplierData/SCP_ARRIVE.aspx.cs

@ -0,0 +1,255 @@
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
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.Controller;
using FineUI;
using CK.SCP.Models.AppBoxEntity;
namespace SCP.Views.SupplierData
{
public partial class SCP_ARRIVE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
IsRoleRight();
if (!IsPostBack)
{
LoadData();
}
}
public void IsRoleRight()
{
if (!CurrentUser.RoleList.Contains("采购负责人"))
{
Alert.Show("当前用户角色不能操作该模块!");
return;
}
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0)
{
Alert.Show("当前用户未选择地点!");
return;
}
}
public void LoadData()
{
Grid_V_TB_ARRIVE.PageSize = ConfigHelper.PageSize;
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
BindData();
}
public void BindData()
{
var _entity = new V_TB_ARRIVE();
_entity.ArrvBillNum = txtReceiveBill.Text;//单据号
if (!string.IsNullOrEmpty(ddl.SelectedValue))
{
//已收货:0,审核通过:1,已开票,2
int istate = Convert.ToInt32(ddl.SelectedValue);
if (istate == 0)
{
_entity.State = 0;
}
else if (istate == 1)
{
_entity.State = 1;
}
else if (istate == 2)
{
_entity.State = 2;
}
}
else
{
_entity.State = -1;
}
if (!string.IsNullOrEmpty(ddtype.SelectedValue))
{
string istate = ddtype.SelectedValue;
if (istate == "收货单")
{
_entity.BillType_DESC = "收货单";
}
else if (istate == "退货单")
{
_entity.BillType_DESC = "退货单";
}
}
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
_entity.VendId = CurrentUser.VenderList[0];
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_entity.Site = CurrentUser.FactoryList[0];
}
_entity.VendName = txtSupplier.Text;//供应商
_entity.PoBillNum = txtPO.Text;//订单号
_entity.AsnBillNum = AsnBillNum.Text;//发货单号
_entity.OperName = OperName.Text;//操作员
SCP_RECIVECE_CONTROLLER.Get_V_TB_ARRIVE_List(_entity, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
Grid_V_TB_ARRIVE.RecordCount = ret.Result.Count();
var _list = SortAndPage(ret.Result, Grid_V_TB_ARRIVE);
Grid_V_TB_ARRIVE.DataSource = _list;
Grid_V_TB_ARRIVE.DataBind();
}
});
}
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_ARRIVE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindData();
}
protected void Grid1_OnRowDoubleClick(object sender, GridRowClickEventArgs e)
{
string ID = GetSelectedDataKey(Grid_V_TB_ARRIVE, 1);
string STATE = Grid_V_TB_ARRIVE.Rows[e.RowIndex].Values[0].ToString();
if (string.IsNullOrEmpty(STATE))
{
STATE = "0";
}
if (STATE != "0" && STATE != "1" && STATE != "2")
{
STATE = "0";
}
string url = String.Format("../SupplierData/SCP_ARRIVE_DETAIL.aspx?ID={0}&STATE={1}", ID, STATE);
PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
//明细
protected void btnDetail_OnClick(object sender, EventArgs e)
{
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_ARRIVE);
if (listids.Count == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要查看明细的单据"));
return;
}
if (listids.Count > 1)
{
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("只能查看一条单据的明细"));
return;
}
string STATE = Grid_V_TB_ARRIVE.SelectedRow.Values[0].ToString();
if (string.IsNullOrEmpty(STATE))
{
STATE = "0";
}
if (STATE != "0" && STATE != "1" && STATE != "2")
{
STATE = "0";
}
string roleID = GetSelectedDataKey(Grid_V_TB_ARRIVE, 1);
string url = String.Format("../SupplierData/SCP_ARRIVE_DETAIL.aspx?ID={0}&STATE={1}", roleID, STATE);
PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
//查询
protected void BtnSearch_OnClick(object sender, EventArgs e)
{
BindData();
}
//显示面板
protected void btnShow_OnClick(object sender, EventArgs e)
{
gp1.Hidden = false;
}
//关闭面板
protected void OnClick(object sender, EventArgs e)
{
gp1.Hidden = true;
}
//审核通过
protected void btnCheck_OnClick(object sender, EventArgs e)
{
ICollection<Role> Roles = CurrentUser.Roles;
string strUserName = CurrentUser.ChineseName;
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_ARRIVE);
if (listids.Count == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要审核的单据"));
return;
}
var _ls = new List<string>();
int[] selections = Grid_V_TB_ARRIVE.SelectedRowIndexArray;
for (int i = 0, count = Grid_V_TB_ARRIVE.Rows.Count; i < count; i++)
{
if (selections.Contains(i))
{
object[] rowDataKeys = Grid_V_TB_ARRIVE.DataKeys[i];
_ls.Add(rowDataKeys[1] as string);
}
}
var ret = SCP_RECIVECE_CONTROLLER.Save_TB_ARRIVE_STATE(_ls, ReceiveState.Check, strUserName);
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("审核成功"));
BindData();
}
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e)
{
Grid_V_TB_ARRIVE.PageIndex = e.NewPageIndex;
BindData();
}
//导出
protected void btnOutput_OnClick(object sender, EventArgs e)
{
var _entity = new V_TB_ARRIVE();
_entity.ArrvBillNum = txtReceiveBill.Text;
if (!string.IsNullOrEmpty(ddl.SelectedValue))
{
_entity.State = Convert.ToInt32(ddl.SelectedValue);
}
else
{
_entity.State = -1;
}
_entity.PoBillNum = txtPO.Text;
_entity.AsnBillNum = AsnBillNum.Text;
_entity.OperName = OperName.Text;
SCP_RECIVECE_CONTROLLER.Get_V_TB_ARRIVE_List(_entity, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
Dictionary<string, string> cellheader = new Dictionary<string, string>
{
{ "State_DESC", "状态" },
//{ "AsnBillNum", "单据类型" },
{ "VendName", "供应商" },
{ "ArrvBillNum", "单据号" },
{ "PoBillNum", "订单号" },
{ "AsnBillNum", "发货单号" },
{ "ShipTime", "时间" },
{ "Site_Desc", "地点" },
{ "BillType_DESC", "类型" },
{ "OperName", "审核员" },
{ "Remark", "备注" },
};
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细");
}
});
}
}
}

94
SCP/Views/BasicData/SCP_LANGUAGE.aspx.designer.cs → SCP/Views/SupplierData/SCP_ARRIVE.aspx.designer.cs

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.BasicData {
namespace SCP.Views.SupplierData
{
public partial class SCP_LANGUAGE {
public partial class SCP_ARRIVE
{
/// <summary>
/// form1 控件。
@ -22,201 +24,201 @@ namespace SCP.BasicData {
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>
/// panelTopRegion 控件。
/// Button3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel panelTopRegion;
protected global::FineUI.Button Button3;
/// <summary>
/// Toolbar2 控件。
/// btnCheck 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
protected global::FineUI.Button btnCheck;
/// <summary>
/// Btn_Add 控件。
/// btnOutput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Btn_Add;
protected global::FineUI.Button btnOutput;
/// <summary>
/// Btn_Save 控件。
/// btnDetail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Btn_Save;
protected global::FineUI.Button btnDetail;
/// <summary>
/// Btn_Delete 控件。
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Btn_Delete;
protected global::FineUI.Button btnShow;
/// <summary>
/// panelLeftRegion 控件。
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel panelLeftRegion;
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// TXT_GUID 控件。
/// ddtype 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_GUID;
protected global::FineUI.DropDownList ddtype;
/// <summary>
/// TXT_CH 控件。
/// ddl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_CH;
protected global::FineUI.DropDownList ddl;
/// <summary>
/// TXT_EN 控件。
/// txtReceiveBill 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_EN;
protected global::FineUI.TextBox txtReceiveBill;
/// <summary>
/// TXT_RU 控件。
/// txtSupplier 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_RU;
protected global::FineUI.TextBox txtSupplier;
/// <summary>
/// TXT_DE 控件。
/// txtPO 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_DE;
protected global::FineUI.TextBox txtPO;
/// <summary>
/// TXT_FR 控件。
/// AsnBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_FR;
protected global::FineUI.TextBox AsnBillNum;
/// <summary>
/// TXT_AR 控件。
/// OperName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AR;
protected global::FineUI.TextBox OperName;
/// <summary>
/// TXT_JP 控件。
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_JP;
protected global::FineUI.Button BtnSearch;
/// <summary>
/// CB_IsDeleted 控件。
/// Grid_V_TB_ARRIVE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.CheckBox CB_IsDeleted;
protected global::FineUI.Grid Grid_V_TB_ARRIVE;
/// <summary>
/// BtnSearch 控件。
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// panelCenterRegion 控件。
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel panelCenterRegion;
protected global::FineUI.ToolbarText ToolbarText1;
/// <summary>
/// Grid_TA_LANGUAGE 控件。
/// ddlGridPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_TA_LANGUAGE;
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// txtBatch1 控件。
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBatch1;
protected global::FineUI.Window Window1;
/// <summary>
/// GURID 控件。
/// WindowUpload 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox GURID;
protected global::FineUI.Window WindowUpload;
}
}

115
SCP/Views/SupplierData/SCP_ARRIVE_DETAIL.aspx

@ -0,0 +1,115 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ARRIVE_DETAIL.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_ARRIVE_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="" Layout="VBox">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();">
</f:Button>
<%-- <f:Button ID="btnCheck" runat="server" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要审核通过?'))return false;" Hidden="True" EnablePostBack="True">
</f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox ID="txtBillNo" runat="server" Label="单据号" Text="" Width="600">
</f:TextBox>
<f:TextBox ID="txtShipBillNo" runat="server" Label="发货单" Text="" Width="600">
</f:TextBox>
<f:TextBox ID="txtPlanBillNo" runat="server" Label="订单号" Text="" Readonly="true" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" Readonly="true" />
<f:TextBox ID="txtSupplierName" 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="txtDeliveryAddress" runat="server" Label="地址" Text="">
</f:TextBox>
<f:TextBox ID="txtReceiveTime" runat="server" Label="时间" Text="">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox ID="txtUserName" runat="server" Label="审核员" Text="" Readonly="true" />
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="">
</f:TextBox>
<f:Label ID="TextBox2" runat="server" Text="">
</f:Label>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Toolbar runat="server">
<Items>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick">
</f:Button>
<f:ToolbarFill runat="server" />
</Items>
</f:Toolbar>
<f:Grid ID="Grid_V_TB_ARRIVE_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="10" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="PartCode" SortDirection="DESC"
EnableRowSelectEvent="False" AutoScroll="True" OnPageIndexChange="Grid_V_TB_ARRIVE_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="10" Value="10" />
<f:ListItem Text="40" Value="40" />
<f:ListItem Text="80" Value="80" />
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" />
<f:BoundField SortField="ArrvBillNum" DataField="ArrvBillNum" HeaderText="单据号" ColumnID="Line" Width="100px" />
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单号" ColumnID="ProductCode" Width="120px" />
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单号" ColumnID="ProductName" Width="100px" />
<f:BoundField SortField="PoLine" DataField="PoLine" HeaderText="订单行" ColumnID="UnitCode" Width="60px" />
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="100px" />
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" />
<f:BoundField SortField="Unit" DataField="Unit" HeaderText="单位" ColumnID="Price" Width="80px" />
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="数量" ColumnID="PlanQty" Width="60px" />
<f:BoundField SortField="ShipTime" DataField="ShipTime" HeaderText="时间" ColumnID="ShipQty" Width="60px" DataFormatString="{0:yy-MM-dd}"/>
<f:BoundField SortField="Remark" DataField="Remark" HeaderText="备注" ColumnID="ReceiveQty" 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>

132
SCP/Views/SupplierData/SCP_ARRIVE_DETAIL.aspx.cs

@ -0,0 +1,132 @@
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.Controller;
using FineUI;
namespace SCP.Views.SupplierData
{
public partial class SCP_ARRIVE_DETAIL : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
BindData();
}
}
public void LoadData()
{
var _receive = new V_TB_ARRIVE();
_receive.ArrvBillNum = GetQueryValue("ID");
if (GetQueryValue("STATE") != null)
{
_receive.State = int.Parse(GetQueryValue("STATE"));
}
SCP_RECIVECE_CONTROLLER.Get_V_TB_ARRIVE_List(_receive, (ret) => {
if (ret.State == ReturnStatus.Succeed)
{
var _rec = ret.Result.FirstOrDefault();
txtState.Text = _rec.State_DESC;
txtBillNo.Text = _rec.ArrvBillNum;
txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd");
txtShipBillNo.Text = _rec.AsnBillNum;
txtPlanBillNo.Text = _rec.PoBillNum;
txtUserName.Text = _rec.OperName;
txtSupplierName.Text = _rec.VendName;
txtMemo.Text = _rec.Remark;
txtDeliveryAddress.Text = _rec.Site_Desc;
}
});
}
public void BindData()
{
var _receive = new V_TB_ARRIVE_DETAIL();
_receive.ArrvBillNum = GetQueryValue("ID");
SCP_RECIVECE_CONTROLLER.Get_V_TB_ARRIVE_DETAIL_List(_receive, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
Grid_V_TB_ARRIVE_DETAIL.RecordCount = ret.Result.Count();
var _ls = SortAndPage(ret.Result, Grid_V_TB_ARRIVE_DETAIL);
Grid_V_TB_ARRIVE_DETAIL.DataSource = _ls;
Grid_V_TB_ARRIVE_DETAIL.DataBind();
}
});
}
protected void btnCheck_OnClick(object sender, EventArgs e)
{
//try
//{
// string id = GetQueryValue("ID");
// _Model = ReceiveDetailController.GetlistByBillNum(id);
// bool flag = ReceiveDetailController.UpdateReceive(_Model);
// if (flag)
// PageContext.Refresh();
//}
//catch (Exception ex)
//{
// Alert.ShowInTop(ex.Message);
//}
}
protected void Grid_V_TB_ARRIVE_DETAIL_PageIndexChange(object sender, GridPageEventArgs e)
{
BindData();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_ARRIVE_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindData();
}
//导出
protected void btnOutput_OnClick(object sender, EventArgs e)
{
var _receive = new V_TB_ARRIVE_DETAIL();
_receive.ArrvBillNum = GetQueryValue("ID");
SCP_RECIVECE_CONTROLLER.Get_V_TB_ARRIVE_DETAIL_List(_receive, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
Dictionary<string, string> cellheader = new Dictionary<string, string> {
{ "ArrvBillNum", "单据号" },
{ "AsnBillNum", "发货单号" },
{ "PoBillNum", "订单号" },
{ "PoLine", "订单行" },
{ "PartCode", "零件号" },
{ "PartDesc1", "零件名称" },
{ "Unit", "单位" },
{ "Qty", "数量" },
//{ "ReceivedQty", "已开票数量" },
{ "ShipTime", "时间" },
{ "Remark", "备注" },
};
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细");
}
});
}
}
}

206
SCP/Views/SupplierData/SCP_ARRIVE_DETAIL.aspx.designer.cs

@ -0,0 +1,206 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.SupplierData
{
public partial class SCP_ARRIVE_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>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button1;
/// <summary>
/// txtBillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtBillNo;
/// <summary>
/// txtShipBillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtShipBillNo;
/// <summary>
/// txtPlanBillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtPlanBillNo;
/// <summary>
/// txtState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtState;
/// <summary>
/// txtSupplierName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtSupplierName;
/// <summary>
/// txtDeliveryAddress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtDeliveryAddress;
/// <summary>
/// txtReceiveTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtReceiveTime;
/// <summary>
/// txtUserName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtUserName;
/// <summary>
/// txtMemo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox txtMemo;
/// <summary>
/// TextBox2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Label TextBox2;
/// <summary>
/// btnOutput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
/// <summary>
/// Grid_V_TB_ARRIVE_DETAIL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_ARRIVE_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;
}
}

4
SCP/Views/SupplierData/SCP_ASK_DETAIL.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="" AutoScroll="True" Layout="VBox">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
@ -54,7 +54,7 @@
<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"
IsDatabasePaging="True" AllowPaging="True" PageSize="10" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange"
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoLine" SortDirection="DESC" >
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoLine" SortDirection="DESC" BoxFlex="1">
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>

19
SCP/Views/SupplierData/SCP_ASN_CREATE.aspx

@ -40,7 +40,7 @@
<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">
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_2">
<Items>
<f:TextBox ID="TXT_PlateNumber" runat="server" Label="车牌/快递单号" />
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" />
@ -48,6 +48,7 @@
<f:DatePicker runat="server" Required ="true" Label="承诺到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" Readonly="false" CompareControl="DP_ShipTime" DateFormatString="yyyy-MM-dd HH:mm"
CompareOperator="GreaterThan" CompareMessage="到货日期应该大于发货日期"
ShowRedStar="True" />
<%-- <f:TextBox ID="TXT_KBremark" runat="server" Label="要货看板备注" /> --%>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" Hidden="true">
@ -92,11 +93,17 @@
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Batch" DataField="Batch" FieldType="String" HeaderText="发货批次">
<f:RenderField Width="100px" ColumnID="Batch" DataField="Batch" FieldType="String" HeaderText="发货批次" Hidden ="true">
<Editor>
<f:TextBox ID="txtBatch1" Text="" runat="server" Regex="\d{6}" ></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="VendBatch" HeaderText="供应商批次">
<Editor>
<f:TextBox ID="TXT_VendBatch" runat="server" MaxLength="12" Regex="^[A-Za-z0-9]+$" >
</f:TextBox>
</Editor>
</f:RenderField>
<%--<f:BoundField SortField="Batch1" DataField="Batch" HeaderText="发货批次" ColumnID="Batch1" Width="100px" /> --%>
<f:RenderField Width="100px" ColumnID="TempQty" FieldType="Float" DataField="TempQty"
@ -136,6 +143,7 @@
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Qty3" FieldType="Float" Hidden="true"
HeaderText="发货数量">
<Editor>
@ -145,13 +153,6 @@
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="VendBatch" Hidden="true"
HeaderText="供应商批次(YYMMDD)">
<Editor>
<f:TextBox ID="TXT_VendBatch" runat="server" >
</f:TextBox>
</Editor>
</f:RenderField>
<f:BoundField SortField="PoUnit" DataField="PoUnit" HeaderText="单位" ColumnID="PoUnit" Width="40px" />
<f:BoundField SortField="CanQty" DataField="CanQty" HeaderText="可发数量" ColumnID="CanQty" Width="70px" DataFormatString = "{0:F}"/>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save