123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=9" />
- <title>应急响应值班安排表填报</title>
- <!--引入QUI框架js -->
- <%@include file="../../../../include.jsp" %>
- <script type="text/javascript" src="<%=path%>/scripts/setiframeheight.js" ></script>
- <script type="text/javascript" src = "/nwyj/scripts/business/am/org/maintenance/orgSel.js"></script>
- <script>
- var flag=false;
- var isNew=false; //是否是新增记录
- var isNewSave=true; //新增记录是否保存
- var editingRow; // 双击的当前编辑行
- var isValida=true; //是否需要验证
- var reported = 1;//reported=1,只保存;reported=2,保存并报审
- //取得用户真实名字
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- //填报人电话
- var phone = top.com.sinosoft.lz.system.user.LoginInfo.getMobile();
- //部门id
- var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- //单位id
- var CorpArea = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- //部门名称
- var deptName = top.com.sinosoft.lz.system.user.LoginInfo.getDeptnames();
- //用户所属单位
- var getCorp_names = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_names();
- //父部门id
- var parentId = top.com.sinosoft.lz.system.user.LoginInfo.getParent_ids();
- var g;
- //var dutyData={"list":[{"value":"0","key":"发电车"},{"value":"1","key":"发电机"},{"value":"2","key":"移动餐车"},{"value":"3","key":"指挥(通信)车"}]};
- var dutyData={"list":[{"value":"0","key":"发电车"},{"value":"1","key":"发电机"}]};
- var demandid;
- var departNode;
- var newrowid=200;
- var deptUrl = $.pathname() + '/ws/dept/DeptService/getDepartTree';
- /* $.post(deptUrl,{id:parentId,name:''},function(data){
- $("#RECIPIENT_DEPARTMENT").data("data",data);
- $("#RECIPIENT_DEPARTMENT").render();
- }, "json"); */
- function initComplete(){
- /** 录入人信息start **/
- $("#TYPEIN_PEOPLE").html(realName);//录入人
- $("#TYPEIN_PEOPLE_PHONE_NUM").html(phone);//录入人电话
- $("#DEPT").html(deptName);//部门
- $("#UNITE").html(getCorp_names);//单位
- /** 录入人信息end **/
- if((window.location.href).indexOf('?')>-1){
- demandid = (window.location.href).split('?')[1];//获取记录id
- // alert(demandid)
- // var url = $.pathname() + '/ws/equip/RespEquipmentService/getEquipById/';
- // var params = {demandid : demandid};
- var url = $.pathname() + '/ws/crud/CRUDService/getDataById/';
- var params = {
- classid : '382',
- objectID : demandid
- };
- $.request.query(url,params,function(data){
- // alert(JSON.stringify(data))
- if(data.ISALERTORRESP_382 == 0){
- $("#isAlertOrResp").text("预警编号:");
-
- $("#TASK_NAME_ID").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+"')"); //预警编号
- }else if(data.ISALERTORRESP_382 == 1){
- $("#isAlertOrResp").text("响应编号:");
- $("#response").attr("checked","checked");
- $("#TASK_NAME_ID").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+"')"); //响应编号
- }
- // $('#editForm').ajaxWrite({data:data});
- $("#REPORTING_DEPARTMENT").val(data.REPORTING_DEPARTMENT_382);
- $("#INFORMANT").val(data.INFORMANT_382);
- $("#REPORTING_TIME").val(data.REPORTING_TIME_382);
- $("#REPORTING_PHONE").val(data.REPORTING_PHONE_382);
- $("#TASK_NAME_ID").setValue(data.TASK_NAME_ID_382);
- $("#TASK_NAME").val(data.TASK_NAME_382);
- $("#RECIPIENT_DEPARTMENT").val(data.RECIPIENT_DEPARTMENT_382);
- $("#RECIPIENT_DEPARTMENT_391").val(data.RECIPIENT_DEPARTMENT_382_SHOW)
- $("#RECIPIENT_NAME").val(data.RECIPIENT_NAME_382);
- // $("#RECIPIENT").val(data.RECIPIENT_382);
- $("#RECIPIENT_PHONE").val(data.RECIPIENT_PHONE_382);
- $("#APPLY_TO_USE_TIME").val(data.APPLY_TO_USE_TIME_382);
- $("#USE_REASON").val(data.USE_REASON_382);
- $("#REQUIREMENT_DESCRIPTION").val(data.REQUIREMENT_DESCRIPTION_382);
- inputchange(data.RECIPIENT_382,data.RECIPIENT_2_382);
- $("#RECIPIENT_NAME_2").val(data.RECIPIENT_NAME_2_382);
- $("#RECIPIENT_PHONE_2").val(data.RECIPIENT_PHONE_2_382);
-
- })
-
- /* $.ajax({
- url : url = $.pathname() + '/ws/equip/RespEquipmentService/getEquipById/',
- type : 'post',
- timeout : 15000,
- data : {demandid : demandid},
- dataType : 'json',
- async : false,
- success : function(data){
- $('#editForm').ajaxWrite({data:data});
- $("#RECIPIENT_DEPARTMENT").val(data.RECIPIENT_DEPARTMENT);
- $("#RECIPIENT_NAME").val(data.RECIPIENT_NAME);
-
- var repDesc = data.REQUIREMENT_DESCRIPTION;//需求描述
- repDesc = repDesc.split("#;#")[0];
- if(repDesc == "null"){
- repDesc = "";
- }
- $("#REQUIREMENT_DESCRIPTION").val(repDesc);
- $("#RECIPIENT_2").attr("selectedValue",data.RECIPIENT_2);//申请单位联系人
- inputchange(data.RECIPIENT_2);
- $.ajax({
- url : $.pathname() + '/ws/equip/RespEquipmentService/getDeptNameByDeptId/',
- type : 'post',
- timeout : 15000,
- data : { dept_id : data.RECIPIENT_DEPARTMENT },
- dataType : 'text',
- success : function(result){
- $("#RECIPIENT_DEPARTMENT_391").val(result);
- // $("#show_RECIPIENT_DEPARTMENT").val(result);
- },
- error : function(e){
- top.Dialog.alert("访问服务失败!");
- }
- })
- // alert(JSON.stringify(data))
- },
- error : function(e){
- top.Dialog.alert("访问服务失败!!!!!!!!!!!!");
- }
- }); */
- }
- initGrid();
- //选择申请单位联系人,带出联系人电话
- $("#RECIPIENT").bind("listSelect",function(e,obj){//申请单位联系人自动提示框的绑定事件,选择完后,自动带入电话
- // $("#RECIPIENT").bind("change",function(){//申请单位联系人的绑定事件,选择完后,自动带入电话
- var userId = $("#RECIPIENT").attr("relValue");
- var userName=$("#RECIPIENT").attr("relText");
- $("#RECIPIENT_NAME").val(userName);
- if(userId!=''){
- $.ajax({
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getPhoneNoByUserId',
- type : 'post',
- //async : false,
- timeout : 15000,
- data:userId,
- dataType : 'json',
- success : function(result){
- $("#RECIPIENT_PHONE").val(result);
- },
- error : function(e){
- top.Dialog.alert("系统错误!");
- }
- });
- };
- });
- //选择申请单位联系人备选人,带出联系人电话
- $("#RECIPIENT_2").bind("listSelect",function(e,obj){//申请单位联系人备选人自动提示框的绑定事件,选择完后,自动带入电话
- // $("#RECIPIENT").bind("change",function(){//申请单位联系人备选人的绑定事件,选择完后,自动带入电话
- var userId = $("#RECIPIENT_2").attr("relValue");
- var userName=$("#RECIPIENT_2").attr("relText");
- $("#RECIPIENT_NAME_2").val(userName);
- if(userId!=''){
- $.ajax({
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getPhoneNoByUserId',
- type : 'post',
- //async : false,
- timeout : 15000,
- data:userId,
- dataType : 'json',
- success : function(result){
- $("#RECIPIENT_PHONE_2").val(result);
- },
- error : function(e){
- top.Dialog.alert("系统错误!");
- }
- });
- };
- });
- }
-
- //需求单位的改变,自动带入申请单位联系人和备选人(2共3)
- function inputchange(rec,rec_2){
- //var unitId = $("#FORM_SECTOR_391").val();//需求单位ID
- var unitId = $("#RECIPIENT_DEPARTMENT").val();//需求单位ID
- if(unitId!=''){
- $.ajax({
- url : $.pathname() + '/ws/TeamNeed/TeamNeedService/getPeopleByUnitId',
- type : 'post',
- //async : false,
- timeout : 15000,
- data:unitId,
- dataType : 'json',
- success : function(result){
- // console.log(JSON.stringify(result));
- if(result=='' || result==null){
- top.Dialog.alert("该单位没有对应的人员!");
- return;
- }else{
- $("#RECIPIENT").data("data",result);//加载申请单位联系人下拉框
- $("#RECIPIENT").render();
- $("#RECIPIENT_2").data("data",result);//加载申请单位联系人备选人下拉框
- $("#RECIPIENT_2").render();
- result = result.list;
- if(rec != ""){
- $("#RECIPIENT").attr("selectedValue",rec);//设置申请单位联系人初始选中值
- $("#RECIPIENT").render();
- }
- if(rec_2 != ""){
- $("#RECIPIENT_2").attr("selectedValue",rec_2);//设置申请单位联系人备选人初始选中值
- $("#RECIPIENT_2").render();
- }
- }
- },
- error : function(e){
- top.Dialog.alert("系统错误!");
- }
- });
- };
- }
-
- function initGrid(){
- g = $("#maingrid").quiGrid({
- columns: [
- {name:'fd_objectid',hide:true},
- {name:'demand_id',hide:true},
- { display: '装备类型', name: 'equipment_name', align: 'center', width: 200,editor: { type: 'select',data:dutyData,selWidth:155 },render:function (item){
- for (var i = 0; i < dutyData["list"].length; i++)
- {
- if (dutyData["list"][i]['value'] == item.equipment_name)
- return dutyData["list"][i]['key'];
- }
- }},
- { display: '装备容量(kVA)', name: 'equipment_model', align: 'center', width: 200,editor: { type: 'text' ,maxlength:'15',inputMode:'numberOnly',tip:'只能输入数字'}},
- { display: '装备数量', name: 'equipment_number', align: 'center', width: 200,editor: { type: 'text' ,maxlength:'15',inputMode:'numberOnly',tip:'只能输入数字'}},
- { display: '操作', isSort: false, width: 120, render: function (rowdata, rowindex, value)
- {
- var h = "";
- if (!rowdata._editing) {
- flag=false;
- h += "<a onclick='onDelete(" + rowindex + ")'><span class='icon_delete'>删除</span></a> ";
- } else {
- flag=true;
- h += "<a onclick='endEdit(" + rowindex + ")'><span class='icon_ok'>确认</span></a> ";
- h += "<a onclick='onDelete(" + rowindex + ")'><span class='icon_delete'>取消</span></a> ";
- }
- return h;
- }
- }
- ],
- url: $.pathname() + '/ws/equip/RespEquipmentService/getDetailById/',
- params :{"demandid":demandid},
- rownumbers:true,
- pageSize:10,
- dataAction:"server",
- usePager: false,
- percentWidthMode : true,
- height: '450px', width:'100%',enabledEdit: true,clickToEdit: false,
- onDblClickRow:function(rowdata, rowindex){
- if(flag){
- top.Dialog.alert("请先完成当前记录的编辑!");
- return;
- }
- editingRow=parseInt(rowindex.slice(1))-1001;
- g.beginEdit(rowindex);
- },
- onBeforeEdit: onBeforeEdit, onBeforeSubmitEdit: onBeforeSubmitEdit,onAfterSubmitEdit: onAfterSubmitEdit,
- toolbar: {
- items: [
- { text: '新增', click: addUser, iconClass: 'icon_add' },
- { line: true }
- ]
- }
- });
- }
- //查看
- function onView(rowidx){ }
- //删除
- function onDelete(rowidx){
- if(rowidx!=editingRow && flag==true){
- top.Dialog.alert("请先完成当前记录的编辑!");
- return;
- }
- if(rowidx != editingRow){
- top.Dialog.confirm("此删除操作将无法撤回,是否继续?",function(){
- //删除记录
- var row = g.getRow(rowidx)
- // alert(row.fd_objectid)
- //删除操作
- $.post($.pathname() + '/ws/equip/RespEquipmentService/delDetailByID',
- {"fd_objectid":row.fd_objectid},
- function(result){
- if (result.Msg.sucsess == true) {
- top.Dialog.alert("删除成功!");
- g.loadData();
- } else {
- top.Dialog.alert("删除失败!");
- }
- },"json");
- });
- } else if(isNew){
- top.Dialog.confirm("确定要删除该记录吗?",function(){
- isNewSave=false;
- isValida=false;
- endEdit(rowidx);
- //删除记录
- var row = g.getRow(rowidx)
- // alert(row.fd_objectid)
- //删除操作
- g.deleteRow(row);
- });
- }else{
- isNewSave=false;
- isValida=false;
- endEdit(rowidx);
- g.loadData();
- }
- }
- //编辑
- function beginEdit(rowid) { g.beginEdit(rowid); }
- //取消编辑
- function cancelEdit(rowid) { g.cancelEdit(rowid); }
- //结束编辑
- function endEdit(rowid) {
- // editingRow='';
- isNew=false;
- g.endEdit(rowid);
- }
- //新增
- function addUser(){
- if(flag){
- top.Dialog.alert("请先完成当前记录的编辑!");
- return;
- }
- isNew=true;
- editingRow=0;
- var row = g.getRow(0);
- var rowData={ };
- g.addEditRow(rowData, row, true);
- //在这里做新增处理
- }
- //将row JSON对象转化为bo对象
- function rowToBO(row) {
- // var params = '&userinfor.userId='+row.userId+'&userinfor.userName='+row.userName+'&userinfor.userSex='+row.userSex+'&userinfor.userAge='+Math.ceil(row.userAge)+'&userinfor.userDepartment='+row.userDepartment+'&userinfor.userEmployTime='+row.userEmployTime+'&userinfor.userPassword='+row.userPassword+'&userinfor.userEducation='+row.userEducation+'&userinfor.userLoginName='+row.userLoginName;
- // var params = '&EcmDutyDetail.fd_objectid='+row.fd_objectid+'&EcmDutyDetail.duty_id='+dutyid+'&EcmDutyDetail.duty_date='+row.duty_date+'&EcmDutyDetail.start_time='+row.start_time+'&EcmDutyDetail.end_time='+row.end_time+'&EcmDutyDetail.leader='+row.leader+'&EcmDutyDetail.leader_tel='+row.leader_tel+'&EcmDutyDetail.name='+row.name+'&EcmDutyDetail.telephone='+row.telephone+'&EcmDutyDetail.duty_way='+row.duty_way;
- var params='&EquipmentDetail.fd_objectid='+row.fd_objectid+'&EquipmentDetail.equipment_name='+row.equipment_name+'&EquipmentDetail.equipment_model='+row.equipment_model+'&EquipmentDetail.equipment_number='+row.equipment_number;
- return params;
- }
- //删除后的提示
- function handleResult(result){
- if(result == 1){
- top.Dialog.alert("删除成功!",null,null,null,1);
- g.loadData();
- }else{
- top.Dialog.alert("删除失败!");
- }
- }
- //全部确认修改
- function endAllEdit(){
- g.endEdit();
- }
- //全部取消修改
- function cancelAllEdit() {
- g.cancelEdit();
- }
- //编辑前事件
- function onBeforeEdit(e) { }
- //编辑提交前事件
- function onBeforeSubmitEdit(e){
- if(isValida){
- if(e.newdata.equipment_name=="" || validateInput(e.newdata.equipment_name, "^[\" \"]+$")){
- top.Dialog.alert("装备名称列有输入值为空或全是空格!");
- return false;
- }
- if(e.newdata.equipment_name.length>15 ){
- top.Dialog.alert("装备名称不能超过15个字!");
- return false;
- }
- if(e.newdata.equipment_number==""){
- top.Dialog.alert("装备数量列有输入值为空!");
- return false;
- }
- if(!validateInput(e.newdata.equipment_number, "^[0-9]+$")){
- top.Dialog.alert("装备数量需要是正数数!");
- return false;
- }
- if(e.newdata.equipment_number.length>15){
- top.Dialog.alert("装备数量长度不能超过15!");
- return false;
- }
- }
- isValida=true;
- }
- //编辑后事件
- function onAfterSubmitEdit(e) {
- if(isNewSave){
- var fd_objectid = e.record.fd_objectid;
- var rowData = e.newdata;
- var row = JSON.stringify(rowData);
- row += ";"+demandid+";"+fd_objectid;
- // alert(row);
- //ajax方式提交数据到数据库
- // $.post($.pathname() + '/ws/duty/DutyRecordsService/saveDetail',row,function(data){
- // g.loadData();
- // },"json");
- $.ajax({
- url : $.pathname() + '/ws/equip/RespEquipmentService/saveDetailByID',
- type : 'post',
- timeout : 15000,
- data : row,
- dataType : 'text',
- success : function(result){
- top.Dialog.alert("保存成功!");
- isNew=false;
- },
- error : function(e){
- top.Dialog.alert("保存失败!");
- }
- });
- }
- isNewSave=true;
- }
- var token = 0;
- //保存方法
- function saveDuty(validaFormId,reported){
- var valid=$(validaFormId).validationEngine({returnIsValid: true});
- if(valid){
- var requireDescription = $("#REQUIREMENT_DESCRIPTION").val();
- if(g.rows.length==0 && requireDescription == ''){
- top.Dialog.alert("请填写需求描述或装备信息!");
- return ;
- }
- if(token>0){
- top.Dialog.alert("已经保存过!");
- return;
- }
-
- $("body").eq(0).showLoading();//遮罩
-
- token++;
- var rows = g.getData();
- var rowsjson=JSON.stringify(rows);
- var forms = $('#editForm').serialize();
- forms =forms +"&"+"fd_objectid="+demandid;
- $.ajax({
- url : $.pathname() + '/ws/equip/RespEquipmentService/updateDemand',
- type : 'post',
- timeout : 15000,
- data : forms,
- dataType : 'json',
- success : function(result){
- if(reported == 1){//只保存
- if (result.Msg.sucsess == true) {
- top.Dialog.alert("保存成功!");
- window.location.href="Eqallocateallot.jsp?pagenumber=";
- } else {
- top.Dialog.alert("保存失败!");
- }
- }else if(reported == 2){//保存并报审
- if (result.Msg.sucsess == true) {
- var isPass=2;//报审
- dialogDemo(isPass,result);
- // window.location.href="Eqallocateallot.jsp?pagenumber=";
- } else {
- top.Dialog.alert("保存失败!");
- }
- }
- },
- error : function(e){
- top.Dialog.alert("系统错误");
- }
- });
- }
- }
- function dialogDemo(isPass,result){
- /* var fdid = (window.location.href).split('=')[1];//获取记录id(1)
- var fd_id = fdid.split('&')[0];//获取记录id(2)*/
- var fd_id = demandid = (window.location.href).split('?')[1];//获取记录id;
- // var deptId = top.com.sinosoft.lz.system.user.LoginInfo.getDeptids();
- var CorpID = top.com.sinosoft.lz.system.user.LoginInfo.getCorp_ids();
- //var ifmHeight = $(top.document.body).find("#frmright").height();
- var diag = new top.Dialog();
- diag.Title = '报审';
- diag.URL = $.pathname() + '/page/business/em/response/team/TeamNextRole.jsp?fd_id='+fd_id+'&isPass=2&deptId='+CorpID; //修改对应的路径的编辑界面
- diag.OkButtonText = '提交';
- diag.OKEvent = function(){
- save(diag,fd_id,result);
- };
- diag.CancelEvent=function(){
- diag.close();
- window.location.href="Eqallocateallot.jsp?pagenumber=";
- };
- diag.Width = 500; //宽度
- // diag.Height = 240; //高度
- diag.ButtonAlign = 'center';
- diag.show();
- };
- function save(diag,fd_id,result){
- var realName = top.com.sinosoft.lz.system.user.LoginInfo.getReal_name();
- var realName_ID = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- /********** 弹框start **********/
- var valid = diag.innerFrame.contentWindow.$("#ideaForm").validationEngine({returnIsValid: true});//弹框页面的非空验证
- if(!valid){
- top.Dialog.alert("请检查红色输入框!");
- return;
- };
- var b = diag.innerFrame.contentWindow.$("#temp input[name='PERSON_ID_378']:checked").val();//弹框页面的下一节点人的id
- if(b=='' && b == undefined){
- top.Dialog.alert("请选择下一处理人!");
- return;
- }
-
- $("body").eq(0).showLoading();//遮罩
-
- var c = diag.innerFrame.contentWindow.$("#temp input[name='PERSON_ID_378']:checked").next().html();//弹框页面的下一节点人的NAME
- var d = diag.innerFrame.contentWindow.$("#temp input[name='PERSON_ID_378']:checked").next().next().val();//弹框页面的下一节点人的电话
- var e = diag.innerFrame.contentWindow.$("#msgRemind").attr("checked");//短信是否被勾选
- var f = diag.innerFrame.contentWindow.$("#appRemind").attr("checked");//app是否被勾选
- var isPass = diag.innerFrame.contentWindow.$(".aa[checked='checked']").val();//判断是否同意
- var g = '有新报审的装备需求,请您及时处理!';//短信内容
- var h = getDateTime();//系统时间
- // alert("ID="+b+"***NAME="+c+"***电话="+d+"***e="+e+"***f="+f)
- if(e=='checked'){//短信被勾选
- if(b == undefined){
- top.Dialog.alert("请选择短信接收人!");
- return;
- }
- var url0 = $.pathname() + '/ws/sendsms/SendSmsService/saveMessage';
- var params = {
- realName : realName,//发送人真实姓名
- smsRecTel : d,//接收电话
- smsTime : h,//系统时间
- smsContent : g,//短信内容
- smsSendId : realName_ID,//发送人Id
- smsPeople : b,//接收人员id?还是name?
- type:"短信发送"
- };
- $.ajax({//短信
- type : 'post',
- url : url0,
- data : params,
- async:false,
- dataType : 'json',
- success : function (data0){
- //addMsg(data0.list.split("|")[0],data0.list.split("|")[1],"新报审了一个队伍需求,请及时审核!");
- },
- error : function(e){
- $.messager.alert('系统提示信息', '访问服务失败!123', 'error');
- }
- });
- }
- if(f=='checked'){
- alert("应急app提醒!");
- }
- diag.innerFrame.contentWindow.top.Dialog.close();//关闭弹框
- /********** 弹框end **********/
-
- $.ajax({////修改装备需求表的IS_SEEN字段为【下一处理人ID,0】
- url : $.pathname() + '/ws/sendsms/SendSmsService/updateIs_Seen',
- data : { tableName : "ECM_EM_EQUIPMENT_DEMAND" , fdId : fd_id , nextPeopId : b , userId : realName_ID},
- type : 'post',
- dataType : 'json',
- //async:false,
- success : function (data){
-
- },error : function(e){
- top.Dialog.alert("系统提示信息!");
- }
- });
-
-
- var params = {
- classid : "382",
- FD_OBJECTID382 : fd_id,
- AUDIT_STATE_382 : "52"
- };
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/update/',
- type : 'post',
- timeout : 15000,
- data : params,
- async : false,
- dataType : 'json',
- success : function(data1) {
- var params378 = {
- classid:"378",
- PERSON_ID_378:b,
- PERSON_NAME_378:c,
- BUSINESS_ID_378:fd_id,
- STATUES_378:"52",
- DISPOSE_378:"0"
- };
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/create/',
- type : 'post',
- timeout : 15000,
- data : params378,
- async : false,
- dataType : 'json',
- success : function(data378) {
- closeProgress();
- top.Dialog.alert('报审成功!', null, null, null, -1);
- $('#frmright',window.parent.document).attr('src',$.pathname()+'/page/business/em/response/equipment/Eqallocateallot.jsp?pagenumber=');
- },error : function(e) {
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- },error : function(e) {
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
-
- /** 代办右上角红色圈里面数字的改变 **/
- var url = $.pathname() + '/ws/xianlutingyun/XianlutingyunService/WarningTask';
- var compId = top.com.sinosoft.lz.system.user.LoginInfo.getCompany_id();
- var user_id = top.com.sinosoft.lz.system.user.LoginInfo.getUser_id();
- var roleid = top.com.sinosoft.lz.system.user.LoginInfo.getRoleids();
- var params = {
- // userId : user_id,//处理人ID(系统登录人)
- netx_id : b,//下一节点处理人ID
- isRole : "0",//
- // company_id : compId,//
- // role_id : roleid//
- };
- $.ajax({//代办处理
- url : url,
- data : params,
- type : 'post',
- dataType : 'text',
- timeout : 15000,
- // async : false,
- success : function(data){
- // top.Dialog.alert('发送成功!', null, null, null, -1);
- // top.Dialog.alert('成功!');
- },error : function (e){
- // top.Dialog.alert('系统错误!');
- }
- });
-
-
- };
- function saveAndReport(validaFormId){
- top.Dialog.confirm("是否要报审?",function(){//点击确定的回调函数
- reported=2;
- saveDuty(validaFormId,reported);
- },function(){//点击取消
- //alert("bbbbbb");
- });
- }
- function resetDuty(){
- window.location.href="equipment_edit.jsp?"+demandid;
- }
- function goback(){
- window.location.href="Eqallocateallot.jsp?pagenumber=";
- }
- function alert00(){
- $("#isAlertOrResp").text("预警编号:");
- $("#TASK_NAME_ID").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+"')"); //预警编号
- }
- function response00(){
- $("#isAlertOrResp").text("响应编号:");
- $("#TASK_NAME_ID").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+"')"); //响应编号
- }
- </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" style="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="返回" src="/nwyj/images/temp/back.png" title="返回" onclick="javascript:goback();" /></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="" >修改应急装备需求</font></div>
- <br/>
- <div style="float:right">
- <input type="button" onclick="javascript:saveAndReport('#editForm');" value="保存并报审" />
- <input type="button" onclick="javascript:saveDuty('#editForm',reported);" value="保存" />
- <input type="button" onclick="javascript:resetDuty();" value="重置" />
- </div>
- <br/>
- <form id="editForm">
- <input name="REPORTING_DEPARTMENT" id="REPORTING_DEPARTMENT" type="hidden" >
- <input name="INFORMANT" id="INFORMANT" type="hidden" >
- <input name="REPORTING_TIME" id="REPORTING_TIME" type="hidden" >
- <input name="REPORTING_PHONE" id="REPORTING_PHONE" type="hidden" >
- <fieldset style="border-color:#999999;" id="fileTable" >
- <legend>基本信息:</legend>
- <table style="width:100%" border="0">
- <tr>
- <td width="15%" align="right" class="class_color"><span class="star">*</span><span id="isAlertOrResp">预警编号:</span></td>
- <td width="35%" align="left" colspan="3">
- <select editable=false name="TASK_NAME_ID" class="validate[required] selectWidth" id="TASK_NAME_ID" selAlign="" prompt="请选择" swidth="65%"></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="15%" align="right"class="class_color"><span class="star">*</span>需求名称:</td>
- <td width="35%" align="left"><input style="width:71.5%" type="text" name="TASK_NAME" id="TASK_NAME" maxlength="15" class="validate[required]" readonly="readonly"/></td>
- <td width="15%" align="right"class="class_color"><span class="star">*</span>申请单位:</td>
- <td width="35%" align="left">
- <input id="RECIPIENT_DEPARTMENT" name="RECIPIENT_DEPARTMENT" type="hidden"/>
- <input id="RECIPIENT_DEPARTMENT_391" type="text" readonly="readonly" style="width:91%"/>
- <!-- <div class="selectTree validate[required]" id="RECIPIENT_DEPARTMENT" name="RECIPIENT_DEPARTMENT" selWidth="200" boxHeight="260"></div> --></td>
- </tr>
- <tr>
- <td width="15%" align="right"class="class_color"><span class="star">*</span>申请单位联系人:</td>
- <td width="35%" align="left">
- <div class="suggestion" id="RECIPIENT" name="RECIPIENT" keepDefaultStyle="true" showList="true" inputWidth="280"></div>
- <input id="RECIPIENT_NAME" name="RECIPIENT_NAME" type="hidden" style="width:71.5%"/>
- <!-- <input id="RECIPIENT" name="RECIPIENT" type="hidden"></div> --></td>
- <td width="15%" align="right"class="class_color"><span class="star">*</span>申请联系人电话:</td>
- <td width="35%" align="left"><input style="width:91%" type="text" name="RECIPIENT_PHONE" id="RECIPIENT_PHONE" maxlength="11" class="validate[required,custom[onlyNumber]]"/></td>
- </tr>
- <tr>
- <td width="15%" align="right"class="class_color">备选人:</td>
- <td width="35%" align="left">
- <input id="RECIPIENT_NAME_2" name="RECIPIENT_NAME_2" type="hidden"/>
- <div class="suggestion" id="RECIPIENT_2" name="RECIPIENT_2" keepDefaultStyle="true" showList="true" inputWidth="280"></div>
- <!-- <select prompt="请选择" name="RECIPIENT" id="RECIPIENT" class="validate[required] selectWidth" swidth="91.3%""></select> -->
- <td width="15%" align="right"class="class_color">备选人电话:</td>
- <td width="35%" align="left"><input style="width:91%" type="text" name="RECIPIENT_PHONE_2" id="RECIPIENT_PHONE_2" maxlength="11" class="custom[onlyNumber]]"/></td>
- </tr>
- </tr>
- <td width="15%" align="right"class="class_color"><span class="star">*</span>申请使用时间:</td>
- <td width="35%" align="left"><input style="width:71.5%" type="text" readonly="readonly" name="APPLY_TO_USE_TIME" id="APPLY_TO_USE_TIME" class="date validate[required]" dateFmt="yyyy-MM-dd HH:mm:ss"/></td>
- <td width="15%" align="right"></td>
- <td width="35%" align="left"></td>
- </tr>
- <tr>
- <td width="10%" align="right" class="class_color"><span class="star">*</span>申请事由:</td>
- <td colspan="4"><textarea style="height:100px;width:96%" maxNum="300" name="USE_REASON" id="USE_REASON" class="validate[required,length[0,500]]"></textarea></td>
- </tr>
- <tr>
- <td width="10%" align="right" class="class_color">需求描述:</td>
- <td colspan="4"><textarea style="height:105px;width:97%" maxNum="1000" name="REQUIREMENT_DESCRIPTION" id="REQUIREMENT_DESCRIPTION" class=""></textarea></td>
- </tr>
- </table>
- </fieldset>
- </form>
-
- <fieldset style="border-color:#999999;" id="fileTable" >
- <legend>装备信息:</legend>
- <div class="padding_right5"><div id="maingrid"></div></div>
- </fieldset>
-
- <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>
|