This commit is contained in:
jackchenyang 2024-05-23 01:05:28 +08:00
parent df39b88c09
commit d4401663c9
9 changed files with 271 additions and 70 deletions

View File

@ -162,7 +162,7 @@
</site>
<site name="WebApi" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:3862:localhost" />
@ -250,7 +250,7 @@
</site>
<site name="FineUIPro.Web(10)" id="13">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\FineUIPro.Web" />
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\FineUIPro.Web" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:13960:localhost" />

Binary file not shown.

View File

@ -1239,6 +1239,7 @@
<Content Include="WeldingProcess\PMI\PMISelectList.aspx" />
<Content Include="WeldingProcess\TestPackageManage\AItemEndCheck.aspx" />
<Content Include="WeldingProcess\TestPackageManage\BItemEndCheck.aspx" />
<Content Include="WeldingProcess\TestPackageManage\selectJointCode.aspx" />
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageAudit.aspx" />
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageEdit.aspx" />
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageItemEdit.aspx" />
@ -5448,6 +5449,13 @@
<Compile Include="WeldingProcess\TestPackageManage\BItemEndCheck.aspx.designer.cs">
<DependentUpon>BItemEndCheck.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\TestPackageManage\selectJointCode.aspx.cs">
<DependentUpon>selectJointCode.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WeldingProcess\TestPackageManage\selectJointCode.aspx.designer.cs">
<DependentUpon>selectJointCode.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\TestPackageManage\TestPackageManageAudit.aspx.cs">
<DependentUpon>TestPackageManageAudit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -146,8 +146,8 @@
runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId" AllowSorting="true"
SortField="WorkAreaCode,PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="100" OnRowDataBound="Grid1_RowDataBound"
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
AllowPaging="true" IsDatabasePaging="true" PageSize="100"
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" >
<Columns>
<f:CheckBoxField ColumnID="ckbIsSelected" Width="50px" RenderAsStaticField="false" HeaderText="选择"
AutoPostBack="true" CommandName="IsSelected" HeaderTextAlign="Center" />
@ -159,20 +159,13 @@
<f:RenderField HeaderText="管线编号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px">
</f:RenderField>
<f:RenderField HeaderText="部分/全部焊口" Width="200" RendererFunction="selectData" ColumnID="isALL" DataField="WeldJonintCode" >
<f:RenderField HeaderText="部分/全部焊口" Width="200" ColumnID="WeldJointCode" DataField="WeldJointCode" >
<Editor>
<f:DropDownBox runat="server" ID="txtIsAll" EmptyText="全部"
EnableMultiSelect="true" TopSpaceFirst="true" AutoShowClearIcon="true" >
<PopPanel>
<f:Grid ID="Grid2" Width="300" ShowBorder="true" ShowHeader="false" runat="server" EnableCheckBoxSelect="true" KeepCurrentSelection="true"
Hidden="true" DataKeyNames="PipelineId" DataIDField="WeldJointCode" DataTextField="WeldJointCode" EnableMultiSelect="true"
AllowPaging="true" PageSize="10" ShowPagingMessage="false" PagingType="NumberButton">
<Columns>
<f:RenderField ColumnID="WeldJointCode" ExpandUnusedSpace="true" DataField="WeldJointCode" HeaderText="焊口号" />
</Columns>
</f:Grid>
</PopPanel>
</f:DropDownBox>
<f:TriggerBox ID="txtisALL" EmptyText="全部" Text="全部" TriggerIcon="Search" EnablePostBack="false" runat="server">
<Listeners>
<f:Listener Event="triggerclick" Handler="onNameSearchTriggerClick" />
</Listeners>
</f:TriggerBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="设计压力" ColumnID="DesignPressure" DataField="DesignPressure" SortField="DesignPressure"
@ -227,10 +220,15 @@
runat="server" Text="全不选" Icon="Cancel">
</f:MenuButton>
</f:Menu>
<f:Window ID="Window1" Hidden="true" EnableIFrame="true" EnableMaximize="true"
EnableResize="true" Target="Top" runat="server" Height="350px" Width="700px"
Title="选择焊口">
</f:Window>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
var txtIsAllClientID = '<%= txtIsAll.ClientID %>';
var grid1ClientID = '<%=Grid1.ClientID%>'
var window1ClientID = '<%= Window1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
@ -239,13 +237,25 @@
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function selectData(value) {
if (value == '')
return '全部';
function updateGridRow(rowId, values) {
var ddlHobby = F(txtIsAllClientID);
var hobbies = value.split(',');
console.log(hobbies);
var grid = F(grid1ClientID);
// cancelEdit用来取消编辑
grid.cancelEdit();
grid.updateCellValue(rowId, values);
}
function onNameSearchTriggerClick(event) {
var grid = F(grid1ClientID);
var selectedCell = grid.getSelectedCell();
var selStrCode = grid.getCellValue(selectedCell[0], "WeldJointCode");
if (selectedCell) {
var wnd = F(window1ClientID);
// 由于需要在顶层页面中弹出,所以不能设置 ./grideditor_selectfromwindow_clientscript_iframe.aspx必须通过 baseUrl 来绝对定位
wnd.show(F.baseUrl + "WeldingProcess/TestPackageManage/selectJointCode.aspx?rowId=" + selectedCell[0] + "&jointcode=" + selStrCode);
}
}

View File

@ -211,7 +211,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
strSql = @"SELECT
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
'' as WeldJointCode
FROM dbo.Pipeline_Pipeline AS IsoInfo
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
@ -229,7 +230,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
IsoList.isAll,(case when (isnull(IsoList.WeldJonintCode,'')='') then '' else IsoList.WeldJonintCode end) as WeldJonintCode
IsoList.isAll,(case when (isnull(IsoList.WeldJonintCode,'')='') then '' else IsoList.WeldJonintCode end) as WeldJointCode
FROM dbo.Pipeline_Pipeline AS IsoInfo
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
@ -543,7 +544,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
if (listSelects.Contains(PipelineId))
{
JObject values = teamGroupRow.Value<JObject>("values");
string WeldJonintCodes = values.Value<string>("isALL");
string WeldJonintCodes = values.Value<string>("WeldJointCode");
string workAreaId = values.Value<string>("WorkAreaId");
if (string.IsNullOrEmpty(WeldJonintCodes))
WeldJonintCodes = "全部";
@ -595,32 +596,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
#region Grid2列表
private void GetBindGrid2Data(string PipelineID)
{
this.Grid2.DataSource = GetDataJointGrid2(PipelineID);
this.Grid2.DataBind();
}
private List<Pipeline_WeldJoint> GetDataJointGrid2(string PipelineID)
{
string[] arr = null;
var tempData=Funs.DB.PTP_PipelineList.Where(t=>t.PipelineId == PipelineID && t.IsAll==false)
.Select(t=>t.WeldJonintCode).FirstOrDefault();
if (tempData != null)
{
arr = tempData.Split(',');
}
var query = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineID )
.OrderBy(t => t.WeldJointCode).AsQueryable();
if (arr != null)
{
query = query.Where(t => !arr.Contains(t.WeldJointCode));
}
return query.ToList();
}
#endregion
@ -690,13 +666,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
this.ShowGridItem();
}
#endregion
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
string rowId = e.RowID;
Grid dataGrid = e.Row.FindControl("Grid2") as Grid;
}
}
}

