123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500 |
- <%@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="/page/include.jsp" %>
- <!--引用资源文件,JS-->
- <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="/nwyj/scripts/business/em/response/equipment/EquipmentAllot2.js"></script>
- <script type="text/javascript">
- var fd_id="<%=request.getParameter("fd_id")%>";
- var isWaitDo = "<%=request.getParameter("isWaitDo")%>"; //等于1说明是从代办页面进来的
-
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- //用户userId
- var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- //父部门id
- var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- var Corp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
-
- var realMobile = top.com.sinosoft.lz.system.user.LoginInfo.getMobile();
- if(realMobile==null || realMobile=="null" || realMobile==""){
- realMobile = "暂无电话";
- }
-
- var unitesMsg;//单位信息
- var unitesNum;//单位数量18
- var gqjlxId = "";//工器具类型ID
- var equipNumReturn = "";//接口返回的装备的数量
- var allUse_UnitMsg = "";//暂时存储所选单位的单位ID和单位NAME
- var allUse_equipType = "";//装备类型
- var allUse_equipArgId = "";//装备属性ID(第二张表的ID)
- var equipArgVal_msg = "";//装备参数值信息(装备参数值ID,装备参数NAME,装备参数值编码,装备参数值)
- // var equipNumReturn = "";//查询结果(可调拨的装备数量)
- var obj_eqpArg = "";
- //获得当前系统时间
- 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();
- var se = d.getSeconds();
- s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
- return s;
- }
- //获取系统当前时间
- var sysDate = getDateTime();
- $(function(){
- $("#FD_OBJECTID382").val(fd_id);
- if(fd_id.length>0){
- /***查询装备调拨需求信息***/
- var userName = "";
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '382',
- objectID : fd_id
- };
- $.ajax({
- url : url,
- data : params,
- type : 'post',
- dataType : 'json',
- async : false,
- timeout : 1500,
- success : function(data){
- $("#TASK_NAME_382").html(data.TASK_NAME_382);//需求名称
- $("#RECIPIENT_DEPARTMENT_382_SHOW").html(data.RECIPIENT_DEPARTMENT_382_SHOW);//申请单位
- $("#RECIPIENT_DEPARTMENT_382").val(data.RECIPIENT_DEPARTMENT_382);
- $("#RECIPIENT_382").html(data.RECIPIENT_NAME_382);//申请单位联系人
- $("#APPLY_TO_USE_TIME_382").html(data.APPLY_TO_USE_TIME_382);//申请使用时间
- $("#RECIPIENT_PHONE_382").html(data.RECIPIENT_PHONE_382);//联系人电话
- $("#INFORMANT_382").val(data.INFORMANT_382);//填报人真实姓名
- $("#USE_REASON_382").html(data.USE_REASON_382);//使用事由
- /* var reqDesc = data.REQUIREMENT_DESCRIPTION_382;
- reqDesc = reqDesc.slit("#;#")[0];
- $("#REQUIREMENT_DESCRIPTION").val(reqDesc);//需求说明 */
- $("#REQUIREMENT_DESCRIPTION").html(data.REQUIREMENT_DESCRIPTION_382);//需求说明
- $("#RECIPIENT_NAME_2").html(data.RECIPIENT_NAME_2_382);//备选人
- $("#RECIPIENT_PHONE_2").html(data.RECIPIENT_PHONE_2_382);//备选人电话
- userName = data.INFORMANT_ID_382;
-
- //发送接口表单
- $("#needId").val(data.FD_OBJECTID382);
- // $("#needName").val(data.TASK_NAME_ID_382);
- $("#needName").val(data.TASK_NAME_382);
- $("#needApplyUnitName").val(data.RECIPIENT_DEPARTMENT_NAME_382);
- $("#needApplyUnitId").val(data.RECIPIENT_DEPARTMENT_382);
- $("#needApplyTime").val(data.APPLY_TO_USE_TIME_382);
-
- $("#needApplicantName").val(data.RECIPIENT_NAME_382);
- $("#needApplicantId").val(data.RECIPIENT_382);
- $("#needApplicantTel").val(data.RECIPIENT_PHONE_382);
-
- if(data.RECIPIENT_NAME_2_382 == ""){
- $("#needAlternateUserName").val("备选人");
- }else{
- $("#needAlternateUserName").val(data.RECIPIENT_NAME_2_382);
- }
-
- if(data.RECIPIENT_2_382 == ""){
- $("#needAlternateUserId").val("备选人ID");
- }else{
- $("#needAlternateUserId").val(data.RECIPIENT_2_382);
- }
-
- if(data.RECIPIENT_PHONE_2_382 == ""){
- $("#needAlternateUserTel").val("备选人联系电话");
- }else{
- $("#needAlternateUserTel").val(data.RECIPIENT_PHONE_2_382);
- }
-
- if(data.USE_REASON_382 == ""){
- $("#needUseGrounds").val("使用事由");
- }else{
- $("#needUseGrounds").val(data.USE_REASON_382);
- }
-
- if(data.REQUIREMENT_DESCRIPTION_382 == ""){
- $("#needDemandDescription").val("需求描述");
- }else{
- $("#needDemandDescription").val(data.REQUIREMENT_DESCRIPTION_382);
- }
- $("#needUnitDescription").val("调拨单位描述");//data.UNITS_CONTENT_382
-
- var isSeen = data.IS_SEEN_382.split(",")[0];
- if(isSeen == realName_ID){
-
- $.ajax({////修改装备需求表的IS_SEEN字段为【下一处理人ID,1】
- url : $.pathname() + '/ws/sendsms/SendSmsService/updateIs_Seen_1',
- data : { tableName : "ECM_EM_EQUIPMENT_DEMAND" , fdId : fd_id , nextPeopId : realName_ID , userId : data.IS_SEEN_382.split(",")[2]},
- type : 'post',
- dataType : 'json',
- //async:false,
- success : function (data){
-
- },error : function(e){
- top.Dialog.alert("系统提示信息!");
- }
- });
-
- }
-
- }
- });
- /* 录入人信息 */
- var buMen = '';
- var danWei = '';
- var userId = userName;//录入人ID
- $.ajax({//通过填报人ID查询填报人NAME,填报人电话,填报部门ID,填报单位ID
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getUserMsgByUserId',
- data : {USER_ID : userId},
- type : 'post',
- async : false,
- timeout : 1500,
- dataType : 'json',
- success : function(data){
- $("#TYPEIN_PEOPLE").html(data.list[0].REAL_NAME);//《录入人信息》--录入人
- if(data.list[0].MOBILE == "null"){
- $("#TYPEIN_PEOPLE_PHONE_NUM").html("暂无联系方式");//《录入人信息》--录入人电话
- }else{
- $("#TYPEIN_PEOPLE_PHONE_NUM").html(data.list[0].MOBILE);//《录入人信息》--录入人电话
- }
- buMen = data.list[0].ORG_ID;
- danWei = data.list[0].COMPANY_ID;
- },error:function(e){
- top.Dialog.alert("系统错误");
- return;
- }
- });
-
- $.ajax({//通过填报部门ID,填报单位ID查询填报部门NAME,填报单位NAME
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getDeptNameByDeptId',
- data : {DEPT_ID : buMen, CORP_ID : danWei},
- type : 'post',
- async : false,
- timeout : 1500,
- dataType : 'json',
- success : function(data){
- $("#DEPT").html(data.list[0].DEPT_NAME);//《录入人信息》--录入人部门
- $("#UNITE").html(data.list[1].CORP_NAME);//《录入人信息》--录入人单位
- },error:function(e){
- top.Dialog.alert("系统错误");
- return;
- }
- });
- }
-
-
-
- $("#equipAllotUnitsInfo").on("click",equipAllotInfo_methed);//调拨单位详情的点击事件
-
- $("#sendJieKou").bind("click",sendJieKou);//提交按钮
- });
-
- function equipAllotInfo_methed(){
- //window.location.href="EquipAllotInfo_page2.jsp?fd_id="+fd_id+"&equipAllotUnit=0";
-
- var diag = new top.Dialog();
- diag.Title = '报审';
- diag.URL = $.pathname() + "/page/business/em/response/equipment/EquipAllotInfo_page2.jsp?fd_id="+fd_id+"&&equipAllotUnit=0"; //修改对应的路径的编辑界面
- //diag.OkButtonText = '提交';
- /* diag.OKEvent = function(){
- sendJieKou(diag);
- }; */
- /* diag.CancelEvent=function(){
- diag.close();
- }; */
- diag.Width = 1000; //宽度
- diag.Height = 680; //高度
- diag.ButtonAlign = 'center';
- diag.show();
-
- }
-
-
- /** 提交按钮的点击事件 **/
- function sendJieKou(isAgree){
- var need_Id = fd_id;//需求id
- var params = "";
-
- $("body").eq(0).showLoading();//遮罩
-
- if(isAgree == 0){//同意
- //序列化表单对象
- var formValue = $("#jkForm").serialize(); //jk为接口
- var flag = 1;
- if(flag == 1){
- $.ajax({//发送装备接口
- url : $.pathname() + '/ws/alertToImpl/AlertToImplService/sendEquipNumJieKou/',
- data : formValue ,
- type : 'post',
- dataType : 'text',
- timeout : 6000,
- async : false,
- success : function(result){
- // alert("******************"+result);
- },error : function(e){
- top.Dialog.alert("接口发送有误!");
- }
- });
- }
- params = { connectId : need_Id , stateNum : 55 };
- }else{
- $.ajax({//删除需求相关的调拨单位信息
- //url : $.pathname() + '/ws/alertToImpl_queryEquip/AlertToImplService_queryEquip/addDataToTable/',//ECM_EM_EQUIPMENT_SHOW_ALLOT_DETAILS
- url : $.pathname() + '/ws/alertToImpl_queryEquip/AlertToImplService_queryEquip/delDatas/',
- data : { connectId : need_Id },
- type : 'post',
- dataType : 'text',
- timeout : 6666,
- async : false,
- success : function(returnData){
- },error : function(e){
- top.Dialog.alert("数据删除失败!");
- }
- });
-
- $.ajax({
- url : $.pathname() + '/ws/sendsms/SendSmsService/getLastPersonMsg',
- data : {
- fd_id : need_Id,
- STATE : 54
- },
- type : 'post',
- dataType : 'json',
- async : false,
- timeout : 66666,
- success : function(resultData){
- $("#PERSON_ID_378").val(resultData.id);//需求填报人ID
- $("#PERSON_NAME_378").val(resultData.name);//需求填报人Name
- },error : function(e){
- top.Dialog.alert("系统错误!");
- }
- });
- $("#BUSINESS_ID_378").val(need_Id);
- $("#STATUES_378").val("54");
- var url = $.pathname() + '/ws/crud/CRUDService/create/';
- var formValue = $("#editForm1").serialize();
- $.request.add(url,formValue,function(data){
- closeProgress();
- });
-
- //params = { connectId : need_Id , stateNum : 53 };
- params = { connectId : need_Id , stateNum : 54 };
- }
-
- $.ajax({//修改需求状态
- url : $.pathname() + '/ws/alertToImpl_queryEquip/AlertToImplService_queryEquip/updateState382/',//ECM_EM_EQUIPMENT_DEMAND
- data : params,
- type : 'post',
- dataType : 'text',
- timeout : 6666,
- // async : false,
- success : function(returnData){
- if(isAgree == 0){
- getEquipmentInfo();
- top.Dialog.alert("调拨令审核成功!");
- }else{
- var c = $("#RECIPIENT_382").text();
- var d = $("#RECIPIENT_PHONE_382").text();
- var eName = $("#RECIPIENT_NAME_2").text();
- var eTel = $("#RECIPIENT_PHONE_2").text();
- var h = getDateTime();//系统时间
- var url0 = $.pathname() + '/ws/sendsms/SendSmsService/saveMessage';
- if(eName!="" && eTel!=""){
- c += c+";"+eName;
- d += d+";"+eTel;
- }
- var g = "你好,省公司没有同意你局的装备需求单,请知悉。\n"+realName+","+realMobile;
- var params = {
- realName : realName,//发送人真实姓名
- smsRecTel : d,//接收电话
- smsTime : h,//系统时间
- smsContent : g,//短信内容
- smsSendId : realName_ID,//发送人Id
- smsPeople : c/*b*/,//接收人员id?还是name?
- type:"短信发送"
- };
- sendMessage(url0,params);
-
- top.Dialog.alert("调拨令回退成功!");
- }
- $('#frmright',window.parent.document).attr('src',$.pathname()+"/page/business/em/response/equipment/Eqallocateallot.jsp");
- },error : function(e){
- top.Dialog.alert("数据载入失败!");
- }
- });
- }
- </script>
- <style type="text/css">
- .class_color{
- background-color: rgb(237, 239, 253);
- }
- </style>
- </head>
- <body style="width: 1000px; margin:0 auto; margin-top:15px" align="center">
- <div class="box1" id="formContent" whiteBg="true" style="overflow:false ;height:100%;border: 1px solid #E4E4E4;background: #F8F8F8;">
- <div style="height: 50px;background: #F8F8F8;" align="center">
- <a href="javascript:;"><img id="back" align="left" alt="返回" title="返回" src="/nwyj/images/temp/back.png"></img></a>
- <font style="font-weight: bold;font-size: 20px;line-height: 45px;"></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 type="button" id="pass" value="同意"/>
- <input type="button" id="rock" value="退回"/>
- </div>
- <br />
-
- <input type="hidden" name="FD_OBJECTID382" id="FD_OBJECTID382" value=""/>
- <input type="hidden" id="RECIPIENT_DEPARTMENT_382"/>
-
- <fieldset style="border-color:#999999;" id="fileTable" >
- <legend>基本信息:</legend>
- <table class="tableStyle" formMode="view">
- <tr>
- <td width="15%" align="right" class="class_color">需求名称:</td>
- <td width="35%"colspan="3"><div id="TASK_NAME_382"></div></td>
- </tr>
- <tr>
- <td width="15%" align="right" class="class_color">申请单位:</td>
- <td width="35%"><div id="RECIPIENT_DEPARTMENT_382_SHOW"></div></td>
- <td width="15%" align="right" class="class_color">申请使用时间:</td>
- <td width="35%"><div id="APPLY_TO_USE_TIME_382"></div></td>
- </tr>
- <tr>
- <td align="right" class="class_color">申请单位联系人:</td>
- <td><div id="RECIPIENT_382"></div></td>
- <td align="right" class="class_color">联系人电话:</td>
- <td><div id="RECIPIENT_PHONE_382"></div></td>
- </tr>
- <tr>
- <td align="right" class="class_color">备选人:</td>
- <td><div id="RECIPIENT_NAME_2"></div>
- <td align="right"class="class_color">备选人电话:</td>
- <td><div id="RECIPIENT_PHONE_2"></div></td>
- </tr>
- <tr>
- <td align="right" class="class_color">使用事由:</td>
- <td colspan="3"><div id="USE_REASON_382" style='word-wrap:break-word; word-break:break-all;display:block;width:97%;'></div></td>
- </tr>
- <tr>
- <td width="15%" align="right" class="class_color">需求描述:</td>
- <td colspan="3">
- <div id="REQUIREMENT_DESCRIPTION" style='word-wrap:break-word; word-break:break-all;display:block;width:97%;'></div>
- </tr>
- <tr>
- <td width="15%" align="right" class="class_color">调拨单位详情:</td>
- <!-- <td colspan="3"><div id=""><a href="javascript:;">调拨单位详情点这里</a></div> -->
- <td width="85%" colspan="3"><div readonly="readonly"><font id="equipAllotUnitsInfo" color="blue"><a href='javascript:;'>点击这里查看详情</a></font></div></td>
- </tr>
- </table>
- </fieldset>
-
- <fieldset style="border-color:#999999;" id="fileTable" >
- <legend>需求信息:</legend>
- <div class="height_15"></div>
- <div class="padding_right5"><div id="maingrid"></div></div>
- <div class="height_15"></div>
- </fieldset>
-
-
- <form id="jkForm"><!-- 发送接口要用的表单 -->
- <input type="hidden" id="needId" name="needId"/><!-- ID -->
- <input type="hidden" id="needName" name="needName"/><!-- 需求名称 -->
- <input type="hidden" id="needApplyUnitName" name="needApplyUnitName"/><!-- 申请单位 -->
- <input type="hidden" id="needApplyUnitId" name="needApplyUnitId"/><!-- 申请单位ID -->
- <input type="hidden" id="needApplyTime" name="needApplyTime"/><!-- 申请使用时间 -->
-
- <input type="hidden" id="needApplicantName" name="needApplicantName"/><!-- 申请单位联系人 -->
- <input type="hidden" id="needApplicantId" name="needApplicantId"/><!-- 申请单位联系人ID -->
- <input type="hidden" id="needApplicantTel" name="needApplicantTel"/><!-- 联系人电话 -->
- <input type="hidden" id="needAlternateUserName" name="needAlternateUserName"/><!-- 备选人(如果为空就保存"备选人") -->
- <input type="hidden" id="needAlternateUserId" name="needAlternateUserId"/><!-- 备选人ID(如果为空就保存"备选人ID") -->
-
- <input type="hidden" id="needAlternateUserTel" name="needAlternateUserTel"/><!-- 备选人联系电话(如果为空就保存"备选人联系电话") -->
- <input type="hidden" id="needUseGrounds" name="needUseGrounds"/><!-- 使用事由 -->
- <input type="hidden" id="needDemandDescription" name="needDemandDescription"/><!-- 需求描述 -->
- <input type="hidden" id="needUnitDescription" name="needUnitDescription"/><!-- 调拨单位描述 -->
- <input type="hidden" id="needEmergencyAssignInfDTO" name="needEmergencyAssignInfDTO"/><!-- 调拨令详情(1-n) -->
- </form>
-
- <form id="editForm1">
- <input type="hidden" name="classid" value="378"/>
- <input type="hidden" id="is_pass" value="0"/>
- <input type="hidden" name="PERSON_ID_378" id="PERSON_ID_378"/>
- <input type="hidden" name="PERSON_NAME_378" id="PERSON_NAME_378"/>
- <input type="hidden" name="BUSINESS_ID_378" id="BUSINESS_ID_378" />
- <input type="hidden" name="STATUES_378" id="STATUES_378" value="2" />
- <input type="hidden" name="DISPOSE_378" id="DISPOSE_378" value="0" />
- <input type="hidden" name="COMPANY_ID_378" id="COMPANY_ID_378"/>
- <!-- <input type="hidden" name="STATUES_378" id="STATUES_378" value="55" /> -->
- <!-- <input id="STATE_391" name="STATE_391" value="133" type="hidden"/> -->
- <input type="hidden" name="ROLE_ID_378" id="ROLE_ID_378"/>
-
- <input type="hidden" name="INFORMANT_382" id="INFORMANT_382"/>
-
- <fieldset style="border-color:#999999;" id="fileTable" >
- <legend>调拨令信息:</legend>
- <!-- <input id="STATE_391" name="STATE_391" type="hidden"/> -->
- <table class="tableStyle" width="85%" align="center">
- <tr>
- <td colspan="3" align="center" width="90%">
- <!-- <input type="button" id="pass" value="同意"/> <input type="button" id="rock" value="退回"/> -->
- </td>
- <!-- <td width="10%"><input align="right" type="button" id="anotherEquip" value="下一个单位"/></td> -->
- </tr>
- </table>
- <table class="equipMsg"></table>
-
- <table class="tableStyle" width="85%" align="center">
-
- <tr id="remark" class="remark" style="display: none;">
- <td width="15%" align="right"><span class="star">*</span>退回说明:</td>
- <td width="85%" colspan="3"><textarea rows="" id="EXPLAIN_378" name="EXPLAIN_378" style="width: 97%;height: 108px;" maxNum="150"></textarea></td>
- </tr>
- </table>
-
- <table class="tableStyle" width="85%" align="center">
- <tr class="person remark" id="sub" style="display: none;">
- <!-- <td align="center"><input value="提交" type="button" id="save"/></td> -->
- <td align="center"><input value="提交" type="button" id="sendJieKou"/></td>
- </tr>
- </table>
- </fieldset>
- </form>
- <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>
- </html>
|