关键事项、周进度、月度计划
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GJSXDetailEdit.aspx.cs" Inherits="FineUIPro.Web.PZHGL.GJSX.GJSXDetailEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="SimpleForm1" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false"
|
||||
AutoScroll="true" BodyPadding="10px" runat="server" RedStarPosition="BeforeText"
|
||||
LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtProgress_detail" runat="server" Label="进展情况" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlProgressStatus" runat="server" Label="下一步" LabelWidth="150px" Required="true" ShowRedStar="true">
|
||||
<f:ListItem Value="持续跟踪" Text="持续跟踪" Selected="true"></f:ListItem>
|
||||
<f:ListItem Value="申请关闭" Text="申请关闭"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1" MarginLeft="5px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" Text="保存"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" 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,158 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
public partial class GJSXDetailEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 事项Id
|
||||
/// </summary>
|
||||
private string GJSXID
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["GJSXID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["GJSXID"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 事项进展Id
|
||||
/// </summary>
|
||||
private string GJSXDetailId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["GJSXDetailId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["GJSXDetailId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GJSXID = Request.Params["GJSXID"];
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 附件上传
|
||||
|
||||
/// <summary>
|
||||
/// 上传附件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(this.txtProgress_detail.Text.Trim()))
|
||||
{
|
||||
Alert.ShowInParent("请输入进展情况!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
SaveData();
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Gjsx&menuId={1}",
|
||||
this.GJSXDetailId, BLL.Const.GJSXMenuId)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveData();
|
||||
ShowNotify("保存成功", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存事项进展数据
|
||||
/// </summary>
|
||||
protected void SaveData()
|
||||
{
|
||||
var progressStatus = this.ddlProgressStatus.SelectedValue;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var model = new Model.GJSX_detail
|
||||
{
|
||||
GJSXID = this.GJSXID,
|
||||
//Cuid = this.GJSXDetailId,
|
||||
Progress_detail = this.txtProgress_detail.Text.Trim(),
|
||||
ProgressStatus = progressStatus,
|
||||
Progress_user = this.CurrUser.UserId,
|
||||
Date = DateTime.Now,
|
||||
//Sort = sortIndex
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(this.GJSXDetailId))
|
||||
{
|
||||
model.Cuid = this.GJSXDetailId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.GJSXDetailId = SQLHelper.GetNewID(typeof(Model.GJSX_detail));
|
||||
//var lastGJSX = db.GJSX_detail.Where(p => p.GJSXID == this.GJSXID).OrderByDescending(x => x.Sort).FirstOrDefault();
|
||||
//int sortIndex = lastGJSX != null ? (int)lastGJSX.Sort + 1 : 0;
|
||||
//model.Sort = sortIndex;
|
||||
model.Cuid = this.GJSXDetailId;
|
||||
db.GJSX_detail.InsertOnSubmit(model);
|
||||
}
|
||||
|
||||
var gjsx = db.GJSX.Where(p => p.GJSXID == this.GJSXID).FirstOrDefault();
|
||||
if (progressStatus == "申请关闭")
|
||||
{//申请关闭
|
||||
gjsx.State = "3";
|
||||
gjsx.ProgressStatus = "1";
|
||||
}
|
||||
else if (progressStatus == "持续跟踪")
|
||||
{//持续跟踪
|
||||
gjsx.ProgressStatus = "0";
|
||||
}
|
||||
|
||||
db.SubmitChanges();
|
||||
//ShowNotify("保存成功", MessageBoxIcon.Success);
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
|
||||
|
||||
public partial class GJSXDetailEdit
|
||||
{
|
||||
|
||||
/// <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>
|
||||
/// txtProgress_detail 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtProgress_detail;
|
||||
|
||||
/// <summary>
|
||||
/// ddlProgressStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlProgressStatus;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,24 @@
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: Green;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: orangered;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background-color: deepskyblue;
|
||||
}
|
||||
|
||||
.grid-cell {
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏溢出的内容 */
|
||||
text-overflow: ellipsis; /* 使用省略号表示溢出 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -28,40 +46,44 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" ID="state" Label="状态" MaxLength="50" LabelWidth="110px">
|
||||
<f:ListItem Text="关闭" Value="0" />
|
||||
<f:ListItem Text="开放" Value="1" />
|
||||
<f:ListItem Selected="true" Text="正在进行" Value="2" />
|
||||
<f:DropDownList runat="server" ID="state" Label="状态" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" MaxLength="50" LabelWidth="110px">
|
||||
<%--<f:ListItem Text="编辑中" Value="1" />--%>
|
||||
<f:ListItem Text="正在进行" Value="2,3" />
|
||||
<%--<f:ListItem Text="待办" Value="3" />--%>
|
||||
<f:ListItem Text="已超期" Value="4" />
|
||||
<f:ListItem Text="已关闭" Value="0" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropUnitId" runat="server" Label="责任单位" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropUnitId" runat="server" Label="责任单位" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropUserId" runat="server" Label="提出人" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropUserId" runat="server" Label="提出人" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropQuestionTypeID" runat="server" Label="紧急程度" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropQuestionTypeID" runat="server" Label="紧急程度" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropGJSXTypeID" runat="server" Label="事项类别" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropGJSXTypeID" runat="server" Label="事项类别" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropCNProfessional_ID" runat="server" Label="专业" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropCNProfessional_ID" runat="server" Label="专业" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropUser_ReceiveID" runat="server" Label="接受人" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropUser_ReceiveID" runat="server" Label="跟踪人" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropUser_Acceptance" runat="server" Label="验收人" EnableEdit="true" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropUser_Acceptance" runat="server" Label="责任人" AutoSelectFirstItem="false" EnableMultiSelect="true" EnableCheckBoxSelect="true" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
|
||||
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="要求完成时间" ID="txtStartTime" Width="250px" LabelWidth="110px"
|
||||
LabelAlign="right" EnableEdit="false">
|
||||
</f:DatePicker>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="至" ID="txtEndTime" Width="190px" LabelWidth="50px"
|
||||
LabelAlign="right" EnableEdit="false" OnTextChanged="TextBox_TextChanged">
|
||||
</f:DatePicker>
|
||||
<f:Button ID="btnQuery" OnClick="TextBox_TextChanged" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||
Hidden="true">
|
||||
<f:Button ID="btnQuery" OnClick="TextBox_TextChanged" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||
Hidden="true">
|
||||
</f:Button>--%>
|
||||
<%-- <f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationAdd" Hidden="true" runat="server"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>--%>
|
||||
@@ -69,21 +91,28 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField Width="100px" ColumnID="GJSXID" DataField="GJSXID" SortField="GJSXID" Hidden="true"
|
||||
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="50px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%--<f:RenderField Width="100px" ColumnID="GJSXID" DataField="GJSXID" SortField="GJSXID" Hidden="true"
|
||||
FieldType="String" HeaderText="事项ID" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="100px" ColumnID="QuestionTypeName" DataField="QuestionTypeName"
|
||||
FieldType="String" HeaderText="紧急程度" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="GJSXTypeName" DataField="GJSXTypeName" SortField="GJSXTypeName"
|
||||
FieldType="String" HeaderText="事项类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<f:RenderField Width="150px" ColumnID="CNProfessionalID" DataField="CNProfessionalID"
|
||||
FieldType="String" HeaderText="专业" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="Detail" DataField="Detail" SortField="Detail"
|
||||
<f:RenderField Width="220px" ColumnID="Detail" DataField="Detail" SortField="Detail"
|
||||
FieldType="String" HeaderText="事项描述" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="QuestionTypeName" DataField="QuestionTypeName" SortField="QuestionTypeName"
|
||||
FieldType="String" HeaderText="紧急程度" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<f:RenderField Width="160px" ColumnID="GJSXTypeName" DataField="GJSXTypeName"
|
||||
FieldType="String" HeaderText="事项类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="State" DataField="State" SortField="State"
|
||||
<f:RenderField Width="80px" ColumnID="StateStr" DataField="StateStr" SortField="StateStr"
|
||||
FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CreateDate" DataField="CreateDate" SortField="CreateDate"
|
||||
@@ -95,26 +124,20 @@
|
||||
<f:RenderField Width="140px" ColumnID="CloseDate" DataField="CloseDate" SortField="CloseDate"
|
||||
HeaderText="关闭日期" HeaderTextAlign="Center" TextAlign="Center" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="User_ReceiveID" DataField="User_ReceiveID" SortField="User_ReceiveID"
|
||||
FieldType="String" HeaderText="接受人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="User_Acceptance" DataField="User_Acceptance"
|
||||
FieldType="String" HeaderText="验收人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<f:RenderField Width="180px" ColumnID="unitname" DataField="unitname"
|
||||
FieldType="String" HeaderText="责任单位" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="username" DataField="username"
|
||||
FieldType="String" HeaderText="提出人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="unitname" DataField="unitname"
|
||||
FieldType="String" HeaderText="责任单位" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<f:RenderField Width="100px" ColumnID="User_Acceptance" DataField="User_Acceptance"
|
||||
FieldType="String" HeaderText="责任人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="User_ReceiveID" DataField="User_ReceiveID"
|
||||
FieldType="String" HeaderText="跟踪人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="CNProfessionalID" DataField="CNProfessionalID"
|
||||
FieldType="String" HeaderText="专业" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="AttachUrl" DataField="AttachUrl"
|
||||
<f:RenderField Width="200px" ColumnID="AttachUrl" DataField="AttachUrl"
|
||||
FieldType="String" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%-- <f:TemplateField ColumnID="Certificate" Width="250px" HeaderText="职业资格证书" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
using BLL;
|
||||
using NPOI.SS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX
|
||||
@@ -21,26 +24,27 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
UnitService.InitUnitDropDownList(this.DropUnitId, this.CurrUser.LoginProjectId, true);
|
||||
//责任单位
|
||||
UnitService.InitUnitDropDownList(this.DropUnitId, this.CurrUser.LoginProjectId, false);
|
||||
//专业
|
||||
CNProfessionalService.InitCNProfessional(this.DropCNProfessional_ID, true);
|
||||
CNProfessionalService.InitCNProfessional(this.DropCNProfessional_ID, false);
|
||||
//编号
|
||||
string projectCode = BLL.ProjectService.GetProjectCodeByProjectId(this.CurrUser.LoginProjectId);
|
||||
|
||||
//紧急程度
|
||||
QuestionTypeService.InitQuestionTypeDropDownList(this.DropQuestionTypeID, true);
|
||||
QuestionTypeService.InitQuestionTypeDropDownList(this.DropQuestionTypeID, false);
|
||||
//事项类别
|
||||
GJSXTypeService.InitGJSXTypeDropDownList(this.DropGJSXTypeID, true);
|
||||
GJSXTypeService.InitGJSXTypeDropDownList(this.DropGJSXTypeID, false);
|
||||
//验收人
|
||||
UserService.InitUserDropDownList(DropUser_ReceiveID, CurrUser.LoginProjectId, true, string.Empty);
|
||||
UserService.InitUserDropDownList(DropUser_ReceiveID, CurrUser.LoginProjectId, false, string.Empty);
|
||||
//接收人
|
||||
UserService.InitUserDropDownList(DropUser_Acceptance, CurrUser.LoginProjectId, true, string.Empty);
|
||||
UserService.InitUserDropDownList(DropUser_Acceptance, CurrUser.LoginProjectId, false, string.Empty);
|
||||
//提出人
|
||||
UserService.InitUserDropDownList(DropUserId, CurrUser.LoginProjectId, true, string.Empty);
|
||||
UserService.InitUserDropDownList(DropUserId, CurrUser.LoginProjectId, false, string.Empty);
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("GJSXListEdit.aspx?EditType=add") + "return false;";
|
||||
//this.btnNew.OnClientClick = Window1.GetShowReference("GJSXListEdit.aspx?EditType=add") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
@@ -57,7 +61,53 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = "";
|
||||
DataTable tb = BindData();
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var state = tb.Rows[i]["state"].ToString().Trim();
|
||||
var completeDate = tb.Rows[i]["CompleteDate"].ToString();
|
||||
DateTime dtCompleteDate = Convert.ToDateTime(completeDate);
|
||||
if (Grid1.Rows[i].DataKeys[0] != null && !string.IsNullOrWhiteSpace(state))
|
||||
{
|
||||
if (state == "0")
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "green";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "green";
|
||||
}
|
||||
else if (state == "2" || state == "3")
|
||||
{
|
||||
if (DateTime.Now > dtCompleteDate.AddDays(1))
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "red";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "red";
|
||||
//Grid1.Rows[i].Cells[5].Text = "red";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "blue";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "blue";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据加载
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private DataTable BindData()
|
||||
{
|
||||
string strSql = " AND state in (0,2,3,4) ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
@@ -68,38 +118,115 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
}
|
||||
if (this.state.SelectedValue != "null")//状态
|
||||
{
|
||||
strSql += " AND state LIKE " + "'%" + this.state.SelectedText.Trim() + "%'";
|
||||
if (this.state.SelectedItemArray.Count() > 0)
|
||||
{//状态
|
||||
var stateList = String.Join(", ", this.state.SelectedValueArray).Split(',');
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in stateList)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null && item != "4")
|
||||
{
|
||||
strSql += $" OR state = '{item}' ";
|
||||
}
|
||||
else if (item == "4")
|
||||
{
|
||||
strSql += " OR (state <> '0' and getdate() > DATEADD(day, 1, CompleteDate)) ";
|
||||
}
|
||||
i++;
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
|
||||
if (this.DropUserId.SelectedValue != Const._Null)//提出人
|
||||
{
|
||||
strSql += " AND username LIKE " + "'%" + this.DropUserId.SelectedText.Trim() + "%'";
|
||||
if (this.DropUserId.SelectedItemArray.Count() > 1 || (this.DropUserId.SelectedValue != BLL.Const._Null && this.DropUserId.SelectedItemArray.Count() == 1))
|
||||
{//提出人
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropUserId.SelectedItemArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Text) && item.Text != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR username = '{item.Text}' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.DropUser_ReceiveID.SelectedValue != Const._Null)//接受人
|
||||
{
|
||||
strSql += " AND User_ReceiveID LIKE " + "'%" + this.DropUser_ReceiveID.SelectedText.Trim() + "%'";
|
||||
if (this.DropUser_ReceiveID.SelectedItemArray.Count() > 1 || (this.DropUser_ReceiveID.SelectedValue != BLL.Const._Null && this.DropUser_ReceiveID.SelectedItemArray.Count() == 1))
|
||||
{//跟踪人
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropUser_ReceiveID.SelectedItemArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Text) && item.Text != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR User_ReceiveID LIKE '%{item.Text}%' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.DropUnitId.SelectedValue != Const._Null)//责任单位
|
||||
{
|
||||
strSql += " AND unitname LIKE " + "'%" + this.DropUnitId.SelectedText.Trim() + "%'";
|
||||
if (this.DropUser_Acceptance.SelectedItemArray.Count() > 1 || (this.DropUser_Acceptance.SelectedValue != BLL.Const._Null && this.DropUser_Acceptance.SelectedItemArray.Count() == 1))
|
||||
{//责任人
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropUser_Acceptance.SelectedItemArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Text) && item.Text != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR user_Acceptance = '{item.Text}' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.DropCNProfessional_ID.SelectedValue != Const._Null)//专业
|
||||
{
|
||||
strSql += " AND CNProfessionalId LIKE " + "'%" + this.DropCNProfessional_ID.SelectedText.Trim() + "%'";
|
||||
if (this.DropUnitId.SelectedItemArray.Count() > 1 || (this.DropUnitId.SelectedValue != BLL.Const._Null && this.DropUnitId.SelectedItemArray.Count() == 1))
|
||||
{//责任单位
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropUnitId.SelectedItemArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Text) && item.Text != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR unitname LIKE '%{item.Text}%' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.DropQuestionTypeID.SelectedValue != Const._Null)//紧急程度
|
||||
if (this.DropCNProfessional_ID.SelectedItemArray.Count() > 1 || (this.DropCNProfessional_ID.SelectedValue != BLL.Const._Null && this.DropCNProfessional_ID.SelectedItemArray.Count() == 1))
|
||||
{
|
||||
strSql += " AND QuestionTypeName LIKE " + "'%" + this.DropQuestionTypeID.SelectedText.Trim() + "%'";
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropCNProfessional_ID.SelectedValueArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR CNProfessionalId LIKE '%{item}%' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.DropGJSXTypeID.SelectedValue != Const._Null)//事项类别
|
||||
{
|
||||
strSql += " AND GJSXTypeName LIKE " + "'%" + this.DropGJSXTypeID.SelectedText.Trim() + "%'";
|
||||
if (this.DropQuestionTypeID.SelectedItemArray.Count() > 1 || (this.DropQuestionTypeID.SelectedValue != BLL.Const._Null && this.DropQuestionTypeID.SelectedItemArray.Count() == 1))
|
||||
{//紧急程度
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropQuestionTypeID.SelectedItemArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Text) && item.Text != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR QuestionTypeName LIKE '%{item.Text}%' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (this.DropUser_Acceptance.SelectedValue != Const._Null)//验收人
|
||||
{
|
||||
strSql += " AND user_Acceptance LIKE " + "'%" + this.DropUser_Acceptance.SelectedText.Trim() + "%'";
|
||||
if (this.DropGJSXTypeID.SelectedItemArray.Count() > 1 || (this.DropGJSXTypeID.SelectedValue != BLL.Const._Null && this.DropGJSXTypeID.SelectedItemArray.Count() == 1))
|
||||
{//事项类别
|
||||
strSql += " AND (1=2 ";
|
||||
int i = 0;
|
||||
foreach (var item in this.DropGJSXTypeID.SelectedItemArray)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.Text) && item.Text != BLL.Const._Null)
|
||||
{
|
||||
strSql += $" OR GJSXTypeName LIKE '%{item.Text}%' ";
|
||||
}
|
||||
}
|
||||
strSql += ")";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtStartTime.Text))//要求完成时间 start
|
||||
{
|
||||
@@ -114,14 +241,10 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("Sp_GJSX_getlist", parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
return tb;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
@@ -145,11 +268,11 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PersonSetMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNew.Hidden = false;
|
||||
// this.btnImport.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
//{
|
||||
// this.btnNew.Hidden = false;
|
||||
// // this.btnImport.Hidden = false;
|
||||
//}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnMenuEdit.Hidden = false;
|
||||
@@ -329,5 +452,139 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.Rows.Count == 0)
|
||||
{
|
||||
ShowNotify("无数据可导出!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = string.Empty;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
initTemplatePath = Const.GJSXOutTemplateUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
newUrl = uploadfilepath.Replace(".xlsx", "(" + DateTime.Now.ToString("yyyyMMdd") + ").xlsx");
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
}
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
DataTable tb = BindData();
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 10;
|
||||
//font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
|
||||
cellStyle.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
NPOI.SS.UserModel.IRow row = null;
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
int i = 2;
|
||||
for (int j = 0; j < tb.Rows.Count; j++)
|
||||
{
|
||||
string state = tb.Rows[j]["State"].ToString();
|
||||
string createDate = string.Empty;
|
||||
if (tb.Rows[j]["CreateDate"] != DBNull.Value)
|
||||
{
|
||||
createDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["CreateDate"].ToString()));
|
||||
}
|
||||
string completeDate = string.Empty;
|
||||
if (tb.Rows[j]["CompleteDate"] != DBNull.Value)
|
||||
{
|
||||
completeDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["CompleteDate"].ToString()));
|
||||
}
|
||||
string closeDate = string.Empty;
|
||||
if (tb.Rows[j]["CloseDate"] != DBNull.Value)
|
||||
{
|
||||
closeDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["CloseDate"].ToString()));
|
||||
}
|
||||
// 第二步:创建新数据行
|
||||
row = sheet.CreateRow(i);
|
||||
// 添加数据
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue((i - 1).ToString());
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["QuestionTypeName"].ToString());
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["CNProfessionalID"].ToString());
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["Detail"].ToString());
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString());
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["StateStr"].ToString());
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(createDate);
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(completeDate);
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(closeDate);
|
||||
cell = row.CreateCell(9);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["unitname"].ToString());
|
||||
cell = row.CreateCell(10);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["username"].ToString());
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["User_Acceptance"].ToString());
|
||||
cell = row.CreateCell(12);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(tb.Rows[j]["User_ReceiveID"].ToString());
|
||||
//cell = row.CreateCell(13);
|
||||
//cell.CellStyle = cellStyle;
|
||||
//cell.SetCellValue("");
|
||||
i++;
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
+11
-2
@@ -159,13 +159,22 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
|
||||
@@ -11,6 +11,18 @@
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: Green;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: orangered;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background-color: deepskyblue;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -31,7 +43,7 @@
|
||||
<%--<f:TextBox runat="server" Label="提出人" ID="txtUserID" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="210px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="接受人" ID="txtUser_ReceiveID" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
<f:TextBox runat="server" Label="跟踪人" ID="txtUser_ReceiveID" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="210px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="责任单位" ID="txtUnit" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
@@ -44,7 +56,7 @@
|
||||
<f:TextBox runat="server" Label="紧急程度" ID="txtBase_QuestionType" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="300px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:TextBox runat="server" Label="验收人" ID="txtuser_Acceptance" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
<f:TextBox runat="server" Label="责任人" ID="txtuser_Acceptance" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="TextBox_TextChanged" Width="300px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="要求完成时间" ID="txtStartTime" Width="190px" LabelWidth="80px"
|
||||
@@ -67,32 +79,28 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="50px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="true">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<%--<f:RenderField Width="120px" ColumnID="GJSXID" DataField="GJSXID" SortField="GJSXID"
|
||||
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
FieldType="String" HeaderText="事项ID" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="220px" ColumnID="GJSXTypeName" DataField="GJSXTypeName" SortField="GJSXTypeName"
|
||||
FieldType="String" HeaderText="事项类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="Detail" DataField="Detail" SortField="Detail"
|
||||
FieldType="String" HeaderText="事项描述" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="QuestionTypeName" DataField="QuestionTypeName" SortField="QuestionTypeName"
|
||||
FieldType="String" HeaderText="紧急程度" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="unitname" DataField="unitname"
|
||||
FieldType="String" HeaderText="责任单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<f:RenderField Width="100px" ColumnID="QuestionTypeName" DataField="QuestionTypeName"
|
||||
FieldType="String" HeaderText="紧急程度" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="CNProfessionalID" DataField="CNProfessionalID"
|
||||
FieldType="String" HeaderText="专业" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="Certificate" Width="150px" HeaderText="事项进展情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertProgressDetail(Eval("GJSXID")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="90px" ColumnID="State" DataField="State" SortField="State"
|
||||
<f:RenderField Width="350px" ColumnID="Detail" DataField="Detail"
|
||||
FieldType="String" HeaderText="事项描述" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="GJSXTypeName" DataField="GJSXTypeName"
|
||||
FieldType="String" HeaderText="事项类别" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="stateStr" DataField="stateStr" SortField="StateStr"
|
||||
FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CreateDate" DataField="CreateDate" SortField="CreateDate"
|
||||
@@ -104,11 +112,17 @@
|
||||
<f:RenderField Width="140px" ColumnID="CloseDate" DataField="CloseDate" SortField="CloseDate"
|
||||
HeaderText="关闭日期" HeaderTextAlign="Center" TextAlign="Center" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="User_ReceiveID" DataField="User_ReceiveID" SortField="User_ReceiveID"
|
||||
<f:TemplateField ColumnID="Certificate" Width="150px" HeaderText="事项进展情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertProgressDetail(Eval("GJSXID")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="200px" ColumnID="unitname" DataField="unitname"
|
||||
FieldType="String" HeaderText="责任单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="User_ReceiveID" DataField="User_ReceiveID"
|
||||
FieldType="String" HeaderText="跟踪人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="User_Acceptance" DataField="User_Acceptance"
|
||||
FieldType="String" HeaderText="责任人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -58,13 +58,12 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
string strSql = @"select
|
||||
a.GJSXID,a.ProjectId,a.detail,a.Userid,b.username,a.createDate
|
||||
,User_ReceiveID = STUFF((SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%', ',' + a.User_ReceiveID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
, CNProfessionalId = STUFF((SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%', ',' + a.CNProfessional_ID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,Base_Project.ProjectName,Base_Unit.unitname,a.CloseDate
|
||||
,case a.state when 2 then '正在进行' when 3 then '待办' when 0 then '已关闭' when 1 then '开放' end as state
|
||||
,Base_Project.ProjectName,Base_Unit.unitname,a.CloseDate,a.state
|
||||
,case a.state when 2 then '正在进行' when 3 then '待办' when 0 then '已关闭' when 1 then '编辑中' end as stateStr
|
||||
,QuestionTypeName = STUFF((SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%', ',' + a.QuestionTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,GJSXTypeName = STUFF((SELECT ',' + Base_GJSXType.GJSXTypeName FROM dbo.Base_GJSXType where PATINDEX('%,' + RTRIM(Base_GJSXType.GJSXTypeID) + ',%', ',' + a.GJSXTypeID + ',') > 0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.IsManypeople,a.CompleteDate,a.AttachUrl
|
||||
@@ -109,6 +108,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
strSql += " AND a.CsUsers like'%" + uid + "%' ";
|
||||
}
|
||||
|
||||
strSql += " order by a.GJSXID desc ";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -116,11 +116,42 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var state = tb.Rows[i]["state"].ToString().Trim();
|
||||
var completeDate = tb.Rows[i]["CompleteDate"].ToString();
|
||||
DateTime dtCompleteDate = Convert.ToDateTime(completeDate);
|
||||
if (Grid1.Rows[i].DataKeys[0] != null && !string.IsNullOrWhiteSpace(state))
|
||||
{
|
||||
if (state == "0")
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "green";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "green";
|
||||
}
|
||||
else if (state == "2" || state == "3")
|
||||
{
|
||||
if (DateTime.Now > dtCompleteDate.AddDays(1))
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "red";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "red";
|
||||
//Grid1.Rows[i].Cells[5].Text = "red";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Grid1.Rows[i].RowCssClass = "blue";
|
||||
Grid1.Rows[i].CellCssClasses[5] = "blue";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
@@ -179,6 +210,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
int all = Grid1.SelectedRowIndexArray.Length;
|
||||
int succ = 0;
|
||||
string strShowNotify = string.Empty;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
@@ -186,14 +219,22 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
var gjsx = BLL.GJSXService.GetGJSXById(rowID);
|
||||
if (gjsx != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, gjsx.Detail, gjsx.GJSXID, BLL.Const.GJSXMenuId, BLL.Const.BtnDelete);
|
||||
BLL.GJSXItemService.DeleteGJSXMXByGJSXID(rowID);
|
||||
BLL.GJSXProcessService.DeleteProcess(rowID);
|
||||
BLL.GJSXService.DeleteGJSXById(rowID);
|
||||
if (gjsx.State == "1")
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, gjsx.Detail, gjsx.GJSXID, BLL.Const.GJSXMenuId, BLL.Const.BtnDelete);
|
||||
BLL.GJSXItemService.DeleteGJSXMXByGJSXID(rowID);
|
||||
BLL.GJSXProcessService.DeleteProcess(rowID);
|
||||
BLL.GJSXService.DeleteGJSXById(rowID);
|
||||
succ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
if (all != succ)
|
||||
{
|
||||
strShowNotify = "当前事项状态不可删除!";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(strShowNotify))
|
||||
{
|
||||
Alert.ShowInTop(strShowNotify, MessageBoxIcon.Warning);
|
||||
|
||||
+30
-19
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
|
||||
|
||||
public partial class GJSXList {
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
|
||||
|
||||
public partial class GJSXList
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,16 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.PZHGL.GJSX {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑员工</title>
|
||||
<title>编辑关键事项</title>
|
||||
<%-- <link href="../../res/css/common.css" rel="stylesheet" type="text/css" />--%>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
@@ -29,7 +29,7 @@
|
||||
<Items>
|
||||
<f:TextBox ID="txtGJSXID" runat="server" Label="编号" Hidden="true" MaxLength="20" LabelWidth="110px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="DropUnitId" runat="server" Label="责任单位" MaxLength="50" LabelWidth="110px">
|
||||
<f:DropDownList ID="DropUnitId" runat="server" Label="责任单位" AutoPostBack="true" OnSelectedIndexChanged="DropUnitId_SelectedIndexChanged" MaxLength="50" LabelWidth="110px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropCNProfessional_ID" runat="server" Label="专业" MaxLength="50" LabelWidth="110px" EnableCheckBoxSelect="true" EnableMultiSelect="true">
|
||||
</f:DropDownList>
|
||||
@@ -37,10 +37,9 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtUserID" runat="server" Label="提出人" MaxLength="20" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelWidth="110px">
|
||||
<f:TextBox ID="txtUserID" runat="server" Label="提出人" MaxLength="20" Readonly="true" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelWidth="110px">
|
||||
</f:TextBox>
|
||||
<f:DatePicker ID="Date_CreateDate" runat="server" Label="提出日期"
|
||||
LabelWidth="110px">
|
||||
<f:DatePicker ID="Date_CreateDate" runat="server" Label="提出日期" Readonly="true" LabelWidth="110px">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -57,8 +56,7 @@
|
||||
<f:DropDownList ID="DropUser_Acceptance" runat="server" Label="责任人" EmptyText="支持模糊匹配" AutoSelectFirstItem="false" Required="true" ShowRedStar="true" MaxLength="50" LabelWidth="110px"
|
||||
EnableCheckBoxSelect="true" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="Date_CompleteDate" runat="server" Label="要求完成日期" ShowRedStar="true"
|
||||
LabelWidth="110px">
|
||||
<f:DatePicker ID="Date_CompleteDate" runat="server" Label="要求完成日期" MinDate="<%# DateTime.Now.AddDays(1) %>" ShowRedStar="true" LabelWidth="110px">
|
||||
</f:DatePicker>
|
||||
<f:DropDownList ID="DropUser_ReceiveID" runat="server" Label="跟踪人" EmptyText="支持模糊匹配" AutoSelectFirstItem="false" MaxLength="50" LabelWidth="110px"
|
||||
EnableCheckBoxSelect="true" EnableEdit="true"
|
||||
@@ -98,10 +96,8 @@
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<%-- <f:FormRow>
|
||||
<Items>
|
||||
|
||||
<f:RadioButtonList ID="rblState" runat="server" Label="状态" LabelWidth="110px" Enabled="false">
|
||||
<f:RadioItem Selected="true" Value="1" Text="开放" />
|
||||
<f:RadioItem Value="2" Text="正在进行" />
|
||||
@@ -131,28 +127,6 @@
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%--<f:FormRow ID="rowProgressStatus" Hidden="true">
|
||||
<Items>
|
||||
<f:RadioButtonList ID="rblProgressStatus" runat="server" Label="进展申请" LabelWidth="110px" Width="420px"
|
||||
AutoColumnWidth="true">
|
||||
<f:RadioItem Value="0" Text="持续跟踪" />
|
||||
<f:RadioItem Value="1" Text="申请关闭" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="rowCloseProgressCheck" Hidden="true">
|
||||
<Items>
|
||||
<f:RadioButtonList ID="rblProgressResult" runat="server" Label="申请结果" LabelWidth="110px" Width="420px"
|
||||
AutoColumnWidth="true">
|
||||
<f:RadioItem Value="0" Text="同意" Selected="true"/>
|
||||
<f:RadioItem Value="1" Text="驳回" />
|
||||
</f:RadioButtonList>
|
||||
</Items>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProgressReason" runat="server" Label="说明" MaxLength="1000" LabelWidth="110px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</f:ContentPanel>
|
||||
@@ -177,58 +151,37 @@
|
||||
</Toolbars>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="关键事项进展" EnableCollapse="false"
|
||||
runat="server" BoxFlex="1" DataKeyNames="Cuid" EnableColumnLines="true" IsFluid="true"
|
||||
DataIDField="Cuid" SortField="Sort" AllowSorting="false"
|
||||
SortDirection="asc" AllowCellEditing="true" ClicksToEdit="1" OnRowCommand="gvOperateComplianceObligations_RowCommand">
|
||||
|
||||
SortDirection="asc" AllowCellEditing="false" ClicksToEdit="1">
|
||||
<Columns>
|
||||
<f:LinkButtonField Width="40px" ConfirmText="删除选中行?" ConfirmTarget="Parent" CommandName="Delete"
|
||||
ToolTip="删除" Icon="Delete" TextAlign="Center" />
|
||||
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center"
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
<f:RenderField Width="140px" ColumnID="Progress_user" DataField="Progress_user" SortField="Progress_user"
|
||||
FieldType="String" HeaderText="事项进展负责人" HeaderTextAlign="Center" TextAlign="Left" RendererFunction="renderProgress_user">
|
||||
<Editor>
|
||||
<f:DropDownList ID="DropProgress_user" Required="true" runat="server">
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
<f:RenderField Width="100px" ColumnID="ProgressUserName" DataField="ProgressUserName"
|
||||
SortField="ProgressUserName" FieldType="String" HeaderText="负责人" TextAlign="center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="Date" DataField="Date" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="日期">
|
||||
<Editor>
|
||||
<f:DatePicker ID="DatePicker1" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
<f:RenderField Width="380px" ColumnID="Progress_detail" DataField="Progress_detail"
|
||||
SortField="Progress_detail" FieldType="String" HeaderText="事项进展情况" TextAlign="center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="200px" ColumnID="Progress_detail" DataField="Progress_detail" SortField="Progress_detail"
|
||||
FieldType="String" HeaderText="事项进展情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextBox ID="tbxEditorName" Required="true" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
<f:RenderField Width="110px" ColumnID="ProgressStatus" DataField="ProgressStatus"
|
||||
SortField="ProgressStatus" FieldType="String" HeaderText="进展申请" TextAlign="center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField MinWidth="100px" ColumnID="ProgressStatus" DataField="ProgressStatus"
|
||||
FieldType="String" HeaderText="进展申请" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:DropDownList ID="ddlProgressStatus" runat="server" >
|
||||
<f:ListItem Value="" Text="" ></f:ListItem>
|
||||
<f:ListItem Value="持续跟踪" Text="持续跟踪" Selected="true"></f:ListItem>
|
||||
<f:ListItem Value="申请关闭" Text="申请关闭"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
<f:RenderField Width="140px" ColumnID="Date" DataField="Date" SortField="Date"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm" HeaderText="时间" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="80px" CommandName="AttachUrl" ColumnID="AttachUrl"
|
||||
TextAlign="Center" ToolTip="附件查看" Icon="Find" />
|
||||
|
||||
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="80px" CommandName="AttachUrl1" ColumnID="AttachUrl1" Hidden="true"
|
||||
TextAlign="Center" ToolTip="附件查看" Icon="Find" />
|
||||
|
||||
<f:TemplateField ColumnID="AttachFile" Width="150px" HeaderText="附件" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnFileUrl" runat="server" CssClass="ItemLink"
|
||||
Text='<%# BLL.AttachFileService.GetBtnFileUrl(Eval("Cuid")) %>' ToolTip="附件查看"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Form>
|
||||
@@ -236,15 +189,7 @@
|
||||
<f:Form ID="ApproveForm" ShowBorder="false" ShowHeader="false" AutoScroll="true" Hidden="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<%--<f:FormRow ID="rowProgressStatus" Hidden="true">
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlProgressStatus" runat="server" Label="进展申请" LabelWidth="100px">
|
||||
<f:ListItem Value="0" Text="持续跟踪"></f:ListItem>
|
||||
<f:ListItem Value="1" Text="申请关闭"></f:ListItem>
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow> ID="rowCloseProgressCheck"--%>
|
||||
<f:FormRow >
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:RadioButtonList ID="rblProgressResult" runat="server" Label="申请结果" LabelWidth="100px" Width="420px"
|
||||
AutoColumnWidth="true">
|
||||
@@ -259,7 +204,6 @@
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</f:ContentPanel>
|
||||
@@ -302,11 +246,9 @@
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="Button1" ToolTip="关闭" Icon="SystemSaveNew" runat="server" OnClick="btnsubmit_Close" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
<f:Button ID="btnsubmit" ToolTip="提交" Icon="SystemSaveNew" runat="server" OnClick="btnsubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSave" ToolTip="保存" Icon="SystemSave" runat="server"
|
||||
OnClick="btnSave_Click">
|
||||
<f:Button ID="btnSave" ToolTip="保存" Icon="SystemSave" runat="server" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
@@ -320,17 +262,9 @@
|
||||
</f:Window>
|
||||
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="880px"
|
||||
Height="500px">
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="900px" OnClose="Window1_Close"
|
||||
Height="600px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script>
|
||||
var DropProgress_userID = '<%= DropProgress_user.ClientID %>';
|
||||
function renderProgress_user(value) {
|
||||
|
||||
return F(DropProgress_userID).getTextByValue(value);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -8,12 +9,29 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using static System.Runtime.CompilerServices.RuntimeHelpers;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
public partial class GJSXListEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
|
||||
/// <summary>
|
||||
/// 事项Id
|
||||
/// </summary>
|
||||
public string ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ID"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 员工主键
|
||||
/// </summary>
|
||||
@@ -139,7 +157,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
GetCheckManBindGrid4();
|
||||
GJSX_detail.Clear();
|
||||
string EditType = Request.Params["EditType"];
|
||||
string ID = Request.Params["ID"];
|
||||
this.ID = Request.Params["ID"];
|
||||
Table = null;
|
||||
UnitService.InitUnitDropDownList(this.DropUnitId, this.CurrUser.LoginProjectId, false);
|
||||
//专业
|
||||
@@ -153,12 +171,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
//跟踪人 默认是自己
|
||||
UserService.InitUserDropDownList(DropUser_ReceiveID, CurrUser.LoginProjectId, false, string.Empty);
|
||||
|
||||
//责任人 默认是自己
|
||||
UserService.InitUserDropDownList(DropUser_Acceptance, CurrUser.LoginProjectId, false, string.Empty);
|
||||
|
||||
//事项进展负责人
|
||||
UserService.InitUserDropDownList(DropProgress_user, CurrUser.LoginProjectId, false, string.Empty);
|
||||
//DropProgress_user.SelectedValue = this.CurrUser.UserId;
|
||||
////事项进展负责人
|
||||
//UserService.InitUserDropDownList(DropProgress_user, CurrUser.LoginProjectId, false, string.Empty);
|
||||
|
||||
////下一接受人
|
||||
//UserService.InitUserDropDownList(DropNextRecipient, CurrUser.LoginProjectId, false, string.Empty);
|
||||
@@ -166,12 +180,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
if (EditType == "add")
|
||||
{
|
||||
//DropUser_ReceiveID.SelectedValue = CurrUser.UserId;
|
||||
txtGJSXID.Readonly = true;
|
||||
txtUserID.Readonly = true;
|
||||
//Date_CreateDate.Readonly = true;
|
||||
//this.Progress_detail.Visible = false;
|
||||
//this.nextProgress.Visible = false;
|
||||
//txtUserID.Readonly = true;
|
||||
|
||||
|
||||
//编号
|
||||
@@ -180,7 +190,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
|
||||
|
||||
//当前时间
|
||||
this.Date_CreateDate.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now);
|
||||
this.Date_CreateDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", DateTime.Now);
|
||||
///权限
|
||||
this.GetButtonPower();
|
||||
this.UserId = Request.Params["userId"];
|
||||
@@ -190,9 +200,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
this.DropUnitId.SelectedValue = Const.UnitId_CWCEC;
|
||||
}
|
||||
// this.drpDepart.SelectedValue = Const.Depart_constructionId;
|
||||
///角色下拉框
|
||||
//BLL.RoleService.InitRoleDropDownList(this.drpRole, string.Empty, true, true);
|
||||
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.UserId))
|
||||
{
|
||||
var user = BLL.UserService.GetUserByUserId(this.CurrUser.UserId);
|
||||
@@ -205,30 +213,15 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
this.txtUserID.Text = user.UserName;
|
||||
}
|
||||
}
|
||||
//责任人
|
||||
UserService.InitUserDropDownList(DropUser_Acceptance, this.CurrUser.LoginProjectId, false, this.DropUnitId.SelectedValue);
|
||||
}
|
||||
|
||||
if (EditType == "Edit" || EditType == "See") //添加事项进展
|
||||
{
|
||||
//this.Progress_detail.Visible = true;
|
||||
//this.nextProgress.Visible = true;
|
||||
|
||||
|
||||
Progress_detail.Hidden = false;
|
||||
Grid2Binging();
|
||||
Model.GJSX gjsx = BLL.GJSXService.GetGJSXById(ID);
|
||||
//List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//string projectId = this.CurrUser.LoginProjectId;
|
||||
//if (gjsx != null)
|
||||
//{
|
||||
// projectId = gjsx.ProjectId;
|
||||
//}
|
||||
//listStr.Add(new SqlParameter("@ProjectId", projectId));
|
||||
//string sql = "and GJSXID='" + ID + "'";
|
||||
//listStr.Add(new SqlParameter("@sql_where", sql));
|
||||
//SqlParameter[] parameter = listStr.ToArray();
|
||||
//DataTable tb = SQLHelper.GetDataTableRunProc("Sp_GJSX_getlist", parameter);
|
||||
|
||||
//if (tb != null && tb.Rows.Count > 0)
|
||||
//{
|
||||
|
||||
if (!string.IsNullOrEmpty(gjsx.CsUsers))
|
||||
{
|
||||
drpCsUsers.Values = gjsx.CsUsers.Split(',');
|
||||
@@ -237,6 +230,9 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
|
||||
txtGJSXID.Text = gjsx.GJSXID;
|
||||
DropUnitId.SelectedValue = gjsx.UnitId;
|
||||
|
||||
//责任人
|
||||
UserService.InitUserDropDownList(DropUser_Acceptance, this.CurrUser.LoginProjectId, false, gjsx.UnitId);
|
||||
if (!string.IsNullOrEmpty(gjsx.CNProfessional_ID))
|
||||
{
|
||||
List<string> list_CNProfessional_ID = gjsx.CNProfessional_ID.Split(',').ToList();
|
||||
@@ -259,20 +255,9 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
}
|
||||
if (!string.IsNullOrEmpty(gjsx.User_ReceiveID))
|
||||
{
|
||||
//DropUser_ReceiveID.SelectedValue = gjsx.User_ReceiveID;
|
||||
List<string> list_User_ReceiveID = gjsx.User_ReceiveID.Split(',').ToList();
|
||||
DropUser_ReceiveID.SelectedValueArray = list_User_ReceiveID.ToArray();
|
||||
//if (DropUser_ReceiveID.SelectedItemArray.Length > 1)
|
||||
//{
|
||||
// lblIsManyPeople.Hidden = false;
|
||||
// lblIsManyPeople.SelectedValue = gjsx.IsManypeople;
|
||||
//}
|
||||
}
|
||||
// Date_CloseDate.Text = tb.Rows[0]["CloseDate"].ToString();
|
||||
//txtDetail.Text = tb.Rows[0]["detail"].ToString();
|
||||
//txtUserID.Text = tb.Rows[0]["username"].ToString().Trim();
|
||||
//Date_CreateDate.Text = tb.Rows[0]["createDate"].ToString();
|
||||
//Date_CompleteDate.Text = tb.Rows[0]["CompleteDate"].ToString();
|
||||
|
||||
txtDetail.Text = gjsx.Detail;
|
||||
txtUserID.Text = BLL.UserService.GetUserNameByUserId(gjsx.UserID);
|
||||
@@ -284,49 +269,34 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
{
|
||||
Date_CompleteDate.Text = string.Format("{0:yyyy-MM-dd}", gjsx.CompleteDate);
|
||||
}
|
||||
//rblState.SelectedValue = gjsx.State.ToString().Trim();
|
||||
|
||||
//}
|
||||
|
||||
|
||||
if (this.CurrUser.UserId == BLL.Const.sysglyId || this.CurrUser.UserId == BLL.Const.SystemManager)//如果当前登录人是管理员
|
||||
{
|
||||
TextIsEnable(true);
|
||||
txtGJSXID.Readonly = true;
|
||||
//this.Progress_detail.Visible = false;
|
||||
//this.nextProgress.Visible = false;
|
||||
Grid2Binging();
|
||||
}
|
||||
var state = BLL.GJSXService.GetGJSXById(txtGJSXID.Text).State.Trim();
|
||||
//var state = BLL.GJSXService.GetGJSXById(txtGJSXID.Text).State.Trim();
|
||||
var state = gjsx.State.Trim();
|
||||
if (gjsx.UserID == this.CurrUser.UserId)
|
||||
{//如果当前登录人是提出人
|
||||
//rblIsClosed.Visible = false;
|
||||
if (state == "1")
|
||||
{
|
||||
TextIsEnable(true);
|
||||
txtGJSXID.Readonly = true;
|
||||
txtUserID.Readonly = true;
|
||||
Date_CreateDate.Readonly = true;
|
||||
//TextIsEnable(true);
|
||||
////txtGJSXID.Readonly = true;
|
||||
////txtUserID.Readonly = true;
|
||||
//Date_CreateDate.Readonly = true;
|
||||
}
|
||||
else if (state == "2")
|
||||
{
|
||||
Progress_detail.Hidden = false;
|
||||
Button1.Hidden = true;
|
||||
btnsubmit.Hidden = true;
|
||||
btnSave.Hidden = true;
|
||||
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (EditType == "Edit" && state == "3" && !string.IsNullOrWhiteSpace(gjsx.ProgressStatus) && gjsx.ProgressStatus == "1")//gjsx.ProgressStatus.Trim() == "1"
|
||||
{//负责人申请关闭
|
||||
//this.rblProgressStatus.SelectedIndex = int.Parse(gjsx.ProgressStatus);
|
||||
this.ddlProgressStatus.SelectedValue = gjsx.ProgressStatus;
|
||||
//rowProgressStatus.Hidden = false;
|
||||
//this.ddlProgressStatus.SelectedValue = gjsx.ProgressStatus;
|
||||
ApproveForm.Hidden = false;
|
||||
}
|
||||
else
|
||||
@@ -335,76 +305,44 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
btnsubmit.Hidden = true;
|
||||
}
|
||||
btnSave.Visible = false;
|
||||
Progress_detail.Hidden = false;
|
||||
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
|
||||
if (state == "0")
|
||||
{
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(gjsx.User_Acceptance) && gjsx.User_Acceptance.Contains(this.CurrUser.UserId))
|
||||
{//如果当前登录人为责任人
|
||||
if (state == "2")
|
||||
{
|
||||
//rowProgressStatus.Hidden = false;
|
||||
if (!string.IsNullOrWhiteSpace(gjsx.ProgressStatus))
|
||||
{
|
||||
//this.rblProgressStatus.SelectedIndex = int.Parse(gjsx.ProgressStatus);
|
||||
this.ddlProgressStatus.SelectedValue = gjsx.ProgressStatus;
|
||||
//this.ddlProgressStatus.SelectedValue = gjsx.ProgressStatus;
|
||||
}
|
||||
|
||||
Toolbar131.Hidden = false;
|
||||
Progress_detail.Hidden = false;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Hidden = false;
|
||||
Button1.Hidden = true;
|
||||
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Progress_detail.Hidden = true;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Hidden = true;
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
|
||||
if (state == "0" || state == "3")
|
||||
{
|
||||
Progress_detail.Hidden = false;
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(gjsx.User_ReceiveID) && gjsx.User_ReceiveID.Contains(this.CurrUser.UserId))
|
||||
{//跟踪人
|
||||
if (state == "0")
|
||||
{
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
Grid2Binging();
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
else if (state == "3")
|
||||
{
|
||||
if (EditType == "Edit" && !string.IsNullOrWhiteSpace(gjsx.ProgressStatus) && gjsx.ProgressStatus == "1")//gjsx.ProgressStatus.Trim() == "1"
|
||||
{//负责人申请关闭
|
||||
//this.rblProgressStatus.SelectedIndex = int.Parse(gjsx.ProgressStatus);
|
||||
this.ddlProgressStatus.SelectedValue = gjsx.ProgressStatus;
|
||||
//rowProgressStatus.Hidden = false;
|
||||
ApproveForm.Hidden = false;
|
||||
}
|
||||
else
|
||||
@@ -413,127 +351,46 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
btnsubmit.Hidden = true;
|
||||
}
|
||||
|
||||
Progress_detail.Hidden = false;
|
||||
btnSave.Visible = false;
|
||||
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Progress_detail.Hidden = false;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Hidden = true;
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
|
||||
//rblIsClosed.Visible = false;
|
||||
|
||||
|
||||
|
||||
//if (BLL.GJSXProcessService.GetGJSXProcessByGJSXIDAndUserId(this.txtGJSXID.Text, this.CurrUser.UserId) > 0)
|
||||
//{
|
||||
// Grid2Binging();
|
||||
//}
|
||||
}
|
||||
else //浏览者
|
||||
{
|
||||
Progress_detail.Hidden = false;
|
||||
|
||||
//Progress_detail.Enabled = false;
|
||||
//this.nextProgress.Visible = false;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Visible = false;
|
||||
Button1.Hidden = true;
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(gjsx.User_Acceptance) && gjsx.User_Acceptance.Contains(this.CurrUser.UserId)
|
||||
&& state == "2") //如果当前登录人为责任人
|
||||
//如果当前登录人为责任人
|
||||
if (!string.IsNullOrEmpty(gjsx.User_Acceptance) && gjsx.User_Acceptance.Contains(this.CurrUser.UserId) && state == "2")
|
||||
{
|
||||
if (state == "2")
|
||||
{
|
||||
Toolbar131.Hidden = false;
|
||||
Progress_detail.Hidden = false;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Hidden = false;
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Progress_detail.Hidden = true;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Hidden = true;
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
|
||||
if (state == "0" || state == "3")
|
||||
{
|
||||
Progress_detail.Hidden = false;
|
||||
Grid2Binging();
|
||||
Grid2.AllColumns[0].Hidden = true;
|
||||
Grid2.AllColumns[6].Hidden = true;
|
||||
Grid2.AllColumns[7].Hidden = false;
|
||||
}
|
||||
Toolbar131.Hidden = false;
|
||||
btnSave.Visible = false;
|
||||
btnsubmit.Hidden = false;
|
||||
Button1.Hidden = true;
|
||||
}
|
||||
|
||||
//if (BLL.GJSXService.GetGJSXById(this.txtGJSXID.Text).IsManypeople == "1")
|
||||
//{
|
||||
//int i = 0;
|
||||
//List<string> infos = this.DropUser_ReceiveID.Text.Trim().Split(',').ToList();
|
||||
//foreach (var item in infos)
|
||||
//{
|
||||
// Model.Sys_User user = BLL.UserService.GetUserByUserName(item);
|
||||
// if (user != null)
|
||||
// {
|
||||
// if (user.UserId == this.CurrUser.UserId)
|
||||
// {
|
||||
// i++;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//if (i > 0)
|
||||
//{
|
||||
// this.nextProgress.Visible = false;
|
||||
// if (BLL.GJSXProcessService.GetGJSXProcessByGJSXIDAndUserId(this.txtGJSXID.Text, this.CurrUser.UserId) > 1)
|
||||
// {
|
||||
// this.nextProgress.Visible = true;
|
||||
// this.rblIsClosed.Visible = false;
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.nextProgress.Visible = true;
|
||||
// this.rblIsClosed.Visible = false;
|
||||
//}
|
||||
//if (IsClosed_ManyPeople())
|
||||
//{
|
||||
// this.nextProgress.Visible = true;
|
||||
// this.rblIsClosed.Visible = true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.rblIsClosed.Visible = false;
|
||||
|
||||
//}
|
||||
//}
|
||||
|
||||
if (BLL.GJSXService.GetGJSXById(this.txtGJSXID.Text).State.Trim() == "0")
|
||||
{
|
||||
//Progress_detail.Enabled = false;
|
||||
//nextProgress.Visible = false;
|
||||
btnsubmit.Visible = false;
|
||||
}
|
||||
|
||||
btnSave.Visible = false;
|
||||
TextIsEnable(false); //使文本不可编辑
|
||||
if (gjsx.UserID == this.CurrUser.UserId && state == "1")
|
||||
{
|
||||
Date_CreateDate.Readonly = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
TextIsEnable(false); //使文本不可编辑
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,96 +415,134 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
//lblIsManyPeople.Enabled = isStart;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口关闭事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
Grid2Binging();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载事项进展
|
||||
/// </summary>
|
||||
private void Grid2Binging()
|
||||
{
|
||||
GJSX_detail = BLL.GJSXItemService.GetGJSXDetailByGJSXID(txtGJSXID.Text);
|
||||
//if (rblState.SelectedValue.Trim() == "2")
|
||||
//{
|
||||
// Model.GJSX_detail detail = new Model.GJSX_detail
|
||||
// {
|
||||
// Cuid = Guid.NewGuid().ToString(),
|
||||
// GJSXID = txtGJSXID.Text,
|
||||
// Progress_detail = "",
|
||||
// FilePath = "",
|
||||
// Progress_user = CurrUser.UserId,
|
||||
// Date = DateTime.Parse(string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now))
|
||||
// };
|
||||
var db = Funs.DB;
|
||||
var queryData = from x in db.GJSX_detail
|
||||
join y in db.Sys_User on x.Progress_user equals y.UserId
|
||||
where x.GJSXID == this.ID
|
||||
orderby x.Date descending
|
||||
select new
|
||||
{
|
||||
x.Cuid,
|
||||
ProgressUserName = y.UserName,
|
||||
x.Progress_detail,
|
||||
x.ProgressStatus,
|
||||
x.Date,
|
||||
};
|
||||
Grid2.RecordCount = queryData.Count();
|
||||
Grid2.DataSource = queryData;
|
||||
Grid2.DataBind();
|
||||
|
||||
// GJSX_detail.Add(detail);
|
||||
//}
|
||||
|
||||
|
||||
Grid2.RecordCount = GJSX_detail.Count;
|
||||
var table = this.GetPagedDataTable(Grid2, GJSX_detail);
|
||||
Table = table;
|
||||
this.Grid2.DataSource = table;
|
||||
this.Grid2.DataBind();
|
||||
|
||||
}
|
||||
|
||||
private void UpdateDataRow(string columnName, Dictionary<string, object> rowDict, DataRow rowData)
|
||||
{
|
||||
if (rowDict.ContainsKey(columnName))
|
||||
if (queryData.Count() > 0)
|
||||
{
|
||||
rowData[columnName] = rowDict[columnName];
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateDataRow(Dictionary<string, object> rowDict, DataRow rowData)
|
||||
{
|
||||
// 姓名
|
||||
UpdateDataRow("Progress_detail", rowDict, rowData);
|
||||
// 姓名
|
||||
UpdateDataRow("ProgressStatus", rowDict, rowData);
|
||||
}
|
||||
|
||||
private DataRow FindRowByID(string rowID)
|
||||
{
|
||||
DataTable table = Table;
|
||||
foreach (DataRow row in table.Rows)
|
||||
{
|
||||
if (row["Cuid"].ToString() == rowID)
|
||||
var lastItem = queryData.FirstOrDefault();
|
||||
if (lastItem.ProgressStatus.Contains("申请关闭"))
|
||||
{
|
||||
return row;
|
||||
this.Toolbar131.Hidden = true;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
//GJSX_detail = BLL.GJSXItemService.GetGJSXDetailByGJSXID(txtGJSXID.Text);
|
||||
////if (rblState.SelectedValue.Trim() == "2")
|
||||
////{
|
||||
//// Model.GJSX_detail detail = new Model.GJSX_detail
|
||||
//// {
|
||||
//// Cuid = Guid.NewGuid().ToString(),
|
||||
//// GJSXID = txtGJSXID.Text,
|
||||
//// Progress_detail = "",
|
||||
//// FilePath = "",
|
||||
//// Progress_user = CurrUser.UserId,
|
||||
//// Date = DateTime.Parse(string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now))
|
||||
//// };
|
||||
|
||||
//// GJSX_detail.Add(detail);
|
||||
////}
|
||||
|
||||
|
||||
//Grid2.RecordCount = GJSX_detail.Count;
|
||||
//var table = this.GetPagedDataTable(Grid2, GJSX_detail);
|
||||
//Table = table;
|
||||
//this.Grid2.DataSource = table;
|
||||
//this.Grid2.DataBind();
|
||||
}
|
||||
private void Grid2Save(Grid grid)
|
||||
{
|
||||
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid2.GetModifiedDict();
|
||||
if (modifiedDict != null)
|
||||
{
|
||||
foreach (int rowIndex in modifiedDict.Keys)
|
||||
{
|
||||
string rowID = Grid2.DataKeys[rowIndex][0].ToString();
|
||||
DataRow row = FindRowByID(rowID);
|
||||
UpdateDataRow(modifiedDict[rowIndex], row);
|
||||
}
|
||||
}
|
||||
Model.GJSX_detail _Detail = new Model.GJSX_detail();
|
||||
for (int i = 0; i < Table.Rows.Count; i++)
|
||||
{
|
||||
_Detail.Cuid = Table.Rows[i]["Cuid"].ToString();
|
||||
_Detail.GJSXID = Table.Rows[i]["GJSXID"].ToString();
|
||||
_Detail.Progress_user = Table.Rows[i]["Progress_user"].ToString();
|
||||
_Detail.Date = DateTime.Parse(Table.Rows[i]["Date"].ToString());
|
||||
_Detail.Progress_detail = Table.Rows[i]["Progress_detail"].ToString();
|
||||
_Detail.ProgressStatus = Table.Rows[i]["ProgressStatus"].ToString();
|
||||
|
||||
//private void UpdateDataRow(string columnName, Dictionary<string, object> rowDict, DataRow rowData)
|
||||
//{
|
||||
// if (rowDict.ContainsKey(columnName))
|
||||
// {
|
||||
// rowData[columnName] = rowDict[columnName];
|
||||
// }
|
||||
//}
|
||||
|
||||
//private void UpdateDataRow(Dictionary<string, object> rowDict, DataRow rowData)
|
||||
//{
|
||||
// // 姓名
|
||||
// UpdateDataRow("Progress_detail", rowDict, rowData);
|
||||
// // 姓名
|
||||
// UpdateDataRow("ProgressStatus", rowDict, rowData);
|
||||
//}
|
||||
|
||||
//private DataRow FindRowByID(string rowID)
|
||||
//{
|
||||
// DataTable table = Table;
|
||||
// foreach (DataRow row in table.Rows)
|
||||
// {
|
||||
// if (row["Cuid"].ToString() == rowID)
|
||||
// {
|
||||
// return row;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
//}
|
||||
//private void Grid2Save(Grid grid)
|
||||
//{
|
||||
// Dictionary<int, Dictionary<string, object>> modifiedDict = Grid2.GetModifiedDict();
|
||||
// if (modifiedDict != null)
|
||||
// {
|
||||
// foreach (int rowIndex in modifiedDict.Keys)
|
||||
// {
|
||||
// string rowID = Grid2.DataKeys[rowIndex][0].ToString();
|
||||
// DataRow row = FindRowByID(rowID);
|
||||
// UpdateDataRow(modifiedDict[rowIndex], row);
|
||||
// }
|
||||
// }
|
||||
// Model.GJSX_detail _Detail = new Model.GJSX_detail();
|
||||
// for (int i = 0; i < Table.Rows.Count; i++)
|
||||
// {
|
||||
// _Detail.Cuid = Table.Rows[i]["Cuid"].ToString();
|
||||
// _Detail.GJSXID = Table.Rows[i]["GJSXID"].ToString();
|
||||
// _Detail.Progress_user = Table.Rows[i]["Progress_user"].ToString();
|
||||
// _Detail.Date = DateTime.Parse(Table.Rows[i]["Date"].ToString());
|
||||
// _Detail.Progress_detail = Table.Rows[i]["Progress_detail"].ToString();
|
||||
// _Detail.ProgressStatus = Table.Rows[i]["ProgressStatus"].ToString();
|
||||
|
||||
|
||||
Model.GJSX_detail isExit_detail = BLL.GJSXItemService.GetGJSXMXById(_Detail.Cuid);
|
||||
// Model.GJSX_detail isExit_detail = BLL.GJSXItemService.GetGJSXMXById(_Detail.Cuid);
|
||||
|
||||
if (isExit_detail == null)
|
||||
{
|
||||
BLL.GJSXItemService.AddGJSXMX(_Detail);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.GJSXItemService.UpdateGJSXdetail(_Detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (isExit_detail == null)
|
||||
// {
|
||||
// BLL.GJSXItemService.AddGJSXMX(_Detail);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.GJSXItemService.UpdateGJSXdetail(_Detail);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
@@ -656,26 +551,14 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
private void save(string state)
|
||||
{
|
||||
Model.GJSX gjsx = new Model.GJSX();
|
||||
{
|
||||
gjsx.GJSXID = this.txtGJSXID.Text;
|
||||
gjsx.Detail = txtDetail.Text;
|
||||
gjsx.UserID = BLL.UserService.GetUserByUserName(txtUserID.Text).UserId;
|
||||
gjsx.CreateDate = DateTime.Parse(this.Date_CreateDate.Text);
|
||||
gjsx.ProjectId = this.CurrUser.LoginProjectId;
|
||||
gjsx.UnitId = this.DropUnitId.SelectedValue;
|
||||
gjsx.State = state;
|
||||
//gjsx.QuestionTypeID = this.DropQuestionTypeID.SelectedValue;
|
||||
//gjsx.IsManypeople = lblIsManyPeople.SelectedValue;
|
||||
gjsx.CompleteDate = DateTime.Parse(Date_CompleteDate.Text);
|
||||
gjsx.AttachUrl = "";
|
||||
}
|
||||
//string progressStatus = this.rblProgressStatus.SelectedValue;
|
||||
//string progressStatus = this.ddlProgressStatus.SelectedValue;
|
||||
//if (!string.IsNullOrWhiteSpace(progressStatus))
|
||||
//{
|
||||
// //gjsx.ProgressStatus = state == "2" ? null : progressStatus;
|
||||
// gjsx.ProgressStatus = progressStatus;
|
||||
//}
|
||||
gjsx.GJSXID = this.txtGJSXID.Text;
|
||||
gjsx.Detail = txtDetail.Text;
|
||||
//gjsx.UserID = BLL.UserService.GetUserByUserName(txtUserID.Text).UserId;
|
||||
gjsx.ProjectId = this.CurrUser.LoginProjectId;
|
||||
gjsx.UnitId = this.DropUnitId.SelectedValue;
|
||||
gjsx.State = state;
|
||||
gjsx.CompleteDate = DateTime.Parse(Date_CompleteDate.Text);
|
||||
gjsx.AttachUrl = "";
|
||||
gjsx.ProgressStatus = state == "3" ? "1" : "0";
|
||||
//抄送人
|
||||
string sendUserIds = string.Empty;
|
||||
@@ -763,6 +646,8 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
Model.GJSX isExitGjsx = GJSXService.GetGJSXById(gjsx.GJSXID);
|
||||
if (isExitGjsx == null)
|
||||
{
|
||||
gjsx.UserID = this.CurrUser.UserId;
|
||||
gjsx.CreateDate = DateTime.Now;
|
||||
GJSXService.AddGJSX(gjsx);
|
||||
}
|
||||
else
|
||||
@@ -772,6 +657,22 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 责任单位下拉同步改变责任人
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void DropUnitId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
DropUser_Acceptance.Items.Clear();
|
||||
var dropUnitId = this.DropUnitId.SelectedValue;
|
||||
if (!string.IsNullOrWhiteSpace(dropUnitId))
|
||||
{
|
||||
//责任人
|
||||
UserService.InitUserDropDownList(DropUser_Acceptance, this.CurrUser.LoginProjectId, false, dropUnitId);
|
||||
//DropUser_Acceptance.SelectedValue = this.CurrUser.UserId;
|
||||
}
|
||||
}
|
||||
|
||||
protected void DropUser_ReceiveID_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -840,41 +741,6 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//if (rblIsClosed.SelectedValue == "true")
|
||||
//{
|
||||
// save("0");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// save("2");
|
||||
//}
|
||||
|
||||
|
||||
//string nextreceuserid = DropNextRecipient.SelectedValue;
|
||||
|
||||
//BLL.GJSXProcessService.DeleteProcess(this.txtGJSXID.Text); //先删除
|
||||
//List<string> List_GJSXProcess = BLL.GJSXProcessService.GetProcessListByGJSXID(this.txtGJSXID.Text);
|
||||
//foreach (var item in this.DropUser_ReceiveID.SelectedValueArray)
|
||||
//{
|
||||
// if (item != BLL.Const._Null)
|
||||
// {
|
||||
// if (!List_GJSXProcess.Contains(item)) //不存在接收记录
|
||||
// {
|
||||
// Model.GJSX_Process gJSX_Process = new Model.GJSX_Process()
|
||||
// {
|
||||
// ProcessID = Guid.NewGuid().ToString(),
|
||||
// GJSXID = txtGJSXID.Text,
|
||||
// UserId = item
|
||||
// };
|
||||
// BLL.GJSXProcessService.AddProcess(gJSX_Process); //后添加
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
string EditType = Request.Params["EditType"];
|
||||
|
||||
string ID = Request.Params["ID"];
|
||||
@@ -892,26 +758,25 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var gjsx = BLL.GJSXService.GetGJSXById(txtGJSXID.Text);
|
||||
if (gjsx.User_Acceptance.Contains(this.CurrUser.UserId))
|
||||
{//责任人的时候保存关键事项
|
||||
//进展状态
|
||||
//string progressStatus = this.rblProgressStatus.SelectedValue;
|
||||
string progressStatus = string.Empty;
|
||||
OperateComplianceObligationsCSort(ref progressStatus);
|
||||
if (progressStatus == "申请关闭")
|
||||
{//申请关闭
|
||||
save("3");
|
||||
}
|
||||
else if (progressStatus == "持续跟踪")
|
||||
{//持续跟踪
|
||||
save("2");
|
||||
}
|
||||
|
||||
//save("3");
|
||||
}
|
||||
else if (gjsx.UserID.Contains(this.CurrUser.UserId) || gjsx.User_ReceiveID.Contains(this.CurrUser.UserId))
|
||||
//if (gjsx.User_Acceptance.Contains(this.CurrUser.UserId))
|
||||
//{//责任人的时候保存关键事项
|
||||
// //进展状态
|
||||
// //string progressStatus = this.rblProgressStatus.SelectedValue;
|
||||
// string progressStatus = string.Empty;
|
||||
// OperateComplianceObligationsCSort(ref progressStatus);
|
||||
// if (progressStatus == "申请关闭")
|
||||
// {//申请关闭
|
||||
// save("3");
|
||||
// }
|
||||
// else if (progressStatus == "持续跟踪")
|
||||
// {//持续跟踪
|
||||
// save("2");
|
||||
// }
|
||||
// //save("3");
|
||||
//}
|
||||
//else
|
||||
if (gjsx.UserID.Contains(this.CurrUser.UserId) || gjsx.User_ReceiveID.Contains(this.CurrUser.UserId))
|
||||
{//提出人、跟踪人审批责任人提出申请关闭请求
|
||||
//进展状态
|
||||
string progressResult = this.rblProgressResult.SelectedValue;
|
||||
@@ -932,48 +797,16 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
Progress_user = this.CurrUser.UserId,
|
||||
Progress_detail = $"{(progressResult == "0" ? "同意" : "驳回")}申请关闭{(!string.IsNullOrWhiteSpace(progressReason) ? ":" : "")}{progressReason}",
|
||||
Date = DateTime.Now,
|
||||
Sort = GJSX_detail.Count,
|
||||
ProgressStatus = "",
|
||||
//Sort = GJSX_detail.Count,
|
||||
ProgressStatus = $"{(progressResult == "0" ? "同意" : "驳回")}申请",
|
||||
};
|
||||
GJSXItemService.AddGJSXMX(detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if (EditType == "add")
|
||||
//{
|
||||
// save("2");
|
||||
//}
|
||||
//else {
|
||||
|
||||
// //责任人的时候保存关键事项
|
||||
// var gjsx = BLL.GJSXService.GetGJSXById(txtGJSXID.Text);
|
||||
// if (gjsx.User_Acceptance.Contains(this.CurrUser.UserId))
|
||||
// {
|
||||
// save("3");
|
||||
// OperateComplianceObligationsCSort();
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
//if (nextreceuserid != null)
|
||||
//{
|
||||
// Model.GJSX gJSX = BLL.GJSXService.GetGJSXById(txtGJSXID.Text);
|
||||
// if (!gJSX.User_ReceiveID.Contains(nextreceuserid))
|
||||
// {
|
||||
// gJSX.User_ReceiveID += "," + nextreceuserid;
|
||||
// BLL.GJSXService.UpdateGJSX(gJSX);
|
||||
// Model.GJSX_Process gJSX_Process = new Model.GJSX_Process()
|
||||
// {
|
||||
// ProcessID = Guid.NewGuid().ToString(),
|
||||
// GJSXID = txtGJSXID.Text,
|
||||
// UserId = nextreceuserid
|
||||
// };
|
||||
// BLL.GJSXProcessService.AddProcess(gJSX_Process);
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@@ -1033,11 +866,20 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
// Alert.ShowInParent("请选择跟踪人!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.Date_CompleteDate.Text == "")
|
||||
|
||||
var completeDate = this.Date_CompleteDate.Text.Trim();
|
||||
var createDate = this.Date_CreateDate.Text.Trim();
|
||||
if (string.IsNullOrWhiteSpace(completeDate))
|
||||
{
|
||||
Alert.ShowInParent("请选择要求完成日期!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else if (Convert.ToDateTime(createDate) > Convert.ToDateTime(completeDate))
|
||||
{
|
||||
//判断要求完成日期是否大于小于提出日期
|
||||
Alert.ShowInParent("完成日期必须大于提出日期!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
save("1");
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
|
||||
@@ -1100,6 +942,9 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
#endregion
|
||||
|
||||
#region 加载抄送人员
|
||||
/// <summary>
|
||||
/// 加载抄送人员
|
||||
/// </summary>
|
||||
private void GetCheckManBindGrid4()
|
||||
{
|
||||
var tb = GetCheckManSource4();
|
||||
@@ -1174,110 +1019,9 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
jerqueSaveComplianceObligationsCList();
|
||||
Model.GJSX_detail complianceObligationsC = new Model.GJSX_detail
|
||||
{
|
||||
Cuid = SQLHelper.GetNewID(typeof(Model.GJSX_detail)),
|
||||
Progress_user = this.CurrUser.UserId,
|
||||
ProgressStatus = "持续跟踪"
|
||||
};
|
||||
GJSX_detail.Add(complianceObligationsC);
|
||||
this.Grid2.DataSource = GJSX_detail;
|
||||
this.Grid2.DataBind();
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("GJSXDetailEdit.aspx?GJSXID={0}", this.ID), "新增 - 关键事项进展"));
|
||||
}
|
||||
|
||||
protected void gvOperateComplianceObligations_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
jerqueSaveComplianceObligationsCList();
|
||||
string rowID = this.Grid2.DataKeys[e.RowIndex][0].ToString();
|
||||
if (e.CommandName == "Delete")
|
||||
{
|
||||
foreach (var item in GJSX_detail)
|
||||
{
|
||||
if (item.Cuid == rowID)
|
||||
{
|
||||
GJSX_detail.Remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Grid2.DataSource = GJSX_detail;
|
||||
Grid2.DataBind();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else if (e.CommandName == "AttachUrl")
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/Gjsx&menuId={1}",
|
||||
rowID, BLL.Const.GJSXMenuId)));
|
||||
}
|
||||
else if (e.CommandName == "AttachUrl1")
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/Gjsx&menuId={1}",
|
||||
rowID, BLL.Const.GJSXMenuId)));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关键事项进展明细
|
||||
/// </summary>
|
||||
private void OperateComplianceObligationsCSort(ref string progressStatus)
|
||||
{
|
||||
var list = Funs.DB.GJSX_detail.Where(x => x.GJSXID == txtGJSXID.Text).ToList();
|
||||
if (list.Count > 0)
|
||||
{
|
||||
Funs.DB.GJSX_detail.DeleteAllOnSubmit(list);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
jerqueSaveComplianceObligationsCList();
|
||||
|
||||
foreach (Model.GJSX_detail coc in GJSX_detail)
|
||||
{
|
||||
coc.GJSXID = txtGJSXID.Text;
|
||||
BLL.GJSXItemService.AddGJSXMX(coc);
|
||||
progressStatus = coc.ProgressStatus;//== "持续跟踪" ? "0" : "1"
|
||||
|
||||
}
|
||||
//string progressStatus = this.rblProgressStatus.SelectedValue;
|
||||
//string progressStatus = this.ddlProgressStatus.SelectedValue;
|
||||
//if (progressStatus == "1")
|
||||
//{//责任人申请关闭
|
||||
// Model.GJSX_detail detail = new Model.GJSX_detail
|
||||
// {
|
||||
// Cuid = SQLHelper.GetNewID(typeof(Model.GJSX_detail)),
|
||||
// GJSXID = txtGJSXID.Text,
|
||||
// Progress_user = this.CurrUser.UserId,
|
||||
// Progress_detail = "申请关闭",
|
||||
// Date = DateTime.Now,
|
||||
// Sort = GJSX_detail.Count,
|
||||
// };
|
||||
// GJSXItemService.AddGJSXMX(detail);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
private void jerqueSaveComplianceObligationsCList()
|
||||
{
|
||||
GJSX_detail.Clear();
|
||||
JArray mergedData = Grid2.GetMergedData();
|
||||
foreach (JObject mergedRow in mergedData)
|
||||
{
|
||||
string status = mergedRow.Value<string>("status");
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int i = mergedRow.Value<int>("index");
|
||||
var hazardSort = new Model.GJSX_detail
|
||||
{
|
||||
Cuid = this.Grid2.Rows[i].DataKeys[0].ToString(),
|
||||
Progress_user = values.Value<string>("Progress_user").ToString(),
|
||||
Progress_detail = values.Value<string>("Progress_detail").ToString(),
|
||||
ProgressStatus = values.Value<string>("ProgressStatus").ToString(),
|
||||
Sort = i
|
||||
};
|
||||
if (!string.IsNullOrEmpty(values.Value<string>("Date").ToString()))
|
||||
{
|
||||
hazardSort.Date = Convert.ToDateTime(values.Value<string>("Date").ToString());
|
||||
}
|
||||
GJSX_detail.Add(hazardSort);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
+2
-29
@@ -258,40 +258,13 @@ namespace FineUIPro.Web.PZHGL.GJSX
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// DropProgress_user 控件。
|
||||
/// lbtnFileUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropProgress_user;
|
||||
|
||||
/// <summary>
|
||||
/// DatePicker1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker DatePicker1;
|
||||
|
||||
/// <summary>
|
||||
/// tbxEditorName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox tbxEditorName;
|
||||
|
||||
/// <summary>
|
||||
/// ddlProgressStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlProgressStatus;
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ApproveForm 控件。
|
||||
|
||||
Reference in New Issue
Block a user