|
@@ -93,7 +93,7 @@
|
|
|
$.ajax({
|
|
|
type:"post",
|
|
|
url:'${ctx}/projectcontentinfo/projectcontentinfo/getAchievementTypeList',
|
|
|
- data:{"achievementParentId":achievementParentId,type:1},
|
|
|
+ data:{"achievementParentId":"",type:1},
|
|
|
dataType:"json",
|
|
|
success:function(data){
|
|
|
if(data.success) {
|
|
@@ -108,7 +108,7 @@
|
|
|
$('#achievementType').append(new Option(dataList[i].label, dataList[i].value,null,flag));
|
|
|
}
|
|
|
|
|
|
- layui.form.render("select");
|
|
|
+ layui.form.render("select");
|
|
|
}else {
|
|
|
top.layer.msg("获取数据失败!", {icon: 0});
|
|
|
}
|
|
@@ -843,6 +843,24 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ function deleteFileFromAliyun(obj,deleteUrl){
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:deleteUrl,
|
|
|
+ success:function(data){
|
|
|
+ if(data.str){
|
|
|
+ parent.layer.msg('删除成功',{icon:1});
|
|
|
+
|
|
|
+ $("#contentTableBase").load(location.href + " #contentTableBase");
|
|
|
+
|
|
|
+ }else {
|
|
|
+ parent.layer.msg('删除失败',{icon:1});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
@@ -916,11 +934,11 @@
|
|
|
<div class="layui-item layui-col-sm6">
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
|
|
|
<div class="layui-input-block">
|
|
|
- <select name="projectReportData.achievementType" id="achievementType" lay-verify="achievementType" lay-filter="reviewStandardFilter"></select>
|
|
|
- <%--<form:select path="projectReportData.achievementType" class="required">
|
|
|
+ <%--<select name="projectReportData.achievementType" id="achievementType" disabled lay-verify="achievementType" lay-filter="reviewStandardFilter"></select>--%>
|
|
|
+ <form:select path="projectReportData.achievementType" class="required" lay-verify="achievementType" lay-filter="reviewStandardFilter">
|
|
|
<form:option value="" label=""/>
|
|
|
<form:options items="${fns:getMainDictList('achievement_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
- </form:select>--%>
|
|
|
+ </form:select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6">
|
|
@@ -1029,19 +1047,19 @@
|
|
|
</div>--%>
|
|
|
<div class="form-group layui-row first lw12">
|
|
|
<div class="form-group-label"><h2>依据性资料明细</h2></div>
|
|
|
- <%--<div class="layui-item nav-btns">
|
|
|
- <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
|
|
|
+ <%--<div class="layui-item nav-btns">
|
|
|
+ <a href="javascript:void(0)" onclick="openDialogre('新增依据性资料', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=basedData&dictType=${projectcontentinfo.dictType}&id=${projectcontentinfo.id}&parentIds=${projectcontentinfo.parentIds}','90%','90%','inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增</a>
|
|
|
|
|
|
- <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
|
|
|
- cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
|
|
|
- </div>--%>
|
|
|
+ <sys:gridselectBaseData url="${ctx}/projectcontentinfo/projectBasedData/selectList" id="baseData" title="选择依据资料"
|
|
|
+ cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('依据资料名称')}" searchKey="name"></sys:gridselectBaseData>
|
|
|
+ </div>--%>
|
|
|
|
|
|
<div class="layui-item layui-col-xs12 form-table-container">
|
|
|
<table id="contentTableBase" class="table table-bordered table-condensed details">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th class="hide"></th>
|
|
|
- <%--<th >资料编号</th>--%>
|
|
|
+ <%--<th >资料编号</th>--%>
|
|
|
<th >资料名称</th>
|
|
|
<th >资料类别</th>
|
|
|
<th >资料性质</th>
|
|
@@ -1069,9 +1087,9 @@
|
|
|
<input id="workBaseDataList${idx.index}_fileAttachmentFlag" name="projectReportData.projectBasedDataList[${idx.index}].fileAttachmentFlag" type="hidden" value=""/>
|
|
|
<input id="workBaseDataList${idx.index}_fileAttachmentId" name="projectReportData.projectBasedDataList[${idx.index}].fileAttachmentId" type="hidden" value=""/>
|
|
|
</td>
|
|
|
- <%-- <td style="text-align:center;">
|
|
|
- ${idx.index+1}
|
|
|
- </td>--%>
|
|
|
+ <%-- <td style="text-align:center;">
|
|
|
+ ${idx.index+1}
|
|
|
+ </td>--%>
|
|
|
<td style="text-align:center;">
|
|
|
${projectBasedData.name}
|
|
|
</td>
|
|
@@ -1141,22 +1159,23 @@
|
|
|
|
|
|
<td class="text-center op-td">
|
|
|
<div id="workBaseDataList${idx.index}_operation">
|
|
|
- <c:choose>
|
|
|
- <c:when test="${ projectBasedData.flag =='according'}">
|
|
|
- <c:choose>
|
|
|
- <c:when test="${not empty projectBasedData.fileUrl}">
|
|
|
- <a href="${projectBasedData.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
- </c:when>
|
|
|
- <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>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${ projectBasedData.flag =='according'}">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${not empty projectBasedData.fileUrl}">
|
|
|
+ <%--<a href="${projectBasedData.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>--%>
|
|
|
+ <a href="javascript:void(0)" onclick="accordingBtn(this,'#workBaseDataList${idx.index}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>
|
|
|
+ </c:when>
|
|
|
+ <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>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
|
|
|
- </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>--%>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
+ </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>--%>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -1200,157 +1219,157 @@
|
|
|
</tr>//-->
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
- var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
- var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
|
|
|
- /* function setValuee(obj){
|
|
|
- var idx = $("#workBaseDataList tr").length;
|
|
|
- if(existBaseData(obj.id,idx)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,obj);
|
|
|
- }*/
|
|
|
- function setValuee(obj){
|
|
|
- for(var i=0;i<obj.length;i++){
|
|
|
- var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
|
- if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
- addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
|
|
|
- workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- function existBaseData(id,length) {
|
|
|
- for (var i=0;i<length;i++) {
|
|
|
- var val = $('#workBaseDataList'+i+'_id').val();
|
|
|
- if(id==val){
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
+ var workBaseDataTpl = $("#workBaseDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ var workBaseDataRowIdx = ${fn:length(projectcontentinfo.projectReportData.projectBasedDataList)};
|
|
|
+ /* function setValuee(obj){
|
|
|
+ var idx = $("#workBaseDataList tr").length;
|
|
|
+ if(existBaseData(obj.id,idx)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,obj);
|
|
|
+ }*/
|
|
|
+ function setValuee(obj){
|
|
|
+ for(var i=0;i<obj.length;i++){
|
|
|
+ var idArr = $("#workBaseDataList tr:visible .clientId");
|
|
|
+ if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
+ addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
|
|
|
+ workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function existBaseData(id,length) {
|
|
|
+ for (var i=0;i<length;i++) {
|
|
|
+ var val = $('#workBaseDataList'+i+'_id').val();
|
|
|
+ if(id==val){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- function addRowBaseData(list, idx, tpl, row){
|
|
|
- bornTemplete(list, idx, tpl, row, idx);
|
|
|
- }
|
|
|
+ function addRowBaseData(list, idx, tpl, row){
|
|
|
+ bornTemplete(list, idx, tpl, row, idx);
|
|
|
+ }
|
|
|
|
|
|
- function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
- var idx1 = $("#workBaseDataList tr").length +1;
|
|
|
- $(list).append(Mustache.render(tpl, {
|
|
|
- idx: idx, delBtn: true, row: row,
|
|
|
- order:idx1 + 1, idx1:idx1
|
|
|
- }));
|
|
|
- $(list+idx).find("select").each(function(){
|
|
|
- $(this).val($(this).attr("data-value"));
|
|
|
- });
|
|
|
- $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
- var ss = $(this).attr("data-value").split(',');
|
|
|
- for (var i=0; i<ss.length; i++){
|
|
|
- if($(this).val() == ss[i]){
|
|
|
- $(this).attr("checked","checked");
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- function delRowBaseData(obj, prefix,userId){
|
|
|
- var id = $(prefix+"_id").val();
|
|
|
- /* var createBy = $(prefix+"_userId").val();*/
|
|
|
- var currentUser = '${fns:getUser().id}';
|
|
|
- var contentId = '${projectcontentinfo.projectReportData.id}';
|
|
|
- console.log(contentId);
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- type:"post",
|
|
|
- url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
|
|
|
- data:{"contentId":contentId,"basedId":id},
|
|
|
- dataType:"json",
|
|
|
- success:function(data){
|
|
|
- if(data.success) {
|
|
|
- $(obj).parent().parent().remove();
|
|
|
- /*parent.parent.refreshTrees();*/
|
|
|
- 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 bornTemplete(list, idx, tpl, row, idx1){
|
|
|
+ var idx1 = $("#workBaseDataList tr").length +1;
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1, idx1:idx1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function delRowBaseData(obj, prefix,userId){
|
|
|
+ var id = $(prefix+"_id").val();
|
|
|
+ /* var createBy = $(prefix+"_userId").val();*/
|
|
|
+ var currentUser = '${fns:getUser().id}';
|
|
|
+ var contentId = '${projectcontentinfo.projectReportData.id}';
|
|
|
+ console.log(contentId);
|
|
|
|
|
|
- function confirmDelete(mess, href){
|
|
|
- top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
- //do something
|
|
|
- if (typeof href == 'function') {
|
|
|
- href();
|
|
|
- }else{
|
|
|
- $.ajax({
|
|
|
- url:href,
|
|
|
- type:"post",
|
|
|
- success:function(data){
|
|
|
- if(data.success){
|
|
|
- top.layer.msg("删除依据资料成功!", {icon: 0});
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- top.layer.close(index);
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
|
|
|
+ data:{"contentId":contentId,"basedId":id},
|
|
|
+ dataType:"json",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ /*parent.parent.refreshTrees();*/
|
|
|
+ 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 confirmDelete(mess, href){
|
|
|
+ top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
|
|
|
+ //do something
|
|
|
+ if (typeof href == 'function') {
|
|
|
+ href();
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ url:href,
|
|
|
+ type:"post",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success){
|
|
|
+ top.layer.msg("删除依据资料成功!", {icon: 0});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ top.layer.close(index);
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
</script>
|
|
|
</div>
|
|
|
<div class="form-group layui-row first lw12">
|
|
|
- <div class="form-group-label"><h2>依据工作内容</h2></div>
|
|
|
+ <div class="form-group-label"><h2>依据工作内容</h2></div>
|
|
|
|
|
|
- <!-- 表格 -->
|
|
|
- <%--<div class="layui-item nav-btns">
|
|
|
- <sys:gridselectContentData url="${ctx}/projectcontentinfo/projectContentData/selectcontentData" id="contentData" title="选择工作内容"
|
|
|
- cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('工作内容名称')}" searchKey="name"></sys:gridselectContentData>
|
|
|
- </div>--%>
|
|
|
- <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
- <table id="contentTable" class="table details table-bordered table-condensed">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th style="text-align: center;width:10%">工作内容编号</th>
|
|
|
- <th style="text-align: center;width:20%">工作内容名称</th>
|
|
|
- <th style="text-align: center;width:25%">工作内容类型</th>
|
|
|
- <th style="text-align: center;width:15%">负责人</th>
|
|
|
- <th style="text-align: center;width:20%">创建时间</th>
|
|
|
- <%--<th style="text-align: center;width:10%">操作</th>--%>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="projectContentDataList">
|
|
|
- <c:forEach items="${projectcontentinfo.projectReportData.projectContentDataList}" var="projectContentData" varStatus="index">
|
|
|
+ <!-- 表格 -->
|
|
|
+ <%--<div class="layui-item nav-btns">
|
|
|
+ <sys:gridselectContentData url="${ctx}/projectcontentinfo/projectContentData/selectcontentData" id="contentData" title="选择工作内容"
|
|
|
+ cssClass="form-control" projectId="${projectcontentinfo.project.id}" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('工作内容名称')}" searchKey="name"></sys:gridselectContentData>
|
|
|
+ </div>--%>
|
|
|
+ <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
+ <table id="contentTable" class="table details table-bordered table-condensed">
|
|
|
+ <thead>
|
|
|
<tr>
|
|
|
- <td>
|
|
|
- <input id="projectContentDataList${index.index}_id" name="projectReportData.projectContentDataList[${index.index}].id" type="hidden" value="${projectContentData.id}"/>
|
|
|
- <input id="projectContentDataList${index.index}_delFalg" name="projectReportData.projectContentDataList[${index.index}].delFalg" type="hidden" value="1"/>
|
|
|
-
|
|
|
- ${projectContentData.number}
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- ${projectContentData.name}
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- ${fns:getProjectTypeName(projectContentData.type,"")}
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- ${projectContentData.masterName}
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
|
- </td>
|
|
|
- <%--<td>
|
|
|
- <a href="javascript:void(0)" onclick="delRowData(this, '#projectContentDataList${index.index}','${projectContentData.id}')" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 取消</a>
|
|
|
- </td>--%>
|
|
|
+ <th style="text-align: center;width:10%">工作内容编号</th>
|
|
|
+ <th style="text-align: center;width:20%">工作内容名称</th>
|
|
|
+ <th style="text-align: center;width:25%">工作内容类型</th>
|
|
|
+ <th style="text-align: center;width:15%">负责人</th>
|
|
|
+ <th style="text-align: center;width:20%">创建时间</th>
|
|
|
+ <%--<th style="text-align: center;width:10%">操作</th>--%>
|
|
|
</tr>
|
|
|
- </c:forEach>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- <script type="text/template" id="projectContentDataTpl">//<!--
|
|
|
+ </thead>
|
|
|
+ <tbody id="projectContentDataList">
|
|
|
+ <c:forEach items="${projectcontentinfo.projectReportData.projectContentDataList}" var="projectContentData" varStatus="index">
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <input id="projectContentDataList${index.index}_id" name="projectReportData.projectContentDataList[${index.index}].id" type="hidden" value="${projectContentData.id}"/>
|
|
|
+ <input id="projectContentDataList${index.index}_delFalg" name="projectReportData.projectContentDataList[${index.index}].delFalg" type="hidden" value="1"/>
|
|
|
+
|
|
|
+ ${projectContentData.number}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${projectContentData.name}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${fns:getProjectTypeName(projectContentData.type,"")}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ ${projectContentData.masterName}
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ </td>
|
|
|
+ <%--<td>
|
|
|
+ <a href="javascript:void(0)" onclick="delRowData(this, '#projectContentDataList${index.index}','${projectContentData.id}')" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 取消</a>
|
|
|
+ </td>--%>
|
|
|
+ </tr>
|
|
|
+ </c:forEach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <script type="text/template" id="projectContentDataTpl">//<!--
|
|
|
<tr id="budgetList{{idx}}">
|
|
|
<td class="hide">
|
|
|
<input id="projectContentDataList{{idx}}_id" name="projectReportData.projectContentDataList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
@@ -1375,75 +1394,75 @@
|
|
|
<a href="#" onclick="delRow(this, '#projectContentDataList{{idx}}','{{row.id}}')" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 取消</a>
|
|
|
</td>
|
|
|
</tr>//-->
|
|
|
- </script>
|
|
|
- <script type="text/javascript">
|
|
|
- var projectContentDataTpl = $("#projectContentDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
- function setValueeContent(obj){
|
|
|
- var idx = $("#projectContentDataList tr").length;
|
|
|
- if(existContentData(obj.id,idx)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- addRowContentData("#projectContentDataList",idx,projectContentDataTpl,obj);
|
|
|
- }
|
|
|
-
|
|
|
- function existContentData(id,length) {
|
|
|
- for (var i=0;i<length;i++) {
|
|
|
- var val = $('#projectContentDataList'+i+'_id').val();
|
|
|
- if(id==val){
|
|
|
- return true;
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var projectContentDataTpl = $("#projectContentDataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ function setValueeContent(obj){
|
|
|
+ var idx = $("#projectContentDataList tr").length;
|
|
|
+ if(existContentData(obj.id,idx)) {
|
|
|
+ return;
|
|
|
}
|
|
|
+ addRowContentData("#projectContentDataList",idx,projectContentDataTpl,obj);
|
|
|
}
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
- function addRowContentData(list, idx, tpl, row){
|
|
|
- bornTemplete(list, idx, tpl, row, idx);
|
|
|
- }
|
|
|
- function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
- var idx1 = $("#workBaseDataList tr").length +1;
|
|
|
- $(list).append(Mustache.render(tpl, {
|
|
|
- idx: idx, delBtn: true, row: row,
|
|
|
- order:idx1 + 1, idx1:idx1
|
|
|
- }));
|
|
|
- $(list+idx).find("select").each(function(){
|
|
|
- $(this).val($(this).attr("data-value"));
|
|
|
- });
|
|
|
- $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
- var ss = $(this).attr("data-value").split(',');
|
|
|
- for (var i=0; i<ss.length; i++){
|
|
|
- if($(this).val() == ss[i]){
|
|
|
- $(this).attr("checked","checked");
|
|
|
+ function existContentData(id,length) {
|
|
|
+ for (var i=0;i<length;i++) {
|
|
|
+ var val = $('#projectContentDataList'+i+'_id').val();
|
|
|
+ if(id==val){
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- function delRow(obj, prefix){
|
|
|
- $(prefix+"_delFalg").val("1");
|
|
|
- $(obj).parent().parent().remove();
|
|
|
- }
|
|
|
- function delRowData(obj, prefix){
|
|
|
- var contentId = $(prefix+"_id").val();
|
|
|
- var reportId = '${projectcontentinfo.projectReportData.id}';
|
|
|
- var projectId = '${projectcontentinfo.project.id}';
|
|
|
- if(reportId!=null&&reportId!=''){
|
|
|
- $.ajax({
|
|
|
- type:"post",
|
|
|
- url:'${ctx}/projectcontentinfo/projectcontentinfo/ajaxContentdelete',
|
|
|
- data:{"contentId":contentId,"reportId":reportId,"projectId":projectId},
|
|
|
- dataType:"json",
|
|
|
- success:function(data){
|
|
|
- if(data.success) {
|
|
|
- $(obj).parent().parent().remove();
|
|
|
+ function addRowContentData(list, idx, tpl, row){
|
|
|
+ bornTemplete(list, idx, tpl, row, idx);
|
|
|
+ }
|
|
|
+ function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
+ var idx1 = $("#workBaseDataList tr").length +1;
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1, idx1:idx1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
- return;
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
- </script>
|
|
|
+
|
|
|
+ function delRow(obj, prefix){
|
|
|
+ $(prefix+"_delFalg").val("1");
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }
|
|
|
+ function delRowData(obj, prefix){
|
|
|
+ var contentId = $(prefix+"_id").val();
|
|
|
+ var reportId = '${projectcontentinfo.projectReportData.id}';
|
|
|
+ var projectId = '${projectcontentinfo.project.id}';
|
|
|
+ if(reportId!=null&&reportId!=''){
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:'${ctx}/projectcontentinfo/projectcontentinfo/ajaxContentdelete',
|
|
|
+ data:{"contentId":contentId,"reportId":reportId,"projectId":projectId},
|
|
|
+ dataType:"json",
|
|
|
+ success:function(data){
|
|
|
+ if(data.success) {
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>成果文件</h2></div>
|
|
|
<div class="layui-item nav-btns">
|
|
@@ -1474,50 +1493,50 @@
|
|
|
<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
|
|
|
<tr>
|
|
|
<%-- <td>${status.index + 1}</td>--%>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${projectcontentinfo.projectReportData.uploadMode == 2}">
|
|
|
<c:choose>
|
|
|
- <c:when test="${projectcontentinfo.projectReportData.uploadMode == 2}">
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
- <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
|
|
|
+ <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
</c:when>
|
|
|
<c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.temporaryUrl}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
|
|
|
or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
|
|
|
- <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
|
|
|
+ <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
</c:when>
|
|
|
<c:otherwise>
|
|
|
- <c:choose>
|
|
|
- <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:when>
|
|
|
- <c:otherwise>
|
|
|
- <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
- </c:otherwise>
|
|
|
- </c:choose>
|
|
|
+ <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
|
|
|
<td>${workClientAttachment.createBy.name}</td>
|
|
|
<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
@@ -1585,7 +1604,7 @@
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>--%>
|
|
|
- <div class="form-group layui-row page-end"></div>
|
|
|
+ <div class="form-group layui-row page-end"></div>
|
|
|
</form:form>
|
|
|
</div>
|
|
|
</div>
|