From d0965f84d2990a5be4042882b460b33f95defbba Mon Sep 17 00:00:00 2001 From: qian Date: Fri, 27 Oct 2023 09:23:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E6=B1=BDscp=20=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=20=E6=8F=90=E7=A4=BA=20=E6=9D=83=E9=99=90=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E=20+=20=E6=9F=A5=E7=9C=8B3000=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/SCP_LOGINNUMBER_CONTROLLER.cs | 2 +- 北京北汽/SCP/Business/PageBase.cs | 160 ++++++++++++---- 北京北汽/SCP/Views/BasicData/Part.aspx.cs | 22 ++- .../SCP/Views/BasicData/Price.aspx.cs | 34 +++- .../SCP/Views/BasicData/PriceUpdate.aspx.cs | 30 ++- .../Views/BasicData/SCP_RECIVE_PORT.aspx.cs | 26 ++- .../Views/BasicData/SCP_TA_VEND_PART.aspx.cs | 2 +- .../Views/BasicData/SCP_TB_Address.aspx.cs | 26 ++- .../SCP/Views/BasicData/Supplier.aspx.cs | 37 +++- .../Views/SupplierData/SCP_RECEIVE_LIST.aspx | 7 +- .../SupplierData/SCP_RECEIVE_LIST.aspx.cs | 37 +++- 北京北汽/SCP/default_hb.aspx | 174 +++++++++--------- 北京北汽/SCP/default_hb.aspx.cs | 89 +++++++-- 北京北汽/SCP/default_hb.aspx.designer.cs | 13 +- 14 files changed, 494 insertions(+), 165 deletions(-) diff --git a/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs b/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs index 8a818b0..70bac74 100644 --- a/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs +++ b/北京北汽/Controller/SCP_LOGINNUMBER_CONTROLLER.cs @@ -36,7 +36,7 @@ namespace CK.SCP.Controller if (user == null) { - _ret.MessageList.Add("用户名"+ username+"不存在,请输入正确用户名"); + _ret.MessageList.Add("用户名或密码错误!"); } else { diff --git a/北京北汽/SCP/Business/PageBase.cs b/北京北汽/SCP/Business/PageBase.cs index 6fa39bc..a66d9b1 100644 --- a/北京北汽/SCP/Business/PageBase.cs +++ b/北京北汽/SCP/Business/PageBase.cs @@ -28,6 +28,9 @@ using NPOI.XSSF.UserModel; using NPOI.SS.Util; using static CK.SCP.Controller.SCP_COM_CONTROLLER; using CK.SCP.Models.Enums; +using SCP.Common; +using System.Drawing.Imaging; +using System.Drawing; namespace SCP { @@ -151,7 +154,7 @@ namespace SCP protected void BindVender(DropDownList p_dl) { var _entity = CurrentUser.FactoryList.FirstOrDefault(); - var ls= SCP_TB_VENDER_CONTROLLER.Getlist(_entity); + var ls = SCP_TB_VENDER_CONTROLLER.Getlist(_entity); if (!string.IsNullOrEmpty(_entity)) { @@ -159,7 +162,7 @@ namespace SCP if (_entity == "CNS") { lsVender = ls.Where(p => p.VendId.Substring(0, 1) == "R" || p.VendId.Substring(0, 1) == "E").ToList(); - + } lsVender.ForEach(p => { @@ -172,7 +175,7 @@ namespace SCP p_dl.Items.Insert(0, new FineUI.ListItem("--无供应商--", string.Empty)); } - + } @@ -198,11 +201,11 @@ namespace SCP - #endregion + #endregion #region 表格相关 - protected int GetSelectedDataKeyID(Grid grid) + protected int GetSelectedDataKeyID(Grid grid) { int id = -1; int rowIndex = grid.SelectedRowIndex; @@ -440,9 +443,9 @@ namespace SCP { return q.SortBy(grid.SortField + " " + grid.SortDirection); } - protected IQueryable Sort(IQueryable q, FineUI.Grid grid,string p_asc) + protected IQueryable Sort(IQueryable q, FineUI.Grid grid, string p_asc) { - return q.SortBy(grid.SortField,p_asc); + return q.SortBy(grid.SortField, p_asc); } // 排序后分页 @@ -457,14 +460,14 @@ namespace SCP return Sort(q, grid).Skip(grid.PageIndex * grid.PageSize).Take(grid.PageSize); } - protected IQueryable SortAndPage(IQueryable q, FineUI.Grid grid,string p_asc) + protected IQueryable SortAndPage(IQueryable q, FineUI.Grid grid, string p_asc) { if (grid.PageIndex >= grid.PageCount && grid.PageCount >= 1) { grid.PageIndex = grid.PageCount - 1; } - return Sort(q, grid,p_asc).Skip(grid.PageIndex * grid.PageSize).Take(grid.PageSize); + return Sort(q, grid, p_asc).Skip(grid.PageIndex * grid.PageSize).Take(grid.PageSize); } protected DataSet SortAndPage(GridPageSearch p_search, FineUI.Grid grid) @@ -485,7 +488,7 @@ namespace SCP //return Sort(q, grid, p_asc).Skip(grid.PageIndex * grid.PageSize).Take(grid.PageSize); } - + @@ -635,7 +638,7 @@ namespace SCP } } } - } + } Session["CurrentUser"] = _currentUser; } return (User)Session["CurrentUser"]; @@ -1232,7 +1235,7 @@ namespace SCP /// 返回实际语言翻译完成 protected string GetResourceKey(string p_key) { - + string _content = p_key; if (!string.IsNullOrEmpty(p_key)) { @@ -1304,7 +1307,7 @@ namespace SCP itm.HeaderText = GetResourceKey(itm.HeaderText); } } - + if (p_crtl is Button) { Button _btn = p_crtl as Button; @@ -1334,7 +1337,7 @@ namespace SCP itm.Text = GetResourceKey(itm.Text); } } - if(p_crtl is RadioButtonList) + if (p_crtl is RadioButtonList) { RadioButtonList _rb = p_crtl as RadioButtonList; _rb.Label = GetResourceKey(_rb.Label); @@ -1348,22 +1351,22 @@ namespace SCP DatePicker _date = p_crtl as DatePicker; _date.Label = GetResourceKey(_date.Label); } - if(p_crtl is CheckBoxList) + if (p_crtl is CheckBoxList) { - CheckBoxList _cbl= p_crtl as CheckBoxList; + CheckBoxList _cbl = p_crtl as CheckBoxList; _cbl.Label = GetResourceKey(_cbl.Label); } if (p_crtl is FineUI.Region) { FineUI.Region _region = p_crtl as FineUI.Region; - _region.Title = GetResourceKey(_region.Title); + _region.Title = GetResourceKey(_region.Title); } if (p_crtl is Tab) { - Tab _tab= p_crtl as Tab; + Tab _tab = p_crtl as Tab; _tab.Title = GetResourceKey(_tab.Title); } - + } } @@ -1375,8 +1378,8 @@ namespace SCP { FormRow _formrow = p_crtl as FormRow; foreach (var item in _formrow.Items) - { - TranslatorAgent(item); + { + TranslatorAgent(item); } } if (p_crtl is Toolbar) @@ -1390,7 +1393,7 @@ namespace SCP if (p_crtl is Panel) { var _toolbar = p_crtl as Panel; - _toolbar.Title= GetResourceKey(_toolbar.Title); + _toolbar.Title = GetResourceKey(_toolbar.Title); foreach (var item in _toolbar.Items) { TranslatorAgent(item); @@ -1407,7 +1410,7 @@ namespace SCP string[] allowedExtensions = { ".jpg", ".gif", ".jpeg", ".png", ".rar", ".zip", ".flv", ".doc", ".docx", ".xls", ".xlsx", ".pdf", ".cad", ".txt" };//允许上传的文件类型 string filename = ""; //MyWebString.GetOrderNumber(); - + bool fileOK = false; string fileExtension = System.IO.Path.GetExtension(fUpload.FileName).ToLower(); for (int i = 0; i < allowedExtensions.Length; i++) @@ -1543,7 +1546,7 @@ namespace SCP #endregion - public static string EntityListToExcel2003(Dictionary cellHeard, IList enList, string sheetName,string title=null) + public static string EntityListToExcel2003(Dictionary cellHeard, IList enList, string sheetName, string title = null) { try { @@ -1561,7 +1564,7 @@ namespace SCP ISheet sheet = workbook.CreateSheet(sheetName); // 工作表 List keys = cellHeard.Keys.ToList(); if (title != null) - { + { IRow row = sheet.CreateRow(0); ICell cell = row.CreateCell(0); ICellStyle style = workbook.CreateCellStyle(); @@ -1576,13 +1579,13 @@ namespace SCP _index++; } // 2.解析单元格头部,设置单元头的中文名称 - IRow row1 = sheet.CreateRow(_index); + IRow row1 = sheet.CreateRow(_index); for (int i = 0; i < keys.Count; i++) { row1.CreateCell(i).SetCellValue(cellHeard[keys[i]]); // 列名为Key的值 } // 3.List对象的值赋值到Excel的单元格里 - int rowIndex = _index+1; // 从第二行开始赋值(第一行已设置为单元头) + int rowIndex = _index + 1; // 从第二行开始赋值(第一行已设置为单元头) foreach (var en in enList) { IRow rowTmp = sheet.CreateRow(rowIndex); @@ -1707,24 +1710,25 @@ namespace SCP throw ex; } } - public static void DataSetToExcel(DataSet p_dataset, string sheetName,string title = null) + public static void DataSetToExcel(DataSet p_dataset, string sheetName, string title = null) { try { EpPlusHelper _helper = new EpPlusHelper(); - _helper.ExportExcelCompleted += (filePath,fileName) => { + _helper.ExportExcelCompleted += (filePath, fileName) => + { Alert.Show($"{fileName}", "文件导出成功,请点击文件名下载", MessageBoxIcon.Information); }; - _helper.WriteDsToExcel(sheetName, p_dataset, title); + _helper.WriteDsToExcel(sheetName, p_dataset, title); } catch (Exception ex) { throw ex; } } - protected void DisplayColumn(Grid p_grid,bool p_visible, params string[] p_header) + protected void DisplayColumn(Grid p_grid, bool p_visible, params string[] p_header) { foreach (var itm in p_grid.Columns) { @@ -1735,5 +1739,99 @@ namespace SCP } } + /// + /// 当前账号页面列表 + /// + /// + /// + public static List GetMenus(int Id) + { + List Menus = new List(); + using (AppBoxContext db = EntitiesFactory.CreateAppBoxInstance()) + { + StringBuilder _buffer = new StringBuilder(); + _buffer.Append(" select Name from Menus where ViewPowerID in( "); + _buffer.Append(" select powerID from RolePowers where RoleID in( "); + _buffer.AppendFormat(" select RoleID from RoleUsers where UserID = '{0}' )) ", Id); + Menus = db.Database.SqlQuery(_buffer.ToString()).ToList(); + } + return Menus; + } + + /// + /// 生成验证码 + /// + /// 长度 + /// + public static string RandomVerificationCode(int lengths) + { + string[] chars = new string[] { "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "P", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; + string code = ""; + Random random = new Random(); + for (int i = 0; i < lengths; i++) + { + code += chars[random.Next(chars.Length)]; + } + return code; + } + + /// + /// 绘制验证码 + /// + /// + /// + public static Bitmap DrawImage(string code) + { + Color[] colors = { + Color.Red, Color.OrangeRed,Color.SaddleBrown, + Color.LimeGreen,Color.Green,Color.MediumAquamarine, + Color.Blue,Color.MediumOrchid,Color.Black, + Color.DarkBlue,Color.Orange,Color.Brown, + Color.DarkCyan,Color.Purple + }; + string[] fonts = { "Verdana", "Microsoft Sans Serif", "Comic Sans MS", "Arial", "宋体" }; + Random random = new Random(); + // 创建一个 Bitmap 图片类型对象 + Bitmap bitmap = new Bitmap(code.Length * 18, 32); + // 创建一个图形画笔 + Graphics graphics = Graphics.FromImage(bitmap); + // 将图片背景填充成白色 + graphics.Clear(Color.White); + // 绘制验证码噪点 + for (int i = 0; i < random.Next(60, 80); i++) + { + int pointX = random.Next(bitmap.Width); + int pointY = random.Next(bitmap.Height); + graphics.DrawLine(new Pen(Color.LightGray, 1), pointX, pointY, pointX + 1, pointY); + } + // 绘制验证码 + for (int i = 0; i < code.Length; i++) + { + graphics.DrawString( + code.Substring(i, 1), + new Font(fonts[random.Next(fonts.Length)], 15, FontStyle.Bold), + new SolidBrush(colors[random.Next(colors.Length)]), + 16 * i + 1, + random.Next(0, 5) + ); + } + return bitmap; + } + + /// + /// 返回图片 + /// + /// + /// + public static string BitmapToBase64Str(Bitmap bitmap) + { + using (MemoryStream memoryStream = new MemoryStream()) + { + bitmap.Save(memoryStream, ImageFormat.Jpeg); + byte[] bytes = memoryStream.ToArray(); + return Convert.ToBase64String(memoryStream.ToArray()); + } + } + } } \ No newline at end of file diff --git a/北京北汽/SCP/Views/BasicData/Part.aspx.cs b/北京北汽/SCP/Views/BasicData/Part.aspx.cs index 3bcb219..9657ad3 100644 --- a/北京北汽/SCP/Views/BasicData/Part.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/Part.aspx.cs @@ -28,7 +28,27 @@ namespace SCP.BasicData { if (!IsPostBack) { - LoadData(); + if (CurrentUser.ID != 0) + { + //读取 所有菜单列表 + var mlist = GetMenus(CurrentUser.ID); + if (mlist.Count > 0 && mlist.Contains("零件档案")) + { + LoadData(); + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } } } public void LoadData() diff --git a/北京北汽/SCP/Views/BasicData/Price.aspx.cs b/北京北汽/SCP/Views/BasicData/Price.aspx.cs index 2b69753..7a5a34a 100644 --- a/北京北汽/SCP/Views/BasicData/Price.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/Price.aspx.cs @@ -25,14 +25,32 @@ namespace SCP.BasicData { if (!IsPostBack) { - CheckRolesMenu(); - //DDL_IMPORT.DataSource = DB.Users.Where(p => p.Roles.Select(q => q.Name).Contains("采购人员")).Select(p=>p.Name); - //DDL_IMPORT.DataBind(); - var site = CurrentUser.FactoryList.FirstOrDefault(); - BindData(); - BindFactory(); - - + if (CurrentUser.ID != 0) + { + //读取 所有菜单列表 + var mlist = GetMenus(CurrentUser.ID); + if (mlist.Count > 0 && mlist.Contains("价格表管理")) + { + CheckRolesMenu(); + //DDL_IMPORT.DataSource = DB.Users.Where(p => p.Roles.Select(q => q.Name).Contains("采购人员")).Select(p=>p.Name); + //DDL_IMPORT.DataBind(); + var site = CurrentUser.FactoryList.FirstOrDefault(); + BindData(); + BindFactory(); + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } } } private void CheckRolesMenu() diff --git a/北京北汽/SCP/Views/BasicData/PriceUpdate.aspx.cs b/北京北汽/SCP/Views/BasicData/PriceUpdate.aspx.cs index 6085fc6..7dda4a7 100644 --- a/北京北汽/SCP/Views/BasicData/PriceUpdate.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/PriceUpdate.aspx.cs @@ -25,11 +25,31 @@ namespace SCP.BasicData { if (!IsPostBack) { - CheckRolesMenu(); - //DDL_IMPORT.DataSource = DB.Users.Where(p => p.Roles.Select(q => q.Name).Contains("采购人员")).Select(p=>p.Name); - //DDL_IMPORT.DataBind(); - BindData(); - BindFactory(); + if (CurrentUser.ID != 0) + { + //读取 所有菜单列表 + var mlist = GetMenus(CurrentUser.ID); + if (mlist.Count > 0 && mlist.Contains("价格单修改")) + { + CheckRolesMenu(); + //DDL_IMPORT.DataSource = DB.Users.Where(p => p.Roles.Select(q => q.Name).Contains("采购人员")).Select(p=>p.Name); + //DDL_IMPORT.DataBind(); + BindData(); + BindFactory(); + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } } } private void CheckRolesMenu() diff --git a/北京北汽/SCP/Views/BasicData/SCP_RECIVE_PORT.aspx.cs b/北京北汽/SCP/Views/BasicData/SCP_RECIVE_PORT.aspx.cs index a453aeb..0f72055 100644 --- a/北京北汽/SCP/Views/BasicData/SCP_RECIVE_PORT.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/SCP_RECIVE_PORT.aspx.cs @@ -20,9 +20,29 @@ namespace SCP.BasicData { if (!IsPostBack) { - BindData(); - DDL_FACTORY.DataSource =ScpCache.FactoryList; - DDL_FACTORY.DataBind(); + if (CurrentUser.ID != 0) + { + //读取 所有菜单列表 + var mlist = GetMenus(CurrentUser.ID); + if (mlist.Count > 0 && mlist.Contains("收货口管理")) + { + BindData(); + DDL_FACTORY.DataSource = ScpCache.FactoryList; + DDL_FACTORY.DataBind(); + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } } } diff --git a/北京北汽/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs b/北京北汽/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs index a91d117..89766ae 100644 --- a/北京北汽/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs @@ -146,7 +146,7 @@ namespace SCP.Views.BasicData } protected void LinkButton_Click(object sender, EventArgs e) { - Alert.Show($"{"供应商零件.xls"}", "请点击文件名下载", MessageBoxIcon.Information); + Alert.Show($"{"供应商零件.xlsx"}", "请点击文件名下载", MessageBoxIcon.Information); } protected void Btn_Click(object sender, EventArgs e) diff --git a/北京北汽/SCP/Views/BasicData/SCP_TB_Address.aspx.cs b/北京北汽/SCP/Views/BasicData/SCP_TB_Address.aspx.cs index 889bad0..b84518f 100644 --- a/北京北汽/SCP/Views/BasicData/SCP_TB_Address.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/SCP_TB_Address.aspx.cs @@ -20,9 +20,29 @@ namespace SCP.Views.BasicData { if (!IsPostBack) { - BindData(); - TranslatorAgent(Grid1); - TranslatorAgents(Toolbar1); + if (CurrentUser.ID != 0) + { + //读取 所有菜单列表 + var mlist = GetMenus(CurrentUser.ID); + if (mlist.Count > 0 && mlist.Contains("收货信息管理(重庆专用)")) + { + BindData(); + TranslatorAgent(Grid1); + TranslatorAgents(Toolbar1); + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } } } // diff --git a/北京北汽/SCP/Views/BasicData/Supplier.aspx.cs b/北京北汽/SCP/Views/BasicData/Supplier.aspx.cs index 8df2a41..7a5df85 100644 --- a/北京北汽/SCP/Views/BasicData/Supplier.aspx.cs +++ b/北京北汽/SCP/Views/BasicData/Supplier.aspx.cs @@ -18,6 +18,7 @@ using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using CK.SCP.Models; using CK.SCP.Models.ScpEntity.ExcelExportEnttity; +using System.Web.Security; namespace SCP.BasicData { @@ -29,23 +30,43 @@ namespace SCP.BasicData { if (!IsPostBack) { - BindData(); + if (CurrentUser.ID != 0) + { + //读取 所有菜单列表 + var mlist = GetMenus(CurrentUser.ID); + if (mlist.Count > 0 && mlist.Contains("供应商档案")) + { + BindData(); + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } + } + else + { + Response.Write("当前用户没有操作该页面权限"); + Response.End(); + return; + } // BtnAdd.OnClientClick = Window1.GetShowReference("/BasicData/SupplierEdit.aspx", "新增"); } } // public void BindData() { - + var _ls = ScpCache.FactoryList; _ls.Insert(0, new TB_FACTORY() { FactoryId = "", FactoryName = "" }); DPL_Factory.DataSource = _ls; DPL_Factory.DataBind(); - // _list = SCP_TB_VENDER_CONTROLLER.Getlist(); - _list= SearchData(); - var list = Sort(_list.AsQueryable(), Grid1); - + // _list = SCP_TB_VENDER_CONTROLLER.Getlist(); + var list = new List(); + _list = SearchData(); + list = Sort(_list.AsQueryable(), Grid1).ToList(); Grid1.DataSource = list; Grid1.RecordCount = list.Count(); Grid1.DataBind(); @@ -186,7 +207,7 @@ namespace SCP.BasicData where = where.And(p => p.Site.Contains(DPL_Factory.SelectedValue)); } where = where.And(p => CurrentUser.FactoryList.Contains(p.Site)); - // where = where.And(p => CurrentUser.VenderList.Contains(p.VendId)); + // where = where.And(p => CurrentUser.VenderList.Contains(p.VendId)); List list = SCPDB.TA_VENDER.Where(where.Compile()).ToList(); num = SCPDB.TA_VENDER.Where(where.Compile()).Count(); return list; @@ -209,7 +230,7 @@ namespace SCP.BasicData protected void Grid1_OnSort(object sender, GridSortEventArgs e) { - + _list = SearchData(); var list = Sort(_list.AsQueryable(), Grid1); Grid1.DataSource = list; diff --git a/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx b/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx index 2e34bb1..3b1964e 100644 --- a/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx +++ b/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx @@ -165,10 +165,11 @@ + - + <%-- @@ -271,6 +272,10 @@ var selection = grid.getSelectionModel().getSelection(); var store = grid.getStore(); var total = 0; + if (grid.getSelectionModel().getCount() > 1000) { + window.alert("选择发票条数" + grid.getSelectionModel().getCount() +",超过发票允许条数(1000条)"); + return; + } $.each(selection, function (index, item) { var rowIndex = store.indexOf(item); var row = $(grid.body.el.dom).find('.x-grid-item').eq(rowIndex); diff --git a/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs b/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs index 652e551..367b9c5 100644 --- a/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs +++ b/北京北汽/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs @@ -25,7 +25,7 @@ namespace SCP.SupplierData { protected void Page_Load(object sender, EventArgs e) { - IsRoleRight(); + //IsRoleRight(); if (!IsPostBack) { TranslatorAgents(Toolbar2); @@ -402,6 +402,16 @@ namespace SCP.SupplierData // return; // } //} + if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0) + { + Alert.Show("请选择要创建发票的记录!"); + return; + } + if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length > 1000) + { + Alert.Show("选择发票条数" + Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length + ",超过发票允许条数(1000条)"); + return; + } CreateInvoice("0"); } private void CreateInvoice(string p_all) @@ -428,11 +438,16 @@ namespace SCP.SupplierData SearchData((rs) => { string IsCreate = "0"; - if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0) - { - Alert.Show("请选择要创建发票的记录!"); - return; - } + //if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0) + //{ + // Alert.Show("请选择要创建发票的记录!"); + // return; + //} + //if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length > 1000) + //{ + // Alert.Show("选择发票条数"+ Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length + ",超过发票允许条数(1000条)"); + // return; + //} string IDS = ""; List _list = new List(); List _projectList = new List(); @@ -720,6 +735,16 @@ namespace SCP.SupplierData Alert.Show("收货月份不能为空!"); return; } + if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0) + { + Alert.Show("请选择要创建发票的记录!"); + return; + } + if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length > 1000) + { + Alert.Show("选择发票条数" + Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length + ",超过发票允许条数(1000条)"); + return; + } CreateInvoice("1"); } diff --git a/北京北汽/SCP/default_hb.aspx b/北京北汽/SCP/default_hb.aspx index 392fca5..8757ad3 100644 --- a/北京北汽/SCP/default_hb.aspx +++ b/北京北汽/SCP/default_hb.aspx @@ -57,10 +57,16 @@
- + + <%-- --%> - -
+ <%-- --%> + + + + +
@@ -120,100 +126,100 @@