279 lines
12 KiB
Plaintext
279 lines
12 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|||
|
|
<%@page import="com.sipai.entity.report.RptSpSet" %>
|
|||
|
|
<% request.setAttribute("Horizontal", RptSpSet.RptSpSet_Writermode_Horizontal); %>
|
|||
|
|
<% request.setAttribute("Vertical", RptSpSet.RptSpSet_Writermode_Vertical); %>
|
|||
|
|
<% request.setAttribute("RptSpSet_Type_Insuser", RptSpSet.RptSpSet_Type_Insuser); %>
|
|||
|
|
<% request.setAttribute("RptSpSet_Type_Confirm", RptSpSet.RptSpSet_Type_Confirm); %>
|
|||
|
|
<% request.setAttribute("RptSpSet_Type_Checkuser", RptSpSet.RptSpSet_Type_Checkuser); %>
|
|||
|
|
<% request.setAttribute("RptSpSet_Type_Rptdt", RptSpSet.RptSpSet_Type_Rptdt); %>
|
|||
|
|
<% request.setAttribute("RptSpSet_Type_BanZhang", RptSpSet.RptSpSet_Type_BanZhang); %>
|
|||
|
|
<% request.setAttribute("RptSpSet_Type_ZuYuan", RptSpSet.RptSpSet_Type_ZuYuan); %>
|
|||
|
|
|
|||
|
|
<style type="text/css">
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
function dosaveSp() {
|
|||
|
|
$('#type').val($('#spname').val());
|
|||
|
|
$("#subFormSp").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subFormSp").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/report/rptSpSet/dosave.do", $("#subFormSp").serialize(), function (data) {
|
|||
|
|
if (data.res == 1) {
|
|||
|
|
closeModal('subModalSp')
|
|||
|
|
$("#tableSp").bootstrapTable('refresh');
|
|||
|
|
} else if (data.res == 0) {
|
|||
|
|
showAlert('d', '保存失败');
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', data.res);
|
|||
|
|
}
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subFormSp").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
spname: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '请选择单元格内容'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sheetName: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '请选择sheet'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
posx: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '起始格X不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
posy: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '起始格y不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
/*,
|
|||
|
|
grouptypeId: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '请选择插入方式'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
intv: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '时间间隔不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}*/
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
//sheet名下拉数据
|
|||
|
|
var pid = '${param.pid}';
|
|||
|
|
var selectType = $("#sheetName").select2({minimumResultsForSearch: 10});
|
|||
|
|
$.post(ext.contextPath + "/report/rptSpSet/getSheet.do", {id: pid}, function (data) {
|
|||
|
|
$("#sheetName").empty();
|
|||
|
|
var selelct_ = $("#sheetName").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('${rptSpSet.sheet}').trigger("change");
|
|||
|
|
selelct_.on('change', function (e) {
|
|||
|
|
$('#sheet').val(e.target.value);
|
|||
|
|
})
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
//班组下拉
|
|||
|
|
$.post(ext.contextPath + "/work/groupType/getGroupTypeTree.do", {}, 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('${rptSpSet.grouptypeId}').trigger("change");
|
|||
|
|
selelct_.on('change', function (e) {
|
|||
|
|
$('#grouptypeId').val(e.target.value);
|
|||
|
|
|
|||
|
|
//将班组置空
|
|||
|
|
$('#grouptimeName').html('');
|
|||
|
|
$('#grouptimeId').val('');
|
|||
|
|
bz();
|
|||
|
|
})
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
function bz() {
|
|||
|
|
//班组下拉
|
|||
|
|
$.post(ext.contextPath + "/work/groupTime/getlistForSelect2.do", {
|
|||
|
|
unitId: unitId,
|
|||
|
|
grouptype: $("#grouptypeId").val()
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#grouptimeName").empty();
|
|||
|
|
var selelct_ = $("#grouptimeName").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('${rptSpSet.grouptimeId}').trigger("change");
|
|||
|
|
selelct_.on('change', function (e) {
|
|||
|
|
$('#grouptimeId').val(e.target.value);
|
|||
|
|
})
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bz();
|
|||
|
|
|
|||
|
|
$('#spname').select2({minimumResultsForSearch: 10}).val('${rptSpSet.spname}').trigger('change');
|
|||
|
|
$('#intv').select2({minimumResultsForSearch: 10}).val('${rptSpSet.intv}').trigger('change');
|
|||
|
|
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModalSp">
|
|||
|
|
<div class="modal-dialog">
|
|||
|
|
<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强制为subFormSp -->
|
|||
|
|
<form class="form-horizontal" id="subFormSp" autocomplete="off">
|
|||
|
|
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input type="hidden" class="form-control" name="id" value="${uuId2}">
|
|||
|
|
<input type="hidden" class="form-control" name="pid" value="${param.pid}">
|
|||
|
|
<input type="hidden" class="form-control" name="unitId" value="${param.unitId}">
|
|||
|
|
<%--报表类型--%>
|
|||
|
|
<input type="hidden" class="form-control" name="type" id="type" value="">
|
|||
|
|
|
|||
|
|
<input type="hidden" class="form-control" name="rownum" id="rownum" value="0">
|
|||
|
|
<input type="hidden" class="form-control" name="colnum" id="colnum" value="0">
|
|||
|
|
<input type="hidden" class="form-control" name="starthour" id="starthour" value="0">
|
|||
|
|
<input type="hidden" class="form-control" name="endhour" id="endhour" value="0">
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*单元格内容</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select class="form-control select2" id="spname" name="spname" style="width: 170px;">
|
|||
|
|
<option value="" selected="selected">请选择</option>
|
|||
|
|
<option value="${RptSpSet_Type_Rptdt}">日期</option>
|
|||
|
|
<option value="${RptSpSet_Type_Confirm}">接班人</option>
|
|||
|
|
<option value="${RptSpSet_Type_BanZhang}">值班班长</option>
|
|||
|
|
<option value="${RptSpSet_Type_ZuYuan}">值班组员</option>
|
|||
|
|
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*Sheet名</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select class="form-control select2" id="sheetName" name="sheetName"
|
|||
|
|
style="width: 170px;"></select>
|
|||
|
|
<input type="hidden" class="form-control" id="sheet" name="sheet"
|
|||
|
|
value="${rptSpSet.sheet}"/>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*起始格X</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="posx" name="posx" placeholder="单元格X值"
|
|||
|
|
value="${rptSpSet.posx}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*起始格Y</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="posy" name="posy" placeholder="单元格Y值"
|
|||
|
|
value="${rptSpSet.posy}">
|
|||
|
|
</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: 170px;"></select>
|
|||
|
|
<input type="hidden" class="form-control" id="grouptypeId" name="grouptypeId"
|
|||
|
|
value="${rptSpSet.grouptypeId}"/>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">班次类型</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select class="form-control select2" id="grouptimeName" name="grouptimeName"
|
|||
|
|
style="width: 170px;"></select>
|
|||
|
|
<input type="hidden" class="form-control" id="grouptimeId" name="grouptimeId"
|
|||
|
|
value="${rptSpSet.grouptimeId}"/>
|
|||
|
|
</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="intv" name="intv" style="width: 170px;">
|
|||
|
|
<option value="" selected="selected">请选择</option>
|
|||
|
|
<option value="-1">前一天</option>
|
|||
|
|
<option value="0">当天</option>
|
|||
|
|
<option value="1">后一天</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</form>
|
|||
|
|
</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="dosaveSp()">保存</button>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|