1 line
8.4 KiB
Plaintext
1 line
8.4 KiB
Plaintext
<%@ page import="java.text.DateFormat" %>
|
||
<!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;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
|
||
//转移日期
|
||
$("#ouputDate").datetimepicker({
|
||
// startDate: date,
|
||
language: 'zh-CN',
|
||
format: 'yyyy-mm-dd hh:ii:ss',
|
||
startView: "month", //初始化视图是‘年’
|
||
minView: 1,
|
||
maxView: "year",
|
||
autoclose: true
|
||
// todayBtn: "linked"
|
||
});
|
||
|
||
|
||
});
|
||
|
||
|
||
//保存
|
||
function updateBatchSaveFun() {
|
||
// $("#editForm").data("bootstrapValidator").updateStatus("transportUserName", "NOT_VALIDATED", null).validateField("transportUserName");
|
||
//$("#editForm").data("bootstrapValidator").updateStatus("repositionUserName", "NOT_VALIDATED", null).validateField("repositionUserName");
|
||
$("#editForm").data("bootstrapValidator").updateStatus("outputUserName", "NOT_VALIDATED", null).validateField("outputUserName");
|
||
$("#editForm").data("bootstrapValidator").updateStatus("outputRepositionUserName", "NOT_VALIDATED", null).validateField("outputRepositionUserName");
|
||
$("#editForm").bootstrapValidator('validate');//提交验证
|
||
if ($("#editForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
var formData = new FormData($("#editForm")[0]);
|
||
$.ajax({
|
||
url: ext.contextPath + '/whp/liquidWasteDispose/WhpLiquidWasteDispose/updateBatchDispose.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('subBatchModal');
|
||
} else {
|
||
showAlert('d', '保存失败!' + data.msg);
|
||
}
|
||
},
|
||
error: function (data) {
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
$("#editForm").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
number: {validators: {notEmpty: {message: '数量不能为空'}}},
|
||
outputUserName: {validators: {notEmpty: {message: '废物转移经办人名称不能为空'}}},
|
||
ouputDate: {trigger: "change", validators: {notEmpty: {message: '转移日期不能为空'}}},
|
||
disposeNumber: {validators: {notEmpty: {message: '转移数量不能为空'}}},
|
||
outputLocation: {validators: {notEmpty: {message: '废物去向不能为空'}}},
|
||
outputRepositionUserName: {validators: {notEmpty: {message: '废物贮存经办人名称(转移目标)不能为空'}}},
|
||
}
|
||
});
|
||
|
||
//出库库贮藏人
|
||
function selectOutputUser2() {
|
||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||
{formId: "editForm", hiddenId: "outputRepositionUserId", textId: "outputRepositionUserName"},
|
||
function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal('user4SelectModal');
|
||
});
|
||
};
|
||
|
||
//废物运送经办人名称
|
||
function selectTransportUser() {
|
||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||
{formId: "editForm", hiddenId: "transportUserId", textId: "transportUserName"},
|
||
function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal('user4SelectModal');
|
||
});
|
||
};
|
||
|
||
//废物贮存经办人名称
|
||
function selectTransportUserChu() {
|
||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||
{formId: "editForm", hiddenId: "repositionUserId", textId: "repositionUserName"},
|
||
function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal('user4SelectModal');
|
||
});
|
||
};
|
||
|
||
//废物转移经办人名称
|
||
function selectTransportUserOut() {
|
||
$.post(ext.contextPath + '/user/userForOneSelect.do',
|
||
{formId: "editForm", hiddenId: "outputUserId", textId: "outputUserName"},
|
||
function (data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal('user4SelectModal');
|
||
});
|
||
};
|
||
|
||
</script>
|
||
<div class="modal fade" id="subBatchModal">
|
||
<div class="modal-dialog modal-lg" style="width: 1100px;">
|
||
<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="ids" id="ids" class="form-control" value="${ids}">
|
||
|
||
<div class="form-group">
|
||
<div>
|
||
<label class="col-sm-2 control-label">* 目前数量:</label>
|
||
<div class="col-sm-4"><input type="text" name="" id="number"
|
||
class="form-control"
|
||
value="${countnum}"></div>
|
||
</div>
|
||
<div>
|
||
<label class="col-sm-2 control-label">* 废物转移经办人名称:</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" name="outputUserName" id="outputUserName"
|
||
class="form-control" value=""
|
||
onclick="selectTransportUserOut()">
|
||
<input type="hidden" name="outputUserId" id="outputUserId"
|
||
class="form-control" value=""/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<div>
|
||
<label class="col-sm-2 control-label">* 转移日期:</label>
|
||
<div class="col-sm-4">
|
||
<div class="input-group date">
|
||
<div class="input-group-addon">
|
||
<i class="fa fa-calendar"></i>
|
||
</div>
|
||
<input type="text" class="form-control" id="ouputDate" name="ouputDate"
|
||
value="" placeholder="请选择.."/>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<div>
|
||
<label class="col-sm-2 control-label">* 转移数量:</label>
|
||
<div class="col-sm-4"><input type="number" name="disposeNumber" id="disposeNumber"
|
||
class="form-control" readonly
|
||
value="${countnum}"/></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<div>
|
||
<label class="col-sm-2 control-label">* 废物贮存经办人名称(转移目标):</label>
|
||
<div class="col-sm-4"><input type="text" name="outputRepositionUserName"
|
||
onclick="selectOutputUser2()"
|
||
id="outputRepositionUserName" class="form-control"
|
||
value=""></div>
|
||
<input type="hidden" name="outputRepositionUserId"
|
||
id="outputRepositionUserId" class="form-control"
|
||
value="">
|
||
</div>
|
||
<div>
|
||
<label class="col-sm-2 control-label">* 废物去向:</label>
|
||
<div class="col-sm-4"><input type="text" name="outputLocation" id="outputLocation"
|
||
class="form-control" value="">
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</form>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭
|
||
</button>
|
||
<button type="button" class="btn btn-primary " style="margin-left: 10px"
|
||
onclick="updateBatchSaveFun()">保存
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|
||
|
||
|
||
|
||
|