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; }