first commit
This commit is contained in:
139
WebRoot/jsp/app/appProductMonitorAdd.jsp
Normal file
139
WebRoot/jsp/app/appProductMonitorAdd.jsp
Normal file
@ -0,0 +1,139 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<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">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/app/appProductMonitor/dosave.do", $("#subForm").serialize(), function(result) {
|
||||
if (result.code == 1) {
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d',result.msg);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
|
||||
/* equipmentcardid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '厂内编号编号不能为空'
|
||||
},
|
||||
remote: {//ajax验证。server result:{"valid",true or false} 向服务发送当前input name值,获得一个json数据。例表示正确:{"valid",true}
|
||||
url: ext.contextPath + '/equipment/checkExist.do',//验证地址
|
||||
message: '编号已存在',//提示消息
|
||||
type: 'POST',//请求方式
|
||||
data: function(validator) {
|
||||
return {
|
||||
equipmentcardid: $('#equipmentcardid').val(),
|
||||
id : $('#id').val()
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
}, */
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
sname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '简称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
// var showUser4SelectsFun = function() {
|
||||
// var userIds= $("#inputuser").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"inputuser",textId:"auditMan",userIds:userIds} , function(data) {
|
||||
// $("#user4SelectDiv").html(data);
|
||||
// openModal("user4SelectModal");
|
||||
// });
|
||||
// };
|
||||
|
||||
$(function() {
|
||||
// $.post(ext.contextPath + "/report/rptDeptSet/getDateType4Select.do", {}, function(data) {
|
||||
// var selelct =$("#dateType").select2({
|
||||
// data: data,
|
||||
// placeholder:'请选择',//默认文字提示
|
||||
// allowClear: true,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据大于10个启用搜索框
|
||||
// formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
// });
|
||||
// $(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
// selelct.val('${rptDeptSet.dateType}').trigger("change");
|
||||
// },'json');
|
||||
$("#unitId").val(unitId);
|
||||
});
|
||||
</script>
|
||||
<div class="box box-primary" style="margin-bottom:0px;">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<div id="user4SelectDiv"></div>
|
||||
<form class="form-horizontal " id="subForm">
|
||||
<input id="id" name="id" type="hidden" value="${appProductMonitor.id}"/>
|
||||
<input id="unitId" name="unitId" type="hidden" value="${appProductMonitor.unitId}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu4SelectDiv"></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="name" name ="name" placeholder="名称" value="${appProductMonitor.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">简称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="sname" name ="sname" placeholder="简称" value="${appProductMonitor.sname}">
|
||||
</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="morder" name ="morder" placeholder="顺序" value="${appProductMonitor.morder}">
|
||||
</div>
|
||||
</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="auditMan" name ="auditMan" placeholder="点击选择" onclick="showUser4SelectsFun();" value="${auditMan}">
|
||||
<input id="inputuser" name="inputuser" type="hidden" value="${rptDeptSet.inputuser}" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user