113 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			113 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
|  | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SubWorkInspect.aspx.cs" Inherits="FineUIPro.Web.TestRun.Produce.SubWorkInspect" %> | |||
|  | 
 | |||
|  | <!DOCTYPE html> | |||
|  | 
 | |||
|  | <html xmlns="http://www.w3.org/1999/xhtml"> | |||
|  | <head runat="server"> | |||
|  |     <title>工作包检查</title> | |||
|  |     <style> | |||
|  |         .f-grid-row .f-grid-cell-inner { | |||
|  |             white-space: normal; | |||
|  |             word-break: break-all; | |||
|  |         } | |||
|  | 
 | |||
|  |         .hidethis { | |||
|  |             display: none; | |||
|  |         } | |||
|  |     </style> | |||
|  | </head> | |||
|  | <body> | |||
|  |     <form id="form1" runat="server"> | |||
|  |         <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" /> | |||
|  |         <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region"> | |||
|  |             <Items> | |||
|  |                 <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" EnableCollapse="true" runat="server" DataIDField="TermItemId" DataKeyNames="TermItemId,InspectionResults,SubInspectId,IsTailTerm" AllowSorting="true" SortField="Sort" SortDirection="ASC" EnableColumnLines="true" AllowCellEditing="true" EnableMultiSelect="false" AllowFilters="true" OnSort="Grid1_Sort" EnableTextSelection="True" OnRowCommand="Grid1_RowCommand" OnRowDataBound="Grid1_RowDataBound" ClicksToEdit="1"> | |||
|  |                     <Toolbars> | |||
|  |                         <f:Toolbar ID="Toolbar1" runat="server"> | |||
|  |                             <Items> | |||
|  |                                 <f:ToolbarFill ID="ToolbarFill" runat="server"></f:ToolbarFill> | |||
|  |                                 <f:Button ID="btnSave" Text="保存" ToolTip="保存" Icon="FilmSave" runat="server" OnClientClick="if(!isValid()){return false;}" OnClick="btnSave_Click"></f:Button> | |||
|  |                                 <f:TextBox runat="server" ID="hidTailTermId" Hidden="true"></f:TextBox> | |||
|  |                             </Items> | |||
|  |                         </f:Toolbar> | |||
|  |                     </Toolbars> | |||
|  |                     <Columns> | |||
|  |                         <f:RowNumberField EnablePagingNumber="true" Width="50px" HeaderTextAlign="Center" TextAlign="Center" /> | |||
|  |                         <f:RenderField HeaderText="检查事项" ColumnID="WorkInspectName" DataField="WorkInspectName" SortField="WorkInspectName" Width="300px"></f:RenderField> | |||
|  |                         <f:RenderField ExpandUnusedSpace="true" MinWidth="300px" ColumnID="InspectionIllustrate" DataField="InspectionIllustrate" HeaderText="说明"> | |||
|  |                             <Editor> | |||
|  |                                 <f:TextArea runat="server" ID="txtInspectionIllustrate"></f:TextArea> | |||
|  |                             </Editor> | |||
|  |                         </f:RenderField> | |||
|  |                         <f:RenderField ExpandUnusedSpace="true" MinWidth="150px" ColumnID="InspectionResults" DataField="InspectionResults" | |||
|  |                             HeaderText="检查结果" RendererFunction="renderInspectionResults"> | |||
|  |                             <Editor> | |||
|  |                                 <f:DropDownList ID="ddlInspectionResults" Required="true" EnableEdit="false" ForceSelection="false" runat="server"> | |||
|  |                                     <f:ListItem Value="1" Text="通过" /> | |||
|  |                                     <f:ListItem Value="0" Text="未通过" /> | |||
|  |                                 </f:DropDownList> | |||
|  |                             </Editor> | |||
|  |                         </f:RenderField> | |||
|  |                         <f:LinkButtonField Width="100px" TextAlign="Center" ColumnID="TailTerm" CommandName="TailTerm" Text="尾项申请" /> | |||
|  |                         <f:LinkButtonField Width="100px" TextAlign="Center" ColumnID="TailTermUpdate" CommandName="TailTermUpdate" Text="尾项修改" /> | |||
|  |                     </Columns> | |||
|  |                 </f:Grid> | |||
|  |             </Items> | |||
|  |         </f:Panel> | |||
|  |         <f:Window ID="Window1" Title="检查项巡检" Hidden="true" EnableIFrame="true" EnableMaximize="true" | |||
|  |             Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" | |||
|  |             Width="1300px" Height="660px"> | |||
|  |         </f:Window> | |||
|  |         <f:Window ID="Window2" Title="请选择尾项" Hidden="true" EnableIFrame="true" EnableMaximize="true" | |||
|  |             Target="Top" EnableResize="true" runat="server" IsModal="true" OnClose="Window2_Close" | |||
|  |             Width="1300px" Height="660px"> | |||
|  |         </f:Window> | |||
|  | 
 | |||
|  |     </form> | |||
|  |     <script type="text/javascript"> | |||
|  |         // 返回false,来阻止浏览器右键菜单 | |||
|  |         function onRowContextMenu(event, rowId) { | |||
|  |             return false; | |||
|  |         } | |||
|  |         function reloadGrid() { | |||
|  |             __doPostBack(null, 'reloadGrid'); | |||
|  |         } | |||
|  |         //检查结果 | |||
|  |         var ddlInspectionResults = '<%= ddlInspectionResults.ClientID %>'; | |||
|  |         function renderInspectionResults(value) { | |||
|  |             if (value == -1) { | |||
|  |                 return ''; | |||
|  |             } | |||
|  |             return F(ddlInspectionResults).getTextByValue(value); | |||
|  |         } | |||
|  | 
 | |||
|  |         //验证检查结果 | |||
|  |         function isValid() { | |||
|  |             debugger; | |||
|  |             var grid1 = F('<%= Grid1.ClientID %>'); | |||
|  |             var valid = true, modifiedData = grid1.getMergedData(); | |||
|  | 
 | |||
|  |             $.each(modifiedData, function (index, rowData) { | |||
|  |                 if (rowData.status === 'deleted') { | |||
|  |                     return true; | |||
|  |                 } | |||
|  |                 var results = rowData.values['InspectionResults']; | |||
|  |                 if (typeof (results) != 'undefined' && $.trim(results) == '') { | |||
|  |                     F.alert({ | |||
|  |                         message: '请选择检查结果!', | |||
|  |                         ok: function () { | |||
|  |                             grid1.startEdit(rowData.id, 'InspectionResults'); | |||
|  |                         } | |||
|  |                     }); | |||
|  |                     valid = false; | |||
|  |                     return false; | |||
|  |                 } | |||
|  |             }); | |||
|  |             return valid; | |||
|  |         } | |||
|  | 
 | |||
|  |     </script> | |||
|  | </body> | |||
|  | </html> | |||
|  | 
 |