first commit
This commit is contained in:
133
WebRoot/jsp/efficiency/efficiencyStatisticsEdit.jsp
Normal file
133
WebRoot/jsp/efficiency/efficiencyStatisticsEdit.jsp
Normal file
@ -0,0 +1,133 @@
|
||||
<%@ 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">
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/efficiency/efficiencyStatistics/showMPoint4Select.do', {formId:'subForm',hiddenId:'mpointId',textId:'txt'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/efficiency/efficiencyStatistics/showEfficiencyStatistics4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
$.post(ext.contextPath + "/efficiency/efficiencyStatistics/doupdate.do", $("#subForm").serialize(), function(result) {
|
||||
var data= $.parseJSON(result);
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d',data.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function dodel() {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/efficiency/efficiencyStatistics/dodelete.do', $("#subForm").serialize(), function(result) {
|
||||
// var data= $.parseJSON(result);
|
||||
if(result.code==1){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d',result.msg);
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
});
|
||||
</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>
|
||||
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal " id="subForm">
|
||||
<input id="id" name="id" type="hidden" value="${efficiencyStatistics.id}"/>
|
||||
<input id="unitId" name="unitId" type="hidden" value="${efficiencyStatistics.unitId}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv1"></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="${efficiencyStatistics.name }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上级菜单</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="pname" name ="pname" placeholder="上级菜单" onclick="showMenu4SelectFun()" value="${pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${efficiencyStatistics.pid}"/>
|
||||
</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="morder" name ="morder" placeholder="顺序" value="${efficiencyStatistics.morder}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="hidden" class="form-control" style="cursor: pointer" id="unitId" name="unitId" value="${curveMpoint.unitId}" >
|
||||
<input type="hidden" class="form-control" style="cursor: pointer" id="mpcode" > -->
|
||||
<input type="text" class="form-control" id="mpointId" name ="mpointId" onclick="selectMPint()" placeholder="单击选择" readonly value="${efficiencyStatistics.mPoint.mpointcode}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="txt" value="${efficiencyStatistics.mPoint.parmname}" readonly>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user