20260224 档案移交表

This commit is contained in:
2026-02-24 17:00:56 +08:00
parent 40eab764a1
commit d45de18cc5
30 changed files with 2197 additions and 994 deletions
@@ -0,0 +1,96 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ArchivalTransfer.aspx.cs" Inherits="FineUIPro.Web.JGZL.ArchivalTransfer" %>
<!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" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="220px" Title="档案移交表" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" LabelWidth="50px">
</f:DropDownList>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Title="档案移交表" OnNodeCommand="tvControlItem_NodeCommand"
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true">
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="档案移交表"
TitleToolTip="档案移交表" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnPrint" Text="档案移交表打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtProjectCode" runat="server" Label="施工号" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
<f:TextBox ID="txtTransferringDepart" runat="server" Label="移交部门" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtFileName" runat="server" Label="文件名称" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
<f:NumberBox ID="txtQuantity" runat="server" Label="数量" LabelAlign="Right" LabelWidth="110px" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTransferringMan" runat="server" Label="移交人" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
<f:DatePicker ID="txtTransferringDate" runat="server" Label="日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtReviewer" runat="server" Label="审核人" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
<f:DatePicker ID="txtReviewDate" runat="server" Label="日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRecipient" runat="server" Label="接收人" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
<f:DatePicker ID="txtReceivingDate" runat="server" Label="日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowPrint" Title="打印档案移交表" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
</form>
</body>
</html>
@@ -0,0 +1,257 @@
using BLL;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.JGZL
{
public partial class ArchivalTransfer : PageBase
{
#region 定义变量
/// <summary>
/// 主键
/// </summary>
private string ArchivalTransferId
{
get
{
return (string)ViewState["ArchivalTransferId"];
}
set
{
ViewState["ArchivalTransferId"] = value;
}
}
#endregion
#region 加载页面
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
PageData();
}
}
#endregion
#region 加载树项目
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "项目";
rootNode.ToolTip = "项目";
rootNode.NodeID = "0";
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
List<Model.Base_Project> projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
if (this.drpProjectId.SelectedValue != BLL.Const._Null)
{
projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList();
}
foreach (var item in projects)
{
TreeNode rootProjectNode = new TreeNode();//定义根节点
rootProjectNode.Text = item.ProjectCode;
rootProjectNode.NodeID = item.ProjectId;
rootProjectNode.EnableClickEvent = true;
rootProjectNode.Expanded = true;
rootProjectNode.ToolTip = item.ProjectName;
rootProjectNode.CommandName = "项目名称";
rootNode.Nodes.Add(rootProjectNode);
}
}
#endregion
#region 点击TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.PageData();
}
}
#endregion
#region 查询
///<summary>
///查询
///</summary>
///<param name="sender"></param>
///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
PageData();
}
#endregion
/// <summary>
/// 清空文本
/// </summary>
private void EmptyText()
{
txtProjectCode.Text = string.Empty;
txtTransferringDepart.Text = string.Empty;
txtFileName.Text = string.Empty;
txtQuantity.Text = string.Empty;
txtTransferringMan.Text = string.Empty;
txtTransferringDate.Text = string.Empty;
txtReviewer.Text = string.Empty;
txtReviewDate.Text = string.Empty;
txtRecipient.Text = string.Empty;
txtReceivingDate.Text = string.Empty;
}
private void PageData()
{
EmptyText();
string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(projectId))
{
var report = BLL.ArchivalTransferService.GetArchivalTransferByProjectId(projectId);
if (report != null)
{
this.ArchivalTransferId = report.ArchivalTransferId;
this.txtProjectCode.Text = BLL.Base_ProjectService.GetProjectCode(projectId);
this.txtTransferringDepart.Text = report.TransferringDepart;
if (!string.IsNullOrEmpty(report.FileName))
{
this.txtFileName.Text = report.FileName;
}
else
{
this.txtFileName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName + "交工技术文件";
}
this.txtQuantity.Text = report.Quantity.HasValue ? report.Quantity.ToString() : "1";
this.txtTransferringMan.Text = report.TransferringMan;
this.txtTransferringDate.Text = report.TransferringDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.TransferringDate) : "";
this.txtReviewer.Text = report.Reviewer;
this.txtReviewDate.Text = report.ReviewDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.ReviewDate) : "";
this.txtRecipient.Text = report.Recipient;
this.txtReceivingDate.Text = report.ReceivingDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.ReceivingDate) : "";
}
else
{
this.ArchivalTransferId = string.Empty;
this.txtProjectCode.Text = BLL.Base_ProjectService.GetProjectCode(projectId);
this.txtFileName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName + "交工技术文件";
this.txtQuantity.Text = "1";
}
}
}
#region 保存
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ArchivalTransferMenuId, BLL.Const.BtnSave))
{
Model.JGZL_ArchivalTransfer newArchivalTransfer = new Model.JGZL_ArchivalTransfer();
newArchivalTransfer.TransferringDepart = this.txtTransferringDepart.Text;
newArchivalTransfer.FileName = this.txtFileName.Text;
newArchivalTransfer.Quantity = Funs.GetNewInt(this.txtQuantity.Text);
newArchivalTransfer.TransferringMan = this.txtTransferringMan.Text;
newArchivalTransfer.TransferringDate = Funs.GetNewDateTime(this.txtTransferringDate.Text);
newArchivalTransfer.Reviewer = this.txtReviewer.Text;
newArchivalTransfer.ReviewDate = Funs.GetNewDateTime(this.txtReviewDate.Text);
newArchivalTransfer.Recipient = this.txtRecipient.Text;
newArchivalTransfer.ReceivingDate = Funs.GetNewDateTime(this.txtReceivingDate.Text);
if (!string.IsNullOrEmpty(this.ArchivalTransferId))
{
newArchivalTransfer.ArchivalTransferId = this.ArchivalTransferId;
BLL.ArchivalTransferService.UpdateArchivalTransfer(newArchivalTransfer);
ShowNotify("修改成功!", MessageBoxIcon.Success);
}
else
{
newArchivalTransfer.ProjectId = this.tvControlItem.SelectedNodeID;
newArchivalTransfer.ArchivalTransferId = SQLHelper.GetNewID(typeof(Model.JGZL_ArchivalTransfer));
this.ArchivalTransferId = newArchivalTransfer.ArchivalTransferId;
BLL.ArchivalTransferService.AddArchivalTransfer(newArchivalTransfer);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#endregion
#region 打印
/// <summary>
/// 打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null)
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ProjectCode", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode);
keyValuePairs.Add("TransferringDepart", this.txtTransferringDepart.Text);
keyValuePairs.Add("FileName", this.txtFileName.Text);
keyValuePairs.Add("Quantity", this.txtQuantity.Text);
keyValuePairs.Add("TransferringMan", this.txtTransferringMan.Text);
keyValuePairs.Add("TransferringDate", this.txtTransferringDate.Text);
keyValuePairs.Add("Reviewer", this.txtReviewer.Text);
keyValuePairs.Add("ReviewDate", this.txtReviewDate.Text);
keyValuePairs.Add("Recipient", this.txtRecipient.Text);
keyValuePairs.Add("ReceivingDate", this.txtReceivingDate.Text);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\档案移交表.frx";
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}
@@ -0,0 +1,233 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JGZL
{
public partial class ArchivalTransfer
{
/// <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>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProjectId;
/// <summary>
/// tvControlItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtProjectCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProjectCode;
/// <summary>
/// txtTransferringDepart 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTransferringDepart;
/// <summary>
/// txtFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFileName;
/// <summary>
/// txtQuantity 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtQuantity;
/// <summary>
/// txtTransferringMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTransferringMan;
/// <summary>
/// txtTransferringDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtTransferringDate;
/// <summary>
/// txtReviewer 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtReviewer;
/// <summary>
/// txtReviewDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtReviewDate;
/// <summary>
/// txtRecipient 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRecipient;
/// <summary>
/// txtReceivingDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtReceivingDate;
/// <summary>
/// WindowPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowPrint;
}
}