<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<base target="_self">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
  int iFormID = SzConvert.toInt(request.getParameter("FormID"));
  String ChkValue = SzConvert.toSpaceStr(request.getParameter("ChkValue"));
  String ChkNumber = SzConvert.toZeroStr(request.getParameter("ChkNumber"));
	String sType = "0";
	String sRange = "0";
	String sRangeInfo = "";
	if (!ChkNumber.equals("0")) {
		sRange = "1";
		sRangeInfo = "[已选中数据:" + ChkNumber + "]";
	} else {
		sRangeInfo = "<font color='red'>没有选中要转移的数据</font>";
	}
	
  BdPopedom bdPopedom = new BdPopedom();   
  
  BdTransfer bdTransfer = new BdTransfer();
  String sRelateFormDesc = bdTransfer.getRelateFormDesc(iFormID);
%>
<form name="formUpdate" method="post">
<input type="hidden" name="FormID" value="<%=iFormID%>">
<input type="hidden" name="ChkValue" value="<%=ChkValue%>">
<input type="hidden" name="ChkNumber" value="<%=ChkNumber%>">
<input type="hidden" name="type" value="5">

<table width="100%" align="center">
  <tr>
    <td>
		<%
		out.println(SzPageHelp.button("保存","javascript:Save();"));
    out.println(SzPageHelp.closeButton() );     
    %>    
    </td>
  </tr>
</table>
<table width="650" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0" align="center">
  <tr>
    <td>同时转移的表单</td>
    <td>
    <%
      	out.println(sRelateFormDesc);
		%>    
    </td>
  </tr>
  <tr>
    <td width="120">数据范围</td>
    <td>
    <%
      	out.println(sRangeInfo);
		%>    
    </td>
  </tr>
  <tr id="trField" style="display:none;">
    <td>字段范围
<input type="button" class="btnClassShort" value="选择" OnClick="javascript:SelectFormField('../../../', '<%=iFormID%>', 'formUpdate.SQZDMC');"></TD>    
    </td>
    <td>
	<textarea name="SQZDMC" class="areaClass2" readonly></textarea>
    </td>
  </tr>  
  <tr>
    <td>人员范围
<input type="button" class="btnClassShort" value="选择" OnClick="javascript:OpenWin32('../../../', 'formUpdate.RYDLID1', 'formUpdate.RYDLXM1');"></TD>
    </td>
    <td>
    <input type="hidden" name="RYDLID1" value="" >
    <input type="hidden" name="RYDLID2" value="" >
    <input type="hidden" name="RYDLID3" value="" >
    <input type="text" name="RYDLXM1" value="" class="txtClass1" >
    </td>
  </tr>  
</table> 
</form>

<script language="javascript" src="../../../share/js/commonTool.js"></script>
<script language="javascript">
  function Save() {

    //请选择办理人员
    if ( (formUpdate.RYDLID1.value == "" || formUpdate.RYDLID1.value == "0")
      && (formUpdate.RYDLID2.value == "" || formUpdate.RYDLID2.value == "0") 
      && (formUpdate.RYDLID3.value == "" || formUpdate.RYDLID3.value == "0")      
      ) {
      alert("至少选择一个人员！");
      return false;      
    }
    
	  if (confirm("确定要转移这些数据？")) {
		  formUpdate.action = "control.jsp";
		  formUpdate.submit();
	  }
  }
  
  function SelectFormField(vLevel, vFormID, vObj) {
    var url = vLevel + "share/page/form_field_select.jsp";
    url = url + "?objId=" + vObj + "&FormID=" + vFormID;
    window.showModalDialog(url,window,"status=no;dialogWidth=680px;dialogHeight=450px");
  }
  
  function Detail() {
  	formUpdate.action = "index.jsp";
  	formUpdate.submit();
  }
  
  function ClickType() {
  	var v = ValueOfRadio(formUpdate.type);
  	if (v == 4) {
  	  trField.style.display = "";
  	} else {
  	  trField.style.display = "none";
  	}
  }
</script>

