1质量巡检导出补充无图导出功能

This commit is contained in:
夏菊 2025-04-25 15:58:41 +08:00
parent 6bebbe15ef
commit b66d6aeba3
3 changed files with 163 additions and 154 deletions

View File

@ -39,6 +39,7 @@
background-color: Green;
color: white;
}
.Yellow {
background-color: #FFFF93;
}
@ -50,6 +51,7 @@
.LightGreen {
background-color: LightGreen
}
.f-grid-colheader-text {
white-space: normal;
word-break: break-all;
@ -62,7 +64,6 @@
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="质量巡检记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CheckControlCode" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="CheckControlCode" AllowSorting="true" SortField="CheckDate"
@ -76,18 +77,24 @@
<f:DropDownList ID="drpSponsorUnit" runat="server" Label="施工单位" EnableEdit="true" EmptyText="请选择查询条件"
LabelAlign="right">
</f:DropDownList>
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpCNProfessional" runat="server" Label="专业" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpQuestionType" runat="server" Label="问题类别" Width="210px" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="dpHandelStatus" runat="server" Label="整改状态" LabelAlign="Right" EnableEdit="true">
<f:ListItem Text="未确认" Value="1" />
<f:ListItem Text="已闭环" Value="2" />
@ -100,21 +107,16 @@
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
LabelAlign="right">
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server" >
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
<f:RadioButtonList ID="rbOutType" Label="导出" runat="server" LabelWidth="50px" Width="180px">
<f:RadioItem Text="无图" Value="0" Selected="true" />
<f:RadioItem Text="有图" Value="1" />
</f:RadioButtonList>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"

View File

@ -791,14 +791,11 @@ namespace FineUIPro.Web.CQMS.Check
}
cell.SetCellValue(t);//问题类别
if (rbOutType.SelectedValue == "1")
{//导出带图片
// cell = row.CreateCell(5);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.CheckSite);//整改前照片
//整改前照片
var attachFile = Funs.DB.AttachFile
.Where(p => p.MenuId == BLL.Const.CheckListMenuId && p.ToKeyId == item.CheckControlCode)
.FirstOrDefault();
var attachFile = Funs.DB.AttachFile.Where(p => p.MenuId == BLL.Const.CheckListMenuId && p.ToKeyId == item.CheckControlCode).FirstOrDefault();
if (attachFile != null)
{
var photoesUrl = attachFile.AttachUrl;
@ -828,9 +825,7 @@ namespace FineUIPro.Web.CQMS.Check
}
//整改后照片
var attachFile1 = Funs.DB.AttachFile.Where(p =>
p.MenuId == BLL.Const.CheckListMenuId && p.ToKeyId == item.CheckControlCode + "r")
.FirstOrDefault();
var attachFile1 = Funs.DB.AttachFile.Where(p => p.MenuId == BLL.Const.CheckListMenuId && p.ToKeyId == item.CheckControlCode + "r").FirstOrDefault();
if (attachFile1 != null)
{
var photoesUrl1 = attachFile1.AttachUrl;
@ -859,13 +854,16 @@ namespace FineUIPro.Web.CQMS.Check
}
}
// cell = row.CreateCell(6);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.CheckSite);//整改后照片
// cell = row.CreateCell(5);
// cell.CellStyle = cellStyle;
// cell.SetCellValue(item.CheckSite);//部位
}
else
{
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;
cell.SetCellValue("");//整改前图片
cell = row.CreateCell(6);
cell.CellStyle = cellStyle;
cell.SetCellValue("");//整改后图片
}
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;

View File

@ -95,6 +95,33 @@ namespace FineUIPro.Web.CQMS.Check
/// </remarks>
protected global::FineUIPro.DropDownList drpQuestionType;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@ -132,31 +159,13 @@ namespace FineUIPro.Web.CQMS.Check
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnQuery 控件。
/// rbOutType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
protected global::FineUIPro.RadioButtonList rbOutType;
/// <summary>
/// btnOut 控件。