230 lines
9.1 KiB
Plaintext
230 lines
9.1 KiB
Plaintext
|
|
<!DOCTYPE html
|
|||
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|||
|
|
<%@ 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" %>
|
|||
|
|
<style type="text/css">
|
|||
|
|
.select2-container .select2-selection--single {
|
|||
|
|
height: 34px;
|
|||
|
|
line-height: 34px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-selection__arrow {
|
|||
|
|
margin-top: 3px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.foot {
|
|||
|
|
display: flex;
|
|||
|
|
padding-left: 50px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/*.layout{*/
|
|||
|
|
/* display: flex;*/
|
|||
|
|
/* padding-left: 15px;*/
|
|||
|
|
/*}*/
|
|||
|
|
.form-horizontal {
|
|||
|
|
padding-top: 20px;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
.right {
|
|||
|
|
margin-left: 50px;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.sampleAmountView {
|
|||
|
|
color: black;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
$(function () {
|
|||
|
|
var Amount = '${bean.residualSampleAmount}' // 2;
|
|||
|
|
var statusShow = '${bean.sampleState}' == 0 ? 'g' : 'ml';
|
|||
|
|
// $('#AmountShow').innerHTML = Amount + statusShow;
|
|||
|
|
document.getElementById("AmountShow").innerHTML = Amount + statusShow;
|
|||
|
|
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
function updateSaveFun() {
|
|||
|
|
$("#editForm").data("bootstrapValidator").updateStatus("auditUserName","NOT_VALIDATED", null).validateField("auditUserName");
|
|||
|
|
$("#editForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
var formData = new FormData($("#editForm")[0]);
|
|||
|
|
$.ajax({
|
|||
|
|
url: ext.contextPath + "/whp/sample/ResidualSampleDispose/pass.do",
|
|||
|
|
type: 'POST',
|
|||
|
|
data: formData,
|
|||
|
|
async: false,
|
|||
|
|
cache: false,
|
|||
|
|
contentType: false,
|
|||
|
|
processData: false,
|
|||
|
|
dataType: 'json',
|
|||
|
|
success: function (data) {
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', '保存失败!' + data.msg);
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (data) {
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function goBackFun() {
|
|||
|
|
$("#editForm").data("bootstrapValidator").updateStatus("auditUserName","NOT_VALIDATED", null).validateField("auditUserName");
|
|||
|
|
$("#editForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
var formData = new FormData($("#editForm")[0]);
|
|||
|
|
$.ajax({
|
|||
|
|
url: ext.contextPath + "/whp/sample/ResidualSampleDispose/notPass.do",
|
|||
|
|
type: 'POST',
|
|||
|
|
data: formData,
|
|||
|
|
async: false,
|
|||
|
|
cache: false,
|
|||
|
|
contentType: false,
|
|||
|
|
processData: false,
|
|||
|
|
dataType: 'json',
|
|||
|
|
success: function (data) {
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
$("#table").bootstrapTable('refresh');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', '保存失败!' + data.msg);
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (data) {
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// 登记人
|
|||
|
|
function selectdutyUser() {
|
|||
|
|
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
|||
|
|
{
|
|||
|
|
formId: "editForm",
|
|||
|
|
hiddenId: "auditUserId",
|
|||
|
|
textId: "auditUserName"
|
|||
|
|
},
|
|||
|
|
function (data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal('user4SelectModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
$("#editForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
auditUserName: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '审核人不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModal">
|
|||
|
|
<div class="modal-dialog " style="width: 65%">
|
|||
|
|
<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">
|
|||
|
|
<div class="row">
|
|||
|
|
<div class="col-md-12 col-xs-13">
|
|||
|
|
<!-- 新增界面formid强制为editForm -->
|
|||
|
|
<form class="form-horizontal" id="editForm" enctype="multipart/form-data">
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<%-- <input type="hidden" name="id" value="${user.id }" />--%>
|
|||
|
|
<!-- 界面提醒div强制id为alertdiv -->
|
|||
|
|
|
|||
|
|
<input type="hidden" name="id" id="id" class="form-control" value="${bean.id}">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label"> 采样单编号:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.planCode}</p>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">* 样品编号:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.sampleCode}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">* 采样类型:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.sampleTypeName}</p>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">* 剩余数量:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<%-- <p class="form-control-static" id="AmountShow">${bean.residualSampleAmount}</p>--%>
|
|||
|
|
<p class="form-control-static" id="AmountShow"></p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">* 登记人:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.recordUserName}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">* 处置方式:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.disposeTypeName}</p>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">* 处置时间:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.disposeTime.substring(0,10)}</p>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">* 审核人:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" id="auditUserName" name="auditUserName" class="form-control"
|
|||
|
|
placeholder="请选择.." readonly onclick="selectdutyUser()"
|
|||
|
|
value="${bean.recordUserName}"/>
|
|||
|
|
<input type="hidden" id="auditUserId" name="auditUserId" class="form-control"
|
|||
|
|
placeholder="请选择.." value="${bean.auditUserId}"/>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</form>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default " data-dismiss="modal">关闭
|
|||
|
|
</button>
|
|||
|
|
<button type="button" class="btn btn-default " style="margin-left: 10px" onclick="goBackFun()">回退
|
|||
|
|
</button>
|
|||
|
|
<button type="button" class="btn btn-primary " style="margin-left: 10px"
|
|||
|
|
onclick="updateSaveFun()">通过
|
|||
|
|
</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|