原始记录
This commit is contained in:
parent
585a6576f3
commit
e93431645d
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*表格/查询条件公共样式*/
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
width: 99.5%;
|
||||||
|
/*height: calc(100% - 5px);*/
|
||||||
|
height: 99%;
|
||||||
|
margin: 0.15% 0 0 0.25%;
|
||||||
|
padding: 0;
|
||||||
|
font-family: 'Alibaba PuHuiTi R';
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 1% 2% 1% 2%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#title2{
|
||||||
|
width: 100%;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.title2 p {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
.classTable {
|
||||||
|
/*width: 100%;*/
|
||||||
|
table-layout: fixed;
|
||||||
|
text-align: center;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid #000;
|
||||||
|
/*height: calc(100% - 80px);*/
|
||||||
|
}
|
||||||
|
.classTable tr td{
|
||||||
|
font-size: 16px;
|
||||||
|
border: 1px solid #000;
|
||||||
|
}
|
||||||
|
.w-50 {
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
.w-60 {
|
||||||
|
width: 60px;
|
||||||
|
}
|
||||||
|
.w-70 {
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
.w-80 {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
.w-90 {
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
.w-100 {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-150 {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-200 {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.w-300 {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
.w-350 {
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
.w-400 {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
/*滚动条样式start*/
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
height: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: #e7e7f1 !important;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(94, 96, 97, 0.43) !important;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(94, 96, 97, 0.43) !important;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:active {
|
||||||
|
background: rgba(94, 96, 97, 0.43) !important;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*滚动条样式end*/
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
let form, layer, table, tableIns,idParam,customNumParam;
|
let form, layer, table, tableIns,idParam,customNumParam;
|
||||||
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
||||||
|
|
||||||
var pers = checkPermission();
|
|
||||||
|
|
||||||
function setParams(params) {
|
function setParams(params) {
|
||||||
idParam = JSON.parse(params).id;
|
idParam = JSON.parse(params).id;
|
||||||
customNumParam = JSON.parse(params).customNum;
|
customNumParam = JSON.parse(params).customNum;
|
||||||
|
|
@ -69,7 +67,7 @@ function initTable(dataList, limit, page) {
|
||||||
//表头
|
//表头
|
||||||
{title: "序号", width: 80, unresize: true, align: "center",
|
{title: "序号", width: 80, unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_NUM;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "devTypeName", title: "样品类型", unresize: true, align: "center"},
|
{field: "devTypeName", title: "样品类型", unresize: true, align: "center"},
|
||||||
|
|
@ -108,7 +106,7 @@ function initTable(dataList, limit, page) {
|
||||||
},
|
},
|
||||||
{title: "原始记录", unresize: true, width: 300, align: "center",
|
{title: "原始记录", unresize: true, width: 300, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return '<a href="#" style="color: blue;" onclick="testClick(\'' + d.id + '\',\''+d.customNum+'\')">查看</a>';
|
return '<a href="#" style="color: blue;" onclick="viewData(\'' + d.experId + '\',\''+d.devTypeCode+'\')">查看</a>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -241,13 +239,23 @@ function addData(experId,sampleId,devTypeCode) {
|
||||||
openIframeMax("testForm", title, "testForm.html", '80%', '100%', param);
|
openIframeMax("testForm", title, "testForm.html", '80%', '100%', param);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testClick(id,customNum) {
|
/*function testClick(id,customNum) {
|
||||||
let title = '试验详细信息'
|
let title = '试验详细信息'
|
||||||
let param = {
|
let param = {
|
||||||
'id': id,
|
'id': id,
|
||||||
'customNum':customNum
|
'customNum':customNum
|
||||||
}
|
}
|
||||||
openIframeMax("primaryDataList", title, "child/primaryDataList.html", '100%', '100%', param);
|
openIframeMax("primaryDataList", title, "child/primaryDataList.html", '100%', '100%', param);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/*原始记录*/
|
||||||
|
function viewData(experId, devTypeCode) {
|
||||||
|
let title = '原始记录';
|
||||||
|
let param = {
|
||||||
|
'experId': experId,
|
||||||
|
'devTypeCode': devTypeCode
|
||||||
|
}
|
||||||
|
openIframe7("viewData", title, "child/viewOriginalRecord.html", '1500px', '750px', param);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDevSelected() {
|
function getDevSelected() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
let form, layer, table;
|
||||||
|
let experIdParam = null, devTypeCodeParam = null;
|
||||||
|
|
||||||
|
function setParams(params) {
|
||||||
|
experIdParam = JSON.parse(params).experId;
|
||||||
|
devTypeCodeParam = JSON.parse(params).devTypeCode;
|
||||||
|
layui.use(['form', 'layer', 'table'], function () {
|
||||||
|
form = layui.form;
|
||||||
|
layer = layui.layer;
|
||||||
|
table = layui.table;
|
||||||
|
})
|
||||||
|
getDataById();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**详情*/
|
||||||
|
function getDataById() {
|
||||||
|
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||||
|
let url = dataUrl + "/experimental/viewTestData";
|
||||||
|
let obj = {
|
||||||
|
'id': experIdParam
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
encryptedData: encryptCBC(JSON.stringify(obj))
|
||||||
|
}
|
||||||
|
ajaxRequest(url, "POST", params, true, function () {
|
||||||
|
}, function (result) {
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
if (result.status === 200) {
|
||||||
|
setFormData(result.data);
|
||||||
|
} else if (result.status === 500) {
|
||||||
|
layer.alert(result.msg, {icon: 2, move: false})
|
||||||
|
}
|
||||||
|
}, function (xhr) {
|
||||||
|
layer.close(loadingMsg); // 关闭提示层
|
||||||
|
error(xhr)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**表单赋值*/
|
||||||
|
function setFormData(obj) {
|
||||||
|
setTableInfo(obj);
|
||||||
|
console.log(obj)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*赋值表格信息*/
|
||||||
|
function setTableInfo(obj) {
|
||||||
|
let list = obj.configItemsVos;
|
||||||
|
let num = 0, colspanNum = [];
|
||||||
|
let colHtml = '', firstHtml = '', twoHtml = '', tdHtml = '',yjList = '';
|
||||||
|
$.each(list, function (index, item) {
|
||||||
|
let itemList = item.itemList;
|
||||||
|
colspanNum.push(itemList.length);
|
||||||
|
firstHtml += '<td colspan="' + itemList.length + '">' + item.experTypeName + '</td>'
|
||||||
|
$.each(itemList, function (index2, item2) {
|
||||||
|
num++;
|
||||||
|
colHtml += '<col class="w-100"></col>'
|
||||||
|
twoHtml += '<td>' + item2.itemName + '</td>';
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if(obj.basisVos && obj.basisVos.length > 0){
|
||||||
|
$.each(obj.basisVos,function (index,item){
|
||||||
|
yjList += (index + 1)+'、'+item.basisName + '\n';
|
||||||
|
})
|
||||||
|
}
|
||||||
|
tdHtml = setTableData(obj);
|
||||||
|
setColNum('sampleUnit', num);
|
||||||
|
setColNum('illustrate', num);
|
||||||
|
setColNum('mainDev', num);
|
||||||
|
setColNum('yj', num);
|
||||||
|
setColNum('mainDevData', num);
|
||||||
|
$('#mainCol').after(colHtml);
|
||||||
|
$('#appearanceStatus').after(firstHtml);
|
||||||
|
$('#model').after(twoHtml);
|
||||||
|
$('#itemTd').after(tdHtml);
|
||||||
|
let zsNum = Math.floor(num / 4);
|
||||||
|
let xsNum = num % 4;
|
||||||
|
if (zsNum > 0) {
|
||||||
|
$('#td2').attr("colspan", zsNum + 1);
|
||||||
|
$('#td4').attr("colspan", zsNum + 1);
|
||||||
|
$('#td6').attr("colspan", zsNum + 1);
|
||||||
|
$('#td8').attr("colspan", zsNum + 1);
|
||||||
|
}
|
||||||
|
if (xsNum > 0 && xsNum == 1) {
|
||||||
|
setColNum('td2', 1);
|
||||||
|
} else if (xsNum > 0 && xsNum == 2) {
|
||||||
|
setColNum('td2', 1);
|
||||||
|
setColNum('td8', 1);
|
||||||
|
} else if (xsNum > 0 && xsNum == 3) {
|
||||||
|
setColNum('td2', 1);
|
||||||
|
setColNum('td4', 1);
|
||||||
|
setColNum('td8', 1);
|
||||||
|
}
|
||||||
|
$('#td2').html(obj.experDev);
|
||||||
|
$('#td4').html(obj.experModule);
|
||||||
|
$('#td6').html(obj.experCode);
|
||||||
|
$('#td8').html(obj.checkTime);
|
||||||
|
$('#yj').html(yjList);
|
||||||
|
$('#sampleUnit').html(obj.customName);
|
||||||
|
$('#sampleDate').html(obj.sampleDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setColNum(name, addNum) {
|
||||||
|
let num = $('#' + name + '').attr("colspan");
|
||||||
|
$('#' + name + '').attr("colspan", parseInt(num) + addNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*赋值表格数据*/
|
||||||
|
function setTableData(obj) {
|
||||||
|
let list = obj.experDevVos;
|
||||||
|
let html = '';
|
||||||
|
$.each(list, function (index, item) {
|
||||||
|
html += '<tr>' +
|
||||||
|
'<td colspan="2">' + (index + 1) + '</td>' +
|
||||||
|
'<td>' + item.devCode + '</td>' +
|
||||||
|
'<td>' + item.manufacturer + '</td>' +
|
||||||
|
'<td>' + item.manufactureDate + '</td>' +
|
||||||
|
'<td>' + item.devModule + '</td>' +
|
||||||
|
'<td>' + item.devStatus + '</td>' +
|
||||||
|
setItemData(JSON.parse(item.devData));
|
||||||
|
if (index == 0) {
|
||||||
|
html += '<td rowspan="' + list.length + '">' + obj.experStand + '</td>' +
|
||||||
|
'<td rowspan="' + list.length + '">' + obj.experConclu + '</td>';
|
||||||
|
}
|
||||||
|
html += '<td>' + item.remarks + '</td>' +
|
||||||
|
'</tr>';
|
||||||
|
})
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*赋值试验子项数据*/
|
||||||
|
function setItemData(list) {
|
||||||
|
let html = '';
|
||||||
|
$.each(list, function (index, item) {
|
||||||
|
html += '<td>' + item + '</td>';
|
||||||
|
})
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
@ -66,11 +66,10 @@ function initTable(dataList, limit, page) {
|
||||||
limit: limit,
|
limit: limit,
|
||||||
cols: [
|
cols: [
|
||||||
[
|
[
|
||||||
{type: 'checkbox', fixed: 'left'},
|
|
||||||
//表头
|
//表头
|
||||||
{title: "序号", width: 80, unresize: true, align: "center",
|
{title: "序号", width: 80, unresize: true, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return (page - 1) * limit + d.LAY_INDEX;
|
return (page - 1) * limit + d.LAY_NUM;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="../../../js/layui-v2.6.8/css/layui.css">
|
<link rel="stylesheet" href="../../../js/layui-v2.9.14/layui/css/layui.css">
|
||||||
<link rel="stylesheet" href="../../../css/table-common2.css">
|
<link rel="stylesheet" href="../../../css/table-common2.css">
|
||||||
<script src="../../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
<script src="../../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
<script src="../../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
<script src="../../../js/layui-v2.9.14/layui/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
<script src="../../../js/publicJs.js"></script>
|
<script src="../../../js/publicJs.js"></script>
|
||||||
<script src="../../../js/commonUtils.js"></script>
|
<script src="../../../js/commonUtils.js"></script>
|
||||||
<script src="../../../js/openIframe.js"></script>
|
<script src="../../../js/openIframe.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="stylesheet" href="../../../js/layui-v2.9.14/layui/css/layui.css">
|
||||||
|
<link rel="stylesheet" href="../../../css/font.css">
|
||||||
|
<link rel="stylesheet" href="../../../css/basis/viewOriginalRecord.css">
|
||||||
|
<script src="../../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
<script src="../../../js/layui-v2.9.14/layui/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
<script src="../../../js/publicJs.js"></script>
|
||||||
|
<script src="../../../js/commonUtils.js"></script>
|
||||||
|
<script src="../../../js/openIframe.js"></script>
|
||||||
|
<script src="../../../js/my/aes.js"></script>
|
||||||
|
<script src="../../../js/ajaxRequest.js"></script>
|
||||||
|
<script src="../../../js/select.js"></script>
|
||||||
|
<title>原始数据记录-原始记录</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content">
|
||||||
|
<div id="title">
|
||||||
|
<h1>安全帽检测原始记录</h1>
|
||||||
|
</div>
|
||||||
|
<div class="title2 layout">
|
||||||
|
<p>记录编号:</p>
|
||||||
|
<p>收样日期:<span id="sampleDate"></span></p>
|
||||||
|
<p>试验日期:<span id="testDate"></span></p>
|
||||||
|
</div>
|
||||||
|
<table class="classTable">
|
||||||
|
<colgroup>
|
||||||
|
<col class="w-60"></col>
|
||||||
|
<col class="w-60"></col>
|
||||||
|
<col class="w-90"></col>
|
||||||
|
<col class="w-80"></col>
|
||||||
|
<col class="w-80"></col>
|
||||||
|
<col class="w-80"></col>
|
||||||
|
<col class="w-80" id="mainCol"></col>
|
||||||
|
<col class="w-100"></col>
|
||||||
|
<col class="w-100"></col>
|
||||||
|
<col class="w-100"></col>
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">送检单位</td>
|
||||||
|
<td id="sampleUnit" colspan="8"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2">试验地点</td>
|
||||||
|
<td rowspan="2">力学检测室</td>
|
||||||
|
<td id="mainDev" colspan="8">主要试验设备</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id="td1">名称</td>
|
||||||
|
<td id="td2"></td>
|
||||||
|
<td id="td3">型号</td>
|
||||||
|
<td id="td4"></td>
|
||||||
|
<td id="td5">编号</td>
|
||||||
|
<td id="td6"></td>
|
||||||
|
<td id="td7">检定/校准有效期</td>
|
||||||
|
<td id="td8"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">试验依据</td>
|
||||||
|
<td colspan="8" id="yj"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2" colspan="2">编号</td>
|
||||||
|
<td rowspan="2">客户自编号</td>
|
||||||
|
<td colspan="3">样品信息</td>
|
||||||
|
<td rowspan="2" id="appearanceStatus">外观状态</td>
|
||||||
|
<td rowspan="2">试验标准</td>
|
||||||
|
<td rowspan="2">试验结论</td>
|
||||||
|
<td rowspan="2">备注</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="itemTd">
|
||||||
|
<td>生产厂家</td>
|
||||||
|
<td>生产日期</td>
|
||||||
|
<td id="model">型号</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td id="illustrate" colspan="10">说明:外观状态若符合判定依据要求的则打V,不符合要求的则打X;试验结论一栏则填符合:Y或不符合:N,不符合原因在备注一栏体现。</td></tr>
|
||||||
|
</table>
|
||||||
|
<div class="title2 layout">
|
||||||
|
<p>试验员:</p>
|
||||||
|
<p>审核员:</p>
|
||||||
|
<p>第 页共 页:</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script src="../../../js/primaryData/child/viewOriginalRecord.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
</html>
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css">
|
<link rel="stylesheet" href="../../js/layui-v2.9.14/layui/css/layui.css">
|
||||||
<link rel="stylesheet" href="../../css/table-common2.css">
|
<link rel="stylesheet" href="../../css/table-common2.css">
|
||||||
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
<script src="../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
<script src="../../js/layui-v2.9.14/layui/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
<script src="../../js/publicJs.js"></script>
|
<script src="../../js/publicJs.js"></script>
|
||||||
<script src="../../js/commonUtils.js"></script>
|
<script src="../../js/commonUtils.js"></script>
|
||||||
<script src="../../js/openIframe.js"></script>
|
<script src="../../js/openIframe.js"></script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue