事项看板展示优化

This commit is contained in:
2025-03-24 16:57:46 +08:00
parent e863a39cde
commit 2c74bec311
7 changed files with 149 additions and 58 deletions
+4 -4
View File
@@ -39,7 +39,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="员工信息" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="GJSXID" EnableColumnLines="true"
DataIDField="GJSXID" AllowSorting="true" SortField="GJSXID"
DataIDField="GJSXID" AllowSorting="true" SortField="state"
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
@@ -97,9 +97,9 @@
<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="GJSXID" DataField="GJSXID" SortField="GJSXID"
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="QuestionTypeName" DataField="QuestionTypeName"
FieldType="String" HeaderText="紧急程度" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
+41 -32
View File
@@ -79,21 +79,27 @@ namespace FineUIPro.Web.PZHGL.GJSX
if (state == "0")
{
//Grid1.Rows[i].RowCssClass = "green";
Grid1.Rows[i].CellCssClasses[5] = "green";
Grid1.Rows[i].CellCssClasses[6] = "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";
}
Grid1.Rows[i].CellCssClasses[6] = "blue";
//if (DateTime.Now > dtCompleteDate.AddDays(1))
//{
// //Grid1.Rows[i].RowCssClass = "red";
// Grid1.Rows[i].CellCssClasses[6] = "red";
// //var ssss = Grid1.Rows[i].;
// //Grid1.Rows[i].Cells[6].Text = "超期";
//}
//else
//{
// //Grid1.Rows[i].RowCssClass = "blue";
// Grid1.Rows[i].CellCssClasses[6] = "blue";
//}
}
else if (state == "4")
{
Grid1.Rows[i].CellCssClasses[6] = "red";
}
}
}
@@ -125,14 +131,14 @@ namespace FineUIPro.Web.PZHGL.GJSX
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)) ";
}
//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 += ")";
@@ -527,41 +533,44 @@ namespace FineUIPro.Web.PZHGL.GJSX
cell.SetCellValue((i - 1).ToString());
cell = row.CreateCell(1);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["QuestionTypeName"].ToString());
cell.SetCellValue(tb.Rows[j]["GJSXID"].ToString());
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["CNProfessionalID"].ToString());
cell.SetCellValue(tb.Rows[j]["QuestionTypeName"].ToString());
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["Detail"].ToString());
cell.SetCellValue(tb.Rows[j]["CNProfessionalID"].ToString());
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString());
cell.SetCellValue(tb.Rows[j]["Detail"].ToString());
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["StateStr"].ToString());
cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString());
cell = row.CreateCell(6);
cell.CellStyle = cellStyle;
cell.SetCellValue(createDate);
cell.SetCellValue(tb.Rows[j]["StateStr"].ToString());
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;
cell.SetCellValue(completeDate);
cell.SetCellValue(createDate);
cell = row.CreateCell(8);
cell.CellStyle = cellStyle;
cell.SetCellValue(closeDate);
cell.SetCellValue(completeDate);
cell = row.CreateCell(9);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["unitname"].ToString());
cell.SetCellValue(closeDate);
cell = row.CreateCell(10);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["username"].ToString());
cell.SetCellValue(tb.Rows[j]["unitname"].ToString());
cell = row.CreateCell(11);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["User_Acceptance"].ToString());
cell.SetCellValue(tb.Rows[j]["username"].ToString());
cell = row.CreateCell(12);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["User_Acceptance"].ToString());
cell = row.CreateCell(13);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["User_ReceiveID"].ToString());
//cell = row.CreateCell(13);
//cell = row.CreateCell(14);
//cell.CellStyle = cellStyle;
//cell.SetCellValue("");
i++;
+4 -4
View File
@@ -33,7 +33,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="关键事项" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="GJSXID" EnableColumnLines="true"
DataIDField="GJSXID" AllowSorting="true" SortField="GJSXID"
DataIDField="GJSXID" AllowSorting="true" SortField="state2"
SortDirection="desc" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
@@ -85,9 +85,9 @@
<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="事项ID" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>--%>
<f:RenderField Width="120px" ColumnID="GJSXID" DataField="GJSXID" SortField="GJSXID"
FieldType="String" HeaderText="编号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="QuestionTypeName" DataField="QuestionTypeName"
FieldType="String" HeaderText="紧急程度" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
@@ -62,8 +62,11 @@ namespace FineUIPro.Web.PZHGL.GJSX
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,a.state
,case a.state when 2 then '正在进行' when 3 then '待办' when 0 then '已关闭' when 1 then '编辑中' end as stateStr
,Base_Project.ProjectName,Base_Unit.unitname,a.CloseDate
,case a.state when 2 then (case when GETDATE()>a.CompleteDate then 4 else a.state end) when 3 then (case when GETDATE()>a.CompleteDate then 4 else a.state end) when 0 then a.state when 1 then a.state end as state2
,case a.state when 2 then (case when GETDATE()>a.CompleteDate then '已超期' else '正在进行' end) when 3 then (case when GETDATE()>a.CompleteDate then '已超期' else '正在进行' end) when 0 then '已关闭' when 1 then '编辑中' end as stateStr
--,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
@@ -108,7 +111,7 @@ namespace FineUIPro.Web.PZHGL.GJSX
strSql += " AND a.CsUsers like'%" + uid + "%' ";
}
strSql += " order by a.GJSXID desc ";
strSql += " order by state2 desc,a.GJSXID asc ";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -129,20 +132,20 @@ namespace FineUIPro.Web.PZHGL.GJSX
if (state == "0")
{
//Grid1.Rows[i].RowCssClass = "green";
Grid1.Rows[i].CellCssClasses[5] = "green";
Grid1.Rows[i].CellCssClasses[6] = "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].CellCssClasses[6] = "red";
//Grid1.Rows[i].Cells[5].Text = "red";
}
else
{
//Grid1.Rows[i].RowCssClass = "blue";
Grid1.Rows[i].CellCssClasses[5] = "blue";
Grid1.Rows[i].CellCssClasses[6] = "blue";
}
}
}