Browse Source

提交

master
学 赵 4 years ago
parent
commit
0c35ab6638
  1. 8
      SCP/SCP.csproj
  2. 132
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx
  3. 440
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs
  4. 308
      SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs
  5. 127
      SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx
  6. 109
      SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.cs
  7. 87
      SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.designer.cs

8
SCP/SCP.csproj

@ -4501,7 +4501,6 @@
<Content Include="Views\WarehouseData\SCP_INVOICE_CONFIRM.aspx" />
<Content Include="Views\WarehouseData\SCP_INVOICE_CHECKFAIL.aspx" />
<Content Include="Views\WarehouseData\SCP_INVOICE.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_LIST.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_VIEW.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_DETAIL_VIEW.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE.aspx" />
@ -5561,13 +5560,6 @@
<Compile Include="Views\WarehouseData\SCP_INVOICE.aspx.designer.cs">
<DependentUpon>SCP_INVOICE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\WarehouseData\SCP_RECEIVE_LIST.aspx.cs">
<DependentUpon>SCP_RECEIVE_LIST.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\WarehouseData\SCP_RECEIVE_LIST.aspx.designer.cs">
<DependentUpon>SCP_RECEIVE_LIST.aspx</DependentUpon>
</Compile>
<Compile Include="Views\WarehouseData\SCP_RECEIVE_VIEW.aspx.cs">
<DependentUpon>SCP_RECEIVE_VIEW.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

132
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx

@ -1,4 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.WarehouseData.ReceiveList" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.SupplierData.ReceiveList" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<%@ Import Namespace="CK.SCP.Utils" %>
<%@ Import Namespace="CK.SCP.Models.Enums" %>
@ -20,8 +22,107 @@
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum"
<f:Form runat="server">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();">
</f:Button>
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" Text="生成发票" OnClick="btnCreate_OnClick" Icon="Add" Hidden="true">
</f:Button>
<f:Button ID="btnCreateAll" runat="server" EnablePostBack="True" Text="生成发票" Icon="Add" OnClick="btnCreateAll_Click" OnClientClick="if(!confirm('生成发票时请先处理退货数量,如发现收票时还有退货数量未处理,造成不能收票自行负责!'))return false;">
</f:Button>
<f:Button ID="btn" runat="server" EnablePostBack="True" Text="补开发票" Icon="Add" Hidden="true">
</f:Button>
<f:Button ID="Button2" runat="server" EnablePostBack="True" Text="导出" Icon="Add" OnClick="btnOutput_OnClick">
</f:Button>
<f:Button ID="btnCanIn" runat="server" EnablePostBack="True" Text="只看可开票零件" Icon="Zoom" OnClick="btnCanIn_Click" Hidden="true">
</f:Button>
<f:Button ID="btnShow" runat="server" Text="查询面板" OnClick="btnShow_Click">
</f:Button>
<f:ToolbarFill runat="server" Hidden="true"/>
<f:TextBox ID="tb_RecvBillNum" runat="server" Label="单据号" Hidden="true"/>
<f:Button ID="btn_Search" runat="server" EnablePostBack="True" Text="快速查找" OnClick="btnSearch_Click" Hidden="true"></f:Button>
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/>
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认" OnClick="BTN_INV_Click" Hidden="true" Icon="Accept" ></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" >
<Items>
<f:Form runat="server" >
<Rows>
<f:FormRow runat="server" ID="FormRow_1">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_ASNBill" />
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" />
<f:DropDownList runat="server" ID="DDL_State" Label="单据类型" Hidden="true">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="退货单" Value="退货单" />
<f:ListItem Text="收货单" Value="收货单" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_2">
<Items>
<f:TextBox runat = "server" Label = "项目编号" EmptyText = "" ID = "TXT_ProjectId" />
<f:TextBox runat = "server" Label = "零件编号" EmptyText = "" ID = "TXT_PartCode" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="收货日期" EmptyText="请选择日期" ID="DP_StartDate" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" EmptyText="请选择日期" Label="至" ID="Date_EndDate" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ID="FormRow_3">
<Items>
<f:TextBox runat = "server" Label = "收(退)货单号" EmptyText = "" ID = "TXT_RECEIVE" />
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow1">
<Items>
<f:NumberBox ID="txtContractPrice1" runat="server" Label="折扣金额" Hidden="true" />
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" Hidden="true" />
<f:Label runat="server"></f:Label>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow2">
<Items>
<f:DropDownList runat="server" Label="供应商税率" ID="lbTaxRate" AutoPostBack="true" >
<f:ListItem Text="0.16" Value="0.16" />
<f:ListItem Text="0.13" Value="0.13" />
<f:ListItem Text="0" Value="0" />
</f:DropDownList>
<f:Button ID="btnTax" runat="server" Text="使用税率" OnClientClick="updateTotal();" Icon="Accept" ></f:Button>
<f:Label runat="server"></f:Label>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine,Qty,Price" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum"
AutoScroll="True" OnPageIndexChange="Grid_V_TB_RECEIVE_LIST_PageIndexChange" EnableCheckBoxSelect = "true" OnRowDataBound="Grid_V_TB_RECEIVE_LIST_RowDataBound" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
@ -29,6 +130,9 @@
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_OnSelectedIndexChanged" runat="server">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
<f:ListItem Text="500" Value="500" />
<f:ListItem Text="1000" Value="1000" />
</f:DropDownList>
</PageItems>
@ -39,6 +143,7 @@
<asp:Label runat="server" DataField="Qty" ID="Label1" Text='<%# Eval("IsCheck") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:BoundField runat="server" HeaderText="项目编码" DataField="ProjectId" width="80"/>
<f:BoundField runat="server" HeaderText="单据类型" ColumnID="BillType_DESC" DataField="BillType_DESC" width="80"/>
<f:BoundField runat="server" HeaderText="单据号" ColumnID="RecvBillNum" DataField="RecvBillNum" width="80" />
@ -48,7 +153,9 @@
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" width="50" />
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" width="80"/>
<f:BoundField runat="server" HeaderText="采购价格" ColumnID="" DataField="PurPrice" width="80"/>
<f:TemplateField HeaderText="可开票数量" ColumnID="Qty" width="100">
<ItemTemplate>
<input type="hidden" class="price" runat="server" value='<%# Eval("Price") %>' />
@ -68,14 +175,29 @@
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" />
</Columns>
</f:Grid>
<f:ContentPanel runat="server" CssClass="totalpanel" ShowBorder="true" ShowHeader="false" ColumnWidth="50%">
<div style="margin-bottom: 10px; ">
<input type="hidden" id="TOTAL_PRICE" name="TOTAL_PRICE" />
总计:<span id="totalPrice" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
<input type="hidden" id="TOTAL_PRICE1" name="TOTAL_PRICE1" />
<input type="hidden" id="TOTAL_PRICE_TAX" name="TOTAL_PRICE_TAX" />
税额:<span id="totalPriceTax" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
税后金额:<span id="totalPrice1" style="color: red; font-size: 1.5em; font-weight: bold;" ></span>
</div>
<%--<div style="margin-bottom: 10px;">
</div>
<div style="margin-bottom: 10px;">
</div>--%>
</f:ContentPanel>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
<%--<script src="../../res/js/jquery.min.js"></script>
<script src="../../res/js/jquery.min.js"></script>
<script type="text/javascript">
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>';
var taxRateClientID = '<%= lbTaxRate.ClientID %>';
@ -122,6 +244,6 @@
updateTotal();
});
</script>--%>
</script>
</body>
</html>

440
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs

@ -14,17 +14,62 @@ using SCP.Code;
using System.Drawing;
using CK.SCP.Models.Enums;
namespace SCP.WarehouseData
namespace SCP.SupplierData
{
public partial class ReceiveList : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
IsRoleRight();
if (!IsPostBack)
{
TranslatorAgents(Toolbar2);
TranslatorAgent(Grid_V_TB_RECEIVE_LIST);
TranslatorAgents(FormRow_1);
TranslatorAgents(FormRow_2);
TranslatorAgents(FormRow_3);
LoadData();
SetRoleRule();
BindVender(DDL_VEND_LIST);
}
}
public void IsRoleRight()
{
//if (!CurrentUser.RoleList.Contains("供应商"))
//{
// Alert.Show("当前用户角色不能操作该模块!");
// return;
//}
//else
//{
//}
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
//{
// Alert.Show("当前用户未选择地点!");
// return;
//}
}
private void SetRoleRule()
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
DDL_VEND_LIST.Hidden = false;
BTN_INV.Hidden = false;
if( CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0)
{
var _site= CurrentUser.FactoryList.FirstOrDefault();
if(_site=="CNS")
{
txtContractPrice1.Enabled = false;
}
}
}
}
public void LoadData()
{
// 每页记录数
@ -35,7 +80,80 @@ namespace SCP.WarehouseData
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.VendId = Request.Params["VendId"];
_ls.PoBillNum = TXT_BillNo.Text;
_ls.VendName = TXT_VendName.Text;
_ls.AsnBillNum = TXT_ASNBill.Text;
_ls.PartCode = TXT_PartCode.Text;
_ls.VendId = TXT_VendId.Text;
_ls.ProjectId = TXT_ProjectId.Text;
if (DP_StartDate.SelectedDate != null)
{
_ls.BeginTime = DP_StartDate.SelectedDate;
}
if (Date_EndDate.SelectedDate != null)
{
_ls.ShipTime = Date_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_ls.BillType_DESC = DDL_State.SelectedValue;
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_ls.Site = CurrentUser.FactoryList[0];
}
_ls.State = 1;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
var _venderId = DDL_VEND_LIST.SelectedValue;
_ls.VendId = DDL_VEND_LIST.SelectedValue;
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.SelectedValue = "0";
}
}
}
else
{
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
var _venderId = CurrentUser.VenderList.FirstOrDefault();
_ls.VendId = _venderId;
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
}
}
}
if (string.IsNullOrEmpty(_ls.VendId))
{
return;
}
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
@ -43,16 +161,37 @@ namespace SCP.WarehouseData
p_action(ret.Result);
}
});
}
public void BindData()
{
SearchData(ret =>
{
if (CurrentUser.RoleList.Contains("采购人员"))
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
Grid_V_TB_RECEIVE_LIST.DataSource = temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
}
else
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
Grid_V_TB_RECEIVE_LIST.DataSource = temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
}
});
// 排列和数据库分页
}
@ -68,6 +207,203 @@ namespace SCP.WarehouseData
BindData();
}
//生成发票
protected void btnCreate_OnClick(object sender, EventArgs e)
{
CreateInvoice("0");
}
private void CreateInvoice(string p_all)
{
try
{
string vender = string.Empty;
if (CurrentUser.RoleList.Contains("采购人员"))
{
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue))
{
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!");
return;
}
vender = DDL_VEND_LIST.SelectedValue;
}
else
{
vender = CurrentUser.VenderList[0];
}
TM_HYANTOLIN_REVIEW _entity = new TM_HYANTOLIN_REVIEW();
_entity.UltimateName = vender;
_entity.State = 0;
var _state = 0;
SCP_QUALITY_CONTROLLER.Get_TM_HYANTOLIN_REVIEW_List(_entity, (rs) =>
{
if (rs.State == ReturnStatus.Succeed)
{
var _ls = rs.Result.ToList();
if (_ls != null && _ls.Count > 0)
{
var _sum = _ls.Sum(p => p.ClaimAmount);
var _ary = _ls.Select(p => p.ReviewBillNum).ToList();
_state = 1;
if (_sum == 0)
{
_state = 0;
}
if (_sum > 0)
{
Alert.Show(string.Format("索赔金额合计{0}供应商存在未处理索赔单{1}!", _sum.ToString(), string.Join(",", _ary.ToArray())), "索赔管理查看");
}
}
}
});
if (_state == 1)
{
return;
}
var _tax = lbTaxRate.SelectedValue;
var _cj = string.IsNullOrEmpty(txtContractPrice1.Text) ? "0" : txtContractPrice1.Text;
var _tz = string.IsNullOrEmpty(txtBlancePrice1.Text) ? "0" : txtBlancePrice1.Text;
SearchData((rs) =>
{
string IsCreate = "0";
if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0)
{
Alert.Show("请选择要创建发票的记录!");
return;
}
string IDS = "";
List<string> _list = new List<string>();
List<string> _projectList = new List<string>();
List<string> _rejList = new List<string>();
string _projectId = string.Empty;
List<string> _recList = new List<string>();
List<int> IdList = new List<int>();
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);
var _recbill = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][2].ToString();
if (!string.IsNullOrEmpty(_recbill) && _recbill.IndexOf("R.") > 0)
{
_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)
// {
// Alert.Show("请选择同一项目编号零件生成发票(可以到【查询面板】填写查询)</br>有退货必须选择否则影响财务收票!");
// return;
// }
// //var _ls = rs.Where(p => p.State==(int)ReceiveState.Check && p.RecvBillNum.Contains("R.") && p.VendId==vender && p.IsDeleted == false && p.ProjectId==_projectId && p.Site==CurrentUser.FactoryList.FirstOrDefault());
// //if (_ls.Count() > 0)
// //{
// // var _count=_rejList.Count(p => p == _projectId);
// // if (_count != _ls.Count())
// // {
// // Alert.Show(_projectId+"项目还存在退货数量!");
// // return;
// // }
// //}
//}
if (_list.Distinct().Count() > 1)
{
Alert.Show("请选择的记录不是同一个供应商,请选择供应商!");
return;
}
if (IDS != "") IDS = IDS.Substring(0, IDS.Length - 1);
if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI")
{
var _ls = GetIsAllChecked(vender, IDS);
if (_ls.Count > 0)
{
Alert.Show(string.Format("退货或索赔单{0}未开票!", string.Join(",", _ls.ToArray())));
return;
}
}
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);
});
}
catch (Exception ex)
{
Alert.Show(ex.Message);
}
}
private List<string> GetIsAllChecked(string p_VendId,string p_VendIds)
{
List<string> unSelected = new List<string>();
var _ls = SCPDB.V_TB_RECEIVE_LIST.Where(p => p.VendId == p_VendId && p.State == 1 && (p.BillType_DESC == "索赔单" || p.BillType_DESC == "退货单")).Select(p => new { p.UID, p.RecvBillNum }).ToList();
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ent, (ret) =>
//{
// if (ret.State == ReturnStatus.Succeed)
// {
var _lsCompare = p_VendIds.Split(new char[] { ',' });
// var _ls = ret.Result.Select(p => new { p.UID, p.RecvBillNum }).ToList();
foreach (var itm in _ls)
{
if (!_lsCompare.Contains(itm.UID.ToString()))
{
unSelected.Add(itm.RecvBillNum);
}
}
// }
//});
return unSelected.Distinct().ToList();
}
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e)
@ -76,7 +412,92 @@ namespace SCP.WarehouseData
}
//导出
protected void btnOutput_OnClick(object sender, EventArgs e)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.PoBillNum = TXT_BillNo.Text;
_ls.VendName = TXT_VendName.Text;
_ls.UserInVendIds = CurrentUser.VenderList;
_ls.AsnBillNum = TXT_ASNBill.Text;
_ls.PartCode = TXT_PartCode.Text;
_ls.VendId = TXT_VendId.Text;
_ls.ProjectId = TXT_ProjectId.Text;
_ls.RecvBillNum = TXT_RECEIVE.Text;
if (DP_StartDate.SelectedDate != null)
{
_ls.BeginTime = DP_StartDate.SelectedDate;
}
if (Date_EndDate.SelectedDate != null)
{
_ls.ShipTime = Date_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_ls.BillType_DESC = DDL_State.SelectedValue;
}
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
_ls.Site = CurrentUser.FactoryList[0];
}
_ls.State = 1;
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
{
var _venderId = CurrentUser.VenderList.FirstOrDefault();
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId))
{
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site);
if (_vender.Tax != null)
{
lbTaxRate.SelectedValue = _vender.Tax.ToString();
}
else
{
lbTaxRate.Text = "0";
}
}
}
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
var _lst = ret.Result.ToList();
Dictionary<string, string> cellheader = new Dictionary<string, string>
{
{ "ProjectId", "项目编号" },
{ "BillType_DESC", "单据类型" },
{ "RecvBillNum", "单据编号" },
{ "AsnBillNum", "发货单号" },
{ "VendName", "供应商" },
{ "VendId", "供应商编码" },
{ "PoBillNum", "订单号" },
{ "PoLine", "订单行" },
{ "PartCode", "零件号" },
{ "PartDesc1", "零件名称" },
{ "LocUnit", "单位" },
{ "Currency", "币种" },
{ "Qty", "可开票数量" },
{ "Price", "单价" },
{ "CreateTime", "创建时间" }
};
string url = EntityListToExcel2003(cellheader,_lst , "审核明细");
}
});
}
//快速查找
protected void btnSearch_Click(object sender, EventArgs e)
{
}
protected void btnShow_Click(object sender, EventArgs e)
{
gp1.Hidden = false;
}
protected void BtnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindData();
@ -84,7 +505,6 @@ namespace SCP.WarehouseData
protected void Grid_V_TB_RECEIVE_LIST_RowDataBound(object sender, GridRowEventArgs e)
{
System.Web.UI.WebControls.Label _label= (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE_LIST.Rows[e.RowIndex].FindControl("Qty1");
if (!string.IsNullOrEmpty(_label.Text))
{
@ -95,6 +515,12 @@ namespace SCP.WarehouseData
}
}
protected void btnCanIn_Click(object sender, EventArgs e)
{
}
protected void BTN_INV_Click(object sender, EventArgs e)
{
@ -103,7 +529,15 @@ namespace SCP.WarehouseData
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
Session["InvoiceCreateQueryParm"] = null;
BindData();
}
protected void btnCreateAll_Click(object sender, EventArgs e)
{
CreateInvoice("1");
}
}
}

