This commit is contained in:
parent
5363d8e52e
commit
2dea724566
|
|
@ -129,7 +129,10 @@ public class ExamineServiceImpl implements ExamineService {
|
|||
processStatus = valArr[0];
|
||||
audtiStatus = valArr[1];
|
||||
}
|
||||
mapper.updateSampleStatus(vo, audtiStatus, processStatus);
|
||||
// 审核状态、流程状态不为0时,修改收样信息审核状态
|
||||
if(Objects.equals(audtiStatus, Constants.ALL_EXPER_INDEX) && Objects.equals(processStatus, Constants.ALL_EXPER_INDEX)){
|
||||
mapper.updateSampleStatus(vo, audtiStatus, processStatus);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
<if test="roleCode=='administrators'">
|
||||
AND process_status IN (1,2,3) AND audti_status = 0
|
||||
</if>
|
||||
ORDER BY FIELD(audtiStatus, '待审阅','待审核','待审批') ASC,dispatch_time ASC
|
||||
ORDER BY FIELD(audtiStatus, '待审阅','待审核','待审批') ASC,ts.sample_date DESC
|
||||
</select>
|
||||
<!--审查详情列表-->
|
||||
<select id="getDetailList" resultType="com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo">
|
||||
|
|
|
|||
|
|
@ -100,7 +100,11 @@ function initTable(dataList, limit, page) {
|
|||
{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"},
|
||||
{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) {
|
||||
|
|
@ -113,7 +117,7 @@ function initTable(dataList, limit, page) {
|
|||
title: "操作", unresize: true, width: 180, align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
if(checkNameArr.indexOf(d.status) > -1){
|
||||
if (checkNameArr.indexOf(d.status) > -1 && checkNameArr.indexOf(d.status) + 1 === parseInt(statusParam)) {
|
||||
html += "<a title='通过' onclick=\"passData('" + d.experId + "','" + d.sampleId + "','" + d.status + "',1)\">通过</a>";
|
||||
html += "<a style='margin: 0 0 0 10px' title='不通过' onclick=\"passData('" + d.experId + "','" + d.sampleId + "','" + d.status + "',2)\">不通过</a>";
|
||||
}
|
||||
|
|
@ -129,12 +133,12 @@ function initTable(dataList, limit, page) {
|
|||
count || this.elem.next(".layui-table-view").find(".layui-table-box").css("overflow", "auto");
|
||||
temp_table_list = res.data;
|
||||
temp_table_list.forEach(function (o, i) {
|
||||
if(!isCheck(o.status)){
|
||||
if (!isCheck(o.status) || !(checkNameArr.indexOf(o.status) + 1 === parseInt(statusParam))) {
|
||||
let index = o['LAY_INDEX'];
|
||||
$('.layui-table tr[data-index=' + index + '] input[type="checkbox"]').attr('disabled','disabled');
|
||||
$('.layui-table tr[data-index=' + index + '] input[type="checkbox"]').attr('disabled', 'disabled');
|
||||
$('.layui-table tr[data-index=' + index + '] input[type="checkbox"]').next().removeClass("layui-form-checked");
|
||||
$('.layui-table tr[data-index=' + index + '] input[type="checkbox"]').next().addClass("layui-disabled");
|
||||
$('.layui-table tr[data-index=' + index + '] input[type="checkbox"]').next().find('i').css("background-color",'#c7c5c5');
|
||||
$('.layui-table tr[data-index=' + index + '] input[type="checkbox"]').next().find('i').css("background-color", 'rgba(199,197,197,0.5)');
|
||||
}
|
||||
})
|
||||
temp_table_list.forEach(function (o, i) {
|
||||
|
|
@ -169,7 +173,7 @@ function initTable(dataList, limit, page) {
|
|||
} else {
|
||||
temp_table_list.forEach(function (o, i) {
|
||||
let index = checkAllList(temp_all_list, o);
|
||||
if (index == -1 && isCheck(o.status)) {
|
||||
if (index == -1 && isCheck(o.status)) {
|
||||
temp_all_list.push(o);
|
||||
}
|
||||
})
|
||||
|
|
@ -268,15 +272,23 @@ function viewData(experId, devTypeCode) {
|
|||
}
|
||||
|
||||
/**/
|
||||
function passData(experId, sampleId,status, type) {
|
||||
let title = type === 1 ? '通过确认' : '驳回确认';
|
||||
let param = {
|
||||
'experId': experId,
|
||||
'sampleId': sampleId,
|
||||
'type': type,
|
||||
'auditType':checkNameArr.indexOf(status) + 1
|
||||
function passData(experId, sampleId, status, type) {
|
||||
if (type === 1) {
|
||||
// 通过
|
||||
layer.confirm('确认通过?', {icon: 7}, function (index) {
|
||||
saveData([experId], sampleId);
|
||||
})
|
||||
} else {
|
||||
// 驳回确认
|
||||
let title = '驳回确认';
|
||||
let param = {
|
||||
'experId': experId,
|
||||
'sampleId': sampleId,
|
||||
'type': type,
|
||||
'auditType': checkNameArr.indexOf(status) + 1
|
||||
}
|
||||
openIframe3("passData", title, "passDataForm.html", '600px', '325px', param);
|
||||
}
|
||||
openIframe3("passData", title, "passDataForm.html", '600px', '325px', param);
|
||||
}
|
||||
|
||||
/*1.批量通过 2.批量不通过*/
|
||||
|
|
@ -285,29 +297,62 @@ function batchAudit(type) {
|
|||
if (size === 0) {
|
||||
return layer.msg('未选择数据', {icon: 7});
|
||||
}
|
||||
let experIdArr = [], sampleId = null,auditType = 1;
|
||||
let experIdArr = [], sampleId = null, auditType = 1;
|
||||
$.each(temp_all_list, function (index, item) {
|
||||
if (index === 0) {
|
||||
sampleId = item.sampleId;
|
||||
status =item.status;
|
||||
status = item.status;
|
||||
}
|
||||
experIdArr.push(item.experId)
|
||||
})
|
||||
let index = layer.confirm('批量' + (type === 1 ? '通过' : '不通过') + '确认前,请仔细检查数据?', {
|
||||
title: '操作提示',
|
||||
icon: 7,
|
||||
move: false
|
||||
}, function () {
|
||||
layer.close(index);
|
||||
passData(experIdArr.toString(), sampleId,status, type);
|
||||
})
|
||||
if (type === 1) { // 批量通过
|
||||
layer.confirm('确认批量通过?', {icon: 7}, function (index) {
|
||||
saveData(experIdArr, sampleId);
|
||||
})
|
||||
} else if (type === 2) { // 批量不通过
|
||||
let index = layer.confirm('批量' + (type === 1 ? '通过' : '不通过') + '确认前,请仔细检查数据?', {
|
||||
title: '操作提示',
|
||||
icon: 7,
|
||||
move: false
|
||||
}, function () {
|
||||
layer.close(index);
|
||||
passData(experIdArr.toString(), sampleId, status, type);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let checkNameArr = ['待审阅','待审核','待审批'];
|
||||
let checkNameArr = ['待审阅', '待审核', '待审批'];
|
||||
|
||||
function isCheck(value){
|
||||
function isCheck(value) {
|
||||
if (checkNameArr.indexOf(value) > -1) {
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
function saveData(experIdArr, sampleId) {
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||
let url = dataUrl + "/examine/checkData";
|
||||
let obj = {}
|
||||
obj.experIds = experIdArr;
|
||||
obj.sampleId = parseInt(sampleId);
|
||||
obj.auditStatus = 1;
|
||||
obj.auditType = typeParam;
|
||||
let params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(obj))
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.status === 200) {
|
||||
reloadData();
|
||||
parent.layer.msg(result.msg, {icon: 1});
|
||||
} else if (result.status === 500) {
|
||||
layer.alert(result.msg, {icon: 2, move: false})
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
|
@ -88,7 +88,11 @@ function initTable(dataList, limit, page) {
|
|||
{field: "sampleUserName", title: "收样人", unresize: true, align: "center"},
|
||||
{field: "sampleDate", 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",
|
||||
templet: function (d) {
|
||||
|
|
@ -162,7 +166,7 @@ function auditData(id, status, btnName) {
|
|||
let title = btnName
|
||||
let param = {
|
||||
'id': id,
|
||||
'status':status
|
||||
'status': status
|
||||
}
|
||||
openIframe3("auditData", title, "child/auditData.html", '1500px', '800px', param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,4 +88,15 @@ function formatSeconds(value) {
|
|||
} else {
|
||||
return "00:00:00";
|
||||
}
|
||||
}
|
||||
|
||||
/*设置审核状态字体颜色*/
|
||||
function setAuditStatus(value){
|
||||
if(value === '待试验' || value === '待提交' || value === '待审核' || value === '待审批' || value === '待审阅'){
|
||||
return '<span style="color: #5778f3">'+value+'</span>';
|
||||
}else if(value === '审阅不通过' || value === '审核不通过' || value === '审批不通过'){
|
||||
return '<span style="color: #f1895b ">'+value+'</span>';
|
||||
}else if(value === '试验完成'){
|
||||
return '<span style="color: #C4C4C4">'+value+'</span>';
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue