Parcourir la source

合同报表功能

user5 il y a 4 ans
Parent
commit
1792fbddbe

+ 23 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractReportDao.java

@@ -0,0 +1,23 @@
+package com.jeeplus.modules.workcontractinfo.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractReportInfo;
+
+import java.util.List;
+
+/**
+ * @author: 大猫
+ * @create: 2020-11-05 14:50
+ **/
+@MyBatisDao
+public interface WorkContractReportDao extends CrudDao<WorkContractReportInfo> {
+
+    /**
+     * 获取合同年份信息
+     * @param workContractReportInfo
+     * @return
+     */
+    List<String> getYear(WorkContractReportInfo workContractReportInfo);
+
+}

+ 122 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractReportInfo.java

@@ -0,0 +1,122 @@
+package com.jeeplus.modules.workcontractinfo.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+
+import java.util.Date;
+
+/**
+ * @author: 大猫
+ * @create: 2020-11-05 14:35
+ **/
+public class WorkContractReportInfo extends DataEntity<WorkContractReportInfo>  {
+    private static final long serialVersionUID = 1L;
+
+    private String year;            //年份
+    private String clientName;      //客户名称
+    private String contractName;    //合同名称
+    private String contractType;    //合同类型
+    private String contractTypeStr;    //合同类型Str
+    private Date contractDate;      //签订日期
+    private String createUser;      //登记人
+    private String officeName;      //登记部门
+    private String recordNum;       //归档编号
+    private String contractState;	// 合同状态
+    private String contractNum; 	// 合同编号
+
+    @ExcelField(title="年份", align=2, sort=2)
+    public String getYear() {
+        return year;
+    }
+
+    public void setYear(String year) {
+        this.year = year;
+    }
+
+    @ExcelField(title="客户名称", align=2, sort=3)
+    public String getClientName() {
+        return clientName;
+    }
+
+    public void setClientName(String clientName) {
+        this.clientName = clientName;
+    }
+
+    @ExcelField(title="合同名称", align=2, sort=4)
+    public String getContractName() {
+        return contractName;
+    }
+
+    public void setContractName(String contractName) {
+        this.contractName = contractName;
+    }
+
+    public String getContractType() {
+        return contractType;
+    }
+
+    public void setContractType(String contractType) {
+        this.contractType = contractType;
+    }
+
+    @ExcelField(title="合同类型", align=2, sort=5)
+    public String getContractTypeStr() {
+        return contractTypeStr;
+    }
+
+    public void setContractTypeStr(String contractTypeStr) {
+        this.contractTypeStr = contractTypeStr;
+    }
+
+    @ExcelField(title="签订日期", align=2, sort=6)
+    public Date getContractDate() {
+        return contractDate;
+    }
+
+    public void setContractDate(Date contractDate) {
+        this.contractDate = contractDate;
+    }
+
+    @ExcelField(title="登记人", align=2, sort=7)
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    @ExcelField(title="登记部门", align=2, sort=8)
+    public String getOfficeName() {
+        return officeName;
+    }
+
+    public void setOfficeName(String officeName) {
+        this.officeName = officeName;
+    }
+
+    @ExcelField(title="归档编号", align=2, sort=9)
+    public String getRecordNum() {
+        return recordNum;
+    }
+
+    public void setRecordNum(String recordNum) {
+        this.recordNum = recordNum;
+    }
+
+    public String getContractState() {
+        return contractState;
+    }
+
+    public void setContractState(String contractState) {
+        this.contractState = contractState;
+    }
+
+    public String getContractNum() {
+        return contractNum;
+    }
+
+    public void setContractNum(String contractNum) {
+        this.contractNum = contractNum;
+    }
+}

+ 42 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractReportService.java

@@ -0,0 +1,42 @@
+package com.jeeplus.modules.workcontractinfo.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.modules.workcontractinfo.dao.WorkContractReportDao;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractReportInfo;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @author: 大猫
+ * @create: 2020-11-05 14:49
+ **/
+@Service
+@Transactional(readOnly = true)
+public class WorkContractReportService extends CrudService<WorkContractReportDao, WorkContractReportInfo> {
+
+    public Page<WorkContractReportInfo> findPage(Page<WorkContractReportInfo> page, WorkContractReportInfo workContractReportInfo) {
+        //String companyId = UserUtils.getUser().getComId();
+        workContractReportInfo.getSqlMap().put("dsf", dataScopeFilter(workContractReportInfo.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_CONTRACT_INFO.getValue()));
+        //workContractReportInfo.getSqlMap().put("dsf","and (a.company_id='"+companyId+"')");
+        int count = dao.queryCount(workContractReportInfo);
+        page.setCount(count);
+        page.setCountFlag(false);
+        workContractReportInfo.setPage(page);
+        List<WorkContractReportInfo> list = super.findList(workContractReportInfo);
+        page.setList(list);
+        return page;
+    }
+
+    /**
+     * 获取合同年份信息
+     * @param workContractReportInfo
+     * @return
+     */
+    public List<String> getYear(WorkContractReportInfo workContractReportInfo){
+        return dao.getYear(workContractReportInfo);
+    }
+}

