first commit
This commit is contained in:
274
WebRoot/jsp/work/schedulingView.jsp
Normal file
274
WebRoot/jsp/work/schedulingView.jsp
Normal file
@ -0,0 +1,274 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
<%@page import="com.sipai.entity.work.Scheduling" %>
|
||||
<% request.setAttribute("Status_UnSucceeded", Scheduling.Status_UnSucceeded); %>
|
||||
<% request.setAttribute("Status_Handovered", Scheduling.Status_Handovered); %>
|
||||
<% request.setAttribute("Status_Succeeded", Scheduling.Status_Succeeded); %>
|
||||
|
||||
<%@page import="com.sipai.entity.work.GroupContentForm" %>
|
||||
<% request.setAttribute("Showtextst_TRUE", GroupContentForm.Showtextst_TRUE); %>
|
||||
<% request.setAttribute("Showtextst_FALSE", GroupContentForm.Showtextst_FALSE); %>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
getLastGroup();
|
||||
})
|
||||
|
||||
function getLastGroup() {
|
||||
$.post(ext.contextPath + '/work/groupContent/getLastGroup.do', {
|
||||
unitId: '${param.bizid}',
|
||||
groupType: '${scheduling.schedulingtype}',
|
||||
schedulingId: '${scheduling.id}'
|
||||
}, function (data) {
|
||||
// console.log(data)
|
||||
var html = "<table style='width: 100%;text-align: center;border-collapse: collapse;' >";
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
html += "<tr >"
|
||||
if (r.nodes != '') {
|
||||
for (var j = 0; j < r.nodes.length; j++) {
|
||||
var c = r.nodes[j];
|
||||
var width = "";
|
||||
if (c.width != '' && c.width != null) {
|
||||
width = c.width;
|
||||
} else {
|
||||
width = "60px;";
|
||||
}
|
||||
var height = c.height;
|
||||
if (c.height != '' && c.height != null) {
|
||||
height = c.height;
|
||||
} else {
|
||||
height = "100px;";
|
||||
}
|
||||
<%--var showText = "";--%>
|
||||
<%--if (c.showtextst == '${Showtextst_FALSE}') {--%>
|
||||
<%-- showText = c.showText;--%>
|
||||
<%--} else if (c.showtextst == '${Showtextst_TRUE}') {--%>
|
||||
<%-- showText = "<div id='" + c.id + "' name='" + c.id + "' class='form-control' type='text' style='width: 100%;height: 100%;resize: none;' >" + c.showText + "</div>";--%>
|
||||
<%--}--%>
|
||||
var fontsize = "";
|
||||
if (c.fontsize != '' && c.fontsize != null) {
|
||||
fontsize = c.fontsize;
|
||||
} else {
|
||||
fontsize = "16px";
|
||||
}
|
||||
var fontweight = "";
|
||||
if (c.fontweight != '' && c.fontweight != null) {
|
||||
fontweight = c.fontweight;
|
||||
} else {
|
||||
fontweight = "400";
|
||||
}
|
||||
var fontcolor = "";
|
||||
if (c.fontcolor != '' && c.fontcolor != null) {
|
||||
fontcolor = c.fontcolor;
|
||||
} else {
|
||||
fontcolor = "#000000";
|
||||
}
|
||||
var backgroundcolor = "";
|
||||
if (c.backgroundcolor != '' && c.backgroundcolor != null) {
|
||||
backgroundcolor = c.backgroundcolor;
|
||||
} else {
|
||||
backgroundcolor = "#FFFFFF";
|
||||
}
|
||||
var textalign = "";
|
||||
if (c.textalign != '' && c.textalign != null) {
|
||||
textalign = c.textalign;
|
||||
} else {
|
||||
textalign = "center";
|
||||
}
|
||||
|
||||
var showText = "";
|
||||
let showTextContent = "无";
|
||||
if (c.showText != '') {
|
||||
showTextContent = c.showText;
|
||||
}
|
||||
if (c.showtextst == '${Showtextst_FALSE}') {
|
||||
showText = showTextContent;c
|
||||
} else if (c.showtextst == '${Showtextst_TRUE}') {
|
||||
showText = "<div id='" + c.id + "' name='" + c.id + "' class='form-control' type='text' style='width: 100%;height: 100%;resize: none;background-color: #FFFFFF;border:0px;" +
|
||||
"font-size: " + fontsize + ";font-weight: " + fontweight + ";color: " + fontcolor + ";background-color: " + backgroundcolor + ";text-align: " + textalign + ";' readonly>" + showTextContent + "</div>";
|
||||
}
|
||||
|
||||
html += "<td rowspan=" + c.rows + " colspan=" + c.columns + " style='border:1px solid #d2d6de;width:" + width + ";height:" + height + ";padding:2px;" +
|
||||
"font-size: " + fontsize + ";font-weight: " + fontweight + ";color: " + fontcolor + ";background-color: " + backgroundcolor + ";text-align: " + textalign + ";'>" + showText + "</td>";
|
||||
}
|
||||
}
|
||||
html += "</tr>"
|
||||
}
|
||||
html += "</table>"
|
||||
$('#lastContent').html(html);
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function editUser(st) {
|
||||
let time = "";
|
||||
if (st == '0') {
|
||||
time = '${scheduling.succeeddt}'.substring(0, 16);
|
||||
} else if (st == '1') {
|
||||
time = '${scheduling.handoverdt}'.substring(0, 16);
|
||||
}
|
||||
$.post(ext.contextPath + '/work/scheduling/editChangeShiftsUser.do', {
|
||||
schedulingId: '${scheduling.id}',
|
||||
type: st,
|
||||
time: time
|
||||
},
|
||||
function (data) {
|
||||
$("#userEditDiv").html(data);
|
||||
openModal('user4SelectModal');
|
||||
});
|
||||
}
|
||||
|
||||
function doJB(st) {
|
||||
$.post(ext.contextPath + '/work/scheduling/changeStatus.do', {
|
||||
id: '${scheduling.id}',
|
||||
st: st
|
||||
}, function (data) {
|
||||
// console.log(data)
|
||||
if (data.res == '0') {
|
||||
showAlert('d', '修改失败', 'viewAlertDiv');
|
||||
} else {
|
||||
closeModal("schedulingEditModal");
|
||||
doReloadCalendar();
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="schedulingEditModal">
|
||||
<div class="modal-dialog" style="width: 80%;">
|
||||
<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="viewAlertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">班次</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="groupManage">${scheduling._groupTimename}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${not empty scheduling.patroltypeName}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">巡检类型</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="schedulingtype">${scheduling.patroltypeName}</label>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">巡检模式</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="patrolmode">${scheduling.patrolmodeName}</label>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">开始时间</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="stdt">${fn:substring(scheduling.stdt,0,16)}</label>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">结束时间</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="eddt">${fn:substring(scheduling.eddt,0,16)}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">接班人</label>
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="succeeduser">${scheduling._succeeduser}</label>
|
||||
</div>
|
||||
<security:authorize buttonUrl="scheduling/succeeduserEdit.do">
|
||||
<div class="col-sm-1">
|
||||
<button type="button" type="button" class="btn btn-default pull-left"
|
||||
onclick="editUser('0');">修改
|
||||
</button>
|
||||
</div>
|
||||
</security:authorize>
|
||||
|
||||
<label class="col-sm-2 control-label">接班时间</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="succeeddt">${fn:substring(scheduling.succeeddt,0,16)}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">接班备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" type="text" style="height: 60px;resize: none;"
|
||||
id="succeedremark"
|
||||
name="succeedremark" readonly>${scheduling.succeedremark}</textarea>
|
||||
<%-- <label class="control-label" style="font-weight: unset;height: 60px;"--%>
|
||||
<%-- id="succeedremark">${scheduling.succeedremark}</label>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">交班人</label>
|
||||
<div class="col-sm-3">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="handoveruser">${scheduling._handoveruser}</label>
|
||||
</div>
|
||||
<security:authorize buttonUrl="scheduling/handoveruserEdit.do">
|
||||
<div class="col-sm-1">
|
||||
<button type="button" type="button" class="btn btn-default pull-left"
|
||||
onclick="editUser('1');">修改
|
||||
</button>
|
||||
</div>
|
||||
</security:authorize>
|
||||
|
||||
<label class="col-sm-2 control-label">交班时间</label>
|
||||
<div class="col-sm-4">
|
||||
<label class="control-label" style="font-weight: unset"
|
||||
id="handoverdt">${fn:substring(scheduling.handoverdt,0,16)}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">值班人员</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" type="text" style="height: 60px;resize: none;"
|
||||
id="_workpeopleName"
|
||||
name="_workpeopleName" readonly>${scheduling._workpeopleName}</textarea>
|
||||
<%-- <label class="control-label" style="font-weight: unset;height: 60px;"--%>
|
||||
<%-- id="_workpeopleName">${scheduling._workpeopleName}</label>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div id="lastContent" style="padding-bottom: 30px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
|
||||
<security:authorize buttonUrl="scheduling/succeeduserEdit.do">
|
||||
<button type="button" class="btn btn-default pull-right" onclick="doJB('1');">交班</button>
|
||||
<button type="button" class="btn btn-default pull-right" onclick="doJB('0');">接班</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user