| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724 | 
							- <%@ 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>
 
- 		.layui-table-cell{
 
- 			height: 42px !important;
 
- 		}
 
- 	</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>
 
- <%--				<button class="btn btn_add" @click="add">新增</button>--%>
 
- 				<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">
 
- 								<div class="layui-row">
 
- 									<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">
 
- 										<div class="layui-form-item">
 
- 											<label class="layui-form-label">项目状态</label>
 
- 											<div class="layui-input-block">
 
- 												<select name="status">
 
- 													<option value="">请选择</option>
 
- 													<option value="1">储备</option>
 
- 													<option value="2">新建</option>
 
- 													<option value="3">在建</option>
 
- 													<option value="9">投产</option>
 
- 												</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 time_box">
 
- 													<input type="text" id="startTime" name="rangeDate" 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">
 
- 											<div class="layui-input-block time_box">
 
- 												<button type="button" class="layui-btn layui-btn-normal" @click="search">查询</button>
 
- <%--												<button type="button" class="layui-btn layui-btn-export" @click="downTemplate">下载模板</button>--%>
 
- <%--												<button type="button" class="layui-btn layui-btn-export" @click="impExcel">导入</button>--%>
 
- 											</div>
 
- 										</div>
 
- 									</div>
 
- 								</div>
 
- 							</form>
 
- 						</div>
 
- 					</div>
 
- 				</div>
 
- <%--				<div>--%>
 
- <%--					<button class="layui-btn btn_add" @click="add">新增</button>--%>
 
- <%--				</div>--%>
 
- 			</div>
 
- 			<div class="table_box">
 
- 				<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="importExc" style="display: none;">
 
- </div>
 
- <div id="selectWeek" class="layuimini-main" style="display: none;">
 
- 	<form class="layui-form" lay-filter="weekForm">
 
- 		<div class="layui-row">
 
- 		</div>
 
- 		<div class="layui-row">
 
- 			<div class="layui-col-xs12 layui-col-sm12">
 
- 				<div class="layui-form-item">
 
- 					<label class="layui-form-label">周:</label>
 
- 					<div class="layui-input-block">
 
- 						<select name="weekValue">
 
- 							<c:forEach items="${weekList}" var="js">
 
- 								<option value="${js}">${js}</option>
 
- 							</c:forEach>
 
- 						</select>
 
- 					</div>
 
- 				</div>
 
- 			</div>
 
- 		</div>
 
- 	</form>
 
- </div>
 
- <div id="selectMonth" class="layuimini-main" style="display: none;">
 
- 	<form class="layui-form" lay-filter="monthForm">
 
- 		<div class="layui-row">
 
- 		</div>
 
- 		<div class="layui-row">
 
- 			<div class="layui-col-xs12 layui-col-sm12">
 
- 				<div class="layui-form-item">
 
- 					<label class="layui-form-label">月:</label>
 
- 					<div class="layui-input-block">
 
- 						<select name="monthValue">
 
- 							<c:forEach items="${monthList}" var="js">
 
- 								<option value="${js}">${js}</option>
 
- 							</c:forEach>
 
- 						</select>
 
- 					</div>
 
- 				</div>
 
- 			</div>
 
- 		</div>
 
- 	</form>
 
- </div>
 
- <script type="text/html" id="subName">
 
- 	<span title="{{d.subName}}">{{d.subName}}</span>
 
- </script>
 
- <script type="text/html" id="pre">
 
- 	<div class="toolBar">
 
- 		<span style="width: 30px;cursor: pointer;" lay-event="preEdit">办理</span>
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="yearPlan">
 
- 	<div class="toolBar">
 
- 		<span lay-event="yearPlan">年度计划</span>
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="begin">
 
- 	<div class="toolBar">
 
