焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckManage.aspx.cs" Inherits="FineUIPro.Web.HJGL.CheckManage.CheckManage" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -13,6 +15,16 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="检测单录入" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
@@ -32,9 +44,9 @@
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:DropDownList ID="drpCheckUnit" runat="server" Label="检测单位" LabelWidth="80px" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged"></f:DropDownList>
<f:TextBox ID="txtTrust" runat="server" Label="委托单号" LabelWidth="80px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="Tree_TextChanged" >
<f:TextBox ID="txtTrust" runat="server" Label="委托单号" LabelWidth="80px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="Tree_TextChanged">
</f:TextBox>
</Items>
</f:Toolbar>
@@ -63,10 +75,9 @@
</f:Button>
<f:Button ID="btnSave" Text="保存" ToolTip="保存检测单" Icon="SystemSave" runat="server" OnClick="btnSave_Click">
</f:Button>
<f:DropDownList ID="drpPrintType" runat="server" Label="打印报表" LabelAlign="Right" Width="350px">
</f:DropDownList>
<f:Button ID="Button2" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:DropDownList ID="drpPrintType" runat="server" Label="打印报表" LabelAlign="Right" Width="350px">
</f:DropDownList>
<f:Button ID="Button2" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
</Items>
</f:Toolbar>
@@ -97,7 +108,7 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<Items>
<f:DropDownList ID="drpContractualUnits" runat="server" Label="检测单位" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpContractualUnits_SelectedIndexChanged"></f:DropDownList>
<f:DropDownList ID="ddlCheckMan" runat="server" Label="检测人" LabelAlign="Right" EnableEdit="true"></f:DropDownList>
@@ -115,7 +126,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="RT检测单录入" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="JOT_ID" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="JOT_ID" AllowSorting="true" OnSort="Grid1_Sort"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="JOT_ID" AllowSorting="true" OnSort="Grid1_Sort"
SortField="JOT_JointNo" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar4" runat="server" Position="Top">
@@ -129,7 +140,7 @@
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="管线编号" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo" SortField="ISO_IsoNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px">
</f:RenderField>
</f:RenderField>
<f:RenderField HeaderText="焊工号" ColumnID="WelderCode" DataField="WelderCode" SortField="WelderCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
@@ -139,7 +150,7 @@
<f:RenderField HeaderText="探伤方法" ColumnID="DetectionTypeName" DataField="DetectionTypeName" SortField="DetectionTypeName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="焊口规格" ColumnID="JOT_JointDesc" DataField="JOT_JointDesc" SortField="JOT_JointDesc"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="110px">
</f:RenderField>
@@ -175,19 +186,19 @@
</f:RenderField>
<f:RenderField HeaderText="探伤结果" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:DropDownList ID="drpCHT_CheckResult" runat="server">
<f:ListItem Value="合格" Text="合格" Selected="true"/>
<f:ListItem Value="不合格" Text="不合格" />
<Editor>
<f:DropDownList ID="drpCHT_CheckResult" runat="server">
<f:ListItem Value="合格" Text="合格" Selected="true" />
<f:ListItem Value="不合格" Text="不合格" />
</f:DropDownList>
</Editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:DropDownList ID="drpDefects_Definition2" runat="server">
<Editor>
<f:DropDownList ID="drpDefects_Definition2" runat="server">
</f:DropDownList>
</Editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="胶片规格" ColumnID="FilmSpecifications" DataField="FilmSpecifications" SortField="FilmSpecifications"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
@@ -296,19 +307,19 @@
</f:RenderField>
<f:RenderField HeaderText="探伤结果*" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:DropDownList ID="drpCHT_CheckResult1" runat="server">
<f:ListItem Value="合格" Text="合格" />
<f:ListItem Value="不合格" Text="不合格" />
<Editor>
<f:DropDownList ID="drpCHT_CheckResult1" runat="server">
<f:ListItem Value="合格" Text="合格" />
<f:ListItem Value="不合格" Text="不合格" />
</f:DropDownList>
</Editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:DropDownList ID="drpDefects_Definition" runat="server">
<Editor>
<f:DropDownList ID="drpDefects_Definition" runat="server">
</f:DropDownList>
</Editor>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="延长米cm" ColumnID="ExtendingRice" DataField="ExtendingRice" SortField="ExtendingRice"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
@@ -382,7 +393,7 @@
////RT检测批量填充拍片日期、报告日期
function onGridAfterEdit(event, value, params) {
var ckAllFilmDate = F('<%= ckAllFilmDate.ClientID %>');
var ckAllReportDate = F('<%= ckAllReportDate.ClientID %>');
var ckAllReportDate = F('<%= ckAllReportDate.ClientID %>');
var me = this, columnId = params.columnId, rowId = params.rowId;
if (columnId === 'CHT_TotalFilm' || columnId === 'CHT_PassFilm') {
var total = me.getCellValue(rowId, 'CHT_TotalFilm');
@@ -1,6 +1,5 @@
using BLL;
using System;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
@@ -9,9 +8,6 @@ using Newtonsoft.Json.Linq;
using System.IO;
using NPOI.XSSF.UserModel;
using NPOI.SS.UserModel;
using System.Runtime.Serialization;
using NPOI.SS.Util;
using NPOI.HSSF.UserModel;
namespace FineUIPro.Web.HJGL.CheckManage
{
@@ -19,6 +15,20 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 检测主键
/// </summary>
public string CHT_CheckID
@@ -94,7 +104,19 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
if (!IsPostBack)
{
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpCheckUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_5, true);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
}
BLL.Base_DefectService.InitDefectDropDownList(drpDefects_Definition, false, null);
BLL.Base_DefectService.InitDefectDropDownList(drpDefects_Definition2, false, null);
//报表类型
@@ -103,57 +125,75 @@ namespace FineUIPro.Web.HJGL.CheckManage
this.drpPrintType.DataSource = BLL.DropListService.NDTCheckSelectPrint();
this.drpPrintType.DataBind();
//查询检测单位
//施工单位、装置
//if (BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId) == null || BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId).UnitTypeId == BLL.Const.ProjectUnitType_1 || BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId).UnitTypeId == BLL.Const.ProjectUnitType_5)
//{
// BLL.UnitService.InitUnitNameByUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
// BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, true);
//}
//else
//{
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
//}
var pUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
if (pUnit != null)
{
this.drpUnit.DataTextField = "UnitName";
this.drpUnit.DataValueField = "UnitId";
this.drpUnit.DataSource = pUnit;
this.drpUnit.DataBind();
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
if(CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId)
{
this.drpUnit.Enabled = false;
}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
BLL.UserService.InitUserDropDownList(this.drpTabler, this.CurrUser.LoginProjectId, true);//制单人
BLL.UserService.InitUserDropDownList(this.ddlAuditMan, this.CurrUser.LoginProjectId, true);//审核人
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpContractualUnits, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_5, true);//检测单位
if (drpContractualUnits.Items.Count > 1)
{
drpContractualUnits.SelectedIndex = 1;
BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.ddlCheckMan, this.CurrUser.LoginProjectId, drpContractualUnits.SelectedValue, true);//检测人
if (ddlCheckMan.Items.Count > 1)
{
ddlCheckMan.SelectedIndex = 1;
}
}
this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.drpTabler.SelectedValue = this.CurrUser.UserId;
this.txtCheckType.Text = "C1";
this.txtCheckTime.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.InitTreeMenu();//加载树
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpCheckUnit, this.ProjectId, BLL.Const.ProjectUnitType_5, true);
//查询检测单位
//施工单位、装置
//if (BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId) == null || BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId).UnitTypeId == BLL.Const.ProjectUnitType_1 || BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId).UnitTypeId == BLL.Const.ProjectUnitType_5)
//{
// BLL.UnitService.InitUnitNameByUnitTypeDropDownList(this.drpUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
// BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallationId, this.ProjectId, true);
//}
//else
//{
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.ProjectId, this.CurrUser.UnitId, true);
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.CurrUser.UnitId, true);
//}
var pUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_2);
if (pUnit != null)
{
this.drpUnit.DataTextField = "UnitName";
this.drpUnit.DataValueField = "UnitId";
this.drpUnit.DataSource = pUnit;
this.drpUnit.DataBind();
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
if (CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId)
{
this.drpUnit.Enabled = false;
}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnit.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
BLL.UserService.InitUserDropDownList(this.drpTabler, this.ProjectId, true);//制单人
this.drpTabler.SelectedValue = this.CurrUser.UserId;
BLL.UserService.InitUserDropDownList(this.ddlAuditMan, this.ProjectId, true);//审核人
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpContractualUnits, this.ProjectId, BLL.Const.ProjectUnitType_5, true);//检测单位
if (drpContractualUnits.Items.Count > 1)
{
drpContractualUnits.SelectedIndex = 1;
BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.ddlCheckMan, this.ProjectId, drpContractualUnits.SelectedValue, true);//检测人
if (ddlCheckMan.Items.Count > 1)
{
ddlCheckMan.SelectedIndex = 1;
}
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.InitTreeMenu();
}
#endregion
#region --
@@ -162,6 +202,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtCheckTime.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtCheckTime.Text.Trim());
@@ -175,19 +219,19 @@ namespace FineUIPro.Web.HJGL.CheckManage
this.tvControlItem.Nodes.Add(rootNode);
List<Model.Base_Unit> units = null;
var unit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
var unit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId);
if (unit == null || unit.UnitType == BLL.Const.ProjectUnitType_1 || unit.UnitType == BLL.Const.ProjectUnitType_5 || unit.UnitType == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -198,19 +242,19 @@ namespace FineUIPro.Web.HJGL.CheckManage
if (!this.txtCheckTime.Hidden)
{
checkLists = (from x in Funs.DB.CH_Check
where x.ProjectId == this.CurrUser.LoginProjectId && x.CHT_CheckDate >= startTime && x.CHT_CheckDate < endTime
where x.ProjectId == this.ProjectId && x.CHT_CheckDate >= startTime && x.CHT_CheckDate < endTime
select x).ToList();
}
else
{
checkLists = (from x in Funs.DB.CH_Check
where x.ProjectId == this.CurrUser.LoginProjectId && x.CHT_CheckCode.Contains(this.txtSearchCode.Text.Trim())
where x.ProjectId == this.ProjectId && x.CHT_CheckCode.Contains(this.txtSearchCode.Text.Trim())
select x).ToList();
}
if (this.drpCheckUnit.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpCheckUnit.SelectedValue))
{
checkLists = (from x in Funs.DB.CH_Check
where x.ProjectId == this.CurrUser.LoginProjectId && x.ContractualUnits == this.drpCheckUnit.SelectedValue
where x.ProjectId == this.ProjectId && x.ContractualUnits == this.drpCheckUnit.SelectedValue
select x).ToList();
}
if (units != null)
@@ -223,11 +267,11 @@ namespace FineUIPro.Web.HJGL.CheckManage
rootUnitNode.Expanded = true;
rootUnitNode.ToolTip = "施工单位";
rootNode.Nodes.Add(rootUnitNode);
//if (CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId|| this.CurrUser.UserId != Const.sysglyId||!UnitService.IsSubUnitByProjectAndUnit(CurrUser.LoginProjectId, this.CurrUser.UserId))
//if (CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId|| this.CurrUser.UserId != Const.sysglyId||!UnitService.IsSubUnitByProjectAndUnit(ProjectId, this.CurrUser.UserId))
//{
// if (!string.IsNullOrEmpty(txtTrust.Text))
// {
// var TrustList = Funs.DB.CH_Trust.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.CH_TrustCode.Contains(txtTrust.Text)).Select(x => x.CH_TrustID).ToList();
// var TrustList = Funs.DB.CH_Trust.Where(x => x.ProjectId == this.ProjectId && x.CH_TrustCode.Contains(txtTrust.Text)).Select(x => x.CH_TrustID).ToList();
// var checkList = checkLists.Where(x => x.UnitId == item.UnitId && x.UnitId == this.CurrUser.UnitId&& TrustList.Contains(x.CH_TrustID)).ToList();
// this.BindNodes(rootUnitNode, checkList);
// }
@@ -243,7 +287,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
//{
// if (!string.IsNullOrEmpty(txtTrust.Text))
// {
// var TrustList = Funs.DB.CH_Trust.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.CH_TrustCode.Contains(txtTrust.Text)).Select(x => x.CH_TrustID).ToList();
// var TrustList = Funs.DB.CH_Trust.Where(x => x.ProjectId == this.ProjectId && x.CH_TrustCode.Contains(txtTrust.Text)).Select(x => x.CH_TrustID).ToList();
// var checkList = checkLists.Where(x => x.UnitId == item.UnitId && TrustList.Contains(x.CH_TrustID)).ToList();
// this.BindNodes(rootUnitNode, checkList);
// }
@@ -418,7 +462,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
this.drpUnit.SelectedValue = check.UnitId;
this.drpInstallationId.Items.Clear();
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true);
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnit.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
if (!string.IsNullOrEmpty(check.InstallationId))
@@ -792,8 +836,8 @@ namespace FineUIPro.Web.HJGL.CheckManage
}
}
checkItems.Clear();
//Project_HJGLData_HJGLService.StatisticalData(this.CurrUser.LoginProjectId, Project_HJGLData_HJGLService.HJGLDateType.NumberOfFilms);
//Project_HJGLData_DefectService.StatisticalData(this.CurrUser.LoginProjectId);
//Project_HJGLData_HJGLService.StatisticalData(this.ProjectId, Project_HJGLData_HJGLService.HJGLDateType.NumberOfFilms);
//Project_HJGLData_DefectService.StatisticalData(this.ProjectId);
this.CHT_CheckID = null;
this.Grid1.DataSource = null;
this.Grid1.DataBind();
@@ -939,7 +983,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
#region
Model.CH_Check check = new Model.CH_Check();
check.ProjectId = this.CurrUser.LoginProjectId;
check.ProjectId = this.ProjectId;
check.CHT_CheckCode = this.txtCheckCode.Text.Trim();
//if (checkItems.Count() > 0)
//{
@@ -975,7 +1019,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
if (updateCheck.CHT_CheckCode != this.txtCheckCode.Text.Trim())
{
if (BLL.CheckManageService.IsExistCheckCode(this.CurrUser.LoginProjectId, this.txtCheckCode.Text.Trim()))
if (BLL.CheckManageService.IsExistCheckCode(this.ProjectId, this.txtCheckCode.Text.Trim()))
{
Alert.ShowInTop("此检测单号已经存在!", MessageBoxIcon.Warning);
return;
@@ -1000,7 +1044,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
}
else
{
if (BLL.CheckManageService.IsExistCheckCode(this.CurrUser.LoginProjectId, this.txtCheckCode.Text.Trim()))
if (BLL.CheckManageService.IsExistCheckCode(this.ProjectId, this.txtCheckCode.Text.Trim()))
{
Alert.ShowInTop("此检测单号已经存在!", MessageBoxIcon.Warning);
return;
@@ -1041,8 +1085,8 @@ namespace FineUIPro.Web.HJGL.CheckManage
BLL.CheckItemManageService.UpdateJointCheckFlag(checkitem.JOT_ID, "1");
}
#endregion
//Project_HJGLData_HJGLService.StatisticalData(this.CurrUser.LoginProjectId, Project_HJGLData_HJGLService.HJGLDateType.NumberOfFilms);
//Project_HJGLData_DefectService.StatisticalData(this.CurrUser.LoginProjectId);
//Project_HJGLData_HJGLService.StatisticalData(this.ProjectId, Project_HJGLData_HJGLService.HJGLDateType.NumberOfFilms);
//Project_HJGLData_DefectService.StatisticalData(this.ProjectId);
ShowNotify("保存成功!", MessageBoxIcon.Success);
checkItems.Clear();
InitTreeMenu();
@@ -1067,7 +1111,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
ddlCheckMan.Items.Clear();
ddlCheckMan.DataBind();
BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.ddlCheckMan, this.CurrUser.LoginProjectId, drpContractualUnits.SelectedValue, true);//检测人
BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.ddlCheckMan, this.ProjectId, drpContractualUnits.SelectedValue, true);//检测人
if (ddlCheckMan.Items.Count > 1)
{
ddlCheckMan.SelectedIndex = 1;
@@ -1083,17 +1127,17 @@ namespace FineUIPro.Web.HJGL.CheckManage
this.drpInstallationId.Items.Clear();
if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != BLL.Const._Null)
{
//if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
//if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
//{
// BLL.Project_InstallationService.InitInstallationBySupervisorUnitIdListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, this.CurrUser.UnitId, true);
// BLL.Project_InstallationService.InitInstallationBySupervisorUnitIdListDownList(this.drpInstallationId, this.ProjectId, this.drpUnit.SelectedValue, this.CurrUser.UnitId, true);
// this.drpInstallationId.SelectedIndex = 0;
//}
//else
//{
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true);
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnit.SelectedValue, true);
// this.drpInstallationId.SelectedIndex = 0;
//}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true);
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnit.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
else
@@ -1131,7 +1175,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_CheckManageMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_CheckManageMenuId, button);
}
#endregion
@@ -1153,7 +1197,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
@@ -1207,7 +1251,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
////{
//// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
////}
////PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.CurrUser.LoginProjectId)));
////PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.ProjectId)));
//string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
@@ -1315,7 +1359,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
//{
// hssfworkbook.Write(filess);
//}
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
//FileInfo filet = new FileInfo(ReportFileName);
//Response.Clear();
@@ -1339,7 +1383,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
@@ -1349,7 +1393,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
//{
// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
//}
//PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.CurrUser.LoginProjectId)));
//PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.ProjectId)));
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
@@ -1467,7 +1511,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
hssfworkbook.Write(filess);
}
//PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
//PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
FileInfo filet = new FileInfo(ReportFileName);
Response.Clear();
@@ -1490,7 +1534,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
@@ -1542,10 +1586,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId);
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.CurrUser.LoginProjectId, q.InstallationId, q.UnitId);
var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.ProjectId, q.InstallationId, q.UnitId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("projectName", projectName);
keyValuePairs.Add("install", installation!=null?installation.InstallationName:"");
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckManageAudit.aspx.cs" Inherits="FineUIPro.Web.HJGL.CheckManage.CheckManageAudit" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -13,6 +15,16 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="检测单审核" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
@@ -51,7 +63,7 @@
<f:TextBox runat="server" ID="hdJOTID" Hidden="true"></f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:DropDownList ID="drpPrintType" runat="server" Label="打印报表" LabelAlign="Right" Width="350px"></f:DropDownList>
<f:Button ID="Button1" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:Button ID="Button1" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:Button ID="btnAudit" Text="审核" ToolTip="审核" Icon="PageEdit" runat="server" OnClick="btnAudit_Click">
</f:Button>
@@ -141,7 +153,7 @@
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="胶片规格" ColumnID="FilmSpecifications" DataField="FilmSpecifications" SortField="FilmSpecifications"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
@@ -193,8 +205,8 @@
<f:RenderField HeaderText="探伤结果" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="延长米cm" ColumnID="ExtendingRice" DataField="ExtendingRice" SortField="ExtendingRice"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
@@ -1,23 +1,32 @@
using BLL;
using System;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using Newtonsoft.Json.Linq;
using System.IO;
using NPOI.XSSF.UserModel;
using NPOI.SS.UserModel;
using System.Runtime.Serialization;
using NPOI.SS.Util;
using NPOI.HSSF.UserModel;
namespace FineUIPro.Web.HJGL.CheckManage
{
public partial class CheckManageAudit : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 检测主键
/// </summary>
public string CHT_CheckID
@@ -78,9 +87,21 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtCheckTime.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpCheckUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_5, true);//查询检测单位
BLL.UserService.InitUserDropDownList(this.ddlAuditMan, this.CurrUser.LoginProjectId, true);//审核人
this.InitTreeMenu();//加载树
@@ -92,6 +113,30 @@ namespace FineUIPro.Web.HJGL.CheckManage
//Funs.FineUIPleaseSelect(this.drpPrintType);
}
}
private void InitDropDownList()
{
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpCheckUnit, this.ProjectId, BLL.Const.ProjectUnitType_5, true);//查询检测单位
BLL.UserService.InitUserDropDownList(this.ddlAuditMan, this.ProjectId, true);//审核人
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
//this.GetButtonPower();
this.InitTreeMenu();
}
#endregion
#region --
@@ -100,6 +145,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </summary>
private void InitTreeMenu()
{
this.InitDropDownList();
if (!string.IsNullOrEmpty(this.txtCheckTime.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtCheckTime.Text.Trim());
@@ -113,19 +159,19 @@ namespace FineUIPro.Web.HJGL.CheckManage
this.tvControlItem.Nodes.Add(rootNode);
List<Model.Base_Unit> units = null;
var unit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
var unit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId);
if (unit == null || unit.UnitType == BLL.Const.ProjectUnitType_1 || unit.UnitType == BLL.Const.ProjectUnitType_5 || unit.UnitType == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -136,19 +182,19 @@ namespace FineUIPro.Web.HJGL.CheckManage
if (!this.txtCheckTime.Hidden)
{
checkLists = (from x in Funs.DB.CH_Check
where x.ProjectId == this.CurrUser.LoginProjectId && x.CHT_CheckDate >= startTime && x.CHT_CheckDate < endTime
where x.ProjectId == this.ProjectId && x.CHT_CheckDate >= startTime && x.CHT_CheckDate < endTime
select x).ToList();
}
else
{
checkLists = (from x in Funs.DB.CH_Check
where x.ProjectId == this.CurrUser.LoginProjectId && x.CHT_CheckCode.Contains(this.txtSearchCode.Text.Trim())
where x.ProjectId == this.ProjectId && x.CHT_CheckCode.Contains(this.txtSearchCode.Text.Trim())
select x).ToList();
}
if (this.drpCheckUnit.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpCheckUnit.SelectedValue))
{
checkLists = (from x in Funs.DB.CH_Check
where x.ProjectId == this.CurrUser.LoginProjectId && x.ContractualUnits == this.drpCheckUnit.SelectedValue
where x.ProjectId == this.ProjectId && x.ContractualUnits == this.drpCheckUnit.SelectedValue
select x).ToList();
}
if (units != null)
@@ -577,7 +623,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_CheckManageAuditMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_CheckManageAuditMenuId, button);
}
#endregion
@@ -599,7 +645,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
@@ -653,7 +699,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
////{
//// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
////}
////PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.CurrUser.LoginProjectId)));
////PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.ProjectId)));
//string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
@@ -761,7 +807,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
//{
// hssfworkbook.Write(filess);
//}
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
//FileInfo filet = new FileInfo(ReportFileName);
//Response.Clear();
@@ -785,7 +831,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
@@ -795,7 +841,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
//{
// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
//}
//PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.CurrUser.LoginProjectId)));
//PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.ProjectId)));
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
@@ -913,7 +959,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
hssfworkbook.Write(filess);
}
//PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
//PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
FileInfo filet = new FileInfo(ReportFileName);
Response.Clear();
@@ -936,7 +982,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
@@ -988,10 +1034,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId);
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.CurrUser.LoginProjectId, q.InstallationId, q.UnitId);
var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.ProjectId, q.InstallationId, q.UnitId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("projectName", projectName);
keyValuePairs.Add("install", installation != null ? installation.InstallationName : "");
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckManageImport.aspx.cs" Inherits="FineUIPro.Web.HJGL.CheckManage.CheckManageImport" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -17,186 +19,176 @@
}
</style>
<style type="text/css">
/*定义父容器*/
.content{
<style type="text/css">
/*定义父容器*/
.content {
width: 550px;
height: 30px;
background: #E4F1FB;
margin:0 auto;
}
/*定义进度条*/
.box{
margin: 0 auto;
}
/*定义进度条*/
.box {
width: 0px;
height: 30px;
line-height: 30px;
text-align: center;
background: #3BAAE3;
color: #fff;
}
</style>
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:TextBox ID="id" ClientIDMode="Static" runat="server" Hidden="true"></f:TextBox>
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:TextBox ID="id" ClientIDMode="Static" runat="server" Hidden="true"></f:TextBox>
<f:Panel ID="Panel1" runat="server" Margin="2px" BodyPadding="2px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:CheckBox ID="ckUpdate" runat="server" Text="更新导入"></f:CheckBox>
<f:Button ID="btnSave" runat="server" Text="保存全部" ToolTip="审核保存" Icon="SystemSave" OnClick="btnSave_Click"></f:Button>
<f:Button ID="btnSaveCheck" runat="server" Text="保存检测" ToolTip="审核保存" Icon="SystemSave" OnClick="btnSaveCheck_Click"></f:Button>
<f:Button ID="btnRefresh" runat="server" ClientIDMode="Static" Text="刷新" Icon="SystemSave" OnClick="btnRefresh_Click" Hidden="true"></f:Button>
<f:Button ID="btnAllDelete" runat="server" Icon="Delete" Text="删除记录" ToolTip="删除当前人所有临时导入记录" ConfirmText="删除当前人所有临时导入记录?"
ConfirmTarget="Top" OnClick="btnAllDelete_Click">
</f:Button>
<%-- <f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>--%>
<f:Button ID="imgbtnUpload" runat="server" Icon="DiskDownload" Text="模板下载" OnClick="imgbtnUpload_Click" EnableAjaxLoading="false"></f:Button>
<%--<f:Button ID="lkAchievements" runat="server" Icon="DiskDownload" Text="导入说明" OnClick="lkAchievements_Click" EnableAjaxLoading="false"></f:Button>--%>
<%--<f:Button ID="btnOut" runat="server" Icon="FolderUp" Text="导出" OnClick="btnOut_Click" EnableAjaxLoading="false"></f:Button>--%>
</Items>
<Items>
</Items>
</f:Toolbar>
</Toolbars>
<%--<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtValue1" runat="server" Label="单位代码" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="200px" LabelWidth="70px">
</f:TextBox>
<f:TextBox ID="txtValue2" runat="server" Label="工区编号" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="200px" LabelWidth="70px">
</f:TextBox>
<f:TextBox ID="txtValue3" runat="server" Label="管线代号" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="200px" LabelWidth="70px">
</f:TextBox>
<f:TextBox ID="txtValue4" runat="server" Label="焊口代号" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="200px" LabelWidth="70px">
</f:TextBox>
<f:TextBox ID="txtToopValue" runat="server" Label="错误信息" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
Width="200px" LabelWidth="70px">
</f:TextBox>
</Items>
</f:Toolbar>
</Toolbars>--%>
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="数据导入" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TempId" AllowCellEditing="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="TempId" AllowSorting="true"
SortField="RowNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="单位代码" ColumnID="Value1" DataField="Value1" SortField="Value1"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="工区编号" ColumnID="Value2" DataField="Value2" SortField="Value2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="220px" HeaderText="管线代号" ColumnID="Value3" DataField="Value3" SortField="Value3"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="焊口代号" ColumnID="Value4" DataField="Value4" SortField="Value4"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="点口委托日期" ColumnID="Value5" DataField="Value5" SortField="Value5"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="220px" HeaderText="委托单号" ColumnID="Value6" DataField="Value6" SortField="Value6"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" HeaderText="检测单位名称" ColumnID="Value7" DataField="Value7" SortField="Value7"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="检测单号" ColumnID="Value8" DataField="Value8" SortField="Value8"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" HeaderText="检测方法代号" ColumnID="Value9" DataField="Value9" SortField="Value9"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="合格等级" ColumnID="Value10" DataField="Value10" SortField="Value10"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="检测(拍片)日期" ColumnID="Value11" DataField="Value11" SortField="Value11"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:CheckBox ID="ckUpdate" runat="server" Text="更新导入"></f:CheckBox>
<f:Button ID="btnSave" runat="server" Text="保存全部" ToolTip="审核保存" Icon="SystemSave" OnClick="btnSave_Click"></f:Button>
<f:Button ID="btnSaveCheck" runat="server" Text="保存检测" ToolTip="审核保存" Icon="SystemSave" OnClick="btnSaveCheck_Click"></f:Button>
<f:Button ID="btnRefresh" runat="server" ClientIDMode="Static" Text="刷新" Icon="SystemSave" OnClick="btnRefresh_Click" Hidden="true"></f:Button>
<f:RenderField Width="100px" HeaderText="报告日期" ColumnID="Value12" DataField="Value12" SortField="Value12"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="返修位置" ColumnID="Value13" DataField="Value13" SortField="Value13"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="拍片总数" ColumnID="Value14" DataField="Value14" SortField="Value14"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="合格片数" ColumnID="Value15" DataField="Value15" SortField="Value15"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="是否合格" ColumnID="Value16" DataField="Value16" SortField="Value16"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="110px" HeaderText="缺陷定义" ColumnID="Value17" DataField="Value17" SortField="Value17"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="胶片规格" ColumnID="Value18" DataField="Value18" SortField="Value18"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="缺陷长度" ColumnID="Value19" DataField="Value19" SortField="Value19"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" Selected="true" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
<f:Label Label="错误记录数" runat="server" ID="lbDataCout" CssClass="Label" LabelAlign="right" LabelWidth="120px"></f:Label>
</PageItems>
</f:Grid>
<f:Button ID="btnAllDelete" runat="server" Icon="Delete" Text="删除记录" ToolTip="删除当前人所有临时导入记录" ConfirmText="删除当前人所有临时导入记录?"
ConfirmTarget="Top" OnClick="btnAllDelete_Click">
</f:Button>
<%-- <f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>--%>
<f:Button ID="imgbtnUpload" runat="server" Icon="DiskDownload" Text="模板下载" OnClick="imgbtnUpload_Click" EnableAjaxLoading="false"></f:Button>
<%--<f:Button ID="lkAchievements" runat="server" Icon="DiskDownload" Text="导入说明" OnClick="lkAchievements_Click" EnableAjaxLoading="false"></f:Button>--%>
<%--<f:Button ID="btnOut" runat="server" Icon="FolderUp" Text="导出" OnClick="btnOut_Click" EnableAjaxLoading="false"></f:Button>--%>
</Items>
<Items>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="数据导入" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TempId" AllowCellEditing="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="TempId" AllowSorting="true"
SortField="RowNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="单位代码" ColumnID="Value1" DataField="Value1" SortField="Value1"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="工区编号" ColumnID="Value2" DataField="Value2" SortField="Value2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="220px" HeaderText="管线代号" ColumnID="Value3" DataField="Value3" SortField="Value3"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="焊口代号" ColumnID="Value4" DataField="Value4" SortField="Value4"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="点口委托日期" ColumnID="Value5" DataField="Value5" SortField="Value5"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="220px" HeaderText="委托单号" ColumnID="Value6" DataField="Value6" SortField="Value6"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" HeaderText="检测单位名称" ColumnID="Value7" DataField="Value7" SortField="Value7"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="检测单号" ColumnID="Value8" DataField="Value8" SortField="Value8"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" HeaderText="检测方法代号" ColumnID="Value9" DataField="Value9" SortField="Value9"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="合格等级" ColumnID="Value10" DataField="Value10" SortField="Value10"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="检测(拍片)日期" ColumnID="Value11" DataField="Value11" SortField="Value11"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="报告日期" ColumnID="Value12" DataField="Value12" SortField="Value12"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="返修位置" ColumnID="Value13" DataField="Value13" SortField="Value13"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="拍片总数" ColumnID="Value14" DataField="Value14" SortField="Value14"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="合格片数" ColumnID="Value15" DataField="Value15" SortField="Value15"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="是否合格" ColumnID="Value16" DataField="Value16" SortField="Value16"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="110px" HeaderText="缺陷定义" ColumnID="Value17" DataField="Value17" SortField="Value17"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="胶片规格" ColumnID="Value18" DataField="Value18" SortField="Value18"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="80px" HeaderText="缺陷长度" ColumnID="Value19" DataField="Value19" SortField="Value19"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" Selected="true" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
<f:Label Label="错误记录数" runat="server" ID="lbDataCout" CssClass="Label" LabelAlign="right" LabelWidth="120px"></f:Label>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="true" runat="server"
IsModal="true" Width="1200px" Height="600px">
</f:Window>
<f:Window ID="Window2" Hidden="true" runat="server" MinHeight="30px"
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
IsModal="true" Width="550px" Height="32px" >
<Items >
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat ="server">
<div class="content" id="content"> <div class="box" id = "box" ></div > </div >
</f:ContentPanel>
<f:Window ID="Window2" Hidden="true" runat="server" MinHeight="30px"
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
IsModal="true" Width="550px" Height="32px">
<Items>
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
<div class="content" id="content">
<div class="box" id="box"></div>
</div>
</f:ContentPanel>
</Items>
</f:Window>
<%--<f:Window ID="Window2" Title="数据导出" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="true" runat="server"
@@ -211,19 +203,19 @@
</f:MenuButton>
</f:Menu>
</form>
<script >
</form>
<script>
var menuID = 'Menu1';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script >
</body >
</html>
@@ -3,16 +3,29 @@ using BLL.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Threading;
namespace FineUIPro.Web.HJGL.CheckManage
{
public partial class CheckManageImport : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
@@ -24,6 +37,20 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
if (percent == null)
{
percent = new Dictionary<string, int>();
@@ -38,6 +65,22 @@ namespace FineUIPro.Web.HJGL.CheckManage
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
//{
// btnNew.Hidden = true;
//}
//this.GetButtonPower();
this.BindGrid();
}
#endregion
#region
@@ -46,13 +89,17 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10"
+ @" ,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,Value20,Value21,Value22,Value23,Value24,Value25,Value26,Value27,Value28,Value29,Value30"
+ @" ,Value31,Value32,Value33,Value34,Value35,Value36,Value37,Value38,Value39,Value40,Value41,Value42,Value43,Value44,Value45,Value46,Value47,Value48,Value49,Value50,ToopValue,Type"
+ @" FROM HJGL_CheckImportTemp "
+ @" WHERE ProjectId=@ProjectId AND UserId=@UserId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
listStr.Add(new SqlParameter("@UserId", this.CurrUser.UserId));
//if (!string.IsNullOrEmpty(this.txtValue1.Text.Trim()))
//{
@@ -90,7 +137,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
Grid1.DataBind();
var dataInTempAll = from x in Funs.DB.HJGL_CheckImportTemp
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId
where x.ProjectId == this.ProjectId && x.UserId == this.CurrUser.UserId
select x;
for (int i = 0; i < Grid1.Rows.Count; i++)
{
@@ -164,7 +211,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.CheckManageImportTempService.DeleteDataInTempByDataInTempID(rowID);
//BLL.Sys_LogService.AddLog(Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除导入信息");
//BLL.Sys_LogService.AddLog(Const.System_7, this.ProjectId, this.CurrUser.UserId, "删除导入信息");
}
ShowNotify("删除成功!", MessageBoxIcon.Success);
@@ -312,7 +359,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
Model.HJGL_CheckImportTemp newDataInTemp = new Model.HJGL_CheckImportTemp();
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_DataInTemp));
newDataInTemp.ProjectId = this.CurrUser.LoginProjectId;
newDataInTemp.ProjectId = this.ProjectId;
newDataInTemp.UserId = this.CurrUser.UserId;
newDataInTemp.Time = System.DateTime.Now;
newDataInTemp.RowNo = i + 2;
@@ -361,11 +408,11 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
btnSaveMethod(this.CurrUser.LoginProjectId, this.CurrUser.UserId);
btnSaveMethod(this.ProjectId, this.CurrUser.UserId);
}
protected void btnSaveCheck_Click(object sender, EventArgs e)
{
btnSaveCheckMethod(this.CurrUser.LoginProjectId, this.CurrUser.UserId);
btnSaveCheckMethod(this.ProjectId, this.CurrUser.UserId);
}
protected void btnRefresh_Click(object sender, EventArgs e)
{
@@ -380,10 +427,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
where y.ProjectId == LoginProjectId
select x;
var isos = from x in Funs.DB.PW_IsoInfo
where x.ProjectId == CurrUser.LoginProjectId
where x.ProjectId == ProjectId
select x;
var jointInfos = from x in Funs.DB.PW_JointInfo
where x.ProjectId == CurrUser.LoginProjectId
where x.ProjectId == ProjectId
select x;
var workAreas = from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == LoginProjectId select x;
@@ -607,11 +654,11 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
Model.BO_Point point = new Model.BO_Point();
string date = pointDate.Trim().Replace("-", "");
point.PW_PointNo = BLL.SQLHelper.RunProcNewId("SpGetNewCode3ByProjectPrefix", "dbo.BO_Point", "PW_PointNo", this.CurrUser.LoginProjectId, date + "-");
point.PW_PointNo = BLL.SQLHelper.RunProcNewId("SpGetNewCode3ByProjectPrefix", "dbo.BO_Point", "PW_PointNo", this.ProjectId, date + "-");
point.PW_PointID = Guid.NewGuid().ToString();
point.UnitId = units.FirstOrDefault(x => x.UnitCode == unitCode).UnitId;
point.PW_PointDate = Convert.ToDateTime(pointDate);
point.ProjectId = this.CurrUser.LoginProjectId;
point.ProjectId = this.ProjectId;
point.InstallationId = workAreas.FirstOrDefault(x => x.WorkAreaCode == WorkArea).InstallationId;
point.PW_TablerDate = DateTime.Now;
point.PW_Tabler = this.CurrUser.UserId;
@@ -639,7 +686,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
var firstDataTemp = dataInTemp.FirstOrDefault(x => x.Value6 == trust);
Model.CH_Trust newTrust = new Model.CH_Trust();
newTrust.CH_TrustID = Guid.NewGuid().ToString();
newTrust.ProjectId = this.CurrUser.LoginProjectId;
newTrust.ProjectId = this.ProjectId;
newTrust.CH_TrustCode = firstDataTemp.Value6;
var iso = isos.FirstOrDefault(x => x.ISO_IsoNo == firstDataTemp.Value3);
var unit = units.FirstOrDefault(x => x.UnitCode == firstDataTemp.Value1);
@@ -765,7 +812,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
var trust = newTrusts.FirstOrDefault(x => x.CH_TrustCode == firstDataTemp.Value6);
Model.CH_Check check = new Model.CH_Check();
check.CHT_CheckID = Guid.NewGuid().ToString();
check.ProjectId = this.CurrUser.LoginProjectId;
check.ProjectId = this.ProjectId;
check.CHT_CheckCode = checkCode;
check.CH_TrustID = trust.CH_TrustID;
check.UnitId = trust.CH_TrustUnit;
@@ -890,10 +937,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
where y.ProjectId == LoginProjectId
select x;
var isos = from x in Funs.DB.PW_IsoInfo
where x.ProjectId == CurrUser.LoginProjectId
where x.ProjectId == ProjectId
select x;
var jointInfos = from x in Funs.DB.PW_JointInfo
where x.ProjectId == CurrUser.LoginProjectId
where x.ProjectId == ProjectId
select x;
var workAreas = from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == LoginProjectId select x;
@@ -1072,10 +1119,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
var firstDataTemp = dataInTemp.FirstOrDefault(x => x.Value8 == checkCode);
var trust = Funs.DB.CH_Trust.FirstOrDefault(x => x.ProjectId==CurrUser.LoginProjectId && x.CH_TrustCode == firstDataTemp.Value6);
var trust = Funs.DB.CH_Trust.FirstOrDefault(x => x.ProjectId==ProjectId && x.CH_TrustCode == firstDataTemp.Value6);
Model.CH_Check check = new Model.CH_Check();
check.CHT_CheckID = Guid.NewGuid().ToString();
check.ProjectId = this.CurrUser.LoginProjectId;
check.ProjectId = this.ProjectId;
check.CHT_CheckCode = checkCode;
check.CH_TrustID = trust.CH_TrustID;
check.UnitId = trust.CH_TrustUnit;
@@ -1201,7 +1248,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
////先删除临时表中 该人员以前导入的数据
BLL.CheckManageImportTempService.DeleteDataInTempByProjectIdUserId(this.CurrUser.LoginProjectId, this.CurrUser.UserId);
BLL.CheckManageImportTempService.DeleteDataInTempByProjectIdUserId(this.ProjectId, this.CurrUser.UserId);
this.BindGrid();
ShowNotify("删除成功!", MessageBoxIcon.Success);
this.lbDataCout.Text = string.Empty;
@@ -23,15 +23,6 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// id 控件。
/// </summary>
@@ -41,6 +32,15 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </remarks>
protected global::FineUIPro.TextBox id;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -50,6 +50,42 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckManageStatic.aspx.cs" Inherits="FineUIPro.Web.HJGL.CheckManage.CheckManageStatic" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -13,20 +15,30 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="300px" Title="检测方法" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtMonth" runat="server" Label="月份" EmptyText="输入查询条件" AutoPostBack="true"
<f:DatePicker ID="txtMonth" runat="server" Label="月份" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="Tree_TextChanged" Width="220px" LabelWidth="50px" DisplayType="Month" DateFormatString="yyyy-MM">
</f:DatePicker>
</f:DatePicker>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="检测方法" OnNodeExpand="tvControlItem_NodeExpand"
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="检测方法" OnNodeExpand="tvControlItem_NodeExpand"
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
EnableTextSelection="true">
@@ -39,22 +51,21 @@
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtJOT_JointNo" runat="server" Label="委托编号" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="txtJOT_JointNo_TextChanged" Width="220px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnImport" runat="server" Text="导入" ToolTip="导入" Icon="ApplicationGet" OnClick="btnImport_Click"></f:Button>
<f:DropDownList ID="printType" runat="server" Label="打印报表" LabelAlign="Right" LabelWidth="100px">
</f:DropDownList>
<f:Button ID="Button2" runat="server" Icon="Printer" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:TextBox ID="txtJOT_JointNo" runat="server" Label="委托编号" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="txtJOT_JointNo_TextChanged" Width="220px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnImport" runat="server" Text="导入" ToolTip="导入" Icon="ApplicationGet" OnClick="btnImport_Click"></f:Button>
<f:DropDownList ID="printType" runat="server" Label="打印报表" LabelAlign="Right" LabelWidth="100px">
</f:DropDownList>
<f:Button ID="Button2" runat="server" Icon="Printer" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
</Items>
</f:Toolbar>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口信息" EnableCollapse="true"
@@ -68,22 +79,22 @@
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="委托单位" ColumnID="TrustUnitName" DataField="TrustUnitName" SortField="TrustUnitName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="施工单位" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="施工单位" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="装置代号" ColumnID="InstallationName" DataField="InstallationName" SortField="InstallationName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="装置代号" ColumnID="InstallationName" DataField="InstallationName" SortField="InstallationName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="区域代号" ColumnID="WorkAreaCode" DataField="WorkAreaCode" SortField="WorkAreaCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="区域代号" ColumnID="WorkAreaCode" DataField="WorkAreaCode" SortField="WorkAreaCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="委托编号" ColumnID="CH_TrustCode" DataField="CH_TrustCode" SortField="CH_TrustCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Locked="true">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="委托日期" ColumnID="Trust_Date" DataField="Trust_Date" SortField="Trust_Date"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<f:RenderField HeaderText="委托日期" ColumnID="Trust_Date" DataField="Trust_Date" SortField="Trust_Date"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="检件名称" ColumnID="CheckThingName" DataField="CheckThingName" SortField="CheckThingName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
@@ -92,7 +103,7 @@
SortField="DefectCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="检测时机" ColumnID="CheckOpportunity" DataField="CheckOpportunity"
<f:RenderField HeaderText="检测时机" ColumnID="CheckOpportunity" DataField="CheckOpportunity"
SortField="CheckOpportunity" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
@@ -100,57 +111,56 @@
SortField="ISO_IsoNo" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="焊口号" ColumnID="JOT_JointNo" DataField="JOT_JointNo"
<f:RenderField HeaderText="焊口号" ColumnID="JOT_JointNo" DataField="JOT_JointNo"
FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="焊工号" ColumnID="WED_Code" DataField="WED_Code" FieldType="String" HeaderTextAlign="Center">
<f:RenderField HeaderText="焊工号" ColumnID="WED_Code" DataField="WED_Code" FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="检件规格" ColumnID="JOT_JointDesc" DataField="JOT_JointDesc" FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="检件规格" ColumnID="JOT_JointDesc" DataField="JOT_JointDesc" FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="检件材质" ColumnID="MaterialCode" DataField="MaterialCode"
SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="比例(%" ColumnID="DetectionRateCode" DataField="DetectionRateCode"
SortField="DetectionRateCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
SortField="DetectionRateCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="焊接方法" ColumnID="WeldingMethodCode" DataField="WeldingMethodCode"
SortField="WeldingMethodCode" FieldType="String" HeaderTextAlign="Center"
SortField="WeldingMethodCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="工作量米" ColumnID="WorkAmout1" DataField="WorkAmout1"
SortField="WorkAmout1" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
>
SortField="WorkAmout1" FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="工作量道" ColumnID="WorkAmout2" DataField="WorkAmout2" SortField="WorkAmout2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="级别" ColumnID="CheckLevel" DataField="CheckLevel" SortField="CheckLevel"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="检测日期" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="检测温度" ColumnID="CheckTemperature" DataField="CheckTemperature" SortField="CheckTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="检测人" ColumnID="CheckPerson" DataField="CheckPerson" SortField="CheckPerson"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="缺陷性质" ColumnID="DefectType" DataField="DefectType"
SortField="DefectType" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="缺陷定量" ColumnID="DefectNum" DataField="DefectNum" SortField="DefectNum"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="结果" ColumnID="CheckResult" DataField="CheckResult" SortField="CheckResult"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="结果单编号" ColumnID="CheckResultNum" DataField="CheckResultNum" SortField="CheckResultNum"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="结果单日期" ColumnID="CheckResultDate" DataField="CheckResultDate" SortField="CheckResultDate"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
@@ -162,13 +172,13 @@
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="工作量" ColumnID="ReportAmount" DataField="ReportAmount" SortField="ReportAmount"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="工程进度款" ColumnID="ProgressMoney" DataField="ProgressMoney" SortField="ProgressMoney"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
@@ -198,14 +208,14 @@
Width="1100px" Height="740px">
</f:Window>
<f:Window ID="Window2" Title="批量增加焊口" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="900px" OnClose="Window1_Close"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="900px" OnClose="Window1_Close"
Height="450px">
</f:Window>
<f:Window ID="Window3" Title="导出管线焊口信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1200px"
Height="620px">
</f:Window>
<f:Window ID="Window5" Title="打印" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1010px"
Height="680px">
@@ -222,8 +232,8 @@
</f:MenuButton>
</f:Menu>
<f:Window ID="Window6" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
<f:Window ID="Window6" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
</form>
@@ -1,20 +1,32 @@
using BLL;
using System;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using Newtonsoft.Json.Linq;
using System.IO;
using NPOI.XSSF.UserModel;
using NPOI.SS.UserModel;
using System.Runtime.Serialization;
namespace FineUIPro.Web.HJGL.CheckManage
{
public partial class CheckManageStatic : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -25,13 +37,43 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.txtMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.InitTreeMenu();//加载树
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
//if (string.IsNullOrEmpty(this.ProjectId))
//{
// btnNew.Hidden = true;
//}
//this.GetButtonPower();
this.InitTreeMenu();
}
#endregion
@@ -43,7 +85,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_CheckManageStaticMenuId, BLL.Const.BtnSave))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_CheckManageStaticMenuId, BLL.Const.BtnSave))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckManageDataIn.aspx", "导入 - ")));
}
@@ -60,6 +102,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string SelectedNodeID = this.tvControlItem.SelectedNodeID;
this.tvControlItem.Nodes.Clear();
@@ -73,10 +119,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
FROM [dbo].[CH_CheckStatic]
where [ReportDate]>=@dateA and [ReportDate]<@dateZ and ProjectId = @projectId
order by [DetectionTypeCode],[ReportDate] desc";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
new SqlParameter("@dateA", this.txtMonth.Text+"-01"),
new SqlParameter("@dateZ", DateUtil.ToDateTime( this.txtMonth.Text+"-01").Value.AddMonths(1).ToString("yyyy-MM-dd")),
};
@@ -137,16 +183,16 @@ namespace FineUIPro.Web.HJGL.CheckManage
{
}
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
var p = this.tvControlItem.SelectedNodeID;
var p = this.tvControlItem.SelectedNodeID;
this.BindGrid();
}
@@ -158,6 +204,10 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT [CheckStaticId]
,[Installation_ID]
,[InstallationName]
@@ -217,28 +267,28 @@ namespace FineUIPro.Web.HJGL.CheckManage
,[DetectionTypeCode]
,[DefectCode]
FROM [dbo].[CH_CheckStatic] where ProjectId = @projectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId)
new SqlParameter("@projectId", this.ProjectId)
};
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
string[] SelectedNodes = this.tvControlItem.SelectedNodeID.Split('|');
if (SelectedNodes.Length > 0)
{
strSql += " and ReportNo = @ReportNo ";
listStr.Add(new SqlParameter("@ReportNo", SelectedNodes[0]));
}
if (SelectedNodes.Length > 1)
{
{
strSql += " and ReportDate >= @ReportDateA and ReportDate<=@ReportDateZ ";
listStr.Add(new SqlParameter("@ReportDateA", SelectedNodes[1]));
listStr.Add(new SqlParameter("@ReportDateZ", SelectedNodes[1] + " 23:59:59"));
}
if (SelectedNodes.Length > 2)
{
{
strSql += " and DetectionTypeCode = @DetectionTypeCode ";
listStr.Add(new SqlParameter("@DetectionTypeCode", SelectedNodes[2]));
@@ -247,12 +297,12 @@ namespace FineUIPro.Web.HJGL.CheckManage
if (!string.IsNullOrEmpty(txtJOT_JointNo.Text))
{
strSql += " and CH_TrustCode like @CH_TrustCode ";
listStr.Add(new SqlParameter("@CH_TrustCode", "%"+this.txtJOT_JointNo.Text+"%"));
listStr.Add(new SqlParameter("@CH_TrustCode", "%" + this.txtJOT_JointNo.Text + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
@@ -311,7 +361,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (GetButtonPower(Const.BtnModify))
{
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckManageStaticEdit.aspx?CheckStaticId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
else
@@ -320,7 +370,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
return;
}
}
/// <summary>
/// 焊口信息编辑
@@ -373,7 +423,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
var checkStatic = Funs.DB.CH_CheckStatic.FirstOrDefault(x => x.CheckStaticId == rowID);
Funs.DB.CH_CheckStatic.DeleteOnSubmit(checkStatic);
Funs.DB.SubmitChanges();
//BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
//BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.ProjectId, this.CurrUser.UserId, "删除焊口信息");
}
}
@@ -460,7 +510,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId)
new SqlParameter("@projectId", this.ProjectId)
};
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
@@ -488,7 +538,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", projectName);
@@ -518,18 +568,18 @@ namespace FineUIPro.Web.HJGL.CheckManage
BLL.Common.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\管道MT报告模板.frx";
if (this.tvControlItem.SelectedNodeID.Split('|').Length > 2)
{
string type = this.tvControlItem.SelectedNodeID.Split('|')[2] ;
string type = this.tvControlItem.SelectedNodeID.Split('|')[2];
switch (type)
{
case "RT\\UT":
case "RT": initTemplatePath = "File\\Fastreport\\管道RT报告模板.frx"; break;
case "PT":
initTemplatePath = "File\\Fastreport\\管道PT报告模板.frx";
break;
break;
case "UT":
initTemplatePath = "File\\Fastreport\\管道UT报告模板.frx";
break;
@@ -537,9 +587,9 @@ namespace FineUIPro.Web.HJGL.CheckManage
case "TOFD\\UT\\MT":
case "TOFD\\MT":
case "3D-TFM":
case "TOFD": initTemplatePath = "File\\Fastreport\\管道TOFD报告模板.frx"; break;
case "TOFD": initTemplatePath = "File\\Fastreport\\管道TOFD报告模板.frx"; break;
}
}
if (File.Exists(rootPath + initTemplatePath))
@@ -629,7 +679,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
}
#endregion
#region
/// <summary>
@@ -639,7 +689,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, button);
}
#endregion
@@ -656,7 +706,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
#endregion
}
}
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.CheckManage
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>