2024-03-11 合同发票修改
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceDataIn.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceDataIn" %>
|
||||
|
||||
<!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" AutoSizePanelID="Panel1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" runat="server" Position="Bottom">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnImport" Icon="DoorIn" runat="server" Text="导入" ToolTip="数据导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" Text="下载模板" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="请选择导入的Eexce文件" Width="500px">
|
||||
</f:FileUpload>
|
||||
<f:HiddenField ID="hdFileName" runat="server"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,147 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
public partial class InvoiceDataIn : PageBase
|
||||
{
|
||||
#region 加载
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var message = string.Empty;
|
||||
errorInfos = string.Empty;
|
||||
if (fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var IsXls = Path.GetExtension(fuAttachUrl.FileName).Trim().ToLower();
|
||||
if (IsXls != ".xlsx")
|
||||
{
|
||||
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(errorInfos)) errorInfos = string.Empty;
|
||||
var rootPath = Server.MapPath("~/");
|
||||
var initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath)) Directory.CreateDirectory(initFullPath);
|
||||
//指定上传文件名称
|
||||
hdFileName.Text = Funs.GetNewFileName() + IsXls;
|
||||
//上传文件路径
|
||||
var filePath = initFullPath + hdFileName.Text;
|
||||
//文件上传服务器
|
||||
fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
//文件上传服务器后的名称
|
||||
var fileName = rootPath + initPath + hdFileName.Text;
|
||||
|
||||
ResponeData responeData;
|
||||
responeData = PhtglInvoiceService.ImportData(fileName, this.CurrUser.LoginProjectId,this.CurrUser.PersonId);
|
||||
|
||||
|
||||
if (responeData.code == 1)
|
||||
{
|
||||
ShowNotify("数据导入成功!", MessageBoxIcon.Success);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(responeData.message, MessageBoxIcon.Error);
|
||||
|
||||
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 定义项
|
||||
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private readonly string initPath = Const.ExcelUrl; //"File\\Excel\\DataIn\\";
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 模板下载
|
||||
|
||||
/// <summary>
|
||||
/// 模板下载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定要下载模板吗?", string.Empty,
|
||||
MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"),
|
||||
PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
var rootPath = Server.MapPath("~/");
|
||||
var uploadfilepath = rootPath + Const.InvoiceTemplateUrl;
|
||||
var filePath = Const.InvoiceTemplateUrl;
|
||||
var fileName = Path.GetFileName(filePath);
|
||||
var info = new FileInfo(uploadfilepath);
|
||||
var fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition",
|
||||
"attachment;filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
|
||||
|
||||
public partial class InvoiceDataIn
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrder.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrder" %>
|
||||
|
||||
<!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>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.f-grid-row.yellow {
|
||||
background-color: YellowGreen;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.f-grid-row.red {
|
||||
background-color: Yellow;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" ForceFit="True"
|
||||
runat="server" BoxFlex="1" DataKeyNames="InvoiceId" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="InvoiceId" AllowSorting="true" SortField="InvoiceId"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowCommand="Grid1_RowCommand" OnRowDataBound="Grid1_RowDataBound">
|
||||
<toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<items>
|
||||
<%-- <f:Button ID="btnOrderInDetail" ToolTip="入库详情" Text="入库详情" Icon="ApplicationEdit" runat="server"
|
||||
OnClick="btnOrderInDetail_OnClick">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOrderOutDetail" ToolTip="出库详情" Text="出库详情" Icon="ApplicationEdit" runat="server"
|
||||
OnClick="btnOrderOutDetail_OnClick">
|
||||
</f:Button>--%>
|
||||
</items>
|
||||
</f:Toolbar>
|
||||
</toolbars>
|
||||
<columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="ContractName" DataField="ContractName" SortField="ContractName" Hidden="True"
|
||||
FieldType="String" HeaderText="合同名称" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ContractNum" DataField="ContractNum" SortField="ContractNum"
|
||||
FieldType="String" HeaderText="合同编号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SellerName" DataField="SellerName" SortField="SellerName"
|
||||
FieldType="String" HeaderText="供应商名称" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="InvoiceDate" DataField="InvoiceDate" SortField="InvoiceDate"
|
||||
FieldType="String" HeaderText="开票日期" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="AmountExcludingTax" DataField="AmountExcludingTax" SortField="AmountExcludingTax"
|
||||
FieldType="String" HeaderText="未税金额(元)" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalTax" DataField="TotalTax" SortField="TotalTax"
|
||||
FieldType="String" HeaderText="税额(元)" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="InvoiceAmount" DataField="InvoiceAmount" SortField="InvoiceAmount"
|
||||
FieldType="String" HeaderText="价税合计(元" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfState" Width="150px" HeaderText="出入库状态" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# BLL.PhtglInvoiceService.GetState(Eval("InvoiceId"))%>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</f:TemplateField>
|
||||
<f:LinkButtonField Width="150px" ColumnID="btnOrderInDetail" TextAlign="Center" CommandName="OrderInDetail" Text="入库详情" Hidden="True"/>
|
||||
<f:LinkButtonField Width="150px" ColumnID="btnOrderOutDetail" TextAlign="Center" CommandName="OrderOutDetail" Text="出库详情" Hidden="True"/>
|
||||
</columns>
|
||||
<%-- <listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</listeners>--%>
|
||||
<pageitems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="100000" />
|
||||
</f:DropDownList>
|
||||
</pageitems>
|
||||
</f:Grid>
|
||||
</items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
|
||||
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="编辑" EnableIFrame="true" Height="650px"
|
||||
Width="1200px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
<%-- var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}--%>
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
public partial class InvoiceOrder : PageBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1);
|
||||
Grid1.RecordCount = PhtglInvoiceService.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GV 数据操作
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
//{
|
||||
// this.BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
this.Grid1.PageIndex = e.NewPageIndex;
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
this.Grid1.SortDirection = e.SortDirection;
|
||||
this.Grid1.SortField = e.SortField;
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 关闭弹出窗
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取权限按钮
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_InvoiceStandingBookMenuId);
|
||||
if (buttonList.Count > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
// this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
//this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
// this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 500;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID == "tfNumber")
|
||||
{
|
||||
html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName== "OrderInDetail")
|
||||
{
|
||||
Window1.Title = "入库单详情";
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "0", "编辑 - ")));
|
||||
}
|
||||
else if(e.CommandName== "OrderOutDetail")
|
||||
{
|
||||
Window1.Title = "出库单详情";
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "1", "编辑 - ")));
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
var id = e.RowID;
|
||||
var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(id);
|
||||
if (model.State> PhtglInvoiceService.StateDataIn)
|
||||
{
|
||||
Grid1.FindColumn("btnOrderInDetail").Hidden = false;
|
||||
}
|
||||
if (model.State >= PhtglInvoiceService.StateInPutApproveSuccess)
|
||||
{
|
||||
Grid1.FindColumn("btnOrderOutDetail").Hidden = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
|
||||
|
||||
public partial class InvoiceOrder
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderDetail.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrderDetail" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
.f-readonly {
|
||||
opacity: .5;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<f:PageManager runat="server" AutoSizePanelID="Form2" />
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="入库单详情"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="TbCreate" Position="Top" ToolbarAlign="Right" runat="server" Hidden="True">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" ToolTip="保存" Text="保存" Icon="SystemSave" OnClick="btnSave_Click"
|
||||
EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEditProcess" ToolTip="编辑流程" Text="编辑流程" Icon="ApplicationEdit" OnClick="btnEditProcess_Click"
|
||||
EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="TbApprove" Position="Top" ToolbarAlign="Right" runat="server" Hidden="True">
|
||||
<items>
|
||||
<f:Button ID="btnAgree" Icon="SystemSave" runat="server" ToolTip="同意" Text="同意" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAgree_Click" ConfirmText="请确认是否同意!" Size="Medium">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDisgree" Icon="SystemSave" runat="server" ToolTip="不同意" Text="不同意" ValidateForms="SimpleForm1"
|
||||
OnClick="btnDisgree_Click" ConfirmText="请确认是否不同意!" Size="Medium">
|
||||
</f:Button>
|
||||
</items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
|
||||
<f:Panel ID="Panel4" Layout="Column" ShowHeader="false" ShowBorder="false" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtProjectName" Label="项目名称" Readonly="true" ColumnWidth="40%" runat="server">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtContractNum" Label="合同编号" Readonly="true" ColumnWidth="30%" runat="server">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSellerName" Label="供应商名称" Readonly="true" ColumnWidth="30%" runat="server">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="PanelOrderIn" Layout="Column" ShowHeader="false" ShowBorder="false" runat="server" Hidden="True">
|
||||
<Items>
|
||||
<f:DatePicker ID="txtOrderInDate" Label="入库日期" ColumnWidth="40%" runat="server"></f:DatePicker>
|
||||
<f:TextBox ID="txtInvoiceDate" Label="发票日期" Readonly="true" ColumnWidth="30%" runat="server"></f:TextBox>
|
||||
<f:TextBox ID="txtOrderCode" Label="入库单编号" ColumnWidth="30%" runat="server">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel ID="PanelOrderOut" Layout="Column" ShowHeader="false" ShowBorder="false" runat="server" Hidden="True">
|
||||
<Items>
|
||||
<f:DatePicker ID="txtOrderOutDate" Label="出库日期" ColumnWidth="40%" runat="server"></f:DatePicker>
|
||||
<f:TextBox ID="txtMaterialRequisitionUnit" Label="领料单位" ColumnWidth="30%" runat="server"></f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:TextBox ID="txtInvoiceNumber" Label="发票号码" Readonly="true" ColumnWidth="40%" runat="server">
|
||||
</f:TextBox>
|
||||
|
||||
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="true" Title="入库单列表"
|
||||
runat="server" BoxFlex="1" DataKeyNames="InvoiceDetailId" AllowCellEditing="true" ForceFit="true"
|
||||
DataIDField="InvoiceDetailId" EnableColumnLines="true" Height="400" EnableBigData="true" OnRowCommand="Grid1_OnRowCommand" OnRowDataBound="Grid1_RowDataBound"
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="100px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="300px" ColumnID="GoodsOrServicesName" DataField="GoodsOrServicesName" SortField="GoodsOrServicesName"
|
||||
FieldType="String" HeaderText="产品名称" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SpecificationModel" DataField="SpecificationModel" SortField="SpecificationModel"
|
||||
FieldType="String" HeaderText="产品规格" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Unit" DataField="Unit" SortField="Unit"
|
||||
FieldType="String" HeaderText="计量单位" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Quantity" DataField="Quantity" SortField="Quantity"
|
||||
FieldType="String" HeaderText="数量" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="230px" ColumnID="UnitPrice" DataField="UnitPrice" SortField="UnitPrice"
|
||||
FieldType="String" HeaderText="未含税单价(元)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="UnitPrice" DataField="UnitPrice" SortField="UnitPrice"
|
||||
FieldType="String" HeaderText="未税金额(元)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="200px" EnableColumnHide="false" ColumnID="NoTaxPrice" HeaderText="未税金额(元)" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# GetNoTaxPrice(Eval("Amount"),Eval("Tax")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
|
||||
<f:TemplateField Width="150px" EnableColumnHide="false" ColumnID="TaxRate" HeaderText="税率(%)" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# GetTaxRate(Eval("TaxRate")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="Tax" DataField="Tax" SortField="Tax"
|
||||
FieldType="String" HeaderText="税额(元)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="Amount" DataField="Amount" SortField="Amount"
|
||||
FieldType="String" HeaderText="价税合计(元)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField Width="100px" ColumnID="btnDelete" TextAlign="Center" CommandName="delete" Icon="Delete" ConfirmText="确定要删除本行?" ConfirmTarget="Top" />
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
<f:Panel ID="Panel1" Layout="Column" ShowHeader="True" ShowBorder="False" Margin="10 10 0 0" Title="统计信息" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSumUnitPrice" Label="未税金额(元)" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
|
||||
<f:TextBox ID="txtSumTax" Label="税额(元)" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
|
||||
<f:TextBox ID="txtSumAmount" Label="价税合计(元)" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
|
||||
<f:TextBox ID="txtAmountInWords" Label="金额大写" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Form ID="Form_approve" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="审批流程" Hidden="True"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Items>
|
||||
<f:TextArea ID="txtApproveIdea" Height="100px" Required="true" Label="审批意见" ShowRedStar="true" runat="server" Text="">
|
||||
</f:TextArea>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" EnableAjax="false" ShowHeader="true" Title="审批记录"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ApproveId" AllowCellEditing="true" ForceFit="true"
|
||||
ClicksToEdit="2" DataIDField="ApproveId" EnableColumnLines="true" Height="400" EnableBigData="true"
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label3" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="ApproveMan" DataField="ApproveMan" Width="150px" FieldType="String" HeaderText="审批人" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="IsAgree" DataField="IsAgree" Width="150px" FieldType="String" HeaderText="是否同意" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ApproveIdea" DataField="ApproveIdea" Width="320px" FieldType="String" HeaderText="审批意见" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ApproveDate" DataField="ApproveDate" Width="320px" FieldType="String" HeaderText="审批时间" TextAlign="Left"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
</Items>
|
||||
</f:Form>
|
||||
|
||||
|
||||
</Items>
|
||||
|
||||
</f:Form>
|
||||
|
||||
</div>
|
||||
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
|
||||
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true"
|
||||
Title="编辑" EnableIFrame="true" Height="650px"
|
||||
Width="1200px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
public partial class InvoiceOrderDetail : PageBase
|
||||
{
|
||||
public string InvoiceId {
|
||||
get
|
||||
{
|
||||
return (string)ViewState["InvoiceId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["InvoiceId"] = value;
|
||||
}
|
||||
}
|
||||
public string Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Type"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Type"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InvoiceId = Request.QueryString["InvoiceId"];
|
||||
Type = Request.QueryString["Type"];
|
||||
|
||||
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
table.InvoiceId=InvoiceId;
|
||||
var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
|
||||
var ContractModel = BLL.ContractService.GetContractById(invoiceModel.ContractId);
|
||||
|
||||
if (invoiceModel != null)
|
||||
{
|
||||
txtProjectName.Text=ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId);
|
||||
txtContractNum.Text= ContractModel?.ContractNum;
|
||||
txtSellerName.Text=invoiceModel.SellerName;
|
||||
txtOrderInDate.SelectedDate=invoiceModel.OrderInDate;
|
||||
txtInvoiceDate.Text=invoiceModel.InvoiceDate;
|
||||
txtOrderCode.Text=invoiceModel.OrderCode;
|
||||
txtInvoiceNumber.Text=invoiceModel.InvoiceNumber;
|
||||
txtOrderOutDate.SelectedDate=invoiceModel.OrderOutDate;
|
||||
txtMaterialRequisitionUnit.Text=invoiceModel.MaterialRequisitionUnit;
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
BindApproveData();
|
||||
if (Type=="0")
|
||||
{
|
||||
Grid1.Title = "入库单列表";
|
||||
PanelOrderIn.Hidden = false;
|
||||
}
|
||||
else if (Type=="1")
|
||||
{
|
||||
PanelOrderOut.Hidden = false;
|
||||
Grid1.Title = "出库单列表";
|
||||
}
|
||||
|
||||
if (invoiceModel.CreateUser== this.CurrUser.PersonId) //创建人
|
||||
{
|
||||
TbCreate.Hidden = false;
|
||||
if (invoiceModel.State> PhtglInvoiceService.StateCreate)
|
||||
{
|
||||
Form_approve.Hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (PHTGL_ApproveService.IsApprovingMan(InvoiceId, this.CurrUser.PersonId)) //判断当前人是否审批人
|
||||
{
|
||||
TbApprove.Hidden = false;
|
||||
Form_approve.Hidden = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void BindApproveData()
|
||||
{
|
||||
var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type=="0"? "Invoice_Input" : "Invoice_Output");
|
||||
if (approveModel != null)
|
||||
{
|
||||
Grid2.DataSource = approveModel;
|
||||
Grid2.DataBind();
|
||||
}
|
||||
}
|
||||
public void BindGrid()
|
||||
{
|
||||
var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId);
|
||||
Grid1.DataSource = invoiceDetail;
|
||||
Grid1.DataBind();
|
||||
txtSumUnitPrice.Text= invoiceDetail.Sum(p=>p.UnitPrice).ToString();
|
||||
txtSumTax.Text=invoiceDetail.Sum(p=>p.Tax).ToString();
|
||||
txtSumAmount.Text=invoiceDetail.Sum(p=>p.Amount).ToString();
|
||||
txtAmountInWords.Text = Funs.NumericCapitalization(invoiceDetail.Sum(p => p.Amount)??0);
|
||||
}
|
||||
|
||||
|
||||
protected void Grid1_OnRowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName=="delete")
|
||||
{
|
||||
PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailById(e.RowID);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
if (Type=="1")
|
||||
{
|
||||
Grid1.FindColumn("btnDelete").Hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected string GetTaxRate(object eval)
|
||||
{
|
||||
string result="";
|
||||
if (eval!=null)
|
||||
{
|
||||
decimal taxRate = Convert.ToDecimal(eval);
|
||||
string percentage = string.Format("{0:P0}", taxRate);
|
||||
result= percentage.Replace("%", "");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
protected string GetNoTaxPrice(object amount, object tax)
|
||||
{
|
||||
//获取amount-tax 的值
|
||||
string result="";
|
||||
if (amount != null && tax != null)
|
||||
{
|
||||
decimal amountValue = Convert.ToDecimal(amount);
|
||||
decimal taxValue = Convert.ToDecimal(tax);
|
||||
decimal noTaxPrice = amountValue - taxValue;
|
||||
result= noTaxPrice.ToString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
|
||||
invoiceModel.OrderInDate=txtOrderInDate.SelectedDate;
|
||||
invoiceModel.OrderOutDate=txtOrderOutDate.SelectedDate;
|
||||
invoiceModel.OrderCode=txtOrderCode.Text;
|
||||
invoiceModel.MaterialRequisitionUnit=txtMaterialRequisitionUnit.Text;
|
||||
BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(invoiceModel);
|
||||
ShowNotify("保存成功!" ,MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
protected void btnEditProcess_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Type == "0")
|
||||
{
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "0", "编辑 - ")));
|
||||
}
|
||||
else if (Type == "1")
|
||||
{
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "1", "编辑 - ")));
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAgree_Click(object sender, EventArgs e)
|
||||
{
|
||||
PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type),this.CurrUser.PersonId,true, txtApproveIdea.Text);
|
||||
ShowNotify("审批成功!", MessageBoxIcon.Success);
|
||||
if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
PageContext.RegisterStartupScript("closeActiveTab();");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void btnDisgree_Click(object sender, EventArgs e)
|
||||
{
|
||||
PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), this.CurrUser.PersonId, false, txtApproveIdea.Text);
|
||||
ShowNotify("审批成功!", MessageBoxIcon.Success);
|
||||
if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
PageContext.RegisterStartupScript("closeActiveTab();");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
|
||||
|
||||
public partial class InvoiceOrderDetail
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// TbCreate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar TbCreate;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnEditProcess 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEditProcess;
|
||||
|
||||
/// <summary>
|
||||
/// TbApprove 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar TbApprove;
|
||||
|
||||
/// <summary>
|
||||
/// btnAgree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAgree;
|
||||
|
||||
/// <summary>
|
||||
/// btnDisgree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDisgree;
|
||||
|
||||
/// <summary>
|
||||
/// Panel4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel4;
|
||||
|
||||
/// <summary>
|
||||
/// txtProjectName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProjectName;
|
||||
|
||||
/// <summary>
|
||||
/// txtContractNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtSellerName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSellerName;
|
||||
|
||||
/// <summary>
|
||||
/// PanelOrderIn 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel PanelOrderIn;
|
||||
|
||||
/// <summary>
|
||||
/// txtOrderInDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtOrderInDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtInvoiceDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInvoiceDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtOrderCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOrderCode;
|
||||
|
||||
/// <summary>
|
||||
/// PanelOrderOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel PanelOrderOut;
|
||||
|
||||
/// <summary>
|
||||
/// txtOrderOutDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtOrderOutDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialRequisitionUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialRequisitionUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtInvoiceNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInvoiceNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// txtSumUnitPrice 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSumUnitPrice;
|
||||
|
||||
/// <summary>
|
||||
/// txtSumTax 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSumTax;
|
||||
|
||||
/// <summary>
|
||||
/// txtSumAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSumAmount;
|
||||
|
||||
/// <summary>
|
||||
/// txtAmountInWords 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAmountInWords;
|
||||
|
||||
/// <summary>
|
||||
/// Form_approve 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form_approve;
|
||||
|
||||
/// <summary>
|
||||
/// txtApproveIdea 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtApproveIdea;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderReviewEdit.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrderReviewEdit" %>
|
||||
|
||||
|
||||
<!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" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="基本信息"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="Panel_OrderIn" Title="入库审批编辑" ShowBorder="true" Hidden="True"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
||||
runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="基本信息"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="DropProfessionalEngineer" runat="server" Label="专业工程师" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" LabelAlign="Right" AutoPostBack="true" EnableEdit="true" MaxLength="200" LabelWidth="140px"></f:DropDownList>
|
||||
<f:DropDownList ID="DropConstructionManager" runat="server" Label="施工经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" LabelAlign="Right" AutoPostBack="true" EnableEdit="true" MaxLength="30" LabelWidth="140px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="DropControlManager_In" runat="server" Label="控制经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" LabelAlign="Right" AutoPostBack="true" EnableEdit="true" MaxLength="30" LabelWidth="140px"></f:DropDownList>
|
||||
<f:DropDownList ID="DropProjectManager_In" runat="server" Label="项目经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" LabelAlign="Right" AutoPostBack="true" EnableEdit="true" MaxLength="200" LabelWidth="140px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:ContentPanel ID="Panel_OrderOut" Title="出库审批编辑" ShowBorder="true" Hidden="True"
|
||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
||||
runat="server">
|
||||
<Items>
|
||||
<f:Form ID="Form3" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title=""
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="DropPurchasingMan" runat="server" Label="采购员" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" EnableEdit="true" LabelAlign="Right" AutoPostBack="true" LabelWidth="140px"></f:DropDownList>
|
||||
<f:DropDownList ID="DropControlManager_Out" runat="server" Label="控制经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" AutoPostBack="true" EnableEdit="true" LabelAlign="Right" LabelWidth="140px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="DropProjectManager_Out" runat="server" Label="项目经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" AutoPostBack="true" EnableEdit="true" LabelAlign="Right" LabelWidth="140px"></f:DropDownList>
|
||||
<f:DropDownList ID="DropConUnitMaterialOfficer" runat="server" Label="施工单位材料经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" AutoPostBack="true" EnableEdit="true" LabelAlign="Right" MaxLength="30" LabelWidth="140px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="DropConUnitProjectManager" runat="server" Label="施工单位项目经理" Required="true" ShowRedStar="true" AutoSelectFirstItem="false" AutoPostBack="true" Enabled="true" EnableEdit="true" LabelAlign="Right" MaxLength="200" LabelWidth="140px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSave" runat="server" ToolTip="提交" Text="提交" ValidateForms="SimpleForm1" Size="Medium" Hidden="True"
|
||||
OnClick="btnSubmit_Click" DisableControlBeforePostBack="true" >
|
||||
</f:Button>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" ValidateForms="SimpleForm1" Size="Medium"
|
||||
OnClick="btnSave_Click" >
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Size="Medium">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="基本信息" Hidden="true" EnableIFrame="true" EnableMaximize="true" Maximized="true" EnableDrag="true"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="false" ConstrainSize="true" AutoScroll="true"
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
public partial class InvoiceOrderReviewEdit : PageBase
|
||||
{
|
||||
public string InvoiceId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["InvoiceId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["InvoiceId"] = value;
|
||||
}
|
||||
}
|
||||
public string Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Type"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Type"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InvoiceId = Request.QueryString["InvoiceId"];
|
||||
Type = Request.QueryString["Type"];
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
var model= PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
|
||||
int[] arr = new Int32[] { PhtglInvoiceService.StateCreate, PhtglInvoiceService.StateInPutApproveRefuse, PhtglInvoiceService.StateInPutApproveSuccess, PhtglInvoiceService.StateOutPutApproveRefuse, };
|
||||
if (arr.ToList().Contains(model.State.Value))
|
||||
{
|
||||
if (model.State== PhtglInvoiceService.StateInPutApproveRefuse|| model.State == PhtglInvoiceService.StateOutPutApproveRefuse)
|
||||
{
|
||||
btnSubmit.Text="重新发起流程";
|
||||
}
|
||||
btnSubmit.Hidden = false;
|
||||
}
|
||||
if (Type=="0")
|
||||
{
|
||||
Panel_OrderIn.Hidden = false;
|
||||
|
||||
}
|
||||
else if (Type == "1")
|
||||
{
|
||||
Panel_OrderOut.Hidden = false;
|
||||
}
|
||||
//入库下拉框
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProfessionalEngineer, null, Const.UnitId_SEDIN, null, true);//专业工程师
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConstructionManager, null, Const.UnitId_SEDIN, null, true);//施工经理
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropControlManager_In, null, Const.UnitId_SEDIN, null, true);//控制经理
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProjectManager_In, null, Const.UnitId_SEDIN, null, true);//项目经理
|
||||
//出库下拉框
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropPurchasingMan, null, Const.UnitId_SEDIN, null, true);//采购员
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropControlManager_Out, null, Const.UnitId_SEDIN, null, true);//控制经理
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProjectManager_Out, null, Const.UnitId_SEDIN, null, true);//项目经理
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitMaterialOfficer, null, Const.UnitId_SEDIN, null, true);//施工单位材料经理
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitProjectManager, null, Const.UnitId_SEDIN, null, true);//施工单位项目经理
|
||||
|
||||
var invoiceApproveManEntity= PhtglInvoiceService.GetInvoiceApproveManEntity(InvoiceId);
|
||||
//入库下拉框初始化值
|
||||
DropProfessionalEngineer.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager;
|
||||
DropConstructionManager.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ConstructionManager;
|
||||
DropControlManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ControlManager;
|
||||
DropProjectManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager;
|
||||
//出库下拉框初始化值
|
||||
DropPurchasingMan.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.PurchasingMan;
|
||||
DropControlManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ControlManager;
|
||||
DropProjectManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ProjectManager;
|
||||
DropConUnitMaterialOfficer.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ConUnitMaterialOfficer;
|
||||
DropConUnitProjectManager.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ConUnitProjectManager;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
private bool DropIsNull(Control c)
|
||||
{
|
||||
bool IsOk = true;
|
||||
//遍历控件
|
||||
//myDictionary.Clear();
|
||||
foreach (Control childControl in c.Controls)
|
||||
{
|
||||
if (childControl is DropDownList)
|
||||
{
|
||||
DropDownList tb = (DropDownList)childControl;
|
||||
if (tb.SelectedValue == Const._Null)
|
||||
{
|
||||
IsOk = false;
|
||||
ShowNotify("请选择要审批的" + tb.Label, MessageBoxIcon.Warning);
|
||||
return IsOk;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return IsOk;
|
||||
|
||||
}
|
||||
protected void Save()
|
||||
{
|
||||
if (!DropIsNull(SimpleForm1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var model_In = new Inputapproveman()
|
||||
{
|
||||
ProfessionalEngineer= DropProfessionalEngineer.SelectedValue,
|
||||
ConstructionManager= DropConstructionManager.SelectedValue,
|
||||
ControlManager= DropControlManager_In.SelectedValue,
|
||||
ProjectManager= DropProjectManager_In.SelectedValue
|
||||
};
|
||||
var model_Out = new Outputapproveman()
|
||||
{
|
||||
PurchasingMan = DropPurchasingMan.SelectedValue,
|
||||
ControlManager = DropControlManager_Out.SelectedValue,
|
||||
ProjectManager = DropProjectManager_Out.SelectedValue,
|
||||
ConUnitMaterialOfficer = DropConUnitMaterialOfficer.SelectedValue,
|
||||
ConUnitProjectManager = DropConUnitProjectManager.SelectedValue
|
||||
};
|
||||
if (Type == "0")
|
||||
{
|
||||
PhtglInvoiceService.SaveInputApproveManEntity(InvoiceId, model_In);
|
||||
|
||||
}
|
||||
else if (Type == "1")
|
||||
{
|
||||
PhtglInvoiceService.SaveOutputApproveManEntity(InvoiceId, model_Out);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
PhtglInvoiceService.StartApprovalProcess(InvoiceId);
|
||||
|
||||
ShowNotify("提交成功!",MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
|
||||
|
||||
public partial class InvoiceOrderReviewEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel_OrderIn 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel Panel_OrderIn;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// DropProfessionalEngineer 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropProfessionalEngineer;
|
||||
|
||||
/// <summary>
|
||||
/// DropConstructionManager 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropConstructionManager;
|
||||
|
||||
/// <summary>
|
||||
/// DropControlManager_In 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropControlManager_In;
|
||||
|
||||
/// <summary>
|
||||
/// DropProjectManager_In 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropProjectManager_In;
|
||||
|
||||
/// <summary>
|
||||
/// Panel_OrderOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel Panel_OrderOut;
|
||||
|
||||
/// <summary>
|
||||
/// Form3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form3;
|
||||
|
||||
/// <summary>
|
||||
/// DropPurchasingMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropPurchasingMan;
|
||||
|
||||
/// <summary>
|
||||
/// DropControlManager_Out 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropControlManager_Out;
|
||||
|
||||
/// <summary>
|
||||
/// DropProjectManager_Out 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropProjectManager_Out;
|
||||
|
||||
/// <summary>
|
||||
/// DropConUnitMaterialOfficer 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropConUnitMaterialOfficer;
|
||||
|
||||
/// <summary>
|
||||
/// DropConUnitProjectManager 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropConUnitProjectManager;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceStandingBook.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceStandingBook" %>
|
||||
|
||||
<!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>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.f-grid-row.yellow {
|
||||
background-color: YellowGreen;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.f-grid-row.red {
|
||||
background-color: Yellow;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="InvoiceId" AllowCellEditing="true"
|
||||
ClicksToEdit="2" DataIDField="InvoiceId" AllowSorting="true" SortField="InvoiceId"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<items>
|
||||
<f:Button ID="btnEdit" ToolTip="关联合同" Text="关联合同" Icon="ApplicationEdit" runat="server"
|
||||
OnClick="btnEdit_Click">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnOrderIn" ToolTip="入库" Text="入库" Icon="ApplicationEdit" runat="server"
|
||||
OnClick="btnOrderIn_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Text="删除" Icon="Delete" runat="server" Hidden="True"
|
||||
OnClick="btnDelete_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</items>
|
||||
</f:Toolbar>
|
||||
</toolbars>
|
||||
<columns>
|
||||
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<itemtemplate>
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</itemtemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="150px" ColumnID="ContractName" DataField="ContractName" SortField="ContractName"
|
||||
FieldType="String" HeaderText="合同名称" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ContractNum" DataField="ContractNum" SortField="ContractNum"
|
||||
FieldType="String" HeaderText="合同编号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ContractAmount" DataField="ContractAmount" SortField="ContractAmount"
|
||||
FieldType="String" HeaderText="合同金额" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SellerName" DataField="SellerName" SortField="SellerName"
|
||||
FieldType="String" HeaderText="销方名称" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SellerTaxNumber" DataField="SellerTaxNumber" SortField="SellerTaxNumber"
|
||||
FieldType="String" HeaderText="销方税号" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="InvoiceCode" DataField="InvoiceCode" SortField="InvoiceCode"
|
||||
FieldType="String" HeaderText="发票代码" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="InvoiceNumber" DataField="InvoiceNumber" SortField="InvoiceNumber"
|
||||
FieldType="String" HeaderText="发票号码" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="InvoiceDate" DataField="InvoiceDate" SortField="InvoiceDate"
|
||||
FieldType="String" HeaderText="开票日期" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="AmountExcludingTax" DataField="AmountExcludingTax" SortField="AmountExcludingTax"
|
||||
FieldType="String" HeaderText="不含税金额" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalTax" DataField="TotalTax" SortField="TotalTax"
|
||||
FieldType="String" HeaderText="合计税额" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
||||
FieldType="String" HeaderText="备注" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ImagePath" DataField="ImagePath" SortField="ImagePath"
|
||||
FieldType="String" HeaderText="图片存储路径" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="InvoiceAmount" DataField="InvoiceAmount" SortField="InvoiceAmount"
|
||||
FieldType="String" HeaderText="票面金额" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</columns>
|
||||
<listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</listeners>
|
||||
<pageitems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="100000" />
|
||||
</f:DropDownList>
|
||||
</pageitems>
|
||||
</f:Grid>
|
||||
</items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
|
||||
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="编辑" EnableIFrame="true" Height="650px"
|
||||
Width="1200px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnEdit_Click" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑" Icon="TableEdit">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnDelete_Click" EnablePostBack="true" Icon="Delete"
|
||||
Hidden="true" ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
public partial class InvoiceStandingBook :PageBase
|
||||
{
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
|
||||
table.ProjectId=this.CurrUser.LoginProjectId;
|
||||
table.State = PhtglInvoiceService.StateDataIn;
|
||||
var tb = BLL.PhtglInvoiceService.GetListData(table, Grid1);
|
||||
Grid1.RecordCount = PhtglInvoiceService.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GV 数据操作
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
//protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
//{
|
||||
// this.BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
this.Grid1.PageIndex = e.NewPageIndex;
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
this.Grid1.SortDirection = e.SortDirection;
|
||||
this.Grid1.SortField = e.SortField;
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据编辑事件
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceStandingBookEdit.aspx?InvoiceId={0}", string.Empty, "增加 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string ID = Grid1.SelectedRowID;
|
||||
var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID);
|
||||
if (model != null) ///已上报时不能删除
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceStandingBookEdit.aspx?InvoiceId={0}", ID, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.btnEdit_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(rowID);
|
||||
if (model != null)
|
||||
{
|
||||
BLL.PhtglInvoiceService.DeletePHTGL_InvoiceById(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取权限按钮
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_InvoiceStandingBookMenuId);
|
||||
if (buttonList.Count > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
// this.btnNew.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnMenuDelete.Hidden = false;
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = 500;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID == "tfNumber")
|
||||
{
|
||||
html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(
|
||||
Window1.GetShowReference(string.Format("InvoiceDataIn.aspx?", "导入 - ")));
|
||||
}
|
||||
|
||||
protected void btnOrderIn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string ID = Grid1.SelectedRowID;
|
||||
var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID);
|
||||
if (model != null && !string.IsNullOrEmpty(model.ContractId))
|
||||
{
|
||||
PhtglInvoiceService.ChangeStateToCreate(model.InvoiceId);
|
||||
ShowNotify("操作成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先关联合同!", MessageBoxIcon.Question);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
|
||||
|
||||
public partial class InvoiceStandingBook
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnOrderIn 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOrderIn;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceStandingBookEdit.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceStandingBookEdit" %>
|
||||
|
||||
<!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>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="DropContractCode" runat="server" Label="施工分包合同编号" ShowRedStar="True" Required="True" AutoSelectFirstItem="false" LabelAlign="Right" LabelWidth="140px"></f:DropDownList>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Enabled="False">
|
||||
<Items>
|
||||
<f:TextBox ID="txtInvoiceCode" runat="server" Label="发票代码" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="发票号码" MaxLength="200">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow Enabled="False">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSellerName" runat="server" Label="销方名称" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtInvoiceDate" runat="server" Label="开票日期" MaxLength="200">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow Enabled="False">
|
||||
<Items>
|
||||
<f:TextBox ID="txtAmountExcludingTax" runat="server" Label="不含税金额" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtTotalTax" runat="server" Label="合计税额" MaxLength="200">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Enabled="False">
|
||||
<Items>
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtImagePath" runat="server" Label="图片存储路径" MaxLength="200">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Enabled="False">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSellerTaxNumber" runat="server" Label="销方税号" MaxLength="200">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtInvoiceAmount" runat="server" Label="票面金额" MaxLength="200">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
public partial class InvoiceStandingBookEdit : PageBase
|
||||
{
|
||||
#region
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string InvoiceId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["InvoiceId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["InvoiceId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
this.InvoiceId = Request.Params["InvoiceId"];
|
||||
|
||||
this.DropContractCode.DataTextField = "ContractNum";
|
||||
this.DropContractCode.DataValueField = "ContractId";
|
||||
this.DropContractCode.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
|
||||
this.DropContractCode.DataBind();
|
||||
if (!string.IsNullOrEmpty(this.InvoiceId))
|
||||
{
|
||||
Model.PHTGL_Invoice model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(this.InvoiceId);
|
||||
if (model != null)
|
||||
{
|
||||
|
||||
this.txtInvoiceCode.Text = model.InvoiceCode;
|
||||
this.txtInvoiceNumber.Text = model.InvoiceNumber;
|
||||
this.txtSellerName.Text = model.SellerName;
|
||||
this.txtInvoiceDate.Text = model.InvoiceDate;
|
||||
this.txtAmountExcludingTax.Text = model.AmountExcludingTax.ToString();
|
||||
this.txtTotalTax.Text = model.TotalTax.ToString();
|
||||
this.txtRemark.Text = model.Remark;
|
||||
this.txtImagePath.Text = model.ImagePath;
|
||||
this.txtSellerTaxNumber.Text = model.SellerTaxNumber;
|
||||
this.txtInvoiceAmount.Text = model.InvoiceAmount.ToString();
|
||||
DropContractCode.SelectedValue = model.ContractId;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(this.InvoiceId))
|
||||
{
|
||||
ShowNotify("暂不支持新增",MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var model = PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
|
||||
model.ContractId= DropContractCode.SelectedValue;
|
||||
BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(model);
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.InvoiceManage
|
||||
{
|
||||
|
||||
|
||||
public partial class InvoiceStandingBookEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// DropContractCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropContractCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtInvoiceCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInvoiceCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtInvoiceNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInvoiceNumber;
|
||||
|
||||
/// <summary>
|
||||
/// txtSellerName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSellerName;
|
||||
|
||||
/// <summary>
|
||||
/// txtInvoiceDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInvoiceDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtAmountExcludingTax 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAmountExcludingTax;
|
||||
|
||||
/// <summary>
|
||||
/// txtTotalTax 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalTax;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// txtImagePath 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtImagePath;
|
||||
|
||||
/// <summary>
|
||||
/// txtSellerTaxNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSellerTaxNumber;
|
||||
|
||||
/// <summary>
|
||||
/// txtInvoiceAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInvoiceAmount;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user