oa二期内容更新
This commit is contained in:
@@ -13,7 +13,7 @@ ruoyi:
|
|||||||
# 缓存懒加载
|
# 缓存懒加载
|
||||||
cacheLazy: false
|
cacheLazy: false
|
||||||
# 文件路径
|
# 文件路径
|
||||||
profile: D:/code/java_work/fad_ad/uploadPath
|
profile: /home/wy/oa/uploadPath
|
||||||
|
|
||||||
captcha:
|
captcha:
|
||||||
# 页面 <参数设置> 可开启关闭 验证码校验
|
# 页面 <参数设置> 可开启关闭 验证码校验
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ public class SysOaFinanceController extends BaseController {
|
|||||||
outMap.put("financeType", '0');
|
outMap.put("financeType", '0');
|
||||||
outMap.put("beginTime", firstDay);
|
outMap.put("beginTime", firstDay);
|
||||||
outMap.put("endTime", lastDay);
|
outMap.put("endTime", lastDay);
|
||||||
|
outMap.put("payType",bo.getPayType());
|
||||||
BigDecimal financeOutReduce = iSysOaFinanceService.findFinanceByTime(bo, outMap);
|
BigDecimal financeOutReduce = iSysOaFinanceService.findFinanceByTime(bo, outMap);
|
||||||
|
|
||||||
//收入
|
//收入
|
||||||
@@ -153,6 +154,7 @@ public class SysOaFinanceController extends BaseController {
|
|||||||
comeMap.put("financeType", '1');
|
comeMap.put("financeType", '1');
|
||||||
comeMap.put("beginTime", firstDay);
|
comeMap.put("beginTime", firstDay);
|
||||||
comeMap.put("endTime", lastDay);
|
comeMap.put("endTime", lastDay);
|
||||||
|
comeMap.put("payType",bo.getPayType());
|
||||||
BigDecimal financeComeReduce = iSysOaFinanceService.findFinanceByTime(bo, comeMap);
|
BigDecimal financeComeReduce = iSysOaFinanceService.findFinanceByTime(bo, comeMap);
|
||||||
//收入减支出
|
//收入减支出
|
||||||
BigDecimal subtract = financeComeReduce.subtract(financeOutReduce);
|
BigDecimal subtract = financeComeReduce.subtract(financeOutReduce);
|
||||||
|
|||||||
@@ -77,6 +77,17 @@ public class SysOaProjectController extends BaseController {
|
|||||||
return R.ok(iSysOaProjectService.queryById(projectId));
|
return R.ok(iSysOaProjectService.queryById(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目管理详细信息
|
||||||
|
*
|
||||||
|
* @param projectId 主键
|
||||||
|
*/
|
||||||
|
@GetMapping("/projectDataByMonth")
|
||||||
|
public R<List<SysOaProjectVo>> getProjectDataByMonth() {
|
||||||
|
return R.ok(iSysOaProjectService.getProjectDataByMonth());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增项目管理
|
* 新增项目管理
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.oa.domain.bo;
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -9,6 +10,7 @@ import javax.validation.constraints.*;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件存储业务对象 sys_oa_file
|
* 文件存储业务对象 sys_oa_file
|
||||||
@@ -46,4 +48,11 @@ public class SysOaFileBo extends BaseEntity {
|
|||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月份
|
||||||
|
*/
|
||||||
|
private String queryCreateTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
|||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class SysOaFileVo {
|
public class SysOaFileVo extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ public class SysOaFileVo {
|
|||||||
/**
|
/**
|
||||||
* 文件类型0打卡1出入库
|
* 文件类型0打卡1出入库
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "文件类型0打卡1出入库", converter = ExcelDictConvert.class)
|
@ExcelProperty(value = "文件类型", converter = ExcelDictConvert.class)
|
||||||
@ExcelDictFormat(dictType = "file_status")
|
@ExcelDictFormat(dictType = "file_status")
|
||||||
private Long status;
|
private Long status;
|
||||||
|
|
||||||
|
|||||||
@@ -191,4 +191,9 @@ public class SysOaProjectVo {
|
|||||||
* 此项目数量 用户报工功能
|
* 此项目数量 用户报工功能
|
||||||
*/
|
*/
|
||||||
private Long count;
|
private Long count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人力资源成本
|
||||||
|
*/
|
||||||
|
private Double laborCost;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import com.ruoyi.oa.domain.vo.SysOaProjectVo;
|
|||||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目管理Mapper接口
|
* 项目管理Mapper接口
|
||||||
*
|
*
|
||||||
@@ -23,4 +26,7 @@ public interface SysOaProjectMapper extends BaseMapperPlus<SysOaProjectMapper, S
|
|||||||
Page<SysOaOutWarehouseListVo> selectPageOutList(@Param("page") Page<SysOaOutWarehouseListVo> page,@Param(Constants.WRAPPER) Wrapper<SysOaProject> queryWrapper);
|
Page<SysOaOutWarehouseListVo> selectPageOutList(@Param("page") Page<SysOaOutWarehouseListVo> page,@Param(Constants.WRAPPER) Wrapper<SysOaProject> queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
List<SysOaProjectVo> getProjectDataByMonth(@Param("firstDay") Date firstDay, @Param("lastDay") Date lastDay);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,4 +51,11 @@ public interface ISysOaProjectService {
|
|||||||
TableDataInfo<SysOaOutWarehouseListVo> queryOutWarePageList(SysOaOutWarehouseBo bo, PageQuery pageQuery);
|
TableDataInfo<SysOaOutWarehouseListVo> queryOutWarePageList(SysOaOutWarehouseBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取每个项目当月的人力资源成本(人天)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SysOaProjectVo> getProjectDataByMonth();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public class SysOaFileServiceImpl implements ISysOaFileService {
|
|||||||
LambdaQueryWrapper<SysOaFile> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<SysOaFile> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), SysOaFile::getFileUrl, bo.getFileUrl());
|
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), SysOaFile::getFileUrl, bo.getFileUrl());
|
||||||
lqw.eq(bo.getStatus() != null, SysOaFile::getStatus, bo.getStatus());
|
lqw.eq(bo.getStatus() != null, SysOaFile::getStatus, bo.getStatus());
|
||||||
|
lqw.like(bo.getQueryCreateTime() != null, SysOaFile::getCreateTime, bo.getQueryCreateTime());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ public class SysOaFinanceServiceImpl implements ISysOaFinanceService {
|
|||||||
paramsMap.put("financeType", params.get("financeType"));
|
paramsMap.put("financeType", params.get("financeType"));
|
||||||
paramsMap.put("beginTime", params.get("beginTime"));
|
paramsMap.put("beginTime", params.get("beginTime"));
|
||||||
paramsMap.put("endTime", params.get("endTime"));
|
paramsMap.put("endTime", params.get("endTime"));
|
||||||
|
paramsMap.put("payType", params.get("payType"));
|
||||||
List<SysOaFinance> financeByTime = baseMapper.findFinanceByTime(paramsMap);
|
List<SysOaFinance> financeByTime = baseMapper.findFinanceByTime(paramsMap);
|
||||||
//遍历子表,将价格遍历为数组并用map方法求和,该方法类型使用map比较妥当
|
//遍历子表,将价格遍历为数组并用map方法求和,该方法类型使用map比较妥当
|
||||||
ArrayList<BigDecimal> objects = new ArrayList<>();
|
ArrayList<BigDecimal> objects = new ArrayList<>();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.oa.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
@@ -127,6 +128,18 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
|||||||
return TableDataInfo.build(page);
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当月每个项目的人力资源成本
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysOaProjectVo> getProjectDataByMonth() {
|
||||||
|
Date date = new Date();
|
||||||
|
|
||||||
|
List<SysOaProjectVo> projectVos = baseMapper.getProjectDataByMonth(getFirstDay(date),getLastDay(date));
|
||||||
|
return projectVos;
|
||||||
|
}
|
||||||
|
|
||||||
private QueryWrapper<SysOaProject> buildOutWareQueryWrapper(SysOaOutWarehouseBo bo) {
|
private QueryWrapper<SysOaProject> buildOutWareQueryWrapper(SysOaOutWarehouseBo bo) {
|
||||||
QueryWrapper<SysOaProject> lqw = Wrappers.query();
|
QueryWrapper<SysOaProject> lqw = Wrappers.query();
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "sop.projec_name", bo.getProjectName());
|
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "sop.projec_name", bo.getProjectName());
|
||||||
@@ -134,4 +147,23 @@ public class SysOaProjectServiceImpl implements ISysOaProjectService {
|
|||||||
lqw.orderByDesc("sop.create_time");
|
lqw.orderByDesc("sop.create_time");
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private Date getFirstDay(Date time){
|
||||||
|
String firstDay = DateUtils.parseDateToStr("yyyy-MM-01", time);
|
||||||
|
return DateUtils.parseDate(firstDay);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Date getLastDay(Date time){
|
||||||
|
String format = "yyyy-MM-";
|
||||||
|
// 计算某月的天数
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(time);
|
||||||
|
String dateLength = String.valueOf(calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
// 将字符串拼接
|
||||||
|
format +=dateLength;
|
||||||
|
|
||||||
|
return DateUtils.parseDate(DateUtils.parseDateToStr(format, time));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="findFinanceByTime" resultMap="SysOaFinanceResult">
|
<select id="findFinanceByTime" resultMap="SysOaFinanceResult">
|
||||||
<include refid="selectFinanceVo" />
|
<include refid="selectFinanceVo" />
|
||||||
where a.finance_type = #{financeType}
|
where a.finance_type = #{financeType}
|
||||||
|
<if test=" payType!=NULL and payType!=null and payType !='0' ">
|
||||||
|
and a.pay_type = #{payType}
|
||||||
|
</if>
|
||||||
and a.project_id = 0
|
and a.project_id = 0
|
||||||
and date_format(a.finance_time,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
and date_format(a.finance_time,'%Y-%m-%d %H:%i:%s') >= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
|
||||||
and date_format(a.finance_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
and date_format(a.finance_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="count" column="count"/>
|
<result property="count" column="count"/>
|
||||||
|
<result property="laborCost" column="labor_cost"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -87,7 +89,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getProjectDataByMonth" resultType="com.ruoyi.oa.domain.vo.SysOaProjectVo">
|
||||||
|
select sum(soa.day_length+soa.hour/8) as labor_cost ,color,sop.project_name from sys_oa_project sop
|
||||||
|
left join sys_oa_attendance soa on sop.project_id = soa.project_id
|
||||||
|
where soa.create_time between #{firstDay} and #{lastDay}
|
||||||
|
and soa.del_flag = '0'
|
||||||
|
group by sop.project_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -16,6 +16,13 @@ export function getProject(projectId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询项目管理详细
|
||||||
|
export function projectData() {
|
||||||
|
return request({
|
||||||
|
url: '/oa/project/projectDataByMonth',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 新增项目管理
|
// 新增项目管理
|
||||||
export function addProject(data) {
|
export function addProject(data) {
|
||||||
|
|||||||
@@ -1,102 +1,134 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
<div :class="className" :style="{ height: height, width: width }" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts';
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
import resize from './mixins/resize'
|
import resize from './mixins/resize';
|
||||||
|
|
||||||
const animationDuration = 6000
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'chart'
|
default: 'chart',
|
||||||
},
|
},
|
||||||
width: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '100%'
|
default: '100%',
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '300px'
|
default: '800px',
|
||||||
}
|
},
|
||||||
|
projectList: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
default: [
|
||||||
|
{ projectName: 'Project A', laborCost: 1500, color: '#7cb5ec' },
|
||||||
|
{ projectName: 'Project B', laborCost: 800, color: '#434348' },
|
||||||
|
{ projectName: 'Project C', laborCost: 1200, color: '#90ed7d' },
|
||||||
|
{ projectName: 'Project D', laborCost: 1800, color: '#f7a35c' },
|
||||||
|
{ projectName: 'Project E', laborCost: 600, color: '#8085e9' },
|
||||||
|
]
|
||||||
|
}, // 新增prop
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null
|
chart: null,
|
||||||
}
|
colors: [], // 用于存储柱子颜色
|
||||||
|
laborCosts: [], // 用于存储人工成本数据
|
||||||
|
projectNames: [], // 用于存储项目名称
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
projectList: {
|
||||||
|
handler(newVal) {
|
||||||
|
this.updateData(newVal);
|
||||||
|
this.setOption(); // 当projectList变化时更新图表选项
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true, // 立即执行一次handler,确保组件创建时也更新图表
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.chart.dispose()
|
this.chart.dispose();
|
||||||
this.chart = null
|
this.chart = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
|
this.updateData(this.projectList); // 初始化时更新数据
|
||||||
|
this.setOption(); // 设置图表选项
|
||||||
|
},
|
||||||
|
updateData(projectList) {
|
||||||
|
this.colors = projectList.map((item) => item.color);
|
||||||
|
this.laborCosts = projectList.map((item) => item.laborCost);
|
||||||
|
this.projectNames = projectList.map((item) => item.projectName.replace(/(.{5})/g, '$1\n'));
|
||||||
|
},
|
||||||
|
setOption() {
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
axisPointer: {type: 'shadow'},
|
||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: 10,
|
top: 10,
|
||||||
left: '2%',
|
left: '2%',
|
||||||
right: '2%',
|
right: '8%', // 增加右边距以适应标签
|
||||||
bottom: '3%',
|
bottom: '3%',
|
||||||
containLabel: true
|
containLabel: true,
|
||||||
},
|
},
|
||||||
xAxis: [{
|
xAxis: {
|
||||||
|
max: 'dataMax',
|
||||||
|
name: '人天', // 设置横坐标名称
|
||||||
|
nameLocation: 'middle', // 横坐标名称的位置
|
||||||
|
nameGap: 25, // 横坐标名称与轴线的距离
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
data: this.projectNames,
|
||||||
axisTick: {
|
inverse: true,
|
||||||
alignWithLabel: true
|
animationDuration: 300,
|
||||||
|
animationDurationUpdate: 300,
|
||||||
|
axisLabel: {
|
||||||
|
rotate: 45, // 设置标签旋转角度,正值表示顺时针旋转
|
||||||
|
interval: 0, // 强制显示所有标签
|
||||||
}
|
}
|
||||||
}],
|
},
|
||||||
yAxis: [{
|
series: [
|
||||||
type: 'value',
|
{
|
||||||
axisTick: {
|
realtimeSort: true,
|
||||||
show: false
|
type: 'bar',
|
||||||
}
|
data: this.laborCosts,
|
||||||
}],
|
label: {
|
||||||
series: [{
|
show: true,
|
||||||
name: 'pageA',
|
position: 'right',
|
||||||
type: 'bar',
|
valueAnimation: true,
|
||||||
stack: 'vistors',
|
},
|
||||||
barWidth: '60%',
|
itemStyle: {
|
||||||
data: [79, 52, 200, 334, 390, 330, 220],
|
color: (params) => this.colors[params.dataIndex], // 应用颜色
|
||||||
animationDuration
|
},
|
||||||
}, {
|
},
|
||||||
name: 'pageB',
|
],
|
||||||
type: 'bar',
|
legend: {
|
||||||
stack: 'vistors',
|
show: true,
|
||||||
barWidth: '60%',
|
},
|
||||||
data: [80, 52, 200, 334, 390, 330, 220],
|
animationDuration: 6000,
|
||||||
animationDuration
|
animationDurationUpdate: 3000,
|
||||||
}, {
|
animationEasing: 'linear',
|
||||||
name: 'pageC',
|
animationEasingUpdate: 'linear',
|
||||||
type: 'bar',
|
});
|
||||||
stack: 'vistors',
|
},
|
||||||
barWidth: '60%',
|
},
|
||||||
data: [30, 52, 200, 334, 390, 330, 220],
|
};
|
||||||
animationDuration
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -141,8 +141,6 @@ export default {
|
|||||||
this.getListNotice()
|
this.getListNotice()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
/** 查缓存询信息 */
|
/** 查缓存询信息 */
|
||||||
getList() {
|
getList() {
|
||||||
getCache().then((response) => {
|
getCache().then((response) => {
|
||||||
|
|||||||
@@ -30,11 +30,14 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item,index) in userList">
|
<tr v-for="(item,index) in userList">
|
||||||
<td :class="(item.userId===selectUser.userId || selectAll)?'selectBox':''">{{ item.nickName }}</td>
|
<td :class="(item.userId===selectUser.userId || selectAll)?'selectBox':''">{{ item.nickName }}</td>
|
||||||
<td style="font-size: small" v-for="(item2,index2) in dateLength" @click="selectAttendDay(item,index,index2+1)"
|
<td style="font-size: small" v-for="(item2,index2) in dateLength"
|
||||||
|
@click="selectAttendDay(item,index,index2+1)"
|
||||||
:style="{backgroundColor:(item.attendances.length>0 && item.attendances.findIndex(i=>i.attendanceDay === index2+1) >-1) ?
|
:style="{backgroundColor:(item.attendances.length>0 && item.attendances.findIndex(i=>i.attendanceDay === index2+1) >-1) ?
|
||||||
(item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].projectId!==0?item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].color:'#fdf6e4'):
|
(item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].projectId!==0?item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].color:'#fdf6e4'):
|
||||||
(index2+1===selectIndex&&(item.userId===selectUser.userId || selectAll)?'#f3ff52':'')}"
|
(index2+1===selectIndex&&(item.userId===selectUser.userId || selectAll)?'#f3ff52':'')}"
|
||||||
>{{item.attendances.length>0 && item.attendances.findIndex(i=>i.attendanceDay === index2+1) >-1 && item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].projectId===0?'出差':''}}</td>
|
>
|
||||||
|
{{ item.attendances.length > 0 && item.attendances.findIndex(i => i.attendanceDay === index2 + 1) > -1 && item.attendances[item.attendances.findIndex(i => i.attendanceDay === index2 + 1)].projectId === 0 ? '出差' : '' }}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -48,19 +51,19 @@
|
|||||||
<el-button @click="removeAttendance" type="danger" plain>取消操作</el-button>
|
<el-button @click="removeAttendance" type="danger" plain>取消操作</el-button>
|
||||||
<el-button @click="toTravel" type="warning" plain>出差</el-button>
|
<el-button @click="toTravel" type="warning" plain>出差</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card" >
|
<el-card class="box-card">
|
||||||
<div slot="" class="">
|
<div slot="" class="">
|
||||||
<span><i class="el-icon-s-order"></i> 项目列表</span>
|
<span><i class="el-icon-s-order"></i> 项目列表</span>
|
||||||
<!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
|
<!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 250px;overflow: auto">
|
<div style="height: 250px;overflow: auto">
|
||||||
<div v-for="(item,index) in sortedProjects" style="display: flex;justify-content: space-between;">
|
<div v-for="(item,index) in sortedProjects" style="display: flex;justify-content: space-between;">
|
||||||
<el-button class="text" :style="{backgroundColor:item.color===''?'':item.color}" @click="signIn(item)">
|
<el-button class="text" :style="{backgroundColor:item.color===''?'':item.color}" @click="signIn(item)">
|
||||||
{{ item.projectName }}
|
{{ item.projectName }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-color-picker class="color-picker" v-model="item.color"
|
<el-color-picker class="color-picker" v-model="item.color"
|
||||||
@change="changeItemColor(item)"></el-color-picker>
|
@change="changeItemColor(item)"></el-color-picker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
@@ -99,8 +102,6 @@
|
|||||||
|
|
||||||
<el-row :gutter="20" class="mb8">
|
<el-row :gutter="20" class="mb8">
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
|
|
||||||
|
|
||||||
<span class="demonstration">计算月份:</span>
|
<span class="demonstration">计算月份:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -119,47 +120,52 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-table
|
||||||
|
:data="userList"
|
||||||
|
stripe
|
||||||
|
style="width: 100%">
|
||||||
|
|
||||||
<el-table
|
<el-table-column
|
||||||
:data="userList"
|
type="index"
|
||||||
stripe
|
label="序号"
|
||||||
style="width: 60%">
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nickName"
|
||||||
|
label="员工姓名"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
type="index"
|
<template slot-scope="scope">
|
||||||
label="序号"
|
<el-button
|
||||||
width="180">
|
size="mini"
|
||||||
</el-table-column>
|
type="text"
|
||||||
<el-table-column
|
icon="el-icon-edit"
|
||||||
prop="nickName"
|
v-if="calcFlag"
|
||||||
label="员工姓名"
|
@click="handleCalc(scope.row)"
|
||||||
width="180">
|
v-hasPermi="['oa:oaWarehouse:edit']"
|
||||||
</el-table-column>
|
>查看考勤结果
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
v-else
|
||||||
|
disabled
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleCalc(scope.row)"
|
||||||
|
v-hasPermi="['oa:oaWarehouse:edit']"
|
||||||
|
>请选择日期计算
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<bar-chart :projectList="projects"></bar-chart>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
v-if="calcFlag"
|
|
||||||
@click="handleCalc(scope.row)"
|
|
||||||
v-hasPermi="['oa:oaWarehouse:edit']"
|
|
||||||
>查看考勤结果
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
v-else
|
|
||||||
disabled
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleCalc(scope.row)"
|
|
||||||
v-hasPermi="['oa:oaWarehouse:edit']"
|
|
||||||
>请选择日期计算
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
@@ -219,7 +225,7 @@
|
|||||||
label="项目名"
|
label="项目名"
|
||||||
width="180">
|
width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>{{scope.row.projectId===0?'出差':scope.row.projectName}}</div>
|
<div>{{ scope.row.projectId === 0 ? '出差' : scope.row.projectName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -267,9 +273,12 @@ import {
|
|||||||
delOaAttendanceAll
|
delOaAttendanceAll
|
||||||
} from "../../../api/oa/oaAttendance";
|
} from "../../../api/oa/oaAttendance";
|
||||||
import item from "../../../layout/components/Sidebar/Item.vue";
|
import item from "../../../layout/components/Sidebar/Item.vue";
|
||||||
|
import BarChart from "../../dashboard/BarChart.vue";
|
||||||
|
import {projectData} from "../../../api/oa/project";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Project",
|
name: "Project",
|
||||||
|
components: {BarChart},
|
||||||
dicts: ['work_time_length', 'work_time_length_hour'],
|
dicts: ['work_time_length', 'work_time_length_hour'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -326,6 +335,7 @@ export default {
|
|||||||
calcResultUser: {},
|
calcResultUser: {},
|
||||||
calcResultAttendances: [],
|
calcResultAttendances: [],
|
||||||
calcResultProject: {},
|
calcResultProject: {},
|
||||||
|
projects:[]
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -333,10 +343,12 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
this.getDate();
|
this.getDate();
|
||||||
|
this.getProjectData();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
sortedProjects() {
|
sortedProjects() {
|
||||||
let projectList = [...this.projectList];
|
let projectList = [...this.projectList];
|
||||||
projectList.sort((a, b) => {
|
projectList.sort((a, b) => {
|
||||||
@@ -350,8 +362,14 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
// 获取条形图数据
|
||||||
|
getProjectData(){
|
||||||
|
projectData().then(res => {
|
||||||
|
this.projects = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
// 出差标记
|
// 出差标记
|
||||||
toTravel(){
|
toTravel() {
|
||||||
if (!this.selectAll) {
|
if (!this.selectAll) {
|
||||||
this.form = {
|
this.form = {
|
||||||
projectId: 0,
|
projectId: 0,
|
||||||
|
|||||||
@@ -296,26 +296,156 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="财务核算" name="third">
|
<el-tab-pane label="财务核算(日期)" name="third">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="tip-top">
|
<div class="tip-top">
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
|
<div style="display: flex;justify-content: center;align-items: center;white-space: nowrap">
|
||||||
|
<span> 日期检索:</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="value1"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
@blur="getTimeBlur">
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
<span class="sp1">收入:</span>
|
||||||
|
<span class="sp2 cl2">¥ {{ checkByTime.income }} 元</span>
|
||||||
|
<span class="sp1">支出:</span>
|
||||||
|
<span class="sp2 cl1"> ¥ {{ checkByTime.out }} 元</span>
|
||||||
|
<span class="sp1">核算:</span>
|
||||||
|
<span class="sp2 cl3">¥{{ checkByTime.check }}元</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="tip">
|
||||||
|
本月核算情况
|
||||||
|
</div>
|
||||||
|
<div class="demo-shadow">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="shadow-col">
|
||||||
|
<h4>本月收入</h4>
|
||||||
|
<p class="cl2">¥ {{ monthCheck.income }} 元</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="shadow-col">
|
||||||
|
<h4>本月支出</h4>
|
||||||
|
<p class="cl1">¥ {{ monthCheck.out }} 元</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="shadow-col">
|
||||||
|
<h4>本月核算</h4>
|
||||||
|
<p class="cl3">¥ {{ monthCheck.check }} 元</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="tip">
|
||||||
|
本年核算情况
|
||||||
|
</div>
|
||||||
|
<div class="demo-shadow">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="shadow-col">
|
||||||
|
<h4>本月收入</h4>
|
||||||
|
<p class="cl2">¥ {{ yearCheck.income }} 元</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="shadow-col">
|
||||||
|
<h4>本月支出</h4>
|
||||||
|
<p class="cl1">¥ {{ yearCheck.out }} 元</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="shadow-col">
|
||||||
|
<h4>本月核算</h4>
|
||||||
|
<p class="cl3">¥ {{ yearCheck.check }} 元</p>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="date-col">
|
||||||
|
<el-table
|
||||||
|
:data="currentList"
|
||||||
|
style="width: 100%"
|
||||||
|
:header-cell-style="{background:'#50bfff',color:'#ffffff',fontSize:'18px', borderTopRightRadius: '5px', borderTopLeftRadius: '5px'}"
|
||||||
|
:row-class-name="tableRowClassName">
|
||||||
|
<el-table-column
|
||||||
|
prop="onMonth"
|
||||||
|
label="月份(近6个月)"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="financeCome"
|
||||||
|
label="收入">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="financeOut"
|
||||||
|
label="支出"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="count"
|
||||||
|
label="核算">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="财务核算(付款类型)" name="fourth">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="tip-top">
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
|
<div style="display: flex;justify-content: center;align-items: center;white-space: nowrap">
|
||||||
|
<span> 支付类型:</span>
|
||||||
|
<el-select v-model="payType" placeholder="请选择付款类型" @change = "getFinanceDateByPayType">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.sys_pay_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
|
||||||
|
:value="parseInt(dict.value)"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<span class="sp1">收入:</span>
|
||||||
|
<span class="sp2 cl2">¥ {{ checkByTime.income }} 元</span>
|
||||||
|
<span class="sp1">支出:</span>
|
||||||
|
<span class="sp2 cl1"> ¥ {{ checkByTime.out }} 元</span>
|
||||||
|
<span class="sp1">核算:</span>
|
||||||
|
<span class="sp2 cl3">¥{{ checkByTime.check }}元</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
按日期检索:
|
|
||||||
<el-date-picker
|
|
||||||
v-model="value1"
|
|
||||||
type="daterange"
|
|
||||||
range-separator="至"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
@blur="getTimeBlur">
|
|
||||||
</el-date-picker>
|
|
||||||
<span class="sp1">收入:</span>
|
|
||||||
<span class="sp2 cl2">¥ {{ checkByTime.income }} 元</span>
|
|
||||||
<span class="sp1">支出:</span>
|
|
||||||
<span class="sp2 cl1"> ¥ {{ checkByTime.out }} 元</span>
|
|
||||||
<span class="sp1">核算:</span>
|
|
||||||
<span class="sp2 cl3">¥{{ checkByTime.check }}元</span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -629,6 +759,8 @@ export default {
|
|||||||
dicts: ['sys_pay_type'],
|
dicts: ['sys_pay_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// 支付类型
|
||||||
|
payType:0,
|
||||||
// 按钮loading
|
// 按钮loading
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -745,6 +877,12 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取核算信息通过支付类型
|
||||||
|
getFinanceDateByPayType(){
|
||||||
|
this.getPayTypeBlur()
|
||||||
|
this.currentBlur()
|
||||||
|
this.currentBlurList()
|
||||||
|
},
|
||||||
|
|
||||||
updateBigPrice(index, row) {
|
updateBigPrice(index, row) {
|
||||||
|
|
||||||
@@ -809,7 +947,6 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
getListFinance(type) {
|
getListFinance(type) {
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
/*let data = {
|
/*let data = {
|
||||||
financeType: type,
|
financeType: type,
|
||||||
@@ -860,6 +997,7 @@ export default {
|
|||||||
//tabs选项卡
|
//tabs选项卡
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
this.nowTab = tab.index
|
this.nowTab = tab.index
|
||||||
|
this.payType=0
|
||||||
if (tab.index == '0') {
|
if (tab.index == '0') {
|
||||||
this.getListFinance('1');
|
this.getListFinance('1');
|
||||||
}
|
}
|
||||||
@@ -870,6 +1008,10 @@ export default {
|
|||||||
this.currentBlur()
|
this.currentBlur()
|
||||||
this.currentBlurList()
|
this.currentBlurList()
|
||||||
}
|
}
|
||||||
|
if (tab.index == '3') {
|
||||||
|
this.currentBlur()
|
||||||
|
this.currentBlurList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
@@ -1168,13 +1310,30 @@ export default {
|
|||||||
let endTime = e.displayValue[1] + ' 23:59:59'
|
let endTime = e.displayValue[1] + ' 23:59:59'
|
||||||
let dataCome = {
|
let dataCome = {
|
||||||
beginTime: beginTime,
|
beginTime: beginTime,
|
||||||
endTime: endTime
|
endTime: endTime,
|
||||||
|
payType: this.payType,
|
||||||
}
|
}
|
||||||
findFinance(dataCome).then(res => {
|
findFinance(dataCome).then(res => {
|
||||||
this.checkByTime = res.data;
|
this.checkByTime = res.data;
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getPayTypeBlur(){
|
||||||
|
let now = new Date()
|
||||||
|
var nowMonth = new Date(now.getFullYear(), now.getMonth(), 1); // 获取本月第一天的日期时间(时间为0:0:0)
|
||||||
|
var monthEnd = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59); // 获取本月最后一天的日期时间(时间为23:59:59)
|
||||||
|
//本月收入参数
|
||||||
|
let dataCome = {
|
||||||
|
beginTime: Vue.prototype.parseTime(nowMonth, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||||
|
endTime: Vue.prototype.parseTime(monthEnd, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||||
|
payType: this.payType,
|
||||||
|
}
|
||||||
|
findFinance(dataCome).then(res => {
|
||||||
|
this.checkByTime = res.data;
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 本年本月核算情况
|
* 本年本月核算情况
|
||||||
*/
|
*/
|
||||||
@@ -1187,6 +1346,7 @@ export default {
|
|||||||
let dataCome = {
|
let dataCome = {
|
||||||
beginTime: Vue.prototype.parseTime(nowMonth, '{y}-{m}-{d} {h}:{i}:{s}'),
|
beginTime: Vue.prototype.parseTime(nowMonth, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||||
endTime: Vue.prototype.parseTime(monthEnd, '{y}-{m}-{d} {h}:{i}:{s}'),
|
endTime: Vue.prototype.parseTime(monthEnd, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||||
|
payType: this.payType,
|
||||||
}
|
}
|
||||||
//本月核算
|
//本月核算
|
||||||
findFinance(dataCome).then(res => {
|
findFinance(dataCome).then(res => {
|
||||||
@@ -1206,13 +1366,12 @@ export default {
|
|||||||
let yearDataCome = {
|
let yearDataCome = {
|
||||||
beginTime: Vue.prototype.parseTime(startDate, '{y}-{m}-{d} {h}:{i}:{s}'),
|
beginTime: Vue.prototype.parseTime(startDate, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||||
endTime: Vue.prototype.parseTime(endDate, '{y}-{m}-{d} {h}:{i}:{s}'),
|
endTime: Vue.prototype.parseTime(endDate, '{y}-{m}-{d} {h}:{i}:{s}'),
|
||||||
|
payType: this.payType,
|
||||||
}
|
}
|
||||||
//本年核算
|
//本年核算
|
||||||
findFinance(yearDataCome).then(res => {
|
findFinance(yearDataCome).then(res => {
|
||||||
this.yearCheck = res.data;
|
this.yearCheck = res.data;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 最近六个月核算情况,如果显示更多月份,请修改控制器:int[] integers = {0,1, 2, 3, 4, 5};
|
* 最近六个月核算情况,如果显示更多月份,请修改控制器:int[] integers = {0,1, 2, 3, 4, 5};
|
||||||
@@ -1410,14 +1569,18 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tip-top .sp1 {
|
.tip-top .sp1 {
|
||||||
margin-left: 100px;
|
white-space: nowrap;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
overflow: hidden;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip-top .sp2 {
|
.tip-top .sp2 {
|
||||||
margin-right: 100px;
|
|
||||||
font-size: 32px;
|
font-size: 16px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.date-col {
|
.date-col {
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="文件类型" prop="status">
|
<el-form-item label="文件类型" prop="queryCreateTime">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择文件类型" clearable>
|
<el-date-picker
|
||||||
<el-option
|
v-model="queryParams.queryCreateTime"
|
||||||
v-for="dict in dict.type.file_status"
|
type="month"
|
||||||
:key="dict.value"
|
value-format="yyyy-MM"
|
||||||
:label="dict.label"
|
placeholder="选择时间">
|
||||||
:value="dict.value"
|
</el-date-picker>
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@@ -26,18 +24,8 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:oaFile:add']"
|
v-hasPermi="['system:oaFile:add']"
|
||||||
>新增</el-button>
|
>上传
|
||||||
</el-col>
|
</el-button>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['system:oaFile:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -48,46 +36,49 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['system:oaFile:remove']"
|
v-hasPermi="['system:oaFile:remove']"
|
||||||
>删除</el-button>
|
>删除
|
||||||
</el-col>
|
</el-button>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['system:oaFile:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="oaFileList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="oaFileList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
<el-table-column label="文件名称" align="center" prop="fileUrl" />
|
|
||||||
|
<el-table-column label="文件描述" align="center" prop="remark"/>
|
||||||
<el-table-column label="文件来源" align="center" prop="status">
|
<el-table-column label="文件来源" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.file_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.file_status" :value="scope.row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="上传时间" align="center" prop="createTime"/>
|
||||||
|
<el-table-column label="上传用户" align="center" prop="createBy"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-download"
|
||||||
|
@click="handleDownload(scope.row)"
|
||||||
|
>下载
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:oaFile:edit']"
|
v-hasPermi="['system:oaFile:edit']"
|
||||||
>修改</el-button>
|
>修改
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:oaFile:remove']"
|
v-hasPermi="['system:oaFile:remove']"
|
||||||
>删除</el-button>
|
>删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -107,7 +98,7 @@
|
|||||||
<file-upload v-model="form.fileUrl"/>
|
<file-upload v-model="form.fileUrl"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件类型" prop="status">
|
<el-form-item label="文件类型" prop="status">
|
||||||
<el-select v-model="form.status" placeholder="请选择文件类型" disabled>
|
<el-select v-model="form.status" placeholder="请选择文件类型" disabled>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.file_status"
|
v-for="dict in dict.type.file_status"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@@ -117,8 +108,8 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="文件描述" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入文件描述(如12月打卡表)"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -130,7 +121,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOaFile, getOaFile, delOaFile, addOaFile, updateOaFile } from "@/api/oa/oaFile";
|
import {listOaFile, getOaFile, delOaFile, addOaFile, updateOaFile} from "@/api/oa/oaFile";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OaFile",
|
name: "OaFile",
|
||||||
@@ -168,6 +159,9 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
remark: [
|
||||||
|
{ required: true, message: "文件描述不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -176,10 +170,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 截断最后一个斜杠的数字
|
// 截断最后一个斜杠的数字
|
||||||
lastStr(str){
|
lastStr(str) {
|
||||||
let index = str.lastIndexOf("\/");
|
let index = str.lastIndexOf("\/");
|
||||||
str = parseInt(str.substring(index + 1, str .length));
|
str = parseInt(str.substring(index + 1, str.length));
|
||||||
this.queryParams.status= str
|
this.queryParams.status = str
|
||||||
this.form.status = str
|
this.form.status = str
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -227,7 +221,7 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.fileId)
|
this.ids = selection.map(item => item.fileId)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
@@ -293,6 +287,10 @@ export default {
|
|||||||
this.download('system/oaFile/export', {
|
this.download('system/oaFile/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `oaFile_${new Date().getTime()}.xlsx`)
|
}, `oaFile_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
handleDownload(row) {
|
||||||
|
this.$download.resource(row.fileUrl);
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user