<!doctype html>
|
<html>
|
<head>
|
[#include "/business/wechat/include/title.html" /]
|
[#include "/business/wechat/include/wheader.html" /]
|
[#include "/component/DatePicker.html" /]
|
[#include "/component/newsel.html" /]
|
[#include "/business/wechat/include/mobiscroll.html" /]
|
<script type="text/javascript" src="${common_static}/static/wechat/style/js/myswiperZc.js"></script>
|
</head>
|
|
<body>
|
<header class="kltit">
|
<label class="dropmenu"></label>
|
<a href="${base}/ewyw/ewzc/ewMyzc.html" ><span></span></a>创建驻场事件
|
<div class="wlsdrop2">
|
<a href="javascript:saveIncident('1');"><p class="renwu"> 提交</p></a>
|
<a href="javascript:saveIncident('2');"><p class="jieshu"> 提交并解决</p></a>
|
<a href="javascript:saveIncident('3');"><p class="guanbi"> 提交并取消</p></a>
|
</div>
|
</header>
|
<form id="myform" action="" method="post">
|
<input type="hidden" id="type" name="type">
|
<input type="hidden" id="isWechat" name="isWechat">
|
<nav class="kltwo clearfix">
|
<div class="kltwowrap">
|
<a href="#" hidefocus="true" class="active">基本信息</a>
|
<a href="#" hidefocus="true">关联配置</a>
|
<a href="#" hidefocus="true">关联工单</a>
|
<!-- <a href="#" hidefocus="true">文档附件</a> -->
|
</div>
|
</nav>
|
<div class="swiper-container" id="swiper-pages">
|
<div class="swiper-wrapper">
|
<div class="swiper-slide">
|
<section class="wlresponse">
|
<p>
|
<span>事件名称</span>
|
<i><input placeholder="请输入事件名称" name="name" id="name" type="text" class="enter" value="${resultMap.name}"></i>
|
</p>
|
<p>
|
<span>事件描述</span>
|
<i><textarea placeholder="请输入事件描述" name="descrip" id="descrip" cols="" rows="3" class="event-text">${resultMap.descrip}</textarea></i>
|
</p>
|
<p>
|
<span>${Constants.CUSTOMER_CONSTANTS}名称</span>
|
<label id="showcus" class="tr">${resultMap.customer_name}</label>
|
<input name="customer_id" id="customer_id" type="hidden" class="enter" value="${resultMap.customer_id}">
|
<input name="customer_name" id="customer_name" type="hidden" class="enter" value="${resultMap.customer_name}">
|
</p>
|
<p>
|
<span>${Constants.UNIT_CONSTANTS}</span>
|
<label id="showcus" class="tr">${resultMap.customer_name}</label>
|
<input name="sub_customer_id" id="sub_customer_id" type="hidden" class="enter" value="${resultMap.sub_customer_id}">
|
<input name="sub_customer_name" id="sub_customer_name" type="hidden" class="enter" value="${resultMap.sub_customer_name}">
|
</p>
|
<p>
|
<span>联系方式</span>
|
<i><input placeholder="请输入联系方式" name="contact_phone" id="contact_phone" type="text" class="enter" value="${resultMap.contact_phone}"></i>
|
</p>
|
<p>
|
<span>联系人</span>
|
<i><input placeholder="请输入联系人" name="contact_name" id="contact_name" type="text" class="enter" value="${resultMap.contact_name}"></i>
|
</p>
|
<p>
|
<span>业务科室</span>
|
<i><input placeholder="请输入业务科室" name="keshi" id="keshi" type="text" class="enter" value="${resultMap.keshi}"></i>
|
</p>
|
<p>
|
<span>申报方式</span>
|
<label>
|
[#if ways?? && ways?size > 0]
|
<select id="apply_type_id" name="apply_type_id" class="select" >
|
[#list ways as way]
|
<option value="${way.DATAKEY}" [#if resultMap.apply_type_id?? && resultMap.apply_type_id == way.DATAKEY]selected[#elseif wayId == way.DATAKEY]selected[/#if]>${way.DATAVALUE}</option>
|
[/#list]
|
</select>
|
[/#if]
|
</label>
|
</p>
|
<p>
|
<span>事件类型</span>
|
<label>
|
[#if types?? && types?size > 0]
|
<select id="type_id" name="type_id" class="select">
|
[#list types as type]
|
<option value="${type.DATAKEY}" [#if resultMap.type_id?? && resultMap.type_id == type.DATAKEY]selected[#elseif typeId == type.DATAKEY]selected[/#if]>${type.DATAVALUE}</option>
|
[/#list]
|
</select>
|
[/#if]
|
</label>
|
</p>
|
<p>
|
<span>事件来源</span>
|
<label>
|
[#if froms?? && froms?size > 0]
|
<select id="source_id" name="source_id" class="select">
|
[#list froms as from]
|
<option value="${from.DATAKEY}" [#if resultMap.source_id?? && resultMap.source_id == from.DATAKEY]selected[#elseif fromId == from.DATAKEY]selected[/#if]>${from.DATAVALUE}</option>
|
[/#list]
|
</select>
|
[/#if]
|
</label>
|
</p>
|
<p class="next2">
|
<span>发生时间</span>
|
<label> <input class="enter" type="text" name="happen_time" id="happen_time" value="${DateUtil.format('yyyy-MM-dd HH:mm',resultMap.happen_time)}"/></label>
|
</p>
|
<a href="javascript:showSl();">
|
<p class="next2">
|
<span>服务目录</span>
|
[#if resultMap.serivceList??]
|
<label class="tr">${resultMap.serivceList}</label>
|
[#else]
|
<label class="tr">请选择</label>
|
[/#if]
|
<input type="hidden" id="serivceListId" name="serivceListId" value="${resultMap.serivceListId}" >
|
<input type="hidden" id="serivceList" name="serivceList" value="${resultMap.serivceList}" >
|
</p></a>
|
<a href="javascript:showlevel();">
|
<p class="next2">
|
<span>SLA等级</span>
|
<label><em class="org">${resultMap.slaName}</em><br />
|
<em class="responseicon"></em>响应时间:<em class="org">${resultMap.request_answer_time}分钟</em><br />
|
<em class="responseicon"></em>解决时间:<em class="org">${resultMap.request_deal_time}小时</em></label>
|
<input type="hidden" id="slaId" name="sla_id" value="${resultMap.slaId}" />
|
<input type="hidden" id="slaName" name="sla_name" value="${resultMap.slaName}" />
|
<input type="hidden" id="request_answer_time" name="request_answer_time" value="${resultMap.request_answer_time}"/>
|
<input type="hidden" id="request_deal_time" name="request_deal_time" value="${resultMap.request_deal_time}"/>
|
<input type="hidden" id="priority_id" name="priority_id" value="${resultMap.priority_id}"/>
|
<input type="hidden" id="influence_id" name="influence_id" value="${resultMap.influence_id}"/>
|
</p></a>
|
</section>
|
</div>
|
<div class="swiper-slide">
|
<button type="button" id="button" class="add" onclick="linkDevice()" /><span>添加关联配置</span></button>
|
[#if resultMap.deviceList?? && resultMap.deviceList?size > 0]
|
[#list resultMap.deviceList as device]
|
<section class="worklist clearfix">
|
<h2>
|
<a href="#"><em class="deletes"></em></a>
|
${device.searchcode}
|
</h2>
|
<input type="hidden" name="deviceId" value="${device.deivceId}">
|
<input type="hidden" name="devices" value="${device.deivceId}&${device.searchcode}&${device.ciname}&${device.position}&${device.lv_name}">
|
<div class="worklistcon clearfix">
|
<span class="relaicon"></span>
|
<p>配置名称:${device.ciname}</p>
|
<p>分类名称:${device.lv_name}</p>
|
<p>存放位置:<em>${device.position}</em></p>
|
</div>
|
</section>
|
[/#list]
|
[/#if]
|
</div>
|
<div class="swiper-slide">
|
<button type="button" id="button" class="add" onclick="linkOrder()" /><span>添加关联工单</span></button>
|
[#if resultMap.orderList?? && resultMap.orderList?size > 0]
|
[#list resultMap.orderList as order]
|
<section class="worklist clearfix">
|
<h2>
|
<a href="#"><em class="deletes"></em></a>
|
${order.order_code}
|
</h2>
|
<input type="hidden" name="orderId" value="${order.orderId}">
|
<input type="hidden" name="orders" value="${order.orderId}&${order.businesstype}&${order.order_code}&${order.wfname}&${order.customer_name}&${order.createtime}&${order.creatername}">
|
<div class="worklistcon clearfix">
|
<span>${Constants.mapWORKFLOW_BUSINESS_TYPE_Label(order.businesstype+"")}</span>
|
<p>工单名称:${order.wfname}</p>
|
<p>${Constants.CUSTOMER_CONSTANTS}名称:${order.customer_name}</p>
|
<p>创建时间:<em>${DateUtil.format("yyyy-MM-dd HH:mm:ss",order.createtime)}</em></p>
|
<label>${order.creatername}</label>
|
</div>
|
</section>
|
[/#list]
|
[/#if]
|
</div>
|
</div>
|
</div>
|
</form>
|
<script type="text/javascript">
|
|
$(function(){
|
var searchBtn = $('.kltit label'),
|
searchCon = $('div.wlsdrop2');
|
searchBtn.click(function(){
|
searchCon.animate({height:'toggle'});
|
$(this).children('em').toggleClass("open");
|
});
|
searchCon.children('a').click(function(){
|
searchCon.slideUp();
|
});
|
$("div").click(function(){
|
searchCon.slideUp();
|
});
|
$("section").click(function(){
|
searchCon.slideUp();
|
});
|
})
|
n=$('.kltwowrap a').size();
|
var wh=100*n+"%";
|
$('.kltwowrap').width(wh);
|
var lt=(100/n/3);
|
var lt_li=lt+"%";
|
$('.kltwowrap a').width(lt_li);
|
$(".kltwowrap a").on('touchstart mousedown',function(e){
|
e.preventDefault()
|
$(".kltwowrap .active").removeClass('active');
|
$(this).addClass('active');
|
tabsSwiper.slideTo($(this).index());
|
});
|
|
$(".kltwowrap a").click(function(e){
|
e.preventDefault();
|
});
|
|
window.onload=function(){
|
var pages = document.getElementById("swiper-pages");
|
var scale = window.screen.height / window.screen.width;
|
pages.style.height = document.body.clientWidth * scale -$('.kltit').height()-$('.kltwo').height() - 20 + "px";
|
}
|
|
var tabsSwiper = new Swiper(".swiper-container",{
|
setWrapperSize :true,
|
onSlideChangeStart: function(sw){
|
$(".kltwowrap .active").removeClass('active');
|
$(".kltwowrap a").eq(tabsSwiper.activeIndex).addClass('active');
|
|
//sw.width
|
var currTab = $(".kltwowrap a").eq(tabsSwiper.activeIndex);
|
/*if(currTab.width()*sw.activeIndex +10 > sw.width){
|
currTab.parent().css("left",-currTab.width()*sw.activeIndex);
|
}else{
|
currTab.parent().css("left",0);
|
}*/
|
currTab.parent().css("left",-parseInt(sw.activeIndex/3)*sw.width);
|
}
|
});
|
var time = '${DateUtil.format("yyyy-MM-dd HH:mm",resultMap.happen_time)}';
|
var tjtype = '${RequestParameters.tjtype}';
|
$(function() {
|
|
var currYear = (new Date()).getFullYear();
|
var opt={};
|
opt.date = {preset : 'date'};
|
opt.datetime = {preset : 'datetime'};
|
opt.time = {preset : 'time'};
|
opt.default = {
|
theme: 'android-ics light', //皮肤样式
|
display: 'modal', //显示方式
|
mode: 'scroller', //日期选择模式
|
dateFormat: 'yyyy-mm-dd',
|
lang: 'zh',
|
showNow: true,
|
nowText: "今天",
|
startYear: currYear - 50, //开始年份
|
endYear: currYear + 50//结束年份
|
};
|
|
$("#happen_time").scroller($.extend(opt['datetime'], opt['default']));
|
if(!$.util.isEmpty(time)){
|
$("#happen_time").scroller('setDate', new Date(time), true);
|
}else{
|
$("#happen_time").scroller('setDate', new Date(), true);
|
}
|
|
|
if(tjtype ==1){
|
saveIncident("1");
|
}
|
|
$("#contact_phone").blur(function() {
|
var customer_id = $("#customer_id").val();
|
if(!$.util.isEmpty(customer_id)) {
|
var contactPhone = $.trim($(this).val());
|
$("#loadCycle").show();
|
$.post("${base}/ewyw/ewIncident/queryContactInfo.html",{"customer_id":customer_id,"contactPhone":contactPhone},function(data,textStatus) {
|
if(data.hasMsg == 1) {
|
var contact_name = data.CONTACT_NAME;
|
if(!$.util.isEmpty(contact_name)) {
|
$("#contact_name").val(contact_name);
|
}
|
var ywks = data.YWKS;
|
if(!$.util.isEmpty(ywks)) {
|
$("#keshi").val(ywks);
|
}
|
}
|
$("#hasMsg").val(data.hasMsg);
|
$("#loadCycle").hide();
|
},"json")
|
|
}
|
});
|
$(".deletes").click(function(){
|
$(this).parent().parent().parent().remove();
|
});
|
|
})
|
|
function selectcus() {
|
var happen_time = $("#happen_time").val();
|
happen_time = happen_time.replace("-","").replace("-","").replace(" ","").replace(":","");
|
$("#happen_time").val(happen_time);
|
$.post("${base}/ewyw/ewIncident/savetempincident.html",$("#myform").serialize(),function(data,textStatus) {
|
var customer_id = $("#customer_id").val();
|
window.location.href = "${base}/ewyw/ewIncident/ewsubCus.html?customerId="+customer_id+"&fwt=1";
|
});
|
|
}
|
|
function showSl() {
|
var customer_id = $("#customer_id").val();
|
if($.util.isEmpty(customer_id)) {
|
popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
|
return;
|
}
|
var happen_time = $("#happen_time").val();
|
happen_time = happen_time.replace("-","").replace("-","").replace(" ","").replace(":","");
|
$("#happen_time").val(happen_time);
|
$.post("${base}/ewyw/ewzc/savetempLocal.html",$("#myform").serialize(),function(data,textStatus) {
|
|
var serivceList = $("#serivceList").val();
|
var serivceListId = $("#serivceListId").val();
|
var url = "${base}/ewyw/ewIncident/ewserviceListTree.html?customerId="+customer_id+"&fwt=2";
|
if(!$.util.isEmpty(serivceList)&&!$.util.isEmpty(serivceListId)) {
|
var names = serivceList.split("-");
|
var ids = serivceListId.split("-");
|
if(ids.length==3) {
|
url += "&sl="+ids[2];
|
}
|
}
|
window.location.href = url;
|
});
|
}
|
|
function showlevel() {
|
var customer_id = $("#customer_id").val();
|
if($.util.isEmpty(customer_id)) {
|
popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
|
return;
|
}
|
var serivceListId = $("#serivceListId").val();
|
if($.util.isEmpty(serivceListId)) {
|
popupTips("请先选择服务目录");
|
return;
|
}
|
var happen_time = $("#happen_time").val();
|
happen_time = happen_time.replace("-","").replace("-","").replace(" ","").replace(":","");
|
$("#happen_time").val(happen_time);
|
$.post("${base}/ewyw/ewIncident/savetempincident.html",$("#myform").serialize(),function(data,textStatus) {
|
var priority_id = $("#priority_id").val();
|
var influence_id = $("#influence_id").val();
|
var url = "${base}/ewyw/ewIncident/ewselectlevel.html?customerId="+customer_id+"&serivceListId="+serivceListId+"&priority_id="+priority_id+"&influence_id="+influence_id+"&fwt=2";
|
window.location.href = url;
|
});
|
}
|
|
function linkDevice() {
|
var customerid = $("#customer_id").val();
|
if($.util.isEmpty(customerid)) {
|
popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
|
return;
|
}
|
var deviceIds = new Array();
|
var $deviceId = $(":hidden[name='deviceId']");
|
if($deviceId.length>0) {
|
$deviceId.each(function() {
|
deviceIds.push($(this).val());
|
})
|
}
|
|
var ciIds = deviceIds.join("-");
|
var happen_time = $("#happen_time").val();
|
happen_time = happen_time.replace("-","").replace("-","").replace(" ","").replace(":","");
|
$("#happen_time").val(happen_time);
|
$.post("${base}/ewyw/ewzc/savetempLocal.html",$("#myform").serialize(),function(data,textStatus) {
|
window.location.href = "${base}/ewyw/ewIncident/ewDevice.html?customerId="+customerid+"&ciIds="+ciIds+"&fwt=2";
|
});
|
}
|
|
function linkOrder() {
|
var customerid = $("#customer_id").val();
|
|
if($.util.isEmpty(customerid)) {
|
popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
|
return;
|
}
|
var orderIds = new Array();
|
var $orderId = $(":hidden[name='orderId']");
|
if($orderId.length>0) {
|
$orderId.each(function() {
|
orderIds.push($(this).val());
|
})
|
}
|
var order = orderIds.join("-");
|
var happen_time = $("#happen_time").val();
|
happen_time = happen_time.replace("-","").replace("-","").replace(" ","").replace(":","");
|
$("#happen_time").val(happen_time);
|
$.post("${base}/ewyw/ewzc/savetempLocal.html",$("#myform").serialize(),function(data,textStatus) {
|
window.location.href = "${base}/ewyw/ewIncident/ewOrder.html?customerId="+customerid+"&orderids="+orderIds+"&fwt=2";
|
})
|
}
|
|
function saveIncident(index){
|
var name = $("#name").val();
|
if($.util.isEmpty(name)) {
|
popupTips("事件名称不能为空");
|
return;
|
} else {
|
if(name.length > 50){
|
popupTips("事件名称最大50个汉字");
|
return;
|
}
|
}
|
var descrip = $("#descrip").val();
|
if($.util.isEmpty(descrip)) {
|
popupTips("事件描述不能为空");
|
return;
|
}
|
var customer_id = $("#customer_id").val();
|
if($.util.isEmpty(customer_id)) {
|
popupTips("${Constants.CUSTOMER_CONSTANTS}不能为空");
|
return;
|
}
|
var sub_customer_id=$("#sub_customer_id").val();
|
var contact_phone = $("#contact_phone").val();
|
if($.util.isEmpty(contact_phone)) {
|
popupTips("联系方式不能为空");
|
return;
|
}
|
if(!$.util.isMobile(contact_phone) && !$.util.isTelphone(contact_phone)) {
|
popupTips("联系方式格式不正确");
|
return;
|
}
|
var contact_name = $("#contact_name").val();
|
if($.util.isEmpty(contact_name)) {
|
popupTips("联系人不能为空");
|
return;
|
} else {
|
if(contact_name.length > 50){
|
popupTips("联系人最大50个汉字");
|
return;
|
}
|
}
|
var keshi = $("#keshi").val();
|
if(keshi.length > 25){
|
popupTips("科室最大25个汉字");
|
return;
|
}
|
var apply_type_id = $("#apply_type_id").val();
|
if($.util.isEmpty(apply_type_id)) {
|
popupTips("申报方式不能为空");
|
return;
|
}
|
var type_id = $("#type_id").val();
|
if($.util.isEmpty(type_id)) {
|
popupTips("事件类型不能为空");
|
return;
|
}
|
var source_id = $("#source_id").val();
|
if($.util.isEmpty(source_id)) {
|
popupTips("事件来源不能为空");
|
return;
|
}
|
var happen_time = $("#happen_time").val();
|
if($.util.isEmpty(happen_time)) {
|
popupTips("发生时间不能为空");
|
return;
|
}
|
var serivceListId = $("#serivceListId").val();
|
if($.util.isEmpty(serivceListId)) {
|
popupTips("服务目录不能为空");
|
return;
|
}
|
var slaId = $("#slaId").val();
|
if($.util.isEmpty(slaId)) {
|
popupTips("等级协议不能为空");
|
return;
|
}
|
var request_answer_time = $("#request_answer_time").val();
|
if($.util.isEmpty(request_answer_time)) {
|
popupTips("响应时间不能为空");
|
return;
|
}
|
var request_deal_time = $("#request_deal_time").val();
|
if($.util.isEmpty(request_deal_time)) {
|
popupTips("解决时间不能为空");
|
return;
|
}
|
$("#type").val(index);
|
var selectuser = $("#selectUser").val();
|
if(index == 1 && $.util.isEmpty(selectuser)){
|
happen_time = happen_time.replace("-","").replace("-","").replace(" ","").replace(":","");
|
$("#happen_time").val(happen_time);
|
$.post("${base}/ewyw/ewzc/savetempLocal.html",$("#myform").serialize(),function(data,textStatus) {
|
window.location.href = "${base}/ewyw/ewzc/ewzcUsers.html?customerId="+customer_id+"&serivceListId="+serivceListId+"&seltype=1"+"&subCustomerId="+sub_customer_id;
|
});
|
|
}else{
|
if(index==2){
|
$.post("${base}/ewyw/ewzc/savetempLocal.html",$("#myform").serialize(),function(data,textStatus) {
|
window.location.href = "${base}/ewyw/ewzc/ewzcSolution.html";
|
});
|
}else if(index==3){
|
$.post("${base}/ewyw/ewzc/savetempLocal.html",$("#myform").serialize(),function(data,textStatus) {
|
window.location.href = "${base}/ewyw/ewzc/ewzcClose.html";
|
});
|
}
|
}
|
|
|
}
|
</script>
|
</body>
|
</html>
|