增加查看附件的功能

This commit is contained in:
duxp 2023-10-17 09:33:44 +08:00
parent 66053af0f7
commit 38af3eb6b8
3 changed files with 41 additions and 12 deletions

View File

@ -114,16 +114,34 @@
} }
function reback(){ function reback(){
let id = parent.parent.a_upload_id;
$.ajax({ layer.open({
type: "get", title:'驳回',
url: ctx + "base/affairs/reback?id="+id, type: 1,
data: { area:['40%','40%'],
}, content: '<div style="box-sizing: border-box;padding: 10px">' +
success: function(data) { '<textarea class="remark_val" placeholder="请输入驳回意见" name="remark" style="width: 100%"></textarea>' +
parent.window.location.reload(); '<button class="btn btn-primary" onclick="rebackSubmit()">提交</button></div>' //这里content是一个普通的String
}
}); });
}
function rebackSubmit() {
let _remark = $(".remark_val").val();
if(_remark === ''){
layer.msg('请输入驳回意见!', {icon: 2});
}else{
let id = parent.parent.a_upload_id;
$.ajax({
type: "get",
url: ctx + "base/affairs/reback?id="+id+'&remark='+_remark,
data: {
},
success: function(data) {
parent.window.location.reload();
}
});
}
} }
$("#datetimepicker-demo-1").datetimepicker(); $("#datetimepicker-demo-1").datetimepicker();

View File

@ -130,7 +130,11 @@
}else{ }else{
$(".err_tips").text(""); $(".err_tips").text("");
_files.forEach(item => { _files.forEach(item => {
uploadFileFn(item) if(item.size > 52428800){
layer.msg('【'+item.name+'】上传失败文件大小最大为50MB', {icon: 2});
}else{
uploadFileFn(item)
}
}) })
} }
} }

View File

@ -187,7 +187,10 @@
}, },
{ {
field: 'reviewer', field: 'reviewer',
title: '审批人' title: '审批人',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
}, },
{ {
field: 'status', field: 'status',
@ -206,6 +209,10 @@
return actions.join(''); return actions.join('');
} }
}, },
{
field: 'remark',
title: '备注'
},
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
@ -239,7 +246,7 @@
let detailed = $(this)[0].dataset.detailed; let detailed = $(this)[0].dataset.detailed;
layer.open({ layer.open({
title:'审批', title:'审批',
area:['40%','50%'], area:['80%','80%'],
type:2, type:2,
content:'/base/affairs/reviewed?id='+_id, content:'/base/affairs/reviewed?id='+_id,
success(res,index){ success(res,index){