临建项目-统计报表
parent
0eda1a58a7
commit
19749c093a
|
@ -12,7 +12,9 @@ import com.yanzhu.common.core.domain.entity.SysUser;
|
|||
import com.yanzhu.common.core.text.Convert;
|
||||
import com.yanzhu.common.exception.ServiceException;
|
||||
import com.yanzhu.common.utils.DateUtils;
|
||||
import com.yanzhu.common.utils.LogUtils;
|
||||
import com.yanzhu.common.utils.ZxingUtils;
|
||||
import com.yanzhu.project.domain.ProProjectApplyDetail;
|
||||
import com.yanzhu.project.domain.ProProjectInfo;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -198,4 +200,13 @@ public class ProProjectApplyController extends BaseController
|
|||
return toAjax(proProjectApplyService.deleteProProjectApplyByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:list')")
|
||||
@PostMapping("/detail")
|
||||
public TableDataInfo detailList(@RequestBody Map<String,String> where)
|
||||
{
|
||||
startPage();
|
||||
List<ProProjectApplyDetail> list = proProjectApplyService.selectProProjectApplyDetailList(where);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -98,4 +98,6 @@ public interface ProProjectApplyMapper
|
|||
public ProProjectApplyDetail selectProProjectApplyDetailById(Long id);
|
||||
|
||||
public int updateProProjectApplyDetail(ProProjectApplyDetail proProjectApplyDetail);
|
||||
|
||||
List<ProProjectApplyDetail> selectProProjectApplyDetailList(Map<String,String> where);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.project.domain.ProProjectApply;
|
||||
import com.yanzhu.project.domain.ProProjectApplyDetail;
|
||||
|
||||
/**
|
||||
* 项目申请Service接口
|
||||
|
@ -84,4 +85,11 @@ public interface IProProjectApplyService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 临建项目统计
|
||||
* @param where
|
||||
* @return
|
||||
*/
|
||||
List<ProProjectApplyDetail> selectProProjectApplyDetailList(Map<String,String> where);
|
||||
}
|
||||
|
|
|
@ -155,6 +155,11 @@ public class ProProjectApplyServiceImpl implements IProProjectApplyService
|
|||
return proProjectApplyMapper.deleteProProjectApplyById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProProjectApplyDetail> selectProProjectApplyDetailList(Map<String,String> where) {
|
||||
return proProjectApplyMapper.selectProProjectApplyDetailList(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目申请明细信息
|
||||
*
|
||||
|
|
|
@ -214,4 +214,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectProProjectApplyDetailList" parameterType="Map" resultMap="ProProjectApplyDetailResult">
|
||||
select pad.id sub_id,CONCAT(pad.super_type_name,'/',pad.type_name) sub_super_type_name,
|
||||
pad.assets_name sub_assets_name,pad.assets_version sub_assets_version,pad.assets_unit sub_assets_unit,
|
||||
pad.push_type sub_push_type,pad.number sub_number,pad.checked_total_value sub_checked_total_value,
|
||||
pad.price sub_price, pa.update_time sub_update_time, pa.apply_status sub_assets_id,pa.create_time sub_create_time,
|
||||
pa.proj_name sub_super_type_key ,pa.par_proj_name sub_type_name
|
||||
from pro_project_apply_detail pad
|
||||
left join pro_project_apply pa on pad.apply_id= pa.id
|
||||
where pad.is_del=0
|
||||
<if test="deptId!=null"> and pa.par_proj_id in (select dept_id from sys_dept sd where find_in_set(#{deptId},sd.ancestors))</if>
|
||||
<if test="parProjectId!=null">and pa.par_proj_id= #{parProjectId}</if>
|
||||
<if test="projectId!=null">and pa.proj_id=#{projectId}</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -8,4 +8,5 @@ export function projectList(data) {
|
|||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,3 +42,11 @@ export function delProjectApply(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function detailProjectList(query) {
|
||||
return request({
|
||||
url: '/project/projectApply/detail',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@ const user = {
|
|||
dept: null,
|
||||
parDeptName: null,
|
||||
roles: [],
|
||||
permissions: []
|
||||
permissions: [],
|
||||
info:null,
|
||||
},
|
||||
|
||||
mutations: {
|
||||
|
@ -21,6 +22,9 @@ const user = {
|
|||
SET_ID: (state, id) => {
|
||||
state.id = id
|
||||
},
|
||||
SET_INFO: (state, info) => {
|
||||
state.info = info
|
||||
},
|
||||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
},
|
||||
|
@ -79,6 +83,7 @@ const user = {
|
|||
commit('SET_NICKNAME', user.nickName)
|
||||
commit('SET_PAR_DEPT_NAME', user.parDeptName)
|
||||
commit("SET_DEPT",user.dept);
|
||||
commit('SET_INFO', user)
|
||||
commit('SET_AVATAR', avatar)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
|
|
|
@ -17,7 +17,7 @@ const service = axios.create({
|
|||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 100000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
<template>
|
||||
<div class="project-apply-detail app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" >
|
||||
<el-form-item label="公司名称" prop="compId">
|
||||
<el-select v-model="queryParams.compId" placeholder="请选择公司" clearable @change="compChange">
|
||||
<el-option v-for="it in compList" :key="it.deptId" :label="it.deptName"
|
||||
:value="it.deptId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="段队" prop="subDeptId">
|
||||
<el-select v-model="queryParams.subDeptId" placeholder="请选择段队" clearable @change="subDeptChange">
|
||||
<el-option v-for="it in subDeptList" :key="it.deptId" :label="it.deptName"
|
||||
:value="it.deptId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目" prop="subDeptId">
|
||||
<el-select v-model="queryParams.prjId" placeholder="请选择项目" clearable @change="prjChange">
|
||||
<el-option v-for="it in prjList" :key="it.deptId" :label="it.deptName"
|
||||
:value="it.deptId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="临建项目" prop="tmpPrjId">
|
||||
<el-select v-model="queryParams.tmpPrjId" placeholder="请选择临建项目" clearable @change="handleQuery">
|
||||
<el-option v-for="it in tmpPrjList" :key="it.id" :label="it.name"
|
||||
:value="it.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="detailList" row-key="id">
|
||||
<el-table-column prop="typeName" label="项目名称" width="200"></el-table-column>
|
||||
<el-table-column prop="superTypeKey" label="临建项目名称" width="200"></el-table-column>
|
||||
<el-table-column prop="superTypeName" label="物资类别" width="200"></el-table-column>
|
||||
<el-table-column prop="assetsName" label="物资名称"></el-table-column>
|
||||
<el-table-column prop="assetsVersion" label="物资型号"></el-table-column>
|
||||
<el-table-column prop="pushType" label="计划分类">
|
||||
<template slot-scope="scope">{{ scope.row.pushType!=3?'计划内':'计划外'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="assetsUnit" label="计量单位"></el-table-column>
|
||||
<el-table-column prop="number" label="计划数量"></el-table-column>
|
||||
<el-table-column prop="checkedTotalValue" label="实际采购数量"></el-table-column>
|
||||
<el-table-column prop="assetsId" label="状态">
|
||||
<template slot-scope="scope">{{ scope.row.assetsId==1?'审批中':scope.row.assetsId==10?'待验收':'验收完成'}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请日期" align="center" prop="createTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="验收日期" align="center" prop="updateTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.assetsId==100? parseTime(scope.row.updateTime):'' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDept } from "@/api/system/dept";
|
||||
import { listProjectInfo } from "@/api/project/projectInfo";
|
||||
import { detailProjectList } from "@/api/project/projectApply";
|
||||
export default {
|
||||
name: 'YanzhuUiProjectApplyDetail',
|
||||
|
||||
data() {
|
||||
return {
|
||||
detailList:[],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
compId:'',
|
||||
subDeptId:'',
|
||||
prjId:'',
|
||||
tmpPrjId:'',
|
||||
deptId:'',
|
||||
},
|
||||
loading:false,
|
||||
allDepts:[{deptId:'',deptName:'所有'}],
|
||||
compList:[{deptId:'',deptName:'所有'}],
|
||||
subDeptList:[{deptId:'',deptName:'所有'}],
|
||||
prjList:[{deptId:'',deptName:'所有'}],
|
||||
tmpPrjList:[{id:'',name:'所有'}],
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let deptId=this.$store.state.user.info.parDeptId;
|
||||
this.queryParams.deptId=deptId;
|
||||
listDept({deptId:deptId}).then(d=>{
|
||||
this.allDepts=d.data||[];
|
||||
let tmps=this.allDepts.filter(d=>d.level==1);
|
||||
this.compList=[{deptId:'',deptName:'所有'},...tmps];
|
||||
});
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
compChange(){
|
||||
let tmps=this.queryParams.compId?this.allDepts.filter(d=>d.level==2 && (","+d.ancestors+",").indexOf(","+this.queryParams.compId+",")>=0):[];
|
||||
this.subDeptList=[{deptId:'',deptName:'所有'},...tmps];
|
||||
this.queryParams.subDeptId=""
|
||||
this.queryParams.prjId="";
|
||||
this.queryParams.tmpPrjId="";
|
||||
this.prjList=[{deptId:'',deptName:'所有'}]
|
||||
this.tmpPrjList=[{id:'',name:'所有'}]
|
||||
},
|
||||
subDeptChange(){
|
||||
let tmps=this.queryParams.subDeptId?this.allDepts.filter(d=>d.level==300 && (","+d.ancestors+",").indexOf(","+this.queryParams.subDeptId+",")>=0):[];
|
||||
this.prjList=[{deptId:'',deptName:'所有'},...tmps];
|
||||
this.queryParams.prjId="";
|
||||
this.queryParams.tmpPrjId="";
|
||||
this.tmpPrjList=[{id:'',name:'所有'}]
|
||||
},
|
||||
prjChange(){
|
||||
if(!this.queryParams.prjId){
|
||||
this.tmpPrjList=[{id:'',name:'所有'}];
|
||||
this.queryParams.tmpPrjId="";
|
||||
return;
|
||||
}
|
||||
listProjectInfo({deptId:this.queryParams.prjId, pageNum: 1,
|
||||
pageSize: 100,}).then(d=>{
|
||||
let tmps=d.rows||[];
|
||||
this.tmpPrjList=[{id:'',name:'所有'},...tmps];
|
||||
this.queryParams.tmpPrjId="";
|
||||
});
|
||||
},
|
||||
getList(){
|
||||
let query={
|
||||
pageNum: this.queryParams.pageNum,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
};
|
||||
if(this.queryParams.tmpPrjId){
|
||||
query.projectId=this.queryParams.tmpPrjId
|
||||
}else if(this.queryParams.prjId){
|
||||
query.parProjectId=this.queryParams.prjId;
|
||||
}else if(this.queryParams.subDeptId){
|
||||
query.deptId=this.queryParams.subDeptId;
|
||||
}else if(this.queryParams.compId){
|
||||
query.deptId=this.queryParams.compId;
|
||||
}else{
|
||||
query.deptId=this.queryParams.deptId;
|
||||
}
|
||||
detailProjectList(query).then(d=>{
|
||||
this.total=d.total;
|
||||
this.detailList=d.rows||[];
|
||||
});
|
||||
},
|
||||
handleQuery(){
|
||||
this.queryParams.pageNum=1;
|
||||
this.getList()
|
||||
},
|
||||
resetQuery(){
|
||||
this.queryParams.pageNum=1;
|
||||
this.queryParams.compId="";
|
||||
this.compList=[{deptId:'',deptName:'所有'}];
|
||||
this.compChange();
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://localhost:8080${process.env.VUE_APP_BASE_API}`,
|
||||
//target: `http://62.234.3.186${process.env.VUE_APP_BASE_API}`,
|
||||
//target: `http://49.235.181.228:8088${process.env.VUE_APP_BASE_API}`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
Loading…
Reference in New Issue