瀏覽代碼

公告删除按钮方法重写

user5 4 年之前
父節點
當前提交
7eb043df16

+ 10 - 1
src/main/java/com/jeeplus/modules/oa/entity/OaNotify.java

@@ -55,6 +55,7 @@ public class OaNotify extends ActEntity<OaNotify> {
 	private String home;
 
 	private String processInstanceId;
+	private Integer closeStatus;  //关闭状态
 
     public String getHome() {
         return home;
@@ -340,7 +341,15 @@ public class OaNotify extends ActEntity<OaNotify> {
     public void setProcessInstanceId(String processInstanceId) {
         this.processInstanceId = processInstanceId;
     }
-/*	@Override
+
+	public Integer getCloseStatus() {
+		return closeStatus;
+	}
+
+	public void setCloseStatus(Integer closeStatus) {
+		this.closeStatus = closeStatus;
+	}
+    /*	@Override
 	public String toString() {
 		return "OaNotify [type=" + type + ", title=" + title + ", content=" + content + ", files=" + files + ", status="
 				+ status + ", company=" + company + ", readNum=" + readNum + ", unReadNum=" + unReadNum + ", isSelf="

+ 1 - 0
src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java

@@ -260,6 +260,7 @@ public class OaNotifyService extends CrudService<OaNotifyDao, OaNotify> {
 
     @Transactional(readOnly = false)
     public String saveNotify(OaNotify oaNotify) {
+        oaNotify.setCloseStatus(0);
         this.save(oaNotify);
         return this.startAudit(oaNotify,oaNotify.getProcessInstanceId());
     }

+ 1 - 0
src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java

@@ -206,6 +206,7 @@ public class OaNotifyController extends BaseController {
 		//oaNotifyService.delete(oaNotify);
 		oaNotifyService.deleteByOaNotifyId(oaNotify.getId());
 		oaNotify.setRemarks("关闭");
+		oaNotify.setCloseStatus(1);
 		oaNotifyService.save(oaNotify);
 		pushinfoService.updateDelflagByPushId(oaNotify.getId(),"1");
 		addMessage(redirectAttributes, "关闭通知成功");

+ 8 - 3
src/main/resources/mappings/modules/oa/OaNotifyDao.xml

@@ -60,7 +60,7 @@
 		<if test="isSelf">
 			JOIN oa_notify_record r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id,jdbcType=VARCHAR}
 		</if>
-		WHERE a.del_flag = #{DEL_FLAG_NORMAL}
+		WHERE a.del_flag = #{DEL_FLAG_NORMAL} and close_status = 0
 		<!-- 未读0,已读1 -->
 		<if test="readFlag != null and readFlag != ''">
 			AND r.read_flag = #{readFlag}
@@ -236,7 +236,8 @@
 			end_date,
 			number,
 			process_instance_id,
-			DEL_FLAG
+			DEL_FLAG,
+			close_status
 		) VALUES (
 			#{id},
 			#{type},
@@ -256,7 +257,8 @@
 			#{endDate},
 			#{number},
 			#{processInstanceId},
-			#{delFlag}
+			#{delFlag},
+			#{closeStatus}
 		)
 	</insert>
 	
@@ -278,6 +280,9 @@
 			number = #{number},
 			process_instance_id = #{processInstanceId},
 			REMARKS = #{remarks}
+			<if test="closeStatus != null and closeStatus != ''">
+				,close_status = #{closeStatus}
+			</if>
 		WHERE id = #{id}
 	</update>
 	<update id="saveRemarks">

+ 29 - 3
src/main/webapp/webpage/modules/sys/sysHome.jsp

@@ -583,6 +583,32 @@
 
             }
         })*/
+
+       //打开对话框(查看)
+       function homeOpenDialogView(title,url,width,height){
+
+
+           if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+               width='auto';
+               height='auto';
+           }else{//如果是PC端,根据用户设置的width和height显示。
+
+           }
+           top.layer.open({
+               type: 2,
+               skin: 'one-btn',
+               area: [width, height],
+               title: title,
+               maxmin: true, //开启最大化最小化按钮
+               content: url ,
+               btn: ['关闭'],
+               btn1: function(index){
+                   top.layer.close(index);//关闭对话框。
+                   window.location.reload();
+               }
+           });
+
+       }
     </script>
     <style>
         body{
@@ -665,12 +691,12 @@
             <div id="email-bord" class="call-bord-content contentShadow">
                 <div class="bord-left">
                     <div class="bord-left-content">
-                        <div class="bord-title">项目信息(${projectSize})</div>
+                        <div class="bord-title">我的项目(${projectSize})</div>
                         <%--<div class="bord-pic"><img src="${ctxStatic}/common/img/icon05.png" height="100%" /></div>--%>
                         <%--<div class="bord-num">${calendarSize}</div>--%>
                     </div>
                     <div class="bord-more">
-                        <a href="javascript:void(0)" onclick='top.openTab("${ctx }/ruralProject/ruralProjectRecords/listShow","项目信息", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
+                        <a href="javascript:void(0)" onclick='top.openTab("${ctx }/ruralProject/ruralProjectRecords/listShow","我的项目", false)'><span>更多 </span><i class="fa fa-angle-right"></i></a>
                     </div>
                 </div>
                 <div class="bord-right">
@@ -894,7 +920,7 @@
                 xml = "<a  href=\"javascript:void(0)\" onclick=\"top.openTab('${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','待审批', false)\">";
             </c:when>
             <c:otherwise>
-                xml = "<a  href=\"javascript:void(0)\" onclick=\"openDialogView('查看通知', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
+                xml = "<a  href=\"javascript:void(0)\" onclick=\"homeOpenDialogView('查看通知', '${ctx}/workprojectnotify/workProjectNotify/form?id=${workProjectNotify.id}','95%','95%')\">";
             </c:otherwise>
             </c:choose>