From 306769108e07345ef5e335f56abcd9c0bc839c86 Mon Sep 17 00:00:00 2001 From: qian Date: Wed, 24 Jan 2024 10:57:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9admin=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=97=B6=E9=97=B4=20=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs | 10 ++++++++++ .../SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs | 10 ++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs b/北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs index 9de53de..b419380 100644 --- a/北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs +++ b/北京北汽/SCP/Views/PlanData/SCP_PO_CQ.aspx.cs @@ -195,6 +195,7 @@ namespace SCP.Views.PlanData if (string.IsNullOrEmpty(_fileName)) { Alert.Show("选择文件为空!"); + FileUp.Reset(); return; } string _lx = _fileName.Split('.')[1]; @@ -214,6 +215,7 @@ namespace SCP.Views.PlanData if (partCodeList.Count == 0) { Alert.Show("未填写零件编码!"); + FileUp.Reset(); return; } List list1 = new List(); @@ -221,12 +223,14 @@ namespace SCP.Views.PlanData if (list1.Count()>0) { Alert.Show(string.Format("导入文件中有不存在的零件,如{0}", list1.FirstOrDefault())); + FileUp.Reset(); return; } var checkret = SCP_PO_CONTROLLER.Check_EXCEL_PO_MOD_CQ(list, p_modtype, CurrentUser.FactoryList[0], CurrentUser.SubSiteList[0]); if (checkret.State == ReturnStatus.Failed && checkret.Result == false) { Alert.Show(string.Join("
", checkret.MessageList)); + FileUp.Reset(); return; } if (CurrentUser.ConfigList.ContainsKey("数据中心接口")) @@ -250,6 +254,7 @@ namespace SCP.Views.PlanData if (saveret.State == ReturnStatus.Succeed && saveret.Result == true) { BindOrder(); + FileUp.Reset(); Alert.Show("订单编号" + saveret.Message + "导入成功!"); return; } @@ -257,6 +262,7 @@ namespace SCP.Views.PlanData { //Alert.Show(string.Join("
", saveret.MessageList)); Alert.Show(saveret.Message); + FileUp.Reset(); return; } } @@ -268,6 +274,7 @@ namespace SCP.Views.PlanData if (string.IsNullOrEmpty(_fileName)) { Alert.Show("选择文件为空!"); + FileUp.Reset(); return; } string _lx = _fileName.Split('.')[1]; @@ -287,6 +294,7 @@ namespace SCP.Views.PlanData if (checkret.State == ReturnStatus.Failed && checkret.Result == false) { Alert.Show(string.Join("
", checkret.MessageList)); + FileUp.Reset(); return; } if (CurrentUser.ConfigList.ContainsKey("数据中心接口")) @@ -310,6 +318,7 @@ namespace SCP.Views.PlanData if (saveret.State == ReturnStatus.Succeed && saveret.Result == true) { BindOrder(); + FileUp.Reset(); Alert.Show("订单编号" + saveret.Message + "导入成功!"); return; } @@ -317,6 +326,7 @@ namespace SCP.Views.PlanData { //Alert.Show(string.Join("
", saveret.MessageList)); Alert.Show(saveret.Message); + FileUp.Reset(); return; } } diff --git a/北京北汽/SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs b/北京北汽/SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs index 997c4c2..5819867 100644 --- a/北京北汽/SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs +++ b/北京北汽/SCP/Views/PlanData/SCP_TB_ASK_DETAIL_PO.aspx.cs @@ -65,11 +65,13 @@ namespace SCP.PlanData _entity.UserInAddress = CurrentUser.FactoryList; if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) { - if (User.Identity.Name == "admin") + if (User.Identity.Name.Contains( "admin")) { - _entity.TimeBegin = DateTime.Now.AddMonths(-3); - _entity.TimeEnd = DateTime.Now; - + + if (_entity.TimeBegin <= (DateTime.Now.AddMonths(-3))) + { + _entity.TimeBegin = DateTime.Now.AddMonths(-3); + } } _entity.UserName = User.Identity.Name; }