Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/data/dataCurve_MPointEdit2.jsp
2026-01-16 14:13:44 +08:00

106 lines
4.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" 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" %>
<script type="text/javascript">
var selectMPint = function (pid) {
$.post(ext.contextPath + '/work/mpoint/showlistForSelect.do', {
formId: 'sub_MP_P_Edit_Form',
hiddenId: 'mpid',
codeId: 'mpcode',
unitId: 'unitId',
textId: 'txt',
valueId: 'value',
mpid: $("#mpid").val()
}, function (data) {
$("#mpSubDiv").html(data);
openModal('mpSubModal');
});
};
function doupdate() {
$("#sub_MP_P_Edit_Form").bootstrapValidator('validate');//提交验证
if ($("#sub_MP_P_Edit_Form").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/data/updateMPoint.do", $("#sub_MP_P_Edit_Form").serialize(), function (result) {
// var data= $.parseJSON(result);
if (result.code == 1) {
closeModal('subModal_CurveMp');
// $("#box").show();
// initProgrammeTreePersonView();
$("#table_Detail").bootstrapTable('refresh');
initProgrammeTreeView();
// $("#table").bootstrapTable('refresh');
} else {
showAlert('d', result.res);
}
}, 'json');
}
}
$("#sub_MP_P_Edit_Form").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
mpid: {
validators: {
notEmpty: {
message: '测量点不能为空'
}
}
},
}
});
</script>
<div class="modal fade" id="subModal_CurveMp">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">编辑测量点</h4>
</div>
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="sub_MP_P_Edit_Form">
<input type="hidden" class="form-control" id="id" name="id" value="${curveMpoint.id}">
<div class="form-group">
<label class="col-sm-3 control-label">测量点编号</label>
<div class="col-sm-7">
<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="mpid" name="mpointId"
onclick="selectMPint('${param.pid}')" placeholder="单击选择" readonly
value="${curveMpoint.mpointId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">文本内容</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="txt" value="${mpoint.parmname}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">顺序</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="morder" name="morder"
value="${curveMpoint.morder}">
</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="doupdate()" id="btn_save">保存</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>