增加查看附件的功能

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,10 +114,27 @@
} }
function reback(){ function reback(){
layer.open({
title:'驳回',
type: 1,
area:['40%','40%'],
content: '<div style="box-sizing: border-box;padding: 10px">' +
'<textarea class="remark_val" placeholder="请输入驳回意见" name="remark" style="width: 100%"></textarea>' +
'<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; let id = parent.parent.a_upload_id;
$.ajax({ $.ajax({
type: "get", type: "get",
url: ctx + "base/affairs/reback?id="+id, url: ctx + "base/affairs/reback?id="+id+'&remark='+_remark,
data: { data: {
}, },
success: function(data) { success: function(data) {
@ -125,6 +142,7 @@
} }
}); });
} }
}
$("#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 => {
if(item.size > 52428800){
layer.msg('【'+item.name+'】上传失败文件大小最大为50MB', {icon: 2});
}else{
uploadFileFn(item) 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){