Commit d5dcd4f0 authored by 18083's avatar 18083

电子签约文件大小取值位置调整

parent 15858380
......@@ -80,11 +80,13 @@
var data = con_num_map.getChildren();
var v_con_id = data[0].contract_id;
for (var j = 0; j < docs_list.length; j++) {
var file_size=get_file_length(docs_list[j].fileUrl.replace('/mnt','Z:'));
con_ele_file_dl_bm.update({
contract_id: v_con_id,
file_name: docs_list[j].fileName,
file_url: docs_list[j].fileUrl.replace('/mnt','X:'),
file_size:docs_list[j].fileSize
file_url: docs_list[j].fileUrl.replace('/mnt','Z:'),
//file_size:docs_list[j].fileSize
file_size:file_size
})
}
con_ele_file_dl_bm.execute({
......@@ -113,6 +115,17 @@
$ctx.parameter.json = JSON.stringify(result);
}
//获取文件长度
function get_file_length(path){
var file=new File(String(path));
if (file.exists() && file.isFile()){
length=file.length();
return length;
} else{
return 0;
}
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
ele_file_download();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment