|
@@ -12,6 +12,7 @@
|
|
|
}
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
+ var enterInt = 0;
|
|
|
$.fn.serializeJson=function(){
|
|
|
var serializeObj={};
|
|
|
var array=this.serializeArray();
|
|
@@ -186,6 +187,8 @@
|
|
|
}
|
|
|
|
|
|
function insertAccording(tValue,idx,prefix) {
|
|
|
+ //当前登陆人
|
|
|
+ var currentUser = '${fns:getUser().name}';
|
|
|
var files = $(prefix+"_file")[0].files;
|
|
|
for(var i=0;i<files.length;i++) {
|
|
|
var file = files[i];
|
|
@@ -198,7 +201,7 @@
|
|
|
var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
|
|
|
/*将这段字符串存到数据库即可*/
|
|
|
var divId = "_attachment";
|
|
|
- multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix);
|
|
|
+ multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix,currentUser);
|
|
|
}
|
|
|
$(prefix+"_file").val(123)
|
|
|
}
|
|
@@ -260,8 +263,10 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
$("#contentDetail").empty();
|
|
|
+ if(enterInt > 0){
|
|
|
+ $("#workBaseDataList").empty();
|
|
|
+ }
|
|
|
contentDetailTypeShow(val);
|
|
|
$("#contentDetailTypeDiv").show();
|
|
|
$("#projectContentDataSign").val(val);
|
|
@@ -339,6 +344,7 @@
|
|
|
$("#contentDetail").html("");
|
|
|
break;
|
|
|
}
|
|
|
+ enterInt+=1;
|
|
|
}
|
|
|
|
|
|
function addFile() {
|
|
@@ -676,6 +682,7 @@
|
|
|
<%--<th>资料编号</th>--%>
|
|
|
<th >资料名称</th>
|
|
|
<th >资料类别</th>
|
|
|
+ <th >资料性质</th>
|
|
|
<th >资料内容</th>
|
|
|
<th >上传人</th>
|
|
|
<th >上传日期</th>
|
|
@@ -712,6 +719,11 @@
|
|
|
<%-- ${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}--%>
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList${idx.index}_nature">
|
|
|
+ ${projectBasedData.nature}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
<div id="workBaseDataList${idx.index}_fileTypeDiv">
|
|
|
<c:choose>
|
|
|
<c:when test="${fn:containsIgnoreCase(projectBasedData.fileName,'jpg')
|
|
@@ -756,7 +768,7 @@
|
|
|
|
|
|
</c:when>
|
|
|
<c:otherwise>
|
|
|
- <a href=javascript:void(0); onclick="delRowBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')" class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
|
|
|
+ <a href=javascript:void(0); onclick="delBaseData(this, '#workBaseDataList${idx.index}','${projectBasedData.uploadUser.id}')" class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
</div>
|
|
@@ -795,15 +807,24 @@
|
|
|
{{row.typeLabel}}
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_nature">
|
|
|
+ {{row.nature}}
|
|
|
+ </div>
|
|
|
+ </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>
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_uploadUserName">
|
|
|
{{row.uploadUser.name}}
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_uploadDate">
|
|
|
{{row.uploadDate}}
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td class="text-center op-td">
|
|
|
<div id="workBaseDataList{{idx}}_operation">
|
|
@@ -843,15 +864,24 @@
|
|
|
{{row.typeLabel}}
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_nature">
|
|
|
+ {{row.nature}}
|
|
|
+ </div>
|
|
|
+ </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>
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_uploadUserName">
|
|
|
{{row.uploadUser.name}}
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_uploadDate">
|
|
|
{{row.uploadDate}}
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td class="text-center op-td">
|
|
|
<div id="workBaseDataList{{idx}}_operation">
|
|
@@ -881,6 +911,11 @@
|
|
|
{{row.typeLabel}}
|
|
|
</td>
|
|
|
<td style="text-align:center;">
|
|
|
+ <div id="workBaseDataList{{idx}}_nature">
|
|
|
+ {{row.nature}}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
<div id="workBaseDataList{{idx}}_fileTypeDiv">
|
|
|
</div>
|
|
|
</td>
|
|
@@ -905,6 +940,7 @@
|
|
|
var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
|
if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_nature").html("引用");
|
|
|
workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
}
|
|
|
}
|
|
@@ -962,7 +998,39 @@
|
|
|
dataType:"json",
|
|
|
success:function(data){
|
|
|
if(data.success) {
|
|
|
- if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition ){
|
|
|
+ if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }else{
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }
|
|
|
+ if(data.body.inuse){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (currentUser == userId) {
|
|
|
+ confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ top.layer.msg("删除依据资料失败!", {icon: 0});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ function delBaseData(obj, prefix,userId){
|
|
|
+ var id = $(prefix+"_id").val();
|
|
|
+ var currentUser = '${fns:getUser().id}';
|
|
|
+ var contentId = '${projectcontentinfo.projectContentData.id}';
|
|
|
+ console.log(contentId);
|
|
|
+ var condition = "${flag}";
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
|
|
|
+ data:{"contentId":contentId,"basedId":id,"condition":condition},
|
|
|
+ dataType:"json",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
|
|
|
$(obj).parent().parent().parent().remove();
|
|
|
}else{
|
|
|
$(obj).parent().parent().remove();
|