Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/achievement/acceptanceModel_TextEdit.jsp

116 lines
4.3 KiB
Plaintext
Raw Permalink Normal View History

2026-01-16 14:13:44 +08:00
<%@ 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">
function dosave() {
$("#subForm1").bootstrapValidator('validate');//提交验证
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/achievement/acceptanceModelText/doupdate.do", $("#subForm1").serialize(), function(data) {
if (data.code == 1) {
closeModal('subModal');
$("#texttable").bootstrapTable('refresh');
}else if(data.code == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.msg);
}
},'json');
}
}
$("#subForm1").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
name: {
validators: {
notEmpty: {
message: '文本名称不能为空'
}
}
},
sheetName: {
validators: {
notEmpty: {
message: '表格名称不能为空'
}
}
},
posX: {
validators: {
notEmpty: {
message: '位置X不能为空'
}
}
},
posY: {
validators: {
notEmpty: {
message: '位置Y不能为空'
}
}
}
}
});
</script>
<div class="modal fade" id="subModal">
<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="subForm1">
<input type="hidden" class="form-control" id="id" name="id" value="${acceptanceModelText.id}">
<div class="form-group">
<label class="col-sm-2 control-label">文本名称</label>
<div class="col-sm-10">
<textarea id="name" name ="name" style="width:100%;height:66px;" wrap="soft" >${acceptanceModelText.name}</textarea>
</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="sheetName" name ="sheetName" value="${acceptanceModelText.sheetName}">
</div>
<label class="col-sm-2 control-label">顺序</label>
<div class="col-sm-4">
<input type="number" class="form-control" id="morder" name ="morder" value="${acceptanceModelText.morder}">
</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" value="${acceptanceModelText.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" value="${acceptanceModelText.posY}">
</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()" id="btn_save">保存</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>