diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj index 63dd90b..b3258f1 100644 --- a/SCP/SCP.csproj +++ b/SCP/SCP.csproj @@ -4501,7 +4501,6 @@ - @@ -5561,13 +5560,6 @@ SCP_INVOICE.aspx - - SCP_RECEIVE_LIST.aspx - ASPXCodeBehind - - - SCP_RECEIVE_LIST.aspx - SCP_RECEIVE_VIEW.aspx ASPXCodeBehind diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx index 6787c0f..37fd93f 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx @@ -122,7 +122,7 @@ diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs index 7250706..c9b1323 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs @@ -16,6 +16,7 @@ using CK.SCP.Models.Enums; namespace SCP.SupplierData { + public partial class ReceiveList : PageBase { protected void Page_Load(object sender, EventArgs e) @@ -277,12 +278,19 @@ namespace SCP.SupplierData 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); @@ -291,12 +299,22 @@ namespace SCP.SupplierData { _rejList.Add(_projectId); } + IdList.Add(ID); } + if (_total < 0) + { + Alert.Show("不允许开负数发票!退货、索赔零件数量有问题,请联系工厂库房和质量解决!"); + return; + } - + if (IdList.Count > 200) + { + Alert.Show("选择零件记录超过,发票允许条数!"); + return; + } //if (CurrentUser.FactoryList.FirstOrDefault() == "CNS") //{ // if (_projectList.Distinct().Count() > 1) @@ -335,14 +353,25 @@ namespace SCP.SupplierData return; } } - - MyQueryStringEnCode me = new MyQueryStringEnCode("ReceiveID=" + IDS + "&VendId=" + vender + "&Modify=" + IsCreate + "&IsAll=" + p_all + "&Tax=" + _tax + "&CJ=" + _cj + "&TZ=" + _tz); - if (me.QueryString.Length > 2000) - { - Alert.Show("选择零件记录超过,发票允许条数!"); - return; - } - string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx?" + me.QueryString, "生成发票"); + + + 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; + + //MyQueryStringEnCode me = new MyQueryStringEnCode("ReceiveID=" + IDS + "&VendId=" + vender + "&Modify=" + IsCreate + "&IsAll=" + p_all + "&Tax=" + _tax + "&CJ=" + _cj + "&TZ=" + _tz); + //if (me.QueryString.Length > 2000) + //{ + // Alert.Show("选择零件记录超过,发票允许条数!"); + // return; + //} + Session["InvoiceCreateQueryParm"] = parm; + string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx", "生成发票"); PageContext.RegisterStartupScript(ret); }); } @@ -500,6 +529,7 @@ namespace SCP.SupplierData protected void Window1_Close(object sender, WindowCloseEventArgs e) { + Session["InvoiceCreateQueryParm"] = null; BindData(); } diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx b/SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx deleted file mode 100644 index 4039cdf..0000000 --- a/SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx +++ /dev/null @@ -1,127 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.WarehouseData.ReceiveList" %> - -<%@ Import Namespace="CK.SCP.Utils" %> -<%@ Import Namespace="CK.SCP.Models.Enums" %> - - - - - - - - - - -
- - - - - - - - - - - - - - - <%----%> - <%-- - - - - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - -