1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441 |
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8" %>
- <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
- <%@ page isELIgnored="false" %>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
- <title>项目月报</title>
- <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>
- <style>
- .layui-table-body::-webkit-scrollbar {
- width: 0px;
- /*height: 10px;*/
- }
- .pop_info .layui-icon {
- background: none;
- }
- .pop_info .layui-form-item {
- display: flex;
- }
- .pop_info .layui-input-block {
- width: unset;
- flex: 1;
- }
- .table_box .img_ls .img .layui-icon {
- font-size: 16px;
- }
- .table_box,
- .table_box .table_process {
- overflow: visible;
- }
- .layui-table-view .layui-table td > div > span {
- /*min-height: 85px !important;*/
- /*white-space: normal;*/
- line-height: 22px !important;
- display: -webkit-box; /* 使用旧版的弹性盒子布局 */
- -webkit-box-orient: vertical; /* 设置为垂直方向排列 */
- overflow: hidden; /* 隐藏溢出内容 */
- text-overflow: ellipsis; /* 使用省略号表示溢出内容 */
- -webkit-line-clamp: 2; /* 显示的行数 */
- }
- .table_box .img_ls {
- padding: 0;
- }
- .table_box .img_ls li {
- margin-left: 0;
- }
- .layui-table-body .layui-table-cell {
- padding: 5px !important;
- height: 64px !important;
- }
- .layui-table-header .layui-table-cell {
- height: 42px !important;
- }
- .vidio-list {
- width: 100%;
- right: 0;
- z-index: 1000;
- display: flex;
- flex-wrap: wrap;
- /*justify-content: space-between;*/
- align-content: space-between;
- /*width: calc(100% - 310px);*/
- height: 100%;
- }
- .vidio-dispaly {
- margin-left: 15%;
- margin-top: 10px;
- margin-bottom: 10px;
- }
- .imageList {
- width: 70%;
- display: flex;
- flex-wrap: wrap;
- margin-left: 2%;
- /*padding-left: 3rem;*/
- /*padding-top: 3rem;*/
- }
- .img1 {
- width: 72px;
- height: 72px;
- margin-right: 10px;
- margin-bottom: 25px;
- }
- .img1 img {
- width: 72px;
- height: 72px;
- }
- .vidio-list .toolbar {
- width: 72px;
- position: absolute;
- }
- .vidio-list .subName {
- position: absolute;
- font-size: 20px;
- font-weight: 200;
- padding-left: 1rem;
- }
- .vidio-list .detailbar {
- width: 72px;
- display: inline-grid;
- align-content: space-evenly;
- justify-content: center;
- text-align: center;
- }
- .vidio-list .detailbar .remark {
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- color: #b6b2ad;
- }
- .vidio-list .toolbar .editButton {
- cursor: pointer;
- }
- .vidio-list .toolbar .delButton {
- float: right;
- /*padding-right: 12px;*/
- color: red;
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <div id="app"></div>
- <template id="template">
- <div>
- <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">
- <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 time_box">
- <input type="text" name="proName" placeholder="请输入"
- autocomplete="off"
- class="layui-input">
- </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="js">
- <option value="${js.code }">${js.title }</option>
- </c:forEach>
- </select>
- </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">
- <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>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md5">
- <div class="layui-form-item">
- <label class="layui-form-label ">月报期间</label>
- <div class="layui-input-block time_box">
- <input type="text" id="startTime" name="title" placeholder="请选择时间"
- autocomplete="off" class="layui-input">
- <span class="split_txt">至</span>
- <input type="text" id="endTime" name="title"
- placeholder="请选择结束时间"
- autocomplete="off" class="layui-input">
- </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">
- <select name="isDo">
- <option value="0">所有</option>
- <option value="1">已做</option>
- <option value="2">未做</option>
- </select>
- </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="projStatus" lay-verify="required">
- <option value="0">所有</option>
- <option value="1">已开工</option>
- <option value="2">已停工</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div class="layui-col-xs6 layui-col-sm6 layui-col-md12">
- <div class="layui-form-item">
- <button type="button" class="layui-btn layui-btn-normal" @click="onSearch">
- 查询
- </button>
- <%-- <button type="button" class="layui-btn layui-btn-export" @click="exportExcelByIndusKind">下载模板</button>--%>
- <%-- <button type="button" class="layui-btn layui-btn-export" @click="exportSchedulingExcel">导入</button>--%>
- <button type="button" class="layui-btn layui-btn-export"
- @click="exportExcel">导出
- </button>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- <div class="table_box" style="padding-top: 0;">
- <div class="table_process" style="position: relative;">
- <table id="table1" lay-filter="test"></table>
- <div class="pagination-box" id="pagination"></div>
- </div>
- </div>
- <div style="height: 20px;"></div>
- </div>
- <div class="pop_info" id="popInfo">
- <div class="pop_con_form" style="width: 100%; padding: 0px 40px; box-sizing: border-box;">
- <form class="layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label label-longer"><span class="red">*</span>月报期间</label>
- <div class="layui-input-block">
- <input type="text" name="kjMonth" disabled class="layui-input"
- style="background-color: #F6F6F6; color: #ccc;">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label label-longer"><span class="red">*</span>项目名称</label>
- <div class="layui-input-block">
- <input type="text" name="projName" disabled class="layui-input"
- style="background-color: #F6F6F6; color: #ccc;">
- </div>
- </div>
- <%-- <div class="layui-form-item">--%>
- <%-- <label class="layui-form-label label-longer"><span class="red">*</span>当前阶段</label>--%>
- <%-- <div class="layui-input-block" >--%>
- <%-- <select name="subPlanId" lay-filter="subPlanId" id="subPlanId">--%>
- <%-- <option value="">--请选择--</option>--%>
- <%-- <option v-for="(item,index) in currPlan" :index="index" :value="item.id">{{item.beginDate}} 至 {{item.endDate}}</option>--%>
- <%-- </select>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <%-- <div class="layui-form-item" v-if="currPlanIndex != null">--%>
- <%-- <label class="layui-form-label label-longer">计划内容</label>--%>
- <%-- <div class="layui-input-block" >--%>
- <%-- <textarea class="layui-textarea">{{currPlan[currPlanIndex-1].content}}</textarea>--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <div class="layui-form-item">
- <label class="layui-form-label label-longer required">进度比例(%)</label>
- <div class="layui-input-block">
- <input type="number" name="numBl" min="0" max="100"
- placeholder="请输入比例范围在0-100 单位%"
- class="layui-input">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label label-longer required">本月实际投资(万元)</label>
- <div class="layui-input-block">
- <input type="number" id="amt" name="amt" placeholder="请输入金额" class="layui-input">
- <span style="color: red">注:本月实际投资严格按照报统金额填写</span>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label label-longer required">下月计划投资(万元)</label>
- <div class="layui-input-block">
- <input type="number" name="amtLast" placeholder="请输入金额" class="layui-input">
- </div>
- </div>
- <%-- <div class="layui-form-item">--%>
- <%-- <label class="layui-form-label label-longer">入统金额(万元)</label>--%>
- <%-- <div class="layui-input-block">--%>
- <%-- <input type="number" id="amtRt" name="amtRt" placeholder="请输入金额" class="layui-input">--%>
- <%-- </div>--%>
- <%-- </div>--%>
- <div class="layui-form-item">
- <label class="layui-form-label label-longer"><span class="red">*</span>项目进展情况</label>
- <div class="layui-input-block">
- <textarea placeholder="请输入内容" style="height: 80px" name="ybContent"
- class="layui-textarea">{{yuebaoInfo.content}}</textarea>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label label-longer"><span class="red"></span>项目延期原因</label>
- <div class="layui-input-block">
- <textarea placeholder="请输入内容" style="height: 80px" name="ybReason"
- class="layui-textarea">{{yuebaoInfo.reason}}</textarea>
- </div>
- </div>
- <div class="layui-form-item">
- <div class="table_box" style="display: flex;">
- <div class="layui-form-label label-longer required">附件信息</div>
- <ul class="img_ls">
- <li v-for="(item, index) in imgLs" :key="index">
- <div class="img" id="attachDiv" :title="showTitle(item)">
- <%-- //:layer-src="picShow1(item.fileAddre)"--%>
- <img :id="item.fileAddre" :src="picShow(item.fileAddre,item.fileType)"
- @click="showImage(item.fileAddre,item.fileType,item.createTime)"
- :alt="item.fileName"/>
- <div class="download_icon"
- @click="download(item.fileAddre,item.fileName)"></div>
- <i class="layui-icon layui-icon-close-fill"
- style="position: absolute;right: 0;top: 0" @click="delPic(index)"></i>
- </div>
- {{item.fileName}}
- </li>
- <li class="add" id="addPic">
- <div class="bg"><i class="layui-icon layui-icon-add-circle"></i></div>
- </li>
- </ul>
- </div>
- </div>
- <div class="layui-form-item">
- <div class="vidio-list">
- <span class="vidio-dispaly">航拍展示</span>
- <div class="imageList">
- <div class="img1" v-for="(item,index ) in imgList">
- <span class="toolbar">
- <span class="editButton" title="编辑" @click="edit(item)">编辑</span>
- <span class="delButton" title="删除" @click="del(item)">X</span>
- </span>
- <img @dblclick="showAerial(item)"
- :src="`${domain }/static/file/`+item.imgId+`/showfile`">
- <span class="detailbar">
- <span class="time">{{item.aerialDate}}</span>
- <span class="remark" :title="item.remark">{{item.remark}}</span>
- </span>
- </div>
- <div style="width: 72px;height: 72px;text-align: center;border: 1px solid #e7e7e7;display: flex;justify-content: center;align-items: center">
- <div style="width: 62px;height: 62px;background-color: #5e8fe5">
- <i style="display: block;margin-top: 5px;font-size: 30px"
- class="layui-icon layui-icon-add-circle" @click="add"></i>
- </div>
- <%-- <img src="${WebSite.asset }/css/images/jiahao.png" title="新增" style="width:72px;height:72px;">--%>
- </div>
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <div class="table_box" style="display: flex;">
- <div class="layui-form-label label-longer">鸟瞰图</div>
- <ul class="img_ls">
- <li v-for="(item, index) in imgLsPlus" :key="index">
- <div class="img" id="attachDivPlus" style="position: relative">
- <%-- //:layer-src="picShow1(item.fileAddre)"--%>
- <img :id="item.fileAddre" :src="picShowPlus(item.imgId)"
- @click="showImagePlus(item.imgId)"
- :alt="item.fileName"/>
- <div class="download_icon"
- @click="download(item.imgId,item.fileName)"></div>
- <i class="layui-icon layui-icon-close-fill"
- style="position: absolute;right: 0;top: 0" @click="delPicPlus(index)"></i>
- </div>
- </li>
- <li class="add" id="addPicPlus">
- <div class="bg"><i class="layui-icon layui-icon-add-circle"></i></div>
- </li>
- </ul>
- </div>
- </div>
- </form>
- </div>
- </div>
- <div id="addForm" style="display: none;">
- <div class="layuimini-container">
- <div class="layuimini-main">
- <div class="layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label required">航拍日期</label>
- <div class="layui-input-block">
- <input readonly="readonly" class="layui-input" id="aerialDate"
- v-model="editInfo.aerialDate">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">备注</label>
- <div class="layui-input-block">
- <input class="layui-input" v-model="editInfo.remark">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label required">航拍图片</label>
- <div class="layui-input-block">
- <img src="${WebSite.asset }/css/images/jiahao.png" id="upFile"
- style="width: 100px;height: 100px;">
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-block">
- <button type="button" class="layui-btn" @click="save">保存</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="pop_info" id="rtInfo">
- <div class="pop_con_form" style="width: 100%; padding: 0px 40px; box-sizing: border-box;">
- <form class="layui-form" style="margin-top: 20px">
- <div class="layui-form-item">
- <label class="layui-form-label label-longer">本月固投金额(万元)</label>
- <div class="layui-input-block">
- <input type="number" id="amtRt" name="amtRt" placeholder="请输入金额" class="layui-input">
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </template>
- <div id="importExc" style="display: none;">
- </div>
- <script>
- new Vue({
- el: "#app",
- template: "#template",
- data: {
- winH: 0,
- collapse: false,
- tabActive: 1,
- startMonth: "",
- endMonth: "",
- currPlan: [],
- yuebaoInfo: {},
- active: 7, // 左侧菜单选中项
- imgLs: 10,
- pageNo: 1,
- orderType: "",
- pageSize: 20,
- currWeekStart: "",
- currWeekEnd: "",
- currPlanIndex: null,
- imgLs: [],
- imgLsPlus: [],
- editInfo: {},
- imgList: [],
- imgLsDel: [],
- imgLsDelPlus: [],
- showExport: false
- },
- mounted() {
- this.init()
- },
- methods: {
- init() {
- this.winH = document.body.clientHeight
- const {laydate, table, laypage, util} = layui;
- var self = this;
- var beginWeek = self.genTime(-1);
- self.startMonth = beginWeek;
- var endWeek = self.genTime(0);
- self.endMonth = endWeek;
- laydate.render({
- elem: '#startTime',
- type: 'month',
- value: beginWeek,
- btns: ['clear', 'confirm'],
- done: function (value) {
- self.startMonth = value;
- }
- });
- App.common.utils.uploadFile('#upFile', App.getUrl('static/file/upload'), {
- acceptMime: 'image/png,image/jpg,image/jpeg',
- exts: 'png|jpg|jpeg'
- }, function (index, file, result) {
- $('#upFile').attr('src', result); // 图片链接(base64)
- }, function (res) {
- self.editInfo.imgId = res.resultList[0].id;
- }, function () {
- $("#upFile").attr("src", "${WebSite.asset}/css/images/jiahao.png");
- });
- App.common.utils.uploadFile('#addPic', App.getUrl('/static/file/upload'), {
- acceptMime: 'image/png,video/mp4,image/jpg,image/jpeg,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- exts: 'png|jpg|jpeg|pdf|xls|xlsx|doc|docx|mp4'
- }, null, function (res) {
- for (var i = 0; i < res.resultList.length; i++) {
- var pic = {};
- pic.fileAddre = res.resultList[i].id;
- pic.fileName = res.resultList[i].name;
- pic.fileType = res.resultList[i].ftype;
- pic.logicDeleteFlag = 0;
- self.imgLs.push(pic);
- }
- });
- App.common.utils.uploadFile('#addPicPlus', App.getUrl('/static/file/upload'), {
- acceptMime: 'image/png,video/mp4,image/jpg,image/jpeg,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- exts: 'png|jpg|jpeg'
- }, null, function (res) {
- for (var i = 0; i < res.resultList.length; i++) {
- var pic = {};
- pic.imgId = res.resultList[i].id;
- pic.logicDeleteFlag = 0;
- pic.subId = "";
- self.imgLsPlus.push(pic);
- }
- });
- laydate.render({
- elem: '#endTime',
- type: 'month',
- value: endWeek,
- btns: ['clear', 'confirm'],
- done: function (value) {
- self.endMonth = value;
- }
- });
- layui.laydate.render({
- elem: "#aerialDate",
- theme: layDateTheme,
- done: function (value) {
- self.editInfo.aerialDate = value;
- }
- })
- layui.upload.render({
- elem: '#importExc'
- , url: App.getUrl('/api/monthReport/importMonthReport')
- , done: function (res, index, upload) { //上传后的回调
- if (res.success) {
- layer.msg("导入成功", {icon: 1, time: 1000});
- }
- }
- , accept: 'file' //允许上传的文件类型
- , exts: 'xls|xlsx'
- , multiple: false //允许上传多个文件
- });
- window.detail = this.detail;
- window.onEdit = this.onEdit;
- window.onEditRt = this.onEditRt;
- window.sptranskg = this.sptranskg;
- var check = "${isSfgw}";
- if (check !== "false") {
- this.getData();
- } else {
- self.loadTable([]);
- }
- },
- /**
- * 航拍展示 信息
- * @param monthNum
- * @returns {*}
- */
- showAerial: function (item) {
- var index = top.layer.open({
- type: 2,
- area: ['500px', '1000px'],
- offset: 'auto',
- content: App.getUrl("/aerial/imgShow?subId=" + item.subId + "&imgId=" + item.imgId),
- });
- top.layer.full(index);
- },
- add: function () {
- this.editInfo = {};
- $("#upFile").attr("src", "${WebSite.asset }/css/images/jiahao.png");
- this.layerIndex = layer.open({
- type: 1,
- title: "新增航拍图片",
- content: $("#addForm"),
- area: ['600px', '400px']
- })
- },
- edit: function (item) {
- this.editInfo = item;
- if (item.imgId) {
- $("#upFile").attr("src", App.common.utils.imgShow(item.imgId));
- } else {
- $("#upFile").attr("src", "${WebSite.asset }/css/images/jiahao.png");
- }
- this.layerIndex = layer.open({
- type: 1,
- title: "编辑航拍图片",
- content: $("#addForm"),
- area: ['600px', '400px']
- });
- },
- del: function (item) {
- var self = this;
- App.msg.confirm("确认删除该照片吗?", function () {
- App.postJson("/api/aerial/del", {id: item.id}, function (res) {
- if (res.success) {
- self.getImgList();
- }
- })
- })
- },
- save: function () {
- var self = this;
- App.msg.confirm("确认保存吗?", function () {
- if (!self.editInfo.imgId) {
- App.msg.warn("航拍图片不能为空");
- return;
- }
- if (!self.editInfo.aerialDate) {
- App.msg.warn("航拍日期不能为空");
- return;
- }
- console.log(self.yuebaoInfo);
- self.editInfo.subId = self.yuebaoInfo.subId;
- // console.log(self.editInfo);
- // return;
- App.postJson("/api/aerial/save", self.editInfo, function (res) {
- if (res.success) {
- self.editInfo = {};
- layer.close(self.layerIndex);
- self.getImgList();
- }
- })
- })
- },
- getImgList: function () {
- var self = this;
- this.imgList = [];
- App.postJson("/api/aerial/list", {subId: self.yuebaoInfo.subId, type: "0"}, function (res) {
- if (res.success) {
- self.imgList = res.data;
- }
- })
- App.postJson("/api/aerial/list", {subId: self.yuebaoInfo.subId, type: "1"}, function (res) {
- if (res.success) {
- self.imgLsPlus = res.data;
- }
- })
- },
- // showImage: function(imgId) {
- // if(imgId) {
- // layer.open({
- // title: '图片预览',
- // type: 2,
- // content: App.common.utils.imgShow(imgId),
- // area: ['500px', '1000px'],
- // offset: 'auto',
- // success: function(obj,index){
- // layer.full(index);
- // }
- // })
- // }
- // },
- genTime: function (monthNum) {
- if (!monthNum) {
- monthNum = 0;
- }
- let today = new Date().addMonths(monthNum);
- return today.format("yyyy-MM");
- },
- exportExcel: function () {
- var self = this;
- if (this.startMonth == "") {
- layui.layer.msg("必须选择月报期间");
- return;
- }
- if (this.endMonth == "") {
- layui.layer.msg("必须选择月报期间");
- return;
- }
- if (this.endAmt=="" || this.endAmt==undefined){
- endAmt=""
- }else {
- endAmt=this.endAmt
- }
- if (this.startAmt=="" || this.startAmt==undefined){
- startAmt=""
- }else {
- startAmt=this.startAmt
- }
- if (this.amtSj=="" || this.amtSj==undefined){
- amtSj=""
- }else {
- amtSj=this.amtSj
- }
- if (this.amtYc=="" || this.amtYc==undefined){
- amtYc=""
- }else {
- amtYc=this.amtYc
- }
- var param = {
- startMonth: this.startMonth + "-01",
- endMonth: this.endMonth + "-01",
- status: $("[name='projStatus']").val(),
- subName: $("[name='proName']").val(),
- isDo: $("[name='isDo']").val(),
- startAmt: startAmt,
- endAmt: endAmt,
- hyfl: $("[name='hyfl']").val(),
- amtSj: amtSj,
- amtYc: amtYc,
- jsdd: $("[name='jsdd']").val()
- };
- App.common.utils.downFile(App.getUrl("/monthReport/exportExcel"), "GET", param, "项目月报.xlsx", "项目月报导出失败");
- //window.location.href=App.getUrl("/monthReport/exportExcel?startMonth="+param.startMonth+"&endMonth="+param.endMonth+"&status="+param.status+"&subName="+param.subName+"&isDo="+param.isDo+"&startAmt="+param.startAmt+"&endAmt="+param.endAmt+"&hyfl="+param.hyfl);
- },
- loadTable(data) {
- var self = this;
- layui.table.render({
- elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
- even: true,
- autoSort: false,
- limit: data.length,
- fixed: true,
- height: window.screen.availHeight - 400,
- cols: [[ // 设置表头
- {type: 'numbers', fixed: 'left', align: 'center', width: 44, title: '序号'},
- {
- field: 'sub_name',
- title: '项目名称',
- minWidth: 280,
- fixed: 'left',
- templet: function (row) {
- return "<a title=" + row.sub_name + ">" + row.sub_name + "</a>";
- }
- },
- {field: 'amt', title: '总投资', minWidth: 100, templet : function(row){
- if(row.amt){
- return '<span>'+row.amt+'万元</span>';
- }else{
- return "";
- }
- }},
- {field: 'kj_month', title: '月报期间', minWidth: 80},
- {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: 'content', title: '项目进展情况', minWidth: 200, templet: function (row) {
- if (row.content != null) {
- return '<span title="' + row.content + '">' + row.content + '</span>';
- }
- return "";
- }
- },
- {
- field: 'num_bl', title: '完成比例', minWidth: 100, templet: function (row) {
- if (row.num_bl != null && row.num_bl + '' != '') {
- return row.num_bl + "%";
- } else {
- return "";
- }
- }
- },
- {
- field: 'reason', title: '项目延期原因', minWidth: 150, templet: function (row) {
- if (row.reason != null) {
- return '<span title="' + row.reason + '">' + row.reason + '</span>';
- }
- return "";
- }
- },
- /* {field: 'sub_plan_content', title: '阶段内容', minWidth: 100}, */
- {
- title: '操作', fixed: 'right', width: 113, align: 'center', templet: function (row) {
- var temp = "";
- if (row.unit_id === '${unitId}' || '${checkEdit}' == "true") {
- temp = '<div class="toolBar"><span onClick=\'onEdit(' + JSON.stringify(row) + ')\'>项目信息</span></div>';
- } else {
- temp = '<div class="toolBar"><span onClick=\'detail(' + JSON.stringify(row) + ')\'>项目信息</span></div>';
- }
- return temp;
- }
- },
- ]],
- fixed: true,
- height: window.screen.availHeight - 450,
- data: data,
- 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");
- // }
- // }); */
- 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-body tr").resize(function () {
- // $(".layui-table-body tr").each(function (index, val) {
- // $($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
- // });
- // });
- // //初始化高度,使得冻结行表体高度一致
- // $(".layui-table-body tr").each(function (index, val) {
- // $($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
- // });
- });
- }
- });
- layui.table.reload("table1", {
- initSort: {
- field: 'amt',
- type: self.orderType
- }
- })
- layui.table.on("sort(test)", function (obj) {
- self.orderType = obj.type;
- self.getData();
- });
- },
- showTitle: function (obj) {
- return "附件名称:" + obj.fileName;
- },
- delPic: function (index) {
- this.imgLs[index].logicDeleteFlag = 1;
- this.imgLsDel.push(this.imgLs[index]);
- this.imgLs.splice(index, 1);
- },
- delPicPlus: function (index) {
- this.imgLsPlus[index].logicDeleteFlag = 1;
- this.imgLsDelPlus.push(this.imgLsPlus[index]);
- this.imgLsPlus.splice(index, 1);
- },
- download(fileId, fileName) {
- var url = "static/file/download/" + fileId;
- App.common.utils.downFile(App.getUrl(url), "GET", null, fileName);
- },
- showImage: function (fileId, type, createTime) {
- var imageUrl = "";
- var realUrl = "";
- var mp4Url = "";
- if (type == 8) {
- <%--imageUrl= "${WebSite.asset}/css/images/pdf.png";--%>
- imageUrl = "${domain}/static/file/" + fileId + "/showfile";
- //$(tempId).attr("realUrl", "${domain}/static/file/"+fileId+"/showfile");
- } else if (type == null || type == "") {
- } else if (type == 101 || type == 102 || type == 103 || type == 104 || type == 105) {
- imageUrl = "${domain}/static/file/" + fileId + "/showfile";
- //$(tempId).attr("realUrl", "${domain}/static/file/"+fileId+"/showfile");
- } else if (type == 4 || type == 5) {
- imageUrl = "${WebSite.asset}/css/images/excel.png";
- realUrl = "/static/file/download/" + fileId + "";
- } else if (type == 2 || type == 3) {
- imageUrl = "${WebSite.asset}/css/images/word.png";
- realUrl = "/static/file/download/" + fileId + "";
- } else {
- imageUrl = '<video width="100%" height="100%" controls="controls" autobuffer="autobuffer" autoplay="autoplay" loop="loop"><source src="${domain}/static/file/' + fileId + '/showfile" type="video/mp4"></source></video>';
- }
- if (imageUrl) {
- if (type == 2 || type == 3 || type == 4 || type == 5) {
- window.location.href = App.getUrl(realUrl);
- } else if (type == 203) {
- layer.open({
- type: 1,
- title: '播放视频',
- content: imageUrl,
- offset: 'auto',
- area: ['60%', '60%'],
- shade: 0.5,
- shadeClose: true
- });
- } else {
- if (type == 8) {
- // var pdfIndex = layer.open({
- // type: 2,
- // content: imageUrl,
- // area: ['80%', '80%'],
- // offset: 'auto'
- // });
- // layer.full(pdfIndex);
- window.open(imageUrl)
- } else {
- App.common.utils.imageWater(imageUrl, createTime, function (image) {
- layer.photos({
- photos: {
- "title": "",
- "id": fileId,
- "start": 0,
- "data": [
- {
- "alt": "",
- "pid": fileId,
- "src": image,
- "thumb": imageUrl
- }
- ]
- },
- anim: 5
- });
- });
- }
- }
- }
- },
- showImagePlus: function (fileId) {
- var imageUrl = "";
- imageUrl = "${domain}/static/file/" + fileId + "/showfile";
- var type = "101";
- var createTime = "";
- if (imageUrl) {
- if (type == 2 || type == 3 || type == 4 || type == 5) {
- window.location.href = App.getUrl(realUrl);
- } else if (type == 203) {
- layer.open({
- type: 1,
- title: '播放视频',
- content: imageUrl,
- offset: 'auto',
- area: ['60%', '60%'],
- shade: 0.5,
- shadeClose: true
- });
- } else {
- if (type == 8) {
- // var pdfIndex = layer.open({
- // type: 2,
- // content: imageUrl,
- // area: ['80%', '80%'],
- // offset: 'auto'
- // });
- // layer.full(pdfIndex);
- window.open(imageUrl)
- } else {
- App.common.utils.imageWater(imageUrl, createTime, function (image) {
- layer.photos({
- photos: {
- "title": "",
- "id": fileId,
- "start": 0,
- "data": [
- {
- "alt": "",
- "pid": fileId,
- "src": image,
- "thumb": imageUrl
- }
- ]
- },
- anim: 5
- });
- });
- }
- }
- }
- },
- picShow(fileId, type) {
- var tempId = "#" + fileId;
- if (type == 8) {
- return "${WebSite.asset}/css/images/pdf.png";
- } else if (type == null || type == "") {
- } else if (type == 101 || type == 102 || type == 103 || type == 104 || type == 105) {
- return "${domain}/static/file/" + fileId + "/showfile";
- } else if (type == 4 || type == 5) {
- return "${WebSite.asset}/css/images/excel.png";
- } else if (type == 2 || type == 3) {
- return "${WebSite.asset}/css/images/word.png";
- } else if (type == 203) {
- return "${WebSite.asset}/css/images/video.png";
- }
- },
- picShowPlus(fileId) {
- return "${domain}/static/file/" + fileId + "/showfile";
- },
- getData() {
- var self = this;
- if (this.startMonth == "") {
- layui.layer.msg("必须选择月报期间");
- return;
- }
- if (this.endMonth == "") {
- layui.layer.msg("必须选择月报期间");
- return;
- }
- var param = {
- pageNo: this.pageNo,
- pageSize: this.pageSize,
- startMonth: this.startMonth + "-01",
- endMonth: this.endMonth + "-01",
- status: $("[name='projStatus']").val(),
- subName: $("[name='proName']").val(),
- isDo: $("[name='isDo']").val(),
- startAmt: $("[name='startAmt']").val(),
- endAmt: $("[name='endAmt']").val(),
- hyfl: $("[name='hyfl']").val(),
- amtSj: $("[name='amtSj']").val(),
- amtYc: $("[name='amtYc']").val(),
- jsdd: $("[name='jsdd']").val(),
- orderType: this.orderType || null
- };
- App.postJson("/api/monthReport/queryReport", param, function (res) {
- if (res.success) {
- self.loadTable(res.rows);
- self.loadPage(res.total);
- }
- });
- },
- 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();
- }
- }
- });
- },
- detail_rt: function (row) {
- this.yuebaoInfo.amtRt = row.rt_amt || 0;
- $("[name='amtRt']").val(row.amt_rt);
- layer.open({
- type: 1,
- title: '本月固投金额',
- skin: 'pop_info_class',
- id: 'layerPop', //防止重复弹出
- content: $('#rtInfo'),
- area: ['700px', '630px']
- });
- },
- detail: function (row) {
- $("#popInfo").find("input").attr("readOnly", true);
- $("#popInfo").find("textarea").attr("readOnly", true);
- this.setEditPlanValue(row);
- this.setFileValue(row);
- layer.open({
- type: 1,
- title: '月报信息',
- skin: 'pop_info_class',
- id: 'layerPop', //防止重复弹出
- content: $('#popInfo'),
- area: ['700px', '630px']
- });
- },
- sptranskg: function (row) {
- App.postJson("/api/monthReport/ToKG", {subId: row.sub_id}, function (res) {
- if (res.success) {
- layer.msg("成功");
- }
- });
- },
- setEditPlanValue: function (row) {
- var self = this;
- this.yuebaoInfo.subId = row.sub_id;
- // if (row.sub_plan_id==undefined){
- // this.yuebaoInfo.subPlanId ="";
- // self.currPlanIndex = null;
- // }else{
- // this.yuebaoInfo.subPlanId = row.sub_plan_id;
- // }
- this.yuebaoInfo.subName = row.sub_name;
- if (row.content != undefined) {
- this.yuebaoInfo.content = row.content;
- } else {
- this.yuebaoInfo.content = "";
- }
- if (row.num_bl == undefined) {
- this.yuebaoInfo.numBl = "";
- } else {
- this.yuebaoInfo.numBl = row.num_bl;
- }
- this.yuebaoInfo.amt = row.amt;
- this.yuebaoInfo.amtLast = row.amt_last;
- this.setValueEdit(row);
- },
- onEdit: function (row) {
- var self = this;
- const {layer} = layui
- const $ = layui.jquery
- $("#popInfo").find("input").attr("readOnly", false);
- $("#popInfo").find("textarea").attr("readOnly", false);
- /* if(row.status == '1'){
- layer.msg("该项目未开工,无需填写周报!");
- return;
- }
- if(row.status == '9'){
- layer.msg("该项目已竣工,无需填写周报!");
- return;
- } */
- this.setEditPlanValue(row);
- this.setFileValue(row);
- var date = new Date();
- var year = row.kj_month.split("年")[0];
- var month = row.kj_month.split("年")[1].split("月")[0];
- //获取了 年
- var yearCheck = date.getFullYear();
- //获取月
- var monthCheck = date.getMonth() + 1;
- var currDay = date.getDate();
- self.getImgList();
- //判断是否要填 实际金额
- var check = 0;
- if (year == yearCheck) {
- if (Number(month) > Number(monthCheck) || (Number(month) == Number(monthCheck) && currDay < 0)) {
- //不能输入实际资金
- $("#amt").attr("disabled", "disabled");
- $("#amt").attr("style", "background-color:#F6F6F6");
- $("#amtRt").attr("disabled", "disabled");
- $("#amtRt").attr("style", "background-color:#F6F6F6");
- } else {
- $("#amt").removeAttr("disabled");
- $("#amt").attr("style", "");
- $("#amtRt").removeAttr("disabled");
- $("#amtRt").attr("style", "");
- // $("#amt").attr("lay-verify","required");
- check = 1;
- }
- } else if (year > yearCheck) {
- //不能输入实际资金
- $("#amt").attr("disabled", "disabled");
- $("#amt").attr("style", "background-color:#F6F6F6");
- $("#amtRt").attr("disabled", "disabled");
- $("#amtRt").attr("style", "background-color:#F6F6F6");
- } else {
- $("#amt").removeAttr("disabled");
- $("#amt").attr("style", "");
- $("#amtRt").removeAttr("disabled");
- $("#amtRt").attr("style", "");
- // $("#amt").attr("lay-verify","required");
- check = 1;
- }
- layer.open({
- type: 1,
- title: '月报信息',
- skin: 'pop_info_class',
- id: 'layerPop', //防止重复弹出
- content: $('#popInfo'),
- area: ['700px', '630px'],
- btn: ['取消', '提交'],
- btnAlign: 'c', //按钮居中
- yes() {
- layer.closeAll();
- },
- btn2() {
- self.yuebaoInfo.content = $("[name='ybContent']").val();
- self.yuebaoInfo.reason = $("[name='ybReason']").val();
- self.yuebaoInfo.amt = $("[name='amt']").val();
- self.yuebaoInfo.amtLast = $("[name='amtLast']").val();
- // self.yuebaoInfo.amtRt = $("[name='amtRt']").val();
- self.yuebaoInfo.numBl = $("[name='numBl']").val();
- // self.yuebaoInfo.subPlanId = $("[name='subPlanId']").val();
- self.yuebaoInfo.year = row.year;
- var date = new Date();
- date.setFullYear(row.kj_month.split("年")[0]);
- date.setDate(1);
- date.setMonth(Number(row.kj_month.split("年")[1].split("月")[0]) - 1);
- self.yuebaoInfo.beginDate = date.format("yyyy-MM-dd");
- self.yuebaoInfo.endDate = null;
- for (var i = 0; i < self.imgLsDel.length; i++) {
- self.imgLs.push(self.imgLsDel[i]);
- }
- for (var i = 0; i < self.imgLsDelPlus.length; i++) {
- self.imgLsPlus.push(self.imgLsDelPlus[i]);
- }
- for (var i = 0; i < self.imgLsPlus.length; i++) {
- self.imgLsPlus[i].subId = self.yuebaoInfo.subId;
- }
- console.log(self.imgLsPlus);
- self.yuebaoInfo.listFile = self.imgLs;
- // if(self.yuebaoInfo.subPlanId == ""){
- // App.msg.warn("请选择当前阶段");
- // return false;
- // }
- // if(!self.isNum(self.yuebaoInfo.amt)&&check=="1"){
- // App.msg.warn("请输入正数的投资金额");
- // return false;
- // }
- // if(!self.isNum(self.yuebaoInfo.amtLast)){
- // App.msg.warn("请输入正数的预测投资金额");
- // return false;
- // }
- /* if(!self.isNum(self.yuebaoInfo.amtRt)){
- App.msg.warn("请输入正数入统金额");
- return false;
- } */
- if (!self.isNum(self.yuebaoInfo.numBl) || Number(self.yuebaoInfo.numBl) < 0 || Number(self.yuebaoInfo.numBl) > 100) {
- App.msg.warn("请输入0到100的进度比例");
- return false;
- }
- if (self.yuebaoInfo.content == "") {
- layer.msg("请先填写月报内容");
- return false;
- }
- if (self.yuebaoInfo.amt==="") {
- layer.msg("请先填写本月实际投资");
- return false;
- }
- if ( self.yuebaoInfo.amtLast==="") {
- layer.msg("请先填写下月计划投资");
- return false;
- }
- //alert(JSON.stringify(self.yuebaoInfo))
- App.postJson("/api/monthReport/saveReport", self.yuebaoInfo, function (res) {
- if (res.success) {
- layer.msg("保存成功");
- self.getData();
- }
- });
- App.postJson("/api/aerial/saveNk", self.imgLsPlus, function (res) {
- });
- },
- cancel() {
- layer.closeAll();
- }
- })
- },
- onEditRt: function (row) {
- var self = this;
- const {layer} = layui
- const $ = layui.jquery
- $("[name='amtRt']").val(row.amt_rt || 0);
- self.yuebaoInfo.subId = row.sub_id;
- self.yuebaoInfo.subName = row.sub_name;
- layer.open({
- type: 1,
- title: '本月固投金额',
- skin: 'pop_info_class',
- id: 'layerPop', //防止重复弹出
- content: $('#rtInfo'),
- area: ['500px', '330px'],
- btn: ['取消', '提交'],
- btnAlign: 'c', //按钮居中
- yes() {
- layer.closeAll();
- },
- btn2() {
- self.yuebaoInfo.amtRt = $("[name='amtRt']").val();
- self.yuebaoInfo.year = row.year;
- var date = new Date();
- date.setFullYear(row.kj_month.split("年")[0]);
- date.setDate(1);
- date.setMonth(Number(row.kj_month.split("年")[1].split("月")[0]) - 1);
- self.yuebaoInfo.beginDate = date.format("yyyy-MM-dd");
- self.yuebaoInfo.endDate = null;
- App.postJson("/api/monthReport/saveReportRtAmt", self.yuebaoInfo, function (res) {
- if (res.success) {
- layer.msg("保存成功");
- self.getData();
- }
- });
- },
- cancel() {
- layer.closeAll();
- }
- })
- },
- setFileValue: function (row) {
- var self = this;
- var subId = row.sub_id;
- var year = row.year;
- var date = new Date();
- date.setFullYear(row.kj_month.split("年")[0]);
- date.setMonth(row.kj_month.split("年")[1].split("月")[0] - 1);
- date.setDate(1);
- App.postJson("/api/monthReport/getByInfo", {
- subId: subId,
- year: year,
- startDate: date.format("yyyy-MM-dd")
- }, function (res) {
- setTimeout(() => {
- self.imgLs = res.data || [];
- layui.form.render();
- }, 300);
- });
- // this.setValueEdit(row);
- },
- isNum(num) {
- var regPos = /^\d+(\.\d+)?$/;
- if (regPos.test(num)) {
- return true;
- } else {
- return false;
- }
- },
- impExcel: function () {
- $("#importExc").click();
- },
- downTemplate: function () {
- window.location.href = App.getUrl("rptCont/downImportExcel");
- },
- setValueEdit(row) {
- $("[name='kjMonth']").val(row.kj_month);
- $("[name='projName']").val(row.sub_name);
- $("[name='ybContent']").val(row.content);
- $("[name='amt']").val(row.amt);
- // $("[name='amtLast']").val(row.amt_last);
- // $("[name='amtRt']").val(row.amt_rt);
- $("[name='numBl']").val(row.num_bl);
- },
- onSearch() {
- this.pageNo = 1;
- this.getData();
- },
- openExport: function () {
- this.showExport = true;
- },
- choseExport: function () {
- this.showExport = false;
- }
- }
- })
- </script>
- </body>
- </html>
|