308
SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.designer.cs

@ -7,7 +7,7 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.WarehouseData {
namespace SCP.SupplierData {
public partial class ReceiveList {
@ -30,6 +30,312 @@ namespace SCP.WarehouseData {
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button1;
/// <summary>
/// btnCreate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreate;
/// <summary>
/// btnCreateAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCreateAll;
/// <summary>
/// btn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btn;
/// <summary>
/// Button2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button2;
/// <summary>
/// btnCanIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnCanIn;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// tb_RecvBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox tb_RecvBillNum;
/// <summary>
/// btn_Search 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btn_Search;
/// <summary>
/// DDL_VEND_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_VEND_LIST;
/// <summary>
/// BTN_INV 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BTN_INV;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.GroupPanel gp1;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// TXT_BillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// TXT_ASNBill 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ASNBill;
/// <summary>
/// TXT_VendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
/// <summary>
/// TXT_VendId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendId;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// FormRow_2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_2;
/// <summary>
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// Date_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker Date_EndDate;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// TXT_RECEIVE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_RECEIVE;
/// <summary>
/// BtnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnClose;
/// <summary>
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// txtContractPrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtContractPrice1;
/// <summary>
/// txtBlancePrice1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox txtBlancePrice1;
/// <summary>
/// FormRow2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow2;
/// <summary>
/// lbTaxRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList lbTaxRate;
/// <summary>
/// btnTax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnTax;
/// <summary>
/// Grid_V_TB_RECEIVE_LIST 控件。
/// </summary>

127
SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx

@ -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" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
.totalpanel .x-panel-body {
border-top-width: 0 !important;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start">
<Items>
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum"
AutoScroll="True" OnPageIndexChange="Grid_V_TB_RECEIVE_LIST_PageIndexChange" EnableCheckBoxSelect = "true" OnRowDataBound="Grid_V_TB_RECEIVE_LIST_RowDataBound" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_OnSelectedIndexChanged" runat="server">
<f:ListItem Text="1000" Value="1000" />
</f:DropDownList>
</PageItems>
<Columns>
<%--<f:RowNumberField runat="server" ID="chb" HeaderText="行号" />--%>
<%-- <f:TemplateField HeaderText="否可开票" Width="120px" ColumnID="IsCheck">
<ItemTemplate>
<asp:Label runat="server" DataField="Qty" ID="Label1" Text='<%# Eval("IsCheck") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:BoundField runat="server" HeaderText="项目编码" DataField="ProjectId" width="80"/>
<f:BoundField runat="server" HeaderText="单据类型" ColumnID="BillType_DESC" DataField="BillType_DESC" width="80"/>
<f:BoundField runat="server" HeaderText="单据号" ColumnID="RecvBillNum" DataField="RecvBillNum" width="80" />
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="AsnBillNum" DataField="AsnBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="供应商" ColumnID="VendName" DataField="VendName" />
<f:BoundField runat="server" HeaderText="供应商编码" DataField="VendId" width="80"/>
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" width="80"/>
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" width="50" />
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" width="80"/>
<f:BoundField runat="server" HeaderText="采购价格" ColumnID="" DataField="PurPrice" width="80"/>
<f:TemplateField HeaderText="可开票数量" ColumnID="Qty" width="100">
<ItemTemplate>
<input type="hidden" class="price" runat="server" value='<%# Eval("Price") %>' />
<input type="hidden" class="number" runat="server" value='<%# Eval("Qty") %>' />
<asp:Label runat="server" DataField="Qty" ID="Qty1" Text='<%# Eval("Qty") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField runat="server" HeaderText="零件号" ColumnID="" DataField="PartCode" width="80"/>
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" />
<f:BoundField runat="server" HeaderText="单位" ColumnID="LocUnit" DataField="LocUnit" width="50"/>
<f:BoundField runat="server" HeaderText="币种" ColumnID="Currency" DataField="Currency" width="50"/>
<f:BoundField runat="server" HeaderText="Erp收货单税率" ColumnID="Tax" DataField="Tax" width="50" Hidden="true"/>
<f:BoundField runat="server" HeaderText="要货日期" ColumnID="BeginTime" DataField="BeginTime" Hidden="true"/>
<f:BoundField runat="server" HeaderText="收货时间" ColumnID="CreateTime" DataField="CreateTime" DataFormatString="{0:yyyy-MM-dd}" />
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
<%--<script src="../../res/js/jquery.min.js"></script>
<script type="text/javascript">
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>';
var taxRateClientID = '<%= lbTaxRate.ClientID %>';
var priceSelector = '.f-grid-tpl input.price';
var numberSelector = '.f-grid-tpl input.number';
function getRowPrice(row) {
return parseFloat(row.find(priceSelector).val());
}
function getRowNumber(row) {
var num = parseFloat(row.find(numberSelector).val(), 10);
return num;
}
function updateTotal() {
var grid = F(gridClientID);
var tax = F(taxRateClientID);
var selection = grid.getSelectionModel().getSelection();
var store = grid.getStore();
var total = 0;
$.each(selection, function (index, item) {
var rowIndex = store.indexOf(item);
var row = $(grid.body.el.dom).find('.x-grid-item').eq(rowIndex);
total += getRowNumber(row) * getRowPrice(row);
});
$('#totalPrice').text( total.toFixed(4));
$('#TOTAL_PRICE').val(total.toFixed(4));
var _tax = total.toFixed(4) * parseFloat(tax.value);
var _totalPrice1 =parseFloat(total) + parseFloat(_tax);
$('#totalPriceTax').text( _tax.toFixed(4));
$('#TOTAL_PRICE_TAX').val(_tax.toFixed(4));
$('#totalPrice1').text( _totalPrice1.toFixed(4));
$('#TOTAL_PRICE1').val(_totalPrice1);
}
function registerSelectionChangeEvents() {
var grid = F(gridClientID);
grid.on('selectionchange', function (cmp, selected) {
updateTotal();
});
}
// 页面第一次加载完成后调用的函数
F.ready(function () {
registerSelectionChangeEvents();
updateTotal();
});
</script>--%>
</body>
</html>

109
SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.cs

@ -1,109 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.AppBoxEntity;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Controller;
using FineUI;
using SCP.Code;
using System.Drawing;
using CK.SCP.Models.Enums;
namespace SCP.WarehouseData
{
public partial class ReceiveList : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
public void LoadData()
{
// 每页记录数
Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize;
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
BindData();
}
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action)
{
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST();
_ls.VendId = Request.Params["VendId"];
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) =>
{
if (ret.State == ReturnStatus.Succeed)
{
p_action(ret.Result);
}
});
}
public void BindData()
{
SearchData(ret =>
{
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST, "DESC");
List<V_TB_RECEIVE_LIST> temp = ret.ToList();
Grid_V_TB_RECEIVE_LIST.DataSource= temp;
Grid_V_TB_RECEIVE_LIST.DataBind();
});
// 排列和数据库分页
}
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e)
{
Grid_V_TB_RECEIVE_LIST.PageIndex = e.NewPageIndex;
BindData();
}
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_RECEIVE_LIST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindData();
}
//生成发票
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e)
{
BindData();
}
//导出
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindData();
}
protected void Grid_V_TB_RECEIVE_LIST_RowDataBound(object sender, GridRowEventArgs e)
{
System.Web.UI.WebControls.Label _label= (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE_LIST.Rows[e.RowIndex].FindControl("Qty1");
if (!string.IsNullOrEmpty(_label.Text))
{
if (decimal.Parse(_label.Text) < 0)
{
_label.ForeColor = Color.Red;
}
}
}
protected void BTN_INV_Click(object sender, EventArgs e)
{
BindData();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindData();
}
}
}

87
SCP/Views/WarehouseData/SCP_RECEIVE_LIST.aspx.designer.cs

@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.WarehouseData {
public partial class ReceiveList {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Grid_V_TB_RECEIVE_LIST 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_RECEIVE_LIST;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarText ToolbarText1;
/// <summary>
/// ddlGridPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// Qty1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Qty1;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
}
}
Loading…
Cancel
Save