123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670 |
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!DOCTYPE html>
- <html>
- <head>
- <jsp:include page="../common/common-meta-include.jsp"></jsp:include>
- <jsp:include page="../common/common-js-include.jsp"></jsp:include>
- <jsp:include page="../common/common-css-include.jsp"></jsp:include>
- <!--[if lt IE 9]>
- <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
- <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <style>
- .hiddenParam,
- .hiddenParams {
- display: none;
- }
- </style>
- </head>
- <body>
- <div id="app"></div>
- <template id="template">
- <div class="layui-layout layui-layout-admin pd0">
- <!-- 内容区域 -->
- <div class="right_title" style="ma">
- <div class="txt">年度计划<div class="top-breadcrumb"></div></div>
- <%-- <button class="btn btn_add" @click="add"><i class="layui-icon layui-icon-add-circle"></i> 问题填报</button>--%>
- <div class="layui-collapse search_form">
- <div class="layui-colla-item">
- <%-- <h2 class="layui-colla-title">筛选</h2>--%>
- <div class="layui-colla-content layui-show">
- <form class="layui-form" lay-filter="searchForm">
- <%-- <input name="neTemp" type="hidden" value="${neTemp }"/>--%>
- <%-- <input name="isZj" type="hidden" value="${isZj }"/>--%>
- <div class="layui-row">
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
- <div class="layui-form-item">
- <label class="layui-form-label">项目名称</label>
- <div class="layui-input-block">
- <input type="text" name="subName" placeholder="请输入" value="${subName}" autocomplete="off" class="layui-input">
- </div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md4" style="display: none">
- <div class="layui-form-item" style="height:28px;">
- <label class="layui-form-label">项目类型</label>
- <div class="layui-input-block">
- <div id="kind" name="kind"></div>
- </div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
- <div class="layui-form-item">
- <label class="layui-form-label ">项目属地</label>
- <div class="layui-input-block">
- <select name="jsdd">
- <option value="">请选择</option>
- <c:forEach items="${JSDD }" var="hy">
- <c:if test="${subjectId == hy.code}">
- <option value="${hy.code }" selected="selected">${hy.title }</option>
- </c:if>
- <c:if test="${indusKind != hy.title}">
- <option value="${hy.code }">${hy.title }</option>
- </c:if>
- </c:forEach>
- </select>
- </div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 hiddenParams">
- <div class="layui-form-item">
- <label class="layui-form-label ">行业类别</label>
- <div class="layui-input-block">
- <select name="hyfl" lay-search="">
- <option value="">请选择</option>
- <c:forEach items="${HYFL }" var="hy">
- <c:if test="${indusKind == hy.title}">
- <option value="${hy.id }" selected="selected">${hy.title }</option>
- </c:if>
- <c:if test="${indusKind != hy.title}">
- <option value="${hy.id }">${hy.title }</option>
- </c:if>
- </c:forEach>
- </select>
- </div>
- <span class="morePan" id="toggleMore">
- <a id="moreText">更多</a>
- <a id="lessText">收起</a>
- </span>
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 hiddenParam">
- <div class="layui-form-item">
- <label class="layui-form-label">年    度</label>
- <div class="layui-input-block time_box">
- <input type="text" id="year" name="year" class="layui-input">
- </div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 hiddenParam">
- <div class="layui-form-item">
- <label class="layui-form-label">项目状态</label>
- <div class="layui-input-block">
- <select name="status">
- <option value="0">所有</option>
- <option value="1">已录入</option>
- <option value="2">未录入</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div>
- <button type="button" class="layui-btn layui-btn-normal" @click="search">查询</button>
- <button type="button" class="layui-btn layui-btn-export" @click="exportExcel">导出</button>
- </div>
- </div>
- <%-- <div class="layui-row">--%>
- <%-- <c:if test="${currUser.statusProj == 1 }" >--%>
- <%-- <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">--%>
- <%-- <div class="layui-form-item">--%>
- <%-- <label class="layui-form-label " >行业单位:</label>--%>
- <%-- <div class="layui-input-block">--%>
- <%-- <select name="hydw" lay-search>--%>
- <%-- <option value="">--请选择--</option>--%>
- <%-- <c:forEach items="${HYDW }" var="hy">--%>
- <%-- <option value="${ hy.id}">${hy.title }</option>--%>
- <%-- </c:forEach>--%>
- <%-- </select>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <%-- </c:if>--%>
- <%-- <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">--%>
- <%-- <div class="layui-form-item">--%>
- <%-- <label class="layui-form-label ">年份</label>--%>
- <%-- <div class="layui-input-block time_box">--%>
- <%-- <input type="text" id="year" name="year" class="layui-input">--%>
- <%-- <button type="button" class="layui-btn layui-btn-normal" @click="search"><i class="layui-icon layui-icon-search"></i>查询</button>--%>
- <%-- <button type="button" class="layui-btn" @click="exportExcel"><i class="layui-icon layui-icon-add-circle"></i> 导出</button>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <%-- <span style="color: red;float: right;">带*号的条件可在导出时使用,其中年份仅限导出使用,年份不选择默认为当前年份</span>--%>
- <%-- </div>--%>
- </form>
- </div>
- </div>
- </div>
- </div>
- <div class="table_box" style="padding-top: 0;">
- <div class="table_process">
- <table id="table1" lay-filter="test"></table>
- <div class="pagination-box" id="pagination"></div>
- </div>
- </div>
- <div style="height: 20px;"></div>
- </div>
- </template>
- <div id="amtYear" style="display: none;">
- <div class="layuimini-main" style="padding: 0 20px;margin-top: 20px">
- <form class="layui-form" lay-filter="amtYearForm">
- <div class="layui-row">
- <div class="layui-col-xs12 layui-col-sm12">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 200px">年度计划投资金额(万元):</label>
- <div class="layui-input-block">
- <input name="amt_year" type="number" placeholder="请输入" autocomplete="off" class="layui-input">
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- <%--<script type="text/html" id="subName">--%>
- <%-- <span title="{{d.subName}}">{{d.subName}}</span>--%>
- <%--</script>--%>
- <script type="text/html" id="toolBar">
- <div class="toolBar">
- <span lay-event="toDetail">项目信息</span>
- {{# if(d.unit_id == "${currUnitId}"|| "${checkEdit}"=="true") { }}
- {{#}}}
- {{# if("${checkEdit}"=="true") { }}
- {{# if(d.is_lock == "1") { }}
- {{#} else { }}
- {{#} }}
- {{#}}}
- </div>
- </script>
- <script>
- new Vue({
- el: "#app",
- template: "#template",
- data: {
- winH: 0,
- dataList : [],
- tableName : 'test',
- pageNo : 1,
- indusKind : {},
- propKind : {},
- orderType: "",
- kind: {},
- pageSize : 20
- },
- mounted : function() {
- this.init();
- },
- methods: {
- init : function() {
- this.winH = document.body.clientHeight
- layui.laydate.render({
- elem: '#startTime',
- theme: layDateTheme,
- });
- var xmlx = [];
- <c:forEach items="${XMLX}" var="xm">
- xmlx.push({value:"${xm.code}", name:"${xm.title}"});
- </c:forEach>
- this.kind = layui.xmSelect.render({
- el: "#kind",
- language:'zn',
- data:xmlx
- });
- layui.laydate.render({
- elem: '#endTime',
- theme: layDateTheme,
- });
- layui.laydate.render({
- elem: '#year',
- type: 'year',
- theme: layDateTheme,
- value: new Date().getFullYear()
- })
- <%--var check="${isSfgw}";--%>
- <%--if (check=="false"){--%>
- <%-- this.getData();--%>
- <%--}else{--%>
- <%-- this.loadTable();--%>
- <%--}--%>
- this.getData();
- window.showImage = this.showImage;
- window.addEventListener('message', this.receiveMessage, false);
- window.parent.postMessage('init loaded')
- $('.hiddenParams').show();
- $('#lessText').hide();
- },
- getData : function(){
- //获取年 月
- var self = this;
- var param = layui.form.getValue("searchForm");
- param.orderType = this.orderType || null;
- param.xmlx = this.kind.getValue("value").sort().join(",");
- param.pageNo = this.pageNo;
- param.pageSize = this.pageSize;
- App.postJson("/api/annualPlan/pageList",param, function(res){
- self.dataList = res.rows;
- self.loadTable();
- self.loadPage(res.total);
- });
- },
- showImage: function(that) {
- var imageUrl = $(that).find("img").eq(0).attr("realUrl");
- var url = $(that).find("img").eq(0).attr("src");
- if(imageUrl) {
- if (url.indexOf("word")>0||url.indexOf("excel")>0 ){
- window.location.href=App.getUrl(imageUrl);
- // App.window.open(imageUrl);
- }else{
- layer.open({
- type: 2,
- content: imageUrl,
- area: ['500px', '500px'],
- offset: 'auto'
- })
- }
- }
- },
- amtYear: function(obj) {
- var self = this;
- if (obj.data.amt_year==undefined){
- obj.data.amt_year="";
- }
- // obj.data.status_reason="";
- layui.form.val("amtYearForm", obj.data);
- layer.open({
- type: 1,
- title: "调整年度计划总值",
- content: $("#amtYear"),
- area: ['440px', '180px'],
- btn: ["保存", "取消"],
- yes: function(index) {
- var data = layui.form.val("amtYearForm");
- if(!data.amt_year){
- App.msg.warn("年度计划总值不能为空");
- return;
- }
- // reason.subId = obj.data.id;
- App.postJson("/api/subject/subInfo/setAmtYear",{subId:obj.data.sub_id,amt:data.amt_year}, function(res){
- if(res.success){
- App.msg.success("设置成功");
- self.getData();
- layer.close(index);
- }
- });
- },
- close: function(index) {
- layer.close(index);
- }
- })
- },
- toBackLock:function (obj){
- var self=this;
- App.msg.confirm("是否解除锁定年度计划?",function() {
- App.postJson("/api/subject/subInfo/toBackLock", {subIds: obj.data.sub_id,year:obj.data.year}, function (res) {
- if (res.success) {
- App.msg.success("设置成功");
- self.getData();
- layer.close(index);
- }
- });
- });
- },
- toSetLock:function (obj){
- var self=this;
- App.msg.confirm("是否锁定年度计划?",function() {
- App.postJson("/api/subject/subInfo/setIsLock", {subIds: obj.data.sub_id,year:obj.data.year}, function (res) {
- if (res.success) {
- App.msg.success("设置成功");
- self.getData();
- layer.close(index);
- }
- });
- });
- },
- yearPlan: function(obj) {
- if (obj.data.is_lock=="1"){
- App.msg.warn("该项目的年度计划被锁定,不能录入了!");
- return;
- }else{
- window.location.href=App.getUrl("/amtPlan/edit?subId="+obj.data.sub_id+"&year="+obj.data.year);
- }
- },
- toDetail : function(obj){
- //详情
- var index = layer.open({
- type: 2,
- title: "",
- area: ['1000px', '800px'],
- content: App.getUrl("//subject/subInfo/detailView?layer=true&subId="+ obj.data.sub_id),
- });
- layui.layer.full(index);
- },
- exportExcel:function (){
- var param = layui.form.getValue("searchForm");
- var self=this;
- var subIds=[];
- var subId= "";
- var year="";
- var param = layui.form.getValue("searchForm");
- var checkData = self.dataList.filter( item => item.LAY_CHECKED == true).forEach(item => subIds.push(item.sub_id));
- var checkData = self.dataList.filter( item => item.LAY_CHECKED == true).forEach(item => year=item.year);
- if (subIds.length==0){
- subId=""
- }else{
- subId=subIds.join(",")
- }
- console.log(subId);
- param.xmlx = this.kind.getValue("value").sort().join(",");
- if (param.year=="" || param.year==undefined){
- year=""
- }else {
- year=param.year
- }
- if (param.status=="" || param.status==undefined){
- status=""
- }else {
- year=param.status
- }
- if (param.xmlx=="" || param.xmlx==undefined){
- xmlx=""
- }else {
- xmlx=param.xmlx
- }
- if (param.xmxz=="" || param.xmxz==undefined){
- xmxz=""
- }else {
- xmxz=param.xmxz
- }
- if (param.hyfl=="" || param.hyfl==undefined){
- hyfl=""
- }else {
- hyfl=param.hyfl
- }
- if (param.unitName=="" || param.unitName==undefined){
- unitName=""
- }else {
- unitName=param.unitName
- }
- if (param.subName=="" || param.subName==undefined){
- subName=""
- }else {
- subName=param.subName
- }
- if (param.minMoney=="" || param.minMoney==undefined){
- minMoney=""
- }else {
- minMoney=param.minMoney
- }
- if (param.jsdd=="" || param.jsdd==undefined){
- jsdd=""
- }else {
- jsdd=param.jsdd
- }
- if (param.maxMoney=="" || param.maxMoney==undefined){
- maxMoney=""
- }else {
- maxMoney=param.maxMoney
- }
- window.location.href=App.getUrl("/annualPlan/exportExcel?subId="+subId+"&year="+param.year+"&status="+param.status+"&xmlx="+xmlx+"&xmxz="+xmxz+"&hyfl="+hyfl+"&unitName="+unitName+"&subName="+subName+"&jsdd="+jsdd+"&minMoney="+minMoney+"&maxMoney="+maxMoney);
- },
- loadTable : function(){
- var self = this;
- layui.table.render({
- elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
- even: true,
- autoSort: false,
- cols: [[ // 设置表头
- {checkbox:true ,fixed: 'left', width:50, align: 'center'},
- {type: 'numbers', fixed: 'left',title:'序号', align: 'center',width:200,templet: function(row) {
- if(row.numbers != null) {
- return '<span title="' + row.numbers + '">' + row.numbers + '</span>';
- }
- return "";
- }},
- {field: 'title', title: '项目名称', fixed: 'left', width:280,fixed: 'left',templet: function(row) {
- if(row.title != null) {
- return '<span title="' + row.title + '">' + row.title + '</span>';
- }
- return "";
- }},
- {field: 'amt', title: '总投资(万元)', width: 150,templet: function(row) {
- if(row.amt != null) {
- return '<span title="' + row.amt + '">' + row.amt + '</span>';
- }
- return "";
- }},
- {field: 'begin_date', title: '计划开工日期', width: 200,templet: function(row) {
- if(row.begin_date != null) {
- return '<span title="' + row.begin_date + '">' + row.begin_date + '</span>';
- }
- return "";
- }},
- {field: 'end_date', title: '计划投产日期', width: 200,templet: function(row) {
- if(row.end_date != null) {
- return '<span title="' + row.end_date + '">' + row.end_date + '</span>';
- }
- return "";
- }},
- {field: 'unit_name', title: '项目单位',width: 200,templet: function(row) {
- if(row.unit_name != null) {
- return '<span title="' + row.unit_name + '">' + row.unit_name + '</span>';
- }
- return "";
- }},
- {field: 'amt_jh', sort: true, title: '年度计划月累计金额(万元)', width: 200,templet: function(row) {
- if(row.amt_jh != null) {
- return '<span title="' + row.amt_jh + '">' + row.amt_jh + '</span>';
- }
- return "";
- }},
- /* {field: 'amt_year', title: '年度计划金额(万元)', width:140,templet: function(row) {
- if(row.amt_year != null) {
- return '<span title="' + row.amt_year + '">' + row.amt_year + '</span>';
- }
- return "";
- }},*/
- {title: '操作', width: 200, toolbar: '#toolBar', fixed:'right'}
- ]],
- fixed:true,
- data : self.dataList,
- limit : self.dataList.length,
- height:'full-300',
- done:function(res, curr, count) {
- $(".layui-table-main tr").each(function (index, val) {
- $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
- $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
- })
- }
- });
- layui.table.on('tool('+this.tableName+')', function(obj){
- var event = obj.event;
- self[event].call(this, obj);
- });
- layui.table.reload("table1",{
- initSort: {
- field: 'amt_jh',
- type: self.orderType
- }
- })
- layui.table.on("sort(test)", function(obj) {
- self.orderType = obj.type;
- self.getData();
- });
- },
- loadPage : function(totalCount){
- var self = this;
- layui.laypage.render({
- elem: 'pagination',
- count: totalCount,
- curr : self.pageNo,
- limit : self.pageSize,
- layout: ['count', 'prev', 'page', 'next', 'skip'],
- jump: function(obj, first) {
- //首次不执行
- if(!first) {
- self.pageNo = obj.curr;
- self.getData();
- }
- }
- });
- },
- add : function(){
- window.location.href= App.getUrl("/problemreport/add")
- },
- edit: function(obj) {
- //window.location.href=App.getUrl("/subject/subInfo/add?id=" + obj.data.id);
- window.location.href=App.getUrl("problemSupervision/getProSupervision?id="+ obj.data.id + "&lastUrl=" + window.location.href);
- },
- delPlan:function (obj){
- var self = this;
- App.msg.confirm("是否删除督办单位信息?",function(){
- App.postJson("/api/problemSupervision/del",{id : obj.data.id}, function(res){
- if(res.success){
- self.getData();
- }
- });
- });
- },
- submit: function(obj){
- var self = this;
- layer.confirm("确认提交项目【"+obj.data.subName+"】?", function(){
- App.postJson("/api/subject/subInfo/statusToSubmit", {id: obj.data.id}, function(res) {
- layer.closeAll();
- self.getData();
- });
- })
- },
- toLock:function (){
- var self = this;
- var subIds=[];
- var year="";
- var param = layui.form.getValue("searchForm");
- var checkData = self.dataList.filter( item => item.LAY_CHECKED == true).forEach(item => subIds.push(item.sub_id));
- var checkData = self.dataList.filter( item => item.LAY_CHECKED == true).forEach(item => year=item.year);
- if (subIds.length==0){
- App.msg.warn("请选择操作项!!!!");
- return;
- }
- App.msg.confirm("是否锁定年度计划?",function() {
- App.postJson("/api/subject/subInfo/setIsLock", {subIds: subIds.join(","),year:year}, function (res) {
- if (res.success) {
- App.msg.success("设置成功");
- self.getData();
- layer.close(index);
- }
- });
- });
- },
- toBackLockAll:function (){
- var self = this;
- var subIds=[];
- var year="";
- var param = layui.form.getValue("searchForm");
- var checkData = self.dataList.filter( item => item.LAY_CHECKED == true).forEach(item => year=item.year);
- var checkData = self.dataList.filter( item => item.LAY_CHECKED == true).forEach(item => subIds.push(item.sub_id));
- if (subIds.length==0){
- App.msg.warn("请选择操作项!!!!");
- return;
- }
- App.msg.confirm("是否批量解锁年度计划?",function() {
- App.postJson("/api/subject/subInfo/toBackLock", {subIds: subIds.join(","),year:year}, function (res) {
- if (res.success) {
- App.msg.success("设置成功");
- self.getData();
- layer.close(index);
- }
- });
- });
- },
- search : function(){
- this.pageNo = 1;
- this.getData();
- },
- closeWin : function(){
- window.history.back(-1);
- },
- receiveMessage (e) {
- console.log('cb receiveMessage: ', e.data)
- if (e.data.topBreadcrumb) {
- $(".top-breadcrumb").html(e.data.topBreadcrumb)
- }
- }
- }
- });
- $(document).ready(function() {
- var showMoreFlag = false; // 定义一个变量来控制显示/隐藏状态
- $('#toggleMore').click(function() {
- // 切换显示/隐藏状态
- showMoreFlag = !showMoreFlag;
- // 根据状态更新文本和图标
- if (showMoreFlag) {
- $('#moreText').hide();
- $('.hiddenParam').show();
- $('#lessText').show();
- } else {
- $('#lessText').hide();
- $('.hiddenParam').hide();
- $('#moreText').show();
- }
- });
- });
- </script>
- </body>
- </html>
|