|
@@ -3051,19 +3051,21 @@ $(document).ready(() => {
|
|
|
$('#show-att tr').eq(3).children('td').eq(0).text(att.username);
|
|
|
$('#show-att tr').eq(3).children('td').eq(1).text(att.in_time);
|
|
|
$('#show-att tr').eq(4).children('td').text(att.remark);
|
|
|
- if (parseInt(userID) === att.uid) {
|
|
|
+ // 附件uid等于当前用户id, 附件上传本人
|
|
|
+ if (parseInt(cur_uid) === att.uid) {
|
|
|
$('#btn-att').show();
|
|
|
- if (stage.status === auditConst.status.checked) {
|
|
|
- if (parseInt(att.re_upload) === 1) {
|
|
|
- $('#btn-att a').eq(3).show();
|
|
|
- } else {
|
|
|
- $('#btn-att a').eq(3).hide();
|
|
|
- }
|
|
|
- }
|
|
|
+ let showDel = true;
|
|
|
+
|
|
|
+ // 审核完成后再上传的,上传者可删除附件
|
|
|
+ if (stage.status === auditConst.status.checked && !parseInt(att.re_upload)) showDel = false;
|
|
|
+
|
|
|
+ // 审核被退回,原报上传的附件可以删除
|
|
|
+ if (stage.status === auditConst.status.checkNo && parseInt(cur_uid) !== stage.user_id) showDel = false;
|
|
|
+
|
|
|
// 台账未上报、当前用户为原报, 可以删除附件
|
|
|
- if (stage.status === auditConst.status.uncheck && stage.user_id === parseInt(cur_uid)) {
|
|
|
- $('#btn-att a').eq(3).show();
|
|
|
- }
|
|
|
+ if (stage.status === auditConst.status.uncheck && stage.user_id !== parseInt(cur_uid)) showDel = false;
|
|
|
+
|
|
|
+ if (showDel) $('#btn-att a').eq(3).show();
|
|
|
// $('#btn-att a').eq(3).show();
|
|
|
$('#btn-att a').eq(2).hide();
|
|
|
$('#btn-att a').eq(4).hide();
|