| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <!DOCTYPE HTML>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorate="~{admin/common/common}">
- <head>
- <title>申报项目审核</title>
- <style>
- .select-box, input, label {
- float: left;
- margin-bottom: 10px;
- height: 30px;
- margin-right: 10px;
- }
- label {
- line-height: 30px;
- }
- .cl .l .layui-upload-file {
- display: none;
- }
- </style>
- </head>
- <body layout:fragment="content">
- <nav class="breadcrumb" th:action="@{/projectDeclaration/list/{type}(type=${type})}" th:method="post">
- <i class="Hui-iconfont"></i>
- 首页
- <span th:unless="${is_label}" class="c-gray en">> 项目申报</span>
- <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
- href="javascript:location.replace(location.href);" title="刷新">
- <i class="Hui-iconfont"></i>
- </a>
- </nav>
- <form id="myForm" th:action="@{/projectDeclaration/list/{type}(type=${type})}" th:method="get">
- <div class="page-container">
- <div class="">
- <div class="row clearfix" style="padding: 0 15px;">
- <span class="select-box" style="width:170px;">
- <select class="select" th:name="project_year" id="project_year" onchange="changeProjectByYear()">
- <option value="">-- 请选择年份 --</option>
- </select>
- </span>
- <span class="select-box" style="width:170px;">
- <select class="select" th:name="project_type" id="project_type">
- <option value="">-- 请选择项目类别 --</option>
- <option th:each="item : ${projectTypeList}" th:value="${item.id}"
- th:text="${item.type_name}" th:selected="${paramApplication.project_type}==${item.id}">
- </option>
- </select>
- </span>
- <span th:if="${type=='4'}" class="select-box" style="width:170px;">
- <select class="select" th:name="approval_status" id="approval_status">
- <option value="">-- 请选择单据状态 --</option>
- <option th:each="item : ${statusList}" th:value="${item.value}"
- th:text="${item.name}" th:selected="${paramApplication.approval_status}==${item.value}">
- </option>
- </select>
- </span>
- <span class="select-box" style="width:190px;">
- <select class="select" th:name="street_id" id="street_id">
- <option value="">-- 请选择街道 --</option>
- <option th:each="item : ${streetList}" th:value="${item.id}"
- th:text="${item.name}" th:selected="${paramApplication.street_id}==${item.id}">
- </option>
- </select>
- </span>
- <div style="width:280px; float: left;">
- <label>项目名称:</label>
- <input style="width:190px;" type="text" class="input-text" placeholder="请输入项目名称查询" id="project_name"
- name="project_name" th:value="${paramApplication.project_name}"/>
- </div>
- <div style="width:280px; float: left;">
- <label>申请企业:</label>
- <input style="width:190px;" type="text" class="input-text" placeholder="请输入申请企业查询" id="company_name"
- name="company_name" th:value="${paramApplication.company_name}"/>
- </div>
- <div style="width:420px; float: left;">
- <label>申请日期:</label>
- <input style="width:150px;" type="text" class="input-text" id="apply_date_start"
- name="apply_date_start"
- th:value="${paramApplication.apply_date_start}"/>
- <label>-</label>
- <input style="width:150px;" type="text" class="input-text" th:id="apply_date_end"
- th:name="apply_date_end"
- th:value="${paramApplication.apply_date_end}"/>
- </div>
- <input type="button" value="搜索" class="btn btn-primary" onclick="$('#myForm').submit();">
- </div>
- </div>
- <div class="cl pd-5 bg-1 bk-gray mt-20">
- <span class="l" th:if="${type} == 4">
- <a onclick="exportExcel()" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 导出</a>
- <a id="import" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 导入</a>
- </span>
- <span class="r">共有数据:<strong th:text="${pageInfo.total}" id="total">54</strong> 条</span>
- </div>
- <!-- 表格 -->
- <table id="index" class="table table-border table-bordered table-bg table-hover"
- style="table-layout: fixed;width:100%;">
- <thead>
- <tr class="text-c">
- <!--<th style="width:0px;"></th>-->
- <th>申请单号</th>
- <th>申请企业</th>
- <th>所属街道/乡镇</th>
- <th>项目类别</th>
- <th>申报项目</th>
- <th>申请日期</th>
- <th>单据状态</th>
- <th th:if="${type} == 4">导入通过状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
- <td th:text="*{apply_no}" style="width:200px;" class="text-overflow" th:title="*{apply_no}"></td>
- <td th:text="*{company_name}" style="width:200px;" class="text-overflow"
- th:title="*{company_name}"></td>
- <td th:text="*{street_name}" style="width:200px;" class="text-overflow" th:title="*{street_name}"></td>
- <td th:text="*{project_type}" style="width:200px;" class="text-overflow"
- th:title="*{project_type}"></td>
- <td th:text="*{project_name}" style="width:200px;" class="text-overflow"
- th:title="*{project_name}"></td>
- <td th:text="*{apply_date}" style="width:90px;" class="text-overflow" th:title="*{apply_date}"></td>
- <td th:text="*{statedesc}" style="width:180px;" class="text-overflow" th:title="*{statedesc}"></td>
- <td th:if="${type} == 4" th:text="*{pass}" style="width:180px;" class="text-overflow"
- th:title="*{pass}"></td>
- <td class="td-manage" style="width:90px;">
- <a th:if="${type=='2'||type=='4'}" title="查看"
- th:onclick="'javascript:open_dialog(\'查看\',\'/projectDeclaration/check/'+*{id}+'\',\'800\',\'400\');'"
- class="ml-5" style="text-decoration:none">查看</a>
- <a th:if="${type=='1'}">
- <a th:if="*{approve_status!='6' && approve_status!='5' && approve_status!='11' && approve_status!='12'&& approve_status!='13'}"
- title="审核"
- th:onclick="'javascript:open_dialog(\'审核\',\'/projectDeclaration/approve/'+*{id}+'\',\'800\',\'400\');'"
- class="ml-5" style="text-decoration:none">审核</a>
- <a th:if="*{approve_status=='5' || approve_status=='11' || approve_status=='12'|| approve_status=='13'}"
- title="上传"
- th:onclick="'javascript:open_dialog(\'上传\',\'/projectDeclaration/approve/'+*{id}+'\',\'800\',\'400\');'"
- class="ml-5" style="text-decoration:none">上传</a>
- <a th:if="*{approve_status=='6'}" title="通知"
- th:onclick="'javascript:open_dialog(\'通知\',\'/projectDeclaration/approve/'+*{id}+'\',\'800\',\'400\');'"
- class="ml-5" style="text-decoration:none">通知</a>
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- <div th:replace="admin/common/page :: page"></div>
- </div>
- </form>
- <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
- <script type="text/javascript" th:src="@{/js/company/companyInfoManage/layui.all.js}"></script>
- <script th:inline="javascript">
- onload = function () {
- var year = new Date().getFullYear(); //获取当前年份
- var sel = document.getElementById('project_year');//获取select下拉列表
- for (var i = 2018; i < year + 3; i++)//循环添加2006到当前年份加3年的每个年份依次添加到下拉列表
- {
- var option = document.createElement('option');
- option.value = i;
- var txt = document.createTextNode(i);
- option.appendChild(txt);
- sel.appendChild(option);
- }
- var selectYear = [[${paramApplication.project_year}]];
- console.log(selectYear);
- if (selectYear) {
- $("#project_year").find("option:contains('" + selectYear + "')").attr("selected", true);
- // changeProjectByYear(selectYear);
- }
- };
- function changeProjectByYear() {
- $.ajax({
- url: pagePath + "/project/getProjectByYear",
- type: "get",
- data: {
- 'year': $("#project_year").val()
- },
- dataType: "json",
- success: function (result) {
- if (result.success) {
- var types = result.obj;
- $("#project_type").find("option").remove();
- var options = '<option value="" >-- 请选择项目类别 --</option>';
- for (var i = 0; i < types.length; i++) {
- options += '<option value="' + types[i].id + '" >' + types[i].type_name + '</option>';
- }
- $("#project_type").append(options);
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- }
- //弹出框
- function open_dialog(title, url, w, h) {
- var index = layer_show(title, pagePath + url, w, h);
- //默认全屏
- layer.full(index);
- }
- laydate.render({
- elem: '#apply_date_start', //指定元素
- /*min: 0,
- format: 'yyyy-MM-dd',
- type: 'datetime'*/
- });
- laydate.render({
- elem: '#apply_date_end', //指定元素
- /*min: 0,
- format: 'yyyy-MM-dd',
- type: 'datetime'*/
- });
- function exportExcel(id) {
- var project_type = $('#project_type').val();
- var street_id = $('#street_id').val();
- var project_name = $('#project_name').val();
- var company_name = $('#company_name').val();
- var apply_date_start = $('#apply_date_start').val();
- var apply_date_end = $('#apply_date_end').val();
- var approval_status = $('#approval_status').val();
- var project_year = $('#project_year').val();
- window.open(encodeURI(pagePath + "/projectDeclaration/exportExcel?project_type=" + project_type +
- "&street_id=" + street_id + "&project_name=" + project_name + "&company_name=" + company_name +
- "&apply_date_start=" + apply_date_start + "&apply_date_end=" + apply_date_end +
- "&approval_status=" + approval_status + "&project_year=" + project_year));
- }
- $(function () {
- /*导入excel*/
- layui.use('upload', function () {
- var $ = layui.jquery, upload = layui.upload,loading_index;
- //批量导入
- upload.render({
- elem: '#import'
- , url: pagePath + "/projectDeclaration/importProject"
- , auto: true
- //data:{"fileUpload":"File"}
- , method: 'post'//上传接口的HTTP类型
- , field: 'file'
- //,multiple: true
- // ,bindAction: '#test9'
- , accept: 'file' //允许上传的文件类型
- , exts: 'xlsx'//允许上传文件的后缀
- //,size: 50 //最大允许上传的文件大小
- , before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
- loading_index = layer.load(); //上传loading
- },
- done: function (res, index, upload) {
- layer.close(loading_index);
- if (res.success) {
- succeedMessage(res.message);
- if (res.obj) {
- var arr = res.obj, str = "以下企业状态更新失败:" + "<br/>";
- for (var i = 0; i < arr.length; i++) {
- str += "年度:" + arr[i].projectYear + ",企业名称:" + arr[i].companyName + "<br/>";
- }
- layer.alert(
- str,
- {area: ['800px', '500px']}
- )
- } else {
- setTime();
- }
- } else {
- errorMessage(res.message);
- setTime();
- }
- }
- , error: function (res, index, upload) {
- //请求异常回调
- console.log(res)
- }
- });
- });
- });
- </script>
- </body>
- </html>
|