学 赵
4 years ago
84 changed files with 183 additions and 11135 deletions
@ -1,93 +0,0 @@ |
|||||
using System; |
|
||||
using System.ComponentModel.DataAnnotations; |
|
||||
using System.ComponentModel.DataAnnotations.Schema; |
|
||||
|
|
||||
namespace CK.SCP.Models.ScpEntity |
|
||||
{ |
|
||||
public class V_BillShip |
|
||||
{ |
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|
||||
public int UID { get; set; } |
|
||||
|
|
||||
[Key] |
|
||||
[StringLength(50)] |
|
||||
public string Bill { get; set; } |
|
||||
|
|
||||
public DateTime BillTime { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string PoBillNum { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string VendId { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string OperName { get; set; } |
|
||||
|
|
||||
public DateTime ShipTime { get; set; } |
|
||||
|
|
||||
public int State { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Remark { get; set; } |
|
||||
|
|
||||
public DateTime? ReceiveTime { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string ModType { get; set; } |
|
||||
|
|
||||
[Column(TypeName = "date")] |
|
||||
public DateTime? DueDate { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Contacter { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string ShipToSite { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Buyer { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string BuyerPhone { get; set; } |
|
||||
|
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string VendName { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(2)] |
|
||||
public string VendAbbCode { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string VendType { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Country { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string City { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Currency { get; set; } |
|
||||
|
|
||||
[StringLength(200)] |
|
||||
public string Address { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string ZipCode { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Phone { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Fax { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Email { get; set; } |
|
||||
} |
|
||||
} |
|
@ -1,132 +0,0 @@ |
|||||
using System; |
|
||||
using System.ComponentModel.DataAnnotations; |
|
||||
using System.ComponentModel.DataAnnotations.Schema; |
|
||||
|
|
||||
namespace CK.SCP.Models.ScpEntity |
|
||||
{ |
|
||||
public class V_BillShipDetail |
|
||||
{ |
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|
||||
public int UID { get; set; } |
|
||||
|
|
||||
[Key] |
|
||||
[StringLength(50)] |
|
||||
public string BillNum { get; set; } |
|
||||
|
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string PoBillNum { get; set; } |
|
||||
|
|
||||
|
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)] |
|
||||
public int PoLineNum { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string PartCode { get; set; } |
|
||||
|
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Batch { get; set; } |
|
||||
|
|
||||
[Column(TypeName = "date")] |
|
||||
public DateTime ProduceDate { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string VendBatch { get; set; } |
|
||||
|
|
||||
[Column(TypeName = "money")] |
|
||||
public decimal BillQty { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string PoUnit { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string LocUnit { get; set; } |
|
||||
|
|
||||
[Column(TypeName = "money")] |
|
||||
public decimal Price { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Currency { get; set; } |
|
||||
|
|
||||
[Column(TypeName = "money")] |
|
||||
public decimal PackQty { get; set; } |
|
||||
|
|
||||
public int State { get; set; } |
|
||||
|
|
||||
|
|
||||
|
|
||||
public int? BillType { get; set; } |
|
||||
|
|
||||
public DateTime? BillTime { get; set; } |
|
||||
|
|
||||
|
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string AsnBillNum { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string VendId { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string OperName { get; set; } |
|
||||
|
|
||||
public DateTime? ShipTime { get; set; } |
|
||||
|
|
||||
public DateTime? ReceiveTime { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string Remark { get; set; } |
|
||||
|
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string AsnBillNUm { get; set; } |
|
||||
|
|
||||
|
|
||||
[Column(TypeName = "money")] |
|
||||
public decimal? ReceivedQty { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string ErpPartCode { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
public string PartDesc1 { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
public string PartDesc2 { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string ProjectId { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string Unit { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
[StringLength(50)] |
|
||||
public string PartGroup { get; set; } |
|
||||
|
|
||||
|
|
||||
|
|
||||
[StringLength(100)] |
|
||||
public string Configuration { get; set; } |
|
||||
|
|
||||
public int? ValidityDays { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string ReceivePort { get; set; } |
|
||||
|
|
||||
[StringLength(50)] |
|
||||
public string PalletSize { get; set; } |
|
||||
|
|
||||
//收货数量
|
|
||||
[Column(TypeName = "money")] |
|
||||
public decimal? Expr15 { get; set; } |
|
||||
|
|
||||
} |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.ComponentModel.DataAnnotations.Schema; |
|
||||
using System.Linq; |
|
||||
using System.Text; |
|
||||
using System.Threading.Tasks; |
|
||||
|
|
||||
namespace CK.SCP.Models.ScpEntity |
|
||||
{ |
|
||||
public class V_FORECAST_REPORT |
|
||||
{ |
|
||||
public string VendId { get; set; } //供应商编号
|
|
||||
public string PartCode { get; set; } //零件号
|
|
||||
public decimal AskQty { get; set; } //订单要货数量
|
|
||||
public int Month { get; set; } //月份
|
|
||||
public decimal MonthQty1 { get; set; } //N+1
|
|
||||
public decimal MonthQty2 { get; set; } //N+2
|
|
||||
public decimal MonthQty3 { get; set; } //N+3
|
|
||||
[NotMapped] |
|
||||
public string VendName => ScpCache.GetVendName(VendId);//供应商名称
|
|
||||
} |
|
||||
} |
|
@ -1,107 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_COMPARE.aspx.cs" Inherits="SCP.Views.ErpExtend.SCP_COMPARE" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<Items> |
|
||||
<f:Grid ID = "Grid_V_TB_PO_DETAIL" EnableCollapse = "true" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true" |
|
||||
DataKeyNames = "UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty" |
|
||||
SortField="PoLine" |
|
||||
AllowPaging="True" |
|
||||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange" |
|
||||
> |
|
||||
<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_SelectedIndexChanged" |
|
||||
runat="server"> |
|
||||
<f:ListItem Text="10" Value="10" /> |
|
||||
<f:ListItem Text="40" Value="40" /> |
|
||||
<f:ListItem Text="80" Value="80" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
<f:ListItem Text="200" Value="200" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
|
|
||||
|
|
||||
<f:BoundField Width="100px" DataField="PoBillNum" HeaderText="订单编号"></f:BoundField> |
|
||||
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" /> |
|
||||
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" /> |
|
||||
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" /> |
|
||||
<f:BoundField Width = "80px" DataField = "PlanQty" DataFormatString = "{0:F}" HeaderText = "订单数量" /> |
|
||||
<f:BoundField Width = "100px" DataField = "TempQty" DataFormatString = "{0:F}" HeaderText = "已要数量" /> |
|
||||
<f:BoundField Width = "80px" DataField = "ShippedQty" DataFormatString = "{0:F}" HeaderText = "发货数量" /> |
|
||||
<f:BoundField Width = "80px" DataField = "ReceivedQty" DataFormatString = "{0:F}" HeaderText = "收货数量" /> |
|
||||
<f:BoundField Width = "80px" DataField = "RejectQty" DataFormatString = "{0:F}" HeaderText = "退货数量" /> |
|
||||
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "到货日期" /> |
|
||||
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" /> |
|
||||
|
|
||||
<f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true" /> |
|
||||
<f:BoundField Width = "50px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" /> |
|
||||
|
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
|
|
||||
<f:HiddenField ID="highlightRows" runat="server"> |
|
||||
</f:HiddenField> |
|
||||
</Items> |
|
||||
</form> |
|
||||
<script type="text/javascript"> |
|
||||
var highlightRowsClientID = '<%= highlightRows.ClientID %>'; |
|
||||
var gridClientID = '<%= Grid1.ClientID %>'; |
|
||||
|
|
||||
function highlightRows() { |
|
||||
// 增加延迟,等待HiddenField更新完毕 |
|
||||
window.setTimeout(function () { |
|
||||
var highlightRows = F(highlightRowsClientID); |
|
||||
var grid = F(gridClientID); |
|
||||
|
|
||||
$(grid.el.dom).find('.x-grid-item.highlight').removeClass('highlight'); |
|
||||
|
|
||||
$.each(highlightRows.getValue().split(','), function (index, item) { |
|
||||
if (item !== '') { |
|
||||
var row = grid.getView().getNode(parseInt(item, 10)); |
|
||||
$(row).addClass('highlight'); |
|
||||
} |
|
||||
}); |
|
||||
}, 100); |
|
||||
} |
|
||||
|
|
||||
// 页面第一个加载完毕后执行的函数 |
|
||||
F.ready(function () { |
|
||||
|
|
||||
var grid = F(gridClientID); |
|
||||
|
|
||||
grid.on('columnhide', function () { |
|
||||
highlightRows(); |
|
||||
}); |
|
||||
|
|
||||
grid.on('columnshow', function () { |
|
||||
highlightRows(); |
|
||||
}); |
|
||||
|
|
||||
grid.getStore().on('refresh', function () { |
|
||||
highlightRows(); |
|
||||
}); |
|
||||
|
|
||||
highlightRows(); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
//// 页面AJAX回发后执行的函数 |
|
||||
//F.ajaxReady(function () { |
|
||||
// highlightRows(); |
|
||||
//}); |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,37 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
|
|
||||
namespace SCP.Views.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_COMPARE : System.Web.UI.Page |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_PO_DETAIL_RowDataBound(object sender, FineUI.GridRowEventArgs e) |
|
||||
{ |
|
||||
DataRowView row = e.DataItem as DataRowView; |
|
||||
if (row != null) |
|
||||
{ |
|
||||
// row["PlanQty"]
|
|
||||
|
|
||||
// row["ReceivedQty"]
|
|
||||
|
|
||||
// row["RejectQty"]
|
|
||||
int entranceYear = Convert.ToInt32(row["EntranceYear"]); |
|
||||
|
|
||||
if (entranceYear >= 2006) |
|
||||
{ |
|
||||
highlightRows.Text += e.RowIndex.ToString() + ","; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,69 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.Views.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_COMPARE { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_PO_DETAIL 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_PO_DETAIL; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// highlightRows 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.HiddenField highlightRows; |
|
||||
} |
|
||||
} |
|
@ -1,123 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:Toolbar ID="Toolbar1" runat="server"> |
|
||||
<Items> |
|
||||
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnView" runat="server" EnablePostBack="True" Text="查看发票" Icon="Zoom" OnClick="btnView_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_Click"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Rows> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:CheckBoxList runat="server" ID="ckb" Label="状态"> |
|
||||
<f:CheckItem Text="发票寄出" Value="4" Selected="true" /> |
|
||||
<f:CheckItem Text="财务退回" Value="6" Selected="true" /> |
|
||||
<f:CheckItem Text="财务收票" Value="5" Selected="true" /> |
|
||||
</f:CheckBoxList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="TXT_InvcBillNum" runat="server" Label="发票单号" /> |
|
||||
<f:DropDownList ID="TXT_VendId" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableMultiSelect="false"/> |
|
||||
<f:TextBox ID="TXT_InvoiceNum" runat="server" Label="金税票号" /> |
|
||||
<f:TextBox ID="TXT_PO" runat="server" Label="订单编号"/> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="TXT_ASN" runat="server" Label="发货单号"/> |
|
||||
<f:DatePicker ID="DP_CreateTime1" runat="server" Required="true" Label="收货时间"/> |
|
||||
<f:DatePicker ID="DP_CreateTime2" runat="server" Required="true" Label="至" /> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BTN_SEARCH" runat="server" OnClick="BTN_SEARCH_Click" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<%-- <f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow>--%> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
|
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
|
|
||||
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="false" |
|
||||
ShowHeader="False" SortField="State;CreateTime" |
|
||||
AllowPaging="True" PageSize="100" OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange" |
|
||||
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" |
|
||||
DataKeyNames="UID, InvcBillNum,State_DESC,InvoiceNum,ExpressNum,VendName,Amount,Tax,TaxAmount,ContractPrice,BlancePrice,Total,CreateTime,Remark,VendId" AllowSorting="true" IsDatabasePaging="true" > |
|
||||
<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_SelectedIndexChanged" |
|
||||
runat="server"> |
|
||||
<f:ListItem Text="10" Value="10" /> |
|
||||
<f:ListItem Text="20" Value="20" /> |
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
<f:ListItem Text="200" Value="200" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="" DataField="InvcBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="InvoiceNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="" DataField="ExpressNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="金额" ColumnID="" DataField="Amount" /> |
|
||||
<f:BoundField runat="server" HeaderText="税率" ColumnID="" DataField="Tax" /> |
|
||||
<f:BoundField runat="server" HeaderText="税额" ColumnID="" DataField="TaxAmount" /> |
|
||||
|
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="Total" /> |
|
||||
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="ContractPrice" /> |
|
||||
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" /> |
|
||||
<%--<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="发票明细" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
|
|
||||
|
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,191 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using System.Data.Entity; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
using System.Data; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE : PageBase |
|
||||
{ |
|
||||
|
|
||||
|
|
||||
public void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
IsRoleRight(); |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
SetRoleRule(); |
|
||||
BindVender(TXT_VendId); |
|
||||
} |
|
||||
} |
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
if (!CurrentUser.RoleList.Contains("财务人员")) |
|
||||
{ |
|
||||
Alert.Show("当前用户角色不能操作该模块!"); |
|
||||
return; |
|
||||
} |
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
private void SetRoleRule() |
|
||||
{ |
|
||||
//IsPriceVisible(Grid_V_TB_INVOICE, "合同价格");
|
|
||||
//IsPriceVisible(Grid_V_TB_INVOICE, "合同差额");
|
|
||||
//IsPriceVisible(Grid_V_TB_INVOICE, "要货日期");
|
|
||||
} |
|
||||
public void BindInvoice() |
|
||||
{ |
|
||||
SearchInvoice((result) => |
|
||||
{ |
|
||||
Grid_V_TB_INVOICE.RecordCount = result.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE>(result, Grid_V_TB_INVOICE,"ASC"); |
|
||||
Grid_V_TB_INVOICE.DataSource = list; |
|
||||
Grid_V_TB_INVOICE.DataBind(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action) |
|
||||
{ |
|
||||
V_TB_INVOICE _entity = new V_TB_INVOICE(); |
|
||||
_entity.InvcBillNum = TXT_InvcBillNum.Text; |
|
||||
_entity.VendId = TXT_VendId.SelectedValue; |
|
||||
_entity.InvoiceNum = TXT_InvoiceNum.Text; |
|
||||
_entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text,TXT_PO.Text,TXT_ASN.Text); |
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
_entity.BillStateList = GetStateList(); |
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_ERP_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("未查询到符合条件的发票!"); |
|
||||
} |
|
||||
p_action(ret.Result); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
private List<int> GetStateList() |
|
||||
{ |
|
||||
List<int> lsValue = new List<int>(); |
|
||||
string[] values = ckb.SelectedValueArray; |
|
||||
|
|
||||
if(values.Contains("0")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.New); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("1")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.Apply); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("2")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CheckFail); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("3")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CheckSuccess); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("4")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.Mail); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("5")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.FinanceReceive); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("6")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.FinanceFail); |
|
||||
} |
|
||||
|
|
||||
return lsValue; |
|
||||
} |
|
||||
protected void btnView_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length == 0) |
|
||||
{ |
|
||||
Alert.Show("请选择一行要操作的记录!"); |
|
||||
return; |
|
||||
} |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../ErpExtend/SCP_INVOICE_DELTAIL.aspx?ID={0}", ID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../SupplierData/SCP_INVOICE_DETAIL.aspx?ID={0}", ID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
|
|
||||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
protected void BTN_SEARCH_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void ddlGridPageSize_SelectedIndexChanged1(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
protected void btnOutput_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<string> _ls = new List<string>(); |
|
||||
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls); |
|
||||
PageBase.DataSetToExcel(ds, "财务确认"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
@ -1,231 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// PageManager1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.PageManager PageManager1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Button3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button Button3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnView 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnView; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ckb 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.CheckBoxList ckb; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvcBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvcBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_VendId 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList TXT_VendId; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvoiceNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvoiceNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_PO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_ASN 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_ASN; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DP_CreateTime1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker DP_CreateTime1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DP_CreateTime2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker DP_CreateTime2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BTN_SEARCH 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BTN_SEARCH; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_INVOICE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_INVOICE; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,40 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CHECKFAIL.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_CHECKFAIL" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOK" runat="server" EnablePostBack="True" Text="确认" Icon="Add" OnClick="btnOK_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnClose" runat="server" EnablePostBack="True" Text="关闭" Icon="Add"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
</f:Form> |
|
||||
<f:SimpleForm ID="SimpleForm1" runat="server" BodyPadding="20px" |
|
||||
ShowHeader="false" ShowBorder="False"> |
|
||||
<Items> |
|
||||
<f:TextArea ID="txtMemo" runat="server" Label="退回原因" Text="" AutoGrowHeight="True"> |
|
||||
</f:TextArea> |
|
||||
</Items> |
|
||||
</f:SimpleForm> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
|
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,48 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using FineUI; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_CHECKFAIL : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//确认
|
|
||||
protected void btnOK_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
try |
|
||||
{ |
|
||||
string Memo = this.txtMemo.Text.Trim().Replace("'", "''"); |
|
||||
if (string.IsNullOrEmpty(Memo)) |
|
||||
{ |
|
||||
Alert.Show("请输入退回原因"); |
|
||||
return; |
|
||||
} |
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference(Memo)); |
|
||||
|
|
||||
} |
|
||||
catch (Exception ex) |
|
||||
{ |
|
||||
Alert.Show(ex.Message); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,78 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_CHECKFAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOK 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOK; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnClose 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnClose; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// SimpleForm1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.SimpleForm SimpleForm1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextArea txtMemo; |
|
||||
} |
|
||||
} |
|
@ -1,128 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CONFIRM.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_CONFIRM" %> |
|
||||
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
|
||||
<%@ Import Namespace="CK.SCP.Utils" %> |
|
||||
|
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Toolbar ID="Toolbar1" runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnView" runat="server" EnablePostBack="True" Text="查看发票" Icon="Zoom" OnClick="btnView_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</f:Button> |
|
||||
|
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Rows> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:CheckBoxList runat="server" ID="ckb" Label="状态"> |
|
||||
<f:CheckItem Text="供应商申请" Value="1" Selected="True" /> |
|
||||
<f:CheckItem Text="采购审核退回" Value="2" Selected="True" /> |
|
||||
<f:CheckItem Text="采购审核通过" Value="3" Selected="True" /> |
|
||||
<f:CheckItem Text="发票寄出" Value="4" Selected="True" /> |
|
||||
<f:CheckItem Text="财务收票" Value="5" Selected="True" /> |
|
||||
</f:CheckBoxList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:TextBox ID="TXT_InvcBillNum" runat="server" Label="发票单号" /> |
|
||||
<f:TextBox ID="TXT_VendName" runat="server" Label="供应商编码"/> |
|
||||
<f:TextBox ID="TXT_InvoiceNum" runat="server" Label="金税票号"/> |
|
||||
<f:TextBox ID="TXT_PO" runat="server" Label="订单编号"/> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:TextBox ID="TXT_ASN" runat="server" Label=" 发货单号"/> |
|
||||
<f:Label runat="server" Label="收货时间" /> |
|
||||
<f:DatePicker ID="DP_CreateTime1" runat="server" Required="true" /> |
|
||||
<f:Label runat="server" ShowLabel="false" Text="-" /> |
|
||||
<f:DatePicker ID="DP_CreateTime2" runat="server" Required="true" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BTN_SEARCH" runat="server" OnClick="BTN_SEARCH_Click" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
|
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="true" |
|
||||
ShowHeader="False" SortField="State;CreateTime" AllowPaging="True" PageSize="200" |
|
||||
OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange" |
|
||||
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" |
|
||||
DataKeyNames="UID, InvcBillNum" AllowSorting="true" IsDatabasePaging="true" > |
|
||||
<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_SelectedIndexChanged" |
|
||||
runat="server"> |
|
||||
|
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
<f:ListItem Text="200" Value="200" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="" DataField="InvcBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="InvoiceNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="" DataField="ExpressNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="金额" ColumnID="" DataField="Amount" /> |
|
||||
<f:BoundField runat="server" HeaderText="税率" ColumnID="" DataField="Tax" /> |
|
||||
<f:BoundField runat="server" HeaderText="税额" ColumnID="" DataField="TaxAmount" /> |
|
||||
<f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="Total" /> |
|
||||
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="ContractPrice" /> |
|
||||
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" /> |
|
||||
<%-- <f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="发票明细" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
|
|
||||
</body> |
|
||||
</html> |
|
@ -1,222 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using System.Data; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_CONFIRM : PageBase |
|
||||
{ |
|
||||
public void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
} |
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
public void BindInvoice() |
|
||||
{ |
|
||||
SearchInvoice((result) => { |
|
||||
Grid_V_TB_INVOICE.RecordCount = result.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE>(result, Grid_V_TB_INVOICE,"ASC"); |
|
||||
Grid_V_TB_INVOICE.DataSource = list; |
|
||||
Grid_V_TB_INVOICE.DataBind(); |
|
||||
}); |
|
||||
} |
|
||||
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action) |
|
||||
{ |
|
||||
V_TB_INVOICE _entity = new V_TB_INVOICE(); |
|
||||
|
|
||||
_entity.InvcBillNum = TXT_InvcBillNum.Text; |
|
||||
|
|
||||
_entity.VendName = TXT_VendName.Text; |
|
||||
_entity.InvoiceNum = TXT_InvoiceNum.Text; |
|
||||
_entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text,TXT_PO.Text,TXT_ASN.Text); |
|
||||
|
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
_entity.BillStateList = GetStateList(); |
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_ERP_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("未查询到符合条件的发票!"); |
|
||||
} |
|
||||
p_action(ret.Result); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
private List<int> GetStateList() |
|
||||
{ |
|
||||
List<int> lsValue = new List<int>(); |
|
||||
string[] values = ckb.SelectedValueArray; |
|
||||
|
|
||||
if (values.Contains("0")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.New); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("1")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.Apply); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("2")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CheckFail); |
|
||||
} |
|
||||
if (values.Contains("3")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CheckSuccess); |
|
||||
} |
|
||||
if (values.Contains("4")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.Mail); |
|
||||
} |
|
||||
if (values.Contains("5")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.FinanceReceive); |
|
||||
} |
|
||||
if (values.Contains("6")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.FinanceFail); |
|
||||
} |
|
||||
return lsValue; |
|
||||
} |
|
||||
|
|
||||
protected void btnView_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length != 1) |
|
||||
{ |
|
||||
Alert.Show("请选择一行要操作的记录!"); |
|
||||
return; |
|
||||
} |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../ErpExtend/SCP_INVOICE_CONFIRM_DETAIL.aspx?ID={0}", ID); |
|
||||
|
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
//双击打开详情页
|
|
||||
|
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../ErpExtend/SCP_INVOICE_CONFIRM_DETAIL.aspx?ID={0}", ID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void BTN_SEARCH_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
|
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
//导出
|
|
||||
//protected void btnOutput_OnClick(object sender, EventArgs e)
|
|
||||
//{
|
|
||||
|
|
||||
// V_TB_INVOICE _entity = new V_TB_INVOICE();
|
|
||||
// _entity.CreateUser = TXT_CreateUser.Text;
|
|
||||
// _entity.InvcBillNum = TXT_InvcBillNum.Text;
|
|
||||
// _entity.Site = TXT_Site.Text;
|
|
||||
// _entity.VendName = TXT_VendName.Text;
|
|
||||
// _entity.InvoiceNum = TXT_InvoiceNum.Text;
|
|
||||
// if (!string.IsNullOrEmpty(DP_CreateTime1.Text))
|
|
||||
// {
|
|
||||
// _entity.BeginTime = DP_CreateTime1.SelectedDate.Value;
|
|
||||
// }
|
|
||||
|
|
||||
// if (!string.IsNullOrEmpty(DP_CreateTime2.Text))
|
|
||||
// {
|
|
||||
// _entity.EndTime = DP_CreateTime2.SelectedDate.Value;
|
|
||||
// }
|
|
||||
// _entity.UserInAddress = CurrentUser.FactoryList;
|
|
||||
// _entity.BillStateList = new List<int> { (int)InvoiceState.Apply,
|
|
||||
// (int)InvoiceState.Mail,
|
|
||||
// (int)InvoiceState.CheckFail,
|
|
||||
// (int)InvoiceState.CheckSuccess,
|
|
||||
// };
|
|
||||
// SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(_entity, (ret) =>
|
|
||||
// {
|
|
||||
// if (ret.State == ReturnStatus.Succeed)
|
|
||||
// {
|
|
||||
// Dictionary<string, string> cellheader = new Dictionary<string, string>
|
|
||||
// {
|
|
||||
// { "State_DESC", "状态" },
|
|
||||
// { "InvcBillNum", "发票单号" },
|
|
||||
// { "InvoiceNum", "金税票号" },
|
|
||||
// { "ExpressNum", "快递单号" },
|
|
||||
// { "VendName", "供应商" },
|
|
||||
// { "VendId", "供应商编码" },
|
|
||||
// { "Amount", "金额" },
|
|
||||
// { "Tax", "税率" },
|
|
||||
// { "TaxAmount", "税额" },
|
|
||||
// { "Total", "开票金额" },
|
|
||||
// { "CreateTime", "创建时间" },
|
|
||||
// { "Remark", "备注" }
|
|
||||
// };
|
|
||||
|
|
||||
// string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "发票明细");
|
|
||||
|
|
||||
// }
|
|
||||
|
|
||||
// });
|
|
||||
//}
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<string> _ls = new List<string>(); |
|
||||
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls); |
|
||||
PageBase.DataSetToExcel(ds, "采购确认"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,222 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_CONFIRM { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Button3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button Button3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnView 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnView; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ckb 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.CheckBoxList ckb; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvcBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvcBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_VendName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_VendName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvoiceNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvoiceNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_PO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_ASN 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_ASN; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DP_CreateTime1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker DP_CreateTime1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DP_CreateTime2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker DP_CreateTime2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BTN_SEARCH 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BTN_SEARCH; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_INVOICE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_INVOICE; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,138 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CONFIRM_DETAIL.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_CONFIRM_DETAIL" Async="true" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server"> |
|
||||
</f:ToolbarSeparator> |
|
||||
|
|
||||
<f:Button ID="btnEdit" runat="server" Text="修改备注" Enabled="false" OnClientClick="if(!confirm('是否要修改备注?'))return false;" Icon="ScriptSave" OnClick="btnEdit_Click"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<f:Button ID="btnCheckSuccess" runat="server" Text="审核通过" OnClientClick="if(!confirm('是否要通过该发票申请?'))return false;" Icon="BulletTick" OnClick="btnCheckSuccess_Click"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<f:Button ID="btnCheckFail" runat="server" Text="审核退回" Icon="BulletCross" OnClick="btnCheckFail_Click"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
</f:Form> |
|
||||
<f:GroupPanel runat="server" ID="gp1" Layout="HBox"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Rows> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="发票单号" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtBillTime" runat="server" Label="创建时间" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:Label runat="server" ID="Label3" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtAmount" runat="server" Label="金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtTax" runat="server" Label="税率" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtTaxAmount" runat="server" Label="税额" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtTotal" runat="server" Label="开票金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:Label runat="server" ID="Label2" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtExpressNumber" runat="server" Label="快递单号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
|
|
||||
<f:TextBox ID="txtContractPrice1" runat="server" Label="折扣金额" Text="0" MaxLength="100" /> |
|
||||
<f:TextBox ID="txtBlancePrice1" runat="server" Label="调整税额" Text="0" MaxLength="100" /> |
|
||||
<f:Label runat="server" ID="Label1" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="" MaxLength="100"> |
|
||||
</f:TextBox> |
|
||||
<f:Label runat="server" ID="l1" /> |
|
||||
<f:Label runat="server" ID="l2" /> |
|
||||
<f:Label runat="server" ID="l3" /> |
|
||||
<f:Label runat="server" ID="l4" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
<f:Toolbar runat="server" Hidden="true"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill runat="server" /> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,InvcBillNum,Qty,CanQty,State,Price,ContractPrice,BlancePrice" IsDatabasePaging="True" AllowPaging="True" |
|
||||
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoBillNum" OnRowDataBound="Grid1_RowDataBound"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|
||||
<f:BoundField SortField="ProjectId" DataField="ProjectId" HeaderText="项目编号" ColumnID="ProjectId" Width="100px" /> |
|
||||
|
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="ProductCode" Width="80px" /> |
|
||||
<%-- <f:BoundField SortField="ProductName" DataField="AsnBillNum" HeaderText="收货单" ColumnID="ProductName" Width="100px" />--%> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单" ColumnID="UnitCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="80px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Price" Width="80px" /> |
|
||||
<f:BoundField SortField="Price" DataField="Price" HeaderText="单价" ColumnID="PlanQty" Width="80px" /> |
|
||||
<f:BoundField SortField="ContractPrice" runat="server" HeaderText="合同价格" Hidden="true" ColumnID="" DataField="ContractPrice" /> |
|
||||
<f:BoundField SortField="BlancePrice" runat="server" HeaderText="合同差额" Hidden="true" ColumnID="" DataField="BlancePrice" /> |
|
||||
<f:BoundField SortField="UpdateTime" runat="server" HeaderText="收货日期" ColumnID="" DataField="UpdateTime" /> |
|
||||
<%--<f:BoundField SortField="Qty" DataField="Qty" HeaderText="开票数量" ColumnID="OpenQty" Width="80px" />--%> |
|
||||
<f:TemplateField HeaderText="开票数量" Width="70px" ColumnID="Qty"> |
|
||||
<ItemTemplate> |
|
||||
<asp:label ID="Qty1" runat="server" Width="60px" Text='<%# Eval("Qty") %>' ></asp:label> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
<f:TemplateField HeaderText="备注" Width="160px"> |
|
||||
<ItemTemplate> |
|
||||
<asp:TextBox ID="txtLineMemo" runat="server" Width="150px" |
|
||||
Text='<%# Eval("Remark") %>' MaxLength="50"></asp:TextBox> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" Height="640px" Width="700px" AutoScroll="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="发票详情" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" OnClose="Window1_Close" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,312 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Common; |
|
||||
using CK.SCP.Controller; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using FineUI; |
|
||||
using System.Drawing; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_CONFIRM_DETAIL : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
SetRoleRule(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
private void SetRoleRule() |
|
||||
{ |
|
||||
//IsPriceVisible(Grid1, "合同价格");
|
|
||||
//IsPriceVisible(Grid1, "合同差额");
|
|
||||
IsPriceVisible(Grid1, "要货日期"); |
|
||||
} |
|
||||
private void GetInvoice() |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_ERP_List(new V_TB_INVOICE { InvcBillNum = id }, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _ls = ret.Result.ToList(); |
|
||||
if (_ls != null && _ls.Count > 0) |
|
||||
{ |
|
||||
var _Model = _ls[0]; |
|
||||
Session["invoice"] = _Model; |
|
||||
txtState.Text = _Model.State_DESC; |
|
||||
txtBillNo.Text = _Model.InvcBillNum; |
|
||||
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd"); |
|
||||
txtSupplierName.Text = _Model.VendName; |
|
||||
txtInvoiceNumber.Text = _Model.InvoiceNum; |
|
||||
txtExpressNumber.Text = _Model.ExpressNum; |
|
||||
txtAmount.Text = _Model.Amount.ToString(); |
|
||||
txtTotal.Text = _Model.Total != null ? _Model.Total.ToString() : string.Empty; |
|
||||
txtContractPrice1.Text = _Model.ContractPrice != null ? _Model.ContractPrice.ToString() : string.Empty; |
|
||||
txtBlancePrice1.Text = _Model.BlancePrice != null ? _Model.BlancePrice.ToString() : string.Empty; |
|
||||
txtMemo.Text = _Model.Remark; |
|
||||
if (_Model.State ==(int)InvoiceState.Apply) |
|
||||
{ |
|
||||
this.btnCheckFail.Hidden = false;//.Visible = true;
|
|
||||
this.btnCheckSuccess.Hidden = false;//.Visible = true;
|
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
this.btnCheckFail.Hidden = true; // Visible = false;
|
|
||||
this.btnCheckSuccess.Hidden = true; //Visible = false;
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
this.btnEdit.Enabled = true; |
|
||||
|
|
||||
|
|
||||
} |
|
||||
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
|
||||
{ |
|
||||
|
|
||||
string id = GetQueryValue("ID"); |
|
||||
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL(); |
|
||||
_tb.InvcBillNum = id; |
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
p_list(ret.Result); |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
Search(ret => |
|
||||
{ |
|
||||
Grid1.RecordCount = ret.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE_DETAIL>(ret, Grid1); |
|
||||
|
|
||||
foreach (V_TB_INVOICE_DETAIL rec in list) |
|
||||
{ |
|
||||
rec.Qty = ToDecimal(rec.Qty, 2); |
|
||||
rec.CanQty = ToDecimal(rec.CanQty, 2); |
|
||||
} |
|
||||
|
|
||||
Grid1.DataSource = list; |
|
||||
Grid1.DataBind(); |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
public decimal ToDecimal(decimal num, int scale) |
|
||||
{ |
|
||||
decimal tempOdds = Math.Round(num, scale); |
|
||||
//if (tempOdds > num)
|
|
||||
//{
|
|
||||
// num = (decimal)((double)(tempOdds - (decimal)Math.Pow(10, -scale)));
|
|
||||
//}
|
|
||||
//else
|
|
||||
//{
|
|
||||
// num = (decimal)((double)tempOdds);
|
|
||||
//}
|
|
||||
//return num;
|
|
||||
return tempOdds; |
|
||||
} |
|
||||
|
|
||||
protected void btnCheckFail_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript( |
|
||||
Window1.GetShowReference("../ErpExtend/SCP_INVOICE_CHECKFAIL.aspx", "采购审核退回") |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
protected void btnCheckSuccess_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
SET_INVOICE_STATE("采购审核通过", InvoiceState.CheckSuccess); |
|
||||
|
|
||||
} |
|
||||
private void SET_INVOICE_STATE(string p_msg, InvoiceState p_state) |
|
||||
{ |
|
||||
if (Session["Invoice"] != null) |
|
||||
{ |
|
||||
var _Invoice = Session["Invoice"] as V_TB_INVOICE; |
|
||||
|
|
||||
_Invoice.Remark = txtMemo.Text; |
|
||||
|
|
||||
//var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice.InvcBillNum, p_state);
|
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice, p_state,CurrentUser.ChineseName); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Alert.Show(p_msg); |
|
||||
|
|
||||
if (CurrentUser.ConfigList.Keys.Contains("供应商邮件")) |
|
||||
{ |
|
||||
|
|
||||
SCP.Common.MailManager.SendMail(_Invoice.VendId, "采购审核通过", "采购审核通过"); |
|
||||
} |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show(ret.Message); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
protected void btnEdit_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _invoice = Session["invoice"] as V_TB_INVOICE; |
|
||||
var Memo = MyWebString.GetString(txtMemo.Text.Trim()); |
|
||||
_invoice.Remark = Memo; |
|
||||
|
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
|
|
||||
if (_invoice != null) |
|
||||
{ |
|
||||
|
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
|
|
||||
|
|
||||
GridRow row = Grid1.Rows[i]; |
|
||||
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
|
||||
|
|
||||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|
||||
_entity.InvcBillNum = rowDataKeys[1] as string; |
|
||||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
|
||||
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
|
||||
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[4]); |
|
||||
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
|
||||
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
|
||||
|
|
||||
_entity.ContractPrice = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|
||||
_entity.BlancePrice = ConvertHelper.To<Decimal>(rowDataKeys[7]); |
|
||||
|
|
||||
_entity.Remark = txtLineMemo.Text; |
|
||||
|
|
||||
//把备注添加到TB_INVOICE、TB_INVOICE_DETAIL
|
|
||||
_ls.Add(_entity); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (_ls.Count > 0) |
|
||||
{ |
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice, _ls); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Alert.Show("发票备注修改成功!"); |
|
||||
|
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("更改记录数为零"); |
|
||||
} |
|
||||
} |
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
|
||||
{ |
|
||||
if (string.IsNullOrEmpty(e.CloseArgument)) |
|
||||
{ |
|
||||
Alert.Show("请输入退回原因"); |
|
||||
return; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
string Memo = e.CloseArgument; |
|
||||
var _invoice = Session["invoice"] as V_TB_INVOICE; |
|
||||
|
|
||||
_invoice.State = (int)InvoiceState.CheckFail; |
|
||||
_invoice.Remark = Memo; |
|
||||
|
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
|
|
||||
if (_invoice != null) |
|
||||
{ |
|
||||
|
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
|
|
||||
|
|
||||
GridRow row = Grid1.Rows[i]; |
|
||||
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
|
||||
|
|
||||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|
||||
_entity.InvcBillNum = rowDataKeys[1] as string; |
|
||||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
|
||||
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
|
||||
_entity.State = (int)InvoiceState.CheckFail; |
|
||||
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
|
||||
_entity.ContractPrice = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|
||||
_entity.BlancePrice = ConvertHelper.To<Decimal>(rowDataKeys[7]); |
|
||||
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
|
||||
|
|
||||
_entity.Remark = txtLineMemo.Text; |
|
||||
|
|
||||
//把备注添加到TB_INVOICE、TB_INVOICE_DETAIL
|
|
||||
_ls.Add(_entity); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (_ls.Count > 0) |
|
||||
{ |
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice, _ls); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Alert.Show("发票采购退回成功!"); |
|
||||
|
|
||||
if (CurrentUser.ConfigList.Keys.Contains("供应商邮件")) |
|
||||
{ |
|
||||
SCP.Common.MailManager.SendMail(_invoice.VendId, "发票采购退回成功", "发票采购退回成功"); |
|
||||
} |
|
||||
BindData(); |
|
||||
GetInvoice(); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("退回记录数为零"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) |
|
||||
{ |
|
||||
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid1.Rows[e.RowIndex].FindControl("Qty1"); |
|
||||
if (!string.IsNullOrEmpty(_label.Text)) |
|
||||
{ |
|
||||
if (decimal.Parse(_label.Text) < 0) |
|
||||
{ |
|
||||
_label.ForeColor = Color.Red; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,321 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_CONFIRM_DETAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarSeparator3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarSeparator ToolbarSeparator3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnEdit 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnEdit; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheckSuccess 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheckSuccess; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheckFail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheckFail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTax 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTax; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTaxAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTaxAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTotal 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTotal; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtInvoiceNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtInvoiceNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtExpressNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtExpressNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtContractPrice1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtContractPrice1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBlancePrice1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBlancePrice1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l4 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l4; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Qty1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.Label Qty1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtLineMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.TextBox txtLineMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,121 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_DELTAIL.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_DELTAIL" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:Button ID="btnEdit" runat="server" Text="修改备注" Enabled="true" OnClientClick="if(!confirm('是否要修改备注?'))return false;" Icon="ScriptSave" OnClick="btnEdit_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnInvoiceFail" runat="server" Text="财务退回" Icon="BulletCross" OnClick="btnInvoiceFail_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnReceive" runat="server" Text="确定收票" OnClientClick="if(!confirm('是否要确认收票?'))return false;" Icon="Mail" OnClick="btnReceive_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnRejectReceive" runat="server" Text="取消收票" OnClientClick="if(!confirm('是否要取消收票?'))return false;" Icon="Cancel" OnClick="btnRejectReceive_OnClick"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Items> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="发票单号" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtBillTime" runat="server" Label="创建时间" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:Label runat="server" ID="Label3" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtAmount" runat="server" Label="金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtTax" runat="server" Label="税率" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtTaxAmount" runat="server" Label="税额" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtTotal" runat="server" Label="开票金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:Label runat="server" ID="Label2" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtExpressNumber" runat="server" Label="快递单号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtContractPrice1" runat="server" Label="折扣金额" Text="0" MaxLength="100" /> |
|
||||
<f:TextBox ID="txtBlancePrice1" runat="server" Label="调整税额" Text="0" MaxLength="100" /> |
|
||||
<f:Label runat="server" ID="Label1" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="" MaxLength="100"> |
|
||||
</f:TextBox> |
|
||||
<f:Label runat="server" ID="l1" /> |
|
||||
<f:Label runat="server" ID="l2" /> |
|
||||
<f:Label runat="server" ID="l3" /> |
|
||||
<f:Label runat="server" ID="l4" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Items> |
|
||||
</f:Form> |
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="500" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,InvcBillNum,Qty,CanQty,State,Price" IsDatabasePaging="True" AllowPaging="True" |
|
||||
EnableRowSelectEvent="True" AutoScroll="True" SortField="CreateTime" OnRowDataBound="Grid1_RowDataBound"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|
||||
<f:BoundField SortField="IsCheck" DataField="IsCheck" HeaderText="可否开票" ColumnID="IsCheck" Width="80px" /> |
|
||||
<f:BoundField SortField="PoLineNum" DataField="ProjectId" HeaderText="项目编号" ColumnID="ProjectId" Width="80px" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="ProductCode" Width="80px" /> |
|
||||
|
|
||||
|
|
||||
<%--<f:BoundField SortField="ProductName" DataField="AsnBillNum" HeaderText="收货单" ColumnID="ProductName" Width="100px" />--%> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单" ColumnID="UnitCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="80px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Price" Width="80px" /> |
|
||||
<f:BoundField SortField="Price" DataField="Price" HeaderText="单价" ColumnID="PlanQty" Width="80px" /> |
|
||||
<f:BoundField SortField="ContractPrice" runat="server" HeaderText="合同价格" Hidden="true" ColumnID="" DataField="ContractPrice" /> |
|
||||
<f:BoundField SortField="BlancePrice" runat="server" HeaderText="合同差额" Hidden="true" ColumnID="" DataField="BlancePrice" /> |
|
||||
<f:BoundField SortField="UpdateTime" runat="server" HeaderText="收货日期" ColumnID="" DataField="UpdateTime" /> |
|
||||
<%--<f:BoundField SortField="Qty" DataField="Qty" HeaderText="开票数量" ColumnID="OpenQty" Width="80px" />--%> |
|
||||
|
|
||||
<f:TemplateField HeaderText="开票数量" Width="70px" ColumnID="Qty"> |
|
||||
<ItemTemplate> |
|
||||
<asp:label ID="Qty1" runat="server" Width="60px" Text='<%# Eval("Qty") %>' ></asp:label> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
|
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" OnClose="Window1_OnClose"/> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,280 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
|
|
||||
using FineUI; |
|
||||
using System.Drawing; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_DELTAIL : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
SetRoleRule(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
if (!CurrentUser.RoleList.Contains("财务人员")) |
|
||||
{ |
|
||||
Alert.Show("当前用户角色不能操作该模块!"); |
|
||||
return; |
|
||||
} |
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
private void SetRoleRule() |
|
||||
{ |
|
||||
//IsPriceVisible(Grid1, "合同价格");
|
|
||||
//IsPriceVisible(Grid1, "合同差额");
|
|
||||
IsPriceVisible(Grid1, "要货日期"); |
|
||||
} |
|
||||
|
|
||||
//修改备注
|
|
||||
protected void btnEdit_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(txtMemo.Text.Trim())) |
|
||||
{ |
|
||||
Alert.Show("请填写备注!"); |
|
||||
return; |
|
||||
} |
|
||||
var ro = SCP_INVOICE_CONTROLLER.UpdateMemoByInvcBillNum(id, txtMemo.Text.Trim()); |
|
||||
|
|
||||
if (ro.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Alert.Show("备注修改成功!"); |
|
||||
return; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("备注修改失败!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//确定发票
|
|
||||
protected void btnReceive_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
SET_INVOICE_STATE("财务接收发票", InvoiceState.FinanceReceive); |
|
||||
|
|
||||
} |
|
||||
//取消发票
|
|
||||
protected void btnRejectReceive_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
SET_INVOICE_STATE("财务取消发票", InvoiceState.Mail); |
|
||||
} |
|
||||
private void SET_INVOICE_STATE(string p_msg, InvoiceState p_state) |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
|
|
||||
var ro = SCP_INVOICE_CONTROLLER.SET_INVOICE_STATE(id, p_state); |
|
||||
|
|
||||
if (ro.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Alert.Show(p_msg + "成功!"); |
|
||||
|
|
||||
if (CurrentUser.ConfigList.Keys.Contains("供应商邮件")) |
|
||||
{ |
|
||||
SCP.Common.MailManager.SendMail(ro.Message, p_msg, p_msg); |
|
||||
} |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
return; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show(p_msg + "失败!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
private void GetInvoice() |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_ERP_List(new V_TB_INVOICE {InvcBillNum=id},(ret)=> { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _ls= ret.Result.ToList(); |
|
||||
if (_ls != null && _ls.Count > 0) |
|
||||
{ |
|
||||
var _Model = _ls[0]; |
|
||||
txtState.Text = _Model.State_DESC; |
|
||||
txtBillNo.Text = _Model.InvcBillNum; |
|
||||
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd"); |
|
||||
txtSupplierName.Text = _Model.VendName; |
|
||||
txtInvoiceNumber.Text = _Model.InvoiceNum; |
|
||||
txtExpressNumber.Text = _Model.ExpressNum; |
|
||||
txtContractPrice1.Text = _Model.ContractPrice != null ? _Model.ContractPrice.ToString() : string.Empty; |
|
||||
txtBlancePrice1.Text = _Model.BlancePrice != null ? _Model.BlancePrice.ToString() : string.Empty; |
|
||||
txtAmount.Text = _Model.Amount.ToString(); |
|
||||
txtTotal.Text = _Model.Total!=null? _Model.Total.ToString():string.Empty; |
|
||||
txtMemo.Text = _Model.Remark; |
|
||||
if (Convert.ToInt32(_Model.State) == (int)InvoiceState.Mail) |
|
||||
{ |
|
||||
btnInvoiceFail.Hidden = false; |
|
||||
btnReceive.Hidden = false; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
btnInvoiceFail.Hidden = true; |
|
||||
btnReceive.Hidden = true; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
|
||||
{ |
|
||||
|
|
||||
string id = GetQueryValue("ID"); |
|
||||
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL(); |
|
||||
_tb.InvcBillNum = id; |
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb,(ret)=> { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
p_list(ret.Result); |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
Search(ret => |
|
||||
{ |
|
||||
Grid1.RecordCount = ret.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE_DETAIL>(ret, Grid1); |
|
||||
foreach (V_TB_INVOICE_DETAIL rec in list) |
|
||||
{ |
|
||||
rec.Qty = ToDecimal(rec.Qty, 2); |
|
||||
rec.CanQty = ToDecimal(rec.CanQty, 2); |
|
||||
} |
|
||||
var _lst = list.ToList(); |
|
||||
//var _asn = new V_TB_ASN();
|
|
||||
//_asn.UserInVendIds = CurrentUser.VenderList;
|
|
||||
//if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
|
|
||||
//{
|
|
||||
// _asn.Site = CurrentUser.FactoryList[0];
|
|
||||
//}
|
|
||||
//SCP_QUALITY_CONTROLLER.Get_TB_ASN_QUALITY_List(_asn, (rs) => {
|
|
||||
// if (rs.State == ReturnStatus.Succeed)
|
|
||||
// {
|
|
||||
// _lst.ForEach(p => {
|
|
||||
// var _ls = rs.Result.ToList();
|
|
||||
// if (_ls != null && _ls.Count > 0)
|
|
||||
// {
|
|
||||
// if (_ls.Select(itm => itm.AsnBillNum).ToList().Contains(p.AsnBillNum))
|
|
||||
// {
|
|
||||
// p.IsCheck = false;
|
|
||||
// }
|
|
||||
// else
|
|
||||
// {
|
|
||||
// p.IsCheck = true;
|
|
||||
// }
|
|
||||
// }
|
|
||||
// });
|
|
||||
// }
|
|
||||
//});
|
|
||||
Grid1.DataSource = _lst; |
|
||||
Grid1.DataBind(); |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
public decimal ToDecimal(decimal num, int scale) |
|
||||
{ |
|
||||
decimal tempOdds = Math.Round(num, scale); |
|
||||
//if (tempOdds > num)
|
|
||||
//{
|
|
||||
// num = (decimal)((double)(tempOdds - (decimal)Math.Pow(10, -scale)));
|
|
||||
//}
|
|
||||
//else
|
|
||||
//{
|
|
||||
// num = (decimal)((double)tempOdds);
|
|
||||
//}
|
|
||||
//return num;
|
|
||||
return tempOdds; |
|
||||
} |
|
||||
|
|
||||
//财务退回
|
|
||||
protected void btnInvoiceFail_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript( |
|
||||
Window1.GetShowReference("../WarehouseData/SCP_INVOICE_CHECKFAIL.aspx", "财务退回") |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
protected void Window1_OnClose(object sender, WindowCloseEventArgs e) |
|
||||
{ |
|
||||
//string id = GetQueryValue("ID");
|
|
||||
|
|
||||
if (string.IsNullOrEmpty(e.CloseArgument)) |
|
||||
{ |
|
||||
Alert.Show("请输入退回原因"); |
|
||||
return; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
string Memo = e.CloseArgument; |
|
||||
string id = GetQueryValue("ID"); |
|
||||
var ro = SCP_INVOICE_CONTROLLER.CaiWu_Return_Reason(id, Memo); |
|
||||
if (ro.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Alert.Show("财务退回成功!"); |
|
||||
|
|
||||
if (CurrentUser.ConfigList.Keys.Contains("供应商邮件")) |
|
||||
{ |
|
||||
SCP.Common.MailManager.SendMail(ro.Message, "财务退回成功", "财务退回成功"); |
|
||||
} |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
return; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("财务退回失败!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) |
|
||||
{ |
|
||||
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid1.Rows[e.RowIndex].FindControl("Qty1"); |
|
||||
if (!string.IsNullOrEmpty(_label.Text)) |
|
||||
{ |
|
||||
if (decimal.Parse(_label.Text) < 0) |
|
||||
{ |
|
||||
_label.ForeColor = Color.Red; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,294 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_DELTAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnEdit 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnEdit; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnInvoiceFail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnInvoiceFail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnReceive 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnReceive; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnRejectReceive 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnRejectReceive; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTax 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTax; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTaxAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTaxAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTotal 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTotal; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtInvoiceNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtInvoiceNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtExpressNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtExpressNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtContractPrice1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtContractPrice1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBlancePrice1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBlancePrice1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l4 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l4; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Qty1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.Label Qty1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,129 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_RECVICE.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_RECVICE" %> |
|
||||
<%@ 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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Items> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_PoBillNum" /> |
|
||||
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_AsnBillNum" /> |
|
||||
<f:TextBox runat = "server" Label = "金税票号" EmptyText = "" ID = "TXT_InvoiceNum" /> |
|
||||
<f:TextBox runat = "server" Label = "发票编号" EmptyText = "" ID = "TXT_InvoiceBillNum" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox runat = "server" Label = "收货单号" EmptyText = "" ID = "TXT_RecvBillNum" /> |
|
||||
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_VendID" /> |
|
||||
<f:TextBox runat = "server" Label = "零件编码" EmptyText = "" ID = "TXT_PartCode" /> |
|
||||
<f:DropDownList runat="server" ID="DDL_State" Label="发票状态"> |
|
||||
<f:ListItem Text="发票寄出" Value="4" Selected="true"/> |
|
||||
<f:ListItem Text="财务收票" Value="5" /> |
|
||||
</f:DropDownList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
|
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" > |
|
||||
<Items> |
|
||||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出打印" OnClick="btnOutput_Click" Icon="PageExcel"></f:Button> |
|
||||
<f:Button ID="btnPrint" runat="server" Text="打印报表" OnClick="btnPrint_Click" Icon="PageExcel"></f:Button> |
|
||||
<f:Label runat="server"></f:Label> |
|
||||
<f:Label runat="server"></f:Label> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Items> |
|
||||
</f:Form> |
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="200" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" IsDatabasePaging="True" AllowPaging="True" DataKeyNames="UID,PoBillNum,PoLineNum,AsnBillNum,PartCode,PartDesc1,Currency,Price,ContractPrice,BlancePrice,BeginTime,Qty,Remark,InvoiceNum,RecvBillNum,VendId,ProjectId,VendName,PoUnit,InvcBillNum " |
|
||||
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoBillNum" OnPageIndexChange="Grid1_PageIndexChange"> |
|
||||
<Columns> |
|
||||
<f:BoundField SortField="ProjectId" DataField="ProjectId" HeaderText="项目编码" ColumnID="ProjectId" Width="80px" /> |
|
||||
<f:BoundField SortField="InvcBillNum" DataField="InvcBillNum" HeaderText="发票编号" ColumnID="InvcBillNum" Width="80px" /> |
|
||||
<f:BoundField SortField="InvoiceNum" DataField="InvoiceNum" HeaderText="金税票号" ColumnID="InvoiceNum" Width="80px" /> |
|
||||
<f:BoundField SortField="RecvBillNum" DataField="RecvBillNum" HeaderText="收货单号" ColumnID="RecvBillNum" Width="80px" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单编号" ColumnID="Line" Width="80px" /> |
|
||||
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="行号" ColumnID="PoLineNum" Width="50px" /> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单号" ColumnID="AsnBillNum" Width="100px" /> |
|
||||
<f:BoundField SortField="VendId" DataField="VendId" HeaderText="供应商编码" ColumnID="VendId" Width="80px" /> |
|
||||
<f:BoundField SortField="VendName" DataField="VendName" HeaderText="供应商名称" ColumnID="VendName" Width="100px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PartCode" Width="80px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="PartDesc1" Width="100px" /> |
|
||||
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Currency" Width="80px" /> |
|
||||
<f:BoundField SortField="CreateTime" runat="server" HeaderText="申请日期" Hidden="true" ColumnID="" DataField="CreateTime" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="开票数量" ColumnID="OpenQty" Width="80px" /> |
|
||||
<f:BoundField SortField="PoUnit" DataField="PoUnit" HeaderText="单位" ColumnID="PoUnit" Width="50px" /> |
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
|
|
||||
<script src="../../res/js/jquery.js"></script> |
|
||||
<script> |
|
||||
function openPostWindow(url,data,name){ |
|
||||
var tempForm = document.createElement("form"); |
|
||||
tempForm.id="tempForm1"; |
|
||||
tempForm.method = "post"; |
|
||||
tempForm.action=url; |
|
||||
tempForm.target=name; |
|
||||
var hideInput = document.createElement("input"); |
|
||||
hideInput.type="hidden"; |
|
||||
hideInput.name= "dataname" |
|
||||
hideInput.value=JSON.stringify(data); |
|
||||
tempForm.appendChild(hideInput); |
|
||||
document.body.appendChild(tempForm); |
|
||||
var result; |
|
||||
if (tempForm.fireEvent) { |
|
||||
//IE浏览器 |
|
||||
result = tempForm.fireEvent('onsubmit'); |
|
||||
} else { |
|
||||
//FIREFOX\CHROME等标准浏览器 |
|
||||
var evt = document.createEvent('HTMLEvents'); |
|
||||
evt.initEvent('submit', false, true); |
|
||||
result = tempForm.dispatchEvent(evt); |
|
||||
} |
|
||||
if (result) { |
|
||||
tempForm.submit(); |
|
||||
} |
|
||||
document.body.removeChild(tempForm); |
|
||||
} |
|
||||
function openWindow(name) { |
|
||||
var iWidth = 1100; |
|
||||
var iHeight = 550; |
|
||||
var iTop = (window.screen.availHeight - 30 - iHeight) / 2; |
|
||||
var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; |
|
||||
window.open('about:blank', name, "height=" + iHeight + ", width=" + iWidth + ", top=" + iTop + ", left=" + iLeft + ",toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=no"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
</script> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
</body> |
|
||||
</html> |
|
@ -1,285 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Common; |
|
||||
using CK.SCP.Controller; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Utils; |
|
||||
using System.Data; |
|
||||
using GridReport; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_RECVICE : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
BindData(); |
|
||||
SetRoleRule(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
private void SetRoleRule() |
|
||||
{ |
|
||||
IsPriceVisible(Grid1, "合同价格"); |
|
||||
IsPriceVisible(Grid1, "合同差额"); |
|
||||
IsPriceVisible(Grid1, "要货日期"); |
|
||||
} |
|
||||
|
|
||||
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
|
||||
{ |
|
||||
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
|
||||
_entity.AsnBillNum = TXT_AsnBillNum.Text; |
|
||||
_entity.RecvBillNum = TXT_RecvBillNum.Text; |
|
||||
_entity.InvoiceNum = TXT_InvoiceNum.Text; |
|
||||
_entity.PoBillNum = TXT_PoBillNum.Text; |
|
||||
_entity.PartCode = TXT_PartCode.Text; |
|
||||
_entity.InvcBillNum = TXT_InvoiceBillNum.Text; |
|
||||
_entity.State = int.Parse(DDL_State.SelectedValue); |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_entity, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
p_list(ret.Result); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
Search(ret => |
|
||||
{ |
|
||||
Grid1.RecordCount = ret.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE_DETAIL>(ret, Grid1); |
|
||||
var _ls=list.ToList(); |
|
||||
if (_ls.Count > 0) |
|
||||
{ |
|
||||
var _vendList= SCP_TB_VENDER_CONTROLLER.GetVendNameList(_ls.Select(p => p.VendId).ToList(), CurrentUser.FactoryList.FirstOrDefault()); |
|
||||
_ls.ForEach(p => { |
|
||||
|
|
||||
var _entity= _vendList.Where(itm => itm.VendId == p.VendId).FirstOrDefault(); |
|
||||
if (_entity != null) |
|
||||
{ |
|
||||
p.VendName = _entity.VendName; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
p.VendName = string.Empty; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
Grid1.DataSource = list; |
|
||||
Grid1.DataBind(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
protected void btnOutput_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
V_TB_INVOICE_DETAIL inv = new V_TB_INVOICE_DETAIL(); |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
inv.PoBillNum = rowDataKeys[1].ToString();//订单
|
|
||||
if (rowDataKeys[2] != null) |
|
||||
{ |
|
||||
inv.PoLineNum = int.Parse(rowDataKeys[2].ToString());//订单行
|
|
||||
} |
|
||||
inv.AsnBillNum = rowDataKeys[3].ToString();//发货单
|
|
||||
inv.PartCode = rowDataKeys[4].ToString();//零件号
|
|
||||
inv.PartDesc1 = rowDataKeys[5].ToString();//零件名称
|
|
||||
inv.Currency = rowDataKeys[6].ToString();//币种
|
|
||||
if (rowDataKeys[7] != null) |
|
||||
{ |
|
||||
inv.Price = decimal.Parse(rowDataKeys[7].ToString());//单价
|
|
||||
} |
|
||||
if (rowDataKeys[8] != null) |
|
||||
{ |
|
||||
inv.ContractPrice = decimal.Parse(rowDataKeys[8].ToString());//合同价格
|
|
||||
} |
|
||||
if (rowDataKeys[9] != null) |
|
||||
{ |
|
||||
inv.BlancePrice = decimal.Parse(rowDataKeys[9].ToString());//合同差额
|
|
||||
} |
|
||||
if (rowDataKeys[10] != null) |
|
||||
{ |
|
||||
inv.CreateTime = DateTime.Parse(rowDataKeys[10].ToString());//要货日期
|
|
||||
} |
|
||||
if (rowDataKeys[11] != null) |
|
||||
{ |
|
||||
inv.Qty = decimal.Parse(rowDataKeys[11].ToString());//开票数量
|
|
||||
} |
|
||||
if (rowDataKeys[12] != null) |
|
||||
{ |
|
||||
inv.Remark = rowDataKeys[12].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[13] != null) |
|
||||
{ |
|
||||
inv.InvoiceNum = rowDataKeys[13].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[14] != null) |
|
||||
{ |
|
||||
inv.RecvBillNum = rowDataKeys[14].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[15] != null) |
|
||||
{ |
|
||||
inv.VendId = rowDataKeys[15].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[16] != null) |
|
||||
{ |
|
||||
inv.ProjectId = rowDataKeys[16].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[17] != null) |
|
||||
{ |
|
||||
inv.VendName= rowDataKeys[17].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[18] != null) |
|
||||
{ |
|
||||
inv.PoUnit = rowDataKeys[18].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[19] != null) |
|
||||
{ |
|
||||
inv.InvcBillNum = rowDataKeys[19].ToString();//备注
|
|
||||
} |
|
||||
_ls.Add(inv); |
|
||||
} |
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|
||||
{ |
|
||||
{ "ProjectId", "项目编号" }, |
|
||||
{ "InvcBillNum", "发票编号" }, |
|
||||
{ "InvoiceNum", "金税票号" }, |
|
||||
{ "RecvBillNum", "收货单号" }, |
|
||||
{ "AsnBillNum", "发货单号" }, |
|
||||
{ "PoBillNum", "订单编号" }, |
|
||||
{ "PoLineNum", "行号" }, |
|
||||
{ "VendId", "供应商编码" }, |
|
||||
{ "PartCode", "零件号" }, |
|
||||
{ "PartDesc1", "零件名称" }, |
|
||||
{ "Currency", "币种" }, |
|
||||
{ "Qty", "开票数量" }, |
|
||||
{ "PoUnit","单位"} |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, _ls, "发票明细"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void BtnSearch_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindData(); |
|
||||
} |
|
||||
protected void btnPrint_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
V_TB_INVOICE_DETAIL inv = new V_TB_INVOICE_DETAIL(); |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
inv.PoBillNum = rowDataKeys[1].ToString();//订单
|
|
||||
if (rowDataKeys[2] != null) |
|
||||
{ |
|
||||
inv.PoLineNum = int.Parse(rowDataKeys[2].ToString());//订单行
|
|
||||
} |
|
||||
if (rowDataKeys[3] != null) |
|
||||
{ |
|
||||
inv.AsnBillNum = rowDataKeys[3].ToString();//发货单
|
|
||||
} |
|
||||
inv.PartCode = rowDataKeys[4].ToString();//零件号
|
|
||||
inv.PartDesc1 = rowDataKeys[5].ToString();//零件名称
|
|
||||
inv.Currency = rowDataKeys[6].ToString();//币种
|
|
||||
if (rowDataKeys[7] != null) |
|
||||
{ |
|
||||
inv.Price = decimal.Parse(rowDataKeys[7].ToString());//单价
|
|
||||
} |
|
||||
if (rowDataKeys[8] != null) |
|
||||
{ |
|
||||
inv.ContractPrice = decimal.Parse(rowDataKeys[8].ToString());//合同价格
|
|
||||
} |
|
||||
if (rowDataKeys[9] != null) |
|
||||
{ |
|
||||
inv.BlancePrice = decimal.Parse(rowDataKeys[9].ToString());//合同差额
|
|
||||
} |
|
||||
if (rowDataKeys[10] != null) |
|
||||
{ |
|
||||
inv.CreateTime = DateTime.Parse(rowDataKeys[10].ToString());//要货日期
|
|
||||
} |
|
||||
if (rowDataKeys[11] != null) |
|
||||
{ |
|
||||
inv.Qty = decimal.Parse(rowDataKeys[11].ToString());//开票数量
|
|
||||
} |
|
||||
if (rowDataKeys[12] != null) |
|
||||
{ |
|
||||
inv.Remark = rowDataKeys[12].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[13] != null) |
|
||||
{ |
|
||||
inv.InvoiceNum = rowDataKeys[13].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[14] != null) |
|
||||
{ |
|
||||
inv.RecvBillNum = rowDataKeys[14].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[15] != null) |
|
||||
{ |
|
||||
inv.VendId = rowDataKeys[15].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[16] != null) |
|
||||
{ |
|
||||
inv.ProjectId = rowDataKeys[16].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[17] != null) |
|
||||
{ |
|
||||
inv.VendName = rowDataKeys[17].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[18] != null) |
|
||||
{ |
|
||||
inv.PoUnit = rowDataKeys[18].ToString();//备注
|
|
||||
} |
|
||||
if (rowDataKeys[19] != null) |
|
||||
{ |
|
||||
inv.InvcBillNum = rowDataKeys[19].ToString();//备注
|
|
||||
} |
|
||||
_ls.Add(inv); |
|
||||
} |
|
||||
DataSet _ds = new DataSet(); |
|
||||
_ls.ForEach(p=>{ |
|
||||
if(string.IsNullOrEmpty(p.AsnBillNum)) |
|
||||
{ |
|
||||
p.AsnBillNum = "空项"; |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
var _dt = ConvertHelper.ToDataTable(_ls); |
|
||||
_ds.Tables.Add(_dt); |
|
||||
string str = JSONReportData.FromDataSet(_ds); |
|
||||
var js = string.Format("openPostWindow('{0}',{1},'winOpen')", "../../Handlers/GenerateReport.ashx?report=InvRecBill&data=101&type=pdf&filename=BarCode.pdf&open=", str); |
|
||||
PageContext.RegisterStartupScript(js); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,159 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_RECVICE { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PoBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_PoBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_AsnBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_AsnBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvoiceNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvoiceNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvoiceBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvoiceBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_RecvBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_RecvBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_VendID 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_VendID; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PartCode 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_PartCode; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DDL_State 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList DDL_State; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BtnSearch 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BtnSearch; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnPrint 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnPrint; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,183 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_VIEW.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_VIEW" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1"/> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Toolbar ID="Toolbar1" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
|
||||
</f:ToolbarSeparator> |
|
||||
<f:Button ID="btnRefresh" runat="server" Text="刷新" EnablePostBack="True" Icon="Reload" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnView" runat="server" Text="查看发票" OnClick="btnView_OnClick" Icon="Zoom"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server"> |
|
||||
</f:ToolbarSeparator> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"> |
|
||||
</f:ToolbarFill> |
|
||||
<f:TextBox ID="txtKeyword" runat="server" Label="" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Button ID="btnSearch" runat="server" Text="快速查找" Icon="SystemSearch"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text=" "> |
|
||||
</f:ToolbarText> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
|
|
||||
<f:Form BodyPadding="10px" Height="100px" ID="extForm1" |
|
||||
runat="server" Title="" ShowHeader="false" > |
|
||||
<Rows> |
|
||||
<f:FormRow ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox runat="server" Label="发票单号" ID="txtBillNo"> |
|
||||
</f:TextBox> |
|
||||
<f:DatePicker runat="server" Label="下单日期" ID="txtBillTime1"></f:DatePicker> |
|
||||
<f:DatePicker runat="server" Label="至" ID="txtBillTime2"></f:DatePicker> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:DropDownList ID="txtState" runat="server" Label="状态"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="发票寄出" Value="4" /> |
|
||||
<f:ListItem Text="财务收票" Value="5" /> |
|
||||
</f:DropDownList> |
|
||||
<f:TextBox ID="txtSupplierCode" runat="server" Label="供应商代码" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" > |
|
||||
</f:TextBox> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnSearch_Click"></f:Button> |
|
||||
<f:Label ID="Label4" runat="server" Label="" Text=""> |
|
||||
</f:Label> |
|
||||
<f:Label ID="Label3" runat="server" Label="" Text=""> |
|
||||
</f:Label> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="True" |
|
||||
ShowHeader="False" SortField="CreateTime" |
|
||||
AllowPaging="True" PageSize="20" OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange" |
|
||||
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" |
|
||||
DataKeyNames="UID, InvcBillNum,State_DESC,InvoiceNum,ExpressNum,VendName,Amount,Tax,TaxAmount,ContractPrice,BlancePrice,Total,CreateTime,Remark" AllowSorting="true" IsDatabasePaging="true" > |
|
||||
<PageItems> |
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server"> |
|
||||
</f:ToolbarSeparator> |
|
||||
<f:ToolbarText ID="ToolbarText2" runat="server" Text="每页记录数:"> |
|
||||
</f:ToolbarText> |
|
||||
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
|
||||
runat="server"> |
|
||||
<f:ListItem Text="10" Value="10" /> |
|
||||
<f:ListItem Text="20" Value="20" /> |
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
<f:ListItem Text="200" Value="200" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="InvcBillNum" DataField="InvcBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="InvoiceNum" DataField="InvoiceNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="ExpressNum" DataField="ExpressNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="VendName" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="VendId" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="金额" ColumnID="Amount" DataField="Amount" /> |
|
||||
<f:BoundField runat="server" HeaderText="税率" ColumnID="Tax" DataField="Tax" /> |
|
||||
<f:BoundField runat="server" HeaderText="税额" ColumnID="TaxAmount" DataField="TaxAmount" /> |
|
||||
<f:BoundField runat="server" HeaderText="合同价格" ColumnID="ContractPrice" DataField="ContractPrice" /> |
|
||||
<f:BoundField runat="server" HeaderText="合同差额" ColumnID="BlancePrice" DataField="BlancePrice" /> |
|
||||
<%--<f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="Total" />--%> |
|
||||
<f:TemplateField HeaderText="开票金额" Width="120px"> |
|
||||
<ItemTemplate> |
|
||||
<input type="hidden" class="price" runat="server" value='<%# Eval("Total") %>' /> |
|
||||
<asp:Label runat="server" DataField="Total" Text='<%# Eval("Total") %>'></asp:Label> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" /> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
<f:ContentPanel runat="server" CssClass="totalpanel" ShowBorder="true" ShowHeader="false"> |
|
||||
<div style="text-align: left; margin: 10px;"> |
|
||||
|
|
||||
<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> |
|
||||
</div> |
|
||||
|
|
||||
</div> |
|
||||
</f:ContentPanel> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window ID="Window1" runat="server" Hidden="True" AutoScroll="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="发票明细" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="550px" Width="1024px"> |
|
||||
</f:Window> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" AutoScroll="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px" OnClose="WindowUpload_Close" > |
|
||||
</f:Window> |
|
||||
|
|
||||
</form> |
|
||||
<script src="../../../res/js/jquery.min.js"></script> |
|
||||
<script type="text/javascript"> |
|
||||
var gridClientID = '<%= Grid_V_TB_INVOICE.ClientID %>'; |
|
||||
var priceSelector = '.f-grid-tpl input.price'; |
|
||||
function getRowPrice(row) { |
|
||||
return parseFloat(row.find(priceSelector).val()); |
|
||||
} |
|
||||
function updateTotal() { |
|
||||
var grid = F(gridClientID); |
|
||||
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); |
|
||||
if (!isNaN(getRowPrice(row))) |
|
||||
{ |
|
||||
total += getRowPrice(row); |
|
||||
} |
|
||||
}); |
|
||||
$('#totalPrice').text("¥" + total.toFixed(4)); |
|
||||
|
|
||||
$('#TOTAL_PRICE').val(total.toFixed(4)); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
function registerSelectionChangeEvents() { |
|
||||
var grid = F(gridClientID); |
|
||||
|
|
||||
grid.on('selectionchange', function (cmp, selected) { |
|
||||
updateTotal(); |
|
||||
}); |
|
||||
} |
|
||||
// 页面第一次加载完成后调用的函数 |
|
||||
F.ready(function () { |
|
||||
registerSelectionChangeEvents(); |
|
||||
updateTotal(); |
|
||||
}); |
|
||||
|
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,132 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using System.Data; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_VIEW :PageBase |
|
||||
{ |
|
||||
public void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
|
|
||||
BindInvoice(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void BindInvoice() |
|
||||
{ |
|
||||
SearchInvoice((result) => { |
|
||||
Grid_V_TB_INVOICE.RecordCount = result.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE>(result, Grid_V_TB_INVOICE); |
|
||||
Grid_V_TB_INVOICE.DataSource = list; |
|
||||
Grid_V_TB_INVOICE.DataBind(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action) |
|
||||
{ |
|
||||
V_TB_INVOICE _entity = new V_TB_INVOICE(); |
|
||||
_entity.InvcBillNum= txtBillNo.Text; |
|
||||
_entity.InvoiceNum = txtInvoiceNumber.Text; |
|
||||
if (txtState.SelectedValue != null && !string.IsNullOrEmpty(txtState.SelectedValue)) |
|
||||
{ |
|
||||
_entity.State = int.Parse(txtState.SelectedValue); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
_entity.BillStateList = new List<int>() { |
|
||||
|
|
||||
(int)InvoiceState.Mail, |
|
||||
|
|
||||
(int)InvoiceState.FinanceReceive |
|
||||
}; |
|
||||
} |
|
||||
_entity.VendId = txtSupplierCode.Text; |
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
if (txtBillTime1.SelectedDate != null) |
|
||||
{ |
|
||||
_entity.BeginTime = (DateTime)txtBillTime1.SelectedDate; |
|
||||
} |
|
||||
if (txtBillTime2.SelectedDate != null) |
|
||||
{ |
|
||||
_entity.EndTime = (DateTime)txtBillTime2.SelectedDate; |
|
||||
} |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
p_action(ret.Result); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
protected void btnView_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length == 0) |
|
||||
{ |
|
||||
throw new Exception("请选择一行要操作的记录!"); |
|
||||
} |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../ErpExtend/SCP_INVOICE_VIEW_DETAIL.aspx?ID={0}", ID); |
|
||||
|
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
|
|
||||
} |
|
||||
//显示面板
|
|
||||
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../SupplierData/SCP_INVOICE_VIEW_DETAIL.aspx?ID={0}", ID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
protected void BTN_SEARCH_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void btnOutput_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<string> _ls = new List<string>(); |
|
||||
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls); |
|
||||
PageBase.DataSetToExcel(ds, "财务确认"); |
|
||||
} |
|
||||
|
|
||||
protected void btnSearch_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,276 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_VIEW { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// PageManager1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.PageManager PageManager1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarSeparator1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnRefresh 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnRefresh; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnView 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnView; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarSeparator2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarSeparator ToolbarSeparator2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarFill1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarFill ToolbarFill1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtKeyword 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtKeyword; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnSearch 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnSearch; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarText1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarText ToolbarText1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// extForm1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Form extForm1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillTime1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker txtBillTime1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillTime2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker txtBillTime2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierCode 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierCode; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtInvoiceNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtInvoiceNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnQuery 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnQuery; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label4 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label4; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_INVOICE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_INVOICE; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarSeparator3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarSeparator ToolbarSeparator3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarText2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarText ToolbarText2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddlGridPageSize 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddlGridPageSize; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,110 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_VIEW_DETAIL.aspx.cs" Inherits="SCP.ErpExtend.SCP_INVOICE_VIEW_DETAIL" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server"> |
|
||||
</f:ToolbarSeparator> |
|
||||
|
|
||||
<f:Button ID="btnEdit" runat="server" Text="修改备注" Enabled="false" OnClientClick="if(!confirm('是否要修改备注?'))return false;" Icon="ScriptSave" OnClick="btnEdit_Click"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel"></f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
</f:Form> |
|
||||
<f:GroupPanel runat="server" ID="gp1" Layout="HBox"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Rows> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="发票单号" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtBillTime" runat="server" Label="创建时间" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtExpressNumber" runat="server" Label="快递单号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtAmount" runat="server" Label="金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtTax" runat="server" Label="税率" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtTaxAmount" runat="server" Label="税额" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtTotal" runat="server" Label="开票金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="" MaxLength="100"> |
|
||||
</f:TextBox> |
|
||||
<f:Label ID="TextBox2" runat="server" Text=""> |
|
||||
</f:Label> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" IsDatabasePaging="True" AllowPaging="True" DataKeyNames="UID,PoBillNum,PoLineNum,AsnBillNum,PartCode,PartDesc1,Currency,Price,ContractPrice,BlancePrice,BeginTime,Qty,Remark" |
|
||||
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoBillNum"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="UID" Hidden="true" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="ProductCode" Width="80px" /> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单" ColumnID="UnitCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="80px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Price" Width="80px" /> |
|
||||
<f:BoundField SortField="Price" DataField="Price" HeaderText="单价" ColumnID="PlanQty" Width="80px" /> |
|
||||
<f:BoundField SortField="ContractPrice" runat="server" HeaderText="合同价格" Hidden="true" ColumnID="" DataField="ContractPrice" /> |
|
||||
<f:BoundField SortField="BlancePrice" runat="server" HeaderText="合同差额" Hidden="true" ColumnID="" DataField="BlancePrice" /> |
|
||||
<f:BoundField SortField="BeginTime" runat="server" HeaderText="要货日期" Hidden="true" ColumnID="" DataField="BeginTime" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="开票数量" ColumnID="OpenQty" Width="80px" /> |
|
||||
|
|
||||
<f:TemplateField HeaderText="备注" Width="160px"> |
|
||||
<ItemTemplate> |
|
||||
<asp:TextBox ID="txtLineMemo" runat="server" Width="150px" |
|
||||
Text='<%# Eval("Remark") %>' MaxLength="50"></asp:TextBox> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,232 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Common; |
|
||||
using CK.SCP.Controller; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Utils; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_VIEW_DETAIL : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
SetRoleRule(); |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
if (!CurrentUser.RoleList.Contains("财务人员")) |
|
||||
{ |
|
||||
Alert.Show("当前用户角色不能操作该模块!"); |
|
||||
return; |
|
||||
} |
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
private void SetRoleRule() |
|
||||
{ |
|
||||
IsPriceVisible(Grid1, "合同价格"); |
|
||||
IsPriceVisible(Grid1, "合同差额"); |
|
||||
IsPriceVisible(Grid1, "要货日期"); |
|
||||
} |
|
||||
private void GetInvoice() |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(new V_TB_INVOICE { InvcBillNum = id }, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _ls = ret.Result.ToList(); |
|
||||
if (_ls != null && _ls.Count > 0) |
|
||||
{ |
|
||||
var _Model = _ls[0]; |
|
||||
Session["invoice"] = _Model; |
|
||||
txtState.Text = _Model.State_DESC; |
|
||||
txtBillNo.Text = _Model.InvcBillNum; |
|
||||
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd"); |
|
||||
txtSupplierName.Text = _Model.VendName; |
|
||||
txtInvoiceNumber.Text = _Model.InvoiceNum; |
|
||||
txtExpressNumber.Text = _Model.ExpressNum; |
|
||||
txtAmount.Text = _Model.Amount.ToString(); |
|
||||
txtTotal.Text = _Model.Total != null ? _Model.Total.ToString() : string.Empty; |
|
||||
txtMemo.Text = _Model.Remark; |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
this.btnEdit.Enabled = true; |
|
||||
|
|
||||
|
|
||||
} |
|
||||
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
|
||||
{ |
|
||||
|
|
||||
string id = GetQueryValue("ID"); |
|
||||
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL(); |
|
||||
_tb.InvcBillNum = id; |
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
p_list(ret.Result); |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
Search(ret => |
|
||||
{ |
|
||||
Grid1.RecordCount = ret.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE_DETAIL>(ret, Grid1); |
|
||||
Grid1.DataSource = list; |
|
||||
Grid1.DataBind(); |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
protected void btnEdit_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _invoice = Session["invoice"] as V_TB_INVOICE; |
|
||||
var Memo = MyWebString.GetString(txtMemo.Text.Trim()); |
|
||||
_invoice.Remark = Memo; |
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
|
|
||||
if (_invoice != null) |
|
||||
{ |
|
||||
|
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
|
|
||||
|
|
||||
GridRow row = Grid1.Rows[i]; |
|
||||
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
|
||||
|
|
||||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|
||||
_entity.InvcBillNum = rowDataKeys[1] as string; |
|
||||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
|
||||
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
|
||||
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[4]); |
|
||||
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
|
||||
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
|
||||
|
|
||||
_entity.ContractPrice = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|
||||
_entity.BlancePrice = ConvertHelper.To<Decimal>(rowDataKeys[7]); |
|
||||
|
|
||||
_entity.Remark = txtLineMemo.Text; |
|
||||
|
|
||||
//把备注添加到TB_INVOICE、TB_INVOICE_DETAIL
|
|
||||
_ls.Add(_entity); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (_ls.Count > 0) |
|
||||
{ |
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice, _ls); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Alert.Show("发票备注修改成功!"); |
|
||||
|
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("更改记录数为零"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void btnOutput_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
V_TB_INVOICE_DETAIL inv = new V_TB_INVOICE_DETAIL(); |
|
||||
|
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
inv.PoBillNum = rowDataKeys[1].ToString();//订单
|
|
||||
if (rowDataKeys[2] != null) |
|
||||
{ |
|
||||
inv.PoLineNum = int.Parse(rowDataKeys[2].ToString());//订单行
|
|
||||
} |
|
||||
inv.AsnBillNum = rowDataKeys[3].ToString();//发货单
|
|
||||
inv.PartCode = rowDataKeys[4].ToString();//零件号
|
|
||||
inv.PartDesc1 = rowDataKeys[5].ToString();//零件名称
|
|
||||
inv.Currency = rowDataKeys[6].ToString();//币种
|
|
||||
if (rowDataKeys[7] != null) |
|
||||
{ |
|
||||
inv.Price = decimal.Parse(rowDataKeys[7].ToString());//单价
|
|
||||
} |
|
||||
if (rowDataKeys[8] != null) |
|
||||
{ |
|
||||
inv.ContractPrice = decimal.Parse(rowDataKeys[8].ToString());//合同价格
|
|
||||
} |
|
||||
if (rowDataKeys[9] != null) |
|
||||
{ |
|
||||
inv.BlancePrice = decimal.Parse(rowDataKeys[9].ToString());//合同差额
|
|
||||
} |
|
||||
if (rowDataKeys[10] != null) |
|
||||
{ |
|
||||
inv.BeginTime = DateTime.Parse(rowDataKeys[10].ToString());//要货日期
|
|
||||
} |
|
||||
if (rowDataKeys[11] != null) |
|
||||
{ |
|
||||
inv.Qty = decimal.Parse(rowDataKeys[11].ToString());//开票数量
|
|
||||
} |
|
||||
if (rowDataKeys[12] != null) |
|
||||
{ |
|
||||
inv.Remark = rowDataKeys[12].ToString();//备注
|
|
||||
} |
|
||||
|
|
||||
_ls.Add(inv); |
|
||||
} |
|
||||
|
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|
||||
{ |
|
||||
{ "PoBillNum", "订单" }, |
|
||||
{ "PoLineNum", "订单行" }, |
|
||||
{ "AsnBillNum", "发货单" }, |
|
||||
{ "PartCode", "零件号" }, |
|
||||
{ "PartDesc1", "零件名称" }, |
|
||||
{ "Currency", "币种" }, |
|
||||
{ "Price", "单价" }, |
|
||||
{ "ContractPrice", "合同价格" }, |
|
||||
{ "BlancePrice", "合同差额" }, |
|
||||
{ "BeginTime", "要货日期" }, |
|
||||
{ "Qty", "开票数量" }, |
|
||||
{ "Remark", "备注" } |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, _ls, "发票明细"); |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,222 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_VIEW_DETAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarSeparator3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarSeparator ToolbarSeparator3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnEdit 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnEdit; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtInvoiceNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtInvoiceNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtExpressNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtExpressNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTax 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTax; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTaxAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTaxAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTotal 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTotal; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TextBox2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label TextBox2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtLineMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.TextBox txtLineMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,250 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE.aspx.cs" Inherits="SCP.ErpExtend.SCP_RECEIVE" %> |
|
||||
|
|
||||
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
|
||||
<%@ Import Namespace="CK.SCP.Utils" %> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<%-- <f:Button ID="Button1" runat="server" EnablePostBack="True" Text="修改" Icon="Add">--%> |
|
||||
<%-- </f:Button>--%> |
|
||||
<%-- <f:Button ID="Button2" runat="server" EnablePostBack="True" Text="删除" Icon="Add">--%> |
|
||||
<%-- </f:Button>--%> |
|
||||
<f:Button ID="btnCheck" runat="server" EnablePostBack="True" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要将勾选的单据通过审核?'))return false;"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</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"> |
|
||||
<Items> |
|
||||
<f:DropDownList runat="server" ID="ddtype" Label="单据类型"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="收货单" Value="收货单" /> |
|
||||
<f:ListItem Text="退货单" Value="退货单" /> |
|
||||
</f:DropDownList> |
|
||||
|
|
||||
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="已收货" Value="0" /> |
|
||||
<f:ListItem Text="审核通过" Value="1" /> |
|
||||
<%-- <f:ListItem Text="已开票" Value="2" />--%> |
|
||||
</f:DropDownList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="单据号" /> |
|
||||
<f:TextBox ID="txtReceiveBill" runat="server" /> |
|
||||
<f:Label runat="server" Label="供应商" /> |
|
||||
<f:TextBox ID="txtSupplier" runat="server" /> |
|
||||
<f:Label runat="server" Label="订单号" /> |
|
||||
<f:TextBox ID="txtPO" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="发货单号" /> |
|
||||
<f:TextBox ID="AsnBillNum" runat="server" /> |
|
||||
<f:Label runat="server" Label="操作员" /> |
|
||||
<f:TextBox ID="OperName" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_OnClick" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid_V_TB_RECEIVE" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,RecvBillNum,ReceiveDetailList" IsDatabasePaging="True" AllowPaging="True" EnableRowDoubleClickEvent="True" OnRowDataBound="Grid_V_TB_RECEIVE_RowDataBound" |
|
||||
OnRowDoubleClick="Grid1_OnRowDoubleClick" SortDirection="DESC" SortField="ShipTime" EnableCheckBoxSelect="True" EnableCollapse="true" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True" OnPageIndexChange="Grid1_OnPageIndexChange"> |
|
||||
<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="10" Value="10" /> |
|
||||
<f:ListItem Text="20" Value="20" /> |
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:TemplateField > |
|
||||
<ItemTemplate> |
|
||||
<asp:Label ID="RowGrid1" runat="server"></asp:Label> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
|
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="State" ColumnID="" DataField="State" Hidden="true" /> |
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="单据号" ColumnID="" DataField="RecvBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="时间" ColumnID="" DataField="ShipTime" /> |
|
||||
<f:BoundField runat="server" HeaderText="地点" ColumnID="" DataField="Site_Desc" /> |
|
||||
<f:BoundField runat="server" HeaderText="类型" ColumnID="" DataField="BillType_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="审核员" ColumnID="" DataField="OperName" /> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="详情" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
<%-- <script src="../../res/js/jquery.min.js"></script> |
|
||||
|
|
||||
<script> |
|
||||
|
|
||||
var grid1 = '<%= Grid_V_TB_RECEIVE.ClientID %>'; |
|
||||
|
|
||||
F.ready(function () { |
|
||||
var grid1Cmp = F(grid1); |
|
||||
|
|
||||
// 展开行扩展列事件 |
|
||||
grid1Cmp.view.on('expandbody', function (rowNode, record, expandRow) { |
|
||||
|
|
||||
var tplEl = Ext.get(expandRow).query('.f-grid-tpl')[0]; |
|
||||
if (!Ext.String.trim(tplEl.innerHTML)) { |
|
||||
|
|
||||
var store = Ext.create('Ext.data.Store', { |
|
||||
fields: ['type', 'yuwen', 'shuxue', 'yingwen', 'wuli', 'huaxue'], |
|
||||
proxy: { |
|
||||
type: 'ajax', |
|
||||
url: '../../Handlers/ReceiveHandler.ashx?id=' + record.getId(), |
|
||||
reader: { |
|
||||
type: 'json', |
|
||||
root: 'data', |
|
||||
totalProperty: 'total' |
|
||||
} |
|
||||
}, |
|
||||
autoLoad: true, |
|
||||
listeners: { |
|
||||
load: function () { |
|
||||
rowExpandersDoLayout(); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
Ext.create('Ext.grid.Panel', { |
|
||||
renderTo: tplEl, |
|
||||
header: false, |
|
||||
border: true, |
|
||||
draggable: false, |
|
||||
enableDragDrop: false, |
|
||||
enableColumnResize: false, |
|
||||
cls: 'gridinrowexpander', |
|
||||
store: store, |
|
||||
columns: [{ |
|
||||
text: '', dataIndex: 'type', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '语文', dataIndex: 'yuwen', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '数学', dataIndex: 'shuxue', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '英文', dataIndex: 'yingwen', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '物理', dataIndex: 'wuli', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '化学', dataIndex: 'huaxue', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '平均成绩', flex: 1, sortable: false, menuDisabled: true, |
|
||||
renderer: function (value, metaData, record) { |
|
||||
var total = 0; |
|
||||
|
|
||||
var kemuList = ['yuwen', 'shuxue', 'yingwen', 'wuli', 'huaxue']; |
|
||||
$.each(kemuList, function (index, item) { |
|
||||
total += record.data[item]; |
|
||||
}); |
|
||||
|
|
||||
return Math.round(total / kemuList.length); |
|
||||
} |
|
||||
}] |
|
||||
}); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
// 折叠行扩展列事件 |
|
||||
grid1Cmp.view.on('collapsebody', function (rowNode, record, expandRow) { |
|
||||
rowExpandersDoLayout(); |
|
||||
}); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
|
|
||||
// 重新布局表格和行扩展列中的表格(解决出现纵向滚动条时的布局问题) |
|
||||
function rowExpandersDoLayout() { |
|
||||
var grid1Cmp = F(grid1); |
|
||||
|
|
||||
grid1Cmp.doLayout(); |
|
||||
|
|
||||
$('.x-grid-row:not(.x-grid-row-collapsed) .gridinrowexpander').each(function () { |
|
||||
var gridInside = F($(this).attr('id')); |
|
||||
gridInside.doLayout(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
</script>--%> |
|
||||
|
|
||||
|
|
||||
<script> |
|
||||
var basePath = '<%=ResolveUrl("~/")%>'; |
|
||||
|
|
||||
|
|
||||
function btnDetail_OnClick(id) { |
|
||||
parent.addExampleTab.apply(null, ['id', basePath + 'WarehouseData/ReceiveDetail.aspx?ID=' + 2, '明细', basePath + 'res/images/filetype/vs_aspx.png', undefined, true]); |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,287 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.AppBoxEntity; |
|
||||
using System.Text; |
|
||||
using Newtonsoft.Json; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_RECEIVE : PageBase |
|
||||
{ |
|
||||
|
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
} |
|
||||
} |
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
public void LoadData() |
|
||||
{ |
|
||||
|
|
||||
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString(); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _entity = new V_TB_RECEIVE(); |
|
||||
_entity.RecvBillNum=txtReceiveBill.Text;//单据号
|
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
//已收货:0,审核通过:1,已开票,2
|
|
||||
int istate = Convert.ToInt32(ddl.SelectedValue); |
|
||||
if (istate == 0) |
|
||||
{ |
|
||||
_entity.State = 0; |
|
||||
} |
|
||||
else if (istate == 1) |
|
||||
{ |
|
||||
_entity.State = 1; |
|
||||
} |
|
||||
else if (istate == 2) |
|
||||
{ |
|
||||
_entity.State = 2; |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
_entity.State = -1; |
|
||||
} |
|
||||
|
|
||||
if (!string.IsNullOrEmpty(ddtype.SelectedValue)) |
|
||||
{ |
|
||||
string istate = ddtype.SelectedValue; |
|
||||
if (istate == "收货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "收货单"; |
|
||||
} |
|
||||
else if (istate == "退货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "退货单"; |
|
||||
} |
|
||||
} |
|
||||
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
|
||||
{ |
|
||||
_entity.VendId = CurrentUser.VenderList[0]; |
|
||||
} |
|
||||
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
|
||||
{ |
|
||||
_entity.Site = CurrentUser.FactoryList[0]; |
|
||||
} |
|
||||
_entity.VendName = txtSupplier.Text;//供应商
|
|
||||
_entity.PoBillNum = txtPO.Text;//订单号
|
|
||||
_entity.AsnBillNum = AsnBillNum.Text;//发货单号
|
|
||||
_entity.OperName = OperName.Text;//操作员
|
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.RecordCount =ret.Result.Count(); |
|
||||
var _list= SortAndPage(ret.Result, Grid_V_TB_RECEIVE); |
|
||||
Grid_V_TB_RECEIVE.DataSource =_list; |
|
||||
Grid_V_TB_RECEIVE.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
BindData(); |
|
||||
} |
|
||||
protected void Grid1_OnRowDoubleClick(object sender, GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); |
|
||||
string STATE = Grid_V_TB_RECEIVE.Rows[e.RowIndex].Values[0].ToString(); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(STATE)) |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
if (STATE != "0" && STATE != "1" && STATE != "2") |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
|
|
||||
string url = String.Format("../ErpExtend/SCP_RECEIVE_DETAIL.aspx?ID={0}&STATE={1}", ID, STATE); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
|
|
||||
//明细
|
|
||||
protected void btnDetail_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要查看明细的单据")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (listids.Count > 1) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("只能查看一条单据的明细")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
string STATE = Grid_V_TB_RECEIVE.SelectedRow.Values[0].ToString(); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(STATE)) |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
if (STATE != "0" && STATE != "1" && STATE != "2") |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
|
|
||||
string roleID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); |
|
||||
string url = String.Format("../ErpExtend/SCP_RECEIVE_DETAIL.aspx?ID={0}&STATE={1}", roleID, STATE); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
//查询
|
|
||||
protected void BtnSearch_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
//审核通过
|
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
ICollection<Role> Roles = CurrentUser.Roles; |
|
||||
string strUserName = CurrentUser.Name; |
|
||||
|
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要审核的单据")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var _ls = new List<string>(); |
|
||||
int[] selections = Grid_V_TB_RECEIVE.SelectedRowIndexArray; |
|
||||
for (int i = 0, count = Grid_V_TB_RECEIVE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
if (selections.Contains(i)) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_RECEIVE.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
} |
|
||||
var ret = SCP_RECIVECE_CONTROLLER.Save_TB_RECEIVE_STATE(_ls, ReceiveState.Check, strUserName,CurrentUser.UsedDomain); |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("审核成功")); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageIndex = e.NewPageIndex; |
|
||||
BindData(); |
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
|
|
||||
//var _entity = new V_TB_RECEIVE();
|
|
||||
//_entity.RecvBillNum = txtReceiveBill.Text;
|
|
||||
//if (!string.IsNullOrEmpty(ddl.SelectedValue))
|
|
||||
//{
|
|
||||
// _entity.State = Convert.ToInt32(ddl.SelectedValue);
|
|
||||
//}
|
|
||||
//else
|
|
||||
//{
|
|
||||
// _entity.State = -1;
|
|
||||
//}
|
|
||||
//_entity.PoBillNum = txtPO.Text;
|
|
||||
//_entity.AsnBillNum = AsnBillNum.Text;
|
|
||||
//_entity.OperName = OperName.Text;
|
|
||||
//if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0)
|
|
||||
//{
|
|
||||
// _entity.VendId = CurrentUser.VenderList[0];
|
|
||||
//}
|
|
||||
//if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
|
|
||||
//{
|
|
||||
// _entity.Site = CurrentUser.FactoryList[0];
|
|
||||
//}
|
|
||||
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_entity, (ret) =>
|
|
||||
//{
|
|
||||
// if (ret.State == ReturnStatus.Succeed)
|
|
||||
// {
|
|
||||
// Dictionary<string, string> cellheader = new Dictionary<string, string>
|
|
||||
// {
|
|
||||
// { "State_DESC", "状态" },
|
|
||||
// //{ "AsnBillNum", "单据类型" },
|
|
||||
// { "VendName", "供应商" },
|
|
||||
// { "VendId", "供应商编码" },
|
|
||||
// { "RecvBillNum", "单据号" },
|
|
||||
// { "PoBillNum", "订单号" },
|
|
||||
// { "AsnBillNum", "发货单号" },
|
|
||||
// { "ShipTime", "时间" },
|
|
||||
// { "Site_Desc", "地点" },
|
|
||||
// { "BillType_DESC", "类型" },
|
|
||||
// { "OperName", "审核员" },
|
|
||||
// { "Remark", "备注" },
|
|
||||
// };
|
|
||||
|
|
||||
// string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细");
|
|
||||
// }
|
|
||||
//});
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_RECEIVE_RowDataBound(object sender, GridRowEventArgs e) |
|
||||
{ |
|
||||
//object[] rowDataKeys = Grid_V_TB_RECEIVE.DataKeys[e.RowIndex];
|
|
||||
//string _recNum = rowDataKeys[2].ToString();
|
|
||||
// StringBuilder _buffer = new StringBuilder();
|
|
||||
// System.Web.UI.WebControls.Label _content = (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE.Rows[e.RowIndex].FindControl("RowGrid1");
|
|
||||
// if (_content != null)
|
|
||||
// {
|
|
||||
// _buffer.Append("<table><tr><td>订单行</td><td>零件号</td><td>零件名称</td><td>数量</td><td>单位</td></tr>");
|
|
||||
// var _list = JsonConvert.DeserializeObject<List<V_TB_RECEIVE_DETAIL>>(_recNum);
|
|
||||
// _list.ForEach(p =>
|
|
||||
// {
|
|
||||
// _buffer.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td></tr>"
|
|
||||
// , p.PoLine, p.PartCode, p.PartDesc1, p.Qty, p.PoUnit);
|
|
||||
// });
|
|
||||
// _buffer.Append("</talbe>");
|
|
||||
// _content.Text = _buffer.ToString();
|
|
||||
// }
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,231 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_RECEIVE { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Button3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button Button3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheck 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheck; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnDetail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnDetail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddtype 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddtype; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddl 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddl; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveBill 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveBill; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplier 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplier; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// AsnBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox AsnBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// OperName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox OperName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BtnSearch 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BtnSearch; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_RECEIVE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_RECEIVE; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// RowGrid1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.Label RowGrid1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,103 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_DETAIL.aspx.cs" Inherits="SCP.ErpExtend.SCP_RECEIVE_DETAIL" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<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="btnCheck" runat="server" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要审核通过?'))return false;" Hidden="True" EnablePostBack="True"> |
|
||||
</f:Button>--%> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Items> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="单据号" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtShipBillNo" runat="server" Label="发货单" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtPlanBillNo" runat="server" Label="订单号" Text="" Readonly="true" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label runat="server" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtDeliveryAddress" runat="server" Label="地址" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtReceiveTime" runat="server" Label="时间" Text=""> |
|
||||
</f:TextBox> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtUserName" runat="server" Label="审核员" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label ID="TextBox2" runat="server" Text=""> |
|
||||
</f:Label> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Items> |
|
||||
</f:Form> |
|
||||
<f:Toolbar runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill runat="server" /> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:Grid ID="Grid_V_TB_RECEIVE_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="PartCode" SortDirection="DESC" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField SortField="RecvBillNum" DataField="RecvBillNum" HeaderText="单据号" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单号" ColumnID="ProductCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单号" ColumnID="ProductName" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLine" DataField="PoLine" HeaderText="订单行" ColumnID="UnitCode" Width="60px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="100px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Unit" DataField="Unit" HeaderText="单位" ColumnID="Price" Width="80px" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="数量" ColumnID="PlanQty" Width="60px" /> |
|
||||
<f:BoundField SortField="ShipTime" DataField="ShipTime" HeaderText="时间" ColumnID="ShipQty" Width="60px" DataFormatString="{0:yy-MM-dd}"/> |
|
||||
<f:BoundField SortField="Remark" DataField="Remark" HeaderText="备注" ColumnID="ReceiveQty" Width="60px" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,121 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
|
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_RECEIVE_DETAIL : PageBase |
|
||||
{ |
|
||||
|
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void LoadData() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
if (GetQueryValue("STATE") != null) |
|
||||
{ |
|
||||
_receive.State = int.Parse(GetQueryValue("STATE")); |
|
||||
} |
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => { |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _rec = ret.Result.FirstOrDefault(); |
|
||||
txtState.Text = _rec.State_DESC; |
|
||||
txtBillNo.Text = _rec.RecvBillNum; |
|
||||
txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd"); |
|
||||
txtShipBillNo.Text = _rec.AsnBillNum; |
|
||||
txtPlanBillNo.Text = _rec.PoBillNum; |
|
||||
txtUserName.Text = _rec.OperName; |
|
||||
txtSupplierName.Text = _rec.VendName; |
|
||||
txtMemo.Text = _rec.Remark; |
|
||||
|
|
||||
txtDeliveryAddress.Text = _rec.Site_Desc; |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.RecordCount = ret.Result.Count(); |
|
||||
var _ls = SortAndPage(ret.Result, Grid_V_TB_RECEIVE_DETAIL); |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataSource = _ls; |
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
//try
|
|
||||
//{
|
|
||||
// string id = GetQueryValue("ID");
|
|
||||
// _Model = ReceiveDetailController.GetlistByBillNum(id);
|
|
||||
// bool flag = ReceiveDetailController.UpdateReceive(_Model);
|
|
||||
// if (flag)
|
|
||||
// PageContext.Refresh();
|
|
||||
//}
|
|
||||
//catch (Exception ex)
|
|
||||
//{
|
|
||||
// Alert.ShowInTop(ex.Message);
|
|
||||
//}
|
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> { |
|
||||
{ "RecvBillNum", "单据号" }, |
|
||||
{ "AsnBillNum", "发货单号" }, |
|
||||
{ "PoBillNum", "订单号" }, |
|
||||
{ "PoLine", "订单行" }, |
|
||||
{ "PartCode", "零件号" }, |
|
||||
{ "PartDesc1", "零件名称" }, |
|
||||
{ "Unit", "单位" }, |
|
||||
{ "Qty", "数量" }, |
|
||||
//{ "ReceivedQty", "已开票数量" },
|
|
||||
{ "ShipTime", "时间" }, |
|
||||
{ "Remark", "备注" }, |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细"); |
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,177 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_RECEIVE_DETAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </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>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtShipBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtShipBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPlanBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPlanBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtDeliveryAddress 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtDeliveryAddress; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtUserName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtUserName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TextBox2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label TextBox2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_RECEIVE_DETAIL 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_RECEIVE_DETAIL; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,102 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_DETAIL_VIEW.aspx.cs" Inherits="SCP.ErpExtend.SCP_RECEIVE_DETAIL_VIEW" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
|
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Items> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="单据号" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtShipBillNo" runat="server" Label="发货单" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtPlanBillNo" runat="server" Label="订单号" Text="" Readonly="true" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label runat="server" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
|
|
||||
|
|
||||
</Items> |
|
||||
</f:Form> |
|
||||
<f:Toolbar runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill runat="server" /> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:Grid ID="Grid_V_TB_RECEIVE_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="PartCode" SortDirection="DESC" |
|
||||
EnableRowSelectEvent="True" AutoScroll="True" > |
|
||||
<Columns> |
|
||||
|
|
||||
<%--<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" />--%> |
|
||||
<f:TemplateField HeaderText="可用开票数量" Width="70px" ColumnID="Total"> |
|
||||
<ItemTemplate> |
|
||||
<asp:label ID="Total1" runat="server" Width="60px" Enabled="false" Text='<%# Eval("State").ToString()=="1"?"审核通过":"已收货" %>' ></asp:label> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
<f:BoundField runat="server" HeaderText="单据号" ColumnID="" DataField="RecvBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
|
||||
<f:BoundField SortField="PoLine" DataField="PoLine" HeaderText="订单行" ColumnID="UnitCode" Width="60px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="100px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="数量" ColumnID="PlanQty" Width="60px" /> |
|
||||
<f:BoundField SortField="ShipTime" DataField="ShipTime" HeaderText="时间" ColumnID="ShipQty" Width="60px" DataFormatString="{0:yy-MM-dd}"/> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField SortField="Unit" DataField="Unit" HeaderText="单位" ColumnID="Price" Width="80px" /> |
|
||||
|
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,128 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using System.Data; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_RECEIVE_DETAIL_VIEW : PageBase |
|
||||
{ |
|
||||
|
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void LoadData() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
if (GetQueryValue("STATE") != null) |
|
||||
{ |
|
||||
_receive.State = int.Parse(GetQueryValue("STATE")); |
|
||||
} |
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_GG_List(_receive, (ret) => { |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _rec = ret.Result.FirstOrDefault(); |
|
||||
txtState.Text = _rec.State_DESC; |
|
||||
txtBillNo.Text = _rec.RecvBillNum; |
|
||||
|
|
||||
txtShipBillNo.Text = _rec.AsnBillNum; |
|
||||
txtPlanBillNo.Text = _rec.PoBillNum; |
|
||||
|
|
||||
txtSupplierName.Text = _rec.VendName; |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
if (string.IsNullOrEmpty(Request["ID"].Trim())) |
|
||||
{ |
|
||||
if (!string.IsNullOrEmpty("PartCode")) |
|
||||
{ |
|
||||
_receive.PartCode = Request["PartCode"]; |
|
||||
} |
|
||||
if (!string.IsNullOrEmpty(Request["State"])) |
|
||||
{ |
|
||||
_receive.State = int.Parse(Request["State"]); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.RecordCount = ret.Result.Count(); |
|
||||
var _ls = SortAndPage(ret.Result, Grid_V_TB_RECEIVE_DETAIL); |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataSource = _ls; |
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
try |
|
||||
{ |
|
||||
|
|
||||
} |
|
||||
catch (Exception ex) |
|
||||
{ |
|
||||
Alert.ShowInTop(ex.Message); |
|
||||
} |
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
List<string> _ls = new List<string>(); |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
_ls = ret.Result.Select(p => p.RecvBillNum).ToList(); |
|
||||
DataSet ds = null; |
|
||||
if (CurrentUser.VenderList.Count > 0) |
|
||||
{ |
|
||||
ds = SCP_RECIVECE_CONTROLLER.GET_RECEIVE_EXECEL(_ls, CurrentUser.UsedDomain, CurrentUser.VenderList.FirstOrDefault()); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
ds = SCP_RECIVECE_CONTROLLER.GET_RECEIVE_EXECEL(_ls, CurrentUser.UsedDomain); |
|
||||
} |
|
||||
|
|
||||
PageBase.DataSetToExcel(ds, "收货退货单"); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,141 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_RECEIVE_DETAIL_VIEW { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </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>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtShipBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtShipBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPlanBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPlanBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_RECEIVE_DETAIL 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_RECEIVE_DETAIL; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Total1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.Label Total1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,243 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_VIEW.aspx.cs" Inherits="SCP.ErpExtend.SCP_RECEIVE_VIEW" %> |
|
||||
|
|
||||
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
|
||||
<%@ Import Namespace="CK.SCP.Utils" %> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<%-- <f:Button ID="Button1" runat="server" EnablePostBack="True" Text="修改" Icon="Add">--%> |
|
||||
<%-- </f:Button>--%> |
|
||||
<%-- <f:Button ID="Button2" runat="server" EnablePostBack="True" Text="删除" Icon="Add">--%> |
|
||||
<%-- </f:Button>--%> |
|
||||
|
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</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"> |
|
||||
<Items> |
|
||||
<f:DropDownList runat="server" ID="ddtype" Label="单据类型"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="收货单" Value="收货单" /> |
|
||||
<f:ListItem Text="退货单" Value="退货单" /> |
|
||||
</f:DropDownList> |
|
||||
|
|
||||
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="已收货" Value="0" /> |
|
||||
<f:ListItem Text="审核通过" Value="1" /> |
|
||||
<%-- <f:ListItem Text="已开票" Value="2" />--%> |
|
||||
</f:DropDownList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="单据号" /> |
|
||||
<f:TextBox ID="txtReceiveBill" runat="server" /> |
|
||||
<f:Label runat="server" Label="供应商" /> |
|
||||
<f:TextBox ID="txtSupplier" runat="server" /> |
|
||||
<f:Label runat="server" Label="订单号" /> |
|
||||
<f:TextBox ID="txtPO" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="发货单号" /> |
|
||||
<f:TextBox ID="AsnBillNum" runat="server" /> |
|
||||
<f:Label runat="server" Label="操作员" /> |
|
||||
<f:TextBox ID="OperName" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_OnClick" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
|
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid_V_TB_RECEIVE" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,RecvBillNum,ReceiveDetailList" IsDatabasePaging="True" AllowPaging="True" EnableRowDoubleClickEvent="True" OnRowDataBound="Grid_V_TB_RECEIVE_RowDataBound" |
|
||||
OnRowDoubleClick="Grid1_OnRowDoubleClick" SortDirection="DESC" SortField="ShipTime" EnableCheckBoxSelect="True" EnableCollapse="true" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True" OnPageIndexChange="Grid1_OnPageIndexChange"> |
|
||||
<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="10" Value="10" /> |
|
||||
<f:ListItem Text="20" Value="20" /> |
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="State" ColumnID="" DataField="State" Hidden="true" /> |
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="单据号" ColumnID="" DataField="RecvBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="时间" ColumnID="" DataField="ShipTime" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="类型" ColumnID="" DataField="BillType_DESC" /> |
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="详情" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
<%-- <script src="../../res/js/jquery.min.js"></script> |
|
||||
|
|
||||
<script> |
|
||||
|
|
||||
var grid1 = '<%= Grid_V_TB_RECEIVE.ClientID %>'; |
|
||||
|
|
||||
F.ready(function () { |
|
||||
var grid1Cmp = F(grid1); |
|
||||
|
|
||||
// 展开行扩展列事件 |
|
||||
grid1Cmp.view.on('expandbody', function (rowNode, record, expandRow) { |
|
||||
|
|
||||
var tplEl = Ext.get(expandRow).query('.f-grid-tpl')[0]; |
|
||||
if (!Ext.String.trim(tplEl.innerHTML)) { |
|
||||
|
|
||||
var store = Ext.create('Ext.data.Store', { |
|
||||
fields: ['type', 'yuwen', 'shuxue', 'yingwen', 'wuli', 'huaxue'], |
|
||||
proxy: { |
|
||||
type: 'ajax', |
|
||||
url: '../../Handlers/ReceiveHandler.ashx?id=' + record.getId(), |
|
||||
reader: { |
|
||||
type: 'json', |
|
||||
root: 'data', |
|
||||
totalProperty: 'total' |
|
||||
} |
|
||||
}, |
|
||||
autoLoad: true, |
|
||||
listeners: { |
|
||||
load: function () { |
|
||||
rowExpandersDoLayout(); |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
Ext.create('Ext.grid.Panel', { |
|
||||
renderTo: tplEl, |
|
||||
header: false, |
|
||||
border: true, |
|
||||
draggable: false, |
|
||||
enableDragDrop: false, |
|
||||
enableColumnResize: false, |
|
||||
cls: 'gridinrowexpander', |
|
||||
store: store, |
|
||||
columns: [{ |
|
||||
text: '', dataIndex: 'type', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '语文', dataIndex: 'yuwen', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '数学', dataIndex: 'shuxue', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '英文', dataIndex: 'yingwen', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '物理', dataIndex: 'wuli', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '化学', dataIndex: 'huaxue', sortable: false, menuDisabled: true, width: 80 |
|
||||
}, { |
|
||||
text: '平均成绩', flex: 1, sortable: false, menuDisabled: true, |
|
||||
renderer: function (value, metaData, record) { |
|
||||
var total = 0; |
|
||||
|
|
||||
var kemuList = ['yuwen', 'shuxue', 'yingwen', 'wuli', 'huaxue']; |
|
||||
$.each(kemuList, function (index, item) { |
|
||||
total += record.data[item]; |
|
||||
}); |
|
||||
|
|
||||
return Math.round(total / kemuList.length); |
|
||||
} |
|
||||
}] |
|
||||
}); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
// 折叠行扩展列事件 |
|
||||
grid1Cmp.view.on('collapsebody', function (rowNode, record, expandRow) { |
|
||||
rowExpandersDoLayout(); |
|
||||
}); |
|
||||
|
|
||||
}); |
|
||||
|
|
||||
|
|
||||
// 重新布局表格和行扩展列中的表格(解决出现纵向滚动条时的布局问题) |
|
||||
function rowExpandersDoLayout() { |
|
||||
var grid1Cmp = F(grid1); |
|
||||
|
|
||||
grid1Cmp.doLayout(); |
|
||||
|
|
||||
$('.x-grid-row:not(.x-grid-row-collapsed) .gridinrowexpander').each(function () { |
|
||||
var gridInside = F($(this).attr('id')); |
|
||||
gridInside.doLayout(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
</script>--%> |
|
||||
|
|
||||
|
|
||||
<script> |
|
||||
var basePath = '<%=ResolveUrl("~/")%>'; |
|
||||
|
|
||||
|
|
||||
function btnDetail_OnClick(id) { |
|
||||
parent.addExampleTab.apply(null, ['id', basePath + 'WarehouseData/ReceiveDetail.aspx?ID=' + 2, '明细', basePath + 'res/images/filetype/vs_aspx.png', undefined, true]); |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,282 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.AppBoxEntity; |
|
||||
using System.Text; |
|
||||
using Newtonsoft.Json; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_RECEIVE_VIEW : PageBase |
|
||||
{ |
|
||||
|
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
} |
|
||||
} |
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
public void LoadData() |
|
||||
{ |
|
||||
|
|
||||
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString(); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _entity = new V_TB_RECEIVE(); |
|
||||
_entity.RecvBillNum=txtReceiveBill.Text;//单据号
|
|
||||
|
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
//已收货:0,审核通过:1,已开票,2
|
|
||||
int istate = Convert.ToInt32(ddl.SelectedValue); |
|
||||
if (istate == 0) |
|
||||
{ |
|
||||
_entity.State = 0; |
|
||||
} |
|
||||
else if (istate == 1) |
|
||||
{ |
|
||||
_entity.State = 1; |
|
||||
} |
|
||||
else if (istate == 2) |
|
||||
{ |
|
||||
_entity.State = 2; |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
_entity.State = -1; |
|
||||
} |
|
||||
|
|
||||
if (!string.IsNullOrEmpty(ddtype.SelectedValue)) |
|
||||
{ |
|
||||
string istate = ddtype.SelectedValue; |
|
||||
if (istate == "收货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "收货单"; |
|
||||
} |
|
||||
else if (istate == "退货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "退货单"; |
|
||||
} |
|
||||
} |
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
_entity.UserInVendIds = CurrentUser.VenderList; |
|
||||
_entity.VendName = txtSupplier.Text;//供应商
|
|
||||
_entity.PoBillNum = txtPO.Text;//订单号
|
|
||||
_entity.AsnBillNum = AsnBillNum.Text;//发货单号
|
|
||||
_entity.OperName = OperName.Text;//操作员
|
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_GG_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.RecordCount =ret.Result.Count(); |
|
||||
var _list= SortAndPage(ret.Result, Grid_V_TB_RECEIVE); |
|
||||
Grid_V_TB_RECEIVE.DataSource =_list; |
|
||||
Grid_V_TB_RECEIVE.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
BindData(); |
|
||||
} |
|
||||
protected void Grid1_OnRowDoubleClick(object sender, GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); |
|
||||
string STATE = Grid_V_TB_RECEIVE.Rows[e.RowIndex].Values[0].ToString(); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(STATE)) |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
if (STATE != "0" && STATE != "1" && STATE != "2") |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
|
|
||||
string url = String.Format("../ErpExtend/SCP_RECEIVE_DETAIL_VIEW.aspx?ID={0}&STATE={1}", ID, STATE); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
|
|
||||
//明细
|
|
||||
protected void btnDetail_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要查看明细的单据")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (listids.Count > 1) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("只能查看一条单据的明细")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
string STATE = Grid_V_TB_RECEIVE.SelectedRow.Values[0].ToString(); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(STATE)) |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
if (STATE != "0" && STATE != "1" && STATE != "2") |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
|
|
||||
string roleID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); |
|
||||
string url = String.Format("../ErpExtend/SCP_RECEIVE_DETAIL.aspx?ID={0}&STATE={1}", roleID, STATE); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
//查询
|
|
||||
protected void BtnSearch_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
//审核通过
|
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
ICollection<Role> Roles = CurrentUser.Roles; |
|
||||
string strUserName = CurrentUser.Name; |
|
||||
|
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要审核的单据")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var _ls = new List<string>(); |
|
||||
int[] selections = Grid_V_TB_RECEIVE.SelectedRowIndexArray; |
|
||||
for (int i = 0, count = Grid_V_TB_RECEIVE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
if (selections.Contains(i)) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_RECEIVE.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
} |
|
||||
var ret = SCP_RECIVECE_CONTROLLER.Save_TB_RECEIVE_STATE(_ls, ReceiveState.Check, strUserName, CurrentUser.UsedDomain); |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("审核成功")); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageIndex = e.NewPageIndex; |
|
||||
BindData(); |
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
|
|
||||
var _entity = new V_TB_RECEIVE(); |
|
||||
_entity.RecvBillNum = txtReceiveBill.Text; |
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
_entity.State = Convert.ToInt32(ddl.SelectedValue); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
_entity.State = -1; |
|
||||
} |
|
||||
_entity.PoBillNum = txtPO.Text; |
|
||||
_entity.AsnBillNum = AsnBillNum.Text; |
|
||||
_entity.OperName = OperName.Text; |
|
||||
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
|
||||
{ |
|
||||
_entity.VendId = CurrentUser.VenderList[0]; |
|
||||
} |
|
||||
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
|
||||
{ |
|
||||
_entity.Site = CurrentUser.FactoryList[0]; |
|
||||
} |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|
||||
{ |
|
||||
{ "State_DESC", "状态" }, |
|
||||
//{ "AsnBillNum", "单据类型" },
|
|
||||
{ "VendName", "供应商" }, |
|
||||
{ "VendId", "供应商编码" }, |
|
||||
{ "RecvBillNum", "单据号" }, |
|
||||
{ "PoBillNum", "订单号" }, |
|
||||
{ "AsnBillNum", "发货单号" }, |
|
||||
{ "ShipTime", "时间" }, |
|
||||
{ "Site_Desc", "地点" }, |
|
||||
{ "BillType_DESC", "类型" }, |
|
||||
{ "OperName", "审核员" }, |
|
||||
{ "Remark", "备注" }, |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细"); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_RECEIVE_RowDataBound(object sender, GridRowEventArgs e) |
|
||||
{ |
|
||||
//object[] rowDataKeys = Grid_V_TB_RECEIVE.DataKeys[e.RowIndex];
|
|
||||
//string _recNum = rowDataKeys[2].ToString();
|
|
||||
// StringBuilder _buffer = new StringBuilder();
|
|
||||
// System.Web.UI.WebControls.Label _content = (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE.Rows[e.RowIndex].FindControl("RowGrid1");
|
|
||||
// if (_content != null)
|
|
||||
// {
|
|
||||
// _buffer.Append("<table><tr><td>订单行</td><td>零件号</td><td>零件名称</td><td>数量</td><td>单位</td></tr>");
|
|
||||
// var _list = JsonConvert.DeserializeObject<List<V_TB_RECEIVE_DETAIL>>(_recNum);
|
|
||||
// _list.ForEach(p =>
|
|
||||
// {
|
|
||||
// _buffer.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><td>{4}</td></tr>"
|
|
||||
// , p.PoLine, p.PartCode, p.PartDesc1, p.Qty, p.PoUnit);
|
|
||||
// });
|
|
||||
// _buffer.Append("</talbe>");
|
|
||||
// _content.Text = _buffer.ToString();
|
|
||||
// }
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,213 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_RECEIVE_VIEW { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Button3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button Button3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnDetail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnDetail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddtype 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddtype; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddl 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddl; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveBill 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveBill; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplier 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplier; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// AsnBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox AsnBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// OperName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox OperName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BtnSearch 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BtnSearch; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_RECEIVE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_RECEIVE; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,136 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_REJECT.aspx.cs" Inherits="SCP.ErpExtend.SCP_REJECT" %> |
|
||||
|
|
||||
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
|
||||
<%@ Import Namespace="CK.SCP.Utils" %> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Add"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<%-- <f:Button ID="Button1" runat="server" EnablePostBack="True" Text="修改" Icon="Add">--%> |
|
||||
<%-- </f:Button>--%> |
|
||||
<%-- <f:Button ID="Button2" runat="server" EnablePostBack="True" Text="删除" Icon="Add">--%> |
|
||||
<%-- </f:Button>--%> |
|
||||
<f:Button ID="btnCheck" runat="server" EnablePostBack="True" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要将勾选的单据通过审核?'))return false;"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</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"> |
|
||||
<Items> |
|
||||
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="已退货" Value="0" /> |
|
||||
<f:ListItem Text="审核通过" Value="1" /> |
|
||||
</f:DropDownList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="收货单号" /> |
|
||||
<f:TextBox ID="txtReceiveBill" runat="server" /> |
|
||||
<f:Label runat="server" Label="供应商" /> |
|
||||
<f:TextBox ID="txtSupplier" runat="server" /> |
|
||||
<f:Label runat="server" Label="订单号" /> |
|
||||
<f:TextBox ID="txtPO" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="发货单号" /> |
|
||||
<f:TextBox ID="AsnBillNum" runat="server" /> |
|
||||
<f:Label runat="server" Label="操作员" /> |
|
||||
<f:TextBox ID="OperName" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_OnClick" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid_V_TB_REJECT" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,RjctBillNum" IsDatabasePaging="True" AllowPaging="True" EnableRowDoubleClickEvent="True" |
|
||||
OnRowDoubleClick="Grid1_OnRowDoubleClick" SortDirection="DESC" SortField="RjctBillNum" EnableCheckBoxSelect="True" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True" OnPageIndexChange="Grid1_OnPageIndexChange" OnRowDataBound="Grid_V_TB_REJECT_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="10" Value="10" /> |
|
||||
<f:ListItem Text="20" Value="20" /> |
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="退货单号" ColumnID="" DataField="RjctBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="发货时间" ColumnID="" DataField="ShipTime" /> |
|
||||
<f:BoundField runat="server" HeaderText="发货地点" ColumnID="" DataField="Site_Desc" /> |
|
||||
<f:BoundField runat="server" HeaderText="审核员" ColumnID="" DataField="OperName" /> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="收货详情" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
<script> |
|
||||
var basePath = '<%=ResolveUrl("~/")%>'; |
|
||||
|
|
||||
|
|
||||
function btnDetail_OnClick(id) { |
|
||||
parent.addExampleTab.apply(null, ['id', basePath + 'WarehouseData/ReceiveDetail.aspx?ID=' + 2, '收货明细', basePath + 'res/images/filetype/vs_aspx.png', undefined, true]); |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,198 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_REJECT : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void LoadData() |
|
||||
{ |
|
||||
Grid_V_TB_REJECT.PageSize = ConfigHelper.PageSize; |
|
||||
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString(); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _entity = new V_TB_REJECT(); |
|
||||
_entity.RjctBillNum = txtReceiveBill.Text; |
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
_entity.State = Convert.ToInt32(ddl.SelectedValue); |
|
||||
} |
|
||||
_entity.PoBillNum = txtPO.Text; |
|
||||
_entity.AsnBillNum = AsnBillNum.Text; |
|
||||
_entity.OperName = OperName.Text; |
|
||||
|
|
||||
SCP_REJECT_CONTROLLER.Get_V_TB_REJECT_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Grid_V_TB_REJECT.RecordCount = ret.Result.Count(); |
|
||||
var _list = SortAndPage(ret.Result, Grid_V_TB_REJECT); |
|
||||
Grid_V_TB_REJECT.DataSource = _list; |
|
||||
Grid_V_TB_REJECT.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
} |
|
||||
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_REJECT.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
BindData(); |
|
||||
} |
|
||||
protected void Grid1_OnRowDoubleClick(object sender, GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_REJECT, 1); |
|
||||
string url = String.Format("../WarehouseData/SCP_REJECT_DETAIL.aspx?ID={0}", ID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
|
|
||||
//明细
|
|
||||
protected void btnDetail_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
string roleID = GetSelectedDataKey(Grid_V_TB_REJECT, 1); |
|
||||
string url = String.Format("../WarehouseData/SCP_REJECT_DETAIL.aspx?ID={0}", roleID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
//查询
|
|
||||
protected void BtnSearch_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
//审核通过
|
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_REJECT); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要审核的单据")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
var _ls = new List<string>(); |
|
||||
int[] selections = Grid_V_TB_REJECT.SelectedRowIndexArray; |
|
||||
for (int i = 0, count = Grid_V_TB_REJECT.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
if (selections.Contains(i)) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_REJECT.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
} |
|
||||
var ret = SCP_REJECT_CONTROLLER.Save_TB_REJECT_STATE(_ls, RejectState.Check); |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("审核成功")); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_REJECT.PageIndex = e.NewPageIndex; |
|
||||
BindData(); |
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
//string billnum = GetQueryValue("ID");
|
|
||||
|
|
||||
//IQueryable<V_REJECTDetail> q = SCPDB.V_ReceiveDetail.Where(p => p.BillNum == billnum);
|
|
||||
|
|
||||
//// 排列和数据库分页
|
|
||||
//var list = SortAndPage<V_REJECTDetail>(q, Grid_V_TB_REJECT).ToList();
|
|
||||
|
|
||||
//// 2.设置单元格抬头
|
|
||||
//// key:实体对象属性名称,可通过反射获取值
|
|
||||
//// value:Excel列的名称
|
|
||||
//Dictionary<string, string> cellheader = new Dictionary<string, string> {
|
|
||||
// { "BillNum", "状态" },
|
|
||||
// { "AsnBillNum", "单据类型" },
|
|
||||
// { "VendName", "供应商" },
|
|
||||
// { "BillNum", "收货单号" },
|
|
||||
// { "PoBillNum", "订单号" },
|
|
||||
// { "AsnBillNum", "发货单号" },
|
|
||||
// { "ReceiveTime", "收货时间" },
|
|
||||
// { "DeliveryAddress", "收货地点" },
|
|
||||
// { "OperName", "审核员" },
|
|
||||
// { "Remark", "备注" },
|
|
||||
//};
|
|
||||
|
|
||||
//string url = EntityListToExcel2003(cellheader, list, "收货审核明细");
|
|
||||
var _entity = new V_TB_RECEIVE(); |
|
||||
_entity.RecvBillNum = txtReceiveBill.Text; |
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
_entity.State = Convert.ToInt32(ddl.SelectedValue); |
|
||||
} |
|
||||
_entity.PoBillNum = txtPO.Text; |
|
||||
_entity.AsnBillNum = AsnBillNum.Text; |
|
||||
_entity.OperName = OperName.Text; |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|
||||
{ |
|
||||
{ "State", "状态" }, |
|
||||
//{ "AsnBillNum", "单据类型" },
|
|
||||
{ "VendName", "供应商" }, |
|
||||
{ "RjctBillNum", "退货单号" }, |
|
||||
{ "PoBillNum", "订单号" }, |
|
||||
{ "AsnBillNum", "发货单号" }, |
|
||||
{ "ShipTime", "发货时间" }, |
|
||||
{ "Site_Desc", "发货地点" }, |
|
||||
{ "OperName", "审核员" }, |
|
||||
{ "Remark", "备注" }, |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "退货审核明细"); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_REJECT_RowDataBound(object sender, GridRowEventArgs e) |
|
||||
{ |
|
||||
if (e.Row.RowIndex != -1)//.RowType == DataControlRowType.DataRow)
|
|
||||
{ |
|
||||
if (e.Row.Values != null && e.Row.Values[0] != null && e.Row.Values[0].ToString() == "0") |
|
||||
{ |
|
||||
e.Row.Values[0] = "已退货"; |
|
||||
} |
|
||||
|
|
||||
if (e.Row.Values != null && e.Row.Values[0] != null && e.Row.Values[0].ToString() == "1") |
|
||||
{ |
|
||||
e.Row.Values[0] = "审核通过"; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,213 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_REJECT { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Button3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button Button3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheck 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheck; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnDetail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnDetail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddl 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddl; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveBill 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveBill; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplier 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplier; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// AsnBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox AsnBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// OperName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox OperName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BtnSearch 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BtnSearch; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_REJECT 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_REJECT; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,102 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_REJECT_DETAIL.aspx.cs" Inherits="SCP.ErpExtend.SCP_REJECT_DETAIL" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Add"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnCheck" runat="server" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要审核通过?'))return false;" Hidden="True" EnablePostBack="True"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Items> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="收货单号" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtShipBillNo" runat="server" Label="发货单" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtPlanBillNo" runat="server" Label="订单号" Text="" Readonly="true" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label runat="server" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtType" runat="server" Label="单据类型" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtDeliveryAddress" runat="server" Label="收货地址" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtReceiveTime" runat="server" Label="收货时间" Text=""> |
|
||||
</f:TextBox> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtUserName" runat="server" Label="审核员" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label ID="TextBox2" runat="server" Text=""> |
|
||||
</f:Label> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Items> |
|
||||
</f:Form> |
|
||||
<f:Toolbar runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill runat="server" /> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:Grid ID="Grid_V_TB_REJECT_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="PartCode" SortDirection="DESC" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|
||||
<f:BoundField SortField="RjctBillNum" DataField="RjctBillNum" HeaderText="退货单号" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单号" ColumnID="ProductCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单号" ColumnID="ProductName" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLine" DataField="PoLine" HeaderText="订单行" ColumnID="UnitCode" Width="60px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="100px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Unit" DataField="Unit" HeaderText="单位" ColumnID="Price" Width="80px" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="收货数量" ColumnID="PlanQty" Width="60px" /> |
|
||||
<f:BoundField SortField="ShipTime" DataField="ShipTime" HeaderText="收货时间" ColumnID="ShipQty" Width="60px" DataFormatString="{0:yy-MM-dd}"/> |
|
||||
<f:BoundField SortField="Remark" DataField="Remark" HeaderText="备注" ColumnID="ReceiveQty" Width="60px" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,115 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
|
|
||||
|
|
||||
namespace SCP.ErpExtend |
|
||||
{ |
|
||||
public partial class SCP_REJECT_DETAIL : PageBase |
|
||||
{ |
|
||||
|
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void LoadData() |
|
||||
{ |
|
||||
var _receive = new V_TB_REJECT(); |
|
||||
_receive.RjctBillNum = GetQueryValue("ID"); |
|
||||
|
|
||||
SCP_REJECT_CONTROLLER.Get_V_TB_REJECT_List(_receive, (ret) => { |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _rec = ret.Result.FirstOrDefault(); |
|
||||
txtState.Text = _rec.State_DESC; |
|
||||
txtBillNo.Text = _rec.RjctBillNum; |
|
||||
txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd"); |
|
||||
txtShipBillNo.Text = _rec.AsnBillNum; |
|
||||
txtPlanBillNo.Text = _rec.PoBillNum; |
|
||||
txtUserName.Text = _rec.OperName; |
|
||||
txtSupplierName.Text = _rec.VendName; |
|
||||
txtMemo.Text = _rec.Remark; |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _receive = new V_TB_REJECT_DETAIL(); |
|
||||
_receive.RjctBillNum = GetQueryValue("ID"); |
|
||||
SCP_REJECT_CONTROLLER.Get_V_TB_REJECT_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Grid_V_TB_REJECT_DETAIL.RecordCount = ret.Result.Count(); |
|
||||
var _ls = SortAndPage(ret.Result, Grid_V_TB_REJECT_DETAIL); |
|
||||
|
|
||||
Grid_V_TB_REJECT_DETAIL.DataSource = _ls; |
|
||||
Grid_V_TB_REJECT_DETAIL.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
//try
|
|
||||
//{
|
|
||||
// string id = GetQueryValue("ID");
|
|
||||
// _Model = ReceiveDetailController.GetlistByBillNum(id);
|
|
||||
// bool flag = ReceiveDetailController.UpdateReceive(_Model);
|
|
||||
// if (flag)
|
|
||||
// PageContext.Refresh();
|
|
||||
//}
|
|
||||
//catch (Exception ex)
|
|
||||
//{
|
|
||||
// Alert.ShowInTop(ex.Message);
|
|
||||
//}
|
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _receive = new V_TB_REJECT_DETAIL(); |
|
||||
_receive.RjctBillNum = GetQueryValue("ID"); |
|
||||
SCP_REJECT_CONTROLLER.Get_V_TB_REJECT_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> { |
|
||||
{ "RjctBillNum", "退货单号" }, |
|
||||
{ "AsnBillNum", "发货单号" }, |
|
||||
{ "PoBillNum", "订单号" }, |
|
||||
{ "PoLine", "订单行" }, |
|
||||
{ "PartCode", "零件号" }, |
|
||||
{ "PartDesc1", "零件名称" }, |
|
||||
{ "Unit", "单位" }, |
|
||||
{ "Qty", "退货数量" }, |
|
||||
//{ "ReceivedQty", "已开票数量" },
|
|
||||
{ "ShipTime", "收货时间" }, |
|
||||
{ "Remark", "备注" }, |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "收货审核明细"); |
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,195 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.ErpExtend { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_REJECT_DETAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </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>
|
|
||||
/// btnCheck 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheck; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtShipBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtShipBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPlanBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPlanBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtType 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtType; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtDeliveryAddress 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtDeliveryAddress; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtUserName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtUserName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TextBox2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label TextBox2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_REJECT_DETAIL 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_REJECT_DETAIL; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,128 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CONFIRM.aspx.cs" Inherits="SCP.北京安通林.SCP_INVOICE_CONFIRM" %> |
|
||||
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
|
||||
<%@ Import Namespace="CK.SCP.Utils" %> |
|
||||
|
|
||||
|
|
||||
<!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> |
|
||||
</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:Toolbar ID="Toolbar1" runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnView" runat="server" EnablePostBack="True" Text="查看发票" Icon="Zoom" OnClick="btnView_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</f:Button> |
|
||||
|
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
|
||||
<Items> |
|
||||
<f:Form runat="server"> |
|
||||
<Rows> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:CheckBoxList runat="server" ID="ckb" Label="状态"> |
|
||||
<f:CheckItem Text="供应商申请" Value="1" Selected="True" /> |
|
||||
<f:CheckItem Text="采购审核退回" Value="2" Selected="True" /> |
|
||||
<f:CheckItem Text="采购审核通过" Value="3" Selected="True" /> |
|
||||
<f:CheckItem Text="发票寄出" Value="4" Selected="True" /> |
|
||||
<f:CheckItem Text="财务收票" Value="5" Selected="True" /> |
|
||||
<f:CheckItem Text="财务手工收票" Value="8" Selected="True" /> |
|
||||
</f:CheckBoxList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
|
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
|
|
||||
<f:TextBox ID="TXT_InvcBillNum" runat="server" Label="发票单号" /> |
|
||||
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" ></f:DropDownList> |
|
||||
<f:TextBox ID="TXT_InvoiceNum" runat="server" Label="金税票号" /> |
|
||||
<f:TextBox ID="TXT_PO" runat="server" Label="订单编号"/> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="TXT_ASN" runat="server" Label="发货单号"/> |
|
||||
|
|
||||
<f:DatePicker ID="DP_CreateTime1" runat="server" Required="true" Label="收货时间"/> |
|
||||
<f:DatePicker ID="DP_CreateTime2" runat="server" Required="true" Label="至" /> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BTN_SEARCH" runat="server" OnClick="BTN_SEARCH_Click" Text="快速查找"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
|
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="true" |
|
||||
ShowHeader="False" SortField="State;CreateTime" AllowPaging="True" PageSize="100" |
|
||||
OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange" |
|
||||
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" BoxFlex="1" |
|
||||
DataKeyNames="UID, InvcBillNum" AllowSorting="true" IsDatabasePaging="true" > |
|
||||
<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_SelectedIndexChanged" |
|
||||
runat="server"> |
|
||||
|
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
<f:ListItem Text="200" Value="200" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="" DataField="InvcBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="InvoiceNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="" DataField="ExpressNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="金额(不含税)" ColumnID="" DataField="Amount" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="采购金额(不含税)" ColumnID="" DataField="PurCost" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="成本金额(不含税)" ColumnID="" DataField="StdCost" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="税率" ColumnID="" DataField="Tax" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="税额" ColumnID="" DataField="TaxAmount" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="税后金额" ColumnID="" DataField="Total" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="DiscountPrice" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="索赔金额" ColumnID="" DataField="ContractPrice" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" DataFormatString = "{0:F}"/> |
|
||||
<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" /> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
|
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="发票明细" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
|
|
||||
</body> |
|
||||
</html> |
|
@ -1,223 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using System.Data; |
|
||||
|
|
||||
namespace SCP.北京安通林 |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_CONFIRM : PageBase |
|
||||
{ |
|
||||
public void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
BindVender(ddl_Vender); |
|
||||
} |
|
||||
} |
|
||||
private void BindVender() |
|
||||
{ |
|
||||
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
|
||||
{ |
|
||||
var ls = SCP_TB_VENDER_CONTROLLER.Getlist(CurrentUser.FactoryList.FirstOrDefault()); |
|
||||
|
|
||||
var lsVender = ls.Where(p => p.VendId.Substring(0, 1) == "R" || p.VendId.Substring(0, 1) == "E").ToList(); |
|
||||
lsVender.ForEach(p => { |
|
||||
p.VendName = string.Format("{0}({1})", p.VendName, p.VendId); |
|
||||
}); |
|
||||
ddl_Vender.DataSource = lsVender; |
|
||||
ddl_Vender.DataTextField = "VendName"; |
|
||||
ddl_Vender.DataValueField = "VendId"; |
|
||||
ddl_Vender.DataBind(); |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void BindInvoice() |
|
||||
{ |
|
||||
SearchInvoice((result) => { |
|
||||
Grid_V_TB_INVOICE.RecordCount = result.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE>(result, Grid_V_TB_INVOICE,"ASC"); |
|
||||
Grid_V_TB_INVOICE.DataSource = list; |
|
||||
Grid_V_TB_INVOICE.DataBind(); |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action) |
|
||||
{ |
|
||||
V_TB_INVOICE _entity = new V_TB_INVOICE(); |
|
||||
|
|
||||
_entity.InvcBillNum = TXT_InvcBillNum.Text; |
|
||||
|
|
||||
_entity.VendId = ddl_Vender.SelectedValue; |
|
||||
_entity.InvoiceNum = TXT_InvoiceNum.Text; |
|
||||
if (DP_CreateTime1.SelectedDate != null || DP_CreateTime2.SelectedDate != null || !string.IsNullOrEmpty(TXT_PO.Text) || !string.IsNullOrEmpty(TXT_ASN.Text)) |
|
||||
{ |
|
||||
_entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text, TXT_PO.Text, TXT_ASN.Text); |
|
||||
} |
|
||||
_entity.UserInVendIds = CurrentUser.VenderList; |
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
_entity.BillStateList = GetStateList(); |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_CG_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
//if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0)
|
|
||||
//{
|
|
||||
// Alert.Show("未查询到符合条件的发票!");
|
|
||||
//}
|
|
||||
p_action(ret.Result); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
private List<int> GetStateList() |
|
||||
{ |
|
||||
List<int> lsValue = new List<int>(); |
|
||||
string[] values = ckb.SelectedValueArray; |
|
||||
|
|
||||
if (values.Contains("0")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.New); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("1")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.Apply); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("2")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CheckFail); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("3")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CheckSuccess); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("4")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.Mail); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("5")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.FinanceReceive); |
|
||||
} |
|
||||
|
|
||||
if (values.Contains("6")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.FinanceFail); |
|
||||
} |
|
||||
if (values.Contains("8")) |
|
||||
{ |
|
||||
lsValue.Add((int)InvoiceState.CustomReceive); |
|
||||
} |
|
||||
return lsValue; |
|
||||
} |
|
||||
|
|
||||
protected void btnView_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length != 1) |
|
||||
{ |
|
||||
Alert.Show("请选择一行要操作的记录!"); |
|
||||
return; |
|
||||
} |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../北京安通林/SCP_INVOICE_CONFIRM_DETAIL.aspx?ID={0}", ID); |
|
||||
|
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
//双击打开详情页
|
|
||||
|
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
|
||||
string url = String.Format("../北京安通林/SCP_INVOICE_CONFIRM_DETAIL.aspx?ID={0}", ID); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
|
|
||||
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void BTN_SEARCH_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
|
|
||||
BindInvoice(); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
int[] _selections = Grid_V_TB_INVOICE.SelectedRowIndexArray; |
|
||||
if (_selections.Count() == 0) |
|
||||
{ |
|
||||
Alert.Show("请选择发票记录导出!"); |
|
||||
} |
|
||||
List<string> _ls = new List<string>(); |
|
||||
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
if (_selections.Contains(i)) |
|
||||
{ |
|
||||
|
|
||||
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i]; |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
} |
|
||||
} |
|
||||
if (_ls.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("请选择记录导出!"); |
|
||||
return; |
|
||||
} |
|
||||
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls); |
|
||||
PageBase.DataSetToExcel(ds, "导出发票"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
@ -1,222 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.北京安通林 { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_CONFIRM { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Button3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button Button3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnView 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnView; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ckb 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.CheckBoxList ckb; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvcBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvcBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddl_Vender 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddl_Vender; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_InvoiceNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_InvoiceNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_PO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_ASN 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_ASN; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DP_CreateTime1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker DP_CreateTime1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// DP_CreateTime2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker DP_CreateTime2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BTN_SEARCH 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BTN_SEARCH; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_INVOICE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_INVOICE; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,178 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CONFIRM_DETAIL.aspx.cs" Inherits="SCP.北京安通林.SCP_INVOICE_CONFIRM_DETAIL" Async="true" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server"> |
|
||||
</f:ToolbarSeparator> |
|
||||
|
|
||||
<f:Button ID="btnEdit" runat="server" Text="修改数据" OnClientClick="if(!confirm('是否要修改备注?'))return false;" Icon="ScriptSave" OnClick="btnEdit_Click"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<f:Button ID="btnCheckSuccess" runat="server" Text="审核通过" OnClientClick="if(!confirm('是否要通过该发票申请?'))return false;" Icon="BulletTick" OnClick="btnCheckSuccess_Click"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnReject" runat="server" Text="未处理退货" Icon="BulletCross" OnClick="btnReject_Click"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnCheckFail" runat="server" Text="审核退回" Icon="BulletCross" OnClick="btnCheckFail_Click"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
</f:Form> |
|
||||
<f:GroupPanel runat="server" ID="gp1" Layout="HBox"> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Rows> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="发票单号" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtBillTime" runat="server" Label="创建时间" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:Label runat="server" ID="Label3" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtAmount" runat="server" Label="税前金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<%-- <f:TextBox ID="txtTax" runat="server" Label="税率" Text="" MaxLength="100" > |
|
||||
</f:TextBox>--%> |
|
||||
|
|
||||
<f:DropDownList runat="server" Label="税率" ID="txtTax" 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:TextBox ID="txtTaxAmount" runat="server" Label="税额" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtTotal" runat="server" Label="税后金额" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
|
||||
<f:Label runat="server" ID="Label2" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtExpressNumber" runat="server" Label="快递单号" Text="" MaxLength="100" Readonly="true"> |
|
||||
</f:TextBox> |
|
||||
<f:NumberBox ID="txtDiscountPrice" runat="server" Label="折扣金额" /> |
|
||||
<f:TextBox ID="txtContractPrice1" runat="server" Label="索赔金额" Text="0" MaxLength="100" /> |
|
||||
<f:TextBox ID="txtBlancePrice1" runat="server" Label="调整税额" Text="0" MaxLength="100" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%"> |
|
||||
<Items> |
|
||||
<f:DatePicker ID="dp_Time" runat="server" Label="发票日期" Readonly="true"></f:DatePicker> |
|
||||
<%--<f:DatePicker runat="server" ID ="dpUpdateTime" Label="财务审批时间"></f:DatePicker>--%> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="" MaxLength="100"> |
|
||||
</f:TextBox> |
|
||||
|
|
||||
<f:Label runat="server" ID="l2" /> |
|
||||
<f:Label runat="server" ID="l3" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
<f:Toolbar runat="server" Hidden="true"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill runat="server" /> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,InvcBillNum,Qty,CanQty,State,Price,ContractPrice,BlancePrice" IsDatabasePaging="True" AllowPaging="True" |
|
||||
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoBillNum" AllowCellEditing="true" ClicksToEdit="1"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|
||||
<f:BoundField SortField="ProjectId" DataField="ProjectId" HeaderText="项目编号" ColumnID="ProjectId" Width="100px" /> |
|
||||
<f:BoundField SortField="RecvBillNum" DataField="RecvBillNum" HeaderText="收货单号" ColumnID="RecvBillNum" Width="80px" /> |
|
||||
<f:BoundField SortField="ErpRecvBillNum" DataField="ErpRecvBillNum" HeaderText="ERP收货单号" ColumnID="ErpRecvBillNum" Width="80px" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="ProductCode" Width="80px" /> |
|
||||
<%-- <f:BoundField SortField="ProductName" DataField="AsnBillNum" HeaderText="收货单" ColumnID="ProductName" Width="100px" />--%> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单" ColumnID="UnitCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="80px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Currency" Width="80px" /> |
|
||||
|
|
||||
<%--<f:BoundField SortField="Price" DataField="Price" HeaderText="单价" ColumnID="Price" Width="80px" />--%> |
|
||||
|
|
||||
<f:RenderField Width="100px" HeaderText="单价" ColumnID="Price" DataField="Price" FieldType="Float" |
|
||||
> |
|
||||
<Editor> |
|
||||
<f:NumberBox ID="TXT_PackQty" runat="server" MinValue="0" |
|
||||
MaxValue="99999999" DecimalPrecision="3" > |
|
||||
</f:NumberBox> |
|
||||
</Editor> |
|
||||
</f:RenderField> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="采购金额(不含税)" ColumnID="" DataField="PurCost" /> |
|
||||
<f:BoundField runat="server" HeaderText="成本金额(不含税)" ColumnID="" DataField="StdCost" /> |
|
||||
<f:BoundField SortField="UpdateTime" runat="server" HeaderText="收货日期" ColumnID="" DataField="UpdateTime" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="开票数量" ColumnID="OpenQty" Width="80px" /> |
|
||||
|
|
||||
<f:TemplateField HeaderText="备注" Width="160px"> |
|
||||
<ItemTemplate> |
|
||||
<asp:TextBox ID="txtLineMemo" runat="server" Width="150px" |
|
||||
Text='<%# Eval("Remark") %>' MaxLength="50"></asp:TextBox> |
|
||||
</ItemTemplate> |
|
||||
</f:TemplateField> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" Height="640px" Width="700px" AutoScroll="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="发票详情" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" OnClose="Window1_Close" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
<script> |
|
||||
|
|
||||
var gridClientID = '<%= Grid1.ClientID %>'; |
|
||||
|
|
||||
|
|
||||
function renderName(value, params) { |
|
||||
if (params.record.data["Price"] >= params.record.data["PurCost"]) { |
|
||||
|
|
||||
params.style = 'color:red'; |
|
||||
} else { |
|
||||
params.tdCls = ''; |
|
||||
} |
|
||||
|
|
||||
return value; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
</script> |
|
||||
|
|
||||
|
|
||||
</body> |
|
||||
</html> |
|
@ -1,320 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Common; |
|
||||
using CK.SCP.Controller; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using FineUI; |
|
||||
|
|
||||
namespace SCP.北京安通林 |
|
||||
{ |
|
||||
public partial class SCP_INVOICE_CONFIRM_DETAIL : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
SetRoleRule(); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
|
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
private void SetRoleRule() |
|
||||
{ |
|
||||
//IsPriceVisible(Grid1, "合同价格");
|
|
||||
//IsPriceVisible(Grid1, "合同差额");
|
|
||||
IsPriceVisible(Grid1, "要货日期"); |
|
||||
} |
|
||||
private void GetInvoice() |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
|
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(new V_TB_INVOICE { InvcBillNum = id }, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _ls = ret.Result.ToList(); |
|
||||
if (_ls != null && _ls.Count > 0) |
|
||||
{ |
|
||||
var _Model = _ls[0]; |
|
||||
Session["invoice"] = _Model; |
|
||||
txtState.Text = _Model.State_DESC; |
|
||||
txtBillNo.Text = _Model.InvcBillNum; |
|
||||
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd"); |
|
||||
txtSupplierName.Text = _Model.VendName; |
|
||||
txtInvoiceNumber.Text = _Model.InvoiceNum; |
|
||||
txtTax.SelectedValue = _Model.Tax != null ? _Model.Tax.Value.ToString() : "0"; |
|
||||
txtTaxAmount.Text = _Model.TaxAmount != null ? _Model.TaxAmount.Value.ToString() : "0"; |
|
||||
txtExpressNumber.Text = _Model.ExpressNum; |
|
||||
txtAmount.Text = _Model.Amount.ToString(); |
|
||||
txtTotal.Text = _Model.Total != null ? _Model.Total.ToString() : string.Empty; |
|
||||
txtContractPrice1.Text = _Model.ContractPrice != null ? _Model.ContractPrice.ToString() : "0"; |
|
||||
txtDiscountPrice.Text = _Model.DiscountPrice != null ? _Model.DiscountPrice.ToString() : "0"; |
|
||||
txtBlancePrice1.Text = _Model.BlancePrice != null ? _Model.BlancePrice.ToString() : "0"; |
|
||||
dp_Time.SelectedDate= _Model.UpdateTime; |
|
||||
txtMemo.Text = _Model.Remark; |
|
||||
if (_Model.State ==(int)InvoiceState.Apply) |
|
||||
{ |
|
||||
this.btnCheckFail.Hidden = false;//.Visible = true;
|
|
||||
this.btnCheckSuccess.Hidden = false;//.Visible = true;
|
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
this.btnCheckFail.Hidden = true; // Visible = false;
|
|
||||
this.btnCheckSuccess.Hidden = true; //Visible = false;
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
this.btnEdit.Enabled = true; |
|
||||
|
|
||||
|
|
||||
} |
|
||||
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
|
||||
{ |
|
||||
string id = GetQueryValue("ID"); |
|
||||
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL(); |
|
||||
_tb.InvcBillNum = id; |
|
||||
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb, (ret) => { |
|
||||
|
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
p_list(ret.Result); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
Search(ret => |
|
||||
{ |
|
||||
Grid1.RecordCount = ret.Count(); |
|
||||
var list = SortAndPage<V_TB_INVOICE_DETAIL>(ret, Grid1).ToList(); |
|
||||
|
|
||||
foreach (V_TB_INVOICE_DETAIL rec in list) |
|
||||
{ |
|
||||
rec.Qty = ToDecimal(rec.Qty, 2); |
|
||||
rec.CanQty = ToDecimal(rec.CanQty, 2); |
|
||||
} |
|
||||
Grid1.DataSource = list; |
|
||||
Grid1.DataBind(); |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
public decimal ToDecimal(decimal num, int scale) |
|
||||
{ |
|
||||
decimal tempOdds = Math.Round(num, scale); |
|
||||
//if (tempOdds > num)
|
|
||||
//{
|
|
||||
// num = (decimal)((double)(tempOdds - (decimal)Math.Pow(10, -scale)));
|
|
||||
//}
|
|
||||
//else
|
|
||||
//{
|
|
||||
// num = (decimal)((double)tempOdds);
|
|
||||
//}
|
|
||||
//return num;
|
|
||||
return tempOdds; |
|
||||
} |
|
||||
|
|
||||
protected void btnCheckFail_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript( |
|
||||
Window1.GetShowReference("../WarehouseData/SCP_INVOICE_CHECKFAIL.aspx", "采购审核退回") |
|
||||
); |
|
||||
} |
|
||||
|
|
||||
protected void btnCheckSuccess_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (Session["Invoice"] != null) |
|
||||
{ |
|
||||
var _Invoice = Session["Invoice"] as V_TB_INVOICE; |
|
||||
var venderId = _Invoice.VendId; |
|
||||
|
|
||||
|
|
||||
SET_INVOICE_STATE("采购审核通过", InvoiceState.CheckSuccess); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
private void SET_INVOICE_STATE(string p_msg, InvoiceState p_state) |
|
||||
{ |
|
||||
if (Session["Invoice"] != null) |
|
||||
{ |
|
||||
var _Invoice = Session["Invoice"] as V_TB_INVOICE; |
|
||||
|
|
||||
_Invoice.Remark = txtMemo.Text; |
|
||||
|
|
||||
//var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice.InvcBillNum, p_state);
|
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice, p_state,CurrentUser.ChineseName); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Alert.Show(p_msg); |
|
||||
|
|
||||
if (CurrentUser.ConfigList.Keys.Contains("供应商邮件")) |
|
||||
{ |
|
||||
SCP.Common.MailManager.SendMail(_Invoice.VendId, "采购审核通过", "采购审核通过"); |
|
||||
} |
|
||||
GetInvoice(); |
|
||||
BindData(); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show(ret.Message); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
protected void btnEdit_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _invoice = Session["invoice"] as V_TB_INVOICE; |
|
||||
var Memo = MyWebString.GetString(txtMemo.Text.Trim()); |
|
||||
_invoice.Remark = Memo; |
|
||||
_invoice.Tax = string.IsNullOrEmpty(txtTax.SelectedValue) ? 0 : decimal.Parse(txtTax.SelectedValue); |
|
||||
|
|
||||
_invoice.BlancePrice =string.IsNullOrEmpty(txtBlancePrice1.Text)?0:decimal.Parse(txtBlancePrice1.Text); |
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid1.GetModifiedDict(); |
|
||||
if (_invoice != null) |
|
||||
{ |
|
||||
|
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
GridRow row = Grid1.Rows[i]; |
|
||||
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
|
||||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|
||||
_entity.InvcBillNum = rowDataKeys[1] as string; |
|
||||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
|
||||
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
|
||||
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[4]); |
|
||||
_entity.Price = ConvertHelper.To<decimal>(rowDataKeys[5]); |
|
||||
if (modifiedDict.Keys.Contains(i)) |
|
||||
{ |
|
||||
var modifyValue = modifiedDict[i]; |
|
||||
_entity.Price = modifyValue.Keys.Contains("Price") ? ConvertHelper.To < decimal > (modifyValue["Price"]) : _entity.Price; |
|
||||
|
|
||||
} |
|
||||
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
|
||||
_entity.ContractPrice = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|
||||
_entity.BlancePrice = ConvertHelper.To<Decimal>(rowDataKeys[7]); |
|
||||
_entity.Remark = txtLineMemo.Text; |
|
||||
//把备注添加到TB_INVOICE、TB_INVOICE_DETAIL
|
|
||||
_ls.Add(_entity); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (_ls.Count > 0) |
|
||||
{ |
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice, _ls); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Alert.Show("发票备注修改成功!"); |
|
||||
|
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("更改记录数为零"); |
|
||||
} |
|
||||
} |
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
|
||||
{ |
|
||||
if (string.IsNullOrEmpty(e.CloseArgument)) |
|
||||
{ |
|
||||
Alert.Show("请输入退回原因"); |
|
||||
return; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
string Memo = e.CloseArgument; |
|
||||
var _invoice = Session["invoice"] as V_TB_INVOICE; |
|
||||
|
|
||||
_invoice.State = (int)InvoiceState.CheckFail; |
|
||||
_invoice.Remark = Memo; |
|
||||
|
|
||||
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
|
||||
|
|
||||
if (_invoice != null) |
|
||||
{ |
|
||||
|
|
||||
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid1.DataKeys[i]; |
|
||||
|
|
||||
|
|
||||
GridRow row = Grid1.Rows[i]; |
|
||||
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
|
||||
|
|
||||
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
|
||||
_entity.InvcBillNum = rowDataKeys[1] as string; |
|
||||
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
|
||||
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
|
||||
_entity.State = (int)InvoiceState.CheckFail; |
|
||||
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
|
||||
_entity.ContractPrice = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
|
||||
_entity.BlancePrice = ConvertHelper.To<Decimal>(rowDataKeys[7]); |
|
||||
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
|
||||
|
|
||||
_entity.Remark = txtLineMemo.Text; |
|
||||
|
|
||||
//把备注添加到TB_INVOICE、TB_INVOICE_DETAIL
|
|
||||
_ls.Add(_entity); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
if (_ls.Count > 0) |
|
||||
{ |
|
||||
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice, _ls); |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Alert.Show("发票采购退回成功!"); |
|
||||
|
|
||||
if (CurrentUser.ConfigList.Keys.Contains("供应商邮件")) |
|
||||
{ |
|
||||
SCP.Common.MailManager.SendMail(_invoice.VendId, "发票采购退回成功", "发票采购退回成功"); |
|
||||
} |
|
||||
BindData(); |
|
||||
GetInvoice(); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("退回记录数为零"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
protected void btnReject_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (Session["Invoice"] != null) |
|
||||
{ |
|
||||
var _Invoice = Session["Invoice"] as V_TB_INVOICE; |
|
||||
var venderId = _Invoice.VendId; |
|
||||
string url = String.Format("../WarehouseData/SCP_RECEIVE_LIST.aspx?VendId={0}", venderId); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,321 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.北京安通林 { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_INVOICE_CONFIRM_DETAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ToolbarSeparator3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.ToolbarSeparator ToolbarSeparator3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnEdit 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnEdit; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheckSuccess 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheckSuccess; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnReject 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnReject; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheckFail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheckFail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTax 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList txtTax; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTaxAmount 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTaxAmount; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtTotal 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtTotal; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Label2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label Label2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtInvoiceNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtInvoiceNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtExpressNumber 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtExpressNumber; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtDiscountPrice 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.NumberBox txtDiscountPrice; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtContractPrice1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtContractPrice1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBlancePrice1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBlancePrice1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// dp_Time 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DatePicker dp_Time; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// l3 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label l3; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PackQty 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.NumberBox TXT_PackQty; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtLineMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.WebControls.TextBox txtLineMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,160 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE.aspx.cs" Inherits="SCP.北京安通林.SCP_RECEIVE" %> |
|
||||
|
|
||||
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
|
||||
<%@ Import Namespace="CK.SCP.Utils" %> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!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> |
|
||||
</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:Form runat="server"> |
|
||||
<Toolbars> |
|
||||
<f:Toolbar ID="Toolbar2" runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnReject" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClick="btnReject_Click" > |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnCheck" runat="server" EnablePostBack="True" OnClick="btnCheck_OnClick" Text="审核通过" Icon="Accept" OnClientClick="if(!confirm('是否要将勾选的单据通过审核?'))return false;"> |
|
||||
</f:Button> |
|
||||
|
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
|
||||
</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"> |
|
||||
<Items> |
|
||||
<f:DropDownList runat="server" ID="ddtype" Label="单据类型"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="收货单" Value="收货单" /> |
|
||||
<f:ListItem Text="退货单" Value="退货单" /> |
|
||||
</f:DropDownList> |
|
||||
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
|
||||
<f:ListItem Text="-" Value="" /> |
|
||||
<f:ListItem Text="已收货" Value="0" /> |
|
||||
<f:ListItem Text="审核通过" Value="1" /> |
|
||||
<f:ListItem Text="已开票" Value="2" /> |
|
||||
</f:DropDownList> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="单据号" /> |
|
||||
<f:TextBox ID="txtReceiveBill" runat="server" /> |
|
||||
<f:Label runat="server" Label="供应商" /> |
|
||||
<f:TextBox ID="txtSupplier" runat="server" /> |
|
||||
<f:Label runat="server" Label="订单号" /> |
|
||||
<f:TextBox ID="txtPO" runat="server" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Label runat="server" Label="发货单号" /> |
|
||||
<f:TextBox ID="AsnBillNum" runat="server" /> |
|
||||
<f:Label runat="server" Label="操作员" /> |
|
||||
<f:TextBox ID="OperName" runat="server" /> |
|
||||
<f:TextBox runat="server" Required ="true" Label="零件编号" EmptyText="查询请填写零件编号" ID="TXT_PartCode" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server"> |
|
||||
<Items> |
|
||||
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
|
||||
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_OnClick" Text="快速查找"></f:Button> |
|
||||
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细"></f:Button> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Rows> |
|
||||
</f:Form> |
|
||||
</Items> |
|
||||
</f:GroupPanel> |
|
||||
<f:Grid ID="Grid_V_TB_RECEIVE" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="UID,RecvBillNum,ErpRecvBillNum,State,Site,RecvBillNum,CreateTime" IsDatabasePaging="True" AllowPaging="True" EnableRowDoubleClickEvent="True" |
|
||||
OnRowDoubleClick="Grid1_OnRowDoubleClick" SortDirection="DESC" SortField="ShipTime" EnableCheckBoxSelect="True" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True" OnPageIndexChange="Grid1_OnPageIndexChange"> |
|
||||
<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="10" Value="10" /> |
|
||||
<f:ListItem Text="20" Value="20" /> |
|
||||
<f:ListItem Text="50" Value="50" /> |
|
||||
<f:ListItem Text="100" Value="100" /> |
|
||||
</f:DropDownList> |
|
||||
</PageItems> |
|
||||
<Columns> |
|
||||
<f:BoundField runat="server" HeaderText="State" ColumnID="" DataField="State" Hidden="true" /> |
|
||||
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
|
||||
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
|
||||
<f:BoundField runat="server" HeaderText="单据号" ColumnID="" DataField="RecvBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="Erp单据号" ColumnID="" DataField="ErpRecvBillNum" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
|
||||
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
|
||||
|
|
||||
<f:BoundField runat="server" HeaderText="时间" ColumnID="" DataField="ShipTime" /> |
|
||||
<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" /> |
|
||||
<f:BoundField runat="server" HeaderText="地点" ColumnID="" DataField="Site_Desc" /> |
|
||||
<f:BoundField runat="server" HeaderText="类型" ColumnID="" DataField="BillType_DESC" /> |
|
||||
<f:BoundField runat="server" HeaderText="审核员" ColumnID="" DataField="OperName" /> |
|
||||
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="详情" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
<script> |
|
||||
|
|
||||
|
|
||||
var gridClientID = '<%= Grid_V_TB_RECEIVE.ClientID %>'; |
|
||||
|
|
||||
|
|
||||
function renderName(value, params) { |
|
||||
if (params.record.data["Erp单据号"] ='') { |
|
||||
|
|
||||
params.style = 'color:red'; |
|
||||
} else { |
|
||||
params.tdCls = ''; |
|
||||
} |
|
||||
|
|
||||
return value; |
|
||||
} |
|
||||
var basePath = '<%=ResolveUrl("~/")%>'; |
|
||||
|
|
||||
|
|
||||
function btnDetail_OnClick(id) { |
|
||||
parent.addExampleTab.apply(null, ['id', basePath + 'WarehouseData/ReceiveDetail.aspx?ID=' + 2, '明细', basePath + 'res/images/filetype/vs_aspx.png', undefined, true]); |
|
||||
} |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,352 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using CK.SCP.Models.AppBoxEntity; |
|
||||
using System.Data; |
|
||||
|
|
||||
namespace SCP.北京安通林 |
|
||||
{ |
|
||||
public partial class SCP_RECEIVE : PageBase |
|
||||
{ |
|
||||
|
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
IsRoleRight(); |
|
||||
|
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
LoadData(); |
|
||||
} |
|
||||
} |
|
||||
public void IsRoleRight() |
|
||||
{ |
|
||||
|
|
||||
if (CurrentUser.RoleList.Contains("计划人员")) |
|
||||
{ |
|
||||
btnReject.Hidden = false; |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
btnReject.Hidden = true; |
|
||||
} |
|
||||
if (CurrentUser.FactoryList == null || CurrentUser.FactoryList.Count == 0) |
|
||||
{ |
|
||||
Alert.Show("当前用户未选择地点!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
public void LoadData() |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageSize = ConfigHelper.PageSize; |
|
||||
ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString(); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _entity = new V_TB_RECEIVE(); |
|
||||
_entity.RecvBillNum=txtReceiveBill.Text;//单据号
|
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
//已收货:0,审核通过:1,已开票,2
|
|
||||
int istate = Convert.ToInt32(ddl.SelectedValue); |
|
||||
if (istate == 0) |
|
||||
{ |
|
||||
_entity.State = 0; |
|
||||
} |
|
||||
else if (istate == 1) |
|
||||
{ |
|
||||
_entity.State = 1; |
|
||||
} |
|
||||
else if (istate == 2) |
|
||||
{ |
|
||||
_entity.State = 2; |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
_entity.State = -1; |
|
||||
} |
|
||||
|
|
||||
if (!string.IsNullOrEmpty(ddtype.SelectedValue)) |
|
||||
{ |
|
||||
string istate = ddtype.SelectedValue; |
|
||||
if (istate == "收货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "收货单"; |
|
||||
} |
|
||||
else if (istate == "退货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "退货单"; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
_entity.UserInVendIds = CurrentUser.VenderList; |
|
||||
_entity.VendName = txtSupplier.Text;//供应商
|
|
||||
_entity.PoBillNum = txtPO.Text;//订单号
|
|
||||
_entity.AsnBillNum = AsnBillNum.Text;//发货单号
|
|
||||
_entity.OperName = OperName.Text;//操作员
|
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_GG_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.RecordCount =ret.Result.Count(); |
|
||||
var _list= SortAndPage(ret.Result, Grid_V_TB_RECEIVE); |
|
||||
Grid_V_TB_RECEIVE.DataSource =_list; |
|
||||
Grid_V_TB_RECEIVE.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
} |
|
||||
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|
||||
BindData(); |
|
||||
} |
|
||||
protected void Grid1_OnRowDoubleClick(object sender, GridRowClickEventArgs e) |
|
||||
{ |
|
||||
string ID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); |
|
||||
string Site = GetSelectedDataKey(Grid_V_TB_RECEIVE, 4); |
|
||||
|
|
||||
string STATE = Grid_V_TB_RECEIVE.Rows[e.RowIndex].Values[0].ToString(); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(STATE)) |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
if (STATE != "0" && STATE != "1" && STATE != "2") |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
string url = String.Format("../北京安通林/SCP_RECEIVE_DETAIL.aspx?ID={0}&STATE={1}&Site={2}", ID, STATE,Site); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
|
|
||||
//明细
|
|
||||
protected void btnDetail_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要查看明细的单据")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
if (listids.Count > 1) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("只能查看一条单据的明细")); |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
string STATE = Grid_V_TB_RECEIVE.SelectedRow.Values[0].ToString(); |
|
||||
|
|
||||
if (string.IsNullOrEmpty(STATE)) |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
if (STATE != "0" && STATE != "1" && STATE != "2") |
|
||||
{ |
|
||||
STATE = "0"; |
|
||||
} |
|
||||
|
|
||||
string roleID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); |
|
||||
string url = String.Format("../北京安通林/SCP_RECEIVE_DETAIL.aspx?ID={0}&STATE={1}", roleID, STATE); |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|
||||
} |
|
||||
//查询
|
|
||||
protected void BtnSearch_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
//显示面板
|
|
||||
protected void btnShow_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = false; |
|
||||
} |
|
||||
//关闭面板
|
|
||||
protected void OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
gp1.Hidden = true; |
|
||||
} |
|
||||
//审核通过
|
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
ICollection<Role> Roles = CurrentUser.Roles; |
|
||||
string strUserName = CurrentUser.ChineseName; |
|
||||
|
|
||||
List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE); |
|
||||
if (listids.Count == 0) |
|
||||
{ |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要审核的单据")); |
|
||||
return; |
|
||||
} |
|
||||
var _ls = new List<string>(); |
|
||||
var _ls1 = new List<string>(); |
|
||||
int[] selections = Grid_V_TB_RECEIVE.SelectedRowIndexArray; |
|
||||
for (int i = 0, count = Grid_V_TB_RECEIVE.Rows.Count; i < count; i++) |
|
||||
{ |
|
||||
if (selections.Contains(i)) |
|
||||
{ |
|
||||
object[] rowDataKeys = Grid_V_TB_RECEIVE.DataKeys[i]; |
|
||||
if (CurrentUser.UsedDomain == "CNH") |
|
||||
{ |
|
||||
string _createtime = rowDataKeys[6].ToString(); |
|
||||
if (int.Parse(DateTime.Parse(_createtime).ToString("yyMMdd")) < int.Parse("200531")) |
|
||||
{ |
|
||||
Alert.Show("请选择2020-06-01之后数据审核!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
_ls.Add(rowDataKeys[1] as string); |
|
||||
var erpRec = rowDataKeys[2] as string; |
|
||||
if (string.IsNullOrEmpty(erpRec)) |
|
||||
{ |
|
||||
Alert.Show("Erp收货单号不能为空,请稍后审核!"); |
|
||||
return; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
var ret = SCP_RECIVECE_CONTROLLER.Save_TB_RECEIVE_STATE(_ls, ReceiveState.Check, strUserName,CurrentUser.UsedDomain); |
|
||||
PageContext.RegisterStartupScript(Alert.GetShowInParentReference("审核成功")); |
|
||||
BindData(); |
|
||||
} |
|
||||
|
|
||||
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
|
||||
{ |
|
||||
Grid_V_TB_RECEIVE.PageIndex = e.NewPageIndex; |
|
||||
BindData(); |
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
var _entity = new V_TB_RECEIVE(); |
|
||||
_entity.RecvBillNum = txtReceiveBill.Text;//单据号
|
|
||||
if (!string.IsNullOrEmpty(ddl.SelectedValue)) |
|
||||
{ |
|
||||
//已收货:0,审核通过:1,已开票,2
|
|
||||
int istate = Convert.ToInt32(ddl.SelectedValue); |
|
||||
if (istate == 0) |
|
||||
{ |
|
||||
_entity.State = 0; |
|
||||
} |
|
||||
else if (istate == 1) |
|
||||
{ |
|
||||
_entity.State = 1; |
|
||||
} |
|
||||
else if (istate == 2) |
|
||||
{ |
|
||||
_entity.State = 2; |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
_entity.State = -1; |
|
||||
} |
|
||||
|
|
||||
if (!string.IsNullOrEmpty(ddtype.SelectedValue)) |
|
||||
{ |
|
||||
string istate = ddtype.SelectedValue; |
|
||||
if (istate == "收货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "收货单"; |
|
||||
} |
|
||||
else if (istate == "退货单") |
|
||||
{ |
|
||||
_entity.BillType_DESC = "退货单"; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
_entity.UserInAddress = CurrentUser.FactoryList; |
|
||||
_entity.UserInVendIds = CurrentUser.VenderList; |
|
||||
_entity.VendName = txtSupplier.Text;//供应商
|
|
||||
_entity.PoBillNum = txtPO.Text;//订单号
|
|
||||
_entity.AsnBillNum = AsnBillNum.Text;//发货单号
|
|
||||
_entity.OperName = OperName.Text;//操作员
|
|
||||
List<string> _ls = new List<string>(); |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_GG_List(_entity, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
_ls = ret.Result.Select(p => p.RecvBillNum).ToList(); |
|
||||
DataSet ds = null; |
|
||||
if (CurrentUser.VenderList.Count > 0) |
|
||||
{ |
|
||||
ds = SCP_RECIVECE_CONTROLLER.GET_RECEIVE_EXECEL(_ls,CurrentUser.UsedDomain, CurrentUser.VenderList.FirstOrDefault()); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
ds = SCP_RECIVECE_CONTROLLER.GET_RECEIVE_EXECEL(_ls,CurrentUser.UsedDomain); |
|
||||
} |
|
||||
|
|
||||
PageBase.DataSetToExcel(ds, "收货退货单"); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
||||
protected void BtnSearchDetail_Click(object sender , EventArgs e) |
|
||||
{ |
|
||||
string RecvBillNum = txtReceiveBill.Text; |
|
||||
string VendName = txtSupplier.Text; |
|
||||
string State = ddl.SelectedValue; |
|
||||
string PartCode = TXT_PartCode.Text; |
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../北京安通林/SCP_RECEIVE_DETAIL.aspx?ID={0}&&VendName={1}&&State={2}&&PartCode={3}", RecvBillNum, VendName, State, PartCode))); |
|
||||
} |
|
||||
|
|
||||
protected void btnReject_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
//ICollection<Role> Roles = CurrentUser.Roles;
|
|
||||
//string strUserName = CurrentUser.ChineseName;
|
|
||||
|
|
||||
//List<int> listids = GetSelectedDataKeyIDs(Grid_V_TB_RECEIVE);
|
|
||||
//if (listids.Count == 0)
|
|
||||
//{
|
|
||||
// PageContext.RegisterStartupScript(Alert.GetShowInParentReference("请勾选要报废的单据"));
|
|
||||
// return;
|
|
||||
//}
|
|
||||
|
|
||||
//var _ls = new List<string>();
|
|
||||
//var _ls1 = new List<string>();
|
|
||||
//int[] selections = Grid_V_TB_RECEIVE.SelectedRowIndexArray;
|
|
||||
//for (int i = 0, count = Grid_V_TB_RECEIVE.Rows.Count; i < count; i++)
|
|
||||
//{
|
|
||||
// if (selections.Contains(i))
|
|
||||
// {
|
|
||||
// object[] rowDataKeys = Grid_V_TB_RECEIVE.DataKeys[i];
|
|
||||
// _ls.Add(rowDataKeys[1] as string);
|
|
||||
// var state= rowDataKeys[3].ToString();
|
|
||||
// if(state!="0")
|
|
||||
// {
|
|
||||
// Alert.Show("只能选择状态为【收货状态】退货单据!");
|
|
||||
// return;
|
|
||||
// }
|
|
||||
// }
|
|
||||
//}
|
|
||||
//if (_ls.Select(p => p.Contains("C.")).Count() > 0)
|
|
||||
//{
|
|
||||
// PageContext.RegisterStartupScript(Alert.GetShowInParentReference("只能报废退货单!"));
|
|
||||
// return;
|
|
||||
//}
|
|
||||
|
|
||||
|
|
||||
//var ret = SCP_RECIVECE_CONTROLLER.Save_TB_RECEIVE_STATE(_ls, ReceiveState.Reject, strUserName);
|
|
||||
//PageContext.RegisterStartupScript(Alert.GetShowInParentReference("报废成功"));
|
|
||||
BindData(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,240 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.北京安通林 { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_RECEIVE { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Panel Panel1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Toolbar2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Toolbar Toolbar2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnReject 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnReject; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnCheck 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnCheck; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnDetail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnDetail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnShow 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnShow; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// gp1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.GroupPanel gp1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddtype 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddtype; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// ddl 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.DropDownList ddl; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveBill 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveBill; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplier 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplier; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPO 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPO; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// AsnBillNum 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox AsnBillNum; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// OperName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox OperName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TXT_PartCode 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox TXT_PartCode; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BtnSearch 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BtnSearch; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// BtnSearchDetail 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button BtnSearchDetail; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_RECEIVE 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_RECEIVE; |
|
||||
|
|
||||
/// <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>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
@ -1,103 +0,0 @@ |
|||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_DETAIL.aspx.cs" Inherits="SCP.北京安通林.SCP_RECEIVE_DETAIL" %> |
|
||||
|
|
||||
<!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> |
|
||||
</head> |
|
||||
<body> |
|
||||
<form id="form1" runat="server"> |
|
||||
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
|
||||
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
|
||||
<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="btnDelete" runat="server" OnClick="btnDelete_Click" Text="报废收货退货单" Icon="Accept" OnClientClick="if(!confirm('系统管理员是否要删除删除后不能恢复?'))return false;" EnablePostBack="True"> |
|
||||
</f:Button> |
|
||||
<f:Button ID="btnBack" runat="server" EnablePostBack="True" Text="" Icon="Cancel" OnClick="btnBack_Click" OnClientClick="if(!confirm('是否取消审核?'))return false;"> |
|
||||
</f:Button> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
</Toolbars> |
|
||||
<Items> |
|
||||
<f:Form runat="server" Title=""> |
|
||||
<Items> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="F_PO_DETAIL" Hidden="true"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtBillNo" runat="server" Label="单据号" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtShipBillNo" runat="server" Label="发货单" Text="" Width="600"> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtPlanBillNo" runat="server" Label="订单号" Text="" Readonly="true" /> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label runat="server" /> |
|
||||
|
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtDeliveryAddress" runat="server" Label="地址" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:TextBox ID="txtReceiveTime" runat="server" Label="时间" Text=""> |
|
||||
</f:TextBox> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
|
||||
<Items> |
|
||||
<f:TextBox ID="txtUserName" runat="server" Label="审核员" Text="" Readonly="true" /> |
|
||||
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text=""> |
|
||||
</f:TextBox> |
|
||||
<f:Label ID="TextBox2" runat="server" Text=""> |
|
||||
</f:Label> |
|
||||
</Items> |
|
||||
</f:FormRow> |
|
||||
</Items> |
|
||||
</f:Form> |
|
||||
<f:Toolbar runat="server"> |
|
||||
<Items> |
|
||||
<f:ToolbarSeparator runat="server" /> |
|
||||
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
|
||||
</f:Button> |
|
||||
<f:ToolbarFill runat="server" /> |
|
||||
</Items> |
|
||||
</f:Toolbar> |
|
||||
<f:Grid ID="Grid_V_TB_RECEIVE_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
|
||||
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="PartCode" SortDirection="DESC" |
|
||||
EnableRowSelectEvent="False" AutoScroll="True"> |
|
||||
<Columns> |
|
||||
|
|
||||
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
|
||||
<f:BoundField SortField="RecvBillNum" DataField="RecvBillNum" HeaderText="单据号" ColumnID="Line" Width="100px" /> |
|
||||
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单号" ColumnID="ProductCode" Width="120px" /> |
|
||||
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单号" ColumnID="ProductName" Width="100px" /> |
|
||||
<f:BoundField SortField="PoLine" DataField="PoLine" HeaderText="订单行" ColumnID="UnitCode" Width="60px" /> |
|
||||
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="100px" /> |
|
||||
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="200px" /> |
|
||||
<f:BoundField SortField="Unit" DataField="Unit" HeaderText="单位" ColumnID="Price" Width="80px" /> |
|
||||
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="数量" ColumnID="PlanQty" Width="60px" /> |
|
||||
<f:BoundField SortField="ShipTime" DataField="ShipTime" HeaderText="时间" ColumnID="ShipQty" Width="60px" DataFormatString="{0:yy-MM-dd}"/> |
|
||||
<f:BoundField SortField="Remark" DataField="Remark" HeaderText="备注" ColumnID="ReceiveQty" Width="60px" /> |
|
||||
</Columns> |
|
||||
</f:Grid> |
|
||||
</Items> |
|
||||
</f:Panel> |
|
||||
<f:Window runat="server" ID="Window1" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
|
||||
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
|
||||
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
|
||||
IFrameUrl="about:blank" Height="200px" Width="400px"> |
|
||||
</f:Window> |
|
||||
</form> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,256 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Expressions; |
|
||||
using System.Web; |
|
||||
using System.Web.UI; |
|
||||
using System.Web.UI.WebControls; |
|
||||
using CK.SCP.Models.Enums; |
|
||||
using CK.SCP.Models.ScpEntity; |
|
||||
using CK.SCP.Utils; |
|
||||
using CK.SCP.Controller; |
|
||||
using FineUI; |
|
||||
using System.Data.Entity.Migrations; |
|
||||
|
|
||||
namespace SCP.北京安通林 |
|
||||
{ |
|
||||
public partial class SCP_RECEIVE_DETAIL : PageBase |
|
||||
{ |
|
||||
protected void Page_Load(object sender, EventArgs e) |
|
||||
{ |
|
||||
if (!IsPostBack) |
|
||||
{ |
|
||||
if (!string.IsNullOrEmpty(Request["ID"].Trim())) |
|
||||
{ |
|
||||
F_PO_DETAIL.Hidden = false; |
|
||||
LoadData(); |
|
||||
BindData(); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
F_PO_DETAIL.Hidden = true; |
|
||||
BindData_View(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
public void LoadData() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
_receive.UserInAddress = CurrentUser.FactoryList; |
|
||||
if (GetQueryValue("STATE") != null) |
|
||||
{ |
|
||||
_receive.State = int.Parse(GetQueryValue("STATE")); |
|
||||
} |
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => { |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _rec = ret.Result.FirstOrDefault(); |
|
||||
txtState.Text = _rec.State_DESC; |
|
||||
txtBillNo.Text = _rec.RecvBillNum; |
|
||||
txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd"); |
|
||||
txtShipBillNo.Text = _rec.AsnBillNum; |
|
||||
txtPlanBillNo.Text = _rec.PoBillNum; |
|
||||
txtUserName.Text = _rec.OperName; |
|
||||
txtSupplierName.Text = _rec.VendName; |
|
||||
txtMemo.Text = _rec.Remark; |
|
||||
txtDeliveryAddress.Text = _rec.Site_Desc; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
public void BindData() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.Remark =CurrentUser.UsedDomain; |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
|
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.RecordCount = ret.Result.Count(); |
|
||||
var _ls = SortAndPage(ret.Result, Grid_V_TB_RECEIVE_DETAIL); |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataSource = _ls; |
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
public void BindData_View() |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
if (string.IsNullOrEmpty(Request["ID"].Trim())) |
|
||||
{ |
|
||||
if (!string.IsNullOrEmpty("PartCode")) |
|
||||
{ |
|
||||
_receive.PartCode = Request["PartCode"]; |
|
||||
} |
|
||||
if (!string.IsNullOrEmpty(Request["State"])) |
|
||||
{ |
|
||||
_receive.State = int.Parse(Request["State"]); |
|
||||
} |
|
||||
} |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.RecordCount = ret.Result.Count(); |
|
||||
var _ls = SortAndPage(ret.Result, Grid_V_TB_RECEIVE_DETAIL); |
|
||||
|
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataSource = _ls; |
|
||||
Grid_V_TB_RECEIVE_DETAIL.DataBind(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
protected void btnCheck_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
//try
|
|
||||
//{
|
|
||||
// string id = GetQueryValue("ID");
|
|
||||
// _Model = ReceiveDetailController.GetlistByBillNum(id);
|
|
||||
// bool flag = ReceiveDetailController.UpdateReceive(_Model);
|
|
||||
// if (flag)
|
|
||||
// PageContext.Refresh();
|
|
||||
//}
|
|
||||
//catch (Exception ex)
|
|
||||
//{
|
|
||||
// Alert.ShowInTop(ex.Message);
|
|
||||
//}
|
|
||||
} |
|
||||
//导出
|
|
||||
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
_receive.Remark = CurrentUser.UsedDomain; |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
|
|
||||
Dictionary<string, string> cellheader = new Dictionary<string, string> { |
|
||||
{ "RecvBillNum", "单据号" }, |
|
||||
{ "AsnBillNum", "发货单号" }, |
|
||||
{ "PoBillNum", "订单号" }, |
|
||||
{ "PoLine", "订单行" }, |
|
||||
{ "PartCode", "零件号" }, |
|
||||
{ "PartDesc1", "零件名称" }, |
|
||||
{ "Unit", "单位" }, |
|
||||
{ "Qty", "数量" }, |
|
||||
//{ "ReceivedQty", "已开票数量" },
|
|
||||
{ "ShipTime", "时间" }, |
|
||||
{ "Remark", "备注" }, |
|
||||
}; |
|
||||
|
|
||||
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "审核明细"); |
|
||||
|
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
protected void btnDelete_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
|
|
||||
var _receive = new V_TB_RECEIVE(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
_receive.Site = GetQueryValue("Site"); |
|
||||
if (GetQueryValue("STATE") != null) |
|
||||
{ |
|
||||
_receive.State = int.Parse(GetQueryValue("STATE")); |
|
||||
} |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _rec = ret.Result.FirstOrDefault(); |
|
||||
if (CurrentUser.Name == "admin") |
|
||||
{ |
|
||||
var asn = SCPDB.TB_RECEIVE.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Site==_rec.Site).FirstOrDefault(); |
|
||||
var detail = SCPDB.TB_RECEIVE_DETAIL.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Remark == _rec.Site).ToArray(); |
|
||||
if (asn != null) |
|
||||
{ |
|
||||
asn.State = -1; |
|
||||
asn.IsDeleted = true; |
|
||||
SCPDB.TB_RECEIVE.AddOrUpdate(asn); |
|
||||
} |
|
||||
if (detail.Count() > 0) |
|
||||
{ |
|
||||
foreach (var itm in detail) |
|
||||
{ |
|
||||
itm.IsDeleted = true; |
|
||||
itm.State = -1; |
|
||||
} |
|
||||
SCPDB.TB_RECEIVE_DETAIL.AddOrUpdate(detail); |
|
||||
} |
|
||||
if (SCPDB.SaveChanges() != -1) |
|
||||
{ |
|
||||
Alert.Show("收货单删除成功"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
protected void btnBack_Click(object sender, EventArgs e) |
|
||||
{ |
|
||||
var _receive = new V_TB_RECEIVE(); |
|
||||
_receive.RecvBillNum = GetQueryValue("ID"); |
|
||||
_receive.Site =GetQueryValue("Site"); |
|
||||
_receive.State = 1; |
|
||||
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => |
|
||||
{ |
|
||||
if (ret.State == ReturnStatus.Succeed) |
|
||||
{ |
|
||||
var _rec = ret.Result.FirstOrDefault(); |
|
||||
if (CurrentUser.Name == "admin" || CurrentUser.RoleList.Contains("分厂管理员") || CurrentUser.RoleList.Contains("收货审核人员")) |
|
||||
{ |
|
||||
if (_rec != null) |
|
||||
{ |
|
||||
int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.PoBillNum == _rec.PoBillNum).Count(); |
|
||||
if (_count > 0) |
|
||||
{ |
|
||||
Alert.Show("不能取消已经开票!"); |
|
||||
return; |
|
||||
} |
|
||||
var rec = SCPDB.TB_RECEIVE.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Site == _rec.Site).FirstOrDefault(); |
|
||||
var detail = SCPDB.TB_RECEIVE_DETAIL.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Remark == _rec.Site).ToArray(); |
|
||||
if (rec != null) |
|
||||
{ |
|
||||
rec.State = 0; |
|
||||
rec.IsDeleted = false; |
|
||||
SCPDB.TB_RECEIVE.AddOrUpdate(rec); |
|
||||
} |
|
||||
if (detail.Count() > 0) |
|
||||
{ |
|
||||
foreach (var itm in detail) |
|
||||
{ |
|
||||
itm.IsDeleted = false; |
|
||||
itm.State = 0; |
|
||||
} |
|
||||
SCPDB.TB_RECEIVE_DETAIL.AddOrUpdate(detail); |
|
||||
} |
|
||||
if (SCPDB.SaveChanges() != -1) |
|
||||
{ |
|
||||
BindData(); |
|
||||
Alert.Show("成功取消审核状态!"); |
|
||||
} |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
Alert.Show("当前单据不是审核状态单据!"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,204 +0,0 @@ |
|||||
//------------------------------------------------------------------------------
|
|
||||
// <自动生成>
|
|
||||
// 此代码由工具生成。
|
|
||||
//
|
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
|
||||
// 重新生成代码,则所做更改将丢失。
|
|
||||
// </自动生成>
|
|
||||
//------------------------------------------------------------------------------
|
|
||||
|
|
||||
namespace SCP.北京安通林 { |
|
||||
|
|
||||
|
|
||||
public partial class SCP_RECEIVE_DETAIL { |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// form1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Panel1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </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>
|
|
||||
/// btnDelete 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnDelete; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnBack 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnBack; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// F_PO_DETAIL 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.FormRow F_PO_DETAIL; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtShipBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtShipBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtPlanBillNo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtPlanBillNo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtState 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtState; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtSupplierName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtSupplierName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtDeliveryAddress 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtDeliveryAddress; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtReceiveTime 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtReceiveTime; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtUserName 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtUserName; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// txtMemo 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.TextBox txtMemo; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// TextBox2 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Label TextBox2; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// btnOutput 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Button btnOutput; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Grid_V_TB_RECEIVE_DETAIL 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Grid Grid_V_TB_RECEIVE_DETAIL; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Window1 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window Window1; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// WindowUpload 控件。
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// 自动生成的字段。
|
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||
/// </remarks>
|
|
||||
protected global::FineUI.Window WindowUpload; |
|
||||
} |
|
||||
} |
|
Loading…
Reference in new issue