256 lines
12 KiB
Plaintext
256 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_Cal", RptSpSet.RptSpSet_Type_Cal); %>
|
|||
|
|
|
|||
|
|
<%@page import="com.sipai.entity.report.RptInfoSet" %>
|
|||
|
|
<% request.setAttribute("RptType_Day", RptInfoSet.RptType_Day); %>
|
|||
|
|
<% request.setAttribute("RptType_Week", RptInfoSet.RptType_Week); %>
|
|||
|
|
<% request.setAttribute("RptType_Tenday", RptInfoSet.RptType_Tenday); %>
|
|||
|
|
<% request.setAttribute("RptType_Month", RptInfoSet.RptType_Month); %>
|
|||
|
|
<% request.setAttribute("RptType_Quarterly", RptInfoSet.RptType_Quarterly); %>
|
|||
|
|
<% request.setAttribute("RptType_HalfYear", RptInfoSet.RptType_HalfYear); %>
|
|||
|
|
<% request.setAttribute("RptType_Year", RptInfoSet.RptType_Year); %>
|
|||
|
|
|
|||
|
|
<style type="text/css">
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
|
|||
|
|
function dosaveSp() {
|
|||
|
|
//提交前移除只读属性,否则无法传值
|
|||
|
|
$("#spname").removeAttr("disabled");
|
|||
|
|
$("#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不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
writermode: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '请选择插入方式'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
intv: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '时间间隔不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//posx
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
//插入方式
|
|||
|
|
$("#writermode").select2({minimumResultsForSearch: 10});
|
|||
|
|
//spname
|
|||
|
|
//$("#spname").select2({minimumResultsForSearch: 10});
|
|||
|
|
$('#spname').select2({minimumResultsForSearch: 10}).val('${param.rpttype}').trigger('change');
|
|||
|
|
|
|||
|
|
//项目类型下拉数据
|
|||
|
|
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('').trigger("change");
|
|||
|
|
selelct_.on('change', function (e) {
|
|||
|
|
$('#sheet').val(e.target.value);
|
|||
|
|
})
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
</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" value="${RptSpSet_Type_Cal}">
|
|||
|
|
|
|||
|
|
<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;"
|
|||
|
|
disabled="disabled">
|
|||
|
|
<option value="" selected="selected">请选择</option>
|
|||
|
|
<option value="${RptType_Day}" selected>日报</option>
|
|||
|
|
<option value="${RptType_Week}">周报</option>
|
|||
|
|
<option value="${RptType_Tenday}">旬报</option>
|
|||
|
|
<option value="${RptType_Month}">月报</option>
|
|||
|
|
<option value="${RptType_Quarterly}">季报</option>
|
|||
|
|
<option value="${RptType_HalfYear}">半年报</option>
|
|||
|
|
<option value="${RptType_Year}">年报</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=""/>
|
|||
|
|
</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="格式为ABC等"
|
|||
|
|
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="格式为123等"
|
|||
|
|
value="${rptSpSet.posy}">
|
|||
|
|
</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="rownum" name="rownum" placeholder="行数"
|
|||
|
|
value="0">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">列数</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="colnum" name="colnum" placeholder="列数"
|
|||
|
|
value="0">
|
|||
|
|
</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="writermode" name="writermode"
|
|||
|
|
style="width: 170px;">
|
|||
|
|
<option value="${Horizontal}" selected="selected">横向</option>
|
|||
|
|
<option value="${Vertical}">纵向</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*时间间隔(小时)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="intv" name="intv" placeholder="时间间隔" value="1">
|
|||
|
|
</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="starthour" name="starthour" placeholder="日开始时间"
|
|||
|
|
value="0">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*结束时间</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="endhour" name="endhour" placeholder="日结束时间"
|
|||
|
|
value="-">
|
|||
|
|
</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="rptsdt" name="rptsdt" placeholder="开始日期"
|
|||
|
|
value="1">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">*结束日期</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="rptedt" name="rptedt" placeholder="结束日期"
|
|||
|
|
value="-">
|
|||
|
|
</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="active" name="active"
|
|||
|
|
style="width: 170px; border-radius: 4px; border-color: #B5B5B5;">
|
|||
|
|
<option value="启用" selected="selected">启用</option>
|
|||
|
|
<option value="禁用">禁用</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>
|