+ 70 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractReportController.java

@@ -0,0 +1,70 @@
+package com.jeeplus.modules.workcontractinfo.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractReportInfo;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractReportService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * @author: 大猫
+ * @create: 2020-11-05 14:28
+ **/
+@Controller
+@RequestMapping(value = "${adminPath}/contractReport/contractReport")
+public class WorkContractReportController extends BaseController {
+
+    @Autowired
+    private WorkContractReportService workContractReportService;
+
+    /**
+     * 合同管理列表页面
+     */
+    @RequiresPermissions("contractReport:contractReport:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(WorkContractReportInfo workContractReportInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<WorkContractReportInfo> page = workContractReportService.findPage(new Page<WorkContractReportInfo>(request, response), workContractReportInfo);
+        //获取合同年份信息
+        List<String> yearList = workContractReportService.getYear(workContractReportInfo);
+        model.addAttribute("yearList", yearList);
+        model.addAttribute("page", page);
+        return "modules/workcontractinfo/workContractReport/workContractReportList";
+    }
+
+    /**
+     * 导出excel文件
+     */
+    @RequestMapping(value = "export", method = RequestMethod.POST)
+    public String exportFile(WorkContractReportInfo workContractReportInfo, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            String fileName = "合同报表" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
+            User user = UserUtils.getUser();
+            workContractReportInfo.setCurrentUser(user);
+            Page<WorkContractReportInfo> page = workContractReportService.findPage(new Page<WorkContractReportInfo>(request, response, -1), workContractReportInfo);
+            new ExportExcel("合同报表", WorkContractReportInfo.class).setDataList(page.getList()).write(response, fileName).dispose();
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出合同报表记录失败!失败信息:" + e.getMessage());
+        }
+        return "redirect:" + Global.getAdminPath() + "/contractReport/contractReport/?repage";
+    }
+
+}

