|
@@ -72,22 +72,29 @@
|
|
</head>
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<body>
|
|
|
|
+<script>
|
|
|
|
+ // 将 JSP 传递的 JSDD 数据转为前端对象
|
|
|
|
+ var JSDD = {};
|
|
|
|
+ <c:forEach items="${JSDD}" var="hy">
|
|
|
|
+ JSDD['${hy.code}'] = '${hy.title}';
|
|
|
|
+ </c:forEach>
|
|
|
|
+</script>
|
|
<div id="app"></div>
|
|
<div id="app"></div>
|
|
<template id="template">
|
|
<template id="template">
|
|
<div class="layui-layout layui-layout-admin">
|
|
<div class="layui-layout layui-layout-admin">
|
|
<!-- 内容区域 -->
|
|
<!-- 内容区域 -->
|
|
<div class="right_title">
|
|
<div class="right_title">
|
|
<%-- <span class="txt">重点项目信息台账</span>--%>
|
|
<%-- <span class="txt">重点项目信息台账</span>--%>
|
|
- <div class="txt" style="width: 100%;text-align: center">汇总项目库</div>
|
|
|
|
- <%-- <span class="txt">新建项目库</span>--%>
|
|
|
|
|
|
+ <div class="txt" style="width: 100%;text-align: center">投产项目库</div>
|
|
|
|
+ <%-- <span class="txt">续建项目库</span>--%>
|
|
<div class="layui-collapse">
|
|
<div class="layui-collapse">
|
|
<div class="layui-colla-item">
|
|
<div class="layui-colla-item">
|
|
<%-- <h2 class="layui-colla-title">筛选</h2>--%>
|
|
<%-- <h2 class="layui-colla-title">筛选</h2>--%>
|
|
<div class="layui-colla-content layui-show">
|
|
<div class="layui-colla-content layui-show">
|
|
<form class="layui-form" lay-filter="searchForm" id="searchForm">
|
|
<form class="layui-form" lay-filter="searchForm" id="searchForm">
|
|
- <input type="hidden" name="queryType" value="yearSum">
|
|
|
|
- <%-- <input type="hidden" name="fixCat" value="1">--%>
|
|
|
|
- <input type="hidden" name="isFix" value="2">
|
|
|
|
|
|
+ <input type="hidden" name="queryType" value="yearExtend">
|
|
|
|
+ <input type="hidden" name="fixCat" value="9">
|
|
|
|
+ <input type="hidden" name="isFix" value="1">
|
|
<div class="layui-row">
|
|
<div class="layui-row">
|
|
<div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
|
|
<div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
|
|
<div class="layui-form-item">
|
|
<div class="layui-form-item">
|
|
@@ -161,19 +168,19 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</c:if>
|
|
</c:if>
|
|
- <%-- <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
|
|
|
|
- <div class="layui-form-item">
|
|
|
|
- <label class="layui-form-label label-longers required">建设性质</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <select name="propKind">
|
|
|
|
- <option value="">请选择</option>
|
|
|
|
- <c:forEach items="${JSXZ}" var="js">
|
|
|
|
- <option value="${js.code }">${js.title }</option>
|
|
|
|
- </c:forEach>
|
|
|
|
- </select>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>--%>
|
|
|
|
|
|
+ <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
|
|
|
|
+ <div class="layui-form-item">
|
|
|
|
+ <label class="layui-form-label label-longers required">建设性质</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <select name="propKind">
|
|
|
|
+ <option value="">请选择</option>
|
|
|
|
+ <c:forEach items="${JSXZ}" var="js">
|
|
|
|
+ <option value="${js.code }">${js.title }</option>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
|
|
<div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
|
|
<div class="layui-form-item">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label label-longers required">资金来源</label>
|
|
<label class="layui-form-label label-longers required">资金来源</label>
|
|
@@ -277,36 +284,8 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
|
|
|
|
- <div class="layui-form-item">
|
|
|
|
- <label class="layui-form-label label-longers">建设性质</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <div id="fixCat"></div>
|
|
|
|
- </div>
|
|
|
|
- <%-- <div class="layui-input-block">
|
|
|
|
- <select name="fixCat">
|
|
|
|
- <option value="">所有项目</option>
|
|
|
|
- <option value="3">储备项目</option>
|
|
|
|
- <option value="1">新建项目</option>
|
|
|
|
- <option value="2">续建项目</option>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- </div>--%>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
|
|
|
|
- <div class="layui-form-item">
|
|
|
|
- <label class="layui-form-label label-longers required">标签</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <select name="subLabel" lay-search="">
|
|
|
|
- <option value="">请选择</option>
|
|
|
|
- <c:forEach items="${BQ }" var="hy">
|
|
|
|
- <option value="${hy.id }">${hy.title }</option>
|
|
|
|
- </c:forEach>
|
|
|
|
- </select>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<div class="layui-col-xs3 layui-col-sm3 layui-col-md3 ">
|
|
<div class="layui-col-xs3 layui-col-sm3 layui-col-md3 ">
|
|
<div class="layui-form-item">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label label-longers required">年份</label>
|
|
<label class="layui-form-label label-longers required">年份</label>
|
|
@@ -344,18 +323,19 @@
|
|
v-if="!showMoreFlag">更多 </a><a
|
|
v-if="!showMoreFlag">更多 </a><a
|
|
v-if="showMoreFlag">收起 V</a></span>
|
|
v-if="showMoreFlag">收起 V</a></span>
|
|
<button type="button" class="layui-btn layui-btn-normal"
|
|
<button type="button" class="layui-btn layui-btn-normal"
|
|
- style="margin-left: 80px" @click="addLabels">批量标签
|
|
|
|
|
|
+ style="margin-left: 80px" @click="intoSub">纳入
|
|
|
|
+ </button>
|
|
|
|
+ <button type="button" class="layui-btn layui-btn-norma"
|
|
|
|
+ style="margin-left: 20px"
|
|
|
|
+ @click="downLoadTemplate">模板下载
|
|
|
|
+ </button>
|
|
|
|
+ <button type="button" class="layui-btn layui-btn-norma"
|
|
|
|
+ style="margin-left: 20px" @click="uploadProject">导入
|
|
|
|
+ </button>
|
|
|
|
+ <button type="button" class="layui-btn layui-btn-norma"
|
|
|
|
+ style="margin-left: 20px"
|
|
|
|
+ @click="subInfoToSubFix">自动抓取
|
|
</button>
|
|
</button>
|
|
- <%-- <button type="button" class="layui-btn layui-btn-normal"
|
|
|
|
- style="margin-left: 80px" @click="intoSub">纳入
|
|
|
|
- </button>
|
|
|
|
- <button type="button" class="layui-btn layui-btn-norma"
|
|
|
|
- style="margin-left: 20px"
|
|
|
|
- @click="downLoadTemplate">模板下载
|
|
|
|
- </button>
|
|
|
|
- <button type="button" class="layui-btn layui-btn-norma"
|
|
|
|
- style="margin-left: 20px" @click="uploadProject">导入
|
|
|
|
- </button>--%>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -375,7 +355,7 @@
|
|
<div class="layui-form-item">
|
|
<div class="layui-form-item">
|
|
<div style="display: flex">
|
|
<div style="display: flex">
|
|
<label class="juli">
|
|
<label class="juli">
|
|
- 项目总数<span class="lanse-first">{{beginRate.total}}</span>
|
|
|
|
|
|
+ 续建项目总数<span class="lanse-first">{{beginRate.total}}</span>
|
|
<div class="progress-div">
|
|
<div class="progress-div">
|
|
<div class="layui-progress">
|
|
<div class="layui-progress">
|
|
<div class="layui-progress-bar"></div>
|
|
<div class="layui-progress-bar"></div>
|
|
@@ -510,7 +490,7 @@
|
|
<%-- @click="exportMoreExcel">自定义--%>
|
|
<%-- @click="exportMoreExcel">自定义--%>
|
|
<%-- </button>--%>
|
|
<%-- </button>--%>
|
|
<button type="button" class=""
|
|
<button type="button" class=""
|
|
- @click="exportProject">汇总项目
|
|
|
|
|
|
+ @click="exportProject">续建项目
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -677,6 +657,13 @@
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</script>
|
|
</script>
|
|
|
|
+ <script type="text/html" id="subjectId">
|
|
|
|
+ <div style="display: flex; flex-direction: column; justify-content: center; height: 100%">
|
|
|
|
+ <span title="{{d.subject_id}}" style="white-space: normal; line-height: 1.25">
|
|
|
|
+ {{ JSDD[d.subject_id] || '未知' }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </script>
|
|
<script type="text/html" id="abcSpan">
|
|
<script type="text/html" id="abcSpan">
|
|
{{# if(d.abc == "A") { }}
|
|
{{# if(d.abc == "A") { }}
|
|
<span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
|
|
<span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
|
|
@@ -834,7 +821,6 @@
|
|
<%-- {{#} }}--%>
|
|
<%-- {{#} }}--%>
|
|
<%-- </c:if>--%>
|
|
<%-- </c:if>--%>
|
|
<span title="取消纳入" lay-event="isNoFix"> 取消纳入</span>
|
|
<span title="取消纳入" lay-event="isNoFix"> 取消纳入</span>
|
|
- <span title="标签" lay-event="addLabel" class="no-wrap">标签</span>
|
|
|
|
</div>
|
|
</div>
|
|
</script>
|
|
</script>
|
|
<script>
|
|
<script>
|
|
@@ -847,7 +833,7 @@
|
|
startDate: "",
|
|
startDate: "",
|
|
endDate: "",
|
|
endDate: "",
|
|
tableName: 'test',
|
|
tableName: 'test',
|
|
- cacheName: 'TzQueryParam_yearSum_${currUser.id}',
|
|
|
|
|
|
+ cacheName: 'TzQueryParam_yearExtend_${currUser.id}',
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
kind: {},
|
|
kind: {},
|
|
beginRate: {},
|
|
beginRate: {},
|
|
@@ -907,15 +893,6 @@
|
|
language: 'zn',
|
|
language: 'zn',
|
|
data: indusKindData
|
|
data: indusKindData
|
|
});
|
|
});
|
|
-
|
|
|
|
- this.fixCat = layui.xmSelect.render({
|
|
|
|
- el: "#fixCat",
|
|
|
|
- language: 'zn',
|
|
|
|
- data: [{value: "3", name: "储备项目"}, {value: "1", name: "新建项目"}, {
|
|
|
|
- value: "2",
|
|
|
|
- name: "续建项目"
|
|
|
|
- }]
|
|
|
|
- });
|
|
|
|
layui.laydate.render({
|
|
layui.laydate.render({
|
|
elem: '#year',
|
|
elem: '#year',
|
|
type: 'year',
|
|
type: 'year',
|
|
@@ -952,8 +929,8 @@
|
|
elem: '#importExc'
|
|
elem: '#importExc'
|
|
, url: App.getUrl('/api/subject/subInfo/importFixData')
|
|
, url: App.getUrl('/api/subject/subInfo/importFixData')
|
|
, data: {
|
|
, data: {
|
|
- stateFix: self.getSearchParams().fixCat,
|
|
|
|
- year: self.getSearchParams().year,
|
|
|
|
|
|
+ stateFix:self.getSearchParams().fixCat,
|
|
|
|
+ year:self.getSearchParams().year,
|
|
}
|
|
}
|
|
, done: function (res, index, upload) { //上传后的回调
|
|
, done: function (res, index, upload) { //上传后的回调
|
|
if (res.success) {
|
|
if (res.success) {
|
|
@@ -1096,11 +1073,8 @@
|
|
if (this.indusKind) {
|
|
if (this.indusKind) {
|
|
param.indusKind = this.indusKind.getValue("valueStr");
|
|
param.indusKind = this.indusKind.getValue("valueStr");
|
|
}
|
|
}
|
|
- if (this.fixCat) {
|
|
|
|
- param.fixCat = this.fixCat.getValue("valueStr");
|
|
|
|
- }
|
|
|
|
delete (param.select)
|
|
delete (param.select)
|
|
- param.queryTimeType = "0"
|
|
|
|
|
|
+ param.queryTimeType="0"
|
|
param.kind = this.kind.getValue("value").sort().join(",");
|
|
param.kind = this.kind.getValue("value").sort().join(",");
|
|
return param;
|
|
return param;
|
|
},
|
|
},
|
|
@@ -1113,8 +1087,6 @@
|
|
param.stateFix = this.getSearchParams().fixCat;
|
|
param.stateFix = this.getSearchParams().fixCat;
|
|
param.orderType = this.sort.type || null;
|
|
param.orderType = this.sort.type || null;
|
|
param.queryType = null;
|
|
param.queryType = null;
|
|
- param.subCat = '2';
|
|
|
|
- param.subYear = this.getSearchParams().year;
|
|
|
|
console.log(param);
|
|
console.log(param);
|
|
App.postJson("/api/subInfo/query/all", param, function (res) {
|
|
App.postJson("/api/subInfo/query/all", param, function (res) {
|
|
self.dataList = res.rows;
|
|
self.dataList = res.rows;
|
|
@@ -1219,24 +1191,32 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
|
|
{field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
|
|
- // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
|
|
|
|
- /* {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
|
|
|
|
{
|
|
{
|
|
- field: 'offsetLight',
|
|
|
|
- title: '偏离状态',
|
|
|
|
- type: 'string',
|
|
|
|
- align: 'center',
|
|
|
|
|
|
+ field: 'subjectId',
|
|
fixed: 'left',
|
|
fixed: 'left',
|
|
- width: 100,
|
|
|
|
- templet: '#offsetLight'
|
|
|
|
|
|
+ title: '项目所在地',
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ templet: '#subjectId' // 指定模板
|
|
},
|
|
},
|
|
|
|
+ // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
|
|
|
|
+ /* {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
|
|
|
|
+ // {
|
|
|
|
+ // field: 'offsetLight',
|
|
|
|
+ // title: '偏离状态',
|
|
|
|
+ // type: 'string',
|
|
|
|
+ // align: 'center',
|
|
|
|
+ // fixed: 'left',
|
|
|
|
+ // width: 100,
|
|
|
|
+ // templet: '#offsetLight'
|
|
|
|
+ // },
|
|
|
|
+ {field: 'content', fixed: 'left', title: '项目建设内容', minWidth: 200, templet: '#content'},
|
|
{field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
|
|
{field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
|
|
- {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
|
|
|
|
- {field: 'state', title: '计划时间', width: 140, templet: '#date'},
|
|
|
|
|
|
+ // {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
|
|
|
|
+ // {field: 'state', title: '计划时间', width: 140, templet: '#date'},
|
|
// {field: 'leaderName', title: '分管领导', minWidth: 180, templet: '#leaderInfo'},
|
|
// {field: 'leaderName', title: '分管领导', minWidth: 180, templet: '#leaderInfo'},
|
|
- {field: 'statusName', title: '项目进度', width: 60},
|
|
|
|
- {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
|
|
|
|
- {field: 'unitName', title: '项目单位', minWidth: 110},
|
|
|
|
|
|
+ {field: 'statusName', title: '进展情况', minWidth: 200},
|
|
|
|
+ // {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
|
|
|
|
+ // {field: 'unitName', title: '项目单位', minWidth: 110},
|
|
// { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
|
|
// { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
|
|
{title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
|
|
{title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
|
|
]],
|
|
]],
|
|
@@ -1326,527 +1306,322 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- addLabels: function () {
|
|
|
|
- var layer = layui.layer;
|
|
|
|
- var form = layui.form;
|
|
|
|
- var year = this.getSearchParams().year;
|
|
|
|
- var self = this;
|
|
|
|
- var items = [
|
|
|
|
- <c:forEach items="${BQ}" var="li" varStatus="lis">
|
|
|
|
- {
|
|
|
|
- id: '${li.id}',
|
|
|
|
- title: '${li.title}',
|
|
|
|
- },
|
|
|
|
- </c:forEach>
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- function buildCheckboxString() {
|
|
|
|
- var str = "";
|
|
|
|
- for (let i = 0; i < items.length; i++) {
|
|
|
|
- var count = i + 1;
|
|
|
|
- var hy = items[i];
|
|
|
|
- if (count % 3 === 1) {
|
|
|
|
- // 如果是每三个的第一个,开始新的一行
|
|
|
|
- str += '<tr style="border-bottom: none;">';
|
|
|
|
- }
|
|
|
|
- str += '<td>';
|
|
|
|
- /* if (val.includes(hy.id)) {
|
|
|
|
- str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" checked="checked" value="' + hy.id + '" title="' + hy.title + '" >';
|
|
|
|
- } else {*/
|
|
|
|
- str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" value="' + hy.id + '" title="' + hy.title + '" >';
|
|
|
|
- /* }*/
|
|
|
|
- str += '</td>';
|
|
|
|
- if (count % 3 === 0) {
|
|
|
|
- // 如果是每三个的最后一个,结束当前行
|
|
|
|
- str += '</tr>';
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return str;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 计算所需的高度
|
|
|
|
- var checkboxCount = items.length;
|
|
|
|
- var rows = checkboxCount / 3;
|
|
|
|
- var height = rows * 30 + 120; // 假设每个复选框和间隔高度为 30px,加上按钮和一些额外空间 100px
|
|
|
|
- var width = 400; // 固定宽度或根据需要调整
|
|
|
|
- // 弹出层
|
|
|
|
- layer.open({
|
|
|
|
|
|
+ toBack: function (obj) {
|
|
|
|
+ layer.open({
|
|
type: 1,
|
|
type: 1,
|
|
- title: '标签',
|
|
|
|
- content:
|
|
|
|
- '<form class="layui-form" action="#" onsubmit="event.preventDefault();">' +
|
|
|
|
- '<div class="layui-form-item">' +
|
|
|
|
- '<div class="layui-input-block" style="margin-left: 60px;">' +
|
|
|
|
- '<table class="layui-table" style="border: none;">' +
|
|
|
|
- ' <tbody ">' +
|
|
|
|
- buildCheckboxString() +
|
|
|
|
- ' </tbody>' +
|
|
|
|
- '</table>' +
|
|
|
|
- '</div>' +
|
|
|
|
- '</div>' +
|
|
|
|
- '<div style="position: absolute; bottom: 15px; width: 100%; text-align: center;">' +
|
|
|
|
- '<button class="layui-btn" style="font-size: inherit;" lay-submit lay-filter="formDemoS">确认</button>' +
|
|
|
|
- '<button class="layui-btn layui-btn-primary" style="font-size: inherit;" onclick="layer.closeAll();">取消</button>' +
|
|
|
|
- '</div>' +
|
|
|
|
- '</form>',
|
|
|
|
- success: function (layero, index) {
|
|
|
|
- // 初始化多选框的样式
|
|
|
|
- layui.use(['form'], function () {
|
|
|
|
- form.render();
|
|
|
|
- });
|
|
|
|
- form.render('checkbox');
|
|
|
|
- form.render();
|
|
|
|
- // 监听提交事件
|
|
|
|
- form.on('submit(formDemoS)', function () {
|
|
|
|
- // 获取选中的值
|
|
|
|
- const checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
|
|
|
|
- const selectedValues = [];
|
|
|
|
- checkboxes.forEach(checkbox => {
|
|
|
|
- selectedValues.push(checkbox.value);
|
|
|
|
- });
|
|
|
|
- console.log("选中了", selectedValues);
|
|
|
|
- var param = self.getSearchParams();
|
|
|
|
- param.stateFix = self.getSearchParams().fixCat;
|
|
|
|
- param.orderType = self.sort.type || null;
|
|
|
|
- param.queryType = null;
|
|
|
|
- param.subCat = '2';
|
|
|
|
- param.subYear = self.getSearchParams().year;
|
|
|
|
- App.postJson("/api/subject/subInfo/add/labelS", {
|
|
|
|
- param: param,
|
|
|
|
- cat: "2",
|
|
|
|
- year: year,
|
|
|
|
- labelIdList: selectedValues
|
|
|
|
- }, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- // 关闭弹出层
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- area: [width + 'px', height + 'px'],
|
|
|
|
- offset: 'auto'
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- addLabel: function (obj) {
|
|
|
|
- var layer = layui.layer;
|
|
|
|
- var form = layui.form;
|
|
|
|
- var year = this.getSearchParams().year;
|
|
|
|
-
|
|
|
|
- function getLastSelectedValues() {
|
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
- App.postJson("/api/subject/subInfo/query/label", {
|
|
|
|
- id: obj.data.id,
|
|
|
|
- cat: '2',
|
|
|
|
- year: year
|
|
|
|
- }, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- resolve(res.data || []);
|
|
|
|
- } else {
|
|
|
|
- reject();
|
|
|
|
|
|
+ title: "退回",
|
|
|
|
+ content: $("#toBack"),
|
|
|
|
+ area: ['600px', ''],
|
|
|
|
+ btn: ["保存", "取消"],
|
|
|
|
+ yes: function (index) {
|
|
|
|
+ var data = layui.form.val("toBackForm");
|
|
|
|
+ var status = data.status;
|
|
|
|
+ if (status != undefined) {
|
|
|
|
+ if (parseInt(obj.data.status) <= parseInt(data.status)) {
|
|
|
|
+ App.msg.warn("只能退回下级状态,请检查!!!!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
- });
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ App.postJson("/api/subject/subInfo/toTemp", {
|
|
|
|
+ subId: obj.data.id,
|
|
|
|
+ status: data.status
|
|
|
|
+ }, function (res) {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ layer.msg("成功", {icon: 6, time: 1000});
|
|
|
|
+ //
|
|
|
|
+ window.location.href = App.getUrl("subject/subInfo/projTz?type=1");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
- getLastSelectedValues().then(lastSelectedValues => {
|
|
|
|
- var val = lastSelectedValues;
|
|
|
|
- var self = this;
|
|
|
|
- var items = [
|
|
|
|
- <c:forEach items="${BQ}" var="li" varStatus="lis">
|
|
|
|
- {
|
|
|
|
- id: '${li.id}',
|
|
|
|
- title: '${li.title}',
|
|
|
|
},
|
|
},
|
|
- </c:forEach>
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- function buildCheckboxString() {
|
|
|
|
- var str = "";
|
|
|
|
- for (let i = 0; i < items.length; i++) {
|
|
|
|
- var count = i + 1;
|
|
|
|
- var hy = items[i];
|
|
|
|
- if (count % 3 === 1) {
|
|
|
|
- // 如果是每三个的第一个,开始新的一行
|
|
|
|
- str += '<tr style="border-bottom: none;">';
|
|
|
|
- }
|
|
|
|
- str += '<td>';
|
|
|
|
- if (val.includes(hy.id)) {
|
|
|
|
- str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" checked="checked" value="' + hy.id + '" title="' + hy.title + '" >';
|
|
|
|
- } else {
|
|
|
|
- str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" value="' + hy.id + '" title="' + hy.title + '" >';
|
|
|
|
- }
|
|
|
|
- str += '</td>';
|
|
|
|
- if (count % 3 === 0) {
|
|
|
|
- // 如果是每三个的最后一个,结束当前行
|
|
|
|
- str += '</tr>';
|
|
|
|
- }
|
|
|
|
|
|
+ close: function (index) {
|
|
|
|
+ layer.close(index);
|
|
}
|
|
}
|
|
- return str;
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
- // 计算所需的高度
|
|
|
|
- var checkboxCount = items.length;
|
|
|
|
- var rows = checkboxCount / 3;
|
|
|
|
- var height = rows * 30 + 120; // 假设每个复选框和间隔高度为 30px,加上按钮和一些额外空间 100px
|
|
|
|
- var width = 400; // 固定宽度或根据需要调整
|
|
|
|
|
|
|
|
- // 弹出层
|
|
|
|
|
|
+ problem: function (obj) {
|
|
|
|
+ var self = this;
|
|
|
|
+ obj.data.status_reason = "";
|
|
|
|
+ layui.form.val("problemForm", obj.data);
|
|
layer.open({
|
|
layer.open({
|
|
type: 1,
|
|
type: 1,
|
|
- title: '标签',
|
|
|
|
- content:
|
|
|
|
- '<form class="layui-form" action="#" onsubmit="event.preventDefault();">' +
|
|
|
|
- '<div class="layui-form-item">' +
|
|
|
|
- '<div class="layui-input-block" style="margin-left: 60px;">' +
|
|
|
|
- '<table class="layui-table" style="border: none;">' +
|
|
|
|
- ' <tbody ">' +
|
|
|
|
- buildCheckboxString() +
|
|
|
|
- ' </tbody>' +
|
|
|
|
- '</table>' +
|
|
|
|
- '</div>' +
|
|
|
|
- '</div>' +
|
|
|
|
- '<div style="position: absolute; bottom: 15px; width: 100%; text-align: center;">' +
|
|
|
|
- '<button class="layui-btn" style="font-size: inherit;" lay-submit lay-filter="formDemo">确认</button>' +
|
|
|
|
- '<button class="layui-btn layui-btn-primary" style="font-size: inherit;" onclick="layer.closeAll();">取消</button>' +
|
|
|
|
- '</div>' +
|
|
|
|
- '</form>',
|
|
|
|
- success: function (layero, index) {
|
|
|
|
- // 初始化多选框的样式
|
|
|
|
- layui.use(['form'], function () {
|
|
|
|
- form.render();
|
|
|
|
- });
|
|
|
|
- form.render('checkbox');
|
|
|
|
- form.render();
|
|
|
|
- // 监听提交事件
|
|
|
|
- form.on('submit(formDemo)', function () {
|
|
|
|
- // 获取选中的值
|
|
|
|
- const checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
|
|
|
|
- const selectedValues = [];
|
|
|
|
- checkboxes.forEach(checkbox => {
|
|
|
|
- selectedValues.push(checkbox.value);
|
|
|
|
- });
|
|
|
|
- /* if (selectedValues.length === 0) {
|
|
|
|
- layer.msg('请至少选择一个标签');
|
|
|
|
- return;
|
|
|
|
- }*/
|
|
|
|
- console.log("选中了", selectedValues);
|
|
|
|
- App.postJson("/api/subject/subInfo/add/label", {
|
|
|
|
- id: obj.data.id,
|
|
|
|
- cat: "2",
|
|
|
|
- year: year,
|
|
|
|
- labelIdList: selectedValues
|
|
|
|
- }, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- // 关闭弹出层
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ title: "问题督办",
|
|
|
|
+ content: $("#problem"),
|
|
|
|
+ area: ['800px', '600px'],
|
|
|
|
+ btn: ["保存", "取消"],
|
|
|
|
+ yes: function (index) {
|
|
|
|
+ var reason = layui.form.val("problemForm");
|
|
|
|
+ reason.subId = obj.data.id;
|
|
|
|
+
|
|
|
|
+ if (reason.statusF == "2" || reason.statusF == "1") {
|
|
|
|
+ if (reason.status_reason == "" || reason.status_reason == undefined) {
|
|
|
|
+ layer.msg("红灯,黄灯必须输入原因");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ App.postJson("/api/subject/subInfo/setStatus", {
|
|
|
|
+ subId: obj.data.id,
|
|
|
|
+ statusFgw: reason.statusF,
|
|
|
|
+ reason: reason.status_reason,
|
|
|
|
+ dateConfirm: reason.dateConfirm
|
|
|
|
+ }, function (res) {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ App.msg.success("设置成功");
|
|
|
|
+ self.getData();
|
|
|
|
+ layer.close(index);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- area: [width + 'px', height + 'px'],
|
|
|
|
- offset: 'auto'
|
|
|
|
|
|
+ close: function (index) {
|
|
|
|
+ layer.close(index);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ exportExcel: function () {
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"), "POST", param, "项目情况表.xlsx", "导出失败");
|
|
|
|
+ },
|
|
|
|
+ exportExcelByIndusKind: function () {
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"), "POST", param, "项目情况表(按所属行业统计).xlsx", "导出失败");
|
|
|
|
+ },
|
|
|
|
+ exportSchedulingExcel: function () {
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ App.common.utils.downFile(App.getUrl("subInfoExport/exportSchedulingExcel"), "POST", param, "项目调度表.xlsx", "导出失败");
|
|
|
|
+ },
|
|
|
|
+ /* exportExcel2: function(){
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelTz"),"GET", param,"项目详情信息表.xlsx", "导出失败");
|
|
|
|
+ }, */
|
|
|
|
+ exportMoreExcel: function () {
|
|
|
|
+ top.window.getSearchParams = this.getSearchParams;
|
|
|
|
+ App.openLayer({
|
|
|
|
+ title: "自定义导出",
|
|
|
|
+ content: App.getUrl("/subInfoExport/index"),
|
|
|
|
+ height: "800",
|
|
|
|
+ width: "1000"
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ 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 + "&queryYear=" + obj.data.queryYear),
|
|
});
|
|
});
|
|
- }).catch(error => {
|
|
|
|
- console.error("无法获取上次选中的值", error);
|
|
|
|
- layer.msg('无法获取上次选中的值,请稍后再试');
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ layui.layer.full(index);
|
|
|
|
+ },
|
|
|
|
+ print: function (obj) {
|
|
|
|
+ window.open(App.getUrl("/subject/apply/downPdf?subId=" + obj.data.id));
|
|
|
|
+ },
|
|
|
|
+ toEditSubInfo: function (obj) {
|
|
|
|
+ window.location.href = App.getUrl("/subject/subInfo/editSubInfo?subId=" + obj.data.id);
|
|
|
|
+ },
|
|
|
|
+ toTh: function (obj) {
|
|
|
|
+ if (obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
|
|
|
|
+ App.msg.confirm("是否需要退回到暂存状态?", function () {
|
|
|
|
+ App.postJson("/api/subject/subInfo/toTemp", {subId: obj.data.id}, function (res) {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ layer.msg("成功", {icon: 6, time: 1000});
|
|
|
|
+ //
|
|
|
|
+ window.location.href = App.getUrl("subject/subInfo/projTz");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ App.msg.warn("已做过开工申报,需要走变更流程");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ changeTg: function (obj) {
|
|
|
|
+ var self = this;
|
|
|
|
|
|
- toBack: function (obj) {
|
|
|
|
- layer.open({
|
|
|
|
- type: 1,
|
|
|
|
- title: "退回",
|
|
|
|
- content: $("#toBack"),
|
|
|
|
- area: ['600px', ''],
|
|
|
|
- btn: ["保存", "取消"],
|
|
|
|
- yes: function (index) {
|
|
|
|
- var data = layui.form.val("toBackForm");
|
|
|
|
- var status = data.status;
|
|
|
|
- if (status != undefined) {
|
|
|
|
- if (parseInt(obj.data.status) <= parseInt(data.status)) {
|
|
|
|
- App.msg.warn("只能退回下级状态,请检查!!!!");
|
|
|
|
|
|
+ // var msgConfirm = (obj.data.status == '7' ? '确认变更为停工状态?' : '确认变更为开工状态?');
|
|
|
|
+ // App.msg.confirm(msgConfirm, function () {
|
|
|
|
+
|
|
|
|
+ layer.open({
|
|
|
|
+ type: 1,
|
|
|
|
+ title: obj.data.status == '7' ? '停工日期' : '开工日期',
|
|
|
|
+ content: $("#openAndEndDate"),
|
|
|
|
+
|
|
|
|
+ btn: ["保存", "取消"],
|
|
|
|
+ yes: function (index) {
|
|
|
|
+ var reason = layui.form.val("openForm");
|
|
|
|
+
|
|
|
|
+ if (reason.openDate == null || reason.openDate == "") {
|
|
|
|
+ App.msg.warn("日期不能为空");
|
|
return;
|
|
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);
|
|
}
|
|
}
|
|
- App.postJson("/api/subject/subInfo/toTemp", {
|
|
|
|
- subId: obj.data.id,
|
|
|
|
- status: data.status
|
|
|
|
- }, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- layer.msg("成功", {icon: 6, time: 1000});
|
|
|
|
- //
|
|
|
|
- window.location.href = App.getUrl("subject/subInfo/projTz?type=1");
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ })
|
|
|
|
|
|
- },
|
|
|
|
- close: function (index) {
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
+ // })
|
|
|
|
|
|
- problem: function (obj) {
|
|
|
|
- var self = this;
|
|
|
|
- obj.data.status_reason = "";
|
|
|
|
- layui.form.val("problemForm", obj.data);
|
|
|
|
- layer.open({
|
|
|
|
- type: 1,
|
|
|
|
- title: "问题督办",
|
|
|
|
- content: $("#problem"),
|
|
|
|
- area: ['800px', '600px'],
|
|
|
|
- btn: ["保存", "取消"],
|
|
|
|
- yes: function (index) {
|
|
|
|
- var reason = layui.form.val("problemForm");
|
|
|
|
- reason.subId = obj.data.id;
|
|
|
|
-
|
|
|
|
- if (reason.statusF == "2" || reason.statusF == "1") {
|
|
|
|
- if (reason.status_reason == "" || reason.status_reason == undefined) {
|
|
|
|
- layer.msg("红灯,黄灯必须输入原因");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- App.postJson("/api/subject/subInfo/setStatus", {
|
|
|
|
- subId: obj.data.id,
|
|
|
|
- statusFgw: reason.statusF,
|
|
|
|
- reason: reason.status_reason,
|
|
|
|
- dateConfirm: reason.dateConfirm
|
|
|
|
- }, function (res) {
|
|
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ isNoHide: function (obj) {
|
|
|
|
+ var self = this;
|
|
|
|
+ App.msg.confirm("是否移除在建库?", function () {
|
|
|
|
+ App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
App.msg.success("设置成功");
|
|
App.msg.success("设置成功");
|
|
self.getData();
|
|
self.getData();
|
|
layer.close(index);
|
|
layer.close(index);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- },
|
|
|
|
- close: function (index) {
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- exportExcel: function () {
|
|
|
|
- var param = this.getSearchParams();
|
|
|
|
- App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"), "POST", param, "项目情况表.xlsx", "导出失败");
|
|
|
|
- },
|
|
|
|
- exportExcelByIndusKind: function () {
|
|
|
|
- var param = this.getSearchParams();
|
|
|
|
- App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"), "POST", param, "项目情况表(按所属行业统计).xlsx", "导出失败");
|
|
|
|
- },
|
|
|
|
- exportSchedulingExcel: function () {
|
|
|
|
- var param = this.getSearchParams();
|
|
|
|
- App.common.utils.downFile(App.getUrl("subInfoExport/exportSchedulingExcel"), "POST", param, "项目调度表.xlsx", "导出失败");
|
|
|
|
- },
|
|
|
|
- /* exportExcel2: function(){
|
|
|
|
- var param = this.getSearchParams();
|
|
|
|
- App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelTz"),"GET", param,"项目详情信息表.xlsx", "导出失败");
|
|
|
|
- }, */
|
|
|
|
- exportMoreExcel: function () {
|
|
|
|
- top.window.getSearchParams = this.getSearchParams;
|
|
|
|
- App.openLayer({
|
|
|
|
- title: "自定义导出",
|
|
|
|
- content: App.getUrl("/subInfoExport/index"),
|
|
|
|
- height: "800",
|
|
|
|
- width: "1000"
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- 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 + "&queryYear=" + obj.data.queryYear),
|
|
|
|
- });
|
|
|
|
- layui.layer.full(index);
|
|
|
|
- },
|
|
|
|
- print: function (obj) {
|
|
|
|
- window.open(App.getUrl("/subject/apply/downPdf?subId=" + obj.data.id));
|
|
|
|
- },
|
|
|
|
- toEditSubInfo: function (obj) {
|
|
|
|
- window.location.href = App.getUrl("/subject/subInfo/editSubInfo?subId=" + obj.data.id);
|
|
|
|
- },
|
|
|
|
- toTh: function (obj) {
|
|
|
|
- if (obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
|
|
|
|
- App.msg.confirm("是否需要退回到暂存状态?", function () {
|
|
|
|
- App.postJson("/api/subject/subInfo/toTemp", {subId: obj.data.id}, function (res) {
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ leaderSupervise: function (obj) {
|
|
|
|
+
|
|
|
|
+ App.openLayer({
|
|
|
|
+ title: "督办信息",
|
|
|
|
+ content: App.getUrl("/meetingRecords/leaderMeeting?subId=" + obj.data.id),
|
|
|
|
+ height: "600",
|
|
|
|
+ width: "800"
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ isHide: function (obj) {
|
|
|
|
+ var self = this;
|
|
|
|
+ App.msg.confirm("是否隐藏?", function () {
|
|
|
|
+ App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- layer.msg("成功", {icon: 6, time: 1000});
|
|
|
|
- //
|
|
|
|
- window.location.href = App.getUrl("subject/subInfo/projTz");
|
|
|
|
|
|
+ App.msg.success("设置成功");
|
|
|
|
+ self.getData();
|
|
|
|
+ layer.close(index);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- App.msg.warn("已做过开工申报,需要走变更流程");
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- changeTg: 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"),
|
|
|
|
-
|
|
|
|
- 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", {
|
|
|
|
|
|
+ addSub: function (index, data) {
|
|
|
|
+ var self = this;
|
|
|
|
+ App.msg.confirm("是否纳入年度固定资产投资项目库?", function () {
|
|
|
|
+ App.postJson("/api/subject/subInfo/setIsFix", {
|
|
|
|
+ subId: data.id,
|
|
|
|
+ year: data.year,
|
|
|
|
+ isFix: "1",
|
|
|
|
+ stateFix:self.getSearchParams().fixCat
|
|
|
|
+ }, function (res) {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ top.layer.close(index);
|
|
|
|
+ App.msg.success("纳入成功");
|
|
|
|
+ self.getData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ isNoFix: function (obj) {
|
|
|
|
+ var self = this;
|
|
|
|
+ App.msg.confirm("是否取消纳入?", function () {
|
|
|
|
+ App.postJson("/api/subject/subInfo/setIsFix", {
|
|
subId: obj.data.id,
|
|
subId: obj.data.id,
|
|
- openDate: reason.openDate
|
|
|
|
|
|
+ isFix: "0",
|
|
|
|
+ year: self.getSearchParams().year,
|
|
|
|
+ stateFix: self.getSearchParams().fixCat
|
|
}, function (res) {
|
|
}, function (res) {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- App.msg.success("变更成功");
|
|
|
|
- layer.close(index);
|
|
|
|
|
|
+ App.msg.success("设置成功");
|
|
self.getData();
|
|
self.getData();
|
|
|
|
+ layer.close(index);
|
|
}
|
|
}
|
|
- })
|
|
|
|
- },
|
|
|
|
- close: function (index) {
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- isNoHide: function (obj) {
|
|
|
|
- var self = this;
|
|
|
|
- App.msg.confirm("是否移除在建库?", function () {
|
|
|
|
- App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- App.msg.success("设置成功");
|
|
|
|
- self.getData();
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- });
|
|
|
|
- },
|
|
|
|
- leaderSupervise: function (obj) {
|
|
|
|
-
|
|
|
|
- App.openLayer({
|
|
|
|
- title: "督办信息",
|
|
|
|
- content: App.getUrl("/meetingRecords/leaderMeeting?subId=" + obj.data.id),
|
|
|
|
- height: "600",
|
|
|
|
- width: "800"
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- isHide: function (obj) {
|
|
|
|
- var self = this;
|
|
|
|
- App.msg.confirm("是否隐藏?", function () {
|
|
|
|
- App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- App.msg.success("设置成功");
|
|
|
|
- self.getData();
|
|
|
|
- layer.close(index);
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ updateFixeCat: function (obj) {
|
|
|
|
+ var self = this;
|
|
|
|
+ App.msg.confirm("是否转入新建库?", function () {
|
|
|
|
+ App.postJson("/api/subject/subInfo/setIsFix", {
|
|
|
|
+ subId: obj.data.id,
|
|
|
|
+ isFix: "0",
|
|
|
|
+ year: self.getSearchParams().year,
|
|
|
|
+ stateFix: self.getSearchParams().fixCat
|
|
|
|
+ }, function (res) {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ App.msg.success("设置成功");
|
|
|
|
+ self.getData();
|
|
|
|
+ layer.close(index);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
|
|
- addSub: function (index, data) {
|
|
|
|
- var self = this;
|
|
|
|
- App.msg.confirm("是否纳入年度固定资产投资项目库?", function () {
|
|
|
|
- App.postJson("/api/subject/subInfo/setIsFix", {
|
|
|
|
- subId: data.id,
|
|
|
|
- year: data.year,
|
|
|
|
- isFix: "1",
|
|
|
|
- stateFix: self.getSearchParams().fixCat
|
|
|
|
- }, function (res) {
|
|
|
|
- if (res.success) {
|
|
|
|
- top.layer.close(index);
|
|
|
|
- App.msg.success("纳入成功");
|
|
|
|
- self.getData();
|
|
|
|
|
|
+ intoSub: function () {
|
|
|
|
+ top.window.addSubInfo = this.addSub;
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ App.openLayer({
|
|
|
|
+ title: "项目纳入",
|
|
|
|
+ content: App.getUrl("/subject/subInfo/chooseSubInto?year=" + param.year),
|
|
|
|
+ end: function () {
|
|
|
|
+ top.window.addSubInfo = null;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- });
|
|
|
|
- }, isNoFix: function (obj) {
|
|
|
|
- var self = this;
|
|
|
|
- App.msg.confirm("是否取消纳入?", function () {
|
|
|
|
- App.postJson("/api/subject/subInfo/setIsFix", {
|
|
|
|
- subId: obj.data.id,
|
|
|
|
- isFix: "0",
|
|
|
|
- year: self.getSearchParams().year,
|
|
|
|
- stateFix: self.getSearchParams().fixCat
|
|
|
|
|
|
+ },
|
|
|
|
+ subInfoToSubFix: function () {
|
|
|
|
+ var self = this;
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ App.postJson("/api/subject/subInfo/subInfoToSubFix", {
|
|
|
|
+ year: param.year,
|
|
|
|
+ cat: 9 // 代表抓取新建项目
|
|
}, function (res) {
|
|
}, function (res) {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- App.msg.success("设置成功");
|
|
|
|
|
|
+ App.msg.success("抓取成功");
|
|
self.getData();
|
|
self.getData();
|
|
- layer.close(index);
|
|
|
|
}
|
|
}
|
|
- });
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- intoSub: function () {
|
|
|
|
- top.window.addSubInfo = this.addSub;
|
|
|
|
- var param = this.getSearchParams();
|
|
|
|
- App.openLayer({
|
|
|
|
- title: "项目纳入",
|
|
|
|
- content: App.getUrl("/subject/subInfo/chooseSubInto?year=" + param.year),
|
|
|
|
- end: function () {
|
|
|
|
- top.window.addSubInfo = null;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- downLoadTemplate: function () {
|
|
|
|
- parent.window.location.href = App.getUrl(
|
|
|
|
- "/subject/subInfo/downLoadFixTemplate"
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- uploadProject: function () {
|
|
|
|
- $("#importExc").click();
|
|
|
|
- self.getData();
|
|
|
|
- },
|
|
|
|
- exportProject: function () {
|
|
|
|
- console.log('导出')
|
|
|
|
- /* var param = this.getSearchParams();*/
|
|
|
|
- /* param.stateFix = this.getSearchParams().fixCat;*/
|
|
|
|
- var param = this.getSearchParams();
|
|
|
|
- /* param.pageNo = this.pageNo;
|
|
|
|
- param.pageSize = this.pageSize;*/
|
|
|
|
-/* param.orderBy = this.sort.field;*/
|
|
|
|
- param.stateFix = this.getSearchParams().fixCat;
|
|
|
|
- param.orderType = this.sort.type || null;
|
|
|
|
- param.queryType = null;
|
|
|
|
- param.subCat = '2';
|
|
|
|
- param.subYear = this.getSearchParams().year;
|
|
|
|
- App.common.utils.downFile(App.getUrl("/subInfoExport/exportFixExcel"), "POST", param, "年度固定资产项目.xlsx", "导出失败");
|
|
|
|
- },
|
|
|
|
- search: function () {
|
|
|
|
- var param = layui.form.getValue("searchForm");
|
|
|
|
- window.localStorage.setItem(this.cacheName, JSON.stringify(param));
|
|
|
|
- this.pageNo = 1;
|
|
|
|
- this.getData();
|
|
|
|
- },
|
|
|
|
- openExport: function () {
|
|
|
|
- this.showExport = true;
|
|
|
|
- console.log('移入了')
|
|
|
|
- },
|
|
|
|
- choseExport: function () {
|
|
|
|
- this.showExport = false;
|
|
|
|
- console.log('移出了')
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ downLoadTemplate: function () {
|
|
|
|
+ parent.window.location.href = App.getUrl(
|
|
|
|
+ "/subject/subInfo/downLoadFixTemplate"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ uploadProject: function () {
|
|
|
|
+ $("#importExc").click();
|
|
|
|
+ self.getData();
|
|
|
|
+ },
|
|
|
|
+ exportProject: function () {
|
|
|
|
+ console.log('导出')
|
|
|
|
+ var param = this.getSearchParams();
|
|
|
|
+ param.stateFix = this.getSearchParams().fixCat;
|
|
|
|
+ param.isFix = '1';
|
|
|
|
+ App.common.utils.downFile(App.getUrl("/subInfoExport/exportFixExcel"), "POST", param, "年度固定资产项目.xlsx", "导出失败");
|
|
|
|
+ },
|
|
|
|
+ search: function () {
|
|
|
|
+ var param = layui.form.getValue("searchForm");
|
|
|
|
+ window.localStorage.setItem(this.cacheName, JSON.stringify(param));
|
|
|
|
+ this.pageNo = 1;
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
|
|
+ openExport: function () {
|
|
|
|
+ this.showExport = true;
|
|
|
|
+ console.log('移入了')
|
|
|
|
+ },
|
|
|
|
+ choseExport: function () {
|
|
|
|
+ this.showExport = false;
|
|
|
|
+ console.log('移出了')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- })
|
|
|
|
- ;
|
|
|
|
|
|
+ });
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|
|
|
|
|