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 @@