移动端加入
This commit is contained in:
@@ -88,8 +88,6 @@ public class SysOaFinanceController extends BaseController {
|
|||||||
|
|
||||||
BigDecimal finance0 = iSysOaFinanceService.findFinanceByTime(bo, params0);
|
BigDecimal finance0 = iSysOaFinanceService.findFinanceByTime(bo, params0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> ajax = new HashMap<>();
|
Map<String, Object> ajax = new HashMap<>();
|
||||||
ajax.put("income", finance1);
|
ajax.put("income", finance1);
|
||||||
ajax.put("out", finance0);
|
ajax.put("out", finance0);
|
||||||
@@ -155,6 +153,7 @@ public class SysOaFinanceController extends BaseController {
|
|||||||
outMap.put("beginTime", firstDay);
|
outMap.put("beginTime", firstDay);
|
||||||
outMap.put("endTime", lastDay);
|
outMap.put("endTime", lastDay);
|
||||||
outMap.put("payType",bo.getPayType());
|
outMap.put("payType",bo.getPayType());
|
||||||
|
outMap.put("receiveAccountId",bo.getReceiveAccountId());
|
||||||
BigDecimal financeOutReduce = iSysOaFinanceService.findFinanceByTime(bo, outMap);
|
BigDecimal financeOutReduce = iSysOaFinanceService.findFinanceByTime(bo, outMap);
|
||||||
|
|
||||||
//收入
|
//收入
|
||||||
@@ -163,6 +162,7 @@ public class SysOaFinanceController extends BaseController {
|
|||||||
comeMap.put("beginTime", firstDay);
|
comeMap.put("beginTime", firstDay);
|
||||||
comeMap.put("endTime", lastDay);
|
comeMap.put("endTime", lastDay);
|
||||||
comeMap.put("payType",bo.getPayType());
|
comeMap.put("payType",bo.getPayType());
|
||||||
|
comeMap.put("receiveAccountId",bo.getReceiveAccountId());
|
||||||
BigDecimal financeComeReduce = iSysOaFinanceService.findFinanceByTime(bo, comeMap);
|
BigDecimal financeComeReduce = iSysOaFinanceService.findFinanceByTime(bo, comeMap);
|
||||||
//收入减支出
|
//收入减支出
|
||||||
BigDecimal subtract = financeComeReduce.subtract(financeOutReduce);
|
BigDecimal subtract = financeComeReduce.subtract(financeOutReduce);
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public interface SysOaFinanceMapper extends BaseMapperPlus<SysOaFinanceMapper, S
|
|||||||
* @param params
|
* @param params
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
List<SysOaFinance> findFinanceByTime(Map params);
|
List<SysOaFinance> findFinanceByTime(Map params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.ruoyi.oa.domain.SysOaAttendance;
|
|||||||
import com.ruoyi.oa.mapper.SysOaAttendanceMapper;
|
import com.ruoyi.oa.mapper.SysOaAttendanceMapper;
|
||||||
import com.ruoyi.oa.service.ISysOaAttendanceService;
|
import com.ruoyi.oa.service.ISysOaAttendanceService;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -97,16 +98,14 @@ public class SysOaAttendanceServiceImpl implements ISysOaAttendanceService {
|
|||||||
sysOaAttendanceBo.setProjectId(null);
|
sysOaAttendanceBo.setProjectId(null);
|
||||||
// 如果这个时间为空,则默认查询当月记录
|
// 如果这个时间为空,则默认查询当月记录
|
||||||
Date firstDay;
|
Date firstDay;
|
||||||
Date lastDay;
|
Date lastDay = getLastDay(bo.getSelectTime());
|
||||||
if (Objects.isNull(bo.getSelectTime())) {
|
List<SysOaAttendanceVo> sysOaAttendanceVos;
|
||||||
firstDay = getFirstDay(new Date());
|
|
||||||
|
|
||||||
} else {
|
|
||||||
firstDay = getFirstDay(bo.getSelectTime());
|
|
||||||
}
|
|
||||||
lastDay = getLastDay(firstDay);
|
|
||||||
|
|
||||||
List<SysOaAttendanceVo> sysOaAttendanceVos = baseMapper.queryListByTime(sysOaAttendanceBo.getUserId(), sysOaAttendanceBo.getAttendanceDay(), firstDay, lastDay);
|
Date day = getFirstDay(bo.getSelectTime());
|
||||||
|
firstDay = getFormatDay(bo.getSelectTime(), bo.getAttendanceDay());
|
||||||
|
|
||||||
|
sysOaAttendanceVos = baseMapper.queryListByTime(sysOaAttendanceBo.getUserId(), sysOaAttendanceBo.getAttendanceDay(), day, lastDay);
|
||||||
|
|
||||||
if (sysOaAttendanceVos.isEmpty()) {
|
if (sysOaAttendanceVos.isEmpty()) {
|
||||||
bo.setCreateTime(firstDay);
|
bo.setCreateTime(firstDay);
|
||||||
@@ -120,7 +119,11 @@ public class SysOaAttendanceServiceImpl implements ISysOaAttendanceService {
|
|||||||
} else {
|
} else {
|
||||||
SysOaAttendanceVo sysOaAttendanceVo = sysOaAttendanceVos.get(0);
|
SysOaAttendanceVo sysOaAttendanceVo = sysOaAttendanceVos.get(0);
|
||||||
sysOaAttendanceVo.setProjectId(bo.getProjectId());
|
sysOaAttendanceVo.setProjectId(bo.getProjectId());
|
||||||
|
sysOaAttendanceVo.setCreateTime(firstDay);
|
||||||
sysOaAttendanceVo.setDelFlag(0L);
|
sysOaAttendanceVo.setDelFlag(0L);
|
||||||
|
sysOaAttendanceVo.setDayLength(bo.getDayLength()!=null?bo.getDayLength():0);
|
||||||
|
sysOaAttendanceVo.setHour(bo.getHour()!=null?bo.getHour():0);
|
||||||
|
|
||||||
|
|
||||||
return baseMapper.updateDelAttendance(BeanUtil.toBean(sysOaAttendanceVo, SysOaAttendance.class)) > 0;
|
return baseMapper.updateDelAttendance(BeanUtil.toBean(sysOaAttendanceVo, SysOaAttendance.class)) > 0;
|
||||||
}
|
}
|
||||||
@@ -260,6 +263,11 @@ public class SysOaAttendanceServiceImpl implements ISysOaAttendanceService {
|
|||||||
return DateUtils.parseDate(firstDay);
|
return DateUtils.parseDate(firstDay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Date getFormatDay(Date time, Long attendanceDay) {
|
||||||
|
String firstDay = DateUtils.parseDateToStr("yyyy-MM-" + attendanceDay, time);
|
||||||
|
return DateUtils.parseDate(firstDay);
|
||||||
|
}
|
||||||
|
|
||||||
private Date getLastDay(Date time) {
|
private Date getLastDay(Date time) {
|
||||||
String format = "yyyy-MM-";
|
String format = "yyyy-MM-";
|
||||||
// 计算某月的天数
|
// 计算某月的天数
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ public class SysOaFinanceServiceImpl implements ISysOaFinanceService {
|
|||||||
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"));
|
paramsMap.put("payType", params.get("payType"));
|
||||||
|
paramsMap.put("receiveAccountId",params.get("receiveAccountId"));
|
||||||
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<>();
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<update id="updateDelAttendance" parameterType="com.ruoyi.oa.domain.SysOaAttendance">
|
<update id="updateDelAttendance" parameterType="com.ruoyi.oa.domain.SysOaAttendance">
|
||||||
update fad_oa.sys_oa_attendance
|
update fad_oa.sys_oa_attendance
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="projectId != null and projectId!=''">project_id=#{projectId},</if>
|
<if test="projectId != null">project_id=#{projectId},</if>
|
||||||
<if test="userId != null and userId!=''">user_id = #{userId},</if>
|
<if test="userId != null and userId!=''">user_id = #{userId},</if>
|
||||||
<if test="attendanceDay != null and attendanceDay!=''">attendance_day = #{attendanceDay},</if>
|
<if test="attendanceDay != null and attendanceDay!=''">attendance_day = #{attendanceDay},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
@@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
<if test="dayLength != null and dayLength!=''">day_length = #{dayLength},</if>
|
<if test="dayLength != null and dayLength!=''">day_length = #{dayLength},</if>
|
||||||
<if test="hour != null and hour!=''">hour = #{hour},</if>
|
<if test="hour != null and hour!=''">hour = #{hour},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -161,9 +161,13 @@ 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' ">
|
<if test=" payType!=NULL and payType!=null and payType !='0' and payType!=0 ">
|
||||||
and a.pay_type = #{payType}
|
and a.pay_type = #{payType}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test=" receiveAccountId!=NULL and receiveAccountId!=null and receiveAccountId!='-1' ">
|
||||||
|
and a.receive_account_id = #{receiveAccountId}
|
||||||
|
</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')
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.oa.mapper.SysOaProjectMapper">
|
<mapper namespace="com.ruoyi.oa.mapper.SysOaProjectMapper">
|
||||||
|
|
||||||
<resultMap type="com.ruoyi.oa.domain.SysOaProject" id="SysOaProjectResult">
|
<resultMap type="com.ruoyi.oa.domain.SysOaProject" id="SysOaProjectResult">
|
||||||
@@ -82,7 +82,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectPageOutList" resultMap="SysOaOutWarehouseListVoResult">
|
<select id="selectPageOutList" resultMap="SysOaOutWarehouseListVoResult">
|
||||||
select sop.project_id, project_name,soow.warehouse_id,soow.id as soow_id,soow.amount,soow.create_time as out_create_time,sow.name
|
select sop.project_id,
|
||||||
|
project_name,
|
||||||
|
soow.warehouse_id,
|
||||||
|
soow.id as soow_id,
|
||||||
|
soow.amount,
|
||||||
|
soow.create_time as out_create_time,
|
||||||
|
sow.name
|
||||||
from sys_oa_project sop
|
from sys_oa_project sop
|
||||||
left join sys_oa_out_warehouse soow on soow.project_id = sop.project_id
|
left join sys_oa_out_warehouse soow on soow.project_id = sop.project_id
|
||||||
left join sys_oa_warehouse sow on sow.id = soow.warehouse_id
|
left join sys_oa_warehouse sow on sow.id = soow.warehouse_id
|
||||||
@@ -90,7 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getProjectDataByMonth" resultType="com.ruoyi.oa.domain.vo.SysOaProjectVo">
|
<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
|
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
|
left join sys_oa_attendance soa on sop.project_id = soa.project_id
|
||||||
where soa.create_time between #{firstDay} and #{lastDay}
|
where soa.create_time between #{firstDay} and #{lastDay}
|
||||||
and soa.del_flag = '0'
|
and soa.del_flag = '0'
|
||||||
@@ -98,7 +105,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getProjectDataByMonthAndDate" resultType="com.ruoyi.oa.domain.vo.SysOaProjectVo">
|
<select id="getProjectDataByMonthAndDate" resultType="com.ruoyi.oa.domain.vo.SysOaProjectVo">
|
||||||
select sum(soa.day_length+soa.hour/8) as labor_cost ,color,sop.project_name,date_format(soa.create_time,'%Y-%m-%d') as create_time from sys_oa_project sop
|
select sum(soa.day_length + soa.hour / 8) as labor_cost,
|
||||||
|
color,
|
||||||
|
sop.project_name,
|
||||||
|
date_format(soa.create_time, '%Y-%m-%d') as create_time
|
||||||
|
from sys_oa_project sop
|
||||||
left join sys_oa_attendance soa on sop.project_id = soa.project_id
|
left join sys_oa_attendance soa on sop.project_id = soa.project_id
|
||||||
where soa.create_time between #{firstDay} and #{lastDay}
|
where soa.create_time between #{firstDay} and #{lastDay}
|
||||||
and soa.del_flag = '0'
|
and soa.del_flag = '0'
|
||||||
@@ -106,5 +117,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -129,21 +129,30 @@ export default {
|
|||||||
// 绘制项目活跃度堆叠条形图
|
// 绘制项目活跃度堆叠条形图
|
||||||
drawActivityChart() {
|
drawActivityChart() {
|
||||||
const chart = echarts.init(document.getElementById('activity-chart'));
|
const chart = echarts.init(document.getElementById('activity-chart'));
|
||||||
console.log(this.projects)
|
|
||||||
// 处理数据:转化为堆叠条形图所需的格式
|
// 处理数据:转化为堆叠条形图所需的格式
|
||||||
const dates = [...new Set(this.projects.map(item => item.createTime.substring(0 ,10)))]; // 获取所有日期
|
const dates = [...new Set(this.projects.map(item => item.createTime.substring(0 ,10)))].sort(); // 获取所有日期
|
||||||
const projects = [...new Set(this.projects.map(item => item.projectName))]; // 获取所有项目
|
const projects = [...new Set(this.projects.map(item => item.projectName))]; // 获取所有项目
|
||||||
|
|
||||||
// 创建数据系列:每个项目一个系列
|
// 创建数据系列:每个项目一个系列,颜色使用项目的 color 属性
|
||||||
const series = projects.map(project => ({
|
const series = projects.map(projectName => {
|
||||||
name: project,
|
const projectColor = this.projects.find(item => item.projectName === projectName)?.color || '#000'; // 默认黑色
|
||||||
|
return {
|
||||||
|
name: projectName,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'total',
|
stack: 'total',
|
||||||
data: dates.map(date => {
|
data: dates.map(date => {
|
||||||
const progress = this.projects.find(item => item.projectName === project && item.createTime.substring(0 ,10) === date.substring(0 ,10));
|
const progress = this.projects.find(
|
||||||
|
item => item.projectName === projectName && item.createTime.substring(0, 10) === date
|
||||||
|
);
|
||||||
return progress ? progress.laborCost : 0;
|
return progress ? progress.laborCost : 0;
|
||||||
})
|
}),
|
||||||
}));
|
itemStyle: {
|
||||||
|
color: projectColor, // 使用项目的颜色
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// 配置项
|
// 配置项
|
||||||
const option = {
|
const option = {
|
||||||
|
|||||||
@@ -231,7 +231,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 月度工作情况表格 -->
|
<!-- 月度工作情况表格 -->
|
||||||
<h2>{{ date.getMonth() }} 月度工作签到情况</h2>
|
<h2>{{ date.getMonth()+1 }} 月度工作签到情况</h2>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions class="margin-top" title="报告详情" :column="3" :size="size" border>
|
<el-descriptions class="margin-top" title="报告详情" :column="3" :size="size" border>
|
||||||
@@ -426,15 +426,6 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// // tag切换方法
|
|
||||||
// handleClickTab(tag,event){
|
|
||||||
// if (tag.index===1){
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// console.log("1284u0")
|
|
||||||
// this.$refs.barChart && this.$refs.barChart.resize(); // 假设你的 BarChart 组件提供了 resize 方法
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
// 获取单元格的样式
|
// 获取单元格的样式
|
||||||
getCellStyle(user, dayIndex) {
|
getCellStyle(user, dayIndex) {
|
||||||
@@ -484,7 +475,7 @@ export default {
|
|||||||
addOaAttendance(this.form).then(res => {
|
addOaAttendance(this.form).then(res => {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
||||||
|
this.selectArrayIndex++
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -510,7 +501,7 @@ export default {
|
|||||||
addOaAttendance(this.form).then(res => {
|
addOaAttendance(this.form).then(res => {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
||||||
|
this.selectArrayIndex++
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.form = {
|
this.form = {
|
||||||
@@ -623,7 +614,9 @@ export default {
|
|||||||
}
|
}
|
||||||
addOaAttendance(this.form).then(res => {
|
addOaAttendance(this.form).then(res => {
|
||||||
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
|
||||||
|
this.selectArrayIndex++
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,6 @@
|
|||||||
v-for="dict in dict.type.sys_pay_type"
|
v-for="dict in dict.type.sys_pay_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
|
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -547,6 +546,52 @@
|
|||||||
|
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<!-- <el-tab-pane label="财务核算(综合)" name="fifth">-->
|
||||||
|
<!-- <div class="funding-page">-->
|
||||||
|
<!-- <header class="page-header">-->
|
||||||
|
<!-- <h1>资金出入账核算</h1>-->
|
||||||
|
<!-- </header>-->
|
||||||
|
|
||||||
|
<!-- <main class="content">-->
|
||||||
|
<!-- <el-row :gutter="20">-->
|
||||||
|
<!-- <el-col :span="8">-->
|
||||||
|
<!-- <el-card class="info-card">-->
|
||||||
|
<!-- <el-select v-model="selectedAccount" placeholder="选择账户">-->
|
||||||
|
<!-- <el-option v-for="item in accounts" :key="item.id" :label="item.name" :value="item.id" />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
|
||||||
|
<!-- <el-col :span="8">-->
|
||||||
|
<!-- <el-card class="info-card">-->
|
||||||
|
<!-- <el-date-picker v-model="selectedDateRange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
|
||||||
|
<!-- <el-col :span="8">-->
|
||||||
|
<!-- <el-card class="info-card">-->
|
||||||
|
<!-- <el-select v-model="selectedPaymentType" placeholder="选择付款类型">-->
|
||||||
|
<!-- <el-option v-for="item in paymentTypes" :key="item.value" :label="item.label" :value="item.value" />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
|
||||||
|
<!-- <div class="calculate-btn">-->
|
||||||
|
<!-- <el-button type="primary" @click="calculateFunds">核算资金</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- <div v-if="calculationResult" class="result">-->
|
||||||
|
<!-- <el-card class="result-card">-->
|
||||||
|
<!-- <p>收入: {{ calculationResult.income }}</p>-->
|
||||||
|
<!-- <p>支出: {{ calculationResult.expense }}</p>-->
|
||||||
|
<!-- <p>净收入: {{ calculationResult.netIncome }}</p>-->
|
||||||
|
<!-- </el-card>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </main>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- </el-tab-pane>-->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -788,6 +833,12 @@ export default {
|
|||||||
dicts: ['sys_pay_type', 'oa_out_finance'],
|
dicts: ['sys_pay_type', 'oa_out_finance'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
accounts: [{ id: 1, name: '账户A' }, { id: 2, name: '账户B' }],
|
||||||
|
paymentTypes: [{ label: '现金', value: 'cash' }, { label: '信用卡', value: 'credit' }],
|
||||||
|
selectedAccount: null,
|
||||||
|
selectedDateRange: null,
|
||||||
|
selectedPaymentType: null,
|
||||||
|
calculationResult: null,
|
||||||
// 支付类型
|
// 支付类型
|
||||||
payType: 0,
|
payType: 0,
|
||||||
// 按钮loading
|
// 按钮loading
|
||||||
@@ -829,6 +880,7 @@ export default {
|
|||||||
projectId: undefined,
|
projectId: undefined,
|
||||||
financeTitle: undefined,
|
financeTitle: undefined,
|
||||||
financeType: undefined,
|
financeType: undefined,
|
||||||
|
receiveAccountId:-1,
|
||||||
},
|
},
|
||||||
receiveAccountList: [],
|
receiveAccountList: [],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
@@ -911,6 +963,15 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
calculateFunds() {
|
||||||
|
// 模拟核算资金逻辑
|
||||||
|
this.calculationResult = {
|
||||||
|
income: '10,000.00',
|
||||||
|
expense: '4,500.00',
|
||||||
|
netIncome: '5,500.00',
|
||||||
|
};
|
||||||
|
},
|
||||||
// 获取核算信息通过支付类型
|
// 获取核算信息通过支付类型
|
||||||
getFinanceDateByPayType() {
|
getFinanceDateByPayType() {
|
||||||
this.getPayTypeBlur()
|
this.getPayTypeBlur()
|
||||||
@@ -941,7 +1002,6 @@ export default {
|
|||||||
newChild.receiveAccountName = newChild.label;
|
newChild.receiveAccountName = newChild.label;
|
||||||
newChild.parentId = -1;
|
newChild.parentId = -1;
|
||||||
addOaReceiveAccount(newChild).then(res => {
|
addOaReceiveAccount(newChild).then(res => {
|
||||||
console.log(res)
|
|
||||||
newChild.receiveAccountId = res.data.receiveAccountId
|
newChild.receiveAccountId = res.data.receiveAccountId
|
||||||
})
|
})
|
||||||
data.children.push(newChild);
|
data.children.push(newChild);
|
||||||
@@ -967,11 +1027,10 @@ export default {
|
|||||||
|
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
this.queryParams.receiveAccountId = data.receiveAccountId;
|
this.queryParams.receiveAccountId = data.receiveAccountId;
|
||||||
if (this.nowTab === "2") {
|
if (this.nowTab === "2" ||this.nowTab === "3" ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let type = this.nowTab == "1" ? '0' : '1'
|
let type = this.nowTab === "1" ? '0' : '1'
|
||||||
|
|
||||||
this.handleQuery(type);
|
this.handleQuery(type);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1006,7 +1065,6 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
listFinance(this.queryParams).then(response => {
|
listFinance(this.queryParams).then(response => {
|
||||||
console.log(response)
|
|
||||||
//出账列表
|
//出账列表
|
||||||
if (type == '0') {
|
if (type == '0') {
|
||||||
this.financeListPro(response.rows).then(res => {
|
this.financeListPro(response.rows).then(res => {
|
||||||
@@ -1202,39 +1260,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// this.form.detailList = this.detailList;
|
|
||||||
|
|
||||||
/* if (this.detailList.length == 0) {
|
|
||||||
this.$modal.msgWarning("费用名称金额不能为空!");
|
|
||||||
} else {
|
|
||||||
// this.form.makeTime = this.getRealDate(this.form.makeTime)
|
|
||||||
if (this.form.financeId != null) {
|
|
||||||
updateFinance(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
// this.getListEnter();
|
|
||||||
// this.getListOut();
|
|
||||||
this.getListFinance('0');
|
|
||||||
this.getListFinance('1');
|
|
||||||
}).finally(() => {
|
|
||||||
this.buttonLoading = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addFinance(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
//定位到入账列表
|
|
||||||
/!*this.getListEnter();
|
|
||||||
this.getListOut();*!/
|
|
||||||
this.getListFinance('0');
|
|
||||||
this.getListFinance('1');
|
|
||||||
}).finally(() => {
|
|
||||||
this.buttonLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1348,6 +1373,7 @@ export default {
|
|||||||
beginTime: beginTime,
|
beginTime: beginTime,
|
||||||
endTime: endTime,
|
endTime: endTime,
|
||||||
payType: this.payType,
|
payType: this.payType,
|
||||||
|
receiveAccountId:this.queryParams.receiveAccountId,
|
||||||
}
|
}
|
||||||
findFinance(dataCome).then(res => {
|
findFinance(dataCome).then(res => {
|
||||||
this.checkByTime = res.data;
|
this.checkByTime = res.data;
|
||||||
@@ -1364,10 +1390,10 @@ export default {
|
|||||||
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,
|
payType: this.payType,
|
||||||
|
receiveAccountId:this.queryParams.receiveAccountId,
|
||||||
}
|
}
|
||||||
findFinance(dataCome).then(res => {
|
findFinance(dataCome).then(res => {
|
||||||
this.checkByTime = res.data;
|
this.checkByTime = res.data;
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -1651,4 +1677,82 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.funding-page {
|
||||||
|
background: #ffffff;
|
||||||
|
color: #333333;
|
||||||
|
font-family: 'Roboto', '微软雅黑', sans-serif;
|
||||||
|
padding: 20px 40px;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
color: #1e3a8a; /* 深蓝色标题 */
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 2px solid #e4e8f7;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-section {
|
||||||
|
background: #f9fbff; /* 浅灰蓝背景 */
|
||||||
|
border: 1px solid #e4e8f7; /* 边框 */
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #555555;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calculate-btn {
|
||||||
|
text-align: center;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-section {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #e4e8f7;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-section h2 {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #1e3a8a;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-summary {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-item {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-item label {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #555555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-item span {
|
||||||
|
color: #1e3a8a;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user