+ 142 - 0
src/main/resources/mappings/modules/workcontractinfo/WorkContractReportDao.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.workcontractinfo.dao.WorkContractReportDao">
+    
+	<sql id="workContractInfoColumns">
+		a.id AS "id",
+		year(a.contract_date) as "year",
+		a.create_by AS "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) AS "createBy.name",
+		(select name from sys_user user where user.id=a.create_by) AS "createUser",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+		a.client_id AS "client.id",
+		a.contract_date AS "contractDate",
+		a.name AS "contractName",
+		a.contract_num AS "contractNum",
+		a.contractTypeDoc AS "contractType",
+		(select detail_name from main_dict_detail mdd where mdd.type_id = (select id from main_dict where type_name = 'contract_info_type') and a.contractTypeDoc = mdd.detail_key) AS "contractTypeStr",
+		client.name AS "clientName",
+		o.name as "officeName",
+		wcr.record_num as "recordNum"
+	</sql>
+	
+	<sql id="workContractInfoJoins">
+		LEFT JOIN work_client_info client ON client.id = a.client_id
+		LEFT JOIN sys_user u on u.id = a.create_by
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		left join work_contract_record wcr on wcr.contract_info_id =a.id
+	</sql>
+	
+    
+	<select id="get" resultType="com.jeeplus.modules.workcontractinfo.entity.WorkContractReportInfo" >
+		SELECT
+			<include refid="workContractInfoColumns"/>
+		FROM work_contract_info a
+		<include refid="workContractInfoJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="getYear" resultType="java.lang.String">
+		SELECT
+			distinct(year(a.contract_date)) as "year"
+		FROM work_contract_info a
+		<include refid="workContractInfoJoins"/>
+		<where>
+			a.del_flag = 0
+			<if test="year != null and year != ''">
+				AND YEAR(a.contract_date) = #{year}
+			</if>
+			<if test="contractType != null and contractType != ''">
+				AND a.contractTypeDoc = #{contractType}
+			</if>
+			<if test="contractState != null and contractState != ''">
+				AND a.contract_state = #{contractState}
+			</if>
+			<if test="clientName != null and clientName != ''">
+				AND client.name LIKE concat('%',#{clientName},'%')
+			</if>
+			<if test="contractName != null and contractName != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{contractName}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{contractName}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{contractName},'%')</if>
+			</if>
+			${sqlMap.dsf}
+		</where>
+	</select>
+
+	<select id="findList" resultType="com.jeeplus.modules.workcontractinfo.entity.WorkContractReportInfo" >
+		SELECT
+			<include refid="workContractInfoColumns"/>
+		FROM work_contract_info a
+		<include refid="workContractInfoJoins"/>
+		<where>
+			a.del_flag = 0
+			<if test="year != null and year != ''">
+				AND YEAR(a.contract_date) = #{year}
+			</if>
+			<if test="contractType != null and contractType != ''">
+				AND a.contractTypeDoc = #{contractType}
+			</if>
+			<if test="contractState != null and contractState != ''">
+				AND a.contract_state = #{contractState}
+			</if>
+			<if test="clientName != null and clientName != ''">
+				AND client.name LIKE concat('%',#{clientName},'%')
+			</if>
+			<if test="contractName != null and contractName != ''">
+				AND a.name LIKE 
+					<if test="dbName == 'oracle'">'%'||#{contractName}||'%'</if>
+					<if test="dbName == 'mssql'">'%'+#{contractName}+'%'</if>
+					<if test="dbName == 'mysql'">concat('%',#{contractName},'%')</if>
+			</if>
+			${sqlMap.dsf}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+
+	<select id="queryCount" resultType="int" >
+		SELECT count(1)
+		FROM work_contract_info a
+		<include refid="workContractInfoJoins"/>
+		<where>
+			a.del_flag = 0
+			<if test="year != null and year != ''">
+				AND YEAR(a.contract_date) = #{year}
+			</if>
+			<if test="contractType != null and contractType != ''">
+				AND a.contractTypeDoc = #{contractType}
+			</if>
+			<if test="clientName != null and clientName != ''">
+				AND client.name LIKE concat('%',#{clientName},'%')
+			</if>
+			<if test="contractName != null and contractName != ''">
+				AND a.name LIKE
+				<if test="dbName == 'oracle'">'%'||#{contractName}||'%'</if>
+				<if test="dbName == 'mssql'">'%'+#{contractName}+'%'</if>
+				<if test="dbName == 'mysql'">concat('%',#{contractName},'%')</if>
+			</if>
+			${sqlMap.dsf}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.create_date DESC
+			</otherwise>
+		</choose>
+	</select>
+</mapper>

+ 550 - 0
src/main/webapp/webpage/modules/workcontractinfo/workContractReport/workContractReportList.jsp

@@ -0,0 +1,550 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同报表</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		.op-btn.op-btn-invalid{
+			background:#f0ad4e ;
+		}
+	</style>
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<script type="text/javascript">
+        var validateForm;
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                rules:{
+                    number:{
+                        required:true
+                    },
+                    businessType:{
+                        required:true
+                    }
+                },
+                messages:{
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+
+
+        function contractOpenDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+        function contractOpenDialogres(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+
+        function contractAdminUpdate(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                content: url ,
+                skin:"three-btns",
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(3) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+	</script>
+	<script type="text/javascript">
+
+        function openDialogreReapply(title,url,width,height,target) {
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin:"two-btns",
+                content: url,
+                btn: ['送审', /*'撤回',*/ '关闭'],
+                btn1: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var formId = inputForm.attr("id");
+                    if(formId){
+                        var $document = iframeWin.contentWindow.document;
+                        $document.getElementById(formId).setAttribute("action","${ctx}/workcontractinfo/workContractInfo/invalidateContractSaveAudit?reapply=yes");
+                        formSubmit($document,formId,index);
+                    }
+                },
+                btn2: function (index) {
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                var loadingMessage = parent.layer.load(0, {shade: [0.1,'#393d49']});
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        top.layer.close(index);
+                        parent.layer.msg("保存成功!!!",{icon:6});
+                        parent.layer.close(loadingMessage);
+                        window.location.reload();
+                    }
+                });
+            }
+        }
+
+	</script>
+	<script type="text/javascript">
+        function contractInvalidateForm(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+	   function openDialogreplay(title,url,width,height,target){
+
+		   if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			   width='auto';
+			   height='auto';
+		   }else{//如果是PC端,根据用户设置的width和height显示。
+
+		   }
+		   top.layer.open({
+			   type: 2,
+			   area: [width, height],
+			   title: title,
+			   maxmin: false, //开启最大化最小化按钮
+			   skin: 'two-btns',
+			   content: url ,
+			   btn: ['送审','关闭'],
+			   yes: function(index, layero){
+				   var body = top.layer.getChildFrame('body', index);
+				   var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				   var inputForm = body.find('#inputForm');
+				   var top_iframe;
+				   if(target){
+					   top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				   }else{
+					   top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				   }
+				   inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+				   if(iframeWin.contentWindow.doSubmit() ){
+					   top.layer.close(index);//关闭对话框。
+					   //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				   }
+
+			   },
+			   cancel: function(index){
+			   }
+		   });
+	   }
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="workContractReportInfo" action="${ctx}/contractReport/contractReport/list" method="post" class="form-inline">
+				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+				<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+				<div class="commonQuery lw7">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">签订年份:</label>
+						<div class="layui-input-block with-icon">
+							<form:select path="year"  class="form-control simple-select">
+								<form:option value="" label=""/>
+								<c:forEach items="${yearList}" var="year">
+									<option value="${year}">${year}</option>
+								</c:forEach>
+							</form:select>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">合同类型:</label>
+						<div class="layui-input-block with-icon">
+							<form:select path="contractType"  class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getMainDictList('contract_info_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+					<div class="layui-item athird">
+						<div class="input-group">
+							<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+							<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+							<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+						</div>
+					</div>
+					<div style="    clear:both;"></div>
+				</div>
+				<div id="moresees" class="lw7" style="clear:both;display:none;height: 70px;">
+					<div class="layui-item query athird">
+						<label class="layui-form-label">客户名称:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="clientName" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">合同名称:</label>
+						<div class="layui-input-block with-icon">
+							<form:input path="contractName" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+						</div>
+					</div>
+					<div class="layui-item query athird">
+						<label class="layui-form-label">签订状态:</label>
+						<div class="layui-input-block with-icon">
+							<form:select path="contractState"  class="form-control simple-select">
+								<form:option value="" label=""/>
+								<form:options items="${fns:getDictList('audit_contract_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+							</form:select>
+						</div>
+					</div>
+				</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="contentShadow layui-form contentDetails">
+				<div class="nav-btns">
+					<table:exportExcel url="${ctx}/contractReport/contractReport/export"></table:exportExcel><!-- 导出按钮 -->
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable1"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'year',align:'center', sort:true,title: '年份',templet:function(d){
+                        return "<span title='"+ d.year +"'>" + d.year + "</span>";
+                    }}
+				,{field:'clientName',align:'center', title: '客户名称'}
+                ,{field:'contractName',align:'center', title: '合同名称',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同管理', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.id + "','95%', '95%')\">" + d.contractName + "</a>";
+                    }}
+				,{field:'contractType', align:'center',title: '合同类型'}
+				,{field:'contractDate',align:'center', sort:true,title: '签订日期'}
+				,{field:'createUser',align:'center', title: '登记人'}
+				,{field:'createDate',align:'center', sort:true,title: '登记日期'}
+				,{field:'officeName',align:'center', title: '登记部门'}
+                ,{field:'recordNum',align:'center', title: '归档编号'/*,minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\""+d.recordNum+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同归档信息', '${ctx}/workcontractrecord/workContractRecord/form?id=" + d.contrractRecordId + "&tabId=1','95%', '95%')\">" + d.recordNum + "</a>";
+                    }*/}
+
+
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workContractInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"contractNum":"${workContractInfo.contractNum}"
+                    ,"id":"${workContractInfo.id}"
+                    ,"year":"${workContractInfo.year}"
+					,"clientName":"${workContractInfo.clientName}"
+                    ,"contractName":"${workContractInfo.contractName}"
+                    ,"contractType":"${fns:getMainDictLabel(workContractInfo.contractType, 'contract_info_type', '')}"
+                    ,"contractDate":"<fmt:formatDate value="${workContractInfo.contractDate}" pattern="yyyy-MM-dd"/>"
+					,"createUser":"${workContractInfo.createBy.name}"
+					,"createDate":"<fmt:formatDate value="${workContractInfo.createDate}" pattern="yyyy-MM-dd"/>"
+					,"officeName":"${workContractInfo.officeName}"
+					,"recordNum":"${workContractInfo.recordNum}"
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+</body>
+</html>