231 lines
7.9 KiB
Plaintext
231 lines
7.9 KiB
Plaintext
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|||
|
|
|
|||
|
|
<%@page import="com.sipai.entity.process.LibraryRoutineWork"%>
|
|||
|
|
<% request.setAttribute("Frequency_Type_Day", LibraryRoutineWork.Frequency_Type_Day); %>
|
|||
|
|
<% request.setAttribute("Frequency_Type_Month", LibraryRoutineWork.Frequency_Type_Month); %>
|
|||
|
|
<% request.setAttribute("Frequency_Type_Year", LibraryRoutineWork.Frequency_Type_Year); %>
|
|||
|
|
<% request.setAttribute("Type_Run", LibraryRoutineWork.Type_Run); %>
|
|||
|
|
<% request.setAttribute("Type_Manage", LibraryRoutineWork.Type_Manage); %>
|
|||
|
|
|
|||
|
|
<!DOCTYPE html>
|
|||
|
|
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var doSearchSelect4L = function () {
|
|||
|
|
$("#table_library").bootstrapTable('refresh');
|
|||
|
|
};
|
|||
|
|
function doSelect() {
|
|||
|
|
var checkedItems = $("#table_library").bootstrapTable('getSelections');
|
|||
|
|
var datas = "";
|
|||
|
|
$.each(checkedItems, function (index, item) {
|
|||
|
|
datas += item.id + ",";
|
|||
|
|
});
|
|||
|
|
if (datas == "") {
|
|||
|
|
showAlert('d', '请先选择记录', 'mainAlertdiv2');
|
|||
|
|
} else {
|
|||
|
|
swal({
|
|||
|
|
text: "确定导入该项指标?",
|
|||
|
|
dangerMode: true,
|
|||
|
|
buttons: {
|
|||
|
|
cancel: {
|
|||
|
|
text: "取消",
|
|||
|
|
value: null,
|
|||
|
|
visible: true,
|
|||
|
|
className: "btn btn-default btn-sm",
|
|||
|
|
closeModal: true,
|
|||
|
|
},
|
|||
|
|
confirm: {
|
|||
|
|
text: "确定",
|
|||
|
|
value: true,
|
|||
|
|
visible: true,
|
|||
|
|
className: "btn btn-danger btn-sm",
|
|||
|
|
closeModal: true
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
.then(function (willDelete) {
|
|||
|
|
if (willDelete) {
|
|||
|
|
$.post(ext.contextPath + '/process/waterTestDetail/dosave4library.do', { libraryIds: datas, unitId: unitId, jobId: '${param.jobId}' }, function (data) {
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
$("#table_detail").bootstrapTable('refresh');
|
|||
|
|
$("#table_contentFile").bootstrapTable('refresh');
|
|||
|
|
closeModal("libraryModal");
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', '生成失败', 'mainAlertdiv2');
|
|||
|
|
}
|
|||
|
|
}, 'json');
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// $('#${param.formId} #${param.hiddenId}').val(row.id);
|
|||
|
|
// $('#${param.formId} #${param.text1}').val(row.workCode);
|
|||
|
|
// $('#${param.formId} #${param.text2}').val(row.workName);
|
|||
|
|
// closeModal("librarySelectModal");
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function queryParams(params) {
|
|||
|
|
var temp = {
|
|||
|
|
rows: params.limit, // 每页要显示的数据条数
|
|||
|
|
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
|||
|
|
sort: params.sort, // 要排序的字段
|
|||
|
|
order: params.order,
|
|||
|
|
unitId: unitId,
|
|||
|
|
search_name: $('#search_name').val()
|
|||
|
|
};
|
|||
|
|
return temp;
|
|||
|
|
}
|
|||
|
|
$(function () {
|
|||
|
|
$("#search_name").keyup(function () {
|
|||
|
|
if (event.keyCode == 13) {
|
|||
|
|
event.preventDefault();
|
|||
|
|
//回车执行查询
|
|||
|
|
doSearchSelect4L();
|
|||
|
|
event.stopPropagation();
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
$("#table_library").bootstrapTable({ // 对应table标签的id
|
|||
|
|
url: ext.contextPath + '/process/libraryWaterTest/getList.do', // 获取表格数据的url
|
|||
|
|
striped: true, //表格显示条纹,默认为false
|
|||
|
|
pagination: true, // 在表格底部显示分页组件,默认false
|
|||
|
|
pageList: [10, 20], // 设置页面可以显示的数据条数
|
|||
|
|
pageSize: 20, // 页面数据条数
|
|||
|
|
pageNumber: 1, // 首页页码
|
|||
|
|
sidePagination: 'server', // 设置为服务器端分页
|
|||
|
|
queryParams: queryParams,
|
|||
|
|
queryParamsType: "limit",
|
|||
|
|
singleSelect: false,//单选多选
|
|||
|
|
sortName: 'id', // 要排序的字段
|
|||
|
|
sortOrder: 'desc', // 排序规则
|
|||
|
|
/* showColumns: true,
|
|||
|
|
showRefresh: true, */
|
|||
|
|
columns: [
|
|||
|
|
{
|
|||
|
|
checkbox: true // 显示一个勾选框
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '化验指标编号', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '10%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
if (row.mPoint != null && row.mPoint != '') {
|
|||
|
|
return row.mPoint.mpointcode;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '化验指标名称', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '10%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
if (row.mPoint != null && row.mPoint != '') {
|
|||
|
|
return row.mPoint.parmname;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '化验指标点位', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '10%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.measurePointId;
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '额定工时(小时)', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '10%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.baseHours;
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '额定费用(元)', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '10%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.baseCost;
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '化验方法', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '25%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.method;
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
field: '', // 返回json数据中的name
|
|||
|
|
title: '安全注意事项', // 表格表头显示文字
|
|||
|
|
align: 'center', // 左右居中
|
|||
|
|
valign: 'middle',
|
|||
|
|
width: '25%',
|
|||
|
|
formatter: function (value, row, index) {
|
|||
|
|
return row.safeCareful;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
onCheck: function (row) {
|
|||
|
|
// doSelect(row);
|
|||
|
|
},
|
|||
|
|
onLoadSuccess: function () { //加载成功时执行
|
|||
|
|
adjustBootstrapTableView("table_library");
|
|||
|
|
},
|
|||
|
|
onLoadError: function () { //加载失败时执行
|
|||
|
|
console.info("加载数据失败");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
})
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<div class="modal fade" id="libraryModal">
|
|||
|
|
<div class="modal-dialog modal-lg">
|
|||
|
|
<div class="modal-content">
|
|||
|
|
<div id="mainAlertdiv2"></div>
|
|||
|
|
|
|||
|
|
<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 " style="width:100%">
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
|
|||
|
|
<div class="form-group form-inline">
|
|||
|
|
<div class="form-group form-inline pull-right" style="padding-bottom: 5px;">
|
|||
|
|
<div class="input-group input-group-sm" style="width: 250px;">
|
|||
|
|
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="工作名称">
|
|||
|
|
<div class="input-group-btn">
|
|||
|
|
<button class="btn btn-default" onclick="doSearchSelect4L();"><i class="fa fa-search"></i></button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div>
|
|||
|
|
<div id="table_library" style="height:230px;overflow:auto;width:100%"></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" onclick="doSelect()">确认</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|