|
@@ -180,7 +180,7 @@
|
|
return currentdate;
|
|
return currentdate;
|
|
}
|
|
}
|
|
|
|
|
|
- function accordingBtn(obj, prefix,userId){
|
|
|
|
|
|
+ function accordingBtn(obj, prefix){
|
|
//var id = $(prefix+"_id").val();
|
|
//var id = $(prefix+"_id").val();
|
|
$(prefix+"_file").click();
|
|
$(prefix+"_file").click();
|
|
}
|
|
}
|
|
@@ -201,7 +201,6 @@
|
|
multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix);
|
|
multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix);
|
|
}
|
|
}
|
|
$(prefix+"_file").val(123)
|
|
$(prefix+"_file").val(123)
|
|
- //var idx1 = $("#workBaseDataList tr").length +1;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -209,17 +208,19 @@
|
|
var val = $(obj).val();
|
|
var val = $(obj).val();
|
|
var modify = $("#modify").val();
|
|
var modify = $("#modify").val();
|
|
if("modify" != modify){
|
|
if("modify" != modify){
|
|
- $("#workBaseDataList").empty();
|
|
|
|
$.ajax({
|
|
$.ajax({
|
|
type:'post',
|
|
type:'post',
|
|
- url:'${ctx}/project/projectImplementEarly/projectBasedDataList',
|
|
|
|
|
|
+ url:'${ctx}/projectcontentinfo/projectcontentinfo/projectBasedDataList',
|
|
data:{
|
|
data:{
|
|
- "typeId":val
|
|
|
|
|
|
+ "typeId":val,
|
|
|
|
+ "contentId":"${contentId}"
|
|
},
|
|
},
|
|
success:function(data){
|
|
success:function(data){
|
|
console.log(data);
|
|
console.log(data);
|
|
if(data.projectBasedDataList.length > 0){
|
|
if(data.projectBasedDataList.length > 0){
|
|
var data = data.projectBasedDataList;
|
|
var data = data.projectBasedDataList;
|
|
|
|
+ var idArr = $("#workBaseDataList tr:visible .clientId").length;
|
|
|
|
+ workBaseDataRowIdx = idArr;
|
|
for(var i=0;i<data.length;i++){
|
|
for(var i=0;i<data.length;i++){
|
|
var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
if(data[i].id!=''&&!hasInArr(data[i].id,idArr)){
|
|
if(data[i].id!=''&&!hasInArr(data[i].id,idArr)){
|
|
@@ -230,10 +231,36 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+ }else{
|
|
|
|
+ $.ajax({
|
|
|
|
+ type:'post',
|
|
|
|
+ url:'${ctx}/projectcontentinfo/projectcontentinfo/projectBasedDataList',
|
|
|
|
+ data:{
|
|
|
|
+ "typeId":val,
|
|
|
|
+ "contentId":"${contentId}"
|
|
|
|
+ },
|
|
|
|
+ success:function(data){
|
|
|
|
+ console.log(data);
|
|
|
|
+ if(data.projectBasedDataList.length > 0){
|
|
|
|
+ var data = data.projectBasedDataList;
|
|
|
|
+ var idArr = $("#workBaseDataList tr:visible .clientId").length;
|
|
|
|
+ workBaseDataRowIdx = idArr;
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
+ var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
|
|
+ if(data[i].id!=''&&!hasInArr(data[i].id,idArr)){
|
|
|
|
+ addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTplFirstModify,data[i]);
|
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_fileUrl").val(data[i].fileUrl);
|
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_fileType").val(data[i].fileType);
|
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_fileName").val(data[i].fileName);
|
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_fileAttachmentFlag").val(data[i].fileAttachmentFlag);
|
|
|
|
+ workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
$("#contentDetail").empty();
|
|
$("#contentDetail").empty();
|
|
contentDetailTypeShow(val);
|
|
contentDetailTypeShow(val);
|
|
$("#contentDetailTypeDiv").show();
|
|
$("#contentDetailTypeDiv").show();
|
|
@@ -722,7 +749,7 @@
|
|
<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${projectBasedData.fileUrl}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${projectBasedData.fileUrl}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
</c:when>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:otherwise>
|
|
- <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')" class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
|
|
|
+ <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList${idx.index}')" class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
</c:otherwise>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:choose>
|
|
|
|
|
|
@@ -768,6 +795,55 @@
|
|
</td>
|
|
</td>
|
|
<td style="text-align:center;">
|
|
<td style="text-align:center;">
|
|
<div id="workBaseDataList{{idx}}_fileTypeDiv">
|
|
<div id="workBaseDataList{{idx}}_fileTypeDiv">
|
|
|
|
+ <a class="attention-info" href="javascript:void(0)" title ="{{row.fileName}}" onclick="preview('预览','{{row.fileUrl}}','90%','90%')">{{row.fileName}}</a>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ <td style="text-align:center;">
|
|
|
|
+ {{row.uploadUser.name}}
|
|
|
|
+ </td>
|
|
|
|
+ <td style="text-align:center;">
|
|
|
|
+ {{row.uploadDate}}
|
|
|
|
+ </td>
|
|
|
|
+ <td class="text-center op-td">
|
|
|
|
+ <div id="workBaseDataList{{idx}}_operation">
|
|
|
|
+ <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList{{idx}}')" class="op-btn op-btn-edit" title="上传附件"><i class="fa fa-edit"></i> 上传</a>
|
|
|
|
+ <%--<c:if test="${'' != {{row.fileUrl}} }">
|
|
|
|
+ <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('{{row.fileUrl}}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
|
+ </c:if>--%>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>//-->
|
|
|
|
+ </script>
|
|
|
|
+ <script type="text/template" id="workBaseDataTplFirstModify">//<!--
|
|
|
|
+ <tr id="budgetList{{idx}}">
|
|
|
|
+ <td class="hide">
|
|
|
|
+ <input id="workBaseDataList{{idx}}_file" type="file" name="projectContentData.projectBasedDataList[{{idx}}].file" multiple="multiple" style="display: none;" onChange="if(this.value)insertAccording(this.value,{{idx}},'#workBaseDataList{{idx}}');"/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_flag" name="projectContentData.projectBasedDataList[{{idx}}].flag" type="hidden" value="132"/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_chooseCondition" name="projectContentData.projectBasedDataList[{{idx}}].chooseCondition" type="hidden" value="{{row.chooseCondition}}"/>
|
|
|
|
+
|
|
|
|
+ <input id="workBaseDataList{{idx}}_id" name="projectContentData.projectBasedDataList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_number" name="projectContentData.projectBasedDataList[{{idx}}].number" type="hidden" value="{{row.number}}"/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_name" name="projectContentData.projectBasedDataList[{{idx}}].name" type="hidden" value="{{row.name}}"/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_type" name="projectContentData.projectBasedDataList[{{idx}}].type" type="hidden" value="{{row.type}}"/>
|
|
|
|
+
|
|
|
|
+ <input id="workBaseDataList{{idx}}_fileType" name="projectContentData.projectBasedDataList[{{idx}}].fileType" type="hidden" value=""/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_fileName" name="projectContentData.projectBasedDataList[{{idx}}].fileName" type="hidden" value=""/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_fileUrl" name="projectContentData.projectBasedDataList[{{idx}}].fileUrl" type="hidden" value=""/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}_fileAttachmentFlag" name="projectContentData.projectBasedDataList[{{idx}}].fileAttachmentFlag" type="hidden" value=""/>
|
|
|
|
+ <input id="workBaseDataList{{idx}}}_fileAttachmentId" name="projectContentData.projectBasedDataList[{{idx}}].fileAttachmentId" type="hidden" value=""/>
|
|
|
|
+ </td>
|
|
|
|
+ <%--<td style="text-align:center;">
|
|
|
|
+ {{row.number}}
|
|
|
|
+ </td>--%>
|
|
|
|
+ <td style="text-align:center;">
|
|
|
|
+ {{row.name}}
|
|
|
|
+ </td>
|
|
|
|
+ <td style="text-align:center;">
|
|
|
|
+ {{row.typeLabel}}
|
|
|
|
+ </td>
|
|
|
|
+ <td style="text-align:center;">
|
|
|
|
+ <div id="workBaseDataList{{idx}}_fileTypeDiv">
|
|
|
|
+ <a class="attention-info" href="javascript:void(0)" title ="{{row.fileName}}" onclick="preview('预览','{{row.fileUrl}}','90%','90%')">{{row.fileName}}</a>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
<td style="text-align:center;">
|
|
<td style="text-align:center;">
|
|
@@ -778,7 +854,10 @@
|
|
</td>
|
|
</td>
|
|
<td class="text-center op-td">
|
|
<td class="text-center op-td">
|
|
<div id="workBaseDataList{{idx}}_operation">
|
|
<div id="workBaseDataList{{idx}}_operation">
|
|
- <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList{{idx}}','{{row.uploadUser.id}}')" class="op-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i> 添加附件</a>
|
|
|
|
|
|
+ <a href=javascript:void(0); onclick="accordingBtn(this, '#workBaseDataList{{idx}}')" class="op-btn op-btn-edit" title="修改附件"><i class="fa fa-edit"></i> 修改</a>
|
|
|
|
+ <%--<c:if test="${'' != {{row.fileUrl}} }">
|
|
|
|
+ <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('{{row.fileUrl}}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
|
+ </c:if>--%>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
</tr>//-->
|
|
</tr>//-->
|
|
@@ -818,6 +897,7 @@
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
var workBaseDataTplFirst = $("#workBaseDataTplFirst").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
var workBaseDataTplFirst = $("#workBaseDataTplFirst").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
|
+ var workBaseDataTplFirstModify = $("#workBaseDataTplFirstModify").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
|
|
var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
|
|
function setValuee(obj){
|
|
function setValuee(obj){
|
|
for(var i=0;i<obj.length;i++){
|
|
for(var i=0;i<obj.length;i++){
|
|
@@ -873,15 +953,19 @@
|
|
var currentUser = '${fns:getUser().id}';
|
|
var currentUser = '${fns:getUser().id}';
|
|
var contentId = '${projectcontentinfo.projectContentData.id}';
|
|
var contentId = '${projectcontentinfo.projectContentData.id}';
|
|
console.log(contentId);
|
|
console.log(contentId);
|
|
-
|
|
|
|
|
|
+ var condition = "${flag}";
|
|
$.ajax({
|
|
$.ajax({
|
|
type:"post",
|
|
type:"post",
|
|
url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
|
|
url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
|
|
- data:{"contentId":contentId,"basedId":id},
|
|
|
|
|
|
+ data:{"contentId":contentId,"basedId":id,"condition":condition},
|
|
dataType:"json",
|
|
dataType:"json",
|
|
success:function(data){
|
|
success:function(data){
|
|
if(data.success) {
|
|
if(data.success) {
|
|
- $(obj).parent().parent().remove();
|
|
|
|
|
|
+ if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition ){
|
|
|
|
+ $(obj).parent().parent().parent().remove();
|
|
|
|
+ }else{
|
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
|
+ }
|
|
if(data.body.inuse){
|
|
if(data.body.inuse){
|
|
return;
|
|
return;
|
|
}
|
|
}
|