检测报告管理
This commit is contained in:
parent
dc1d7e10c2
commit
34e7036ae8
|
|
@ -69,6 +69,11 @@ public class ToolsManageDto extends PageEntity {
|
|||
*/
|
||||
private String devTypeCode;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String customerCode;
|
||||
|
||||
/**
|
||||
* 生产厂家
|
||||
*/
|
||||
|
|
@ -119,5 +124,10 @@ public class ToolsManageDto extends PageEntity {
|
|||
*/
|
||||
private String keyWord;
|
||||
|
||||
/**
|
||||
* 实验地点
|
||||
*/
|
||||
private String submitLocation;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.bonus.aqgqj.utils.ServerResponse;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工器具个体管理
|
||||
* 收样管理
|
||||
* @author hay
|
||||
*/
|
||||
public interface SamplesManageService {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description 工器具个体管理
|
||||
* @description 收样管理
|
||||
* @author hay
|
||||
* @date 2024/7/20 16:10
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7,21 +7,23 @@
|
|||
tsd.id,
|
||||
tsd.dev_type_name as sampleTools,
|
||||
tsd.dev_code as devCode,
|
||||
tsd.dev_type_code as devTypeCode,
|
||||
tsd.customer_code as customerCode,
|
||||
tsd.dev_module as devModule,
|
||||
tc.custom_name as customName,
|
||||
ts.department as sampleDepartment,
|
||||
ted.manufacture_date as manufactureDate,
|
||||
te.exper_time as experTime,
|
||||
te.next_exper_time as nextExperTime,
|
||||
te.exper_conclu as experConclu,
|
||||
te.next_exper_time as nextExperTime,
|
||||
te.submit_location as submitLocation,
|
||||
su.user_name as experUser
|
||||
FROM
|
||||
tb_sample_device tsd
|
||||
LEFT JOIN tb_sample ts on ts.id=tsd.sample_id
|
||||
LEFT JOIN tb_custom tc on tc.id=ts.custom_id
|
||||
LEFT JOIN tb_exper te on te.sample_id=ts.id
|
||||
LEFT JOIN tb_exper_dev ted on ted.exper_id =te.id
|
||||
LEFT JOIN sys_user su on su.id=te.create_user
|
||||
LEFT JOIN tb_sample ts on ts.id=tsd.sample_id and ts.del_flag=0
|
||||
LEFT JOIN tb_custom tc on tc.id=ts.custom_id and tc.del_flag=0
|
||||
LEFT JOIN tb_exper_dev ted on ted.dev_id=tsd.id
|
||||
LEFT JOIN tb_exper te on te.id=ted.exper_id and te.del_flag=0
|
||||
LEFT JOIN sys_user su on su.id=te.create_user and su.del_flag=0
|
||||
WHERE
|
||||
tsd.del_falg=0
|
||||
<if test="sampleTools != null and sampleTools != ''">
|
||||
|
|
@ -30,9 +32,11 @@
|
|||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
tsd.dev_code like concat('%', #{keyWord}, '%') OR
|
||||
tsd.dev_type_code like concat('%', #{keyWord}, '%') OR
|
||||
tsd.customer_code like concat('%', #{keyWord}, '%') OR
|
||||
tsd.dev_module like concat('%', #{keyWord}, '%') OR
|
||||
tc.custom_name like concat('%', #{keyWord}, '%')
|
||||
tc.custom_name like concat('%', #{keyWord}, '%') OR
|
||||
ts.department like concat('%', #{keyWord}, '%') OR
|
||||
te.exper_conclu like concat('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
function setParams(params){
|
||||
var data=JSON.parse(params);
|
||||
//给控件赋值
|
||||
document.getElementById('submitLocation').textContent = data.submitLocation === "null" || data.submitLocation === undefined ? '' : data.submitLocation;
|
||||
document.getElementById('sampleTools').textContent = data.sampleTools === "null" || data.sampleTools === undefined ? '' : data.sampleTools;
|
||||
document.getElementById('devModule').textContent = data.devModule === "null" || data.devModule === undefined ? '' : data.devModule;
|
||||
document.getElementById('devCode').textContent = data.devCode === "null" || data.devCode === undefined ? '' : data.devCode;
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@ function initTable(dataList, limit, page) {
|
|||
}
|
||||
},
|
||||
{field: "sampleTools", title: "设备类型", unresize: true, align: "center"},
|
||||
{field: "devTypeCode", title: "设备编号", unresize: true, align: "center"},
|
||||
{field: "devCode", title: "客户自编号", unresize: true, align: "center"},
|
||||
{field: "devCode", title: "设备编号", unresize: true, align: "center"},
|
||||
{field: "customerCode", title: "设备编码", unresize: true, align: "center"},
|
||||
{field: "devModule", title: "设备规格", unresize: true, align: "center"},
|
||||
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
||||
{field: "sampleDepartment", title: "送样部门", unresize: true, align: "center"},
|
||||
|
|
@ -95,13 +95,13 @@ function initTable(dataList, limit, page) {
|
|||
{field: "experTime", title: "试验日期", unresize: true, align: "center"},
|
||||
{field: "experConclu", title: "试验结果", unresize: true, align: "center"},
|
||||
{
|
||||
field: "certificate", title: "合格证", unresize: true, align: "center", templet: function (d) {
|
||||
field: "certificate", title: "合格证",width: '6%', unresize: true, align: "center", templet: function (d) {
|
||||
console.log("d",d.id);
|
||||
return '<a href="#" style="color: blue;" onclick="handleClick1(\'' + d.sampleTools + '\',\'' + d.devModule + '\',\'' + d.devCode + '\',\'' + d.experTime + '\',\'' + d.nextExperTime + '\',\'' + d.experUser + '\',\'' + d.experConclu + '\',\'' + d.customName + '\')">查看</a>';
|
||||
return '<a href="#" style="color: blue;" onclick="handleClick1(\'' + d.submitLocation + '\',\'' + d.sampleTools + '\',\'' + d.devModule + '\',\'' + d.devCode + '\',\'' + d.experTime + '\',\'' + d.nextExperTime + '\',\'' + d.experUser + '\',\'' + d.experConclu + '\',\'' + d.customName + '\')">查看</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "qrCode", title: "二维码", unresize: true, align: "center", templet: function (d) {
|
||||
field: "qrCode", title: "二维码", width: '6%', unresize: true, align: "center", templet: function (d) {
|
||||
return '<a href="#" style="color: blue;" onclick="handleClick2(\'' + d + '\')">打印</a>';
|
||||
}
|
||||
},
|
||||
|
|
@ -130,9 +130,10 @@ function initTable(dataList, limit, page) {
|
|||
});
|
||||
}
|
||||
|
||||
function handleClick1(sampleTools,devModule,devCode,experTime,nextExperTime,experUser,experConclu,customName) {
|
||||
function handleClick1(submitLocation,sampleTools,devModule,devCode,experTime,nextExperTime,experUser,experConclu,customName) {
|
||||
title = '合格证';
|
||||
let param = {
|
||||
'submitLocation' : submitLocation,
|
||||
'sampleTools' : sampleTools,
|
||||
'devModule' : devModule,
|
||||
'devCode' : devCode,
|
||||
|
|
@ -147,8 +148,51 @@ function handleClick1(sampleTools,devModule,devCode,experTime,nextExperTime,expe
|
|||
|
||||
function handleClick2(view1) {
|
||||
alert('Clicked on: ' + view1);
|
||||
// 准备二维码内容
|
||||
const qrCodeData = {
|
||||
"样品名称": "安全帽",
|
||||
"规格型号": "普通款",
|
||||
"样品编号": "0001",
|
||||
"检验日期": "2024-07-21",
|
||||
"下次检验日期": "2024-09-30",
|
||||
"试验人员": "admin",
|
||||
"试验结果": "试验结论",
|
||||
"送检单位": "单位"
|
||||
};
|
||||
// 将对象转换为字符串
|
||||
const qrCodeString = JSON.stringify(qrCodeData, null, 2); // 使 JSON 字符串更易读
|
||||
// 清空二维码容器
|
||||
$('#Qrcode').empty();
|
||||
// 生成二维码
|
||||
$('#Qrcode').qrcode(utf16to8(qrCodeString));
|
||||
// 打印二维码
|
||||
printQRCode();
|
||||
}
|
||||
|
||||
function utf16to8(str) {
|
||||
var out, i, len, c;
|
||||
out = "";
|
||||
len = str.length;
|
||||
for (i = 0; i < len; i++) {
|
||||
c = str.charCodeAt(i);
|
||||
if ((c >= 0x0001) && (c <= 0x007F)) {
|
||||
out += str.charAt(i);
|
||||
} else if (c > 0x07FF) {
|
||||
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
} else {
|
||||
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
function printQRCode() {
|
||||
// 使用浏览器的打印功能打印页面
|
||||
window.print();
|
||||
}
|
||||
|
||||
// 获取参数
|
||||
function getReqParams(page, limit, type) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="dynamic-text" id="address">xxxxxxxx</div>
|
||||
<div class="dynamic-text" id="submitLocation"></div>
|
||||
<table>
|
||||
<!-- 第一行 -->
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<script src="../../js/openIframe.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<script src="../../js/libs/jquery.qrcode.min.js"></script>
|
||||
<title>工器具个体管理</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
<table id="table_data" class="table" lay-filter="table_data"></table>
|
||||
<div id="voi-page" class="layout"></div>
|
||||
</div>
|
||||
<div id="Qrcode"></div>
|
||||
</div>
|
||||
</body>
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue