Merge remote-tracking branch 'origin/main'

This commit is contained in:
刘宗坤
2024-11-02 17:51:07 +08:00
17 changed files with 1088 additions and 407 deletions

View File

@@ -69,12 +69,9 @@ public class WebSocketServer {
*/ */
@OnMessage @OnMessage
public void onMessage(String message) throws IOException { public void onMessage(String message) throws IOException {
System.out.println("-------------------------------------------------------------------");
JSONObject jsonObject = JSONObject.parseObject(message); JSONObject jsonObject = JSONObject.parseObject(message);
String userId = jsonObject.getString("userId"); String userId = jsonObject.getString("userId");
String type = jsonObject.getString("type"); String type = jsonObject.getString("type");
System.out.println(type);
System.out.println(message);
if (type.equals(MessageType.CHAT.getType())) { if (type.equals(MessageType.CHAT.getType())) {
log.debug("聊天消息推送"); log.debug("聊天消息推送");
sendToUser(userId, JSONObject.toJSONString(jsonObject)); sendToUser(userId, JSONObject.toJSONString(jsonObject));

View File

@@ -0,0 +1,102 @@
package com.ruoyi.oa.controller;
import java.util.List;
import java.util.Arrays;
import com.ruoyi.oa.domain.bo.SysOaReceiveAccountBo;
import com.ruoyi.oa.domain.vo.SysOaReceiveAccountVo;
import com.ruoyi.oa.service.ISysOaReceiveAccountService;
import lombok.RequiredArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 付款账户管理
*
* @author hdka
* @date 2024-11-02
*/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/system/oaReceiveAccount")
public class SysOaReceiveAccountController extends BaseController {
private final ISysOaReceiveAccountService iSysOaReceiveAccountService;
/**
* 查询付款账户管理列表
*/
@GetMapping("/list")
public R<List<SysOaReceiveAccountVo>> list(SysOaReceiveAccountBo bo) {
return R.ok(iSysOaReceiveAccountService.queryPageList(bo));
}
/**
* 导出付款账户管理列表
*/
@Log(title = "付款账户管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(SysOaReceiveAccountBo bo, HttpServletResponse response) {
List<SysOaReceiveAccountVo> list = iSysOaReceiveAccountService.queryList(bo);
ExcelUtil.exportExcel(list, "付款账户管理", SysOaReceiveAccountVo.class, response);
}
/**
* 获取付款账户管理详细信息
*
* @param receiveAccountId 主键
*/
@GetMapping("/{receiveAccountId}")
public R<SysOaReceiveAccountVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long receiveAccountId) {
return R.ok(iSysOaReceiveAccountService.queryById(receiveAccountId));
}
/**
* 新增付款账户管理
*/
@Log(title = "付款账户管理", businessType = BusinessType.INSERT)
@RepeatSubmit()
@PostMapping()
public R<SysOaReceiveAccountVo> add(@Validated(AddGroup.class) @RequestBody SysOaReceiveAccountBo bo) {
return R.ok(iSysOaReceiveAccountService.insertByBo(bo));
}
/**
* 修改付款账户管理
*/
@Log(title = "付款账户管理", businessType = BusinessType.UPDATE)
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysOaReceiveAccountBo bo) {
return toAjax(iSysOaReceiveAccountService.updateByBo(bo));
}
/**
* 删除付款账户管理
*
* @param receiveAccountIds 主键串
*/
@Log(title = "付款账户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{receiveAccountIds}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] receiveAccountIds) {
return toAjax(iSysOaReceiveAccountService.deleteWithValidByIds(Arrays.asList(receiveAccountIds), true));
}
}

View File

@@ -91,6 +91,11 @@ public class SysOaFinance extends BaseEntity {
*/ */
private SysOaProject project; private SysOaProject project;
/**
* 收款账户id
*/
private Long receiveAccountId;
/** /**
* 一对多关联进出账明细 * 一对多关联进出账明细
*/ */

View File

@@ -0,0 +1,50 @@
package com.ruoyi.oa.domain;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.oa.domain.vo.SysOaReceiveAccountVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.List;
/**
* 付款账户管理对象 sys_oa_receive_account
*
* @author hdka
* @date 2024-11-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_oa_receive_account")
public class SysOaReceiveAccount extends BaseEntity {
private static final long serialVersionUID=1L;
/**
* 主键id
*/
@TableId(value = "receive_account_id")
private Long receiveAccountId;
/**
* 收款账户名
*/
private String receiveAccountName;
/**
* 备注
*/
private String remark;
/**
* 父节点
*/
@ExcelProperty(value = "父节点")
private Long parentId;
}

View File

@@ -104,6 +104,11 @@ public class SysOaFinanceBo extends BaseEntity {
*/ */
private SysOaProject project; private SysOaProject project;
/**
* 收款账户id
*/
private Long receiveAccountId;
/** /**
* 进出账明细 * 进出账明细
*/ */

View File

@@ -0,0 +1,49 @@
package com.ruoyi.oa.domain.bo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 付款账户管理业务对象 sys_oa_receive_account
*
* @author hdka
* @date 2024-11-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SysOaReceiveAccountBo extends BaseEntity {
/**
* 主键id
*/
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
private Long receiveAccountId;
/**
* 收款账户名
*/
@NotBlank(message = "收款账户名不能为空", groups = { AddGroup.class, EditGroup.class })
private String receiveAccountName;
/**
* 备注
*/
private String remark;
/**
* 父节点
*/
@ExcelProperty(value = "父节点")
private Long parentId;
}

View File

@@ -117,6 +117,16 @@ public class SysOaFinanceVo {
*/ */
private SysOaProject project; private SysOaProject project;
/**
* 收款账户id
*/
private Long receiveAccountId;
/**
* 收款账户id
*/
private String receiveAccountName;
/** /**
* 一对多关联进出账明细 * 一对多关联进出账明细
*/ */

View File

@@ -0,0 +1,58 @@
package com.ruoyi.oa.domain.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.util.List;
/**
* 付款账户管理视图对象 sys_oa_receive_account
*
* @author hdka
* @date 2024-11-02
*/
@Data
@ExcelIgnoreUnannotated
public class SysOaReceiveAccountVo {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ExcelProperty(value = "主键id")
private Long receiveAccountId;
/**
* 收款账户名
*/
@ExcelProperty(value = "收款账户名")
private String receiveAccountName;
/**
* 备注
*/
@ExcelProperty(value = "备注")
private String remark;
/**
* 父节点
*/
@ExcelProperty(value = "父节点")
private Long parentId;
/**
* 子节点
*/
@ExcelProperty(value = "子节点")
private List<SysOaReceiveAccountVo> children;
/**
* 前端树节点需要这个
*/
private String label;
}

View File

@@ -0,0 +1,16 @@
package com.ruoyi.oa.mapper;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.oa.domain.SysOaReceiveAccount;
import com.ruoyi.oa.domain.vo.SysOaReceiveAccountVo;
/**
* 付款账户管理Mapper接口
*
* @author hdka
* @date 2024-11-02
*/
public interface SysOaReceiveAccountMapper extends BaseMapperPlus<SysOaReceiveAccountMapper, SysOaReceiveAccount, SysOaReceiveAccountVo> {
}

View File

@@ -0,0 +1,47 @@
package com.ruoyi.oa.service;
import com.ruoyi.oa.domain.bo.SysOaReceiveAccountBo;
import com.ruoyi.oa.domain.vo.SysOaReceiveAccountVo;
import java.util.Collection;
import java.util.List;
/**
* 付款账户管理Service接口
*
* @author hdka
* @date 2024-11-02
*/
public interface ISysOaReceiveAccountService {
/**
* 查询付款账户管理
*/
SysOaReceiveAccountVo queryById(Long receiveAccountId);
/**
* 查询付款账户管理列表
*/
List<SysOaReceiveAccountVo> queryPageList(SysOaReceiveAccountBo bo);
/**
* 查询付款账户管理列表
*/
List<SysOaReceiveAccountVo> queryList(SysOaReceiveAccountBo bo);
/**
* 新增付款账户管理
*/
SysOaReceiveAccountVo insertByBo(SysOaReceiveAccountBo bo);
/**
* 修改付款账户管理
*/
Boolean updateByBo(SysOaReceiveAccountBo bo);
/**
* 校验并批量删除付款账户管理信息
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}

View File

@@ -25,10 +25,7 @@ import com.ruoyi.oa.mapper.SysOaFinanceMapper;
import com.ruoyi.oa.service.ISysOaFinanceService; import com.ruoyi.oa.service.ISysOaFinanceService;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
@@ -187,6 +184,7 @@ public class SysOaFinanceServiceImpl implements ISysOaFinanceService {
lqw.like(StringUtils.isNotBlank(bo.getFinanceTitle()), "a.finance_title", bo.getFinanceTitle()); lqw.like(StringUtils.isNotBlank(bo.getFinanceTitle()), "a.finance_title", bo.getFinanceTitle());
lqw.like(StringUtils.isNotBlank(bo.getFinanceParties()), "a.finance_parties", bo.getFinanceParties()); lqw.like(StringUtils.isNotBlank(bo.getFinanceParties()), "a.finance_parties", bo.getFinanceParties());
lqw.eq(StringUtils.isNotBlank(bo.getFinanceType()), "a.finance_type", bo.getFinanceType()); lqw.eq(StringUtils.isNotBlank(bo.getFinanceType()), "a.finance_type", bo.getFinanceType());
lqw.eq(Objects.nonNull(bo.getReceiveAccountId()) && bo.getReceiveAccountId()!=-1L, "a.receive_account_id", bo.getReceiveAccountId());
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null, lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
"a.create_time", params.get("beginCreateTime"), params.get("endCreateTime")); "a.create_time", params.get("beginCreateTime"), params.get("endCreateTime"));
lqw.orderByDesc("create_time"); lqw.orderByDesc("create_time");

View File

@@ -0,0 +1,119 @@
package com.ruoyi.oa.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.common.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.oa.domain.SysOaReceiveAccount;
import com.ruoyi.oa.domain.bo.SysOaReceiveAccountBo;
import com.ruoyi.oa.domain.vo.SysOaReceiveAccountVo;
import com.ruoyi.oa.mapper.SysOaReceiveAccountMapper;
import com.ruoyi.oa.service.ISysOaReceiveAccountService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Collection;
/**
* 付款账户管理Service业务层处理
*
* @author hdka
* @date 2024-11-02
*/
@RequiredArgsConstructor
@Service
public class SysOaReceiveAccountServiceImpl implements ISysOaReceiveAccountService {
private final SysOaReceiveAccountMapper baseMapper;
/**
* 查询付款账户管理
*/
@Override
public SysOaReceiveAccountVo queryById(Long receiveAccountId){
return baseMapper.selectVoById(receiveAccountId);
}
/**
* 查询付款账户管理列表
*/
@Override
public List<SysOaReceiveAccountVo> queryPageList(SysOaReceiveAccountBo bo) {
LambdaQueryWrapper<SysOaReceiveAccount> sysOaReceiveAccountLambdaQueryWrapper = new LambdaQueryWrapper<>();
sysOaReceiveAccountLambdaQueryWrapper.eq(SysOaReceiveAccount::getReceiveAccountId,-1L);
SysOaReceiveAccountVo sysOaReceiveAccountVo = baseMapper.selectVoOne(sysOaReceiveAccountLambdaQueryWrapper);
LambdaQueryWrapper<SysOaReceiveAccount> sysOaReceiveAccountLambdaQueryWrapper1 = new LambdaQueryWrapper<>();
List<SysOaReceiveAccountVo> sysOaReceiveAccountVos = baseMapper.selectVoList(sysOaReceiveAccountLambdaQueryWrapper1.eq(SysOaReceiveAccount::getParentId, -1L));
for (SysOaReceiveAccountVo oaReceiveAccountVo : sysOaReceiveAccountVos) {
oaReceiveAccountVo.setLabel(oaReceiveAccountVo.getReceiveAccountName());
}
sysOaReceiveAccountVo.setLabel(sysOaReceiveAccountVo.getReceiveAccountName());
sysOaReceiveAccountVo.setChildren(sysOaReceiveAccountVos);
ArrayList<SysOaReceiveAccountVo> list = new ArrayList<>();
list.add(sysOaReceiveAccountVo);
return list;
}
/**
* 查询付款账户管理列表
*/
@Override
public List<SysOaReceiveAccountVo> queryList(SysOaReceiveAccountBo bo) {
LambdaQueryWrapper<SysOaReceiveAccount> lqw = buildQueryWrapper(bo);
return baseMapper.selectVoList(lqw);
}
private LambdaQueryWrapper<SysOaReceiveAccount> buildQueryWrapper(SysOaReceiveAccountBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<SysOaReceiveAccount> lqw = Wrappers.lambdaQuery();
lqw.like(StringUtils.isNotBlank(bo.getReceiveAccountName()), SysOaReceiveAccount::getReceiveAccountName, bo.getReceiveAccountName());
return lqw;
}
/**
* 新增付款账户管理
*/
@Override
public SysOaReceiveAccountVo insertByBo(SysOaReceiveAccountBo bo) {
SysOaReceiveAccount add = BeanUtil.toBean(bo, SysOaReceiveAccount.class);
validEntityBeforeSave(add);
Long receiveAccountId = System.currentTimeMillis()/1000%1000000000;
add.setReceiveAccountId(receiveAccountId);
baseMapper.insert(add);
return BeanUtil.copyProperties(add, SysOaReceiveAccountVo.class);
}
/**
* 修改付款账户管理
*/
@Override
public Boolean updateByBo(SysOaReceiveAccountBo bo) {
SysOaReceiveAccount update = BeanUtil.toBean(bo, SysOaReceiveAccount.class);
validEntityBeforeSave(update);
System.out.println(bo);
return baseMapper.updateById(update) > 0;
}
/**
* 保存前的数据校验
*/
private void validEntityBeforeSave(SysOaReceiveAccount entity){
//TODO 做一些数据校验,如唯一约束
}
/**
* 批量删除付款账户管理
*/
@Override
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验
}
return baseMapper.deleteBatchIds(ids) > 0;
}
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.oa.mapper.SysOaReceiveAccountMapper">
<resultMap type="com.ruoyi.oa.domain.SysOaReceiveAccount" id="SysOaReceiveAccountResult">
<result property="receiveAccountId" column="receive_account_id"/>
<result property="receiveAccountName" column="receive_account_name"/>
<result property="parentId" column="parent_id"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="remark" column="remark"/>
</resultMap>
</mapper>

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询付款账户管理列表
export function listOaReceiveAccount(query) {
return request({
url: '/system/oaReceiveAccount/list',
method: 'get',
params: query
})
}
// 查询付款账户管理详细
export function getOaReceiveAccount(receiveAccountId) {
return request({
url: '/system/oaReceiveAccount/' + receiveAccountId,
method: 'get'
})
}
// 新增付款账户管理
export function addOaReceiveAccount(data) {
return request({
url: '/system/oaReceiveAccount',
method: 'post',
data: data
})
}
// 修改付款账户管理
export function updateOaReceiveAccount(data) {
return request({
url: '/system/oaReceiveAccount',
method: 'put',
data: data
})
}
// 删除付款账户管理
export function delOaReceiveAccount(receiveAccountId) {
return request({
url: '/system/oaReceiveAccount/' + receiveAccountId,
method: 'delete'
})
}

View File

@@ -1,6 +1,68 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<div class="custom-tree-container">
<el-input
v-model="receiveAccountName"
placeholder="请输入收款账户名"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="receiveAccountList"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span v-if="!data.isAdd">{{ node.label }}</span>
<el-input
v-model="newChildNode"
v-if="data.isAdd"
ref="addRef"
class="add-new-child-node">
</el-input>
<span>
<el-button
type="text"
size="mini"
@click="() => append(data)"
v-if="data.parentId!==-1">
新增
</el-button>
<el-button
type="text"
size="mini"
@click="handleAddNodeEnter(data)"
v-if="data.parentId===-1&& data.isAdd">
确定
</el-button>
<el-button
type="text"
size="mini"
@click="() => remove(node, data)" v-if="data.parentId===-1">
删除
</el-button>
</span>
</span>
</el-tree>
</div>
</el-col>
<el-col :span="20" :xs="24">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="入账管理" name="first"> <el-tab-pane label="入账管理" name="first">
@@ -356,6 +418,8 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-col>
</el-row>
<!--查看账目--> <!--查看账目-->
<el-dialog :title="title" :visible.sync="openLook" width="60%" append-to-body> <el-dialog :title="title" :visible.sync="openLook" width="60%" append-to-body>
@@ -549,6 +613,12 @@ import {
findFinanceList findFinanceList
} from "@/api/oa/finance"; } from "@/api/oa/finance";
import Vue from "vue"; import Vue from "vue";
import {
addOaReceiveAccount,
delOaReceiveAccount,
listOaReceiveAccount,
updateOaReceiveAccount
} from "../../../api/oa/oaReceiveAccount";
export default { export default {
name: "Finance", name: "Finance",
@@ -567,6 +637,10 @@ export default {
multiple: true, multiple: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
defaultProps: {
children: "children",
label: "label"
},
// 总条数 // 总条数
totalEnter: 0, totalEnter: 0,
totalOut: 0, totalOut: 0,
@@ -582,6 +656,7 @@ export default {
lableBg: "background: #f0f9eb; width:150px; text-align: center;", lableBg: "background: #f0f9eb; width:150px; text-align: center;",
//弹出层出入账类型 //弹出层出入账类型
type: '', type: '',
nowTab:"0",
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@@ -590,6 +665,7 @@ export default {
financeTitle: undefined, financeTitle: undefined,
financeType: undefined, financeType: undefined,
}, },
receiveAccountList: [],
// 表单参数 // 表单参数
form: {}, form: {},
detailList: [], detailList: [],
@@ -599,6 +675,9 @@ export default {
searchTime: '', searchTime: '',
//明细总价 //明细总价
priceSum: 0, priceSum: 0,
//全新节点
newChildNode:"",
receiveAccountName:"",
//选项卡标签 //选项卡标签
activeName: 'first', activeName: 'first',
@@ -653,6 +732,7 @@ export default {
created() { created() {
/*this.getListOut();*/ /*this.getListOut();*/
// this.getListEnter(); // this.getListEnter();
this.getReceiveAccountList();
this.getListFinance('1'); this.getListFinance('1');
}, },
@@ -660,7 +740,56 @@ export default {
}, },
methods: { methods: {
append(data) {
let newChild = { id: this.receiveAccountList[this.receiveAccountList.length-1].id++, label: '输入名称', children: [],receiveAccountName:"",isAdd:true };
if (!data.children) {
this.$set(data, 'children', []);
}
newChild.receiveAccountName = newChild.label;
newChild.parentId = -1;
addOaReceiveAccount(newChild).then(res=>{
console.log(res)
newChild.receiveAccountId = res.data.receiveAccountId
})
data.children.push(newChild);
},
remove(node, data) {
const parent = node.parent;
const children = parent.data.children || parent.data;
const index = children.findIndex(d => d.receiveAccountId === data.receiveAccountId);
children.splice(index, 1);
delOaReceiveAccount(data.receiveAccountId)
},
// 获取收款账户列表
getReceiveAccountList() {
listOaReceiveAccount().then(response => {
this.receiveAccountList = response.data;
})
},
handleNodeClick(data) {
this.queryParams.receiveAccountId = data.receiveAccountId;
if (this.nowTab==="2"){
return;
}
let type = this.nowTab=="1"?'0':'1'
this.handleQuery(type);
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
getListFinance(type) { getListFinance(type) {
this.loading = true; this.loading = true;
/*let data = { /*let data = {
financeType: type, financeType: type,
@@ -670,8 +799,8 @@ export default {
financeType: type, financeType: type,
projectId: 0, //项目id为0排除项目 projectId: 0, //项目id为0排除项目
financeTitle: this.queryParams.financeTitle, financeTitle: this.queryParams.financeTitle,
financeParties: this.queryParams.financeParties financeParties: this.queryParams.financeParties,
receiveAccountId: this.queryParams.receiveAccountId
} }
//使用实体里的参数属性,日期转为字符串格式 //使用实体里的参数属性,日期转为字符串格式
this.queryParams.params = {}; this.queryParams.params = {};
@@ -680,6 +809,7 @@ export default {
this.queryParams.params["endCreateTime"] = this.getRealDate(this.searchTime[1]); this.queryParams.params["endCreateTime"] = this.getRealDate(this.searchTime[1]);
} }
listFinance(this.queryParams).then(response => { listFinance(this.queryParams).then(response => {
//出账列表 //出账列表
if (type == '0') { if (type == '0') {
@@ -695,8 +825,11 @@ export default {
}) })
this.totalEnter = response.total; this.totalEnter = response.total;
} }
this.loading = false; this.loading = false;
}); });
}, },
// 取消按钮 // 取消按钮
@@ -706,6 +839,7 @@ export default {
}, },
//tabs选项卡 //tabs选项卡
handleClick(tab, event) { handleClick(tab, event) {
this.nowTab = tab.index
if (tab.index == '0') { if (tab.index == '0') {
this.getListFinance('1'); this.getListFinance('1');
} }
@@ -770,6 +904,19 @@ export default {
this.title = "新增入账信息"; this.title = "新增入账信息";
this.handleAddDetailList(); this.handleAddDetailList();
}, },
/** 新增节点操作 */
handleAddNodeEnter(data) {
this.receiveAccountList = []
data.receiveAccountName = this.newChildNode
updateOaReceiveAccount(data).then(res => {
console.log(res)
this.getReceiveAccountList()
})
data.isAdd = false
},
/** 新增出账按钮操作 */ /** 新增出账按钮操作 */
handleAddOut() { handleAddOut() {
this.reset(); this.reset();
@@ -1101,7 +1248,9 @@ export default {
num = Math.abs(num).toFixed(2); //将num取绝对值并四舍五入取2位小数 num = Math.abs(num).toFixed(2); //将num取绝对值并四舍五入取2位小数
str4 = (num * 100).toFixed(0).toString(); //将num乘100并转换成字符串形式 str4 = (num * 100).toFixed(0).toString(); //将num乘100并转换成字符串形式
j = str4.length; //找出最高位 j = str4.length; //找出最高位
if (j > 15){return '溢出';} if (j > 15) {
return '溢出';
}
str2 = str2.substr(15 - j); //取出对应位数的str2的值。如200.55,j为5所以str2=佰拾元角分 str2 = str2.substr(15 - j); //取出对应位数的str2的值。如200.55,j为5所以str2=佰拾元角分
//循环取出每一位需要转换的值 //循环取出每一位需要转换的值
for (i = 0; i < j; i++) { for (i = 0; i < j; i++) {
@@ -1111,44 +1260,37 @@ export default {
ch1 = ''; ch1 = '';
ch2 = ''; ch2 = '';
nzero = nzero + 1; nzero = nzero + 1;
} } else {
else{
if (str3 != '0' && nzero != 0) { if (str3 != '0' && nzero != 0) {
ch1 = '零' + str1.substr(str3 * 1, 1); ch1 = '零' + str1.substr(str3 * 1, 1);
ch2 = str2.substr(i, 1); ch2 = str2.substr(i, 1);
nzero = 0; nzero = 0;
} } else {
else{
ch1 = str1.substr(str3 * 1, 1); ch1 = str1.substr(str3 * 1, 1);
ch2 = str2.substr(i, 1); ch2 = str2.substr(i, 1);
nzero = 0; nzero = 0;
} }
} }
} } else { //该位是万亿,亿,万,元位等关键位
else{ //该位是万亿亿元位等关键位
if (str3 != '0' && nzero != 0) { if (str3 != '0' && nzero != 0) {
ch1 = "零" + str1.substr(str3 * 1, 1); ch1 = "零" + str1.substr(str3 * 1, 1);
ch2 = str2.substr(i, 1); ch2 = str2.substr(i, 1);
nzero = 0; nzero = 0;
} } else {
else{
if (str3 != '0' && nzero == 0) { if (str3 != '0' && nzero == 0) {
ch1 = str1.substr(str3 * 1, 1); ch1 = str1.substr(str3 * 1, 1);
ch2 = str2.substr(i, 1); ch2 = str2.substr(i, 1);
nzero = 0; nzero = 0;
} } else {
else{
if (str3 == '0' && nzero >= 3) { if (str3 == '0' && nzero >= 3) {
ch1 = ''; ch1 = '';
ch2 = ''; ch2 = '';
nzero = nzero + 1; nzero = nzero + 1;
} } else {
else{
if (j >= 11) { if (j >= 11) {
ch1 = ''; ch1 = '';
nzero = nzero + 1; nzero = nzero + 1;
} } else {
else{
ch1 = ''; ch1 = '';
ch2 = str2.substr(i, 1); ch2 = str2.substr(i, 1);
nzero = nzero + 1; nzero = nzero + 1;
@@ -1268,4 +1410,13 @@ export default {
.el-table .brand-row { .el-table .brand-row {
background: #ecf8ff; background: #ecf8ff;
} }
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
}
</style> </style>

View File

@@ -98,6 +98,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@@ -106,8 +107,11 @@
v-hasPermi="['oa:project:edit']" v-hasPermi="['oa:project:edit']"
>合同管理 >合同管理
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
@@ -813,6 +817,7 @@ export default {
} }
listProject(this.queryParams).then(response => { listProject(this.queryParams).then(response => {
this.projectList = response.rows; this.projectList = response.rows;
console.log(this.projectList)
//项目周期 //项目周期
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@@ -1041,6 +1046,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const contractIds = row.contractId || this.ids; const contractIds = row.contractId || this.ids;
console.log(row)
this.$modal.confirm('是否确认删除合同管理编号为"' + contractIds + '"的数据项?').then(() => { this.$modal.confirm('是否确认删除合同管理编号为"' + contractIds + '"的数据项?').then(() => {
this.loading = true; this.loading = true;
return delOaContract(contractIds); return delOaContract(contractIds);

View File

@@ -341,7 +341,10 @@
<el-tab-pane label="项目修改" name="two"> <el-tab-pane label="项目修改" name="two">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!-- TODO 删除必填规则 -->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">-->
<el-form ref="form" :model="form" label-width="120px">
<el-divider content-position="center">基本信息</el-divider> <el-divider content-position="center">基本信息</el-divider>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@@ -870,7 +873,9 @@
<el-dialog :title="title" :visible.sync="addShow" width="76%" append-to-body> <el-dialog :title="title" :visible.sync="addShow" width="76%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<!-- TODO 删除规则<el-form ref="form" :model="form" :rules="rules" label-width="110px">-->
<el-form ref="form" :model="form" label-width="110px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="项目名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">