123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <%-- <%@include file="../../../../include1.jsp" %> --%>
- <%@include file="../duty/need.jsp" %>
- <!--表单验证start-->
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/validation.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/form/validationRule.js"></script>
- <!--表单提交end-->
- <%-- <!--引用资源文件,JS CSS-->
- <script type="text/javascript" src="<%=path%>/scripts/jquery/plugins/jquery.extension.util.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/common.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/utils.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/frameWork/frameWork.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/business/he/common/common.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/freamwork/com/sinosoft/common/utils/Request.js"></script>
- <script type="text/javascript" src="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
- <link href="<%=path%>/scripts/qui/libs/js/tree/ztree/ztree.css" rel="stylesheet" type="text/css" /> --%>
- <script type="text/javascript" src = "/nwyj/scripts/business/am/org/maintenance/orgSel.js"></script>
- <script type='text/javascript' src='<%=path%>/libs/js/form/suggestion.js'></script>
-
- <script type="text/javascript" src="<%=path%>/scripts/business/em/response/team/TeamDemandAddEdit.js"></script>
- <style type="text/css">
- .class_color{
- background-color: rgb(237, 239, 253);
- }
- </style>
- <script type="text/javascript">
- var fd_id = "<%=request.getParameter("fd_id")%>";
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- //父部门id
- var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var CorpName = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- // 填报人电话
- var phone = top.com.sinosoft.lz.system.user.LoginInfo.getMobile();
-
- //页面初始化
- $(function(){
- $("#TASK_NAME_ID_391").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","is_del='0' and (IS_ALERT = '0' and IS_SEND='5' and EARLY_WARNING_PROPERTY!='51' and RELEASE_UNIT='"+CorpArea+"')"); //预警编号
- // $("#DEMAND_ID_395").initYewuSelect0("391","FD_OBJECTID","TASK_NAME","ECM_EM_TEAM_WRR.STATE= '135'",CorpArea); //需求名称
- $("#TASK_NAME_ID_391").bind("change",function(){
- var tm = $(this).attr("relText");
- if(tm == "请选择"){
- return;
- }
- // var taskName = tm+"_"+CorpName+"_"+getDateTime1();
- var taskName = tm+"_"+CorpName+"_"+"队伍调拨";
- $("#TASK_NAME_391").val(taskName);
- });
-
- /******************录入人信息start********************/
- /* 页面展示用 */
- //取登录用户信息
- //登录用户姓名 要调整,还是要用id
- var userName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- $("#TYPEIN_PEOPLE").html(userName);
- //用户手机号
- var getMobile = top.com.sinosoft.lz.system.user.LoginInfo.getMobile();
- if(getMobile==undefined){
- $("#TYPEIN_PEOPLE_PHONE_NUM").html("暂无手机号码");
- }else{
- $("#TYPEIN_PEOPLE_PHONE_NUM").html(getMobile);
- }
-
- //用户所属单位
- var getCorp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- $("#UNITE").html(getCorp_names);
- //用户所属部门
- var getDeptnames = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- $("#DEPT").html(getDeptnames);
- /*****************录入人信息end*********************/
- //修改表单
- if(fd_id.length>0){
-
- $("#titleShow").text("修改应急队伍需求");
- $("#addReset").hide();
- /***
- 单位部门树形结构
- */
- /* var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
- $.post(deptUrl,{id:CorpArea,name:''},function(data){
- $("#SUPPORT_UNIT_ID_391").data("data",data);
- $("#SUPPORT_UNIT_ID_391").render();
- }, "json"); */
- //$("#SUPPORT_UNIT_ID_391").OrgSel();//需求单位
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '391',
- objectID : fd_id
- };
- $.request.query(url,params,function(data){
- $('#editForm').ajaxWrite({data:data});
- $('#editForm input[name="classid"]').val('391');
- //alert(JSON.stringify(data))
- $("#SUPPORT_UNIT_ID_391").val(data.SUPPORT_UNIT_ID_391);
- $("#SUPPORT_UNIT_ID_39100").val(data.SUPPORT_UNIT_ID_391_SHOW);
- $("#ENTRY_UNIT_ATTN_391").attr("selectedValue",data.ENTRY_UNIT_ATTN_391);//修改页面设置默认的申请单位联系人
- $("#ENTRY_ALTERNATIVE_391").attr("selectedValue",data.ENTRY_ALTERNATIVE_391);//修改页面设置默认的申请单位联系人备选人
- //$("#show_SUPPORT_UNIT_ID_391").val(data.SUPPORT_UNIT_ID_391_SHOW);
- inputchange();
- // alert(data.ISALERTORRESP_391);
- var isAleOrResp = data.ISALERTORRESP_391;
- if(isAleOrResp == "0"){
- $("#alert").attr("checked","checked");
- $("#TASK_NAME_ID_391").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","is_del='0' and (IS_ALERT = '0' and IS_SEND='5' and WRITE_DEPT='"+CorpArea+"')"); //需求名称
- }else if(isAleOrResp == "1"){
- $("#response").attr("checked","checked");
- $("#TASK_NAME_ID_391").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","is_del='0' and (IS_ALERT = '1' and IS_SEND='5' and WRITE_DEPT='"+CorpArea+"')"); //需求名称
- }
- });
- $("#ENTRY_UNIT_ATTN_391").val(realName_ID);
- $("#ENTRY_UNIT_ATTN_391_show").val(realName);
- }else{//新增
- $("#titleShow").text("添加应急队伍需求");
- $("#editReset").hide();
- //获得当前系统时间
- $('#FORM_TIME_391').val(getDateTime());
- $("#FORM_SECTOR_391").val(CorpArea);
- $("#FORM_NAME_391").val(realName);
- $("#USER_ID_391").val(realName_ID);
- $("#ENTRY_UNIT_ATTN_391").attr("selectedValue",realName_ID);
- $("#ENTRY_UNIT_ATTN_TEL_391").val(phone);//申请单位联系人电话设置初始值
- $("#SUPPORT_UNIT_ID_391").val(CorpArea);//需求单位(用于保存)
- $("#SUPPORT_UNIT_ID_39100").val(CorpName);//需求单位(用于显示)
- // $("#ENTRY_UNIT_ATTN_391").attr("selectedValue",realName_ID);//申请单位联系人的自动提示框设置初始选中值
- $("#ENTRY_UNIT_ATTN_391").val(realName_ID);
- $("#ENTRY_UNIT_ATTN_391_show").val(realName);
- // $("#ENTRY_UNIT_ATTN_TEL_391").val(getMobile);//申请单位联系人电话设置初始值
- inputchange();//获取申请单位联系人和备选人下拉框的值
- }
-
- //选择申请单位联系人,带出联系人电话
- // $("#ENTRY_UNIT_ATTN_391").bind("listSelect",function(e,obj){//申请单位联系人的自动提示框绑定事件,选择完后,自动带入电话
- $("#ENTRY_UNIT_ATTN_391").bind("change",function(){//申请单位联系人的下拉框绑定事件,选择完后,自动带入电话
- var userId = $("#ENTRY_UNIT_ATTN_391").attr("relValue");
- // var userId = $("#ENTRY_UNIT_ATTN_391").val();
- if(userId!=''){
- $.ajax({
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getPhoneNoByUserId',
- type : 'post',
- //async : false,
- timeout : 15000,
- data:userId,
- dataType : 'json',
- success : function(result){
- // alert(result)
- $("#ENTRY_UNIT_ATTN_TEL_391").val(result);
- },
- error : function(e){
- top.Dialog.alert("系统错误!");
- }
- });
- }else{
- $("#ENTRY_UNIT_ATTN_TEL_391").val("");
- };
- });
- //$("#ENTRY_ALTERNATIVE_391").bind("listSelect",function(e,obj){//备选人的自动提示框绑定事件,选择完后,自动带入电话
- $("#ENTRY_ALTERNATIVE_391").bind("change",function(){//备选人的绑定事件,选择完后,自动带入电话
- // var userId = $(this).val();
- var userId = $("#ENTRY_ALTERNATIVE_391").attr("relValue");
- //alert(userId);
- if(userId!=''){
- $.ajax({
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getPhoneNoByUserId',
- type : 'post',
- //async : false,
- timeout : 15000,
- data:userId,
- dataType : 'json',
- success : function(result){
- //alert(result)
- $("#ENTRY_ALTERNATIVE_TEL_391").val(result);
- },
- error : function(e){
- top.Dialog.alert("系统错误!");
- }
- });
- }else{
- $("#ENTRY_ALTERNATIVE_TEL_391").val("");
- };
- });
- });
- //获得当前系统时间(年月日 时分)
- function getDateTime(){
- var s="";
- var d = allGetServerTime();
- var vYear = d.getFullYear();
- var vMon = d.getMonth() + 1;
- var vDay = d.getDate();
- var h = d.getHours();
- var m = d.getMinutes();
- s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
- return s;
- }
- //获得当前系统时间(年月日)
- function getDateTime1(){
- var s="";
- var d = allGetServerTime();
- var vYear = d.getFullYear();
- var vMon = d.getMonth() + 1;
- var vDay = d.getDate();
- // var h = d.getHours();
- // var m = d.getMinutes();
- s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay);
- return s;
- }
- function addchongzhi(){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/response/team/TeamDemandAddEdit.jsp?fd_id=");
- }
- function editChongZhi(){
- $('#frmright', window.parent.document).attr('src',$.pathname()+ "/page/business/em/response/team/TeamDemandAddEdit.jsp?fd_id="+fd_id);
- }
- //需求单位的改变,自动带入申请单位联系人和备选人(2共3)
- function inputchange(){
- //var unitId = $("#FORM_SECTOR_391").val();//需求单位ID
- //var unitId = $(this).val();//需求单位ID
- var unitId = $("#SUPPORT_UNIT_ID_391").val();
- if(unitId!=''){
- $.ajax({
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getPeopleByUnitId',
- type : 'post',
- async : false,
- timeout : 15000,
- data:{unitId:CorpArea},
- dataType : 'json',
- success : function(result){
- if(result=='' || result==null){
- top.Dialog.alert("该单位没有对应的人员!");
- return;
- }else{
- $("#ENTRY_UNIT_ATTN_391").data("data",result);//加载申请单位联系人下拉框
- $("#ENTRY_UNIT_ATTN_391").render();
- $("#ENTRY_ALTERNATIVE_391").data("data",result);//加载申请单位联系人备选人下拉框
- $("#ENTRY_ALTERNATIVE_391").render();
- }
- },
- error : function(e){
- top.Dialog.alert("系统错误");
- }
- });
- };
- }
- //判断浏览器的类型,//需求单位的改变,自动带入申请单位联系人和备选人(3共3)
- // function getOs(){
- // if(navigator.userAgent.indexOf("MSIE")>0) {
- // return "MSIE";
- // } ;
- // if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
- // return "Firefox";
- // } ;
- // if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
- // return "Safari";
- // } ;
- // if(isCamino=navigator.userAgent.indexOf("Camino")>0){
- // return "Camino";
- // };
- // if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
- // return "Gecko";
- // } ;
- // };
- function alert00(){//预警编号
- $("#TASK_NAME_ID_391").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","is_del='0' and (IS_ALERT = '0' and IS_SEND='5' and EARLY_WARNING_PROPERTY!='51' and RELEASE_UNIT='"+CorpArea+"')"); //预警编号
- $("#isAlertOrResp").text("预警编号:");
- }
- function response00(){//响应编号
- $("#TASK_NAME_ID_391").initYewuSelect("365","FD_OBJECTID","EARLY_WARNING_ID","is_del='0' and (IS_ALERT = '1' and IS_SEND='5' and EARLY_WARNING_PROPERTY!='51' and RELEASE_UNIT='"+CorpArea+"')"); //响应编号
- $("#isAlertOrResp").text("响应编号:");
- }
- </script>
- </head>
- <body style="width: 1000px; margin:0 auto; margin-top:15px" align="center">
- <div class="box1" id="formContent" style="height:100%;border: 1px solid #E4E4E4;background: #F8F8F8;" width="1000px">
- <div style="height: 50px;background: #F8F8F8;" align="center">
- <a href="javascript:;"><img id="back" align="left" alt="返回" title="返回" src="/nwyj/images/temp/back.png" /></a>
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;" id=""></font>
- </div>
- <br />
- <div align="center"><font style="font-weight: bold;font-size: 30px;line-height: 45px;" color="red" id="titleShow" ></font></div>
- <br />
- <div style="float:right">
- <input value="保存并报审" type="button" id="repord"/>
- <input value="保存" type="button" id="save"/>
- <input value="重置" type="button" id="addReset" onclick="addchongzhi()"/>
- <input value="重置" type="button" id="editReset" onclick="editChongZhi()"/>
- </div>
- <br />
- <form method="post" id="editForm">
- <input name="classid" value="391" type="hidden"/>
- <input type="hidden" name="FD_OBJECTID391" value=""/>
- <input id="FORM_SECTOR_391" name="FORM_SECTOR_391" type="hidden"/>
- <input id="FORM_NAME_391" name="FORM_NAME_391" type="hidden"/>
- <input id="USER_ID_391" name="USER_ID_391" type="hidden"/>
- <input id="FORM_TIME_391" name="FORM_TIME_391" type="hidden"/>
- <input id="STATE_391" name="STATE_391" value="131" type="hidden"/>
- <input id="TROOPS_391" name="TROOPS_391" type="hidden"/>
- <input id="SUPPORT_UNIT_ID_391" name="SUPPORT_UNIT_ID_391" type="hidden"/>
- <input id="ISALERTORRESP_391" name="ISALERTORRESP_391" type="hidden"/>
- <fieldset style="border-color:#999999;" >
- <legend>基本信息:</legend>
- <table class="tableStyle" width="100%">
- <tr>
- <td width="20%" align="right" class="class_color"><span class="star">*</span><span id="isAlertOrResp">预警编号:</span></td>
- <td width="80%" colspan="3">
- <select selWidth="300" editable=false name="TASK_NAME_ID_391" class="validate[required] selectWidth" id="TASK_NAME_ID_391" selAlign="" prompt="请选择" swidth="75%"></select>
- <input type="radio" id="alert" name="a_OR_r" checked="checked" onclick="alert00()"/><label for="alert" class="hand">预警编号</label>
- <input type="radio" id="response" name="a_OR_r" onclick="response00()"/><label for="response" class="hand">响应编号</label>
- </td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color"><span class="star">*</span>需求名称:</td>
- <td width="80%" colspan="3"><input type="text" style="width: 97%;" maxLength="30" class="validate[required]" name="TASK_NAME_391" id="TASK_NAME_391" readonly="readonly"/></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color"><span class="star">*</span>申请单位:</td>
- <td width="80%" colspan="3"><!-- <div id="SUPPORT_UNIT_ID_391" selWidth="999" class=" validate[required]"> --></div>
- <input id="SUPPORT_UNIT_ID_39100" readonly="readonly" type="text" style="width:97%"/></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color"><span class="star">*</span>需要到达时间:</td>
- <td width="80%" colspan="3"><input style="width: 97%" type="text" readonly="readonly" id="ARRIVE_TIME_391" name="ARRIVE_TIME_391" class="date validate[required,length[0,50]]" dateFmt="yyyy-MM-dd HH:mm"/></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color"><span class="star">*</span>申请单位联系人:</td>
- <td width="25%"><div class="suggestion" id="ENTRY_UNIT_ATTN_391" name="ENTRY_UNIT_ATTN_391" keepDefaultStyle="true" showList="true" inputWidth="300"></div>
- <!-- <input id="ENTRY_UNIT_ATTN_391" name="ENTRY_UNIT_ATTN_391" type="hidden"/>
- <input id="ENTRY_UNIT_ATTN_391_show" type="text" style="width:99%" readonly="readonly"/> --></td>
- <td width="20%" align="right" class="class_color"><span class="star">*</span>申请单位联系人电话:</td>
- <td width="25%"><input type="text" style="width:220px" class="validate[required,custom[mobilephone],custom[onlyNumber]]" maxLength="11" name="ENTRY_UNIT_ATTN_TEL_391" id="ENTRY_UNIT_ATTN_TEL_391" class="validate[required]"/></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">备选人:</td>
- <td width="25%"><div class="suggestion" id="ENTRY_ALTERNATIVE_391" name="ENTRY_ALTERNATIVE_391" keepDefaultStyle="true" showList="true" inputWidth="300"></div>
- <!-- <select prompt="请选择" name="ENTRY_ALTERNATIVE_391" id="ENTRY_ALTERNATIVE_391" class="selectWidth" swidth="20%"></select> --></td>
- <td width="20%" align="right" class="class_color">备选人电话:</td>
- <td width="25%"><input type="text" style="width:220px" class="validate[custom[mobilephone],custom[onlyNumber]]" maxLength="11" name="ENTRY_ALTERNATIVE_TEL_391" id="ENTRY_ALTERNATIVE_TEL_391" class="validate[required]"/></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">受灾情况:</td>
- <td width="80%" colspan="3"><textarea maxNum="240" style="width: 97%;height: 90px;" name="CONDITION_391" id="CONDITION_391"></textarea></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">抢修任务:</td>
- <td width="80%" colspan="3"><textarea maxNum="240" style="width: 97%;height: 90px;" name="REPAIR_TASK_391" id="REPAIR_TASK_391"></textarea></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">地质地貌:</td>
- <td width="80%" colspan="3"><textarea maxNum="240" style="width: 97%;height: 90px;" name="GEOLOGY_PHYSIOGNOMY_391" id="GEOLOGY_PHYSIOGNOMY_391"></textarea></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">气候状况:</td>
- <td width="80%" colspan="3"><textarea maxNum="240" style="width: 97%;height: 90px;" name="WEATHER_CASE_391" id="WEATHER_CASE_391"></textarea></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">住宿装备:</td>
- <td width="80%" colspan="3"><textarea maxNum="240" style="width: 97%;height: 90px;" name="STAY_GEAR_391" id="STAY_GEAR_391"></textarea></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">施工机具:</td>
- <td width="80%" colspan="3"><textarea maxNum="240" style="width: 97%;height: 90px;" name="EXECUTION_IMPLEMENT_391" id="EXECUTION_IMPLEMENT_391"></textarea></td>
- </tr>
- <tr>
- <td width="20%" align="right" class="class_color">需求描述:</td>
- <td width="80%" colspan="3"><textarea maxNum="1000" style="width: 97%;height: 180px;" name="REQUIREMENT_DESCRIPTION_391" id="REQUIREMENT_DESCRIPTION_391"></textarea></td>
- </tr>
-
- </table>
- </fieldset>
- </form>
- <fieldset style="border-color:#999999;" >
- <legend>队伍信息:</legend>
- <div class="padding_right5"><div id="maingrid"></div></div>
- </fieldset>
- <!-- <fieldset style="border-top-color: rgb(200,200,200); border-right-color: rgb(200,200,200); border-bottom-color: rgb(200,200,200); border-left-color: rgb(200,200,200); " > -->
- <fieldset style="border-color:#999999;" >
- <legend>录入人信息:</legend>
- <table width="960px" class="tableStyle" align="center" id="fillForm">
- <tr>
- <td width="114px" align="right" class="class_color">单位:</td>
- <td width="280px"><div style="width:97%" name="" id="UNITE" /></td>
- <td width="114px" align="right" class="class_color">部门:</td>
- <td width="280px"><div name="" id="DEPT" /></td>
- </tr>
- <tr>
- <td width="114px" align="right" class="class_color">录入人:</td>
- <td width="280px"><div name="" id="TYPEIN_PEOPLE" /></td>
- <td width="114px" align="right" class="class_color">录入人联系方式:</td>
- <td width="280px"><div name="" id="TYPEIN_PEOPLE_PHONE_NUM" /></td>
- </tr>
- </table>
- </fieldset>
- </div>
- </body>
|