Commit a0a40d85 authored by Asjoker's avatar Asjoker

问卷管理-详情细化

parent b4539e5a
...@@ -235,6 +235,11 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. ...@@ -235,6 +235,11 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
<div class="col-sm-4"> <div class="col-sm-4">
<a class="btn btn-primary" onclick="file_DIV_Show('0', 15)" id="upload_situation"><strong>添加</strong></a> <a class="btn btn-primary" onclick="file_DIV_Show('0', 15)" id="upload_situation"><strong>添加</strong></a>
<a class="btn btn-primary" id="download_15" onclick="downloadMultiFiles(15)"><strong>下载</strong></a> <a class="btn btn-primary" id="download_15" onclick="downloadMultiFiles(15)"><strong>下载</strong></a>
<br>
<span id="label_15" class="grayTip">
如果您不上传新文件,那此处保存的仍是当前下载压缩包中的文件;<br>
若上传新文件,则以新文件为准。不包含下载压缩包中的文件
</span>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 15px"> <div class="row" style="margin-top: 15px">
...@@ -836,9 +841,13 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. ...@@ -836,9 +841,13 @@ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.
<label class="col-sm-3 control-label">由财务部门出具的相关证明照片或PDF格式文件 <span class="text-danger">*</span></label> <label class="col-sm-3 control-label">由财务部门出具的相关证明照片或PDF格式文件 <span class="text-danger">*</span></label>
<div class="col-sm-4"> <div class="col-sm-4">
<a class="btn btn-primary" onclick="file_DIV_Show('0', 61)" id="upload_badget"><strong>添加</strong></a> <a class="btn btn-primary" onclick="file_DIV_Show('0', 61)" id="upload_badget"><strong>添加</strong></a>
<a class="btn btn-primary" id="download_61" onclick="downloadMultiFiles(61)"><strong>下载</strong></a> <label class="grayTip">支持格式: .jpg、 .gif、 .pdf</label>
<label class="grayTip">支持格式: .jpg、 .gif、 .pdf</label> <a class="btn btn-primary" id="download_61" onclick="downloadMultiFiles(61)"><strong>下载</strong></a>
<label id="label_61" class="grayTip">
如果您不上传新文件,那此处保存的仍是当前下载压缩包中的文件;<br>
若上传新文件,则以新文件为准。不包含下载压缩包中的文件
</label>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 15px"> <div class="row" style="margin-top: 15px">
......
...@@ -265,12 +265,13 @@ function toValidate() { ...@@ -265,12 +265,13 @@ function toValidate() {
swal("失败!", '3.每块场地实景照片1张' + ' 存在未填项', "error"); swal("失败!", '3.每块场地实景照片1张' + ' 存在未填项', "error");
return; return;
} }
if (file_list.length<1){
if (file_list.length<1 && old_file_list.length<1){
validateFlag = false validateFlag = false
swal("失败!", '4.填写《关于众创空间运营情况的相关说明》' + ' 存在未填项', "error"); swal("失败!", '4.填写《关于众创空间运营情况的相关说明》' + ' 存在未填项', "error");
return; return;
} }
if (file_list_2.length<1){ if (file_list_2.length<1 && old_file_list_2.length<1){
validateFlag = false validateFlag = false
swal("失败!", '11.由财务部门出具的相关证明照片或PDF格式文件' + ' 存在未填项', "error"); swal("失败!", '11.由财务部门出具的相关证明照片或PDF格式文件' + ' 存在未填项', "error");
return; return;
...@@ -300,7 +301,9 @@ function all_order() { ...@@ -300,7 +301,9 @@ function all_order() {
nineteen_order(); nineteen_order();
$('#download_15').hide(); $('#download_15').hide();
$('#label_15').hide();
$('#download_61').hide(); $('#download_61').hide();
$('#label_61').hide();
} }
// 各表格序号计数方法 // 各表格序号计数方法
...@@ -562,6 +565,8 @@ function file_DIV_delete_8(group){ ...@@ -562,6 +565,8 @@ function file_DIV_delete_8(group){
// }) // })
// }); // });
// 获取暂存数据 // 获取暂存数据
function getSaveData() { function getSaveData() {
var param = { var param = {
...@@ -626,9 +631,13 @@ function getSaveData() { ...@@ -626,9 +631,13 @@ function getSaveData() {
} }
if (item.optionsId === 15){ if (item.optionsId === 15){
$('#download_15').show(); $('#download_15').show();
$('#label_15').show();
old_file_list.push(item);
} }
if (item.optionsId === 61){ if (item.optionsId === 61){
$('#download_61').show(); $('#download_61').show();
$('#label_61').show();
old_file_list_2.push(item);
} }
}) })
img_DIV_List_Show(); img_DIV_List_Show();
...@@ -690,20 +699,34 @@ function saveQuestionnaire(type){ ...@@ -690,20 +699,34 @@ function saveQuestionnaire(type){
formData.push(tempObj2); formData.push(tempObj2);
} }
for(var file_i in file_list){ if (file_list.length<1){
var fileObj1 = {} for(var ofile_id in old_file_list){
fileObj1['optionsId'] = 15; formData.push(old_file_list[ofile_id])
fileObj1['group'] = file_i; }
fileObj1['value'] = file_list[file_i].fileId } else {
formData.push(fileObj1) for(var file_i in file_list){
var fileObj1 = {}
fileObj1['optionsId'] = 15;
fileObj1['group'] = file_i;
fileObj1['value'] = file_list[file_i].fileId
formData.push(fileObj1)
}
} }
for(var file_id in file_list_2){
var fileObj2 = {} if (file_list_2.length<1){
fileObj2['optionsId'] = 61; for(var ofile_id2 in old_file_list_2){
fileObj2['group'] = file_id; formData.push(old_file_list_2[ofile_id2])
fileObj2['value'] = file_list_2[file_id].fileId }
formData.push(fileObj2) } else {
for(var file_id in file_list_2){
var fileObj2 = {}
fileObj2['optionsId'] = 61;
fileObj2['group'] = file_id;
fileObj2['value'] = file_list_2[file_id].fileId
formData.push(fileObj2)
}
} }
for (var i in tempImgList){ for (var i in tempImgList){
var fileObjImg = {} var fileObjImg = {}
fileObjImg['optionsId'] = 8; fileObjImg['optionsId'] = 8;
...@@ -751,6 +774,11 @@ function previews(url) { ...@@ -751,6 +774,11 @@ function previews(url) {
window.open(`${window.location.origin}${url}`) window.open(`${window.location.origin}${url}`)
} }
// 保存上次上传文件
var old_file_list=new Array();
var old_file_list_2=new Array();
// 多文件上传 // 多文件上传
var file_list=new Array(); var file_list=new Array();
var file_list_update_id=1; var file_list_update_id=1;
......
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