- 		{{#if(d.status == "6"){ }}
 
- 		<span style="width: 30px;" lay-event="begin">开工申请</span>
 
- 		{{#} else { }}
 
- 		<span style="color:#999	">开工申请</span>
 
- 		{{#} }}
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="end">
 
- 	<div class="toolBar">
 
- 		{{#if(d.status == "7"){ }}
 
- 		<span style="width: 30px;" lay-event="end">竣工申请</span>
 
- 		{{#} else { }}
 
- 		<span style="color:#999">竣工申请</span>
 
- 		{{#} }}
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="week">
 
- 	<div class="toolBar">
 
- 		{{#if(d.status == "7" || d.status == "8"){ }}
 
- 		<span lay-event="week">周报</span>
 
- 		{{#} else { }}
 
- 		<span style="color:#999">周报</span>
 
- 		{{#} }}
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="month">
 
- 	<div class="toolBar">
 
- 		{{#if(d.status == "7" || d.status == "8"){ }}
 
- 		<span style="width: 30px;" lay-event="month">月报</span>
 
- 		{{#} else { }}
 
- 		<span style="color:#999">月报</span>
 
- 		{{#} }}
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="stop">
 
- 	<div class="toolBar">
 
- 		{{#if(d.status == "7"){ }}
 
- 		<span style="width: 30px;" lay-event="stop">停工</span>
 
- 		{{#} else if(d.status == "8") { }}
 
- 		<span style="width: 30px;" lay-event="stop">开工</span>
 
- 		{{#} else { }}
 
- 			<span style="color:#999;">停工</span>
 
- 		{{#} }}
 
- 	</div>
 
- </script>
 
- <script type="text/html" id="endLight">
 
- 	{{# var computedPer1 = function(beginDate){
 
- 	var beginDate =new Date(beginDate);
 
- 	var newDate =  new Date();
 
- 	if(newDate.getTime() >beginDate.getTime()){
 
- 	return "red";
 
- 	}else{
 
- 	return "-";
 
- 	}
 
- 	};
 
- 	}}
 
- 	{{#if(computedPer1(d.endDate)=="red"  && d.status != 'A') { }}
 
- 	<span style="color: red" >   <image    style="width:40px;height:40px;margin: auto;"     src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
 
- 	{{#} else { }}
 
- 	<span style="color: yellow">  <image    style="width:40px;height:40px;margin: auto;"     src="${WebSite.asset}/css/images//bigScreen/light-green.png"></image></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  style="width: 30px;" lay-event="toPre">办理情况</span>
 
- 		<span  style="width: 30px;" lay-event="toDetail">项目详情</span>
 
- 	</div>
 
- </script>
 
- <script>
 
- new Vue({
 
- 	el: "#app",
 
- 	template: "#template",
 
- 	data: {
 
- 		winH: 0,
 
- 		dataList : [],
 
- 		tableName : 'test',
 
- 		pageNo : 1,
 
- 		pageSize : 10
 
- 	},
 
- 	mounted : function() {
 
- 		this.init();
 
- 	},
 
- 	methods: {
 
- 		init : function() {
 
- 			this.winH = document.body.clientHeight;
 
- 			var curYear = new Date().getFullYear();
 
- 			layui.laydate.render({
 
- 				elem: '#startTime',
 
- 				range: '~',
 
- 				theme: layDateTheme,
 
- 				value: curYear+"-01-01 ~ "+ curYear+"-12-31"
 
- 			});
 
- 			layui.upload.render({
 
-     	    	elem: '#importExc'
 
- 				  ,url: App.getUrl('/api/subject/subInfo/importHisData')
 
- 				  ,done: function(res, index, upload){ //上传后的回调
 
- 					  if(res.success){
 
- 						layer.msg("导入成功", {icon: 1, time: 1000});
 
- 					  }
 
- 				  }
 
- 				  ,accept: 'file' //允许上传的文件类型
 
- 				  ,exts: 'xls|xlsx'
 
- 				  ,multiple: false //允许上传多个文件
 
-     	    });
 
- 			this.getData();
 
- 			window.toDetail = this.toDetail;
 
- 		},
 
- 		del: function(obj) {
 
- 			var self = this;
 
- 			App.msg.confirm("确认删除该项目吗?", function(){
 
- 				App.postJson("/api/subject/subInfo/del",{id : obj.data.id}, function(res){
 
- 					if(res.success){
 
- 						self.getData();
 
- 					}
 
- 				})
 
- 			})
 
- 		},
 
- 		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;
 
- 			}
 
- 			param.pageNo = this.pageNo;
 
- 			param.pageSize = this.pageSize;
 
- 			// param.status = "0";
 
- 			App.postJson("/api/subject/subInfo/pageQueryNDataPlus",param, function(res){
 
- 				self.dataList = res.rows;
 
- 				for(var i=0;i<self.dataList.length;i++){
 
- 					var tem = self.dataList[i];
 
- 					switch(tem.status){
 
- 					case '1':
 
- 						tem.statusName = '储备';
 
- 						break;
 
- 					case '2':
 
- 						tem.statusName = '新建';
 
- 						break;
 
- 					case '3':
 
- 						tem.statusName = '在建';
 
- 						break;
 
- 					case '9':
 
- 						tem.statusName = '投产';
 
- 						break;
 
- 					}
 
- 				}
 
- 				self.loadPage(res.total);
 
- 				self.loadTable();
 
- 			});
 
- 		},
 
- 		loadTable : function(){
 
- 			var self = this;
 
- 			layui.table.render({
 
- 				elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
 
- 				even: true,
 
- 				height:'auto',
 
- 				cols: [[ // 设置表头
 
- 					{type: 'numbers', align: 'center',title:'序号', width: 44},
 
- 					{field: 'subName', title: '项目名称', minWidth: 500, templet: '#subName'},
 
- 					{field: 'amtTotal', title: '总投资(万元)', minWidth: 100},
 
- 					{field: 'amtJh', title: '计划投资(万元)', minWidth: 100},
 
- 					{field: 'statusName', title: '项目状态', minWidth: 100},
 
- 					{field: 'indusKindName', title: '行业类别', minWidth: 100},
 
- 					{field: 'subjectName', title: '建设地点', minWidth: 100},
 
- 					// {field: 'statusName', title: '竣工灯色', minWidth: 100, templet: '#endLight'},
 
- 					// {field: '', title: '项目前期', minWidth: 100, templet: '#pre'},
 
- 					// {field: '', title: '年度计划', minWidth: 100, templet: '#yearPlan'},
 
- 					// {field: '', title: '开工申请', minWidth: 100, templet: '#begin'},
 
- 					// {field: '', title: '竣工申请', minWidth: 100, templet: '#end'},
 
- 					// {field: '', title: '周报', minWidth: 100, templet: '#week'},
 
- 					// {field: '', title: '月报', minWidth: 100, templet: '#month'},
 
- 					// {field: '', title: '是否停工', minWidth: 100, templet: '#stop'},
 
- 					{title: '操作', width: 180, align:'center', toolbar: '#toolBar',},
 
- 				]],
 
- 				fixed:true,
 
- 				height:window.screen.availHeight-380,
 
- 				data : self.dataList
 
- 			});
 
- 			layui.table.on('tool('+this.tableName+')', function(obj){
 
- 	            var event = obj.event;
 
- 	           	self[event].call(this, obj);
 
- 		    });
 
- 		},
 
- 		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(){
 
- 			var self = this;
 
- 			var content='<span style="color:red;font-size:25px;"> SM项目禁止录入!!!!</span>';
 
- 			layer.confirm(content,{
 
- 				area: ['350px',''],
 
- 				btn: ['开始录入','取消']
 
- 				}, function(){
 
- 				window.location.href= App.getUrl("/subject/subInfo/add");
 
- 			})
 
- 		},
 
- 		//判断监管单位是否存在
 
- 		checkAdd : function(){
 
- 			var subjectId=$("#zrzt").val();
 
- 			var hyfl=$("#hyfl").val();
 
- 			App.postJson("/api/subject/subInfo/checkAdd",{subjectId : subjectId,hyfl:hyfl}, function(res){
 
- 				if(res.success){
 
- 					window.location.href= App.getUrl("/subject/subInfo/add?subjectId="+subjectId+"&hyfl="+hyfl+"&unit_id="+res.data.id);
 
- 				}
 
- 			});
 
- 		},
 
- 		xuanze : function(){
 
- 			var self = this;
 
- 			this.planEditPanl = layer.open({
 
- 				title : "所属行业 与 建设地点选择",
 
- 				type : 1,
 
- 				content : $("#preplanEdit"),
 
- 				area : ['800px', '600px']
 
- 			})
 
- 		},
 
- 		edit: function(obj) {
 
- 			window.location.href=App.getUrl("/subject/subInfo/add?id=" + obj.data.id);
 
- 		},
 
- 		detail: function(obj) {
 
- 			window.location.href=App.getUrl("/subject/subInfo/detail?subId=" + obj.data.id);
 
- 		},
 
- 		// 前往项目手续办理页面
 
- 		toPre: function (obj) {
 
- 			window.location.href=App.getUrl("/subPreNew/sbTodo?subId=" + obj.data.id);
 
- 		},
 
- 		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);
 
- 		},
 
- 		preEdit: function(obj) {
 
- 			window.location.href=App.getUrl("/subPreNew/todo?subId=" + obj.data.id);
 
- 		},
 
- 		yearPlan: function(obj) {
 
- 			var date=new Date;
 
- 			App.postJson("/api/amtPlan/checkAmtPlanLock",{subId : obj.data.id,year:date.getFullYear()}, function(res){
 
- 				if(res.success){
 
- 					if (res.data){
 
- 						App.msg.warn(" 计划已被锁定");
 
- 						return;
 
- 					}
 
- 				}
 
- 			});
 
- 			// if (obj.data.is_lock=="1"){
 
- 			// 	App.msg.warn("该项目的年度计划被锁定,不能录入了!");
 
- 			// 	return;
 
- 			// }else{
 
- 				window.location.href=App.getUrl("/amtPlan/edit?subId="+obj.data.id+"&year="+date.getFullYear());
 
- 			// }
 
- 		},
 
- 		begin : function(obj){
 
- 			var self = this;
 
- 			// var message=  checkSubInfoStatus(obj);
 
- 			//
 
- 			// //判断状态
 
- 			// if (obj.data.status != "6"){
 
- 			//
 
- 			// 	App.msg.warn(message +"项目状态为审核通过 才能进行开工申报");
 
- 			// 	return;
 
- 			// }
 
- 			var subName = "项目名称:"+ obj.data.subName+"<br>是否确认进行项目开工申报?";
 
- 			layer.confirm(subName,{title: "项目开工申报",btn:["确认","取消"]}, function(){
 
- 				App.postJson("/api/subject/subInfo/subStartDeclaration",{subId : obj.data.id}, function(res){
 
- 					if(res.success){
 
- 						layer.closeAll();
 
- 						self.getData();
 
- 					}
 
- 				});
 
- 			});
 
- 		},
 
- 		end : function(obj){
 
- 			// var message=  checkSubInfoStatus(obj);
 
- 			// //判断状态
 
- 			// if (obj.data.status != "7"){
 
- 			//
 
- 			// 	App.msg.warn(message+ "项目状态为 施工中才能进行 竣工申报");
 
- 			// 	return;
 
- 			// }
 
- 			//20230821  竣工申报直接竣工,不管计划。
 
- 			App.postJson("/api/subComplete/canReport",{subId : obj.data.id}, function(res){
 
- 				if(res.success){
 
- 					window.location.href=App.getUrl("subComplete/report?subId="+obj.data.id);
 
- 				}
 
- 			});
 
- 		},
 
- 		stop: function (obj) {
 
- 			var self = this;
 
- 			var msgConfirm = (obj.data.status == '7' ? '确认变更为停工状态?' : '确认变更为开工状态?');
 
- 			App.msg.confirm(msgConfirm, function () {
 
- 				layer.open({
 
- 					type: 1,
 
- 					title: obj.data.status == '7' ? '停工日期' : '开工日期',
 
- 					content: $("#openAndEndDate"),
 
- 					area: ['500px', '300px'],
 
- 					btn: ["保存", "取消"],
 
- 					yes: function (index) {
 
- 						var reason = layui.form.val("openForm");
 
- 						if (reason.openDate==null||reason.openDate==""){
 
- 							App.msg.warn("日期不能为空");
 
- 							return;
 
- 						}
 
- 						App.postJson("/api/subject/subInfo/changeTg", {subId: obj.data.id,openDate:reason.openDate}, function (res) {
 
- 							if (res.success) {
 
- 								App.msg.success("变更成功");
 
- 								layer.close(index);
 
- 								self.getData();
 
- 							}
 
- 						})
 
- 					},
 
- 					close: function (index) {
 
- 						layer.close(index);
 
- 					}
 
- 				})
 
- 			})
 
- 		},
 
- 		// stop: function(obj) {
 
- 		//
 
- 		// 	var self = this;
 
- 		// 	var msgConfirm = (obj.data.status == '7' ? '确认变更为停工状态?':'确认变更为开工状态?');
 
- 		// 	App.msg.confirm(msgConfirm, function(){
 
- 		// 		App.postJson("/api/subject/subInfo/changeTg", {subId: obj.data.id}, function(res){
 
- 		// 			if(res.success){
 
- 		// 				App.msg.success("变更成功");
 
- 		// 				self.getData();
 
- 		// 			}
 
- 		// 		})
 
- 		// 	})
 
- 		// },
 
- 		week: function (obj) {
 
- 			// var message=  checkSubInfoStatus(obj);
 
- 			//
 
- 			// //判断状态
 
- 			// if (obj.data.status != "7"&& obj.data.status != "8"){
 
- 			//
 
- 			// 	App.msg.warn(message+" 项目状态为施工中,才能填写周报");
 
- 			// 	return;
 
- 			// }
 
- 			layer.open({
 
- 				type: 1,
 
- 				title: "周报时间选择",
 
- 				content: $("#selectWeek"),
 
- 				area: ['800px', '600px'],
 
- 				btn: ["周报填写", "取消"],
 
- 				yes: function(index) {
 
- 					var data = layui.form.val("weekForm");
 
- 					//请求周报
 
- 					//跳转
 
- 					window.location.href=App.getUrl("weekReport/getBySubId?subId="+obj.data.id+"&beginDate="+data.weekValue.split("~")[0]);
 
- 				},
 
- 				close: function(index) {
 
- 					layer.close(index);
 
- 				}
 
- 			})
 
- 			//弹出周选择
 
- 		},
 
- 		month: function (obj) {
 
- 			// var message=  checkSubInfoStatus(obj);
 
- 			// //判断状态
 
- 			// if (obj.data.status != "7"&& obj.data.status != "8"){
 
- 			//
 
- 			// 	App.msg.warn(message+"  项目状态为施工中,才能填写月报");
 
- 			// 	return;
 
- 			// }
 
- 			layer.open({
 
- 				type: 1,
 
- 				title: "月报时间选择",
 
- 				content: $("#selectMonth"),
 
- 				area: ['800px', '600px'],
 
- 				btn: ["月报填写", "取消"],
 
- 				yes: function(index) {
 
- 					var data = layui.form.val("monthForm");
 
- 					//请求周报
 
- 					//跳转
 
- 					window.location.href=App.getUrl("monthReport/getBySubId?subId="+obj.data.id+"&beginDate="+data.monthValue);
 
- 				},
 
- 				close: function(index) {
 
- 					layer.close(index);
 
- 				}
 
- 			})
 
- 			//弹出月选择  monthReport
 
- 		},
 
- 		genTime : function(weekNum) {
 
- 			if(!weekNum) {
 
- 				weekNum = 0;
 
- 			}
 
- 			let today = new Date().addWeeks(weekNum);
 
- 			let weekday = today.getDay();
 
- 			let monday;
 
- 			let sunday;
 
- 			if (weekday == 0) {
 
- 				monday = new Date(1000 * 60 * 60 * 24 * (weekday - 6) + today.getTime());
 
- 			} else {
 
- 				monday = new Date(1000 * 60 * 60 * 24 * (1 - weekday) + today.getTime());
 
- 			}
 
- 			if (weekday == 0) {
 
- 				sunday = today;
 
- 			} else {
 
- 				sunday = new Date(1000 * 60 * 60 * 24 * (7 - weekday) + today.getTime());
 
- 			}
 
- 			let month = monday.getMonth() + 1;
 
- 			if (month < 10) {
 
- 				month = "0" + month;
 
- 			}
 
- 			let day1 = monday.getDate();
 
- 			if (day1 < 10) {
 
- 				day1 = "0" + day1;
 
- 			}
 
- 			let start = "" + monday.getFullYear() + "-" + month + "-" + day1;
 
- 			let month2 = sunday.getMonth() + 1;
 
- 			if (month2 < 10) {
 
- 				month2 = "0" + month2;
 
- 			}
 
- 			let day2 = sunday.getDate();
 
- 			if (day2 < 10) {
 
- 				day2 = "0" + day2;
 
- 			}
 
- 			let end = "" + sunday.getFullYear() + "-" + month2 + "-" + day2;
 
- 			return start + " ~ " + end;
 
- 		},
 
- 		setTimeData(value, ele) {
 
- 			if (value != "" && value.length > 0) {
 
- 				let today = new Date(value.substring(0, 10));
 
- 				let weekday = today.getDay();
 
- 				let monday;
 
- 				let sunday;
 
- 				if (weekday == 0) {
 
- 					monday = new Date(1000 * 60 * 60 * 24 * (weekday - 6) + today.getTime());
 
- 				} else {
 
- 					monday = new Date(1000 * 60 * 60 * 24 * (1 - weekday) + today.getTime());
 
- 				}
 
- 				if (weekday == 0) {
 
- 					sunday = today;
 
- 				} else {
 
- 					sunday = new Date(1000 * 60 * 60 * 24 * (7 - weekday) + today.getTime());
 
- 				}
 
- 				let month = monday.getMonth() + 1;
 
- 				if (month < 10) {
 
- 					month = "0" + month;
 
- 				}
 
- 				let day1 = monday.getDate();
 
- 				if (day1 < 10) {
 
- 					day1 = "0" + day1;
 
- 				}
 
- 				let start = "" + monday.getFullYear() + "-" + month + "-" + day1;
 
- 				let month2 = sunday.getMonth() + 1;
 
- 				if (month2 < 10) {
 
- 					month2 = "0" + month2;
 
- 				}
 
- 				let day2 = sunday.getDate();
 
- 				if (day2 < 10) {
 
- 					day2 = "0" + day2;
 
- 				}
 
- 				let end = "" + sunday.getFullYear() + "-" + month2 + "-" + day2;
 
- 				ele.val(start + " ~ " + end);
 
- 				return start + " ~ " + end;
 
- 			} else {
 
- 				ele.val('');
 
- 			}
 
- 			return "";
 
- 		},
 
- 		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();
 
- 				});
 
- 			})
 
- 		},
 
- 		impExcel: function() {
 
- 			$("#importExc").click();
 
- 		},
 
- 		downTemplate: function() {
 
- 			window.location.href = App.getUrl("/subject/subInfo/downImportExcel");
 
- 		},
 
- 		search : function(){
 
- 			this.pageNo = 1;
 
- 			this.getData();
 
- 		}
 
- 	}
 
- });
 
- </script>
 
- </body>
 
- </html>
 
 
  |