View File

@ -438,22 +438,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
protected global::FineUIPro.RenderField WorkAreaId;
/// <summary>
/// txtIsAll 控件。
/// txtisALL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox txtIsAll;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
protected global::FineUIPro.TriggerBox txtisALL;
/// <summary>
/// ToolbarSeparator1 控件。
@ -508,5 +499,14 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnNoSelect;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
}
}

View File

@ -0,0 +1,73 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selectJointCode.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.TestPackageManage.selectJointCode" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Grid1" runat="server" />
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口信息列表" runat="server" EnableCollapse="false"
DataKeyNames="WeldJointCode" EnableCheckBoxSelect="true" EnableMultiSelect="true" PageSize="100" AllowPaging="true" >
<Columns>
<f:RowNumberField />
<f:RenderField ColumnID="WeldJointCode" MinWidth="200px" DataField="WeldJointCode" HeaderText="焊口编号" />
</Columns>
<Toolbars>
<f:Toolbar runat="server" Position="Top">
<Items>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
<f:Button ID="btnSaveClose" Text="保存选中行" runat="server" Icon="SystemSaveClose" EnablePostBack="false">
<Listeners>
<f:Listener Event="click" Handler="onGridRowSelect" />
</Listeners>
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Listeners>
<f:Listener Event="rowdblclick" Handler="onGridRowSelect" />
</Listeners>
</f:Grid>
</form>
<script>
var gridClientID = '<%= Grid1.ClientID %>';
function renderGender(value) {
return value == 1 ? '男' : '女';
}
function onGridRowSelect() {
// 返回当前活动Window对象浏览器窗口对象通过F.getActiveWindow().window获取
var activeWindow = F.getActiveWindow();
// 选中行数据
var rowData = F(gridClientID).getSelectedRows(true);
var strCode = "";
for (var i = 0; i < rowData.length; i++) {
var rowValue = rowData[i];
strCode += rowValue.values["WeldJointCode"] + ",";
}
if (strCode) {
strCode = strCode.substring(0, strCode.length - 1);
}
var queryRowId = F.queryString('rowId');
var selectedValues = {
"WeldJointCode": strCode
};
// 隐藏弹出窗体
activeWindow.hide();
// 调用父页面的 updateGridRow 函数
activeWindow.window.updateGridRow(queryRowId, selectedValues);
}
</script>
</body>
</html>

View File

@ -0,0 +1,77 @@
using BLL;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{
public partial class selectJointCode : PageBase
{
private string rowId=string.Empty;
private string jointcode=string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
this.rowId = Request.Params["rowId"];
this.jointcode = Request.Params["jointcode"];
if (string.IsNullOrEmpty(this.rowId))
{
ShowNotify("请先选择某条管线信息!", MessageBoxIcon.Warning);
return;
}
if (!IsPostBack)
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.BindGridDataSource();
this.InitGridDataChecked();
}
}
void InitGridDataChecked()
{
List<int> list = new List<int>();
if (!string.IsNullOrEmpty(this.jointcode))
{
string[] arr=this.jointcode.Split(',');
for (int i = 0;i<Grid1.Rows.Count;i++)
{
string key = Grid1.DataKeys[i][0].ToString();
if (arr.Contains(key))
{
list.Add(i);
}
}
}
Grid1.SelectedRowIndexArray = list.ToArray();
}
void BindGridDataSource()
{
this.Grid1.DataSource = GetDataJointGrid2(this.rowId);
this.Grid1.DataBind();
}
private List<Pipeline_WeldJoint> GetDataJointGrid2(string PipelineID)
{
string[] arr = null;
var tempData = Funs.DB.PTP_PipelineList.Where(t => t.PipelineId == PipelineID && t.IsAll == false)
.Select(t => t.WeldJonintCode).FirstOrDefault();
if (tempData != null)
{
arr = tempData.Split(',');
}
var query = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineID)
.OrderBy(t => t.WeldJointCode).AsQueryable();
if (arr != null)
{
query = query.Where(t => !arr.Contains(t.WeldJointCode));
}
return query.ToList();
}
}
}

View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{
public partial class selectJointCode
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// btnSaveClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSaveClose;
}
}