731 lines
34 KiB
Plaintext
731 lines
34 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
<% request.setAttribute("PatrolPlan_Weekly", com.sipai.entity.timeefficiency.TimeEfficiencyCommStr.PatrolPlan_Weekly); %>
|
||
<% request.setAttribute("PatrolPlan_Daily", com.sipai.entity.timeefficiency.TimeEfficiencyCommStr.PatrolPlan_Daily); %>
|
||
<% request.setAttribute("PatrolPlan_Monthly", com.sipai.entity.timeefficiency.TimeEfficiencyCommStr.PatrolPlan_Monthly); %>
|
||
|
||
<% request.setAttribute("Last_Day", com.sipai.entity.timeefficiency.PatrolPlan.Last_Day); %>
|
||
|
||
<!-- bootstrap switch -->
|
||
<link rel="stylesheet"
|
||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||
charset="utf-8"></script>
|
||
|
||
<!-- 拖拽排序-->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/jquery.tablednd.js"
|
||
charset="utf-8"></script>
|
||
<script type="text/javascript"
|
||
src="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js"
|
||
charset="utf-8"></script>
|
||
<link rel="stylesheet"
|
||
href="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.css"/>
|
||
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single {
|
||
height: 34px;
|
||
line-height: 34px;
|
||
}
|
||
|
||
.select2-selection__arrow {
|
||
margin-top: 3px;
|
||
}
|
||
</style>
|
||
|
||
<script type="text/javascript">
|
||
//编辑用户信息
|
||
var doEditPatrolPoint = function () {
|
||
var allTableData = $("#table_patrolPoint").bootstrapTable('getData');
|
||
var patrolPointIds = "";
|
||
$.each(allTableData, function (index, item) {
|
||
if (patrolPointIds != "") {
|
||
patrolPointIds += ",";
|
||
}
|
||
patrolPointIds += item.patrolPointId;
|
||
})
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolPoint/patrolPointForSelect.do', {
|
||
patrolPointIds: patrolPointIds,
|
||
bizId: '${patrolPlan.unitId}',
|
||
processSectionId: $('#processSectionId').val(),
|
||
patrolType: $('#patrolType').val()
|
||
}, function (data) {
|
||
$("#subDiv_PatroPoint").html(data);
|
||
openModal('patroPointModal');
|
||
});
|
||
};
|
||
var doFinishSelectPatrolPoint = function (data) {
|
||
// $.post(ext.contextPath + '/timeEfficiency/patrolPlan/updatePatrolPoints.do', {
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolPoint/saveRoutePointForPlan.do', {
|
||
patrolPlanId: '${patrolPlan.id}',
|
||
patrolPointIds: data
|
||
}, function (data) {
|
||
if (data.code) {
|
||
doRefreshPatrolPoints();
|
||
}
|
||
}, 'json');
|
||
};
|
||
var doRefreshPatrolPoints = function () {
|
||
$("#table_patrolPoint").bootstrapTable('refresh');
|
||
};
|
||
|
||
function doupdate() {
|
||
//保存前先赋值班组
|
||
var val = $('#_deptIds').val();
|
||
var rolestr = "";
|
||
if (val != null && val != '') {
|
||
$.each(val, function (index, value, array) {
|
||
if (rolestr != "") {
|
||
rolestr += ","
|
||
}
|
||
rolestr += value;
|
||
})
|
||
$('#deptIds').val(rolestr);//赋值班组
|
||
}
|
||
|
||
//保存前先赋值班组
|
||
var val2 = $('#patrolAreaName').val();
|
||
var rolestr2 = "";
|
||
if (val2 != null && val2 != '') {
|
||
$.each(val2, function (index, value, array) {
|
||
if (rolestr2 != "") {
|
||
rolestr2 += ","
|
||
}
|
||
rolestr2 += value;
|
||
})
|
||
$('#patrolAreaId').val(rolestr2);//赋值班组
|
||
}
|
||
|
||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
var param = $("#subForm").serialize() + '&releaseModal=' + releaseModal;
|
||
$.post(ext.contextPath + "/timeEfficiency/patrolPlan/update.do", param, function (data) {
|
||
if (data.res == 1) {
|
||
closeModal('subModal');
|
||
$("#table").bootstrapTable('refresh');
|
||
} else if (data.res == 0) {
|
||
showAlert('d', '保存失败');
|
||
} else {
|
||
showAlert('d', data.res);
|
||
}
|
||
}, 'json');
|
||
}
|
||
|
||
}
|
||
|
||
$("#subForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
name: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '名称不能为空'
|
||
}
|
||
}
|
||
},
|
||
duration: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '巡检时长不能为空'
|
||
}
|
||
}
|
||
},
|
||
timeInterval: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '巡检间隔不能为空'
|
||
}
|
||
}
|
||
},
|
||
/*patrolContent: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '巡检内容不能为空'
|
||
}
|
||
}
|
||
},*/
|
||
|
||
}
|
||
});
|
||
var releaseModal = '${PatrolPlan_Daily}';//默认每日下发
|
||
|
||
$(function () {
|
||
|
||
//初始化班组
|
||
refreshSelect('${patrolPlan.groupTypeId}');
|
||
//初始化区域
|
||
refreshSelect2();
|
||
//回显最后一天勾选框
|
||
doSelectLastDay();
|
||
|
||
$('#sdt').timepicker({
|
||
showMeridian: false
|
||
}).on('hide', function (e) {
|
||
//当日期选择框关闭时,执行刷新校验
|
||
$('#subForm').data('bootstrapValidator')
|
||
.updateStatus('sdt', 'NOT_VALIDATED', null)
|
||
.validateField('sdt');
|
||
});
|
||
//日期格式需对齐,不然会不准
|
||
$('#edt').timepicker({
|
||
showMeridian: false
|
||
}).on('hide', function (e) {
|
||
//当日期选择框关闭时,执行刷新校验
|
||
$('#subForm').data('bootstrapValidator')
|
||
.updateStatus('edt', 'NOT_VALIDATED', null)
|
||
.validateField('edt');
|
||
});
|
||
|
||
$('#colorContainer').colorpicker({format: null});
|
||
|
||
$("#weekRegister").select2({
|
||
placeholder: '请选择',//默认文字提示
|
||
allowClear: true,//允许清空
|
||
escapeMarkup: function (markup) {
|
||
return markup;
|
||
}, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
multiple: true,
|
||
formatResult: function formatRepo(repo) {
|
||
return repo.text;
|
||
}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo) {
|
||
return repo.text;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
|
||
//下发模式具体内容控制器
|
||
document.getElementById('weekDiv').style.display = 'none';
|
||
document.getElementById('monthDiv').style.display = 'none';
|
||
$('input[type=radio][name=optionsRadiosinline]').change(function () {
|
||
if (this.value == '${PatrolPlan_Weekly}') {
|
||
document.getElementById('weekDiv').style.display = 'block';
|
||
document.getElementById('monthDiv').style.display = 'none';
|
||
releaseModal = '${PatrolPlan_Weekly}';
|
||
} else if (this.value == '${PatrolPlan_Monthly}') {
|
||
document.getElementById('weekDiv').style.display = 'none';
|
||
document.getElementById('monthDiv').style.display = 'block';
|
||
releaseModal = '${PatrolPlan_Monthly}';
|
||
} else {
|
||
document.getElementById('weekDiv').style.display = 'none';
|
||
document.getElementById('monthDiv').style.display = 'none';
|
||
releaseModal = '${PatrolPlan_Daily}';
|
||
}
|
||
});
|
||
|
||
//下发内容初次加载器
|
||
if ("${patrolPlan.releaseModal }" == "${PatrolPlan_Weekly}") {
|
||
document.getElementById('weekDiv').style.display = 'block';
|
||
document.getElementById('monthDiv').style.display = 'none';
|
||
releaseModal = '${PatrolPlan_Weekly}';
|
||
$("#weeklyRadio").attr("checked", "checked");
|
||
$("#dailyRadio").removeAttr("checked");
|
||
$("#monthlyRadio").removeAttr("checked");
|
||
//周多选框
|
||
var weekItems = '${patrolPlan.weekRegister}'.split(',');
|
||
$("#weekRegister").val(weekItems).trigger("change");
|
||
} else if ("${patrolPlan.releaseModal }" == '${PatrolPlan_Monthly}') {
|
||
document.getElementById('weekDiv').style.display = 'none';
|
||
document.getElementById('monthDiv').style.display = 'block';
|
||
releaseModal = '${PatrolPlan_Monthly}';
|
||
$("#monthlyRadio").attr("checked", "checked");
|
||
$("#dailyRadio").removeAttr("checked");
|
||
$("#weeklyRadio").removeAttr("checked");
|
||
} else {
|
||
document.getElementById('weekDiv').style.display = 'none';
|
||
document.getElementById('monthDiv').style.display = 'none';
|
||
releaseModal = '${PatrolPlan_Daily}';
|
||
$("#dailyRadio").attr("checked", "checked");
|
||
$("#monthlyRadio").removeAttr("checked");
|
||
$("#weeklyRadio").removeAttr("checked");
|
||
}
|
||
|
||
|
||
//日期格式需对齐,不然会不准
|
||
$("#table_patrolPoint").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/timeEfficiency/patrolPoint/getPatrolPointForPlan.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||
pageSize: 50, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'client', // 设置为服务器端分页
|
||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order,
|
||
planId: '${patrolPlan.id}'
|
||
}
|
||
},
|
||
// responseHandler: function(res){
|
||
// return {
|
||
// "rows": res.result
|
||
// }
|
||
// },
|
||
responseHandler: function (res) {
|
||
return res.result
|
||
},
|
||
sortName: 'morder', // 要排序的字段
|
||
sortOrder: 'asc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'patrolPoint.name', // 返回json数据中的name
|
||
title: '名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '30%'
|
||
},
|
||
{
|
||
field: 'patrolPoint.processSection.sname', // 返回json数据中的name
|
||
title: '工艺段', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '20%'
|
||
},
|
||
{
|
||
field: '2', // 返回json数据中的name
|
||
title: '巡检内容数', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '15%',
|
||
formatter: function (value, row, index) {
|
||
return row.patrolContentNum;
|
||
}
|
||
},
|
||
{
|
||
field: '3', // 返回json数据中的name
|
||
title: '填报内容数', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '15%',
|
||
formatter: function (value, row, index) {
|
||
return row.measurePointContentNum;
|
||
}
|
||
},
|
||
{
|
||
field: 'patrolAreaFloor.name', // 返回json数据中的name
|
||
title: '楼层', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
width: '10%'
|
||
},
|
||
{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: '10%', // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
var buts = '';
|
||
if (row.patrolPoint != null && row.patrolPoint != '') {
|
||
buts += '<button class="btn btn-default btn-sm" onclick="configureFun(\'' + row.patrolPlanId + '\',\'' + row.patrolPoint.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||
}
|
||
buts += '<button class="btn btn-default btn-sm" onclick="deletePatrolPointFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
adjustBootstrapTableView("table_patrolPoint");
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
},
|
||
//当拖拽结束后,整个表格的数据
|
||
onReorderRow: function (newData) {
|
||
//这里的newData是整个表格数据,数组形式
|
||
console.log(newData);
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolPoint/dosort.do', {jsondata: JSON.stringify(newData)},
|
||
function (data) {
|
||
if (data == 1) {
|
||
//$("#table").bootstrapTable('refresh');
|
||
} else {
|
||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||
}
|
||
});
|
||
}
|
||
});
|
||
})
|
||
|
||
var deletePatrolPointFun = function (id) {
|
||
swal({
|
||
text: "您确定要删除此记录?",
|
||
dangerMode: true,
|
||
buttons: {
|
||
cancel: {
|
||
text: "取消",
|
||
value: null,
|
||
visible: true,
|
||
className: "btn btn-default btn-sm",
|
||
closeModal: true,
|
||
},
|
||
confirm: {
|
||
text: "确定",
|
||
value: true,
|
||
visible: true,
|
||
className: "btn btn-danger btn-sm",
|
||
closeModal: true
|
||
}
|
||
}
|
||
})
|
||
.then(function (willDelete) {
|
||
if (willDelete) {
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolPoint/dodelete4PatrolPlan.do', {id: id}, function (data) {
|
||
var datastr = eval('(' + data + ')');
|
||
if (datastr.code == 1) {
|
||
$("#table_patrolPoint").bootstrapTable('refresh');
|
||
} else {
|
||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||
}
|
||
});
|
||
|
||
}
|
||
});
|
||
};
|
||
|
||
//弹窗配置巡检内容及填报内容
|
||
function configureFun(patrolPlanId, patrolPointId) {
|
||
$.post(ext.contextPath + '/timeEfficiency/patrolPlan/configure.do', {
|
||
patrolPlanId: patrolPlanId,
|
||
patrolPointId: patrolPointId,
|
||
unitId: '${patrolPlan.unitId}'
|
||
}, function (data) {
|
||
$("#subDiv_Configure").html(data);
|
||
openModal('subModalConfigure');
|
||
});
|
||
}
|
||
|
||
//初始化班组
|
||
function refreshSelect(groupTypeId) {
|
||
$.post(ext.contextPath + "/work/groupDetail/getlistForSelect2.do", {
|
||
unitId: unitId,
|
||
grouptype: groupTypeId
|
||
}, function (data) {
|
||
//先清空下拉选项 避免数据叠加
|
||
$("#_deptIds").empty();
|
||
//加载下拉选项
|
||
var selelct = $("#_deptIds").select2({
|
||
data: data,
|
||
placeholder: '请选择',//默认文字提示
|
||
allowClear: false,//允许清空
|
||
escapeMarkup: function (markup) {
|
||
return markup;
|
||
}, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
multiple: true,
|
||
formatResult: function formatRepo(repo) {
|
||
return repo.text;
|
||
}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo) {
|
||
return repo.text;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
var roleitems = new Array();
|
||
var roles = JSON.parse(decodeURIComponent('${patrolPlanDept}'));
|
||
for (var i = 0; i < roles.length; i++) {
|
||
roleitems.push(roles[i].id);
|
||
}
|
||
selelct.val(roleitems).trigger("change");
|
||
}, 'json');
|
||
};
|
||
|
||
//初始化区域
|
||
function refreshSelect2() {
|
||
$.post(ext.contextPath + "/timeEfficiency/patrolArea/getPatrolArea4Select.do", {bizId: unitId}, function (data) {
|
||
// console.log(data);
|
||
// $.post(ext.contextPath + "/work/groupType/getGroupTypeTree.do", {unitId: unitId}, function (data) {
|
||
var selelct = $("#patrolAreaName").select2({
|
||
data: data,
|
||
placeholder: '请选择',//默认文字提示
|
||
allowClear: false,//允许清空
|
||
escapeMarkup: function (markup) {
|
||
return markup;
|
||
}, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
multiple: true,
|
||
formatResult: function formatRepo(repo) {
|
||
return repo.text;
|
||
}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo) {
|
||
return repo.text;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
var roleitems = new Array();
|
||
var roles = JSON.parse('${patrolPlanArea}');
|
||
for (var i = 0; i < roles.length; i++) {
|
||
roleitems.push(roles[i].id);
|
||
}
|
||
selelct.val(roleitems).trigger("change");
|
||
}, 'json');
|
||
};
|
||
|
||
//勾选每月最后一天
|
||
function dolastday() {
|
||
//定义一个空数组
|
||
var arr = [];
|
||
$("input[name='lastday']:checked").each(function (i) {
|
||
//把所有被选中的复选框的值存入数组
|
||
arr[i] = $(this).val();
|
||
})
|
||
if (arr != null && arr == '${Last_Day}') {
|
||
$("#monthRegister").val('${Last_Day}');
|
||
$("#monthRegister").attr("readOnly", true);//将第几天设置为不可修改
|
||
|
||
|
||
$("#lastDiv1").attr("style","display:none;");
|
||
$("#lastDiv2").attr("style","display:block;");
|
||
} else {
|
||
$("#monthRegister").attr("readOnly", false);//将第几天设置为可修改
|
||
$("#monthRegister").val(1);//设置为1号
|
||
$("#lastDiv2").attr("style","display:none;");
|
||
$("#lastDiv1").attr("style","display:block;");
|
||
}
|
||
}
|
||
|
||
//回显最后一天勾选框
|
||
function doSelectLastDay() {
|
||
var monthRegister = $("#monthRegister").val();
|
||
if (monthRegister != null && monthRegister == '${Last_Day}') {
|
||
$("input:checkbox[value='${Last_Day}']").attr('checked', 'true');//回显复选框
|
||
$("#monthRegister").attr("readOnly", true);//将第几天设置为不可修改
|
||
|
||
$("#lastDiv1").attr("style","display:none;");
|
||
$("#lastDiv2").attr("style","display:block;");
|
||
}else{
|
||
$("#monthRegister").attr("readOnly", false);//将第几天设置为可修改
|
||
// $("#monthRegister").val(1);//设置为1号
|
||
$("#lastDiv2").attr("style","display:none;");
|
||
$("#lastDiv1").attr("style","display:block;");
|
||
}
|
||
}
|
||
|
||
var selectType = $("#sheetName").select2({minimumResultsForSearch: 10});
|
||
$.post(ext.contextPath + "/work/groupType/getGroupTypeTree.do", {unitId: unitId}, function (data) {
|
||
$("#groupTypeName").empty();
|
||
var selelct_ = $("#groupTypeName").select2({
|
||
data: data,
|
||
placeholder: '请选择',//默认文字提示
|
||
allowClear: false,//允许清空
|
||
escapeMarkup: function (markup) {
|
||
return markup;
|
||
}, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 5,//数据超过5个启用搜索框
|
||
formatResult: function formatRepo(repo) {
|
||
return repo.text;
|
||
}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo) {
|
||
return repo.text;
|
||
} // 函数用于呈现当前的选择
|
||
});
|
||
selelct_.val('${patrolPlan.groupTypeId}').trigger("change");
|
||
selelct_.on('change', function (e) {
|
||
$('#groupTypeId').val(e.target.value);
|
||
|
||
|
||
$('#deptIds').val('');
|
||
$('#_deptIds').val('');
|
||
refreshSelect(e.target.value);
|
||
})
|
||
}, 'json');
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModal">
|
||
<div class="modal-dialog modal-lg">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">编辑计划</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<!-- 新增界面formid强制为subForm -->
|
||
<form class="form-horizontal" id="subForm">
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
<div class="form-group">
|
||
<input name="id" type="hidden" value="${patrolPlan.id}"/>
|
||
<input id="patrolType" name="patrolType" type="hidden" value="${patrolPlan.type}"/>
|
||
<input id="type" name="type" type="hidden" value="${patrolPlan.type}"/>
|
||
<label class="col-sm-2 control-label">*巡检名称</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="name" name="name" placeholder="名称"
|
||
value='${patrolPlan.name}'>
|
||
</div>
|
||
<label class="col-sm-2 control-label">启用状态</label>
|
||
<div class="col-sm-4">
|
||
<select class="form-control select2" id="active" name="active">
|
||
<option value="1" <c:if test="${patrolPlan.active}">selected</c:if>>启用</option>
|
||
<option value="0" <c:if test="${!patrolPlan.active}">selected</c:if>>停用</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*巡检时长/分钟</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="duration" name="duration" min="0" step="5"
|
||
placeholder="分钟" value='${patrolPlan.duration}'>
|
||
</div>
|
||
<label class="col-sm-2 control-label">*巡检间隔/分钟</label>
|
||
<div class="col-sm-4">
|
||
<input type="number" class="form-control" id="timeInterval" name="timeInterval" min="0"
|
||
step="5" placeholder="分钟" value='${patrolPlan.timeInterval}'>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">每日起始时间</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="sdt" name="sdt" placeholder="起始时间"
|
||
value="${patrolPlan.sdt.substring(11,16) }">
|
||
</div>
|
||
<label class="col-sm-2 control-label">每日结束时间</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="edt" name="edt" placeholder="结束时间"
|
||
value="${patrolPlan.edt.substring(11,16) }">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*班组类型</label>
|
||
<div class="col-sm-4">
|
||
<select class="form-control select2" id="groupTypeName" name="groupTypeName"
|
||
style="width: 100%;">
|
||
</select>
|
||
<input type="hidden" name="groupTypeId" id="groupTypeId" value="${patrolPlan.groupTypeId}">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">任务班组</label>
|
||
<div class="col-sm-4">
|
||
<select class="form-control select2" id="_deptIds" name="_deptIds" style="width: 100%;">
|
||
</select>
|
||
<input type="hidden" name="deptIds" id="deptIds" value="">
|
||
</div>
|
||
<label class="col-sm-2 control-label">任务区域</label>
|
||
<div class="col-sm-4">
|
||
<select class="form-control select2" id="patrolAreaName" name="patrolAreaName"
|
||
style="width: 100%;">
|
||
</select>
|
||
<input type="hidden" name="patrolAreaId" id="patrolAreaId" value="">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">下发方式</label>
|
||
<div class="col-sm-4">
|
||
<label class="radio-inline">
|
||
<input type="radio" name="optionsRadiosinline" id="dailyRadio"
|
||
value="${PatrolPlan_Daily}"> 每日下发
|
||
</label>
|
||
<label class="radio-inline">
|
||
<input type="radio" name="optionsRadiosinline" id="weeklyRadio"
|
||
value="${PatrolPlan_Weekly}"> 每周下发
|
||
</label>
|
||
<label class="radio-inline">
|
||
<input type="radio" name="optionsRadiosinline" id="monthlyRadio"
|
||
value="${PatrolPlan_Monthly}"> 每月下发
|
||
</label>
|
||
</div>
|
||
<label class="col-sm-2 control-label">标记颜色</label>
|
||
<div class="col-sm-4">
|
||
<div class="input-group " id="colorContainer">
|
||
<input name="color" type="text" class="form-control" value="${patrolPlan.color }">
|
||
<div class="input-group-addon">
|
||
<i></i>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!--每周下发方式-->
|
||
<div class="form-group" id="weekDiv"
|
||
style="border-radius:4px;border:2px solid cadetblue;padding-top:4px;padding-bottom:4px;margin-left:4px;margin-right:4px">
|
||
<label class="col-sm-2 control-label">周间隔</label>
|
||
<div class="col-sm-2">
|
||
<input type="number" class="form-control" id="weekInterval" name="weekInterval"
|
||
placeholder="" min="0" value="${patrolPlan.weekInterval }"
|
||
style="border-radius:4px;">
|
||
</select>
|
||
</div>
|
||
<label class="col-sm-1 control-label">在</label>
|
||
<div class="col-sm-7">
|
||
<select class="form-control select2" id="weekRegister" name="weekRegister"
|
||
style="width:260px;">
|
||
<option value="2">周一</option>
|
||
<option value="3">周二</option>
|
||
<option value="4">周三</option>
|
||
<option value="5">周四</option>
|
||
<option value="6">周五</option>
|
||
<option value="7">周六</option>
|
||
<option value="1">周日</option>
|
||
</select>
|
||
<label class="control-label">按住Ctrl可连续多选</label>
|
||
</div>
|
||
</div>
|
||
|
||
<!--每月下发方式-->
|
||
<div class="form-group" id="monthDiv"
|
||
style="border-radius:4px;border:2px solid rgb(204, 155, 20);padding-top:4px;padding-bottom:4px;margin-left:4px;margin-right:4px">
|
||
<label class="col-sm-2 control-label">每月第</label>
|
||
<div class="col-sm-4" id="lastDiv1">
|
||
<input type="number" class="form-control" id="monthRegister" name="monthRegister" min="1" max="28"
|
||
style="border-radius:4px;width:100%;" value="${patrolPlan.monthRegister }">
|
||
</select>
|
||
</div>
|
||
<div class="col-sm-4" id="lastDiv2" style="display: none;">
|
||
<input type="text" class="form-control"
|
||
style="border-radius:4px;width:100%;" value="最后一天" readonly>
|
||
</select>
|
||
</div>
|
||
<label class="col-sm-2 control-label" style="text-align: left">天下发</label>
|
||
<label class="col-sm-4 control-label" style="text-align: left">
|
||
<input type="checkbox" name="lastday" id="lastday" onchange="dolastday();" value="99"> 最后一天
|
||
</label>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">巡检内容</label>
|
||
<div class="col-sm-10">
|
||
<textarea class="form-control" id="patrolContent" name="patrolContent" rows="3"
|
||
placeholder="名称">${patrolPlan.patrolContent }</textarea>
|
||
</div>
|
||
</div>
|
||
|
||
</form>
|
||
<div class="box box-primary">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">关联巡检点</h3>
|
||
|
||
<div class="box-tools pull-right">
|
||
<a onclick="doEditPatrolPoint()" class="btn btn-box-tool" data-toggle="tooltip"
|
||
title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box-body ">
|
||
<table id="table_patrolPoint" data-use-row-attr-func="true"
|
||
data-reorderable-rows="true"></table>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div> |