This commit is contained in:
parent
2dea724566
commit
6f0312a5d8
|
|
@ -72,7 +72,7 @@ public interface ExamineMapper {
|
||||||
* @author cwchen
|
* @author cwchen
|
||||||
* @date 2024/7/25 9:16
|
* @date 2024/7/25 9:16
|
||||||
*/
|
*/
|
||||||
void updateExperStatus(@Param("params") AuditHistoryVo vo, @Param("experId") Long experId, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus);
|
void updateExperStatus(@Param("params") AuditHistoryVo vo, @Param("status") Integer status, @Param("auditStatus") Integer auditStatus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询试验项是否都是通过
|
* 查询试验项是否都是通过
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ public class ExamineServiceImpl implements ExamineService {
|
||||||
if(StringUtils.isNotBlank(result)){
|
if(StringUtils.isNotBlank(result)){
|
||||||
return ServerResponse.createByErrorMsg(HttpStatus.ERROR, result);
|
return ServerResponse.createByErrorMsg(HttpStatus.ERROR, result);
|
||||||
}
|
}
|
||||||
SystemUtils.isExperimentalTeamLeader();
|
|
||||||
for (Long experId : vo.getExperIds()) {
|
for (Long experId : vo.getExperIds()) {
|
||||||
vo.setExperId(experId);
|
vo.setExperId(experId);
|
||||||
mapper.checkData(vo);
|
mapper.checkData(vo);
|
||||||
|
|
@ -113,7 +112,7 @@ public class ExamineServiceImpl implements ExamineService {
|
||||||
status = valArr[0];
|
status = valArr[0];
|
||||||
auditStatus = valArr[1];
|
auditStatus = valArr[1];
|
||||||
}
|
}
|
||||||
mapper.updateExperStatus(vo, experId, status, auditStatus);
|
mapper.updateExperStatus(vo, status, auditStatus);
|
||||||
}
|
}
|
||||||
// 查询试验项是否都是通过,并更新收样信息审核的状态
|
// 查询试验项是否都是通过,并更新收样信息审核的状态
|
||||||
List<Integer> experIsPassList = mapper.getExperIsPass(vo);
|
List<Integer> experIsPassList = mapper.getExperIsPass(vo);
|
||||||
|
|
@ -130,7 +129,7 @@ public class ExamineServiceImpl implements ExamineService {
|
||||||
audtiStatus = valArr[1];
|
audtiStatus = valArr[1];
|
||||||
}
|
}
|
||||||
// 审核状态、流程状态不为0时,修改收样信息审核状态
|
// 审核状态、流程状态不为0时,修改收样信息审核状态
|
||||||
if(Objects.equals(audtiStatus, Constants.ALL_EXPER_INDEX) && Objects.equals(processStatus, Constants.ALL_EXPER_INDEX)){
|
if(!Objects.equals(audtiStatus, Constants.ALL_EXPER_INDEX) && !Objects.equals(processStatus, Constants.ALL_EXPER_INDEX)){
|
||||||
mapper.updateSampleStatus(vo, audtiStatus, processStatus);
|
mapper.updateSampleStatus(vo, audtiStatus, processStatus);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<!--更新试验信息表审核状态-->
|
<!--更新试验信息表审核状态-->
|
||||||
<update id="updateExperStatus">
|
<update id="updateExperStatus">
|
||||||
UPDATE tb_exper SET status = #{status},audit_status = #{auditStatus},audit_user_name = #{params.auditUserName},audit_time = #{params.auditTime},audit_remakr = #{params.auditRemark}
|
UPDATE tb_exper SET status = #{status},audit_status = #{auditStatus},audit_user_name = #{params.auditUserName},audit_time = #{params.auditTime},audit_remakr = #{params.auditRemark}
|
||||||
WHERE id = #{experId}
|
WHERE id = #{params.experId}
|
||||||
</update>
|
</update>
|
||||||
<!--更新收样信息审核的状态-->
|
<!--更新收样信息审核的状态-->
|
||||||
<update id="updateSampleStatus">
|
<update id="updateSampleStatus">
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ 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) {
|
||||||
console.log(d.experId)
|
|
||||||
return (page - 1) * limit + d.LAY_NUM;
|
return (page - 1) * limit + d.LAY_NUM;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -275,7 +274,7 @@ function viewData(experId, devTypeCode) {
|
||||||
function passData(experId, sampleId, status, type) {
|
function passData(experId, sampleId, status, type) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
// 通过
|
// 通过
|
||||||
layer.confirm('确认通过?', {icon: 7}, function (index) {
|
layer.confirm('确认通过?', {icon: 7,move:false}, function (index) {
|
||||||
saveData([experId], sampleId);
|
saveData([experId], sampleId);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -306,7 +305,7 @@ function batchAudit(type) {
|
||||||
experIdArr.push(item.experId)
|
experIdArr.push(item.experId)
|
||||||
})
|
})
|
||||||
if (type === 1) { // 批量通过
|
if (type === 1) { // 批量通过
|
||||||
layer.confirm('确认批量通过?', {icon: 7}, function (index) {
|
layer.confirm('确认批量通过?', {icon: 7,move:false}, function (index) {
|
||||||
saveData(experIdArr, sampleId);
|
saveData(experIdArr, sampleId);
|
||||||
})
|
})
|
||||||
} else if (type === 2) { // 批量不通过
|
} else if (type === 2) { // 批量不通过
|
||||||
|
|
@ -338,7 +337,7 @@ function saveData(experIdArr, sampleId) {
|
||||||
obj.experIds = experIdArr;
|
obj.experIds = experIdArr;
|
||||||
obj.sampleId = parseInt(sampleId);
|
obj.sampleId = parseInt(sampleId);
|
||||||
obj.auditStatus = 1;
|
obj.auditStatus = 1;
|
||||||
obj.auditType = typeParam;
|
obj.auditType = statusParam;
|
||||||
let params = {
|
let params = {
|
||||||
encryptedData: encryptCBC(JSON.stringify(obj))
|
encryptedData: encryptCBC(JSON.stringify(obj))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,176 @@
|
||||||
|
let form, layer, table, tableIns, laydate;
|
||||||
|
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
||||||
|
let deviceTypeList = [];
|
||||||
|
let idParam = null, statusParam = null;
|
||||||
|
function setParams(params) {
|
||||||
|
idParam = JSON.parse(params).id;
|
||||||
|
statusParam = JSON.parse(params).status;
|
||||||
|
layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||||
|
form = layui.form;
|
||||||
|
layer = layui.layer;
|
||||||
|
table = layui.table;
|
||||||
|
laydate = layui.laydate;
|
||||||
|
layui.form.render();
|
||||||
|
deviceTypeList = getDictsSelect("dev_code");
|
||||||
|
setDictSelectValue(deviceTypeList, 'devTypeCode');
|
||||||
|
laydate.render({
|
||||||
|
elem: '#ID-laydate-rangeLinked',
|
||||||
|
range: ['#startTime', '#endTime'],
|
||||||
|
rangeLinked: true
|
||||||
|
});
|
||||||
|
pages(1, 1, 1);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function pages(pageNum, pageSize, typeNum) {
|
||||||
|
let params = getReqParams(pageNum, pageSize, typeNum);
|
||||||
|
$.ajax({
|
||||||
|
url: dataUrl + "/examine/getDetailList",
|
||||||
|
headers: {
|
||||||
|
"token": tokens
|
||||||
|
},
|
||||||
|
data: params,
|
||||||
|
type: 'POST',
|
||||||
|
async: false,
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code === 200) {
|
||||||
|
if (result.data) {
|
||||||
|
initTable(result.data, result.limit, result.curr)
|
||||||
|
laypages(result.count, result.curr, result.limit)
|
||||||
|
}
|
||||||
|
} else if (result.code === 500) {
|
||||||
|
layer.alert(result.msg, {icon: 2})
|
||||||
|
}
|
||||||
|
}, error: function (xhr) {
|
||||||
|
error(xhr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function laypages(total, page, limit) {
|
||||||
|
layui.use(['laypage'], function () {
|
||||||
|
let laypage = layui.laypage;
|
||||||
|
laypage.render({
|
||||||
|
elem: 'voi-page',
|
||||||
|
count: total,
|
||||||
|
curr: page,
|
||||||
|
limit: limit,
|
||||||
|
limits: [10, 20, 50, 100, 200, 500],
|
||||||
|
layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
|
||||||
|
groups: 5,
|
||||||
|
jump: function (obj, first) {
|
||||||
|
if (!first) {
|
||||||
|
pageNum = obj.curr, limitSize = obj.limit;
|
||||||
|
pages(obj.curr, obj.limit, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let flag = true;
|
||||||
|
|
||||||
|
/*初始化表格*/
|
||||||
|
function initTable(dataList, limit, page) {
|
||||||
|
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||||
|
tableIns = table.render({
|
||||||
|
elem: "#table_data",
|
||||||
|
id: 'testData',
|
||||||
|
height: "full-140",
|
||||||
|
data: dataList,
|
||||||
|
limit: limit,
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
title: "序号", width: 80, unresize: true, align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
return (page - 1) * limit + d.LAY_NUM;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: "devTypeName", title: "设备类型", unresize: true, align: "center"},
|
||||||
|
{field: "sampleNum", title: "送样总数", unresize: true, align: "center"},
|
||||||
|
{field: "sampleQuantity", title: "样品总数", unresize: true, align: "center"},
|
||||||
|
{field: "experimenter", title: "试验人员", unresize: true, align: "center"},
|
||||||
|
{field: "testTime", title: "试验时间", unresize: true, align: "center"},
|
||||||
|
{field: "status", title: "状态", unresize: true, align: "center", templet: function (d) {
|
||||||
|
return setAuditStatus(d.status);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: "causeOfRejection", title: "驳回原因", unresize: true, align: "center"},
|
||||||
|
{
|
||||||
|
title: "原始记录", unresize: true, align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
let html = '';
|
||||||
|
html += "<a title='查看' onclick=\"viewData('" + d.experId + "','" + d.devTypeCode + "')\">查看</a>";
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
done: function (res, curr, count) {
|
||||||
|
layer.close(loadingMsg);
|
||||||
|
table.resize("testData");
|
||||||
|
count || this.elem.next(".layui-table-view").find(".layui-table-header").css("display", "inline-block");
|
||||||
|
count || this.elem.next(".layui-table-view").find(".layui-table-box").css("overflow", "auto");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取参数
|
||||||
|
function getReqParams(page, limit, type) {
|
||||||
|
let obj = {};
|
||||||
|
if (!type) {
|
||||||
|
obj = {
|
||||||
|
page: page + "",
|
||||||
|
limit: limit + "",
|
||||||
|
keyWord: $('#keyWord').val(),
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val(),
|
||||||
|
devTypeCode: $('#devTypeCode').val(),
|
||||||
|
id: idParam
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
obj = {
|
||||||
|
page: '1',
|
||||||
|
limit: '10',
|
||||||
|
keyWord: '',
|
||||||
|
accessType: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: '',
|
||||||
|
devTypeCode: '',
|
||||||
|
id: idParam
|
||||||
|
};
|
||||||
|
}
|
||||||
|
obj = {
|
||||||
|
encryptedData: encryptCBC(JSON.stringify(obj))
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询/重置
|
||||||
|
function query() {
|
||||||
|
let pattern = new RegExp("[%_<>]");
|
||||||
|
if (pattern.test($("#keyWord").val())) {
|
||||||
|
$("#keyWord").val('');
|
||||||
|
return layer.msg('关键字查询包含特殊字符,请重新输入', {
|
||||||
|
icon: 2,
|
||||||
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
pageNum = 1;
|
||||||
|
pages(1, limitSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadData() {
|
||||||
|
pages(pageNum, limitSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 原始数据查看
|
||||||
|
function viewData(experId, devTypeCode) {
|
||||||
|
let title = '原始记录';
|
||||||
|
let param = {
|
||||||
|
'experId': experId,
|
||||||
|
'devTypeCode': devTypeCode
|
||||||
|
}
|
||||||
|
openIframe7("viewData", title, "child/viewExperData.html", '1500px', '800px', param);
|
||||||
|
}
|
||||||
|
|
@ -88,7 +88,9 @@ function initTable(dataList, limit, page) {
|
||||||
{field: "sampleUserName", title: "收样人", unresize: true, align: "center"},
|
{field: "sampleUserName", title: "收样人", unresize: true, align: "center"},
|
||||||
{field: "sampleDate", title: "收样时间", unresize: true, align: "center"},
|
{field: "sampleDate", title: "收样时间", unresize: true, align: "center"},
|
||||||
{field: "teamName", title: "试验班组", unresize: true, align: "center"},
|
{field: "teamName", title: "试验班组", unresize: true, align: "center"},
|
||||||
{field: "audtiStatus", title: "状态", unresize: true, align: "center"},
|
{field: "audtiStatus", title: "状态", unresize: true, align: "center",templet: function (d) {
|
||||||
|
return setAuditStatus(d.audtiStatus);
|
||||||
|
}},
|
||||||
{
|
{
|
||||||
title: "审查", unresize: true, width: 180, align: "center",
|
title: "审查", unresize: true, width: 180, align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
|
|
@ -164,7 +166,7 @@ function auditData(id, status, btnName) {
|
||||||
'id': id,
|
'id': id,
|
||||||
'status':status
|
'status':status
|
||||||
}
|
}
|
||||||
openIframe3("auditData", title, "child/auditData.html", '1500px', '800px', param);
|
openIframe3("auditData", title, "child/viewAuditData.html", '1500px', '800px', param);
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<!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/table-common2.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 class="basic-search-box layout">
|
||||||
|
<form class="layui-form basic-form" onsubmit="return false;">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select class="layui-select" id="devTypeCode">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<div class="layui-inline" id="ID-laydate-rangeLinked">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" autocomplete="off" readonly id="startTime" class="layui-input"
|
||||||
|
placeholder="开始日期">
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-mid">-</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" autocomplete="off" readonly id="endTime" class="layui-input"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" id="keyWord" maxlength="30" class="layui-input" autocomplete="off"
|
||||||
|
placeholder="请输入关键字">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline btns">
|
||||||
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="table-box" table-responsive style="z-index: 1;">
|
||||||
|
<table id="table_data" class="table" lay-filter="testData"></table>
|
||||||
|
<div id="voi-page" class="layout"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<style>
|
||||||
|
.layui-table-init {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script src="../../../js/basis/child/viewAuditData.js" charset="UTF-8" type="text/javascript"></script>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue