<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>工单回退处理</title>
|
|
</head>
|
|
<body class="fullscreen">
|
[#include "/business/pages/include/static.html" /]
|
[#include "/business/pages/include/header.html" /]
|
[#include "/component/webupload.html" /]
|
[#include "/component/DatePicker.html" /]
|
[#include "/component/newsel.html" /]
|
<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;
|
// 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_id").formValidator({empty: false, onShow:"请选择${Constants.CUSTOMER_CONSTANTS}!",onFocus: "请选择${Constants.CUSTOMER_CONSTANTS}"}).inputValidator({min: 1,onError: "${Constants.CUSTOMER_CONSTANTS}不能为空"});
|
$("#contact_name").formValidator({empty: false, onShow:"请输入联系人!",onFocus: "联系人不能为空"}).inputValidator({min: 1,max:100,onError: "联系人为1到100个字符"});
|
$("#contact_phone").formValidator({empty:false,onShow:"请输入联系方式!",onFocus:"联系方式不能为空!"}).inputValidator({min: 1,max:32, onError:"联系方式为1到32个字符"});
|
$("#source_id").formValidator({empty: false, onShow:"请选择问题来源!",onFocus: "问题来源不能为空"}).inputValidator({min: 1,onError: "问题来源不能为空"});
|
$("#want_deal_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: "影响度不能为空"});
|
$("#repeat_order").formValidator({empty: false, onShow:"请选择重复工单!",onFocus: "重复工单不能为空"}).inputValidator({min: 1,onError: "重复工单不能为空"});
|
$("#slaId").formValidator({empty: false}).inputValidator({min: 1,onError: "服务等级不能为空"});
|
});
|
</script>
|
[#if answer == 1]
|
<script type="text/javascript">
|
window.top.openDialog("3","工单响应",
|
{},
|
{"width":50,"height":50,"noclose":true},
|
[{btnId:"btnSure3", btnName:"工单确认", btnStyle:"bluebtn"}],"${base}/business/pages/question/anwer.html?orderId=${orderId}&flowId=${flowId}&nodeId=${nodeId}");
|
</script>
|
[#else]
|
<div class="fs_navpath">
|
<h3>当前位置</h3>
|
<span></span>
|
<a>问题管理 </a>
|
<span></span>
|
<em>新增问题</em>
|
</div>
|
<div class="fs_navtitle" id="fsNavtitle">
|
<div class="fs_navtitle_con">
|
<h2>新增问题</h2>
|
<div class="fsnt_btn">
|
<a class="fb_submit" href="javascript:doSubmit();"><span>提交</span></a>
|
<a class="mainbtn noicon" href="javascript:orderback();"><span>查看退回</span></a>
|
</div>
|
</div>
|
</div>
|
<form id="myform" action="${base}/business/pages/question/backquestion.html" method="post">
|
<input type="hidden" id="id" name="id" value="${question.ID}"/>
|
<input type="hidden" id="flowId" name="flowId" value="${flowId}"/>
|
<input type="hidden" id="nodeId" name="nodeId" value="${nodeId}"/>
|
<input type="hidden" id="order_code" name="order_code" value="${question.ORDER_CODE}"/>
|
<input type="hidden" id="selectUser" name="selectUser" value="1&1&1&1"/>
|
<input type="hidden" id="sh" name="sh" value="2"/>
|
<div class="fs_main fs_edit">
|
<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" value="${question.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">${question.DESCRIP}</textarea>
|
<div id="descripTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th><label class="required">${Constants.CUSTOMER_CONSTANTS}名称:</label></th>
|
<td>
|
${question.CUSTOMER_NAME}
|
<input type="hidden" id="customer_id" name="customer_id" value="${question.CUSTOMER_ID}"/>
|
<input type="hidden" id="customer_name" name="customer_name" value="${question.CUSTOMER_NAME}"/>
|
</td>
|
<th><label>${Constants.UNIT_CONSTANTS}:</label></th>
|
<td>
|
${question.SUB_CUSTOMER_NAME}
|
</td>
|
</tr>
|
<tr>
|
|
<th><label class="required">${Constants.CUSTOMER_CONSTANTS}联系人:</label></th>
|
<td>
|
<input class="general" type="text" name="contact_name" id="contact_name" value="${question.CONTACT_NAME}"/>
|
<div id="contact_nameTip" style="display:inline-block;"></div>
|
</td>
|
<th><label class="required">联系方式:</label></th>
|
<td>
|
<input class="general" type="text" name="contact_phone" id="contact_phone" value="${question.CONTACT_PHONE}"/>
|
<div id="contact_phoneTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
|
<th><label >业务科室:</label></th>
|
<td>
|
<input class="general" type="text" name="keshi" id="keshi" value="${question.KESHI}" />
|
</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="${question.SOURCE_ID}" text="${question.SOURCE_NAME}"/]
|
|
<div id="source_idTip" style="display:inline-block;"></div>
|
</td>
|
|
</tr>
|
<tr>
|
|
<th><label class="required">服务目录:</label></th>
|
<td>
|
${question.FIRST_CATEGORY_NAME}-${question.SECOND_CATEGORY_NAME}-${question.THIRD_CATEGORY_NAME}
|
<input type="hidden" id="serivceList" name="serivceList" value="${question.FIRST_CATEGORY_NAME}-${question.SECOND_CATEGORY_NAME}-${question.THIRD_CATEGORY_NAME}"/>
|
<input type="hidden" id="serivceListId" name="serivceListId" value="${question.FIRST_CATEGORY_ID}-${question.SECOND_CATEGORY_ID}-${question.THIRD_CATEGORY_ID}"/>
|
</td>
|
<th><label class="required">期望完成时间:</label></th>
|
<td>
|
[@datepicker id="want_deal_time" value="" class="general" minDate=question.WANT_DEAL_TIME value=question.WANT_DEAL_TIME /]<div id="want_deal_timeTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th><label class="required">优先级:</label></th>
|
<td>
|
[@sel id="priority_id" name="priority_id" source=eventPri textField="DATAKEY" valueField="DATAVALUE" labelName="priority_name" value="${question.PRIORITY_ID}" text="${question.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" source=eventDg textField="DATAKEY" valueField="DATAVALUE" labelName="influence_name" value="${question.INFLUENCE_ID}" text="${question.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="${question.PRI_LEVEL_ID}"/>
|
<input type="hidden" id="slaName" name="sla_name" value="${question.PRI_LEVEL}"/>
|
<th><label class="required">服务等级:</label></th>
|
<td colspan="3" class="scores_con">
|
<h4 id="levelName">${question.PRI_LEVEL}</h4>
|
<div id="slaIdTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th class="postop"><label>附件:</label></th>
|
<td>
|
<div class="upload_file">
|
[@webupload id="files" multiple="true" extensions="*" fileList=question.fileList /]
|
</div>
|
</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>搜索码</td>
|
<td>配置名称</td>
|
<td>存放位置</td>
|
<td>操作</td>
|
</tr>
|
[#if question.ciList?? && question.ciList?size > 0]
|
[#list question.ciList as ci]
|
<tr>
|
<td><input type='hidden' name='deviceId' value="${ci.ID}" />${ci.SEARCHCODE}</td>
|
<td>${ci.CINAME}</td>
|
<td>${ci.POSITION}</td>
|
<td><a class='delete'>删除</a></td>
|
</tr>
|
[/#list]
|
[#else]
|
<tr>
|
<td colspan="4" align="center">暂无关联信息</td>
|
</tr>
|
[/#if]
|
</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>工单编号</td>
|
<td>工单名称</td>
|
<td>工单类型</td>
|
<td>当前状态</td>
|
<td>操作</td>
|
</tr>
|
[#if question.orderList?? && question.orderList?size > 0]
|
[#list question.orderList as order]
|
<tr>
|
<td><input type='hidden' name='orderId' value="${order.ID}" />${order.ORDER_CODE}</td>
|
<td>${order.WFNAME}</td>
|
<td>${Constants.mapWORKFLOW_BUSINESS_TYPE_Label(order.BUSINESSTYPE)}</td>
|
<td>${Constants.getWORKFLOW_BASE_WFSTATE_Label(order.WFSTATE)}</td>
|
<td><a class='delete'>删除</a></td>
|
</tr>
|
[/#list]
|
[#else]
|
<tr align="center">
|
<td colspan="5">暂无关联信息</td>
|
</tr>
|
[/#if]
|
</table>
|
</div>
|
</form>
|
[#include "/business/pages/include/footer.html" /]
|
<script type="text/javascript">
|
var base = '${base}';
|
var isanswer = '${answer}';
|
var flowId = '${flowId}';
|
var buttons = [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}]
|
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=2&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+"&projectId="+project_id+"&type=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.top.openDialog("selectSl","操作",
|
{},
|
{"width":80,"height":80},
|
[{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
|
}
|
|
|
function changeMsg() {
|
$("#serivceListId,#serivceList").val("");
|
}
|
|
$(function() {
|
|
var pri_level_id = '${question.PRI_LEVEL_ID}';
|
if(!$.util.isEmpty(pri_level_id) ){
|
$("#level").show();
|
}else{
|
$("#level").hide();
|
}
|
var customerId = $('#customer_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();
|
}
|
})
|
|
})
|
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/question/queryLevel.html",{"priority_id":priority_id,"influence_id":influence_id,"serivceListId":serivceListId,"customer_id":customer_id},function(data,textStatus) {
|
if(data.LEVEL_ID) {
|
$("#slaId").val(data.LEVEL_ID);
|
}
|
if(data.LEVEL_NAME) {
|
$("#slaName").val(data.LEVEL_NAME);
|
$("#levelName").text(data.LEVEL_NAME);
|
}
|
|
$("#level").show();
|
},"json")
|
}
|
}
|
function showName(labelId,labelName) {
|
$("#serivceList").val(labelName);
|
$("#serivceListId").val(labelId);
|
|
}
|
|
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("-");
|
window.top.openDialog("0","添加关联配置",
|
{},
|
{"width":80,"height":80},
|
[{btnId:"btnSure", btnName:"选择", btnStyle:"bluebtn"}],
|
"${base}/business/pages/incident/linkDevice.html?customerid="+customerid+"&ciIds="+ciIds);
|
}
|
|
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(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(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":80,"height":80},
|
[{btnId:"btnSure", btnName:"选择", btnStyle:"bluebtn"}],
|
"${base}/business/pages/incident/linkOrder.html?flowId="+flowId+"&customerid="+customerid+"&orderids="+orderids);
|
}
|
|
function questionorder() {
|
var customerid = $("#customer_id").val();
|
|
if($.util.isEmpty(customerid)) {
|
popupTips("请先选择${Constants.CUSTOMER_CONSTANTS}");
|
return;
|
}
|
|
window.top.openDialog("0","添加重复问题工单",
|
{},
|
{"width":80,"height":80},
|
[{btnId:"btnSure", btnName:"选择", btnStyle:"bluebtn"}],
|
"${base}/business/pages/question/linkwtOrder.html?customerid="+customerid);
|
}
|
|
function showLinkwtOrder(flowid,ordercode){
|
$("#showrepeat_order").val(ordercode);
|
$("#repeat_order").val(flowid);
|
}
|
|
function doSubmit() {
|
$("#myform").submit();
|
}
|
|
|
function orderback() {
|
window.top.openDialog("2","回退信息",
|
{},
|
{"width":50,"height":60},
|
[],"${base}/business/pages/question/orderBackMsg.html?orderId=${orderId}&flowId=${flowId}&nodeId=${nodeId}");
|
}
|
|
</script>
|
[/#if]
|
</body>
|
</html>
|