238 lines
9.9 KiB
Plaintext
238 lines
9.9 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;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-container--default .select2-selection--single {
|
|||
|
|
border: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-container--default .select2-selection--single, .select2-selection .select2-selection--single {
|
|||
|
|
border: none;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
|||
|
|
border: none;
|
|||
|
|
border-style: unset
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.select2-container--default.select2-container--disabled .select2-selection--single {
|
|||
|
|
background-color: #FFFFFF;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.right {
|
|||
|
|
margin-left: 50px;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var initTableData2 = function () {
|
|||
|
|
$("#Plantable").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/whp/test/WhpSamplingPlanTaskTestItem/getList.do', // 获取表格数据的url
|
|||
|
|
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 10, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
|||
|
|
return {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order, // 排序规则
|
|||
|
|
testConfirmId: '${bean.id}'
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
//detailView: true,//父子表
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
field: 'sampleCode', // 返回json数据中的name
|
|||
|
|
title: '样品编号', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'sampleAddress', // 返回json数据中的name
|
|||
|
|
title: '地点', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle' // 上下居中
|
|||
|
|
}, {
|
|||
|
|
field: 'sampingDate', // 返回json数据中的name
|
|||
|
|
title: '采样日期', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
formatter:function(value){
|
|||
|
|
return value.substring(0,10);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}, {
|
|||
|
|
field: 'sampleState', // 返回json数据中的name
|
|||
|
|
title: '样品状态', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
}, {
|
|||
|
|
field: 'sampleAppearance', // 返回json数据中的name
|
|||
|
|
title: '样品外观', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
},{
|
|||
|
|
field: 'sampleSupernatant', // 返回json数据中的name
|
|||
|
|
title: '样品上清液', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
}, {
|
|||
|
|
field: 'sampleNature', // 返回json数据中的name
|
|||
|
|
title: '样品性质', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
},{
|
|||
|
|
field: 'sampleAmount', // 返回json数据中的name
|
|||
|
|
title: '样品数量', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
},{
|
|||
|
|
field: 'unit', // 返回json数据中的name
|
|||
|
|
title: '单位', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle'
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onLoadSuccess: function () { //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("Plantable");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
$(function () {
|
|||
|
|
initTableData2()
|
|||
|
|
console.log('${bean.id}','8888888888888')
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
function SavedataFun() {
|
|||
|
|
// console.log($("#addForm").serialize());
|
|||
|
|
$("#addForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#addForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
var formData = new FormData($("#addForm")[0]);
|
|||
|
|
$.ajax({
|
|||
|
|
url: ext.contextPath + "/whp/test/WhpSamplingPlanTaskTestConfirm/accept.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');
|
|||
|
|
$("#table2").bootstrapTable('refresh');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', '保存失败!' + data.msg);
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (data) {
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</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="addForm" 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.sampleTypeName}</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.samplingTaskNumber}</p>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">* 要求报告日期:</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<p class="form-control-static">${bean.reportDate.substring(0,10)}</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.testItemName}</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
<table id="Plantable"></table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<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="SavedataFun()">接单
|
|||
|
|
</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|