<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>工程师创建事件</title>
|
|
|
</head>
|
|
<body class="fullscreen">
|
[#include "/business/pages/include/static.html" /]
|
[#include "/component/webupload.html" /]
|
[#include "/component/DatePicker.html" /]
|
[#include "/component/newsel.html" /]
|
|
<script type="text/javascript">
|
var pool = '${data.poolcount}';
|
var dxy = '${data.dxycount}';
|
var jxz = '${data.jxzcount}';
|
var ycs = '${data.ycscount}';
|
|
if (pool > 0) {
|
if (pool < 100) {
|
$(".${GnConstants.MYSJPOOL}").html(pool).addClass("fs_navnoread");
|
} else {
|
$(".${GnConstants.MYSJPOOL}").html("99+").addClass("fs_navnoreadmore");
|
}
|
|
}
|
if (dxy > 0) {
|
if (dxy < 100) {
|
$(".${GnConstants.MYSJDXY}").html(dxy).addClass("fs_navnoread");
|
} else {
|
$(".${GnConstants.MYSJDXY}").html("99+").addClass("fs_navnoreadmore");
|
}
|
|
}
|
if (jxz > 0) {
|
if (jxz < 100) {
|
$(".${GnConstants.MYSJJXZ}").html(jxz).addClass("fs_navnoread");
|
} else {
|
$(".${GnConstants.MYSJJXZ}").html("99+").addClass("fs_navnoreadmore");
|
}
|
|
}
|
if (ycs > 0) {
|
if (ycs < 100) {
|
$(".${GnConstants.MYSHYCS}").html(ycs).addClass("fs_navnoread");
|
} else {
|
$(".${GnConstants.MYSHYCS}").html("99+").addClass("fs_navnoreadmore");
|
}
|
|
}
|
|
</script>
|
<script type="text/javascript">
|
$(document).ready(function () {
|
$.formValidator.initConfig({
|
formID: "myform", onError: function (msg) {
|
popupTips(msg)
|
}, onSuccess: function () {
|
if (!(window.top.openConfirm("确定要提交吗?"))) {
|
return false;
|
}
|
document.getElementById("myform").target = window.top.openDialog("0", "操作",
|
{},
|
{"width": 40, "height": 40, "noclose": true},
|
[{btnId: "tipBtnSure", btnName: "确定", btnStyle: "bluebtn"}]);
|
return true;
|
}
|
});
|
|
$("#name").formValidator({empty: false, onShow: "请输入事件名称!", onFocus: "请输入事件名称"}).inputValidator({
|
min: 1,
|
max: 100,
|
onError: "事件名称为1到50个汉字"
|
});
|
$("#descrip").formValidator({empty: false, onShow: "请输入事件描述!", onFocus: "请输入事件描述"}).inputValidator({
|
min: 1,
|
onError: "事件描述不能为空"
|
});
|
$("#customer_name").formValidator({
|
empty: false,
|
onShow: "请选择${Constants.CUSTOMER_CONSTANTS}!",
|
onFocus: "请选择${Constants.CUSTOMER_CONSTANTS}"
|
}).inputValidator({min: 1, onError: "${Constants.CUSTOMER_CONSTANTS}不能为空"});
|
$("#sub_customer_id").formValidator({
|
empty: false,
|
onShow: "请选择${Constants.UNIT_CONSTANTS}!",
|
onFocus: "请选择${Constants.UNIT_CONSTANTS}"
|
}).inputValidator({min: 1, onError: "${Constants.UNIT_CONSTANTS}不能为空"});
|
// $("#contact_phone").formValidator({
|
// empty: false,
|
// onShow: "请输入联系方式!",
|
// onFocus: "联系方式不能为空!"
|
// }).functionValidator({fun: checkPhone});
|
$("#contact_name").formValidator({empty: false, onShow: "请输入联系人!", onFocus: "联系人不能为空"}).inputValidator({
|
min: 1,
|
onError: "联系人不能为空"
|
});
|
$("#_apply_type_id").formValidator({
|
empty: false,
|
onShow: "请选择申报方式!",
|
onFocus: "申报方式不能为空"
|
}).inputValidator({min: 1, onError: "申报方式不能为空"});
|
$("#_type_id").formValidator({empty: false, onShow: "请选择事件类型!", onFocus: "事件类型不能为空"}).inputValidator({
|
min: 1,
|
onError: "事件类型不能为空"
|
});
|
$("#_source_id").formValidator({empty: false, onShow: "请选择事件来源!", onFocus: "事件来源不能为空"}).inputValidator({
|
min: 1,
|
onError: "事件来源不能为空"
|
});
|
$("#happen_time").formValidator({
|
empty: false,
|
onShow: "请选择发生时间!",
|
onFocus: "事件发生时间不能为空"
|
}).inputValidator({min: 1, onError: "发生时间不能为空"});
|
$("#serivceListId").formValidator({
|
empty: false,
|
onShow: "请选择服务目录!",
|
onFocus: "服务目录不能为空"
|
}).inputValidator({min: 1, onError: "服务目录不能为空"});
|
$("#priority_id").formValidator({empty: false, onShow: "请选择优先级!", onFocus: "优先级不能为空"}).inputValidator({
|
min: 1,
|
onError: "优先级不能为空"
|
});
|
$("#influence_id").formValidator({empty: false, onShow: "请选择影响度!", onFocus: "影响度不能为空"}).inputValidator({
|
min: 1,
|
onError: "影响度不能为空"
|
});
|
$("#slaId").formValidator({empty: false}).inputValidator({min: 1, onError: "服务等级不能为空,请配置服务目录等级协议"});
|
$("#request_answer_time").formValidator({empty: false}).inputValidator({
|
min: 1,
|
onError: "响应时间不能为空,请配置服务目录等级协议"
|
});
|
$("#request_deal_time").formValidator({empty: false}).inputValidator({min: 1, onError: "解决时间不能为空,请配置服务目录等级协议"});
|
$("#keshi").formValidator({empty: true}).inputValidator({min: 0,max:50, onError: "业务科室不能超过25个汉字!"});
|
|
|
});
|
function checkPhone(value) {
|
if ($.util.isEmpty(value)) {
|
return "联系方式不能为空";
|
}
|
if (!$.util.isMobile(value) && !$.util.isTelphone(value)) {
|
return "联系方式格式不正确";
|
}
|
return true;
|
}
|
</script>
|
|
<form id="myform" action="${base}/business/pages/traffic/saveTrafficIncident.html" method="post">
|
<input type="hidden" id="repair" name="repair" value="${RequestParameters.repair}"/>
|
<input type="hidden" id="tra_id" name="tra_id" value="${tra_id}"/>
|
<div class="fs_main clearfix">
|
<div class="fsm_left" id="fsmLeft">
|
<div class="edit_title"><h3>基本信息</h3></div>
|
<table class="edit_layout">
|
<tr>
|
<th><label class="required">事件名称:</label></th>
|
<td colspan="3">
|
<input class="general maintitle" type="text" id="name" name="name" style="width:70%;"
|
value="${info.name}"/>
|
<div id="nameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th class="postop"><label class="required">事件描述:</label></th>
|
<td colspan="3"><textarea class="general" id="descrip" name="descrip" style="width:74%;">${info.descrip}</textarea>
|
<div id="descripTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
<tr>
|
<th><label class="required">${Constants.CUSTOMER_CONSTANTS}名称:</label></th>
|
<td>
|
[#if customer?? && customer?size>0]
|
<input type="hidden" id="customer_id" name="customer_id" value="${customer.CUSTOMER_ID}"/>
|
<input type="hidden" id="customer_name" name="customer_name" value="${customer.CUSTOMER_NAME}"/>
|
<label>${customer.CUSTOMER_NAME}</label>
|
[#else]
|
[#if info.xm??]
|
[@sel id="customer_id" name="customer_id" source=customers textField="ID"
|
value="${info.customer_id}" text="${info.customer_name}" valueField="CUSTOMER_NAME"
|
labelName="customer_name" callback="changeMsg" /]
|
[#else]
|
[@sel id="customer_id" name="customer_id" source=customers textField="ID"
|
value="${info.customer_id}" text="${info.customer_name}" valueField="CUSTOMER_NAME"
|
labelName="customer_name" callback="changeMsg" blankFlag="y"/]
|
[/#if]
|
<a class="csm_info"> </a>
|
<div id="customer_idTip" style="display:inline-block;"></div>
|
</td>
|
[/#if]
|
|
|
<th><label class="required">${Constants.UNIT_CONSTANTS}:</label></th>
|
<td>
|
[#if customer?? && customer?size>0]
|
<input class="general" type="text" name="sub_customer_name" id="sub_customer_name" readOnly
|
onclick="subCus();" value="${customer.CUSTOMER_NAME}"/>
|
<input type="hidden" name="sub_customer_id" id="sub_customer_id"
|
value="${customer.CUSTOMER_ID}"/>
|
[#else]
|
<input class="general" type="text" name="sub_customer_name" id="sub_customer_name" readOnly
|
onclick="subCus();" value="${info.sub_customer_name}"/>
|
<input type="hidden" name="sub_customer_id" id="sub_customer_id"
|
value="${info.sub_customer_id}"/>
|
[/#if]
|
<div id="sub_customer_idTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
|
<tr>
|
<th><label class="required">联系方式:</label></th>
|
<td>
|
<input class="general" type="text" readonly="readonly" name="contact_phone" id="contact_phone" value="${mobile}"/>
|
<input type="hidden" value="2" name="hasMsg" id="hasMsg"/>
|
<span style="height:24px;"><img src="${common_static}/static/ui/images/16x16-loading.gif"
|
style="margin:4px 0 0 2px;display:none;" id="loadCycle"/></span>
|
<div id="contact_phoneTip" style="display:inline-block;"></div>
|
</td>
|
<th><label class="required">联系人:</label></th>
|
<td>
|
<input class="general" type="text" name="contact_name" id="contact_name"
|
value="${info.contact_name}"/>
|
<div id="contact_nameTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th><label>业务科室:</label></th>
|
<td>
|
<input class="general" type="text" name="keshi" id="keshi" value="${info.keshi}"/>
|
<div id="keshiTip" style="display:inline-block;"></div>
|
|
</td>
|
<th><label class="required">申报方式:</label></th>
|
<td>
|
[@sel id="apply_type_id" value="${info.apply_type_id}" text="${info.apply_type_name}"
|
name="apply_type_id" source=ways textField="DATAKEY" valueField="DATAVALUE"
|
labelName="apply_type_name" blankFlag="y"/]
|
|
<div id="apply_type_idTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
|
|
<th><label class="required">事件类型:</label></th>
|
<td>
|
[@sel id="type_id" name="type_id" source=types textField="DATAKEY" valueField="DATAVALUE"
|
labelName="type_name" value="${info.type_id}" text="${info.type_name}" blankFlag="y"/]
|
<div id="type_idTip" style="display:inline-block;"></div>
|
</td>
|
<th><label class="required">事件来源:</label></th>
|
<td>
|
[@sel id="source_id" name="source_id" source=froms textField="DATAKEY" valueField="DATAVALUE"
|
labelName="source_name" value="${info.source_id}" text="${info.source_name}" blankFlag="y"/]
|
<div id="source_idTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
|
|
<th><label class="required">发生时间:</label></th>
|
<td>
|
[@datepicker id="happen_time" value="${info.happen_time}" maxDate=DateUtil.getCurrentDate14()
|
class="general" length=14/]
|
<div id="happen_timeTip" style="display:inline-block;"></div>
|
</td>
|
<th><label class="required">服务目录:</label></th>
|
<td>
|
[#if info.third_category_id!='']
|
<input type="text" id="serivceList" readonly name="serivceList" onclick="showSl();"
|
class="general"
|
value="${info.first_category_name}->${info.second_category_name}->${info.third_category_name}"/>
|
[#else]
|
<input type="text" id="serivceList" readonly name="serivceList" onclick="showSl();"
|
class="general"
|
value=""/>
|
[/#if]
|
<input type="hidden" id="serivceListId" name="serivceListId"
|
value="${info.first_category_id}-${info.second_category_id}-${info.third_category_id}">
|
<input type="hidden" name="selectUser" id="selectUser"/>
|
<div id="serivceListIdTip" style="display:inline-block;"></div>
|
</tr>
|
<tr>
|
<th class="postop"><label>附件:</label></th>
|
<td>
|
<div class="upload_file">
|
[@webupload id="files" multiple="true" extensions="*"/]
|
</div>
|
</td>
|
<!--<th><label>申请人联系方式:</label></th>
|
<td>
|
<input class="general" type="text" id="apply_user_phone" name="apply_user_phone"/>
|
<div id="apply_user_phoneTip" style="display:inline-block;"></div>
|
</td>-->
|
</tr>
|
</table>
|
<div class="edit_title"><h3>SLA等级</h3></div>
|
<table class="edit_layout">
|
<tr>
|
<th><label class="required">优先级:</label></th>
|
<td>
|
[@sel id="priority_id" name="priority_id" value="${info.priority_id}"
|
text="${info.priority_name}" source=eventPri textField="DATAKEY" valueField="DATAVALUE"
|
labelName="priority_name" callback="queryLevel"/]
|
<div id="priority_idTip" style="display:inline-block;"></div>
|
</td>
|
<th><label class="required">影响度:</label></th>
|
<td>
|
[@sel id="influence_id" name="influence_id" value="${info.influence_id}"
|
text="${info.influence_name}" source=eventDg textField="DATAKEY" valueField="DATAVALUE"
|
labelName="influence_name" callback="queryLevel"/]
|
<div id="influence_idTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
<tr id="level" style="display:none;">
|
<input type="hidden" id="slaId" name="sla_id" value="${info.sla_id}"/>
|
<input type="hidden" id="slaName" name="sla_name" value="${info.sla_name}"/>
|
<input type="hidden" id="request_answer_time" name="request_answer_time"
|
value="${info.request_answer_time}"/>
|
<input type="hidden" id="request_deal_time" name="request_deal_time"
|
value="${info.request_deal_time}"/>
|
<th><label class="required">服务等级:</label></th>
|
<td colspan="3" class="scores_con">
|
<h4 id="levelName"></h4>
|
<p>(<span>响应时间:</span><em class="first" id="responseTime"></em><span>解决时间:</span><em
|
id="resovleTime"></em>)</p>
|
</td>
|
</tr>
|
</table>
|
<div class="edit_title"><h3>关联配置信息</h3><a class="add_associated" href="javascript:linkDevice();">添加关联配置</a>
|
</div>
|
<table class="display_form" id="linkDeviceTable">
|
<tr class="title">
|
<td width="20%">搜索码</td>
|
<td width="25%">配置名称</td>
|
<td width="40%">存放位置</td>
|
<td width="15%">操作</td>
|
</tr>
|
<tr>
|
<td colspan="4" align="center">暂无关联信息</td>
|
</tr>
|
</table>
|
<div class="edit_title"><h3>关联工单信息</h3><a class="add_associated" href="javascript:linkOrder();">添加关联工单</a>
|
</div>
|
<table class="display_form" id="linkOrderTable">
|
<tr class="title">
|
<td width="25%">工单编号</td>
|
<td width="35%">工单名称</td>
|
<td width="15%">工单类型</td>
|
<td width="15%">当前状态</td>
|
<td width="15%">操作</td>
|
</tr>
|
<tr align="center">
|
<td colspan="5">暂无关联信息</td>
|
</tr>
|
</table>
|
</div>
|
<div class="fsm_right" style="width:30%;">
|
<div class="fsr_list">
|
<div class="fsrl_title"><span class="oneth focus"><a href="#">工单记录</a></span><span><a onclick="ewTwo()">通话记录</a></span></div>
|
<div>
|
<div class="call-records-box" style="display:block;">
|
<div class="call-records">
|
<div class="event_fill fm_event_fill" style="padding:15px;">
|
<form id="search1">
|
<table>
|
<tr>
|
<th style="padding:10px 0;text-align:right;">工单名称:</th>
|
<th>
|
<input class="general" type="text" name="order_name" id="order_name"/>
|
</th>
|
</tr>
|
<tr>
|
<th style="padding:10px 0;text-align:right;">工单编号:</th>
|
<th>
|
<input class="general" type="text" name="order_code" id="order_code"/>
|
</th>
|
</tr>
|
<tr>
|
<th style="padding:10px 0;"> </th>
|
<th>
|
<a class="retrievebtn" id="reset">重置</a><a class="retrievebtn focus" onclick="query1();">查询</a>
|
</th>
|
</tr>
|
</table>
|
</form>
|
</div>
|
</div>
|
<div class="fs_main clearfix">
|
<div id="main"></div>
|
<div class="paging clearfix" id="pagination"></div>
|
</div>
|
|
</div>
|
<div class="call-records-box">
|
<div class="call-records">
|
<div class="event_fill fm_event_fill" style="padding:15px;">
|
<form id="search2">
|
<table>
|
<tr>
|
<th style="padding:10px 0;text-align:right;">开始时间:</th>
|
<th>
|
[@datepicker id="start_time" name="start_time" value="" length=8/]
|
</th>
|
</tr>
|
<tr>
|
<th style="padding:10px 0;text-align:right;">结束时间:</th>
|
<th>
|
[@datepicker id="end_time" name="end_time" value="" length=8/]
|
</th>
|
</tr>
|
<tr>
|
<th style="padding:10px 0;"> </th>
|
<th>
|
<a class="retrievebtn" id="reset2">重置</a><a class="retrievebtn focus" onclick="query2();">查询</a>
|
</th>
|
</tr>
|
</table>
|
</form>
|
</div>
|
</div>
|
<div class="fs_main clearfix">
|
<div id="mainOne"></div>
|
<div class="paging clearfix" id="paginationOne"></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</form>
|
|
<script type="text/javascript">
|
function ewTwo(){
|
query2();
|
}
|
function details(planId){
|
window.top.openDialog("0","详情",
|
{},
|
{"width":"70","height":"80"},
|
[],
|
"${base}/business/pages/traffic/trafficDetail.html?id="+planId);
|
}
|
//工单
|
|
function query2(){
|
var start_time=$("#start_time").val();
|
var end_time=$("#end_time").val();
|
var mobile='${mobile}';
|
var params = {"mobile":mobile,"start_time":start_time,"end_time":end_time};
|
pagination("${base}/business/pages/traffic/trafficAddData.html","${base}/business/pages/traffic/trafficAddCount.html","mainOne","paginationOne",{psize:10},params);
|
}
|
function query1(){
|
var order_name=$("#order_name").val();
|
var order_code=$("#order_code").val();
|
var mobile='${mobile}';
|
var params = {"mobile":mobile,"order_name":order_name,"order_code":order_code};
|
pagination("${base}/business/pages/traffic/trafficOrderData.html","${base}/business/pages/traffic/trafficOrderCount.html","main","pagination",{psize:10},params);
|
}
|
|
|
|
$(function () {
|
queryLevel();
|
query1();
|
$("#reset").click(function () {
|
$("#order_name").val("");
|
$("#order_code").val("");
|
});
|
$("#reset2").click(function () {
|
$("#search2")[0].reset();
|
$("#start_time").val("");
|
$("#_start_time").val("");
|
$("#end_time").val("");
|
$("#_end_time").val("");
|
});
|
})
|
function subCus() {
|
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 url = "${base}/business/pages/servicelist/slaproject/subCus.html?type=100&customerId=" + customer_id + "&subCustomerId=" + sub_customer_id;
|
window.top.openDialog("selectSubCus", "操作",
|
{},
|
{"width": 80, "height": 80},
|
[{btnId: "btnSure", btnName: "确定", btnStyle: "bluebtn"}], url);
|
}
|
|
|
function showCus(labelId, labelName) {
|
$("#sub_customer_name").val(labelName);
|
$("#sub_customer_id").val(labelId);
|
}
|
|
function showSl() {
|
var customer_id = $("#customer_id").val();
|
if ($.util.isEmpty(customer_id)) {
|
popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
|
return;
|
}
|
var serivceList = $("#serivceList").val();
|
var serivceListId = $("#serivceListId").val();
|
var url = "${base}/business/pages/servicelist/slaproject/serviceListTree.html?customerId=" + customer_id + "&type=4";
|
if (!$.util.isEmpty(serivceList) && !$.util.isEmpty(serivceListId)) {
|
var names = serivceList.split("-");
|
var ids = serivceListId.split("-");
|
if (ids.length == 3) {
|
url += "&sl=" + ids[2];
|
}
|
}
|
|
window.top.openDialog("selectSl", "操作",
|
{},
|
{"width": 80, "height": 80},
|
[{btnId: "btnSure", btnName: "确定", btnStyle: "bluebtn"}], url);
|
}
|
|
function queryLevel(a, b) {
|
var priority_id = $("#priority_id").val();
|
var influence_id = $("#influence_id").val();
|
var serivceListId = $("#serivceListId").val();
|
var customer_id = $("#customer_id").val();
|
if (!$.util.isEmpty(priority_id) && !$.util.isEmpty(influence_id) && !$.util.isEmpty(serivceListId) && !$.util.isEmpty(customer_id)) {
|
$.post("${base}/business/pages/servicelist/slaproject/queryLevel.html", {
|
"priority_id": priority_id,
|
"influence_id": influence_id,
|
"serivceListId": serivceListId,
|
"customer_id": customer_id
|
}, function (data, textStatus) {
|
$("#slaId").val(data.levelId);
|
$("#slaName").val(data.levelName);
|
$("#levelName").text(data.levelName);
|
|
|
$("#request_answer_time").val(data.responseTime);
|
$("#responseTime").text(data.responseTime + "分钟");
|
|
$("#request_deal_time").val(data.resolveTime);
|
$("#resovleTime").text(data.resolveTime + "小时");
|
$("#level").show();
|
}, "json")
|
}
|
}
|
|
|
function showName(labelId, labelName) {
|
$("#serivceList").val(labelName);
|
$("#serivceListId").val(labelId);
|
queryLevel();
|
}
|
|
function changeMsg(customerId, customerName) {
|
$("#sub_customer_id").val(customerId);
|
$("#sub_customer_name").val(customerName);
|
$("#serivceListId,#serivceList").val("");
|
$("#level").hide();
|
}
|
|
|
function fullsearch() {
|
var kw = $.trim($("#name").val());
|
if (!$.util.isEmpty(kw) && kw.length > 1) {
|
search(2, "searchOrder", kw);
|
search(3, "searchProblem", kw);
|
search(1, "searchKnowLedge", kw);
|
kw = $.util.encode($.util.encode(kw));
|
$("#more0,#more1").attr("href", "${base}/business/pages/fulltext/result.html?kw=" + kw + "&t=2");
|
$("#more2").attr("href", "${base}/business/pages/fulltext/result.html?kw=" + kw + "&t=1");
|
|
} else {
|
$("#more0,#more1").attr("href", "${base}/business/pages/fulltext/search.html?t=2");
|
$("#more2").attr("href", "${base}/business/pages/fulltext/search.html?t=1");
|
}
|
}
|
|
$(function () {
|
var customerId = $('#customer_id');
|
var typeId = $('#type_id');
|
var applyTypeId = $('#apply_type_id');
|
var sourceId = $('#source_id');
|
var priority_id = $('#priority_id');
|
var influence_id = $('#influence_id');
|
|
$("a.delete").live("click", function () {
|
var $table = $(this).parents("table");
|
if ($table.find("tr").length == 2) {
|
var $str = $(this).parents("tr");
|
var length = $str.find("td").length;
|
$str.find("td:gt(0)").remove();
|
$str.find("td:first").attr({"colspan": length, "align": "center"}).html("暂无关联信息");
|
} else {
|
$(this).parents("tr").remove();
|
}
|
})
|
|
|
$("#name").keyup(function (event) {
|
if (event.keyCode == 13) {
|
fullsearch();
|
$("#descrip").focus();
|
}
|
});
|
|
$("#name").blur(function () {
|
fullsearch();
|
});
|
|
$("span.queryTab").click(function () {
|
var index = $(this).index();
|
$("span.queryTab").removeClass("focus");
|
$("span.queryTab").eq(index).addClass("focus");
|
|
$("a.more").hide();
|
$("a.more").eq(index).show();
|
|
$("div.resultlist").hide();
|
$("div.resultlist").eq(index).show();
|
});
|
$("#contact_phone").blur(function () {
|
var customer_id = $("#customer_id").val();
|
if (!$.util.isEmpty(customer_id)) {
|
var contactPhone = $.trim($(this).val());
|
$("#loadCycle").show();
|
$.post("${base}/business/pages/incident/queryContactInfo.html", {
|
"customer_id": customer_id,
|
"contactPhone": contactPhone
|
}, function (data, textStatus) {
|
if (data.hasMsg == 1) {
|
var subId = data.SUB_CUSTOMER_ID;
|
if (!$.util.isEmpty(subId)) {
|
$("#sub_customer_id").val(subId);
|
$("#sub_customer_name").val(data.SUB_CUSTOMER_NAME);
|
}
|
|
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")
|
|
}
|
});
|
|
})
|
|
|
function search(type, domId, kw) {
|
var $dom = $("#" + domId);
|
loading($dom);
|
var param;
|
if (type == 1) {
|
param = {"kw": kw, "type": type, "pageSize": 5};
|
} else if (type == 2) {
|
param = {"kw": kw, "type": type, "pageSize": 5, "smallCategory": 8};
|
} else if (type == 3) {
|
param = {"kw": kw, "type": 2, "pageSize": 5, "smallCategory": 9};
|
}
|
$.post("${base}/business/pages/fulltext/searchData.html", param, function (data, textStatus) {
|
loaded($dom);
|
$dom.html(data);
|
var num = $dom.find(".rsNum").val();
|
$("#" + domId + "1").html("(" + num + ")");
|
})
|
}
|
|
|
function linkDevice() {
|
var customerid = $("#customer_id").val();
|
var subCustomerId = $("#sub_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("-");
|
window.top.openDialog("0", "添加关联配置",
|
{},
|
{"width": 85, "height": 80},
|
[{btnId: "btnSure", btnName: "选择", btnStyle: "bluebtn"}],
|
"${base}/business/pages/incident/linkDevice.html?customerid=" + customerid + "&subCustomerId=" + subCustomerId + "&ciIds=" + ciIds+"&type=1");
|
}
|
|
function showLinkDeivce(devices) {
|
var strHtml = "";
|
$.each(devices, function (i, item) {
|
var deviceId = item.get("deivceId");
|
var searchCode = item.get("searchCode");
|
var deviceName = item.get("deviceName");
|
var position = item.get("position");
|
strHtml += "<tr><td><input type='hidden' name='deviceId' value='" + deviceId + "'>" + searchCode + "</td><td>" + deviceName + "</td><td>" + position + "</td><td><a class='delete'>删除</a></td></tr>";
|
})
|
|
|
var firstTd = $("#linkDeviceTable tr:eq(1)");
|
if (!$.util.isEmpty(firstTd.find("td:eq(0)").attr("colspan"))) {
|
if (firstTd.find("td:eq(0)").attr("colspan") != 1) {
|
firstTd.remove();
|
}
|
}
|
$("#linkDeviceTable").append(strHtml).show();
|
}
|
|
|
function showLinkOrder(devices) {
|
var strHtml = "";
|
$.each(devices, function (i, item) {
|
var orderId = item.get("orderId");
|
var businesstype = item.get("businesstype");
|
var orderCode = item.get("orderCode");
|
var wfname = item.get("wfname");
|
var createTime = item.get("createTime");
|
var customerName = item.get("customerName");
|
var wfstateText = item.get("wfstateText");
|
strHtml += "<tr><td><input type='hidden' name='orderId' value='" + orderId + "'>" + orderCode + "</td><td>" + wfname + "</td><td>" + businesstype + "</td><td>" + wfstateText + "</td><td><a class='delete'>删除</a></td></tr>";
|
})
|
|
|
var firstTd = $("#linkOrderTable tr:eq(1)");
|
if (!$.util.isEmpty(firstTd.find("td:eq(0)").attr("colspan"))) {
|
if (firstTd.find("td:eq(0)").attr("colspan") != 1) {
|
firstTd.remove();
|
}
|
}
|
|
$("#linkOrderTable").append(strHtml).show();
|
}
|
|
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 orderids = orderIds.join("-");
|
window.top.openDialog("0", "添加关联工单",
|
{},
|
{"width": 85, "height": 80},
|
[{btnId: "btnSure", btnName: "选择", btnStyle: "bluebtn"}],
|
"${base}/business/pages/incident/linkOrder.html?customerid=" + customerid + "&orderids=" + orderids+"&type=1");
|
}
|
|
function doSubmit() {
|
$("#myform").submit();
|
}
|
//根据模板创建事件
|
function selectModel() {
|
$.post("${base}/business/pages/incidentTemplate/myIncidentCount.html", function (data) {
|
if (data > 0) {
|
window.top.openDialog("1", "选择事件模板",
|
{},
|
{"width": 85, "height": 80},
|
[{btnId: "btnSure", btnName: "选择", btnStyle: "bluebtn"}],
|
"${base}/business/pages/incidentTemplate/modelList.html");
|
} else {
|
window.top.popupTips("没有事件模板信息");
|
}
|
});
|
|
}
|
function gd(order_code){
|
window.location.href="${base}/business/pages/incident/engineerAddIncident.html?orderId="+order_code+"&type=4";
|
}
|
function onDialogBtnClick(btnID, dialogID, config){
|
if(btnID == "btnSure"){
|
$("#myform").submit();
|
}
|
}
|
</script>
|
|
</body>
|
</html>
|