first commit
This commit is contained in:
105
WebRoot/jsp/work/autoAlertAdd.jsp
Normal file
105
WebRoot/jsp/work/autoAlertAdd.jsp
Normal file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%@ page language="java" import="java.util.*" 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"%>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
$.post(ext.contextPath + '/work/autoAlert/save.do', $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('autoAlertAddModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
//水厂
|
||||
$.post(ext.contextPath + "/user/getBizsByUserId4Select.do", {}, function (data) {
|
||||
var select = $("#bizId").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
});
|
||||
select.on("change", function (e) {
|
||||
});
|
||||
select.val(companyId).trigger("change");
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' });
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="autoAlertAddModal">
|
||||
<div class="modal-dialog" style="height:500px;">
|
||||
<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">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="名称" />
|
||||
<input id="bizId" name="bizId" type="hidden" value="${param.companyId}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提醒内容</label>
|
||||
<div class="col-sm-10">
|
||||
<select id ="alertType" name="alertType" class="form-control select2">
|
||||
<option value='contract' selected="selected">合同到期</option>
|
||||
<option value='payment' >合同付款</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提醒时限(天)</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="alertDate" name="alertDate" style="width: 250px;"
|
||||
class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" class="form-control" id="describe" name="describe" placeholder="备注"
|
||||
row="15"></textarea>
|
||||
</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="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user