<!doctype html>
|
<html class="no-js">
|
<head>
|
<meta charset="utf-8">
|
<title>基本信息</title>
|
</head>
|
|
<body>
|
[#include "/business/pages/include/static.html" /]
|
[#include "/component/DatePicker.html" /]
|
<div class="deal_switch_con" style="display:block;">
|
<div class="edit_title"><h3>基本信息</h3></div>
|
<form id="myform" method="post" action="${base}/business/pages/health/managerDispatch.html">
|
<input name="orderId" type="hidden" value="${RequestParameters.orderId}"/>
|
<input name="nodeId" type="hidden" value="${RequestParameters.nodeId}"/>
|
<input name="project_id" type="hidden" value="${health.project_id}"/>
|
<input name="flowId" type="hidden" value="${RequestParameters.flowId}"/>
|
<input name="executorIds" id="executorIds" type="hidden"/>
|
<input name="executorNames" id="executorNames" type="hidden"/>
|
<input name="main_executorId" id="main_executorId" type="hidden"/>
|
<input name="flowNote" id="flowNote" type="hidden"/>
|
<input name="ciIds" id="ciIds" type="hidden"/>
|
<input name="items" id="items" type="hidden"/>
|
|
<table class="edit_layout2 basicinfo" width="100%">
|
<tr>
|
<th><label>${Constants.CUSTOMER_CONSTANTS}名称:</label></th>
|
<td><span class="infotxt">${health.customer_name}</span></td>
|
<th><label>${Constants.UNIT_CONSTANTS}:</label></th>
|
<td><span class="infotxt">${health.sub_customer_name}</span></td>
|
</tr>
|
|
<tr>
|
<th ><label class="required">联系人:</label></th>
|
<td>
|
<input id="contacts_name" name="contacts_name" value="${health.contacts_name}" class="general" type="text"/>
|
<div id="contacts_nameTip" style="display:inline-block;"></div>
|
</td>
|
<th><label class="required">联系方式:</label></th>
|
<td>
|
<input id="contacts_tel" name="contacts_tel" value="${health.contacts_tel}" class="general" type="text"/>
|
<div id="contacts_telTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
<tr>
|
<th style="width:180px"><label>计划巡检日期:</label></th>
|
<td>
|
${DateUtil.format("yyyy-MM-dd",health.plan_exe_date)}
|
</td>
|
<th style="width:180px"><label class="required">巡检执行日期:</label></th>
|
<td>
|
[@datepicker id="plan_time" value="${health.plan_time}" class="general" length=8/]
|
<div id="require_dateTip" style="display:inline-block;"></div>
|
</td>
|
</tr>
|
|
|
|
|
</table>
|
|
<br/>
|
<div class="edit_title"><h3>巡检配置</h3><a class="add_associated" href="javascript:openAddCiDialog();">新增</a></div>
|
<div class="table_basic">
|
<table id="ciList">
|
<tr class="title">
|
<td style="width:17%">分类名称</td>
|
<td style="width:17%">配置名称</td>
|
<td style="width:17%">搜索编号</td>
|
<td style="width:17%">存放位置</td>
|
<td style="width:20%">操作</td>
|
</tr>
|
|
[#if ciList??&&ciList?size>0]
|
[#list ciList as item]
|
<tr>
|
<td>
|
<input type="hidden" name="ciId" value="${item.CIID}" class="device">
|
<div id="${item.CIID}" class="itemDiv" style="display:none;">
|
[#if item.children??]
|
[#list item.children as ci_item]${ci_item.item_id}-[/#list]
|
[/#if]
|
</div>
|
${item.CATENAME}
|
</td>
|
<td>${item.CINAME}</td>
|
<td>${item.SEARCHCODE}</td>
|
<td>${item.POSITION}</td>
|
<td>
|
<a class='delete'>删除</a>
|
<a class='edit'>指标配置</a>
|
</td>
|
</tr>
|
[/#list]
|
[#else]
|
<td colspan="5" align="center">暂无信息</td>
|
[/#if]
|
|
</table>
|
</form>
|
</div>
|
|
<script type="text/javascript">
|
//添加设备页面
|
function openAddCiDialog(){
|
var ciIds = "";
|
$('input[name=ciId]').each(function(){
|
if(ciIds==''){
|
ciIds = $(this).val();
|
}else{
|
ciIds = ciIds +","+ $(this).val();
|
}
|
});
|
window.top.openDialog("1","配置巡检新增",
|
{},
|
{"width":"90","height":"70"},
|
[{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],
|
"${base}/business/pages/health/addCiDialog.html?"
|
+"customerId=${health.customer_id}&subCustomerId=${health.sub_customer_id}&ciIds="+ciIds);
|
}
|
|
function addPatrolCi(ciJsonList){
|
var arr = ciJsonList;
|
if(arr.length>0){
|
$.each(arr, function(index, ciInfo){
|
var htmlStr = "<tr>";
|
htmlStr = htmlStr + "<td>" + ciInfo.cateName + "</td>";
|
htmlStr = htmlStr + "<td>" + ciInfo.ciName + "<input name='ciId' value='"+ciInfo.ciId+"' type='hidden'><div id='"+ciInfo.ciId+"' class='itemDiv' style='display:none;'>"+ciInfo.itemIds+"</div></td>";
|
htmlStr = htmlStr + "<td>" + ciInfo.searchCode + "</td>";
|
htmlStr = htmlStr + "<td>" + ciInfo.position + "</td>";
|
htmlStr = htmlStr + "<td><a class='delete'>删除</a> <a class='edit'>指标配置</a></td>";
|
htmlStr = htmlStr + "</tr>";
|
$("#ciList").append(htmlStr).show();
|
});
|
}
|
}
|
|
function formSubmit(executorIds,executorNames,main_executorId,flowNote) {
|
$("#executorIds").val(executorIds);
|
$("#executorNames").val(executorNames);
|
$("#main_executorId").val(main_executorId);
|
$("#flowNote").val(flowNote);
|
|
var ciIds = ''
|
var jsonList=[];
|
$("input[name=ciId]").each(function(){
|
if(ciIds!=''){
|
ciIds = ciIds + ',' + $(this).val();
|
}else{
|
ciIds = $(this).val();
|
}
|
var itemJson={};
|
var item=$.trim($(this).next().html());
|
itemJson["itemId"]=item;
|
jsonList.push(itemJson);
|
});
|
$("#ciIds").val(ciIds);
|
var items=JSON.stringify(jsonList);
|
$("#items").val(items);
|
$("#myform").submit();
|
}
|
|
$(document).ready(function(){
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){window.top.popupTips(msg)},onSuccess:function(){
|
document.getElementById("myform").target = window.top.openDialog("1","操作",
|
{},
|
{"width":40,"height":40},
|
[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
|
return true;
|
}});
|
$("#contacts_name").formValidator({empty: false, onShow:"请输入联系人",onFocus: "请输入联系人"}).inputValidator({min: 1,onError: "联系人不能为空"});
|
$("#contacts_tel").formValidator({empty: false, onShow:"请输入联系方式",onFocus: "请输入联系方式"}).functionValidator({fun:checkPhone});
|
$("#require_date").formValidator({empty: false, onShow:"请输入要求完成时间",onFocus: "请输入要求完成时间"}).inputValidator({min: 1,onError: "要求完成时间不能为空"});
|
$("#service_content").formValidator({empty: false, onShow:"请填写服务内容说明",onFocus: "请填写服务内容说明"}).inputValidator({min: 1,onError: "服务内容说明不能为空"});
|
|
|
//删除设备
|
$("a.delete").live("click",function() {
|
$(this).parents("tr").remove();
|
});
|
//指标配置
|
$("a.edit").live("click",function() {
|
var $checkDiv=$(this).parents("tr").find("input[name=ciId]");
|
var id=$checkDiv.val();
|
var selectedItem=$.trim($checkDiv.next().html());
|
window.top.openDialog("1","指标配置",
|
{},
|
{"width":"60","height":"70"},
|
[{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],
|
"${base}/business/pages/health/selectItem.html?"
|
+"cusId=${health.customer_id}&subCustomerId=${health.sub_customer_id}&id="+id+"&selectedItem="+selectedItem);
|
});
|
});
|
//指标配置回调
|
function itemBack(itemsStr,id){
|
$("#"+id).html(itemsStr);
|
}
|
function checkPhone(value) {
|
if($.util.isEmpty(value)) {
|
return "联系方式不能为空";
|
}
|
if(!$.util.isMobile(value) && !$.util.isTelphone(value)) {
|
return "联系方式格式不正确";
|
}
|
return true;
|
}
|
</script>
|
</body>
|
</html>
|