From 8b018ac3a3830af0ae25bfe094b30dba1a80d720 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 17 Nov 2020 13:18:03 +0800 Subject: [PATCH 01/56] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E4=B8=8D=E5=8C=BA=E5=88=86=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_PO_CONTROLLER.cs | 3 ++- Models/ScpCache.cs | 2 +- Models/UniApiEntity/xxwms_rc_det.cs | 4 ++-- SCP/Web.config | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Controller/SCP_PO_CONTROLLER.cs b/Controller/SCP_PO_CONTROLLER.cs index d366f22..33a4963 100644 --- a/Controller/SCP_PO_CONTROLLER.cs +++ b/Controller/SCP_PO_CONTROLLER.cs @@ -1772,7 +1772,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 +1781,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++; }); diff --git a/Models/ScpCache.cs b/Models/ScpCache.cs index feb222c..2719b9e 100644 --- a/Models/ScpCache.cs +++ b/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; diff --git a/Models/UniApiEntity/xxwms_rc_det.cs b/Models/UniApiEntity/xxwms_rc_det.cs index cd7ddd8..290adee 100644 --- a/Models/UniApiEntity/xxwms_rc_det.cs +++ b/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; } diff --git a/SCP/Web.config b/SCP/Web.config index cad8159..562fb79 100644 --- a/SCP/Web.config +++ b/SCP/Web.config @@ -28,12 +28,12 @@ --> - + From fec5b1af32115a6448b99955d3723a2641e5f2d1 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Mon, 23 Nov 2020 10:16:16 +0800 Subject: [PATCH 02/56] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6/=E6=B2=88=E9=98=B3=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=B7=E6=A0=BC=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_WMS_CONTROLLER.cs | 8 +++++++ SCP/Views/SupplierData/SCP_STOCK.aspx | 6 ++--- SCP/Views/SupplierData/SCP_STOCK.aspx.cs | 1 + .../SupplierData/SCP_STOCK.aspx.designer.cs | 8 +++---- SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx | 13 ++++------ .../SupplierData/SCP_STOCK_DETAIL.aspx.cs | 1 + .../SCP_STOCK_DETAIL.aspx.designer.cs | 17 ++++--------- .../SCP_INVOICE_CONFIRM_DETAIL.aspx.cs | 24 +++++++++++-------- SCP/default.aspx | 4 ++-- 9 files changed, 42 insertions(+), 40 deletions(-) diff --git a/Controller/SCP_WMS_CONTROLLER.cs b/Controller/SCP_WMS_CONTROLLER.cs index cddace8..a5d4117 100644 --- a/Controller/SCP_WMS_CONTROLLER.cs +++ b/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)); diff --git a/SCP/Views/SupplierData/SCP_STOCK.aspx b/SCP/Views/SupplierData/SCP_STOCK.aspx index 5987b5b..098c571 100644 --- a/SCP/Views/SupplierData/SCP_STOCK.aspx +++ b/SCP/Views/SupplierData/SCP_STOCK.aspx @@ -16,9 +16,9 @@ - - - + + + diff --git a/SCP/Views/SupplierData/SCP_STOCK.aspx.cs b/SCP/Views/SupplierData/SCP_STOCK.aspx.cs index b20608d..5967270 100644 --- a/SCP/Views/SupplierData/SCP_STOCK.aspx.cs +++ b/SCP/Views/SupplierData/SCP_STOCK.aspx.cs @@ -37,6 +37,7 @@ namespace SCP.Views.SupplierData { VIEW_STOCK_VEND _entity = new VIEW_STOCK_VEND(); _entity.PartCode = txtPartcode.Text; + _entity.VendId = txtVendId.Text; _entity.UserInVendIds = CurrentUser.VenderList; SCP_WMS_CONTROLLER.Get_VIEW_STOCK_DETAIL(_entity, (_ret) => { diff --git a/SCP/Views/SupplierData/SCP_STOCK.aspx.designer.cs b/SCP/Views/SupplierData/SCP_STOCK.aspx.designer.cs index c9066be..8f3328b 100644 --- a/SCP/Views/SupplierData/SCP_STOCK.aspx.designer.cs +++ b/SCP/Views/SupplierData/SCP_STOCK.aspx.designer.cs @@ -51,22 +51,22 @@ namespace SCP.Views.SupplierData protected global::FineUI.Toolbar Toolbar2; /// - /// Label2 控件。 + /// txtPartcode 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Label Label2; + protected global::FineUI.TextBox txtPartcode; /// - /// txtPartcode 控件。 + /// txtVendId 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtPartcode; + protected global::FineUI.TextBox txtVendId; /// /// btnSearch 控件。 diff --git a/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx b/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx index 675663f..64fa60e 100644 --- a/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx +++ b/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx @@ -16,16 +16,13 @@ - - - + + + - - - - - + + diff --git a/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.cs b/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.cs index f878670..60ef6b1 100644 --- a/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.cs +++ b/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.cs @@ -43,6 +43,7 @@ namespace SCP.Views.SupplierData { VIEW_STOCK_QTY _entity = new VIEW_STOCK_QTY(); _entity.PartCode = txtPartcode.Text; + _entity.VendId = txtVendId.Text; _entity.UserInVendIds = CurrentUser.VenderList; if (DatePicker1.SelectedDate != null) { diff --git a/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.designer.cs b/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.designer.cs index 6c00cf2..b914ab3 100644 --- a/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.designer.cs +++ b/SCP/Views/SupplierData/SCP_STOCK_DETAIL.aspx.designer.cs @@ -50,15 +50,6 @@ namespace SCP.Views.SupplierData /// protected global::FineUI.Toolbar Toolbar2; - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Label Label2; - /// /// txtPartcode 控件。 /// @@ -69,22 +60,22 @@ namespace SCP.Views.SupplierData protected global::FineUI.TextBox txtPartcode; /// - /// ToolbarSeparator2 控件。 + /// txtVendId 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.ToolbarSeparator ToolbarSeparator2; + protected global::FineUI.TextBox txtVendId; /// - /// Label3 控件。 + /// ToolbarSeparator2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Label Label3; + protected global::FineUI.ToolbarSeparator ToolbarSeparator2; /// /// DatePicker1 控件。 diff --git a/SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx.cs b/SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx.cs index fcb770d..6095dcd 100644 --- a/SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx.cs +++ b/SCP/Views/沈阳金杯/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx.cs @@ -44,6 +44,16 @@ namespace SCP.Views.沈阳金杯.WarehouseData private void SetRoleRule() { IsPriceVisible(Grid1, "要货日期"); + if (CurrentUser.RoleList.Contains("修改价格")) + { + 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"); + txtPrice.Enabled = true; + } + } } private void GetInvoice() { @@ -84,16 +94,7 @@ namespace SCP.Views.沈阳金杯.WarehouseData this.btnCheckSuccess.Hidden = true; //Visible = false; } } - if (CurrentUser.RoleList.Contains("修改价格")) - { - 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"); - txtPrice.Enabled = true; - } - } + } }); this.btnEdit.Enabled = true; @@ -270,16 +271,19 @@ namespace SCP.Views.沈阳金杯.WarehouseData { Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); BindData(); + SetRoleRule(); } protected void Grid_V_TB_INVOICE_DETAIL_PageIndexChange(object sender, FineUI.GridPageEventArgs e) { BindData(); + SetRoleRule(); } protected void Grid1_Sort(object sender, GridSortEventArgs e) { Grid1.SortDirection = e.SortDirection; Grid1.SortField = e.SortField; BindData(); + SetRoleRule(); } protected void Window1_Close(object sender, WindowCloseEventArgs e) { diff --git a/SCP/default.aspx b/SCP/default.aspx index 9af5c3e..beef335 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('QDVALEO' == obj.options[i].value) { + if ('JZ1' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'QDVALEO'; + _factory.value = 'JZ1'; } } } From 21d9b86a3036196db8229535a00ed220f67b0537 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Mon, 23 Nov 2020 15:33:19 +0800 Subject: [PATCH 03/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86/?= =?UTF-8?q?=E5=92=8C=E5=88=B0=E8=B4=A7=E6=97=A5=E6=9C=9F=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_ASK_CONTROLLER.cs | 16 +++++-- SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx | 2 + SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs | 16 +++++++ .../SCP_INCOMPLETE_ASK.aspx.designer.cs | 9 ++++ .../WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs | 2 +- .../Report/SCP_INCOMPLETE_ASK.aspx | 12 ++++- .../Report/SCP_INCOMPLETE_ASK.aspx.cs | 26 ++++++++++- .../SCP_INCOMPLETE_ASK.aspx.designer.cs | 44 +++++++++++++++++-- 8 files changed, 115 insertions(+), 12 deletions(-) diff --git a/Controller/SCP_ASK_CONTROLLER.cs b/Controller/SCP_ASK_CONTROLLER.cs index e86c066..2fbf00a 100644 --- a/Controller/SCP_ASK_CONTROLLER.cs +++ b/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.EndTimeEnd); + } + if (p_entity.VendId != null) { - q = q.Where(p => p.EndTime < p_entity.EndTime); + q = q.Where(p => p.VendId.Contains(p_entity.VendId)); } if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) { diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx index ccc3ceb..4ed512c 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx @@ -64,6 +64,8 @@ + + <%-- diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs index 98a49fd..f239533 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs +++ b/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; @@ -175,6 +179,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; diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs index 3d38a84..3135594 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs @@ -230,6 +230,15 @@ namespace SCP.PlanData /// protected global::FineUI.FormRow FormRow_3; + /// + /// TextVendId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextVendId; + /// /// btnQuery 控件。 /// diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs index ea5b405..121993f 100644 --- a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs +++ b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs @@ -216,7 +216,7 @@ namespace SCP.WarehouseData { if (_rec != null) { - int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.PoBillNum == _rec.PoBillNum).Count(); + int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.PoBillNum == _rec.PoBillNum&&p.State!=(int)InvoiceState.Reject).Count(); if (_count > 0) { Alert.Show("不能取消已经开票!"); diff --git a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx index 322e5aa..7d1ef1f 100644 --- a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx +++ b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx @@ -38,7 +38,15 @@ - + + + + + + + + + @@ -48,7 +56,7 @@ - + diff --git a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.cs b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.cs index f382a1f..fc70ccf 100644 --- a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.cs +++ b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.cs @@ -44,12 +44,24 @@ namespace SCP.Views.沈阳金杯.PlanData _entity.PoBillNum = TextBillNo.Text; if (TextBillTime1.SelectedDate != null) { - _entity.BeginTime = (DateTime)TextBillTime1.SelectedDate; + _entity.BeginTimeStart = (DateTime)TextBillTime1.SelectedDate; } if (TextBillTime2.SelectedDate != null) { _entity.BeginTimeEnd = (DateTime)TextBillTime2.SelectedDate; } + if (dp_EndTimeStart.SelectedDate != null) + { + _entity.EndTimeStart = (DateTime)dp_EndTimeStart.SelectedDate; + } + if (dp_EndTimeEnd.SelectedDate != null) + { + _entity.EndTimeEnd = (DateTime)dp_EndTimeEnd.SelectedDate; + } + if (TextVendId.Text != null) + { + _entity.VendId = TextVendId.Text; + } if (TextBoxAskNo.Text != null) { _entity.AskBillNum = TextBoxAskNo.Text; @@ -96,6 +108,18 @@ namespace SCP.Views.沈阳金杯.PlanData { _ls.BeginTimeEnd = (DateTime)TextBillTime2.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; diff --git a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.designer.cs b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.designer.cs index b354f25..ce71b19 100644 --- a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.designer.cs +++ b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx.designer.cs @@ -114,13 +114,49 @@ namespace SCP.Views.沈阳金杯.PlanData protected global::FineUI.DatePicker TextBillTime2; /// - /// FormRow_2 控件。 + /// FormRow2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.FormRow FormRow_2; + protected global::FineUI.FormRow FormRow2; + + /// + /// TextVendId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextVendId; + + /// + /// dp_EndTimeStart 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker dp_EndTimeStart; + + /// + /// dp_EndTimeEnd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker dp_EndTimeEnd; + + /// + /// FormRow_3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_3; /// /// TextBoxAskNo 控件。 @@ -150,13 +186,13 @@ namespace SCP.Views.沈阳金杯.PlanData protected global::FineUI.TextBox TextPartName; /// - /// FormRow_3 控件。 + /// FormRow_4 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.FormRow FormRow_3; + protected global::FineUI.FormRow FormRow_4; /// /// btnQuery 控件。 From eb352c4c795ec53626e32ed9740e6e6746b8a28c Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 24 Nov 2020 13:35:29 +0800 Subject: [PATCH 04/56] =?UTF-8?q?qad=E6=94=B6=E8=B4=A7=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BC=80=E5=85=B3=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UniApiGroup/Config/UniApiConfig.cs | 2 +- .../Controller/OdbcApiQadController.cs | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/UniApiGroup/Config/UniApiConfig.cs b/UniApiGroup/Config/UniApiConfig.cs index 9c5d382..4d83a75 100644 --- a/UniApiGroup/Config/UniApiConfig.cs +++ b/UniApiGroup/Config/UniApiConfig.cs @@ -12,7 +12,7 @@ public bool Qad供应商 { get; set; } = true; public bool Qad供应商零件 { get; set; } = true; public bool Qad采购订单 { get; set; } = false; - //public bool Qad收货单 { get; set; } = true; + public bool Qad收货单 { get; set; } = false; public bool Qad采购收货单 { get; set; } = false; public bool Wms收货单 { get; set; } = true; public bool Wms退货单 { get; set; } = true; diff --git a/UniApiGroup/Controller/OdbcApiQadController.cs b/UniApiGroup/Controller/OdbcApiQadController.cs index 185e203..93aee88 100644 --- a/UniApiGroup/Controller/OdbcApiQadController.cs +++ b/UniApiGroup/Controller/OdbcApiQadController.cs @@ -103,6 +103,19 @@ namespace CK.SCP.GrupUniApi.Controller else continue; break; + case QadTableName.xxqad_prh_det: + if (GlobalVar.ApiConfig.Qadջ) + { + Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); + AddReceive(idb, wdb, qadCtrl.xxqad_seq, 0); + AddReject(idb, wdb, qadCtrl.xxqad_seq, 1); + qadCtrl.xxqad_scm = ((int)UniApiState.ɹ).ToString(); + EntitiesFactory.SaveDb(wdb); + EntitiesFactory.SaveDb(authdb); + } + else + continue; + break; case QadTableName.xxqad_pprice_det: //ɹ۸ Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); UpdatePrice(idb, wdb, qadCtrl.xxqad_seq); @@ -119,14 +132,7 @@ namespace CK.SCP.GrupUniApi.Controller EntitiesFactory.SaveDb(authdb); break; - case QadTableName.xxqad_prh_det: - Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); - AddReceive(idb, wdb, qadCtrl.xxqad_seq,0 ); - AddReject(idb, wdb, qadCtrl.xxqad_seq, 1); - qadCtrl.xxqad_scm = ((int)UniApiState.ɹ).ToString(); - EntitiesFactory.SaveDb(wdb); - EntitiesFactory.SaveDb(authdb); - break; + } //qadCtrl.xxqad_scm = ((int)UniApiState.ɹ).ToString(); //EntitiesFactory.SaveDb(wdb); From d268597f48858d1501c6efe726f3722c446246b1 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 2 Dec 2020 08:47:11 +0800 Subject: [PATCH 05/56] =?UTF-8?q?=E6=B2=88=E9=98=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx | 5 +++-- SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx index 4ed512c..39bd2a4 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx @@ -30,7 +30,7 @@ - @@ -64,7 +64,7 @@ - + @@ -109,6 +109,7 @@ + diff --git a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx index 7d1ef1f..151129a 100644 --- a/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx +++ b/SCP/Views/沈阳金杯/Report/SCP_INCOMPLETE_ASK.aspx @@ -27,7 +27,7 @@ - @@ -101,6 +101,7 @@ + From 13bd049659f25e9bb123de2c04b4d86066a98038 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Fri, 4 Dec 2020 16:53:14 +0800 Subject: [PATCH 06/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx | 202 +++++++++--------- SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs | 18 +- .../SCP_INCOMPLETE_ASK.aspx.designer.cs | 38 +--- .../重庆北汽模塑/PlanData/SCP_ASK.aspx | 2 +- SCP/default.aspx | 4 +- 5 files changed, 112 insertions(+), 152 deletions(-) diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx index 39bd2a4..57eba12 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx @@ -4,99 +4,93 @@ - + - + - - - - + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + -<%-- - - - - - - - - - - - - - --%> - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + IsDatabasePaging="true" AllowPaging="true" SortField="BeginTime" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_INCOMPLETE_ASK_PageIndexChange" + AutoScroll="True" EnableRowDoubleClickEvent="True"> + @@ -106,39 +100,39 @@ - - + + - - + + - + - <%-- --%> + <%-- --%> - + - - - + + + + + + + + + - - - - - - - - - + + + - - + + diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs index f239533..d5ad483 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.cs @@ -90,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") @@ -137,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; diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs index 3135594..21c4f1e 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx.designer.cs @@ -186,58 +186,49 @@ namespace SCP.PlanData protected global::FineUI.TextBox TextPartName; /// - /// TextSubSite 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.TextBox TextSubSite; - - /// - /// TextExtend1 控件。 + /// FormRow_3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TextExtend1; + protected global::FineUI.FormRow FormRow_3; /// - /// TextExtend2 控件。 + /// TextVendId 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TextExtend2; + protected global::FineUI.TextBox TextVendId; /// - /// TextExtend3 控件。 + /// ddl_DayState 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TextExtend3; + protected global::FineUI.DropDownList ddl_DayState; /// - /// FormRow_3 控件。 + /// rb_SendState 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.FormRow FormRow_3; + protected global::FineUI.RadioButtonList rb_SendState; /// - /// TextVendId 控件。 + /// FormRow1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TextVendId; + protected global::FineUI.FormRow FormRow1; /// /// btnQuery 控件。 @@ -248,15 +239,6 @@ namespace SCP.PlanData /// protected global::FineUI.Button btnQuery; - /// - /// rb_SendState 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.RadioButtonList rb_SendState; - /// /// GridINCOM 控件。 /// diff --git a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK.aspx b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK.aspx index d341899..a2884f7 100644 --- a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK.aspx +++ b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK.aspx @@ -30,7 +30,7 @@ - + <%-- diff --git a/SCP/default.aspx b/SCP/default.aspx index beef335..abfd4d5 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('JZ1' == obj.options[i].value) { + if ('CQBMPT' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'JZ1'; + _factory.value = 'CQBMPT'; } } } From 9de8676f6c9098a9789afa1ae36e0eb162591904 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Mon, 7 Dec 2020 11:30:14 +0800 Subject: [PATCH 07/56] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E9=82=AE=E4=BB=B6=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=BE=85=E5=BC=80=E7=A5=A8=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Admin/default.aspx.cs | 2 +- SCP/Common/MailHelper.cs | 35 ++++++++++++++++ SCP/Views/BasicData/SCP_INFO_EDIT.aspx.cs | 42 ++++++++++++++++++- SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx | 4 +- .../SupplierData/SCP_RECEIVE_LIST.aspx.cs | 8 +++- .../SCP_RECEIVE_LIST.aspx.designer.cs | 18 ++++---- UniApiGroup/Controller/MailController.cs | 6 +-- 7 files changed, 96 insertions(+), 19 deletions(-) diff --git a/SCP/Admin/default.aspx.cs b/SCP/Admin/default.aspx.cs index 9abdb72..4a2b7f7 100644 --- a/SCP/Admin/default.aspx.cs +++ b/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); } diff --git a/SCP/Common/MailHelper.cs b/SCP/Common/MailHelper.cs index 6009803..6872f9d 100644 --- a/SCP/Common/MailHelper.cs +++ b/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(_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 += "尊敬的供应商"; + mailbody += "你好!"; + mailbody += "" + p_Content + " ,请到供应商SCP网站" + ConfigurationManager.AppSettings["ResetPassWord"] + "打开查看下载!"; + mailbody += "日期:" + DateTime.Now; + MyWebSmtpMail webmail = new MyWebSmtpMail(); + webmail.Send(mails, mailbody, p_title); + } + } + } + } /// /// 发邮件给采购 /// diff --git a/SCP/Views/BasicData/SCP_INFO_EDIT.aspx.cs b/SCP/Views/BasicData/SCP_INFO_EDIT.aspx.cs index c0e6b35..b97369e 100644 --- a/SCP/Views/BasicData/SCP_INFO_EDIT.aspx.cs +++ b/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 { @@ -189,8 +190,9 @@ namespace SCP.BasicData return; } - model.SupplierCode = GetSupplierCodes("Some"); + 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) { diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx index 96913e9..5fde5d1 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx @@ -43,7 +43,6 @@ - @@ -78,7 +77,8 @@ - + + diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs index 78e223e..1e5c6b8 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs @@ -88,6 +88,8 @@ namespace SCP.SupplierData _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; @@ -402,6 +404,7 @@ namespace SCP.SupplierData _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; @@ -446,7 +449,8 @@ namespace SCP.SupplierData { { "ProjectId", "项目编号" }, { "BillType_DESC", "单据类型" }, - { "RecvBillNum", "单据编号" }, + { "ErpRecvBillNum", "ERP单据编号" }, + { "RecvBillNum", "WMS单据编号" }, { "AsnBillNum", "发货单号" }, { "VendName", "供应商" }, { "VendId", "供应商编码" }, @@ -458,7 +462,7 @@ namespace SCP.SupplierData { "Currency", "币种" }, { "CanQty", "可开票数量" }, { "Price", "单价" }, - { "CreateTime", "创建时间" } + { "CreateTime", "收货时间" } }; string url = EntityListToExcel2003(cellheader,_lst , "审核明细"); } diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs index 90137c0..380d187 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs @@ -122,15 +122,6 @@ namespace SCP.SupplierData /// protected global::FineUI.Button btn_Search; - /// - /// qq 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Button qq; - /// /// DDL_VEND_LIST 控件。 /// @@ -257,6 +248,15 @@ namespace SCP.SupplierData /// protected global::FineUI.FormRow FormRow_3; + /// + /// TXT_ERPBillNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_ERPBillNo; + /// /// TXT_RECEIVE 控件。 /// diff --git a/UniApiGroup/Controller/MailController.cs b/UniApiGroup/Controller/MailController.cs index d0f516d..dbaf476 100644 --- a/UniApiGroup/Controller/MailController.cs +++ b/UniApiGroup/Controller/MailController.cs @@ -54,10 +54,10 @@ namespace CK.SCP.UniApi.Controller { continue; } - var aaa = ToDataTable(stocklist); - var bb = GetHtmlString(aaa); + var dt_stocklist = ToDataTable(stocklist); + var html_stocklist = GetHtmlString(dt_stocklist); MyWebSmtpMail webmail = new MyWebSmtpMail(); - webmail.Send(mails, bb, "库存"); + webmail.Send(mails, html_stocklist, "库存"); Console.WriteLine($"发送邮件:供应商编码为{ itm.Key}"); } } From 810a1910c5c5afe8d8059312b0a96a375311ff25 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Mon, 7 Dec 2020 13:08:18 +0800 Subject: [PATCH 08/56] =?UTF-8?q?=E5=BE=85=E5=BC=80=E7=A5=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx | 2 +- SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx index 5fde5d1..1d8f18b 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx @@ -170,7 +170,7 @@ - + diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs index 1e5c6b8..3fc2be8 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs @@ -462,7 +462,7 @@ namespace SCP.SupplierData { "Currency", "币种" }, { "CanQty", "可开票数量" }, { "Price", "单价" }, - { "CreateTime", "收货时间" } + { "ShipTime", "收货时间" } }; string url = EntityListToExcel2003(cellheader,_lst , "审核明细"); } From a09f33ff0fdabc220a975478c5a468599a9fc276 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 10 Dec 2020 09:13:47 +0800 Subject: [PATCH 09/56] =?UTF-8?q?=E9=87=8D=E5=BA=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_ASK_CONTROLLER.cs | 103 +++++++++++++++--- SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx | 2 +- SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs | 7 +- .../SCP_PO_CREATE_ASK.aspx.designer.cs | 4 +- SCP/Views/SupplierData/SCP_ASN_CREATE.aspx | 3 +- SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx | 1 + SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs | 1 + .../SCP_ASN_DETAIL.aspx.designer.cs | 82 +++++++------- .../PlanData/SCP_ASK_DETAIL.aspx | 12 +- .../PlanData/SCP_ASK_DETAIL.aspx.cs | 33 ++++-- .../PlanData/SCP_ASK_DETAIL.aspx.designer.cs | 102 ++++++++++------- .../SupplierData/SCP_ASK_DETAIL.aspx | 6 +- .../SupplierData/SCP_ASK_DETAIL.aspx.cs | 5 +- .../SCP_ASK_DETAIL.aspx.designer.cs | 69 +++++++----- .../SupplierData/SCP_ASN_CREATE.aspx | 3 +- .../SupplierData/SCP_ASN_CREATE.aspx.cs | 1 + .../SCP_ASN_CREATE.aspx.designer.cs | 93 +++++++++------- 17 files changed, 342 insertions(+), 185 deletions(-) diff --git a/Controller/SCP_ASK_CONTROLLER.cs b/Controller/SCP_ASK_CONTROLLER.cs index 2fbf00a..8b34cda 100644 --- a/Controller/SCP_ASK_CONTROLLER.cs +++ b/Controller/SCP_ASK_CONTROLLER.cs @@ -805,7 +805,7 @@ namespace CK.SCP.Controller throw e; } return _ret; - } + } public static ResultObject Save_TB_ASK_DETAIL(List p_entitys, AskState p_state) { ResultObject _ret = new ResultObject(); @@ -920,12 +920,87 @@ namespace CK.SCP.Controller } return _ret; } - /// - /// - /// - /// - /// - public static ResultObject Save_TB_PO(List p_entitys) + public static ResultObject Update_TB_ASK(TB_ASK p_entitys) + { + ResultObject _ret = new ResultObject(); + 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; + } + + /// + /// + /// + /// + /// + public static ResultObject Save_TB_PO(List p_entitys) { ResultObject _ret = new ResultObject(); try @@ -1558,7 +1633,7 @@ namespace CK.SCP.Controller } } - + public static void Get_V_TB_ASK_DETAIL_Sum(V_TB_ASK_DETAIL p_entity, Action>> p_action) { @@ -1807,7 +1882,7 @@ namespace CK.SCP.Controller try { using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { + { if (p_state == AskState.Close) { var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); @@ -1877,19 +1952,19 @@ namespace CK.SCP.Controller if (p_state == AskState.Confirm) { var _ls = db.TB_ASK.Where(p => p_list.Contains(p.AskBillNum)).ToList(); - int count = _ls.Count(p => p.State == (int)AskState.Release); + int count = _ls.Count(p => p.State == (int)AskState.Release); if (count == _ls.Count && _ls.Count > 0) { _ls.ForEach(p => { - p.State = (int)AskState.Confirm; + p.State = (int)AskState.Confirm; var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); _list.ForEach(itm => { itm.State = (int)AskState.Confirm; - itm.UpdateTime = DateTime.Now; + itm.UpdateTime = DateTime.Now; } ); @@ -1945,7 +2020,7 @@ namespace CK.SCP.Controller { _ls.ForEach(p => { - p.State = (int)AskState.Release; + p.State = (int)AskState.Release; var _list = db.TB_ASK_DETAIL.Where(itm => itm.AskBillNum == p.AskBillNum).ToList(); _list.ForEach(itm => { @@ -2089,7 +2164,7 @@ namespace CK.SCP.Controller _ret.Message = "选择的记录,有不是新建或发布状态记录!"; } - } + } if (p_state == AskState.NoConfirm) { var _ls = db.TB_ASN.Where(p => p_list.Contains(p.AskBillNum) && p.IsDeleted == false).ToList(); diff --git a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx index a719f5d..b8aca09 100644 --- a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx +++ b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx @@ -60,7 +60,7 @@ <%-- --%> - + diff --git a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs index 1db3211..c504439 100644 --- a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs +++ b/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_SubSite.Text = _result.SubSite; - this.TXT_Extend1.Text = _result.Extend1; + this.TXT_Remark.Text = _result.Extend1; + this.TXT_SubSite.Text = _result.SubSite; 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; diff --git a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs index fe135d1..3423c35 100644 --- a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs +++ b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs @@ -159,13 +159,13 @@ namespace SCP.PlanData protected global::FineUI.TextBox TXT_Site; /// - /// txtRemark 控件。 + /// TXT_Remark 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtRemark; + protected global::FineUI.TextBox TXT_Remark; /// /// gp1 控件。 diff --git a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx index 1086d43..b1003cc 100644 --- a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx +++ b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx @@ -40,7 +40,7 @@ - + @@ -48,6 +48,7 @@ + <%-- --%> diff --git a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx index 6a39463..9d9e8d2 100644 --- a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx +++ b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx @@ -50,6 +50,7 @@ + diff --git a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs index a764d63..4c50c6c 100644 --- a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs +++ b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.cs @@ -72,6 +72,7 @@ namespace SCP.SupplierData DP_ReceiveTime.SelectedDate = _result.ReceiveTime; DP_ShipTime.SelectedDate = _result.ShipTime; TXT_StateDesc.Text = _result.State_DESC; + TXT_KBremark.Text = _result.Extend1; } SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj => { diff --git a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs index 2f07e4c..e831b74 100644 --- a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs +++ b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx.designer.cs @@ -7,11 +7,10 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.SupplierData { - - - public partial class SCP_ASN_DETAIL { - +namespace SCP.SupplierData +{ + public partial class SCP_ASN_DETAIL + { /// /// form1 控件。 /// @@ -20,7 +19,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,7 +28,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar2 控件。 /// @@ -38,7 +37,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar2; - + /// /// btnRefresh 控件。 /// @@ -47,7 +46,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnRefresh; - + /// /// btnSend 控件。 /// @@ -56,7 +55,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnSend; - + /// /// btnPrint 控件。 /// @@ -65,7 +64,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnPrint; - + /// /// btnPackage 控件。 /// @@ -74,7 +73,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnPackage; - + /// /// btnCancel 控件。 /// @@ -83,7 +82,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnCancel; - + /// /// FormRow_1 控件。 /// @@ -92,7 +91,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_1; - + /// /// TXT_StateDesc 控件。 /// @@ -101,7 +100,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_StateDesc; - + /// /// TXT_AsnBillNum 控件。 /// @@ -110,7 +109,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_AsnBillNum; - + /// /// TXT_VendName 控件。 /// @@ -119,7 +118,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendName; - + /// /// TXT_Site 控件。 /// @@ -128,7 +127,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Site; - + /// /// FormRow_2 控件。 /// @@ -137,7 +136,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_2; - + /// /// DP_ShipTime 控件。 /// @@ -146,7 +145,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DP_ShipTime; - + /// /// TXT_ShipUser 控件。 /// @@ -155,7 +154,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_ShipUser; - + /// /// DP_ReceiveTime 控件。 /// @@ -164,7 +163,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DP_ReceiveTime; - + /// /// TXT_ReceiveUser 控件。 /// @@ -173,7 +172,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_ReceiveUser; - + /// /// FormRow_3 控件。 /// @@ -182,7 +181,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_3; - + /// /// TXT_PlateNumber 控件。 /// @@ -191,7 +190,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_PlateNumber; - + /// /// TXT_Remark 控件。 /// @@ -200,7 +199,16 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Remark; - + + /// + /// TXT_KBremark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_KBremark; + /// /// Toolbar1 控件。 /// @@ -209,7 +217,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar1; - + /// /// btnCreateBarCode 控件。 /// @@ -218,7 +226,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnCreateBarCode; - + /// /// btnSelectedBarCode 控件。 /// @@ -227,7 +235,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnSelectedBarCode; - + /// /// btnOutputPallet 控件。 /// @@ -236,7 +244,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnOutputPallet; - + /// /// btnBarCodeList 控件。 /// @@ -245,7 +253,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnBarCodeList; - + /// /// btnOutPut 控件。 /// @@ -254,7 +262,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnOutPut; - + /// /// Grid_V_TB_ASN_DETAIL 控件。 /// @@ -263,7 +271,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_ASN_DETAIL; - + /// /// ToolbarSeparator1 控件。 /// @@ -272,7 +280,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -281,7 +289,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarText ToolbarText1; - + /// /// ddlGridPageSize 控件。 /// @@ -290,7 +298,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddlGridPageSize; - + /// /// Window1 控件。 /// @@ -299,7 +307,7 @@ namespace SCP.SupplierData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window Window1; - + /// /// WindowUpload 控件。 /// diff --git a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx index 7d245c5..c102d42 100644 --- a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx +++ b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx @@ -32,6 +32,8 @@ + + @@ -49,12 +51,16 @@ - - + + + + + - + + diff --git a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.cs b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.cs index fde7161..5a5c1ef 100644 --- a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.cs +++ b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.cs @@ -57,7 +57,7 @@ namespace SCP.重庆北汽模塑.PlanData this.btnRelease.Text = GetNameByKey(this.btnRelease.Text); this.BTN_SAVE.Text = GetNameByKey(this.BTN_SAVE.Text); this.btnCompleteForce.Text = GetNameByKey(this.btnCompleteForce.Text); - txtRemark.Label = GetNameByKey(txtRemark.Label); + TXT_KBremark.Label = GetNameByKey(TXT_KBremark.Label); TXT_PoBillNum.Label = GetNameByKey(TXT_PoBillNum.Label); TXT_Site.Label = GetNameByKey(TXT_Site.Label); TXT_State_DESC.Label = GetNameByKey(TXT_State_DESC.Label); @@ -104,9 +104,10 @@ namespace SCP.重庆北汽模塑.PlanData TXT_ModType.Text = _result.ModType.ToString(); TXT_State.Text = _result.State == null ? string.Empty : _result.State.Value.ToString(); this.TXT_VendName.Text = _result.VendName; - this.txtRemark.Text = _result.Remark; + this.TXT_KBremark.Text = _result.Extend1; 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; @@ -123,10 +124,12 @@ namespace SCP.重庆北汽模塑.PlanData btnReduce.Hidden = true; btnDeleted.Hidden = false; btnModifyDate.Hidden = false; + } - //发布 + //发布0 if (_result.State == (int)AskState.Release) { + btnRelease.Hidden = true; btnReleaseCancel.Hidden = false; btnCompleteForce.Hidden = true; @@ -143,6 +146,7 @@ namespace SCP.重庆北汽模塑.PlanData //确认 if (_result.State == (int)AskState.Confirm) { + btnRelease.Hidden = true; btnReleaseCancel.Hidden = true; BTN_SAVE.Hidden = true; @@ -156,6 +160,7 @@ namespace SCP.重庆北汽模塑.PlanData //作废 if (_result.State == (int)AskState.Reject) { + btnRelease.Hidden = true; btnReleaseCancel.Hidden = true; btnReject.Hidden = true; @@ -204,14 +209,13 @@ namespace SCP.重庆北汽模塑.PlanData protected void btnRelease_Click(object sender, EventArgs e) { SET_PO_STATE("发布成功!", AskState.Release); - } - + } protected void btnReleaseCancel_Click(object sender, EventArgs e) { SET_PO_STATE("取消发布成功!", AskState.New); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } - + protected void btnCompleteForce_Click(object sender, EventArgs e) { SET_PO_STATE("强制归档成功!", AskState.CompleteForce); @@ -335,7 +339,22 @@ namespace SCP.重庆北汽模塑.PlanData Alert.Show(string.Join(",", ret.MessageList.ToArray())); } } - protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) + protected void btnUpdate_Click(object sender, EventArgs e) + { + TB_ASK entity = new TB_ASK(); + entity.AskBillNum = TXT_AskBillNum.Text; + entity.Extend1 = TXT_KBremark.Text; + var ret = SCP_ASK_CONTROLLER.Update_TB_ASK(entity); + if (ret.State == ReturnStatus.Succeed) + { + Alert.Show("修改成功"); + }else + { + Alert.Show("修改失败"); + } + } + + protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); BindDetail(); diff --git a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.designer.cs b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.designer.cs index 378c1ca..5123bd8 100644 --- a/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.designer.cs +++ b/SCP/Views/重庆北汽模塑/PlanData/SCP_ASK_DETAIL.aspx.designer.cs @@ -7,11 +7,13 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.重庆北汽模塑.PlanData { - - - public partial class SCP_ASK_DETAIL { - +namespace SCP.重庆北汽模塑.PlanData +{ + + + public partial class SCP_ASK_DETAIL + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,7 +31,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar2 控件。 /// @@ -38,7 +40,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar2; - + /// /// BTN_refresh 控件。 /// @@ -47,7 +49,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button BTN_refresh; - + /// /// btnRelease 控件。 /// @@ -56,7 +58,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnRelease; - + /// /// btnReleaseCancel 控件。 /// @@ -65,7 +67,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnReleaseCancel; - + /// /// btnCompleteForce 控件。 /// @@ -74,7 +76,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnCompleteForce; - + /// /// btnReject 控件。 /// @@ -83,7 +85,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnReject; - + /// /// BTN_SAVE 控件。 /// @@ -92,7 +94,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button BTN_SAVE; - + /// /// btnReduce 控件。 /// @@ -101,7 +103,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnReduce; - + /// /// btnDeleted 控件。 /// @@ -110,7 +112,16 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnDeleted; - + + /// + /// btnUpdate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnUpdate; + /// /// F_PO_DETAIL 控件。 /// @@ -119,7 +130,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Form F_PO_DETAIL; - + /// /// TXT_State_DESC 控件。 /// @@ -128,7 +139,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_State_DESC; - + /// /// TXT_PoBillNum 控件。 /// @@ -137,7 +148,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_PoBillNum; - + /// /// TXT_VendName 控件。 /// @@ -146,7 +157,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendName; - + /// /// TXT_VendId 控件。 /// @@ -155,7 +166,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendId; - + /// /// TXT_Site 控件。 /// @@ -164,34 +175,43 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Site; - + /// - /// txtRemark 控件。 + /// DP_BeginTime 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtRemark; - + protected global::FineUI.DatePicker DP_BeginTime; + /// - /// DP_BeginTime 控件。 + /// DP_EndTime 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DatePicker DP_BeginTime; - + protected global::FineUI.DatePicker DP_EndTime; + /// - /// DP_EndTime 控件。 + /// TXT_KBremark 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DatePicker DP_EndTime; - + protected global::FineUI.TextBox TXT_KBremark; + + /// + /// TXT_AskBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_AskBillNum; + /// /// btnModifyDate 控件。 /// @@ -200,7 +220,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnModifyDate; - + /// /// Grid_V_TB_ASK_DETAIL 控件。 /// @@ -209,7 +229,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_ASK_DETAIL; - + /// /// ToolbarSeparator1 控件。 /// @@ -218,7 +238,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -227,7 +247,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarText ToolbarText1; - + /// /// ddlGridPageSize 控件。 /// @@ -236,7 +256,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddlGridPageSize; - + /// /// NB_PublishNum 控件。 /// @@ -245,7 +265,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.TextBox NB_PublishNum; - + /// /// NumberBox1 控件。 /// @@ -254,7 +274,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.NumberBox NumberBox1; - + /// /// Window1 控件。 /// @@ -263,7 +283,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window Window1; - + /// /// WindowUpload 控件。 /// @@ -272,7 +292,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window WindowUpload; - + /// /// TXT_ModType 控件。 /// @@ -281,7 +301,7 @@ namespace SCP.重庆北汽模塑.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.HiddenField TXT_ModType; - + /// /// TXT_State 控件。 /// diff --git a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx index cef79e9..371baa1 100644 --- a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx +++ b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx @@ -43,8 +43,10 @@ - - + + + + diff --git a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.cs b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.cs index 3ca68c0..652980f 100644 --- a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.cs +++ b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.cs @@ -90,9 +90,10 @@ namespace SCP.重庆北汽模塑 this.TXT_State_DESC.Text = _result.State_DESC; TXT_ModType.Text = _result.ModType.ToString(); this.TXT_VendName.Text = _result.VendName; - this.txtRemark.Text = _result.Remark; + this.SMRemark.Text = _result.Remark; + this.TXT_Remark.Text = _result.Extend1; DP_BeginTime.SelectedDate = _result.BeginTime; - + } }); } diff --git a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.designer.cs b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.designer.cs index 47b0391..3d7c47a 100644 --- a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.designer.cs +++ b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASK_DETAIL.aspx.designer.cs @@ -7,11 +7,13 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.重庆北汽模塑 { - - - public partial class SCP_ASK_DETAIL { - +namespace SCP.重庆北汽模塑 +{ + + + public partial class SCP_ASK_DETAIL + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,7 +31,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar2 控件。 /// @@ -38,7 +40,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar2; - + /// /// BTN_refresh 控件。 /// @@ -47,7 +49,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button BTN_refresh; - + /// /// btnConfirm 控件。 /// @@ -56,7 +58,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnConfirm; - + /// /// btnNoConfirm 控件。 /// @@ -65,7 +67,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnNoConfirm; - + /// /// FormRow_1 控件。 /// @@ -74,7 +76,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_1; - + /// /// TXT_State_DESC 控件。 /// @@ -83,7 +85,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_State_DESC; - + /// /// TXT_PoBillNum 控件。 /// @@ -92,7 +94,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_PoBillNum; - + /// /// TXT_VendName 控件。 /// @@ -101,7 +103,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendName; - + /// /// FormRow_2 控件。 /// @@ -110,7 +112,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_2; - + /// /// TXT_Site 控件。 /// @@ -119,7 +121,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Site; - + /// /// DP_BeginTime 控件。 /// @@ -128,7 +130,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DP_BeginTime; - + /// /// FormRow_3 控件。 /// @@ -137,16 +139,25 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_3; - + + /// + /// SMRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox SMRemark; + /// - /// txtRemark 控件。 + /// TXT_Remark 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtRemark; - + protected global::FineUI.TextBox TXT_Remark; + /// /// Grid_V_TB_ASK_DETAIL 控件。 /// @@ -155,7 +166,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_ASK_DETAIL; - + /// /// ToolbarSeparator1 控件。 /// @@ -164,7 +175,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -173,7 +184,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarText ToolbarText1; - + /// /// ddlGridPageSize 控件。 /// @@ -182,7 +193,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddlGridPageSize; - + /// /// TXT_ModType 控件。 /// @@ -191,7 +202,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.HiddenField TXT_ModType; - + /// /// TXT_State 控件。 /// @@ -200,7 +211,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.HiddenField TXT_State; - + /// /// Window1 控件。 /// @@ -209,7 +220,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window Window1; - + /// /// WindowUpload 控件。 /// diff --git a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx index 7c1ca50..fc3350e 100644 --- a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx +++ b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx @@ -36,7 +36,7 @@ - + @@ -44,6 +44,7 @@ + diff --git a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.cs b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.cs index 600158e..8e2c2bb 100644 --- a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.cs +++ b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.cs @@ -81,6 +81,7 @@ namespace SCP.重庆北汽模塑 this.TXT_State_Desc.Text = _result.State_DESC; this.TXT_VendName.Text = _result.VendName; this.TXT_Remark.Text = _result.Remark; + this.TXT_KBremark.Text = _result.Extend1; DP_ShipTime.SelectedDate = DateTime.Now; DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID)); DDL_PORT.DataBind(); diff --git a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.designer.cs b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.designer.cs index 9eef6f1..f1668cd 100644 --- a/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.designer.cs +++ b/SCP/Views/重庆北汽模塑/SupplierData/SCP_ASN_CREATE.aspx.designer.cs @@ -7,11 +7,13 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.重庆北汽模塑 { - - - public partial class SCP_ASN_CREATE { - +namespace SCP.重庆北汽模塑 +{ + + + public partial class SCP_ASN_CREATE + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// pmg1 控件。 /// @@ -29,7 +31,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.PageManager pmg1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar1 控件。 /// @@ -47,7 +49,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar1; - + /// /// btnCreate 控件。 /// @@ -56,7 +58,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnCreate; - + /// /// FormRow1 控件。 /// @@ -65,7 +67,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow1; - + /// /// FormRow_1 控件。 /// @@ -74,7 +76,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_1; - + /// /// TXT_State_Desc 控件。 /// @@ -83,7 +85,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_State_Desc; - + /// /// TXT_AskBillNum 控件。 /// @@ -92,7 +94,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_AskBillNum; - + /// /// TXT_VendName 控件。 /// @@ -101,7 +103,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendName; - + /// /// TXT_Site 控件。 /// @@ -110,7 +112,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Site; - + /// /// FormRow_2 控件。 /// @@ -119,7 +121,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_2; - + /// /// TXT_PlateNumber 控件。 /// @@ -128,7 +130,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_PlateNumber; - + /// /// TXT_ShipUser 控件。 /// @@ -137,7 +139,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_ShipUser; - + /// /// DP_ShipTime 控件。 /// @@ -146,7 +148,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DP_ShipTime; - + /// /// DP_ReceiveTime 控件。 /// @@ -155,7 +157,16 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DP_ReceiveTime; - + + /// + /// TXT_KBremark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_KBremark; + /// /// FormRow_3 控件。 /// @@ -164,7 +175,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow FormRow_3; - + /// /// DDL_PORT 控件。 /// @@ -173,7 +184,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList DDL_PORT; - + /// /// TXT_Remark 控件。 /// @@ -182,7 +193,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Remark; - + /// /// Grid_V_TB_ASK_DETAIL 控件。 /// @@ -191,7 +202,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_ASK_DETAIL; - + /// /// ToolbarSeparator1 控件。 /// @@ -200,7 +211,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -209,7 +220,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarText ToolbarText1; - + /// /// ddlGridPageSize 控件。 /// @@ -218,7 +229,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddlGridPageSize; - + /// /// TXT_PackQty 控件。 /// @@ -227,7 +238,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.NumberBox TXT_PackQty; - + /// /// TXT_VendBatch 控件。 /// @@ -236,7 +247,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendBatch; - + /// /// DatePicker1 控件。 /// @@ -245,7 +256,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DatePicker1; - + /// /// txtBatch1 控件。 /// @@ -254,7 +265,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtBatch1; - + /// /// NumberBox1 控件。 /// @@ -263,7 +274,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.NumberBox NumberBox1; - + /// /// DatePicker2 控件。 /// @@ -272,7 +283,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DatePicker2; - + /// /// TextBox1 控件。 /// @@ -281,7 +292,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TextBox1; - + /// /// NumberBox2 控件。 /// @@ -290,7 +301,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.NumberBox NumberBox2; - + /// /// DatePicker3 控件。 /// @@ -299,7 +310,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DatePicker3; - + /// /// TextBox2 控件。 /// @@ -308,7 +319,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TextBox2; - + /// /// NumberBox4 控件。 /// @@ -317,7 +328,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.NumberBox NumberBox4; - + /// /// Window1 控件。 /// @@ -326,7 +337,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window Window1; - + /// /// WindowUpload 控件。 /// @@ -335,7 +346,7 @@ namespace SCP.重庆北汽模塑 { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window WindowUpload; - + /// /// TXT_State 控件。 /// From 65479a2a5f3f3533550d394b842cfabfe22d9607 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 10 Dec 2020 15:28:45 +0800 Subject: [PATCH 10/56] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs | 26 +++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs b/SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs index d14ae03..487fa92 100644 --- a/SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs +++ b/SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs @@ -111,13 +111,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 _ls = new List(); 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); + if (_selections.Contains(i)) + { + + object[] rowDataKeys = Grid_V_TB_PO.DataKeys[i]; + _ls.Add(rowDataKeys[1] as string); + } + } + if (_ls.Count == 0) + { + Alert.Show("请选择记录导出!"); + return; } - DataSet ds=SCP_EXCEL_CONTROLLER.GET_PO_EXECEL(_ls); + //List _ls = new List(); + //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, "采购订单"); } From 7997aee7b9ae5c99d21a811165cc9ecee2e4f485 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 17 Dec 2020 08:28:56 +0800 Subject: [PATCH 11/56] =?UTF-8?q?qad=E6=8E=A5=E5=8F=A3=E4=BF=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UniApiGroup/Controller/OdbcApiQadController.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/UniApiGroup/Controller/OdbcApiQadController.cs b/UniApiGroup/Controller/OdbcApiQadController.cs index 93aee88..286a768 100644 --- a/UniApiGroup/Controller/OdbcApiQadController.cs +++ b/UniApiGroup/Controller/OdbcApiQadController.cs @@ -34,11 +34,19 @@ namespace CK.SCP.GrupUniApi.Controller { public static void GetNewCtrlList() { + List _lst = new List(); + _lst.Add("xxqad_pt_mstr"); + _lst.Add("xxqad_vd_mstr"); + _lst.Add("xxqad_vp_mstr"); + _lst.Add("xxqad_pod_det"); + _lst.Add("xxqad_prh_det"); + _lst.Add("xxqad_pprice_det"); + _lst.Add("xxqad_ppod_det"); UniApiEntities idb = EntitiesFactory.CreateUniApiInstance(); idb.Database.CommandTimeout = 60 * 20; var tableNameList = EnumHelper.EnumToList(); // var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_domain == ScpCache.Config.QAD && p.xxqad_scm == "0").ToList(); - var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_scm == "0" ).ToList(); + var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_scm == "0" && _lst.Contains(p.xxqad_table)).ToList(); foreach (var qadCtrl in qadCtrlList) { if (tableNameList.All(p => p.Name != qadCtrl.xxqad_table)) continue; From 2069df707492de218e82d4ba1a4a0b2108c55a4a Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Tue, 22 Dec 2020 10:23:32 +0800 Subject: [PATCH 12/56] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs b/SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs index ef2ef6d..dccef7b 100644 --- a/SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs +++ b/SCP/Views/Report/SCP_SUPPLIERS_REGUALARLY.aspx.cs @@ -132,7 +132,6 @@ namespace SCP.Views.Report { "AskBillNum", "要货单号" }, { "RecvBillNum", "收货单" }, { "PoBillNum", "订单号" }, - { "AskBillNum", "要货单号" }, { "PoLine", "行号" } }; From 1e9b2ed655785d5eda4462616f6cbeb07e339563 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Mon, 28 Dec 2020 12:37:14 +0800 Subject: [PATCH 13/56] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_INVOICE_CONTROLLER.cs | 9 +- SCP/SCP.csproj | 24 ++ SCP/Views/PlanData/SCP_ASK.aspx | 2 +- SCP/Views/Quality/SCP_QUALITY_CREATE.aspx | 88 ++++++ SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs | 109 ++++++++ .../SCP_QUALITY_CREATE.aspx.designer.cs | 107 ++++++++ SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx | 107 ++++++++ SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs | 143 ++++++++++ .../SCP_QUALITY_MANAGER.aspx.designer.cs | 251 ++++++++++++++++++ SCP/Views/Quality/SCP_SQE.aspx | 59 ++++ SCP/Views/Quality/SCP_SQE.aspx.cs | 96 +++++++ SCP/Views/Quality/SCP_SQE.aspx.designer.cs | 98 +++++++ SCP/Views/SupplierData/SCP_INVOICE.aspx | 3 + SCP/Views/SupplierData/SCP_INVOICE.aspx.cs | 20 +- .../SupplierData/SCP_INVOICE_CREATE.aspx | 2 +- SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs | 9 +- 16 files changed, 1113 insertions(+), 14 deletions(-) create mode 100644 SCP/Views/Quality/SCP_QUALITY_CREATE.aspx create mode 100644 SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs create mode 100644 SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs create mode 100644 SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx create mode 100644 SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs create mode 100644 SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs create mode 100644 SCP/Views/Quality/SCP_SQE.aspx create mode 100644 SCP/Views/Quality/SCP_SQE.aspx.cs create mode 100644 SCP/Views/Quality/SCP_SQE.aspx.designer.cs diff --git a/Controller/SCP_INVOICE_CONTROLLER.cs b/Controller/SCP_INVOICE_CONTROLLER.cs index 190c381..70ff070 100644 --- a/Controller/SCP_INVOICE_CONTROLLER.cs +++ b/Controller/SCP_INVOICE_CONTROLLER.cs @@ -1097,6 +1097,7 @@ namespace CK.SCP.Controller { ResultObject _ret = new ResultObject(); List _list = new List(); + List _listpartcode = new List();//超过分摊零件集合 try { using (ScpEntities db = EntitiesFactory.CreateScpInstance()) @@ -1151,8 +1152,12 @@ namespace CK.SCP.Controller var _num = _moldsharing.Count + p.Qty; if (_moldsharing.Qty < _num) { - string _str ="供应商"+ _moldsharing .VendId+ "零件名称"+ _moldsharing.PartCode+"超过分摊数量"+ (_num- _moldsharing.Qty).ToString(); - _list.Add(_str); + string _str = "供应商" + _moldsharing.VendId + "零件名称" + _moldsharing.PartCode + "超过分摊数量,分摊数量剩余" + (_moldsharing.Qty - _moldsharing.Count).ToString(); + if (!_listpartcode.Contains(_moldsharing.PartCode)) + { + _listpartcode.Add(_moldsharing.PartCode); + _list.Add(_str); + } } else { diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj index 03451e8..a3a9b2b 100644 --- a/SCP/SCP.csproj +++ b/SCP/SCP.csproj @@ -2933,6 +2933,9 @@ + + + @@ -5264,6 +5267,27 @@ SCP_UNI_API.aspx + + SCP_QUALITY_CREATE.aspx + ASPXCodeBehind + + + SCP_QUALITY_CREATE.aspx + + + SCP_QUALITY_MANAGER.aspx + ASPXCodeBehind + + + SCP_QUALITY_MANAGER.aspx + + + SCP_SQE.aspx + ASPXCodeBehind + + + SCP_SQE.aspx + SCP_ARRIVE_REPORT.aspx ASPXCodeBehind diff --git a/SCP/Views/PlanData/SCP_ASK.aspx b/SCP/Views/PlanData/SCP_ASK.aspx index 7e803a5..ed93d31 100644 --- a/SCP/Views/PlanData/SCP_ASK.aspx +++ b/SCP/Views/PlanData/SCP_ASK.aspx @@ -114,7 +114,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs b/SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs new file mode 100644 index 0000000..8b219df --- /dev/null +++ b/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> 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); + } + }); + } + /// + /// 绑定明细 + /// + public void BindDetail() + { + SearchV_TB_ASN_DETAILData((ret) => { + Grid_V_TB_ASN_DETAIL.RecordCount = ret.Count(); + var list = SortAndPage(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 _list = new List(); + Dictionary> 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(rowDataKeys[0]); + _entity.PoBillNum = rowDataKeys[1] as string; + _entity.PoLine = ConvertHelper.To(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(_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(); + } + + + } +} \ No newline at end of file diff --git a/SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs b/SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs new file mode 100644 index 0000000..2a4d1ab --- /dev/null +++ b/SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.Quality +{ + + + public partial class SCP_QUALITY_CREATE + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar2; + + /// + /// btnRelease 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnRelease; + + /// + /// TXT_AsnBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_AsnBillNum; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnQuery; + + /// + /// Grid_V_TB_ASN_DETAIL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid_V_TB_ASN_DETAIL; + + /// + /// NB_PublishNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox NB_PublishNum; + + /// + /// fail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList fail; + + /// + /// highlightRows 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.HiddenField highlightRows; + } +} diff --git a/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx b/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx new file mode 100644 index 0000000..d056fc9 --- /dev/null +++ b/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" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs b/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs new file mode 100644 index 0000000..dd0a82a --- /dev/null +++ b/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(result, Grid_TB_QUALITY); + Grid_TB_QUALITY.DataSource = list; + Grid_TB_QUALITY.DataBind(); + }); + } + public void Search(Action> 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 cellheader = new Dictionary(); + 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 _ls = new List(); + 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")); + } + } +} \ No newline at end of file diff --git a/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs b/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs new file mode 100644 index 0000000..dec7ed6 --- /dev/null +++ b/SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs @@ -0,0 +1,251 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.Quality +{ + + + public partial class SCP_QUALITY_MANAGER + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// pmg1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.PageManager pmg1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar2; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnNew; + + /// + /// btnOutput 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnOutput; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnDelete; + + /// + /// btnSQE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnSQE; + + /// + /// FormRow1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow1; + + /// + /// TXT_Code 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_Code; + + /// + /// TXT_AsnBill 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_AsnBill; + + /// + /// TXT_PoBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_PoBillNum; + + /// + /// TXT_PageCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_PageCode; + + /// + /// FormRow_1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_1; + + /// + /// TXT_Vendid 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList TXT_Vendid; + + /// + /// TXT_PartCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_PartCode; + + /// + /// TXT_Batch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_Batch; + + /// + /// FormRow_3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_3; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnQuery; + + /// + /// Grid_TB_QUALITY 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid_TB_QUALITY; + + /// + /// ToolbarSeparator2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator2; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarText ToolbarText1; + + /// + /// ddlGridPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlGridPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window1; + + /// + /// WindowUpload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window WindowUpload; + + /// + /// TXT_State 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.HiddenField TXT_State; + } +} diff --git a/SCP/Views/Quality/SCP_SQE.aspx b/SCP/Views/Quality/SCP_SQE.aspx new file mode 100644 index 0000000..d2a1db6 --- /dev/null +++ b/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" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCP/Views/Quality/SCP_SQE.aspx.cs b/SCP/Views/Quality/SCP_SQE.aspx.cs new file mode 100644 index 0000000..595dfdc --- /dev/null +++ b/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> 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); + } + }); + } + /// + /// 绑定明细 + /// + public void BindDetail() + { + SearchData((ret) => { + Grid_SQE.RecordCount = ret.Count(); + var list = SortAndPage(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 cellheader = new Dictionary(){ + {"VendId" , "供应商编码" }, + {"VendName" , "供应商名称" }, + { "FailQty" , "不合格数量" }, + { "RecQty" , "收货数量" }, + + }; + string url = EntityListToExcel2003(cellheader, ret.ToList(), "SQE导出"); + + }); + + + + } + } +} \ No newline at end of file diff --git a/SCP/Views/Quality/SCP_SQE.aspx.designer.cs b/SCP/Views/Quality/SCP_SQE.aspx.designer.cs new file mode 100644 index 0000000..a20181b --- /dev/null +++ b/SCP/Views/Quality/SCP_SQE.aspx.designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.Quality +{ + + + public partial class SCP_SQE + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// ddl_Vender 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddl_Vender; + + /// + /// DP_StartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DP_StartDate; + + /// + /// Date_EndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker Date_EndDate; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnQuery; + + /// + /// btnExcel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnExcel; + + /// + /// Grid_SQE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid_SQE; + + /// + /// highlightRows 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.HiddenField highlightRows; + } +} diff --git a/SCP/Views/SupplierData/SCP_INVOICE.aspx b/SCP/Views/SupplierData/SCP_INVOICE.aspx index 418eead..f8640cd 100644 --- a/SCP/Views/SupplierData/SCP_INVOICE.aspx +++ b/SCP/Views/SupplierData/SCP_INVOICE.aspx @@ -129,8 +129,11 @@ + <%-- --%> + <%-- --%> + <%-- --%> <%----%> diff --git a/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs b/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs index 0bc5129..11c9eb9 100644 --- a/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs +++ b/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs @@ -21,12 +21,12 @@ namespace SCP.Views.SupplierData if (!IsPostBack) { - TranslatorAgents(Toolbar1); - TranslatorAgent(Grid_V_TB_INVOICE); - TranslatorAgents(FormRow_1); - TranslatorAgents(FormRow_2); - TranslatorAgents(FormRow_3); - TranslatorAgents(FormRow_4); + //TranslatorAgents(Toolbar1); + //TranslatorAgent(Grid_V_TB_INVOICE); + //TranslatorAgents(FormRow_1); + //TranslatorAgents(FormRow_2); + //TranslatorAgents(FormRow_3); + //TranslatorAgents(FormRow_4); BindInvoice(); BindVender(DDL_VEND_LIST); } @@ -46,7 +46,13 @@ namespace SCP.Views.SupplierData SearchInvoice(ret => { Grid_V_TB_INVOICE.RecordCount = ret.Count(); ret = SortAndPage(ret, Grid_V_TB_INVOICE); - Grid_V_TB_INVOICE.DataSource = ret; + var _ls=ret.ToList(); + // _ls.ForEach(p => { + // p.ContractPriceTax = (p.ContractPrice != null) ? decimal.Round((p.ContractPrice.Value * p.Tax.Value), 2) : 0; + // p.DiscountPriceTax = (p.DiscountPriceTax != null) ? decimal.Round((p.DiscountPriceTax.Value * p.Tax.Value), 2) : 0; + // p.RealTotal =( (p.Total!=null)?p.Total.Value:0) + ((p.ContractPrice!=null)?p.ContractPrice.Value:0) + p.ContractPriceTax.Value + ((p.DiscountPrice != null) ? p.DiscountPrice.Value : 0) + p.DiscountPriceTax.Value + ((p.BlancePrice!=null)?p.BlancePrice.Value:0); + // }); + Grid_V_TB_INVOICE.DataSource = _ls; Grid_V_TB_INVOICE.DataBind(); }); } diff --git a/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx b/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx index 0a804f2..bb82f68 100644 --- a/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx +++ b/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx @@ -16,7 +16,7 @@ - + diff --git a/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs b/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs index bae1d0c..7888fa8 100644 --- a/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs +++ b/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs @@ -54,11 +54,14 @@ namespace SCP.WarehouseData Grid_V_TB_INVOICE.RecordCount = result.Count(); var list = SortAndPage(result, Grid_V_TB_INVOICE,"ASC"); var _ls =list.ToList(); - _ls.ForEach(p => { + //_ls.ForEach(p => { + // p.ContractPriceTax = (p.ContractPrice != null) ? decimal.Round((p.ContractPrice.Value * p.Tax.Value), 2) : 0; - //p.RealTotal = p.Total + p.BlancePrice + p.ContractPrice; + // p.DiscountPriceTax = (p.DiscountPriceTax != null) ? decimal.Round((p.DiscountPriceTax.Value * p.Tax.Value), 2) : 0; + // //p.RealTotal = p.Total + p.BlancePrice + p.ContractPrice; - }); + // p.RealTotal = ((p.Total != null) ? p.Total.Value : 0) + ((p.ContractPrice != null) ? p.ContractPrice.Value : 0) + p.ContractPriceTax.Value + ((p.DiscountPrice != null) ? p.DiscountPrice.Value : 0) + p.DiscountPriceTax.Value + ((p.BlancePrice != null) ? p.BlancePrice.Value : 0); + //}); Grid_V_TB_INVOICE.DataSource = list; Grid_V_TB_INVOICE.DataBind(); }); From 2cc02f4ee1c765b2dfdde416f59a15d8fc00c23c Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Mon, 28 Dec 2020 14:37:35 +0800 Subject: [PATCH 14/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E9=A2=84=E6=B5=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9/=E9=94=A6=E5=B7=9E=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E5=8A=A0=E8=BD=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_INVOICE_CONTROLLER.cs | 4 +- SCP/Views/PlanData/SCP_PO_PLAN.aspx | 5 +- SCP/Views/PlanData/SCP_PO_PLAN.aspx.cs | 1 + .../PlanData/SCP_PO_PLAN.aspx.designer.cs | 47 ++++++++++++------- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/Controller/SCP_INVOICE_CONTROLLER.cs b/Controller/SCP_INVOICE_CONTROLLER.cs index 70ff070..07700b6 100644 --- a/Controller/SCP_INVOICE_CONTROLLER.cs +++ b/Controller/SCP_INVOICE_CONTROLLER.cs @@ -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; diff --git a/SCP/Views/PlanData/SCP_PO_PLAN.aspx b/SCP/Views/PlanData/SCP_PO_PLAN.aspx index 81f592c..94745c8 100644 --- a/SCP/Views/PlanData/SCP_PO_PLAN.aspx +++ b/SCP/Views/PlanData/SCP_PO_PLAN.aspx @@ -20,8 +20,9 @@ - - + + + diff --git a/SCP/Views/PlanData/SCP_PO_PLAN.aspx.cs b/SCP/Views/PlanData/SCP_PO_PLAN.aspx.cs index 1b0e039..b332c5e 100644 --- a/SCP/Views/PlanData/SCP_PO_PLAN.aspx.cs +++ b/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") diff --git a/SCP/Views/PlanData/SCP_PO_PLAN.aspx.designer.cs b/SCP/Views/PlanData/SCP_PO_PLAN.aspx.designer.cs index 6d19715..ad07aa0 100644 --- a/SCP/Views/PlanData/SCP_PO_PLAN.aspx.designer.cs +++ b/SCP/Views/PlanData/SCP_PO_PLAN.aspx.designer.cs @@ -7,11 +7,13 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.Views.PlanData { - - - public partial class SCP_PO_PLAN { - +namespace SCP.Views.PlanData +{ + + + public partial class SCP_PO_PLAN + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,7 +31,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar2 控件。 /// @@ -38,7 +40,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar2; - + /// /// btnOutput 控件。 /// @@ -47,7 +49,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnOutput; - + /// /// btnExecl 控件。 /// @@ -56,7 +58,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnExecl; - + /// /// ddl_Vender 控件。 /// @@ -65,7 +67,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddl_Vender; - + /// /// DP_StartDate 控件。 /// @@ -74,7 +76,16 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DatePicker DP_StartDate; - + + /// + /// TXT_VersionNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_VersionNo; + /// /// btnSearch 控件。 /// @@ -83,7 +94,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnSearch; - + /// /// btnMake 控件。 /// @@ -92,7 +103,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnMake; - + /// /// Grid_V_TB_PO_PLAN 控件。 /// @@ -101,7 +112,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_PO_PLAN; - + /// /// ToolbarSeparator1 控件。 /// @@ -110,7 +121,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -119,7 +130,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarText ToolbarText1; - + /// /// ddlGridPageSize 控件。 /// @@ -128,7 +139,7 @@ namespace SCP.Views.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddlGridPageSize; - + /// /// Window1 控件。 /// From 1f5f20301b0b25f563a8ac6d9a7943e4c1e4dc78 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 31 Dec 2020 15:33:55 +0800 Subject: [PATCH 15/56] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E5=8D=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_ASN_CONTROLLER.cs | 1 + Models/ScpEntity/V_ASN_PRINT.cs | 2 +- SCP/Views/SupplierData/SCP_ASN_CREATE.aspx | 20 +++++++++---------- SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs | 2 +- .../SCP_ASN_CREATE.aspx.designer.cs | 18 ++++++++--------- SCP/Views/SupplierData/SCP_INVOICE.aspx.cs | 8 +------- SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs | 9 --------- SCP/default.aspx | 4 ++-- 8 files changed, 25 insertions(+), 39 deletions(-) diff --git a/Controller/SCP_ASN_CONTROLLER.cs b/Controller/SCP_ASN_CONTROLLER.cs index a9b0bdd..bed1b84 100644 --- a/Controller/SCP_ASN_CONTROLLER.cs +++ b/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); diff --git a/Models/ScpEntity/V_ASN_PRINT.cs b/Models/ScpEntity/V_ASN_PRINT.cs index 2d54c3f..a46ca33 100644 --- a/Models/ScpEntity/V_ASN_PRINT.cs +++ b/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; diff --git a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx index b1003cc..ce4b9a6 100644 --- a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx +++ b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx @@ -93,11 +93,17 @@ - + + + + + + + <%-- --%> - + + @@ -145,14 +152,7 @@ - - - - - - - + diff --git a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs index e84dc54..243e217 100644 --- a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs +++ b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs @@ -290,7 +290,7 @@ namespace SCP.SupplierData return; } DateTime dt = DateTime.Parse(_ProduceDate.ToString()); - _detail.Batch = _Batch1.ToString().Trim(); + _detail.Batch = GetBatch(dt); //_Batch1.ToString().Trim(); _detail.TempQty = number; _detail.PackQty = ConvertHelper.To(_PackQty); _detail.VendBatch = _VendBatch.ToString(); diff --git a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.designer.cs b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.designer.cs index 2e6b21b..fec7a89 100644 --- a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.designer.cs +++ b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.designer.cs @@ -266,6 +266,15 @@ namespace SCP.SupplierData /// protected global::FineUI.TextBox txtBatch1; + /// + /// TXT_VendBatch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_VendBatch; + /// /// NumberBox1 控件。 /// @@ -320,15 +329,6 @@ namespace SCP.SupplierData /// protected global::FineUI.NumberBox NumberBox4; - /// - /// TXT_VendBatch 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.TextBox TXT_VendBatch; - /// /// Window1 控件。 /// diff --git a/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs b/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs index 11c9eb9..6a423dc 100644 --- a/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs +++ b/SCP/Views/SupplierData/SCP_INVOICE.aspx.cs @@ -46,13 +46,7 @@ namespace SCP.Views.SupplierData SearchInvoice(ret => { Grid_V_TB_INVOICE.RecordCount = ret.Count(); ret = SortAndPage(ret, Grid_V_TB_INVOICE); - var _ls=ret.ToList(); - // _ls.ForEach(p => { - // p.ContractPriceTax = (p.ContractPrice != null) ? decimal.Round((p.ContractPrice.Value * p.Tax.Value), 2) : 0; - // p.DiscountPriceTax = (p.DiscountPriceTax != null) ? decimal.Round((p.DiscountPriceTax.Value * p.Tax.Value), 2) : 0; - // p.RealTotal =( (p.Total!=null)?p.Total.Value:0) + ((p.ContractPrice!=null)?p.ContractPrice.Value:0) + p.ContractPriceTax.Value + ((p.DiscountPrice != null) ? p.DiscountPrice.Value : 0) + p.DiscountPriceTax.Value + ((p.BlancePrice!=null)?p.BlancePrice.Value:0); - // }); - Grid_V_TB_INVOICE.DataSource = _ls; + Grid_V_TB_INVOICE.DataSource = ret; Grid_V_TB_INVOICE.DataBind(); }); } diff --git a/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs b/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs index 7888fa8..e206bfe 100644 --- a/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs +++ b/SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs @@ -53,15 +53,6 @@ namespace SCP.WarehouseData { Grid_V_TB_INVOICE.RecordCount = result.Count(); var list = SortAndPage(result, Grid_V_TB_INVOICE,"ASC"); - var _ls =list.ToList(); - //_ls.ForEach(p => { - // p.ContractPriceTax = (p.ContractPrice != null) ? decimal.Round((p.ContractPrice.Value * p.Tax.Value), 2) : 0; - - // p.DiscountPriceTax = (p.DiscountPriceTax != null) ? decimal.Round((p.DiscountPriceTax.Value * p.Tax.Value), 2) : 0; - // //p.RealTotal = p.Total + p.BlancePrice + p.ContractPrice; - - // p.RealTotal = ((p.Total != null) ? p.Total.Value : 0) + ((p.ContractPrice != null) ? p.ContractPrice.Value : 0) + p.ContractPriceTax.Value + ((p.DiscountPrice != null) ? p.DiscountPrice.Value : 0) + p.DiscountPriceTax.Value + ((p.BlancePrice != null) ? p.BlancePrice.Value : 0); - //}); Grid_V_TB_INVOICE.DataSource = list; Grid_V_TB_INVOICE.DataBind(); }); diff --git a/SCP/default.aspx b/SCP/default.aspx index abfd4d5..beef335 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('CQBMPT' == obj.options[i].value) { + if ('JZ1' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'CQBMPT'; + _factory.value = 'JZ1'; } } } From da659f351fbb40e38459a7355ce5c7d0504cf75c Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 6 Jan 2021 08:53:45 +0800 Subject: [PATCH 16/56] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_INVOICE_CONTROLLER.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/SCP_INVOICE_CONTROLLER.cs b/Controller/SCP_INVOICE_CONTROLLER.cs index 07700b6..afa8453 100644 --- a/Controller/SCP_INVOICE_CONTROLLER.cs +++ b/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)) { From 9e75186cd0325bc128ae45aaab5816ad9ddcc143 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Wed, 6 Jan 2021 10:26:03 +0800 Subject: [PATCH 17/56] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=A9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_PLAN_CONTROLLER.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Controller/SCP_PLAN_CONTROLLER.cs b/Controller/SCP_PLAN_CONTROLLER.cs index 7598f01..d16706a 100644 --- a/Controller/SCP_PLAN_CONTROLLER.cs +++ b/Controller/SCP_PLAN_CONTROLLER.cs @@ -877,8 +877,8 @@ namespace CK.SCP.Controller } } if (column.ColumnName == "计划天数") - { - if (dr["计划天数"] != null) + { + if (dr["计划天数"] != null) { _dayList.Add(dr["计划天数"].ToString().Trim()); } @@ -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()) From 6c1a9e8341e52ae91c43a11e7bae65b066faa860 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 7 Jan 2021 11:13:50 +0800 Subject: [PATCH 18/56] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95/?= =?UTF-8?q?=E8=A6=81=E8=B4=A7=E7=9C=8B=E6=9D=BF=E9=A1=B5=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_ASK.aspx | 4 +- SCP/Views/PlanData/SCP_PO_EXTEND.aspx | 72 ++++++++++++------- SCP/Views/PlanData/SCP_PO_EXTEND.aspx.cs | 3 - .../PlanData/SCP_PO_EXTEND.aspx.designer.cs | 61 +++++++++------- SCP/default.aspx | 4 +- 5 files changed, 86 insertions(+), 58 deletions(-) diff --git a/SCP/Views/PlanData/SCP_ASK.aspx b/SCP/Views/PlanData/SCP_ASK.aspx index ed93d31..1d6ae43 100644 --- a/SCP/Views/PlanData/SCP_ASK.aspx +++ b/SCP/Views/PlanData/SCP_ASK.aspx @@ -59,9 +59,9 @@ - + - + diff --git a/SCP/Views/PlanData/SCP_PO_EXTEND.aspx b/SCP/Views/PlanData/SCP_PO_EXTEND.aspx index 111d235..2eb4bff 100644 --- a/SCP/Views/PlanData/SCP_PO_EXTEND.aspx +++ b/SCP/Views/PlanData/SCP_PO_EXTEND.aspx @@ -37,7 +37,7 @@ - + @@ -67,49 +67,61 @@ - + - + - <%-- --%> - - - - - - + - + + + + + + + + + + + + - - - - - + - - - - + + + + + + - + + + + - + + + + + AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" BoxFlex="1" > @@ -138,12 +150,17 @@ <%----%> + + + + + PageSize="500" BoxFlex="1" > @@ -158,8 +175,13 @@ - + + + + + + - /// TxT_Extend1 控件。 + /// TXT_Vendid 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TxT_Extend1; + protected global::FineUI.TextBox TXT_Vendid; /// - /// TxT_Extend2 控件。 + /// TXT_VendName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TxT_Extend2; + protected global::FineUI.TextBox TXT_VendName; /// - /// TxT_Extend3 控件。 + /// TXT_ProjectId 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TxT_Extend3; + protected global::FineUI.TextBox TXT_ProjectId; /// - /// TXT_Vendid 控件。 + /// DDL_State 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TXT_Vendid; + protected global::FineUI.DropDownList DDL_State; /// - /// TXT_VendName 控件。 + /// DP_StartDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TXT_VendName; + protected global::FineUI.DatePicker DP_StartDate; /// - /// TXT_ProjectId 控件。 + /// DP_EndDate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TXT_ProjectId; + protected global::FineUI.DatePicker DP_EndDate; /// - /// DP_StartDate 控件。 + /// TXT_PartCode 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DatePicker DP_StartDate; + protected global::FineUI.TextBox TXT_PartCode; /// - /// DP_EndDate 控件。 + /// Panel5 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DatePicker DP_EndDate; + protected global::FineUI.Panel Panel5; /// - /// TXT_PartCode 控件。 + /// BtnClose 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TXT_PartCode; + protected global::FineUI.Button BtnClose; /// - /// DDL_State 控件。 + /// BtnSearch 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DropDownList DDL_State; + protected global::FineUI.Button BtnSearch; /// - /// BtnClose 控件。 + /// BtnSearchDetail 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Button BtnClose; + protected global::FineUI.Button BtnSearchDetail; /// - /// BtnSearch 控件。 + /// Panel2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Button BtnSearch; + protected global::FineUI.Panel Panel2; /// - /// BtnSearchDetail 控件。 + /// Panel3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Button BtnSearchDetail; + protected global::FineUI.Panel Panel3; /// /// Grid_V_TB_PO 控件。 @@ -293,6 +293,15 @@ namespace SCP.PlanData /// protected global::FineUI.DropDownList ddlGridPageSize; + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel4; + /// /// Grid_V_TB_PO_DETAIL 控件。 /// diff --git a/SCP/default.aspx b/SCP/default.aspx index beef335..50db365 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('JZ1' == obj.options[i].value) { + if ('CNS' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'JZ1'; + _factory.value = 'CNS'; } } } From cc1526c337e9578a20c097abe8a92c994b04e5e9 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 7 Jan 2021 13:05:56 +0800 Subject: [PATCH 19/56] =?UTF-8?q?=E9=A1=B5=E9=9D=A2VBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/BasicData/Part.aspx | 2 +- SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx | 2 +- SCP/Views/SupplierData/SCP_QUALITY.aspx | 6 +++--- SCP/Views/WarehouseData/SCP_INVOICE_RECVICE.aspx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SCP/Views/BasicData/Part.aspx b/SCP/Views/BasicData/Part.aspx index a8a34a1..7cc3006 100644 --- a/SCP/Views/BasicData/Part.aspx +++ b/SCP/Views/BasicData/Part.aspx @@ -10,7 +10,7 @@ - + diff --git a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx index 57eba12..31f9354 100644 --- a/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx +++ b/SCP/Views/PlanData/SCP_INCOMPLETE_ASK.aspx @@ -10,7 +10,7 @@ - + diff --git a/SCP/Views/SupplierData/SCP_QUALITY.aspx b/SCP/Views/SupplierData/SCP_QUALITY.aspx index 5f25829..8dfe11f 100644 --- a/SCP/Views/SupplierData/SCP_QUALITY.aspx +++ b/SCP/Views/SupplierData/SCP_QUALITY.aspx @@ -10,7 +10,7 @@ - + @@ -70,7 +70,7 @@ EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" - + BoxFlex="1" 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" @@ -78,7 +78,7 @@ IsDatabasePaging="true" AllowPaging="true" AutoScroll="True" SortDirection="DESC" SortField="Billtime" - OnPageIndexChange="Grid_TB_QUALITY_PageIndexChange" + OnPageIndexChange="Grid_TB_QUALITY_PageIndexChange" > diff --git a/SCP/Views/WarehouseData/SCP_INVOICE_RECVICE.aspx b/SCP/Views/WarehouseData/SCP_INVOICE_RECVICE.aspx index fadcf01..9241888 100644 --- a/SCP/Views/WarehouseData/SCP_INVOICE_RECVICE.aspx +++ b/SCP/Views/WarehouseData/SCP_INVOICE_RECVICE.aspx @@ -11,7 +11,7 @@ - + From f6c889879f0b959f659ceb0b17f78711e7de727d Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 7 Jan 2021 13:26:59 +0800 Subject: [PATCH 20/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_ASK.aspx | 30 +++--- SCP/Views/PlanData/SCP_ASK.aspx.cs | 3 - SCP/Views/PlanData/SCP_ASK.aspx.designer.cs | 36 ++----- SCP/Views/PlanData/SCP_ASK_DETAIL.aspx | 15 +-- SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs | 1 + .../PlanData/SCP_ASK_DETAIL.aspx.designer.cs | 95 +++++++++++-------- SCP/Views/PlanData/SCP_PO_ASK.aspx | 6 +- 7 files changed, 88 insertions(+), 98 deletions(-) diff --git a/SCP/Views/PlanData/SCP_ASK.aspx b/SCP/Views/PlanData/SCP_ASK.aspx index 1d6ae43..2ac0f44 100644 --- a/SCP/Views/PlanData/SCP_ASK.aspx +++ b/SCP/Views/PlanData/SCP_ASK.aspx @@ -59,27 +59,23 @@ - + - + - <%-- --%> - - - - + @@ -92,20 +88,20 @@ + - - - - - - + - - + + + + - + + + @@ -114,7 +110,7 @@ - protected global::FineUI.DropDownList DropDownList1; - /// - /// TXT_Extend1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.TextBox TXT_Extend1; - - /// - /// TXT_Extend2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.TextBox TXT_Extend2; - - /// - /// TXT_Extend3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.TextBox TXT_Extend3; - /// /// TXT_AskBill 控件。 /// @@ -311,6 +284,15 @@ namespace SCP.PlanData /// protected global::FineUI.TextBox TXT_PartCode; + /// + /// Panel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel5; + /// /// BtnClose 控件。 /// diff --git a/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx b/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx index 18e4ee2..2827940 100644 --- a/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx +++ b/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx @@ -10,7 +10,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -50,12 +50,15 @@ - + - - + + + + + @@ -63,7 +66,7 @@ - diff --git a/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs b/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs index f63243a..f2b06bf 100644 --- a/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs +++ b/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; diff --git a/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.designer.cs b/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.designer.cs index 0e76141..78184ef 100644 --- a/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.designer.cs +++ b/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.designer.cs @@ -7,11 +7,13 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.PlanData { - - - public partial class SCP_ASK_DETAIL { - +namespace SCP.PlanData +{ + + + public partial class SCP_ASK_DETAIL + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,7 +31,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar2 控件。 /// @@ -38,7 +40,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar2; - + /// /// BTN_refresh 控件。 /// @@ -47,7 +49,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button BTN_refresh; - + /// /// btnRelease 控件。 /// @@ -56,7 +58,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnRelease; - + /// /// btnReleaseCancel 控件。 /// @@ -65,7 +67,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnReleaseCancel; - + /// /// btnCompleteForce 控件。 /// @@ -74,7 +76,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnCompleteForce; - + /// /// btnReject 控件。 /// @@ -83,7 +85,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnReject; - + /// /// BTN_SAVE 控件。 /// @@ -92,7 +94,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button BTN_SAVE; - + /// /// btnReduce 控件。 /// @@ -101,7 +103,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnReduce; - + /// /// btnAdd 控件。 /// @@ -110,7 +112,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnAdd; - + /// /// btnDeleted 控件。 /// @@ -119,7 +121,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnDeleted; - + /// /// F_PO_DETAIL 控件。 /// @@ -128,7 +130,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Form F_PO_DETAIL; - + /// /// TXT_State_DESC 控件。 /// @@ -137,7 +139,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_State_DESC; - + /// /// TXT_PoBillNum 控件。 /// @@ -146,7 +148,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_PoBillNum; - + /// /// TXT_VendName 控件。 /// @@ -155,7 +157,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendName; - + /// /// TXT_VendId 控件。 /// @@ -164,7 +166,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_VendId; - + /// /// TXT_Site 控件。 /// @@ -173,34 +175,43 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_Site; - + /// - /// txtRemark 控件。 + /// DP_BeginTime 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtRemark; - + protected global::FineUI.DatePicker DP_BeginTime; + /// - /// DP_BeginTime 控件。 + /// DP_EndTime 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DatePicker DP_BeginTime; - + protected global::FineUI.DatePicker DP_EndTime; + /// - /// DP_EndTime 控件。 + /// txtRemark 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.DatePicker DP_EndTime; - + protected global::FineUI.TextBox txtRemark; + + /// + /// TXT_AskBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_AskBillNum; + /// /// btnModifyDate 控件。 /// @@ -209,7 +220,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnModifyDate; - + /// /// Grid_V_TB_ASK_DETAIL 控件。 /// @@ -218,7 +229,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_ASK_DETAIL; - + /// /// ToolbarSeparator1 控件。 /// @@ -227,7 +238,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -236,7 +247,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.ToolbarText ToolbarText1; - + /// /// ddlGridPageSize 控件。 /// @@ -245,7 +256,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList ddlGridPageSize; - + /// /// NB_PublishNum 控件。 /// @@ -254,7 +265,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.TextBox NB_PublishNum; - + /// /// NumberBox1 控件。 /// @@ -263,7 +274,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.NumberBox NumberBox1; - + /// /// Window1 控件。 /// @@ -272,7 +283,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window Window1; - + /// /// WindowUpload 控件。 /// @@ -281,7 +292,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window WindowUpload; - + /// /// TXT_ModType 控件。 /// @@ -290,7 +301,7 @@ namespace SCP.PlanData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.HiddenField TXT_ModType; - + /// /// TXT_State 控件。 /// diff --git a/SCP/Views/PlanData/SCP_PO_ASK.aspx b/SCP/Views/PlanData/SCP_PO_ASK.aspx index 4b8e014..3994da7 100644 --- a/SCP/Views/PlanData/SCP_PO_ASK.aspx +++ b/SCP/Views/PlanData/SCP_PO_ASK.aspx @@ -10,7 +10,7 @@ - + @@ -82,10 +82,10 @@ - + AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" BoxFlex="1" > From cab0758a87ba1d6e1ea45c6ab6bed8a97489149f Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 7 Jan 2021 13:34:50 +0800 Subject: [PATCH 21/56] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx | 8 ++++---- SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx | 2 +- SCP/Views/WarehouseData/SCP_RECEIVE_VIEW.aspx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx index b8aca09..c5e9a48 100644 --- a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx +++ b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx @@ -10,7 +10,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -93,7 +93,7 @@ - + BoxFlex="1"> diff --git a/SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx b/SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx index d03487e..299b821 100644 --- a/SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx +++ b/SCP/Views/PlanData/SCP_PO_PLAN_EXTEND.aspx @@ -50,7 +50,7 @@ - - + @@ -91,7 +91,7 @@ From 97ec877e5998d4f02330ca07bfd3e0f9d961172d Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 7 Jan 2021 13:48:53 +0800 Subject: [PATCH 22/56] =?UTF-8?q?=E6=98=8E=E7=BB=86VBox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/SupplierData/SCP_ASK_DETAIL.aspx | 4 ++-- SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SCP/Views/SupplierData/SCP_ASK_DETAIL.aspx b/SCP/Views/SupplierData/SCP_ASK_DETAIL.aspx index 836aa18..c8b193b 100644 --- a/SCP/Views/SupplierData/SCP_ASK_DETAIL.aspx +++ b/SCP/Views/SupplierData/SCP_ASK_DETAIL.aspx @@ -10,7 +10,7 @@ - + @@ -54,7 +54,7 @@ + EnableRowSelectEvent="True" AutoScroll="True" SortField="PoLine" SortDirection="DESC" BoxFlex="1"> diff --git a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx index 9d9e8d2..35630b0 100644 --- a/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx +++ b/SCP/Views/SupplierData/SCP_ASN_DETAIL.aspx @@ -10,7 +10,7 @@ - + From 26ee5c669a5097f4ff668956d4d83ae7820d7bd9 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 7 Jan 2021 13:50:53 +0800 Subject: [PATCH 23/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_ASK.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCP/Views/PlanData/SCP_ASK.aspx b/SCP/Views/PlanData/SCP_ASK.aspx index 2ac0f44..adf8bf6 100644 --- a/SCP/Views/PlanData/SCP_ASK.aspx +++ b/SCP/Views/PlanData/SCP_ASK.aspx @@ -110,7 +110,7 @@ - Date: Thu, 7 Jan 2021 14:49:55 +0800 Subject: [PATCH 24/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=85=A5=E6=88=90=E5=8A=9F=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/PlanData/SCP_ASK.aspx.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/SCP/Views/PlanData/SCP_ASK.aspx.cs b/SCP/Views/PlanData/SCP_ASK.aspx.cs index b6421f6..412c66d 100644 --- a/SCP/Views/PlanData/SCP_ASK.aspx.cs +++ b/SCP/Views/PlanData/SCP_ASK.aspx.cs @@ -292,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 From 7ee2220ed0bb91e5dd3a089cae7070050f9f3b47 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 7 Jan 2021 16:09:04 +0800 Subject: [PATCH 25/56] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_RECEIVE_CONTROLLER.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Controller/SCP_RECEIVE_CONTROLLER.cs b/Controller/SCP_RECEIVE_CONTROLLER.cs index 55afc5d..d3cfe45 100644 --- a/Controller/SCP_RECEIVE_CONTROLLER.cs +++ b/Controller/SCP_RECEIVE_CONTROLLER.cs @@ -101,12 +101,13 @@ namespace CK.SCP.Controller if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) { 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); } From 3dc5b0363a97b6cb92eddb23c886fbbc9a18c6d8 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 7 Jan 2021 16:27:16 +0800 Subject: [PATCH 26/56] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_INVOICE_CONTROLLER.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/SCP_INVOICE_CONTROLLER.cs b/Controller/SCP_INVOICE_CONTROLLER.cs index afa8453..20ea900 100644 --- a/Controller/SCP_INVOICE_CONTROLLER.cs +++ b/Controller/SCP_INVOICE_CONTROLLER.cs @@ -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); } From fb42d57867241a8c35b7029e978ac213e019693e Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 7 Jan 2021 16:50:11 +0800 Subject: [PATCH 27/56] VBox --- SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx index 35dd935..43cf91e 100644 --- a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx +++ b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx @@ -10,7 +10,7 @@ - + From 0f22233256d1995b7f2dfb91e3bff76d73390cb9 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Fri, 8 Jan 2021 11:15:29 +0800 Subject: [PATCH 28/56] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Admin/default.aspx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/SCP/Admin/default.aspx b/SCP/Admin/default.aspx index b1b8587..79a4b5d 100644 --- a/SCP/Admin/default.aspx +++ b/SCP/Admin/default.aspx @@ -11,14 +11,14 @@ - - + - + + AutoScroll="True" BoxFlex="1" > @@ -51,7 +51,7 @@ + AutoScroll="True" BoxFlex="1"> @@ -61,7 +61,7 @@ + AutoScroll="True" BoxFlex="1"> @@ -82,10 +82,10 @@ --%> - + - From ca5468911f5f3b8f5b2e393710459d3aed1f8dca Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 13 Jan 2021 10:06:30 +0800 Subject: [PATCH 29/56] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=98=E7=9B=98?= =?UTF-8?q?=E6=9D=A1=E7=A0=81=E7=94=9F=E6=88=90=E6=89=93=E5=8D=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_ASN_CONTROLLER.cs | 306 +++++++++++++++++- Controller/SCP_BARCODE_CONTROLLER.cs | 202 ++++++++++++ Models/CK.SCP.Models.csproj | 1 + Models/ScpEntities.cs | 1 + Models/ScpEntity/TB_PALLETS.cs | 9 + Models/ScpEntity/TB_PALLETS_RULL.cs | 33 ++ .../锦州锦恒/SupplierData/SCP_ASN.aspx | 4 - .../SupplierData/SCP_ASN.aspx.designer.cs | 54 ++-- .../SupplierData/SCP_ASN_DETAIL.aspx | 9 +- .../SupplierData/SCP_ASN_DETAIL.aspx.cs | 110 ++++--- .../SCP_ASN_DETAIL.aspx.designer.cs | 26 +- SCP/default.aspx | 4 +- 12 files changed, 669 insertions(+), 90 deletions(-) create mode 100644 Models/ScpEntity/TB_PALLETS_RULL.cs diff --git a/Controller/SCP_ASN_CONTROLLER.cs b/Controller/SCP_ASN_CONTROLLER.cs index bed1b84..47f2768 100644 --- a/Controller/SCP_ASN_CONTROLLER.cs +++ b/Controller/SCP_ASN_CONTROLLER.cs @@ -1666,7 +1666,6 @@ namespace CK.SCP.Controller string _oldpartcode = ""; //上一个托盘所装零件编号 decimal _oldbox = 0; //上一个托盘箱数计数 string _oldpalletnum = "";//上一个托盘码 - List _listm = new List(); p_list.ForEach(p => { var _askDetail = db.TA_VEND_PART.Where @@ -1674,10 +1673,10 @@ namespace CK.SCP.Controller && itm.PartCode == p.PartCode ).FirstOrDefault(); if (_askDetail != null) - { + { var _palletPack = _askDetail.PalletPackQty; #region 补充未满托盘 - if (p.PartCode== _oldpartcode) + if (p.PartCode == _oldpartcode) { decimal _box1 = 0; int _TempQty1 = Convert.ToInt32(p.Qty); @@ -1698,7 +1697,7 @@ namespace CK.SCP.Controller _box1++; } } - if(_box1< _oldbox) + if (_box1 < _oldbox) { TB_PALLETS pallet = new TB_PALLETS(); pallet.AsnBillNum = p.AsnBillNum; @@ -1708,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; } @@ -1719,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 @@ -1758,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; @@ -1772,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; @@ -1780,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)); @@ -1803,17 +1823,27 @@ namespace CK.SCP.Controller _list.Add(_str); } }); - int state = db.SaveChanges(); - if (state != -1) - { - _ret.State = ReturnStatus.Succeed; - _ret.Result = true; + if (_list.Count == 0) + { + int state = db.SaveChanges(); + 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 = _listm; + _ret.MessageList = _list; + } } } @@ -1867,6 +1897,256 @@ namespace CK.SCP.Controller } return _ret; } + + public static ResultObject Save_TB_PALLET_JZJH(List p_list) + { + ResultObject _ret = new ResultObject(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + List _list = new List(); + 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 Save_TB_CREATE_BARCODE_SYJB(List p_list) { ResultObject _ret = new ResultObject(); diff --git a/Controller/SCP_BARCODE_CONTROLLER.cs b/Controller/SCP_BARCODE_CONTROLLER.cs index 5f3544b..bd80073 100644 --- a/Controller/SCP_BARCODE_CONTROLLER.cs +++ b/Controller/SCP_BARCODE_CONTROLLER.cs @@ -594,6 +594,83 @@ namespace CK.SCP.Controller } return _ret; } + + public static ResultObject CreatePallets(TB_PALLETS p_entity, int cnt = 1) + { + ResultObject _ret = new ResultObject(); + 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> 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 GetPalletsRule(string partcode, string batch, int cnt = 1) + { + ResultObject _ret = new ResultObject(); + 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 = "G."; + 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) { diff --git a/Models/CK.SCP.Models.csproj b/Models/CK.SCP.Models.csproj index f42c58a..b6c0c90 100644 --- a/Models/CK.SCP.Models.csproj +++ b/Models/CK.SCP.Models.csproj @@ -345,6 +345,7 @@ + diff --git a/Models/ScpEntities.cs b/Models/ScpEntities.cs index e567092..d734b7e 100644 --- a/Models/ScpEntities.cs +++ b/Models/ScpEntities.cs @@ -96,6 +96,7 @@ namespace CK.SCP.Models public virtual DbSet V_TB_REJECT_DETAIL { get; set; } public virtual DbSet TS_BARCODE_RULE { get; set; } public virtual DbSet TS_BARCODE_RULE_SMALL { get; set; } + public virtual DbSet TB_PALLETS_RULL { get; set; } public virtual DbSet V_TB_INVOICE_DETAIL { get; set; } public virtual DbSet V_TB_INVOICE { get; set; } public virtual DbSet V_TB_INVOICE_DETAIL_RED { get; set; } diff --git a/Models/ScpEntity/TB_PALLETS.cs b/Models/ScpEntity/TB_PALLETS.cs index fe9a351..6b85b92 100644 --- a/Models/ScpEntity/TB_PALLETS.cs +++ b/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; } } } diff --git a/Models/ScpEntity/TB_PALLETS_RULL.cs b/Models/ScpEntity/TB_PALLETS_RULL.cs new file mode 100644 index 0000000..24d3d1b --- /dev/null +++ b/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; } + } +} diff --git a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx index 2cc3577..b956e1d 100644 --- a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx +++ b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx @@ -28,10 +28,6 @@ --%> - - - - diff --git a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx.designer.cs b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx.designer.cs index 8e14db2..09fbaed 100644 --- a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx.designer.cs +++ b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN.aspx.designer.cs @@ -86,24 +86,6 @@ namespace SCP.锦州锦恒.SupplierData /// protected global::FineUI.Button btnShow; - /// - /// btnPallet 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Button btnPallet; - - /// - /// btnPalletDetail 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Button btnPalletDetail; - /// /// gp1 控件。 /// @@ -176,6 +158,42 @@ namespace SCP.锦州锦恒.SupplierData /// protected global::FineUI.TextBox txtPO; + /// + /// TXT_SubSite 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_SubSite; + + /// + /// TXT_Extend1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_Extend1; + + /// + /// TXT_Extend2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_Extend2; + + /// + /// TXT_Extend3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_Extend3; + /// /// FormRow_3 控件。 /// diff --git a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx index 5a71f43..a017c7a 100644 --- a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx +++ b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx @@ -62,10 +62,11 @@ --%> - + + - + @@ -146,6 +147,10 @@ + + + + + + diff --git a/SCP/Views/PlanData/SCP_INVOICE.aspx.cs b/SCP/Views/PlanData/SCP_INVOICE.aspx.cs new file mode 100644 index 0000000..4e058d2 --- /dev/null +++ b/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> 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 _ls = new List(); + 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) + { + + } + } +} diff --git a/SCP/Views/PlanData/SCP_INVOICE.aspx.designer.cs b/SCP/Views/PlanData/SCP_INVOICE.aspx.designer.cs new file mode 100644 index 0000000..5e86b24 --- /dev/null +++ b/SCP/Views/PlanData/SCP_INVOICE.aspx.designer.cs @@ -0,0 +1,314 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.PlanData +{ + + + public partial class SCP_INVOICE + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar1; + + /// + /// Button3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Button3; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnView; + + /// + /// btnOutput 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnOutput; + + /// + /// btnShow 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnShow; + + /// + /// DDL_VEND_LIST 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList DDL_VEND_LIST; + + /// + /// BTN_INV 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button BTN_INV; + + /// + /// gp1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.GroupPanel gp1; + + /// + /// FormRow_1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_1; + + /// + /// ckb 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.CheckBoxList ckb; + + /// + /// FormRow_2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_2; + + /// + /// TXT_InvcBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_InvcBillNum; + + /// + /// TXT_VendName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_VendName; + + /// + /// TXT_InvoiceNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_InvoiceNum; + + /// + /// TXT_PO 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_PO; + + /// + /// FormRow_3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_3; + + /// + /// TXT_Site 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_Site; + + /// + /// TXT_ASN 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_ASN; + + /// + /// DP_CreateTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DP_CreateTime1; + + /// + /// DP_CreateTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DP_CreateTime2; + + /// + /// FormRow_4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_4; + + /// + /// BTN_SEARCH 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button BTN_SEARCH; + + /// + /// Grid_V_TB_INVOICE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid_V_TB_INVOICE; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarText ToolbarText1; + + /// + /// ddlGridPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlGridPageSize; + + /// + /// Total1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Total1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window2; + + /// + /// WindowUpload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window WindowUpload; + } +} diff --git a/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx b/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx new file mode 100644 index 0000000..3f03773 --- /dev/null +++ b/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" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.cs b/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.cs new file mode 100644 index 0000000..d6cbf76 --- /dev/null +++ b/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> 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 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 _ls = new List(); + 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(rowDataKeys[0]); + _entity.InvcBillNum = rowDataKeys[1] as string; + _entity.Qty = ConvertHelper.To(rowDataKeys[2]); + _entity.CanQty = ConvertHelper.To(rowDataKeys[3]); + _entity.State = ConvertHelper.To(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("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; + } + } + } + } +} \ No newline at end of file diff --git a/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.designer.cs b/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.designer.cs new file mode 100644 index 0000000..758039e --- /dev/null +++ b/SCP/Views/PlanData/SCP_INVOICE_EDIT.aspx.designer.cs @@ -0,0 +1,359 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.PlanData +{ + + + public partial class SCP_INVOICE_EDIT + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar2; + + /// + /// ToolbarSeparator3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator3; + + /// + /// btnOK 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnOK; + + /// + /// btnApply 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnApply; + + /// + /// btnMail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnMail; + + /// + /// btnReject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnReject; + + /// + /// btnRed 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnRed; + + /// + /// gp1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.GroupPanel gp1; + + /// + /// FormRow_1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_1; + + /// + /// txtBillNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtBillNo; + + /// + /// txtState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtState; + + /// + /// txtBillTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtBillTime; + + /// + /// txtSupplierName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtSupplierName; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Label Label3; + + /// + /// FormRow_2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_2; + + /// + /// txtAmount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtAmount; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Label Label1; + + /// + /// txtTax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList txtTax; + + /// + /// txtTaxAmount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtTaxAmount; + + /// + /// txtTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtTotal; + + /// + /// FormRow_3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_3; + + /// + /// txtContractPrice1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox txtContractPrice1; + + /// + /// txtDiscountPrice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox txtDiscountPrice; + + /// + /// txtBlancePrice1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox txtBlancePrice1; + + /// + /// txtInvoiceNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtInvoiceNumber; + + /// + /// FormRow_4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_4; + + /// + /// txtExpressNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtExpressNumber; + + /// + /// dpUpdateTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker dpUpdateTime; + + /// + /// txtMemo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtMemo; + + /// + /// l1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Label l1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid1; + + /// + /// txtPrice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox txtPrice; + + /// + /// txtQty 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox txtQty; + + /// + /// txtLineMemo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox txtLineMemo; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window1; + + /// + /// WindowUpload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window WindowUpload; + } +} diff --git a/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx b/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx new file mode 100644 index 0000000..7faf119 --- /dev/null +++ b/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" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 总计: + + + 税额: + 税后金额: + + <%-- + + + --%> + + + + + + + + + + + diff --git a/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.cs b/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.cs new file mode 100644 index 0000000..1cf0803 --- /dev/null +++ b/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> 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 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 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 _list = new List(); + List _projectList = new List(); + List _rejList = new List(); + string _projectId = string.Empty; + List _recList = new List(); + List IdList = new List(); + 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 GetIsAllChecked(string p_VendId, string p_VendIds) + { + + List unSelected = new List(); + + 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 cellheader = new Dictionary + { + { "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"); + } + + } +} \ No newline at end of file diff --git a/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.designer.cs b/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.designer.cs new file mode 100644 index 0000000..9130b83 --- /dev/null +++ b/SCP/Views/PlanData/SCP_RECEIVE_LIST.aspx.designer.cs @@ -0,0 +1,404 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.PlanData +{ + + + public partial class SCP_RECEIVE_LIST + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar2; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Button1; + + /// + /// btnCreate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnCreate; + + /// + /// btnCreateAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnCreateAll; + + /// + /// btn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btn; + + /// + /// Button2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Button2; + + /// + /// btnCanIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnCanIn; + + /// + /// btnShow 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnShow; + + /// + /// tb_RecvBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox tb_RecvBillNum; + + /// + /// btn_Search 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btn_Search; + + /// + /// DDL_VEND_LIST 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList DDL_VEND_LIST; + + /// + /// BTN_INV 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button BTN_INV; + + /// + /// gp1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.GroupPanel gp1; + + /// + /// FormRow_1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_1; + + /// + /// TXT_BillNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_BillNo; + + /// + /// TXT_ASNBill 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_ASNBill; + + /// + /// TXT_VendName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_VendName; + + /// + /// TXT_VendId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_VendId; + + /// + /// FormRow_2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_2; + + /// + /// TXT_ProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_ProjectId; + + /// + /// TXT_PartCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_PartCode; + + /// + /// DP_StartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DP_StartDate; + + /// + /// Date_EndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker Date_EndDate; + + /// + /// FormRow_3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_3; + + /// + /// TXT_ERPBillNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_ERPBillNo; + + /// + /// TXT_RECEIVE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_RECEIVE; + + /// + /// DDL_State 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList DDL_State; + + /// + /// BtnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button BtnClose; + + /// + /// BtnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button BtnSearch; + + /// + /// FormRow1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow1; + + /// + /// txtContractPrice1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox txtContractPrice1; + + /// + /// txtBlancePrice1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.NumberBox txtBlancePrice1; + + /// + /// FormRow2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow2; + + /// + /// lbTaxRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList lbTaxRate; + + /// + /// btnTax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnTax; + + /// + /// Grid_V_TB_RECEIVE_LIST 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid_V_TB_RECEIVE_LIST; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarText ToolbarText1; + + /// + /// ddlGridPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlGridPageSize; + + /// + /// Qty1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Qty1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window1; + } +} From 8cc73d3fd2536ae8cdbfeeca3803c3b02fb7d633 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 20 Jan 2021 15:41:39 +0800 Subject: [PATCH 34/56] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Admin/UNIAPI.aspx | 2 +- SCP/Admin/UNIAPI.aspx.designer.cs | 45 +++++++++++++++++++------------ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/SCP/Admin/UNIAPI.aspx b/SCP/Admin/UNIAPI.aspx index c0e292a..fc562e6 100644 --- a/SCP/Admin/UNIAPI.aspx +++ b/SCP/Admin/UNIAPI.aspx @@ -40,7 +40,7 @@ - + diff --git a/SCP/Admin/UNIAPI.aspx.designer.cs b/SCP/Admin/UNIAPI.aspx.designer.cs index 4d1f2fb..6cb9aee 100644 --- a/SCP/Admin/UNIAPI.aspx.designer.cs +++ b/SCP/Admin/UNIAPI.aspx.designer.cs @@ -7,11 +7,13 @@ // 自动生成> //------------------------------------------------------------------------------ -namespace SCP.Admin { - - - public partial class UNIAPI { - +namespace SCP.Admin +{ + + + public partial class UNIAPI + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.Admin { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,16 +31,16 @@ namespace SCP.Admin { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// - /// Toolbar2 控件。 + /// Toolbar1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Toolbar Toolbar2; - + protected global::FineUI.Toolbar Toolbar1; + /// /// DDL_State 控件。 /// @@ -47,25 +49,34 @@ namespace SCP.Admin { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.DropDownList DDL_State; - + /// - /// TXT_billnum 控件。 + /// BtnSearch 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextArea TXT_billnum; - + protected global::FineUI.Button BtnSearch; + /// - /// BtnSearch 控件。 + /// Toolbar2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Button BtnSearch; - + protected global::FineUI.Toolbar Toolbar2; + + /// + /// TXT_billnum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextArea TXT_billnum; + /// /// Grid 控件。 /// From fce6d20473f59a327803d2dff1f3b68a582a92ac Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Wed, 20 Jan 2021 16:10:53 +0800 Subject: [PATCH 35/56] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E9=9B=B6?= =?UTF-8?q?=E4=BB=B6=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_DC_UNI_CONTROLLER.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Controller/SCP_DC_UNI_CONTROLLER.cs b/Controller/SCP_DC_UNI_CONTROLLER.cs index 5f2fc68..b625ff5 100644 --- a/Controller/SCP_DC_UNI_CONTROLLER.cs +++ b/Controller/SCP_DC_UNI_CONTROLLER.cs @@ -1692,10 +1692,10 @@ namespace CK.SCP.Controller var _supplierpart = scpdb.TA_VEND_PART.SingleOrDefault(p => p.VendId == supplierpart.Supplier && p.PartCode == supplierpart.PartCode && p.VendPartCode == supplierpart.SupplierPart && p.Site == supplierpart.Domain ); if (_supplierpart == null) { - var _pack = dc.TS_PACK.SingleOrDefault(p => p.PartCode == supplierpart.PartCode && p.Site == supplierpart.Domain && p.Site == supplierpart.Site); - if (_pack != null) - { - } + // var _pack = dc.TS_PACK.SingleOrDefault(p => p.PartCode == supplierpart.PartCode && p.Site == supplierpart.Domain && p.Site == supplierpart.Site); + //if (_pack != null) + //{ + //} _supplierpart = new TA_VEND_PART { VendId = supplierpart.Supplier.ToUpper(),//供应商编号 From f934a3d3abeeb16e8646cfd357259c98b28a0255 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 26 Jan 2021 09:15:05 +0800 Subject: [PATCH 36/56] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_DC_UNI_CONTROLLER.cs | 429 ++++++++++++++-------------- 1 file changed, 218 insertions(+), 211 deletions(-) diff --git a/Controller/SCP_DC_UNI_CONTROLLER.cs b/Controller/SCP_DC_UNI_CONTROLLER.cs index b625ff5..00ec6f4 100644 --- a/Controller/SCP_DC_UNI_CONTROLLER.cs +++ b/Controller/SCP_DC_UNI_CONTROLLER.cs @@ -398,33 +398,69 @@ namespace CK.SCP.Controller case "TED_PO_MSTR": result = UpdatePo(db, scpdb, _task); result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); break; case "TED_RECEIPT_MSTR": if (_task.Creator == "QAD") { - result = UpdateRecive(db, scpdb, _task); + result = UpdateReciveQAD(db, scpdb, _task); result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); } else { - result = UpdateARRIVE(db, scpdb, _task); + result = UpdateRecive(db, scpdb, _task); result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); } break; - case "TED_RETURN_MSTR": - result = UpdateReturn(db, scpdb, _task); - result.Message = _task.TaskID.ToString(); + case "TED_RETURN_MSTR": + result = UpdateARRIVE(db, scpdb, _task); + result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); break; case "TES_SUPPLIER": result = UpdateSupplier(db, scpdb,authdb, _task); result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); break; case "TES_SUPPLIER_PART": result = UpdateSupplierPart(dc, db, scpdb, _task); + result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); break; case "TES_PART_MSTR": result = UpdatePart(db, scpdb, _task); result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); break; //case "TES_SITE": // result = UpdateFactory(db, scpdb, appscpdb, _task); @@ -432,13 +468,14 @@ namespace CK.SCP.Controller case "TES_PURCHASE_PRICE": result = UpdatePrice(db, scpdb, authdb, _task); result.Message = _task.TaskID.ToString(); + Update_TEA_TASK_SUB(db, _task); + EntitiesFactory.SaveDb(scpdb); + EntitiesFactory.SaveDb(db); + EntitiesFactory.SaveDb(dc); + scope.Complete(); break; } - Update_TEA_TASK_SUB(db, _task); - EntitiesFactory.SaveDb(scpdb); - EntitiesFactory.SaveDb(db); - EntitiesFactory.SaveDb(dc); - scope.Complete(); + // p_action(result); result.State = ReturnStatus.Succeed; result.Result = true; @@ -779,7 +816,7 @@ namespace CK.SCP.Controller } - public static ResultObject UpdateRecive(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + public static ResultObject UpdateReciveQAD(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) { ResultObject _ret = new ResultObject(); try @@ -821,23 +858,25 @@ namespace CK.SCP.Controller } scpRcv = new TB_RECEIVE_QAD { - RecvBillNum = detail.ReceiveNbr,//收货单号 + RecvBillNum = detail.ReceiveNbr,//收货单号 + ErpRecvBillNum = detail.ReceiveNbr, State = istate, Remark = "", CreateTime = detail.ReceiptDate == null ? DateTime.Now : (DateTime)detail.ReceiptDate,//创建日期 CreateUser = detail.CreateUser,//创建用户 IsDeleted = false, GUID = detail.TaskID, - BillType = 0 - }; + BillType = 0, + Site = detail.Domain,//地点 + SubSite = detail.Site,//域 + }; scpRcvList.Add(scpRcv); } scpRcv.PoBillNum = detail.PurchaseOrder;//采购单 scpRcv.AsnBillNum = detail.ASN;//发货单号 - scpRcv.Site = detail.Domain;//地点 scpRcv.VendId = detail.Supplier;//供货商名称 scpRcv.ShipTime = detail.ReceiptDate;//收货日期 - scpRcv.SubSite = detail.Site; + scpdb.TB_RECEIVE_QAD.AddOrUpdate(scpRcvList.ToArray()); } @@ -869,6 +908,7 @@ namespace CK.SCP.Controller //} scpRcvDetail = new TB_RECEIVE_DETAIL_QAD(); scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号 + scpRcvDetail.ErpRecvBillNum = detail.ReceiveNbr;//收货单号 scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单 scpRcvDetail.PoLine = detail.Line;//订单行 scpRcvDetail.PartCode = detail.PartCode;//零件号 @@ -876,37 +916,32 @@ namespace CK.SCP.Controller scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 scpRcvDetail.PoUnit = detail.Um;//采购单位 scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 - //收货总量 //DockCode = ?,//收货口 + scpRcvDetail.Qty = detail.ReceiveQuantity; + //收货总量 //DockCode = ?,//收货口 scpRcvDetail.State = 1;// (int)FormState.关闭, - scpRcvDetail.Remark = detail.Remark; scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 scpRcvDetail.IsDeleted = false; scpRcvDetail.GUID = detail.TaskID; scpRcvDetail.BillType = 0; + scpRcvDetail.Remark = detail.Remark; scpRcvDetail.SubSite = detail.Shipto; scpRcvDetail.Site = detail.Domain; - //scpRcvDetail.Currency = detail.Currency; - //scpRcvDetail.Currencyamount = detail.Currencyamount; - //scpRcvDetail.ExchangeRate = detail.Exchangerate==null?"1":detail.Exchangerate.Value.ToString(); - //scpRcvDetail.ExchangeRate1 = detail.Exchangerate2 == null ? "1" : detail.Exchangerate2.Value.ToString(); - //scpRcvDetail.ExchangeRateType = detail.Exchangeratetype; - //scpRcvDetail.WorkOrderID = detail.WorkOrderID; - //scpRcvDetail.POSite = detail.Posite; - //scpRcvDetail.POCost = detail.Purchasecost; - //scpRcvDetail.POStandardCost = detail.Purchasestandardcost; - //scpRcvDetail.ReceiptType = detail.receipttype; - //scpRcvDetail.ReturnReasonCode = detail.Returnreason; - //scpRcvDetail.Requestedby = detail.Requestby; - //scpRcvDetail.TaxEnvironment = detail.Taxenvironment; - //scpRcvDetail.TaxIn = detail.taxin; - //scpRcvDetail.TaxUsage = detail.Taxusage; - //scpRcvDetail.TaxClass = detail.Taxclass; - //scpRcvDetail.PurchaseType = detail.Purchasetype; - //scpRcvDetail.UMConversion = detail.Umconversion; - scpRcveDetailList.Add(scpRcvDetail); + scpRcvDetail.PurCost = detail.Purchasecost; + scpRcvDetail.StdCost = detail.Purchasestandardcost; + scpRcvDetail.Rate = detail.Exchangerate; + scpRcvDetail.Tax = detail.Taxclass; + scpRcvDetail.CurAmt = detail.Currencyamount; + scpRcvDetail.DockCode =detail.Location; } - scpRcvDetail.Qty = detail.ReceiveQuantity; + scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号; + + scpRcvDetail.CurAmt = detail.Currencyamount; + scpRcvDetail.PurCost = detail.Purchasecost; + scpRcvDetail.StdCost = detail.Purchasestandardcost; + scpRcvDetail.Rate = detail.Exchangerate; + scpRcvDetail.Tax = detail.Taxclass; + scpRcveDetailList.Add(scpRcvDetail); } // var _str=JsonHelper.GetJson>(scpRcveDetailList); scpdb.TB_RECEIVE_DETAIL_QAD.AddOrUpdate(scpRcveDetailList.ToArray()); @@ -926,18 +961,17 @@ namespace CK.SCP.Controller } return _ret; } + - - public static ResultObject UpdateARRIVE(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + public static ResultObject UpdateRecive(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) { ResultObject _ret = new ResultObject(); try { - var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList(); + var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID).ToList(); var _scpPoDetailList = new List(); foreach (var detail in _reciveList) { - var scpRcv = scpdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum != null && p.RecvBillNum == detail.ReceiveNbr && p.Site == detail.Domain && p.SubSite == detail.Site); var scpRcvList = new List(); bool isRerviceOk = false; @@ -969,9 +1003,128 @@ namespace CK.SCP.Controller { istate = (int)FormState.开放; } - scpRcv = new TB_RECEIVE + scpRcv = new TB_RECEIVE { - RecvBillNum = detail.ReceiveNbr,//收货单号 + RecvBillNum = detail.ReceiveNbr,//收货单号 + State = istate, + Remark = "", + CreateTime = detail.ReceiptDate == null ? DateTime.Now : (DateTime)detail.ReceiptDate,//创建日期 + CreateUser = detail.CreateUser,//创建用户 + IsDeleted = false, + GUID = detail.TaskID, + BillType = 0 + }; + scpRcvList.Add(scpRcv); + } + scpRcv.PoBillNum = detail.PurchaseOrder;//采购单 + scpRcv.AsnBillNum = detail.ASN;//发货单号 + scpRcv.Site = detail.Domain;//地点 + scpRcv.VendId = detail.Supplier;//供货商名称 + scpRcv.ShipTime = detail.ReceiptDate;//收货日期 + scpRcv.SubSite = detail.Site; + scpdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); + } + + var scpRcveDetailList = new List(); + var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID).ToList(); + foreach (var detail in _reciveDetailList) + { + var poLineNum = Convert.ToInt32(detail.Line); + var scpRcvDetail = + scpdb.TB_RECEIVE_DETAIL.FirstOrDefault( + p => p.RecvBillNum == detail.ReceiveNbr && + p.PoBillNum == detail.PurchaseOrder && + p.PoLine == detail.Line && + p.PartCode == detail.PartCode + + && p.SubSite == detail.Site + ); + if (scpRcvDetail == null) + { + scpRcvDetail = new TB_RECEIVE_DETAIL(); + scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号 + scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单 + scpRcvDetail.PoLine = detail.Line;//订单行 + scpRcvDetail.PartCode = detail.PartCode;//零件号 + scpRcvDetail.Batch = detail.Lot;//批次 + scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 + scpRcvDetail.PoUnit = detail.Um;//采购单位 + scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 + //收货总量 //DockCode = ?,//收货口 + scpRcvDetail.State = 1;// (int)FormState.关闭, + scpRcvDetail.Remark = detail.Remark; + scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 + scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 + scpRcvDetail.IsDeleted = false; + scpRcvDetail.GUID = detail.TaskID; + scpRcvDetail.BillType = 0; + scpRcvDetail.SubSite = detail.Shipto; + scpRcvDetail.Site = detail.Domain; + scpRcveDetailList.Add(scpRcvDetail); + } + scpRcvDetail.Qty = detail.ReceiveQuantity; + } + // var _str=JsonHelper.GetJson>(scpRcveDetailList); + scpdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + _ret.State = ReturnStatus.Succeed; + _ret.MessageList.Add(string.Format("QAD收货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID)); + _ret.Result = true; + // var retDetail=UpdateReciveDetail(db, scpdb, p_entity); + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message); + _ret.Result = false; + _ret.ErrorList.Add(e); + _ret.MessageList.Add(string.Format("QAD收货单更新失败任务编号{0}", p_entity.TaskID)); + throw e; + } + return _ret; + } + public static ResultObject UpdateARRIVE(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) + { + ResultObject _ret = new ResultObject(); + try + { + var _reciveList = db.TED_RECEIPT_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList(); + var _scpPoDetailList = new List(); + foreach (var detail in _reciveList) + { + var scpRcv = scpdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == detail.ReceiveNbr && p.Site == detail.Domain /*&& p.SubSite == detail.Site*/); + var scpRcvList = new List(); + bool isRerviceOk = false; + if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain)) + { + string _domain = detail.Domain; + string _site = detail.Site; + List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList(); + foreach (TA_FACTORY_CONFIG cfg in configs) + { + TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); + if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核") + { + if ("允许" == tacfg.ParamValue) + { + isRerviceOk = true; + } + } + } + } + if (scpRcv == null) + { + int istate = 0; + if (isRerviceOk == false) + { + istate = (int)FormState.关闭; + } + else + { + istate = (int)FormState.开放; + } + scpRcv = new TB_ARRIVE + { + ArrvBillNum = detail.ReceiveNbr,//收货单号 State = istate, Remark = "", CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期 @@ -987,32 +1140,32 @@ namespace CK.SCP.Controller if (!string.IsNullOrEmpty(detail.ASN)) { - var _entity=scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault(); + var _entity = scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault(); if (_entity != null) { _entity.State = 4; } } scpRcv.Site = detail.Domain;//地点 - scpRcv.VendId = detail.Supplier;//供货商名称 + scpRcv.VendId = detail.Supplier.Trim();//供货商名称 scpRcv.ShipTime = detail.ReceiptDate;//收货日期 - scpRcv.SubSite = detail.Site; - scpdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); + // scpRcv.SubSite = detail.Site; + scpdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray()); } - var scpRcveDetailList = new List(); + var scpRcveDetailList = new List(); var _reciveDetailList = db.TED_RECEIPT_DET.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReceiveNbr)).ToList(); foreach (var detail in _reciveDetailList) { var poLineNum = Convert.ToInt32(detail.Line); var scpRcvDetail = - scpdb.TB_RECEIVE_DETAIL.SingleOrDefault( - p => p.RecvBillNum == detail.ReceiveNbr && + scpdb.TB_ARRIVE_DETAIL.SingleOrDefault( + p => p.ArrvBillNum == detail.ReceiveNbr && p.PoBillNum == detail.PurchaseOrder && p.PoLine == detail.Line && p.PartCode == detail.PartCode && p.Batch == detail.Lot - &&p.SubSite==detail.Site + //&& p.SubSite == detail.Site ); if (scpRcvDetail == null) { @@ -1026,9 +1179,9 @@ namespace CK.SCP.Controller //{ // istate = (int)FormState.开放; //} - scpRcvDetail = new TB_RECEIVE_DETAIL(); - scpRcvDetail.RecvBillNum = detail.ReceiveNbr;//收货单号 - scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单 + scpRcvDetail = new TB_ARRIVE_DETAIL(); + scpRcvDetail.ArrvBillNum = detail.ReceiveNbr;//收货单号 + scpRcvDetail.PoBillNum = detail.PurchaseOrder.Trim();//采购单 scpRcvDetail.PoLine = detail.Line;//订单行 scpRcvDetail.PartCode = detail.PartCode;//零件号 scpRcvDetail.Batch = detail.Lot;//批次 @@ -1043,13 +1196,13 @@ namespace CK.SCP.Controller scpRcvDetail.IsDeleted = false; scpRcvDetail.GUID = detail.TaskID; scpRcvDetail.BillType = 0; - scpRcvDetail.SubSite = detail.Site; - scpRcvDetail.Site = detail.Domain; + // scpRcvDetail.SubSite = detail.Site; + // scpRcvDetail.Site = detail.Domain; scpRcveDetailList.Add(scpRcvDetail); } } - var _str = JsonHelper.GetJson>(scpRcveDetailList); - scpdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); + var _str = JsonHelper.GetJson>(scpRcveDetailList); + scpdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); _ret.State = ReturnStatus.Succeed; _ret.MessageList.Add(string.Format("到货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID)); _ret.Result = true; @@ -1187,8 +1340,8 @@ namespace CK.SCP.Controller _entity.TaskID = p_taskId; _entity.CommandType = "A"; _entity.DataID = Guid.NewGuid(); - _entity.Domain = _invDetail.Site.Trim(); - _entity.Site = _invDetail.SubSite.Trim(); + _entity.Domain = _invDetail.Site; + _entity.Site = _invDetail.SubSite; _entity.PartCode = _invDetail.PartCode; _entity.Tax = _invDetail.Tax.ToString(); _detList.Add(_entity); @@ -1202,7 +1355,7 @@ namespace CK.SCP.Controller DataCount = p_invoiceList.Count, TaskID = p_taskId, TableName = "TED_INVOICE_MSTR", - Site = _vinvoice.SubSite.Trim(), + Site = _vinvoice.SubSite, Domain = _vinvoice.Site, CreateTime = _api.CreateTime, CreateUser = _api.CreateOper, @@ -1232,154 +1385,7 @@ namespace CK.SCP.Controller return _ret; } - - - public static ResultObject UpdateReturn(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) - { - ResultObject _ret = new ResultObject(); - try - { - var _reciveList = db.TED_RETURN_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReturnNbr)).ToList(); - var _scpPoDetailList = new List(); - foreach (var detail in _reciveList) - { - var scpRcv = scpdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum != null && p.RecvBillNum == detail.ReturnNbr && p.Site == detail.Domain && p.SubSite == detail.Site); - var scpRcvList = new List(); - bool isRerviceOk = false; - if (!string.IsNullOrEmpty(detail.Site) && !string.IsNullOrEmpty(detail.Domain)) - { - string _domain = detail.Domain; - string _site = detail.Site; - List configs = scpdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == _domain).ToList(); - foreach (TA_FACTORY_CONFIG cfg in configs) - { - TA_CONFIG tacfg = scpdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); - if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "收货自动审核") - { - if ("允许" == tacfg.ParamValue) - { - isRerviceOk = true; - } - } - } - } - if (scpRcv == null) - { - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.关闭; - } - else - { - istate = (int)FormState.开放; - } - scpRcv = new TB_RECEIVE - { - RecvBillNum = detail.ReturnNbr,//收货单号 - State = istate, - Remark = "", - CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime,//创建日期 - CreateUser = detail.CreateUser,//创建用户 - IsDeleted = false, - GUID = detail.TaskID, - BillType = 1 - }; - scpRcvList.Add(scpRcv); - } - scpRcv.PoBillNum = detail.PurchaseOrder;//采购单 - scpRcv.AsnBillNum = detail.ASN;//发货单号 - - if (!string.IsNullOrEmpty(detail.ASN)) - { - var _entity=scpdb.TB_ASN.Where(p => p.AsnBillNum == detail.ASN).FirstOrDefault(); - if (_entity != null) - { - _entity.State = 4; - } - } - scpRcv.Site = detail.Domain;//地点 - scpRcv.VendId = detail.Supplier;//供货商名称 - scpRcv.ShipTime = detail.ReturnDate;//收货日期 - scpRcv.SubSite = detail.Site; - scpdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); - } - - var scpRcveDetailList = new List(); - var _reciveDetailList = db.TED_RETURN_DET.Where(p => p.TaskID == p_entity.TaskID ).ToList(); - var _recive = db.TED_RETURN_MSTR.Where(p => p.TaskID == p_entity.TaskID && !string.IsNullOrEmpty(p.ReturnNbr)).FirstOrDefault(); - if (_recive != null) - { - foreach (var detail in _reciveDetailList) - { - detail.ReturnNbr = _recive.ReturnNbr; - var poLineNum = Convert.ToInt32(detail.Line); - var scpRcvDetail = - scpdb.TB_RECEIVE_DETAIL.SingleOrDefault( - p => p.RecvBillNum == detail.ReturnNbr && - p.PoBillNum == detail.PurchaseOrder && - p.PoLine == detail.Line && - p.PartCode == detail.PartCode && - p.Batch == detail.Lot - && p.SubSite == detail.Site - ); - if (scpRcvDetail == null) - { - - //int istate = 0; - //if (isRerviceOk == false) - //{ - // istate = (int)FormState.关闭; - //} - //else - //{ - // istate = (int)FormState.开放; - //} - scpRcvDetail = new TB_RECEIVE_DETAIL(); - scpRcvDetail.RecvBillNum = detail.ReturnNbr;//收货单号 - scpRcvDetail.PoBillNum = detail.PurchaseOrder;//采购单 - scpRcvDetail.PoLine = detail.Line;//订单行 - scpRcvDetail.PartCode = detail.PartCode;//零件号 - scpRcvDetail.Batch = detail.Lot;//批次 - scpRcvDetail.VendBatch = detail.SupplierLot;//供应商批号 - scpRcvDetail.PoUnit = detail.Um;//采购单位 - scpRcvDetail.LocUnit = detail.logisticsUm;//物流单位 - scpRcvDetail.Qty = detail.ReturnQuantity;//收货总量 //DockCode = ?,//收货口 - scpRcvDetail.State = 1;// (int)FormState.关闭, - scpRcvDetail.Remark = detail.Remark; - scpRcvDetail.CreateTime = detail.CreateTime == null ? DateTime.Now : (DateTime)detail.CreateTime;//创建日期 - scpRcvDetail.CreateUser = detail.CreateUser;//创建用户 - scpRcvDetail.IsDeleted = false; - scpRcvDetail.GUID = detail.TaskID; - scpRcvDetail.BillType = 1; - scpRcvDetail.SubSite = detail.Site; - scpRcvDetail.Site = detail.Domain; - - scpRcveDetailList.Add(scpRcvDetail); - } - } - var _str = JsonHelper.GetJson>(scpRcveDetailList); - scpdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); - } - _ret.State = ReturnStatus.Succeed; - _ret.MessageList.Add(string.Format("退货单更新{0}任务编号{1}", _reciveDetailList.Count().ToString(), p_entity.TaskID)); - _ret.Result = true; - // var retDetail=UpdateReciveDetail(db, scpdb, p_entity); - } - catch (Exception e) - { - _ret.State = ReturnStatus.Failed; - LogHelper.Writlog(LogHelper.LogType.Error, typeof(TEA_TASK_SUB), "UpdateRecive", e.Message); - _ret.Result = false; - _ret.ErrorList.Add(e); - _ret.MessageList.Add(string.Format("退货单更新失败任务编号{0}", p_entity.TaskID)); - throw e; - } - return _ret; - - } - - + public static ResultObject UpdatePoDetail(ExchangeCenterContext db, ScpEntities scpdb, TEA_TASK_SUB p_entity) { ResultObject _ret = new ResultObject(); @@ -1450,13 +1456,14 @@ namespace CK.SCP.Controller scpPo = new TB_PO { PoBillNum = po.PurchaseOrder,//订单号 - //ErpBillNum = po.xxqad_pod_prj,//ERP订单号 + ErpBillNum = po.PurchaseOrder,//ERP订单号 VendId = po.Supplier.ToUpper(),//供应商编号 ModType = Int32.TryParse(po.ModeType, out temp) ? temp : (int?)null, //单据类型(1:日程单,2:离散订单) Contacter = po.Contact,//联系人 Site = po.Domain,//地点 SubSite = po.Site, State = po.Status, + Remark = po.Remark,//说明 CreateTime = po.CreateTime == null ? DateTime.Now : (DateTime)po.CreateTime,//创建日期 CreateUser = po.CreateUser,//创建用户 IsDeleted = false, From f7cba2706c57ec3c101ec82e267b2bbd7f102346 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Tue, 26 Jan 2021 09:15:52 +0800 Subject: [PATCH 37/56] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_TA_LANGUAGE_CONTROLLER.cs | 10 +- SCP/SCP.csproj | 16 ++ SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs | 10 +- SCP/Views/BasicData/SCP_LANGUAGE_1.aspx | 88 ++++++++++ SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs | 123 ++++++++++++++ .../BasicData/SCP_LANGUAGE_1.aspx.designer.cs | 152 ++++++++++++++++++ SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx | 33 ++++ .../BasicData/SCP_LANGUAGE_DETAIL.aspx.cs | 69 ++++++++ .../SCP_LANGUAGE_DETAIL.aspx.designer.cs | 116 +++++++++++++ 9 files changed, 607 insertions(+), 10 deletions(-) create mode 100644 SCP/Views/BasicData/SCP_LANGUAGE_1.aspx create mode 100644 SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs create mode 100644 SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs create mode 100644 SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx create mode 100644 SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs create mode 100644 SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs diff --git a/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs b/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs index 3896726..0b68e5b 100644 --- a/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs +++ b/Controller/SCP_TA_LANGUAGE_CONTROLLER.cs @@ -208,14 +208,16 @@ namespace CK.SCP.Controller - public static ResultObject Del_TA_LANGUAGE(TA_LANGUAGE p_entity) + public static ResultObject Del_TA_LANGUAGE(string _ls) { ResultObject _ret = new ResultObject(); 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) @@ -292,8 +294,6 @@ namespace CK.SCP.Controller } - - + } - diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj index dcebee6..a07d889 100644 --- a/SCP/SCP.csproj +++ b/SCP/SCP.csproj @@ -255,6 +255,8 @@ + + @@ -5008,6 +5010,20 @@ SCP_LANGUAGE.aspx + + SCP_LANGUAGE_1.aspx + ASPXCodeBehind + + + SCP_LANGUAGE_1.aspx + + + SCP_LANGUAGE_DETAIL.aspx + ASPXCodeBehind + + + SCP_LANGUAGE_DETAIL.aspx + SCP_MoldSharing.aspx ASPXCodeBehind diff --git a/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs b/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs index 99890cb..afe2987 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs +++ b/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs @@ -192,11 +192,11 @@ namespace SCP.BasicData 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(); - } + //var ret = SCP_TA_LANGUAGE_CONTROLLER.Del_TA_LANGUAGE(new TA_LANGUAGE { GUID = TXT_GUID.Text }); + //if (ret.State == ReturnStatus.Succeed) + //{ + // BindData(); + //} } diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx new file mode 100644 index 0000000..73becf7 --- /dev/null +++ b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx @@ -0,0 +1,88 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_1.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_1" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs new file mode 100644 index 0000000..9cf25b5 --- /dev/null +++ b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs @@ -0,0 +1,123 @@ +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 _list = new List(); + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindLANGUAGE(); + } + + } + public void BindLANGUAGE() + { + _list = SearchData(); + var list = Sort(_list.AsQueryable(), Grid_TA_LANGUAGE); + Grid_TA_LANGUAGE.DataSource = list; + Grid_TA_LANGUAGE.RecordCount = list.Count(); + Grid_TA_LANGUAGE.DataBind(); + } + public List 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(); + } + + 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 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}", CH, EN); + 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) + { + + } + } +} \ No newline at end of file diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs new file mode 100644 index 0000000..f88b11d --- /dev/null +++ b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.BasicData +{ + + + public partial class SCP_LANGUAGE_1 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar2; + + /// + /// Button3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Button3; + + /// + /// Insert 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Insert; + + /// + /// Delete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Delete; + + /// + /// Update 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Update; + + /// + /// TextCH 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextCH; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnSearch; + + /// + /// Grid_TA_LANGUAGE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid Grid_TA_LANGUAGE; + + /// + /// ToolbarSeparator3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator3; + + /// + /// ToolbarText2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarText ToolbarText2; + + /// + /// ddlGridPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlGridPageSize; + + /// + /// highlightRows 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.HiddenField highlightRows; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Window Window1; + } +} diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx new file mode 100644 index 0000000..2e469af --- /dev/null +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx @@ -0,0 +1,33 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_DETAIL.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_DE_TAIL" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs new file mode 100644 index 0000000..63c055e --- /dev/null +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs @@ -0,0 +1,69 @@ +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_DE_TAIL : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + 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; + 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() { _entity }); + if (ret1.State == ReturnStatus.Succeed) + { + + } + } + + } + + } + + + } + } diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs new file mode 100644 index 0000000..3dadf80 --- /dev/null +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// 自动生成> +//------------------------------------------------------------------------------ + +namespace SCP.Views.BasicData +{ + + + public partial class SCP_LANGUAGE_DE_TAIL + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Form Panel1; + + /// + /// TXT_GUID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_GUID; + + /// + /// TXT_CH 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_CH; + + /// + /// TXT_EN 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_EN; + + /// + /// TXT_RU 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_RU; + + /// + /// TXT_DE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_DE; + + /// + /// TXT_FR 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_FR; + + /// + /// TXT_AR 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_AR; + + /// + /// TXT_JP 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TXT_JP; + + /// + /// Btn_Save 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Btn_Save; + } +} From b029b6c5a91bfeb6824a35246ced4072f040ffc3 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 26 Jan 2021 14:27:36 +0800 Subject: [PATCH 38/56] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=9C=B0=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_ASK_CONTROLLER.cs | 3 +++ Models/ScpEntity/TB_ASN_DETAIL.cs | 1 + SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs | 22 +----------------- SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs | 23 ++----------------- SCP/default.aspx | 4 ++-- 5 files changed, 9 insertions(+), 44 deletions(-) diff --git a/Controller/SCP_ASK_CONTROLLER.cs b/Controller/SCP_ASK_CONTROLLER.cs index 8b34cda..de89ec5 100644 --- a/Controller/SCP_ASK_CONTROLLER.cs +++ b/Controller/SCP_ASK_CONTROLLER.cs @@ -1223,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; @@ -1266,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; diff --git a/Models/ScpEntity/TB_ASN_DETAIL.cs b/Models/ScpEntity/TB_ASN_DETAIL.cs index c541e00..4b9ed93 100644 --- a/Models/ScpEntity/TB_ASN_DETAIL.cs +++ b/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; } } } diff --git a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs index c504439..f050447 100644 --- a/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs +++ b/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs @@ -214,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(rowDataKeys[35]); _entity.BeginTime = DP_BeginTime.SelectedDate; @@ -229,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"]; diff --git a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs index 243e217..593b3fe 100644 --- a/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs +++ b/SCP/Views/SupplierData/SCP_ASN_CREATE.aspx.cs @@ -217,7 +217,8 @@ namespace SCP.SupplierData _entity.PartDesc1 = rowDataKeys[23] as string; _entity.CurrencyDesc = rowDataKeys[24] as string; _entity.Site = rowDataKeys[25] as string; - _entity.VendName = rowDataKeys[26] as string; + _entity.SubSite = rowDataKeys[36] as string; + _entity.VendName = rowDataKeys[26] as string; _entity.PartDesc2 = rowDataKeys[27] as string; _entity.AskBillNum = rowDataKeys[28] as string; _entity.AskQty = ConvertHelper.To(rowDataKeys[29]); @@ -240,26 +241,6 @@ namespace SCP.SupplierData var _Batch1 = modifyValue.Keys.Contains("Batch") ? modifyValue["Batch"] : _entity.Batch; var _VendBatch = modifyValue.Keys.Contains("VendBatch") ? modifyValue["VendBatch"].ToString() : _entity.Batch; var _ProduceDate = modifyValue.Keys.Contains("ProduceDate") ? modifyValue["ProduceDate"].ToString() : _entity.ProduceDate.ToString(); - 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 (string.IsNullOrEmpty(_VendBatch) || string.IsNullOrEmpty(_ProduceDate)) { diff --git a/SCP/default.aspx b/SCP/default.aspx index beef335..4f94e56 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('JZ1' == obj.options[i].value) { + if ('2000' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'JZ1'; + _factory.value = '2000'; } } } From ce9d28f30747304dfceff992fda39057373954fd Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Tue, 26 Jan 2021 14:28:04 +0800 Subject: [PATCH 39/56] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs | 385 +++++++++--------- SCP/Views/BasicData/SCP_LANGUAGE_1.aspx | 6 +- SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx | 47 ++- .../BasicData/SCP_LANGUAGE_DETAIL.aspx.cs | 28 +- .../SCP_LANGUAGE_DETAIL.aspx.designer.cs | 44 +- 5 files changed, 291 insertions(+), 219 deletions(-) diff --git a/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs b/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs index afe2987..e292e71 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs +++ b/SCP/Views/BasicData/SCP_LANGUAGE.aspx.cs @@ -13,197 +13,198 @@ namespace SCP.BasicData { public partial class SCP_LANGUAGE : PageBase { - private List _list=new List(); - public int num; - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - BindData(); - } - } - - public void BindData() - { - _list = SearchData(); - var list = Sort(_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(_list.AsQueryable(), Grid_TA_LANGUAGE).ToList(); - - // Dictionary cellheader = new Dictionary(){ - // { "AddressNo", "地点编号" }, - // { "Region", "所属区域" }, - // { "AccountingUnit", "会计单位" }, - // { "AddressDescription", "地点描述" } - //}; - // string url = EntityListToExcel2003(cellheader, list, "地址"); - //} - } - - //查询 - protected void btnSearch_OnClick(object sender, EventArgs e) - { - BindData(); - } - public List 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(); - } - - 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(_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(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(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() { _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(_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(); - } + // private List _list=new List(); + // public int num; + // protected void Page_Load(object sender, EventArgs e) + // { + // if (!IsPostBack) + // { + // BindData(); + // } + // } + + // public void BindData() + // { + // _list = SearchData(); + // var list = Sort(_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(_list.AsQueryable(), Grid_TA_LANGUAGE).ToList(); + + // // Dictionary cellheader = new Dictionary(){ + // // { "AddressNo", "地点编号" }, + // // { "Region", "所属区域" }, + // // { "AccountingUnit", "会计单位" }, + // // { "AddressDescription", "地点描述" } + // //}; + // // string url = EntityListToExcel2003(cellheader, list, "地址"); + // //} + // } + + // //查询 + // protected void btnSearch_OnClick(object sender, EventArgs e) + // { + // BindData(); + // } + // //public List 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(); + // // } + + // // 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(_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(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(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() { _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(_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(); + // } + //} } } \ No newline at end of file diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx index 73becf7..bd6b1c2 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx +++ b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx @@ -61,11 +61,9 @@ - - + - - + diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx index 2e469af..623ad1a 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_DETAIL.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_DE_TAIL" %> +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_LANGUAGE_DETAIL.aspx.cs" Inherits="SCP.Views.BasicData.SCP_LANGUAGE_DETAIL" %> @@ -8,9 +8,41 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + @@ -23,11 +55,16 @@ - + + + + +--%> + \ No newline at end of file diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs index 63c055e..3be7eda 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs @@ -25,16 +25,34 @@ using System.Drawing; namespace SCP.Views.BasicData { - public partial class SCP_LANGUAGE_DE_TAIL : System.Web.UI.Page + 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"]; + + TXT_CH.Text = _entity.CH; + TXT_EN.Text = _entity.EN; + var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(_entity); + } } - protected void Btn_Save_Click(object sender, EventArgs e) + + protected void Btn_Save_Click(object sender, EventArgs e) { TA_LANGUAGE _entity = new TA_LANGUAGE(); - _entity.GUID = TXT_GUID.Text; + _entity.GUID = Guid.NewGuid().ToString("N").ToUpper(); _entity.CH = TXT_CH.Text; _entity.EN = TXT_EN.Text; _entity.RU = TXT_RU.Text; @@ -42,7 +60,7 @@ namespace SCP.Views.BasicData _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 }); + var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text, EN = TXT_EN.Text }); if (ret.State == ReturnStatus.Succeed) { @@ -56,7 +74,7 @@ namespace SCP.Views.BasicData var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List() { _entity }); if (ret1.State == ReturnStatus.Succeed) { - + Alert.Show("保存成功"); } } diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs index 3dadf80..3fd3276 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs @@ -11,7 +11,7 @@ namespace SCP.Views.BasicData { - public partial class SCP_LANGUAGE_DE_TAIL + public partial class SCP_LANGUAGE_DETAIL { /// @@ -23,6 +23,15 @@ namespace SCP.Views.BasicData /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.PageManager PageManager1; + /// /// Panel1 控件。 /// @@ -30,16 +39,34 @@ namespace SCP.Views.BasicData /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.Form Panel1; + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar2; + + /// + /// Btn_Save 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button Btn_Save; /// - /// TXT_GUID 控件。 + /// F_PO_DETAIL 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox TXT_GUID; + protected global::FineUI.Form F_PO_DETAIL; /// /// TXT_CH 控件。 @@ -103,14 +130,5 @@ namespace SCP.Views.BasicData /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox TXT_JP; - - /// - /// Btn_Save 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Button Btn_Save; } } From 9b892823f8338d8a25d21af8a58f74ac7f50d304 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 26 Jan 2021 14:46:42 +0800 Subject: [PATCH 40/56] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E7=9C=8B=E6=9D=BFsite?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=97=A0=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_PO_CONTROLLER.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Controller/SCP_PO_CONTROLLER.cs b/Controller/SCP_PO_CONTROLLER.cs index 33a4963..ec4d00b 100644 --- a/Controller/SCP_PO_CONTROLLER.cs +++ b/Controller/SCP_PO_CONTROLLER.cs @@ -2170,6 +2170,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; From d655515157cf65746d52f0a209968cfc20a3828b Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 26 Jan 2021 16:55:34 +0800 Subject: [PATCH 41/56] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9C=B0=E7=82=B9=E5=92=8C=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_DC_UNI_CONTROLLER.cs | 2 +- Controller/SCP_INVOICE_CONTROLLER.cs | 3 +++ Models/ScpEntity/TB_INVOICE.cs | 2 ++ Models/ScpEntity/TB_INVOICE_DETAIL.cs | 5 ++++- Models/ScpEntity/V_TB_RECEIVE_LIST.cs | 1 + SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx | 2 +- SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs | 2 ++ 7 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Controller/SCP_DC_UNI_CONTROLLER.cs b/Controller/SCP_DC_UNI_CONTROLLER.cs index 00ec6f4..d959d64 100644 --- a/Controller/SCP_DC_UNI_CONTROLLER.cs +++ b/Controller/SCP_DC_UNI_CONTROLLER.cs @@ -1311,7 +1311,7 @@ namespace CK.SCP.Controller //_add.VatDebitLC = _vinvoice.BlancePrice.Value;//税额调整 //_add.VatDebitTC = _vinvoice.ContractPrice.Value; // _addList.Add(_add); - } + } if ((_vinvoice.BlancePrice != null && _vinvoice.BlancePrice.Value != 0)) { _invMast.InvoiceAmountTC = (_vinvoice.TaxAmount == null ? 0 : _vinvoice.TaxAmount.Value) + _vinvoice.BlancePrice.Value; diff --git a/Controller/SCP_INVOICE_CONTROLLER.cs b/Controller/SCP_INVOICE_CONTROLLER.cs index 20ea900..ad98597 100644 --- a/Controller/SCP_INVOICE_CONTROLLER.cs +++ b/Controller/SCP_INVOICE_CONTROLLER.cs @@ -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; diff --git a/Models/ScpEntity/TB_INVOICE.cs b/Models/ScpEntity/TB_INVOICE.cs index 13671bb..98a2951 100644 --- a/Models/ScpEntity/TB_INVOICE.cs +++ b/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; } diff --git a/Models/ScpEntity/TB_INVOICE_DETAIL.cs b/Models/ScpEntity/TB_INVOICE_DETAIL.cs index 0879727..a7cd28e 100644 --- a/Models/ScpEntity/TB_INVOICE_DETAIL.cs +++ b/Models/ScpEntity/TB_INVOICE_DETAIL.cs @@ -52,7 +52,10 @@ namespace CK.SCP.Models.ScpEntity [StringLength(50)] public string DiscountRemark { get; set; } public Nullable IsRed { get; set; } - + [StringLength(50)] + public string Site { get; set; } + [StringLength(50)] + public string SubSite { get; set; } } } diff --git a/Models/ScpEntity/V_TB_RECEIVE_LIST.cs b/Models/ScpEntity/V_TB_RECEIVE_LIST.cs index bb0e3cc..61845a4 100644 --- a/Models/ScpEntity/V_TB_RECEIVE_LIST.cs +++ b/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 ShipTime { get; set; } public string OperName { get; set; } diff --git a/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx b/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx index bb82f68..30a8d94 100644 --- a/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx +++ b/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx @@ -36,7 +36,7 @@ PageSize="1000" BoxFlex="1" CssClass="maingrid" - DataKeyNames="UID,RecvBillNum,PoLine,PartCode,Batch,Qty,DockCode,Remark,CreateTime,CreateUser,IsDeleted,GUID,AsnBillNum,Site,VendId,ShipTime,OperName,PartDesc1,State,PoBillNum,VendName,Site_Desc,PoUnit,LocUnit,Price,VendBatch,Currency,BillType_DESC,ErpRecvBillNum,PurCost,StdCost" + DataKeyNames="UID,RecvBillNum,PoLine,PartCode,Batch,Qty,DockCode,Remark,CreateTime,CreateUser,IsDeleted,GUID,AsnBillNum,Site,VendId,ShipTime,OperName,PartDesc1,State,PoBillNum,VendName,Site_Desc,PoUnit,LocUnit,Price,VendBatch,Currency,BillType_DESC,ErpRecvBillNum,PurCost,StdCost,SubSite" IsDatabasePaging="True" AllowPaging="True" SortDirection="DESC" diff --git a/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs b/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs index 64f8d60..371b2c5 100644 --- a/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs +++ b/SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs @@ -213,6 +213,8 @@ namespace SCP.Views.SupplierData _entity.AsnBillNum = rowDataKeys[12] as string; _entity.Site = rowDataKeys[13] as string; invoice.Site = rowDataKeys[13] as string; + _entity.SubSite = rowDataKeys[31] as string; + invoice.SubSite = rowDataKeys[31] as string; _entity.VendId = rowDataKeys[14] as string; _entity.ShipTime = ConvertHelper.To(rowDataKeys[15]); _entity.OperName = rowDataKeys[16] as string; From 434cf0b09212f6bd7346018f6a681c2981252ed7 Mon Sep 17 00:00:00 2001 From: TML <1448969505@qq.com> Date: Thu, 28 Jan 2021 08:53:05 +0800 Subject: [PATCH 42/56] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/Views/BasicData/SCP_LANGUAGE_1.aspx | 48 ++++----- SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs | 5 +- SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx | 39 ++----- .../BasicData/SCP_LANGUAGE_DETAIL.aspx.cs | 101 +++++++++++++----- .../SCP_LANGUAGE_DETAIL.aspx.designer.cs | 4 +- 5 files changed, 103 insertions(+), 94 deletions(-) diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx index bd6b1c2..facf185 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx +++ b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx @@ -26,30 +26,21 @@ - + - - + - - + @@ -62,14 +53,15 @@ - - - - - - - - + + + + + + + + + @@ -78,8 +70,8 @@ - diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs index 9cf25b5..a58aa7a 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs +++ b/SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs @@ -87,9 +87,10 @@ namespace SCP.Views.BasicData } 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}", CH, EN); + 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) diff --git a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx index 623ad1a..96d0335 100644 --- a/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx +++ b/SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx @@ -8,9 +8,9 @@ - - - + + + @@ -22,9 +22,10 @@ - + - + + @@ -40,31 +41,3 @@ - <%-- - - - - - - - - - - - - - - - - - - -