123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <%@ 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 type="text/css">
- .toolBar {
- display: flow-root;
- height: 70px;
- }
- .toolBar span {
- width: 30px;
- cursor: pointer;
- color: #03A9F4;
- /*border-left: solid 2px;*/
- padding-right: 2px;
- text-indent: 20px;
- }
- .toolBar span:first-child {
- border-left: none !important;
- }
- /*.table_box .table_process .layui-table-cell {*/
- /* height: 75px;*/
- /*}*/
- .layui-table-col-special .layui-table-cell{
- display:flex;
- justify-content:space-between;
- }
- .layui-table-col-special .layui-table-cell .step_red{
- background-color:red;
- }
- .table_box .table_process .step_red:before {
- border:2px solid red;
- }
- .layui-table-col-special .layui-table-cell .step_yellow{
- background-color:yellow;
- }
- .table_box .table_process .step_yellow:before {
- border:2px solid yellow;
- }
- .layui-table-col-special .layui-table-cell .step_green{
- background-color:green;
- }
- .table_box .table_process .step_green:before {
- border:2px solid green;
- }
- .queryTimeType{
- margin-top: -9px;
- position: absolute;
- }
- .hiddenParam {
- display: none;
- }
- .morePan{
- margin-top: 4px;
- position: absolute;
- margin-left: 11px;
- }
- .morePan a{
- color: #49a2cfe6;
- }
- </style>
- </head>
- <body>
- <div id="app"></div>
- <template id="template">
- <div class="layui-layout layui-layout-admin">
- <!-- 内容区域 -->
- <div class="right_title">
- <span class="txt">项目信息删除列表</span>
- <div class="layui-collapse">
- <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 }"/>
- <input name="otherStatus" type="hidden" value="${projStatus }"/>
- <div class="layui-row">
- <%-- <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">--%>
- <%-- <input type="text" name="subName" placeholder="请输入" autocomplete="off" class="layui-input">--%>
- <%-- <button type="button" class="layui-btn layui-btn-normal" @click="search"><i class="layui-icon layui-icon-search"></i>查询</button>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
- <div class="layui-form-item">
- <label class="layui-form-label">项目名称</label>
- <div class="layui-input-block">
- <input type="text" name="subName" placeholder="请输入" autocomplete="off" class="layui-input">
- </div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
- <button type="button" class="layui-btn layui-btn-normal" @click="search">查询</button>
- </div>
- </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>
- <script type="text/html" id="subName">
- <%-- {{# if(d.usersub == "1") { }}--%>
- <span title="{{d.subName}}">{{d.subName}}</span>
- <%-- {{# }else { }}--%>
- <%-- <span title="{{d.subName}}">{{d.subName}}</span>--%>
- <%-- {{#}}}--%>
- </script>
- <script type="text/html" id="amt">
- {{# var computedPer = function(total, now){
- return (total == 0) ? 0 : parseInt(now * 100 / total +0.5);
- };
- }}
- <span title="">总投资:{{d.amtTotal}}万元 <br/>
- 年度计划投资:{{d.yearPlanAmt}}万元 <br/>
- 年度完成投资:{{d.yearEndAmt}}万元( {{computedPer(d.yearPlanAmt, d.yearEndAmt)}} %)</span>
- </script>
- <script type="text/html" id="date">
- <div title="">
- <div class="line">计划开工:{{d.beginDate}}
- </div>
- <div class="line">计划竣工:{{d.endDate}}
- </div>
- </div>
- </script>
- <script type="text/html" id="toolBar">
- <div class="toolBar">
- <span title="项目信息" lay-event="toDetail">项目信息</span>
- <span title="项目信息删除" lay-event="del">项目信息删除</span>
- </div>
- </script>
- <script>
- new Vue({
- el: "#app",
- template: "#template",
- data: {
- winH: 0,
- dataList : [],
- startDate:"",
- endDate:"",
- tableName : 'test',
- pageNo : 1,
- kind: {},
- showMoreFlag: false,
- light: null,
- sort: {field: "amtTotal", type:""},
- pageSize : 10
- },
- mounted : function() {
- this.init()
- },
- methods: {
- init : function() {
- this.winH = document.body.clientHeight
- layui.laydate.render({
- elem: '#startTime',
- theme: layDateTheme,
- range: '~'
- });
- var nowdate = new Date();
- nowdate.setMonth(nowdate.getMonth()+1);
- var y = nowdate.getFullYear();
- var m = nowdate.getMonth()+1;
- var d = nowdate.getDate();
- var formatwdate = y+'-'+m+'-'+d;
- layui.laydate.render({
- elem: '#dateConfirm',
- theme: layDateTheme,
- value: formatwdate
- });
- $("#month").val(new Date().getMonth()+1);
- 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: '#year',
- type: 'year',
- theme: layDateTheme,
- value: new Date().getFullYear()
- })
- if(${isHydw}) {
- this.light = layui.xmSelect.render({
- el: "#light",
- language:'zn',
- data: [
- {value: '0', name:'绿灯'},
- {value: '1', name:'黄灯'},
- {value: '2', name:'红灯'}
- ]
- })
- }
- this.getData();
- window.toDetail = this.toDetail;
- },
- showMore: function() {
- this.showMoreFlag = !this.showMoreFlag;
- $(".hiddenParam").toggle();
- },
- getData : function(){
- var self = this;
- var param = layui.form.getValue("searchForm");
- // if(param.rangeDate) {
- // param.beginDate = param.rangeDate.split(" ~ ")[0];
- // param.endDate = param.rangeDate.split(" ~ ")[1];
- // param.rangeDate = null;
- // }
- // if(this.light) {
- // param.light = this.light.getValue("valueStr");
- // }
- // param.kind = this.kind.getValue("value").sort().join(",");
- param.pageNo = this.pageNo;
- param.pageSize = this.pageSize;
- // param.orderBy = this.sort.field;
- // param.orderType = this.sort.type || null;
- App.postJson("/api/subject/subInfo/pageQueryDel",param, function(res){
- self.dataList = res.rows;
- self.loadPage(res.total);
- self.loadTable();
- });
- },
- loadTable : function(){
- for(var i=0;i<this.dataList.length;i++){
- var tem = this.dataList[i];
- switch(tem.status){
- case '0':
- tem.statusName = '暂存';
- break;
- case '1':
- tem.statusName = '项目前期';
- break;
- case '6':
- tem.statusName = '待开工';
- break;
- case '7':
- tem.statusName = '施工中';
- break;
- case '8':
- tem.statusName = '暂时停工';
- break;
- case 'A':
- tem.statusName = '已竣工';
- break;
- }
- }
- var self = this;
- layui.table.render({
- elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
- even: true,
- autoSort: false,
- initSort: self.sort,
- cols: [[ // 设置表头
- {type: 'numbers', fixed: 'left', align: 'center'},
- {title: '', fixed: 'left',width:100, align:'center', templet: function(row) {
- var temp="";
- if (${isHydw}){
- if(row.status_fgw==="2"){
- temp=temp+ ' <image style="width: 28px;height:28px;margin: auto;" src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image>'
- // temp=temp+ '<span class="step step_red' + '"></span>'
- }else if (row.status_fgw==="1"){
- // temp=temp+ '<span class="step step_yellow' + '"></span>'
- temp=temp+ ' <image style="width: 28px;height:28px;margin: auto;" src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image>'
- }else{
- // temp=temp+ '<span class="step step_green' + '"></span>'
- temp=temp+ ' <image style="width: 28px;height:28px;margin: auto;" src="${WebSite.asset}/css/images/bigScreen/light-green.png"></image>'
- }
- }
- return temp;
- }},
- {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 300, templet: '#subName'},
- {field: 'unitName', title: '项目单位', minWidth: 150},
- {field: 'mainName', title: '监管单位', minWidth: 150},
- //{field: 'manageName', title: '监管单位', minWidth: 100,},
- {field: 'amtTotal', title: '总投资额', minWidth: 250, templet: '#amt', sort:"amtTotal"},
- {field: 'state', title: '计划时间', width: 250, templet: '#date'},
- {field: 'statusName', title: '项目进度', width: 200},
- {field: 'reason', title: '退回/不同意原因', width: 160},
- {title: '操作', width: 200, align:'center', toolbar: '#toolBar'}
- ]],
- data : self.dataList,
- done: function(res, curr, count){
- res.data.forEach(function(item, index) {
- //1.当前行的背景颜色cur_color
- if (item.usersub == 1) {
- $('.layui-table').find('tr[data-index="' + index + '"]').find("td").css('background-color', "#0a99eb");
- }
- });
- }
- });
- layui.table.on('tool('+this.tableName+')', function(obj){
- var event = obj.event;
- self[event].call(this, obj);
- });
- layui.table.on('sort('+this.tableName+')', function(obj) {
- self.sort = obj;
- self.getData();
- return;
- })
- },
- 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();
- }
- }
- });
- },
- toDetail : function(obj){
- //详情
- var index = layer.open({
- type: 2,
- title: '',
- area: ['1000px', '800px'],
- content: App.getUrl("/subject/subInfo/detailView?layer=true&subId="+ obj.data.id + "&lastUrl=" + window.location.href),
- });
- layui.layer.full(index);
- },
- del : function(obj) {
- var self = this;
- App.msg.confirm("是否删除该项目的所有信息?", function(){
- App.postJson("/api/subject/subInfo/delSubAllInfo", {id: obj.data.id}, function(res){
- if(res.success){
- self.getData();
- }
- })
- })
- },
- search : function(){
- var param = layui.form.getValue("searchForm");
- this.pageNo = 1;
- this.getData();
- }
- }
- });
- </script>
- </body>
- </html>
|