会计事项平台更新

This commit is contained in:
hyt 2025-08-14 16:03:00 +08:00
parent 23f95f2bda
commit 116bd95023
7 changed files with 173 additions and 92 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -15,6 +15,14 @@ export function coreGenerateAPI(data) {
data,
});
}
//收回
export function backVoucherAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/core/backVoucher",
method: "post",
data,
});
}
// 凭证明细查询
export function queryDetailsByBillCodeAPI(data) {
return request({

View File

@ -142,12 +142,12 @@ export default {
icon: "icon-shouye",
show: true,
},
{
title: "消息",
path: "/message",
icon: "el-icon-chat-dot-square",
show: true,
},
// {
// title: "",
// path: "/message",
// icon: "el-icon-chat-dot-square",
// show: true,
// },
{
title: "工作台",
path: "/Workbench",

View File

@ -1,4 +1,4 @@
import { login, logout, getInfo } from "@/api/login";
import { login, logout, getInfo } from '@/api/login'
import {
getToken,
setToken,
@ -6,77 +6,77 @@ import {
removeInfo,
setInfo,
setCompanyId,
removeCompanyId,
} from "@/utils/auth";
removeCompanyId
} from '@/utils/auth'
const user = {
state: {
token: getToken(),
name: "",
avatar: "",
name: '',
avatar: '',
roles: [],
permissions: [],
info: {},
companyID: "",
companyID: '',
companyListAll: [],
messageCount: 0,
currentMenuNode:"",//目的是 结合cokkie 实时监听当前导航栏的变化
currentMenuNode: ''//目的是 结合cokkie 实时监听当前导航栏的变化
},
mutations: {
SET_TOKEN: (state, token) => {
state.token = token;
state.token = token
},
SET_NAME: (state, name) => {
state.name = name;
state.name = name
},
SET_AVATAR: (state, avatar) => {
state.avatar = avatar;
state.avatar = avatar
},
SET_ROLES: (state, roles) => {
state.roles = roles;
state.roles = roles
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions;
state.permissions = permissions
},
SET_INFO: (state, info) => {
state.info = info;
state.info = info
},
SET_COMPANYID: (state, companyID) => {
state.companyID = companyID;
state.companyID = companyID
},
SET_COMPANYID_LIST_All: (state, companyListAll) => {
state.companyListAll = companyListAll;
state.companyListAll = companyListAll
},
SET_MESSAGE_COUNT: (state, messageCount) => {
state.messageCount = messageCount
},
SET_CURRENT_MENU_NODE: (state, currentMenuNode) => {
state.currentMenuNode = currentMenuNode
},
}
},
actions: {
// 登录
Login({ commit }, userInfo) {
const login_name = userInfo.login_name.trim();
const password = userInfo.password;
const login_name = userInfo.login_name.trim()
const password = userInfo.password
// const companyID = userInfo.companyID;
return new Promise((resolve, reject) => {
login(login_name, password)
.then((res) => {
setToken(res.attribute['zt-token']);
setInfo(JSON.stringify(res.attribute.userInfo));
commit("SET_TOKEN", res.attribute.token);
commit("SET_INFO", res.attribute.userInfo);
resolve();
setToken(res.attribute['zt-token'])
setInfo(JSON.stringify(res.attribute.userInfo))
commit('SET_TOKEN', res.attribute.token)
commit('SET_INFO', res.attribute.userInfo)
resolve()
})
.catch((error) => {
commit("LogOut")
reject(error);
commit('LogOut')
reject(error)
});
});
})
})
},
// 获取用户信息
@ -84,53 +84,53 @@ const user = {
return new Promise((resolve, reject) => {
getInfo()
.then((res) => {
const user = res.user;
const user = res.user
const avatar =
user.avatar == "" || user.avatar == null
? require("@/assets/images/profile.jpg")
: process.env.VUE_APP_BASE_API + user.avatar;
user.avatar == '' || user.avatar == null
? require('@/assets/images/profile.jpg')
: process.env.VUE_APP_BASE_API + user.avatar
if (res.roles && res.roles.length > 0) {
// 验证返回的roles是否是一个非空数组
commit("SET_ROLES", res.roles);
commit("SET_PERMISSIONS", res.permissions);
commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions)
} else {
commit("SET_ROLES", ["ROLE_DEFAULT"]);
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
commit("SET_NAME", user.userName);
commit("SET_AVATAR", avatar);
resolve(res);
commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar)
resolve(res)
})
.catch((error) => {
reject(error);
});
});
reject(error)
})
})
},
// 退出系统
LogOut({ commit, state }) {
console.log("触发推出")
console.log('触发推出')
return new Promise((resolve, reject) => {
commit("SET_TOKEN", "");
commit("SET_ROLES", []);
commit("SET_PERMISSIONS", []);
commit("SET_COMPANYID_LIST_All", []);
removeToken();
removeInfo();
removeCompanyId();
resolve();
});
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
commit('SET_COMPANYID_LIST_All', [])
removeToken()
removeInfo()
removeCompanyId()
resolve()
})
},
// 前端 登出
FedLogOut({ commit }) {
return new Promise((resolve) => {
commit("SET_TOKEN", "");
removeToken();
removeInfo();
resolve();
});
},
},
};
commit('SET_TOKEN', '')
removeToken()
removeInfo()
resolve()
})
}
}
}
export default user;
export default user

View File

@ -1133,7 +1133,7 @@ export default {
searchObj: {},
pageModel: {
page: 1, //
limit: 20, //
limit: 10, //
prop7: '',
propValue7: '',
prop8: '',

View File

@ -12,10 +12,10 @@
<!-- </div>-->
<!-- </div>-->
<div class="right" v-loading="tableLoading">
<div class="topBox" style="margin-bottom: 10px">
<div class="topBox" style="margin-bottom: 5px">
<div class="searchBox">
<div style="margin-left: 5px;display: flex;align-items: center;">
<div style="width: 100px">单据列表</div>
<div style="width: 80px">单据列表</div>
<el-cascader
v-model="searchObjTable.billTypeClickID"
:options="billTypeList"
@ -23,20 +23,20 @@
@change="billTypeListChangeHandle"
></el-cascader>
</div>
<div style="margin-left: 5px;display: flex;align-items: center;">
<div style="width: 100px">单据号</div>
<div style="margin-left: 3px;display: flex;align-items: center;">
<div style="width: 80px">单据号</div>
<el-input v-model="searchObjTable.bill_code" clearable></el-input>
</div>
<div style="margin-left: 5px;display: flex;align-items: center">
<div>单据日期起</div>
<div style="margin-left: 3px;display: flex;align-items: center">
<div style="width: 140px">单据日期起</div>
<el-date-picker v-model="searchObjTable.timeStart" value-format="yyyy-MM-dd" type="date"></el-date-picker>
</div>
<div style="margin-left: 5px;display: flex;align-items: center">
<div>单据日期止</div>
<div style="margin-left: 3px;display: flex;align-items: center">
<div style="width: 140px">单据日期止</div>
<el-date-picker v-model="searchObjTable.timeEnd" value-format="yyyy-MM-dd" type="date"></el-date-picker>
</div>
<div style="margin-left: 5px;display: flex;align-items: center">
<div style="width: 100px">生成状态</div>
<div style="margin-left: 3px;display: flex;align-items: center">
<div style="width: 80px">生成状态</div>
<el-select
class="w-100"
v-model="searchObjTable.billStatus"
@ -53,22 +53,54 @@
</el-option>
</el-select>
</div>
<div style="margin-left: 3px;display: flex;align-items: center;">
<div style="width: 80px">项目编码</div>
<el-input v-model="searchObjTable.project_code" clearable></el-input>
</div>
</div>
</div>
<div class="topBox" style="margin-bottom: 5px">
<div class="searchBox">
<div style="margin-left: 3px;display: flex;align-items: center;">
<div style="width: 100px">一级项目类型</div>
<el-input v-model="searchObjTable.one_project_type" clearable></el-input>
</div>
<div style="margin-left: 3px;display: flex;align-items: center">
<div style="width: 80px">审核状态</div>
<el-select
class="w-100"
v-model="searchObjTable.examine_status"
filterable
:clearable="true"
placeholder="请选择"
>
<el-option
v-for="(el, index) in [{label:'已审核',value:'Y'},{label:'未审核',value:'N'}]"
:key="el.value"
:label="el.label"
:value="el.value"
>
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small" @click="resetTable">查询</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="coreDataOpenDialog">生成凭证</el-button>
</div>
<div>
<el-button type="danger" size="small" @click="closeCreate">收回凭证</el-button>
</div>
<div style="display: flex;align-items: center;justify-content: flex-end;">
</div>
</div>
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
<div>分录信息</div>
</div>
<div class="table">
<base-table ref="customtable" :showIndex="false" :slotrow="true" :showSelect="true"
tableHeight="calc(50vh - 100px)" :tableData="tableData" :tableColumn="tableColumn"
<base-table ref="customtable" :showIndex="false" :slotrow="false" :showSelect="true"
tableHeight="calc(50vh - 110px)" :tableData="tableData" :tableColumn="tableColumn"
@radioChange="radioChange" id="printMe" @onSelectionChange="onSelectionChange"
>
<template #billStatus="{row}">
@ -86,9 +118,10 @@
<template v-if="this.selected.length">
<div class="table">
<base-table ref="assistTable" :showIndex="false" :slotrow="false"
tableHeight="calc(50vh - 150px)" :tableData="assistTableData"
tableHeight="calc(50vh - 110px)" :tableData="assistTableData"
:tableColumn="assistTableColumn"
id="printMe"
:border="true"
>
<template #operate="{row}">
<div @click="expandOperate(row)" style="cursor: pointer;color: #4876ed">
@ -149,7 +182,7 @@ import {
logqueryBillAPI,
coreGenerateAPI,
queryDetailsByBillCodeAPI,
queryBillFiledsAPI, queryBillPageddsAPI, queryBillPagedAPI, queryDetailsByBillCodeAndMdmIdAPI
queryBillFiledsAPI, queryBillPageddsAPI, queryBillPagedAPI, queryDetailsByBillCodeAndMdmIdAPI, backVoucherAPI
} from '@/api/apis/businessVoucher'
import customFormDialog from './compoments/customFormDialog'
import assistTableDialog from './compoments/assistTableDialog'
@ -254,7 +287,7 @@ export default {
{
label: '会计科目',
prop: 'subjdispname',
width: 100
width: 300
},
{
label: '辅助核算',
@ -264,28 +297,28 @@ export default {
{
label: '摘要',
prop: 'abstractStr',
width: 100
width: 180
},
{
label: '借方本币金额',
prop: 'jbbSum',
width: 100
width: 180
},
{
label: '借方原币金额',
prop: 'jybSum',
width: 100
width: 180
},
{
label: '贷方本币金额',
prop: 'dbbSum',
width: 100
width: 180
},
{
label: '贷方原币金额',
prop: 'dybSum',
width: 100
},
width: 180
}
],
billTypeClickCode: '',
@ -541,7 +574,7 @@ export default {
searchObj: {},
pageModel: {
page: 1, //
limit: 20, //
limit: 10, //
total: 0
},
selected: [],
@ -609,6 +642,41 @@ export default {
}
},
methods: {
closeCreate() {
if (this.checkBoxList.length === 0) {
this.$vmNews('请选择单据')
return
}
this.$confirm('是否收回凭证?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
let flag = this.checkBoxList.some((item, index) => {
if (item.billStatus !== 'Y') {
this.$vmNews('未生成的单据不能收回')
return true
}
})
if (flag) {
return
}
let arr = []
this.checkBoxList.forEach(item => {
arr.push(item.bill_code)
})
let params = {
mdmId: this.billTypeClickID,
bill_code: arr.join(','),
targetDate: ''
}
const res = await backVoucherAPI(params)
if (res.status == '200') {
this.$vmNews('收回成功', 'success')
this.resetTable()
}
})
},
coreDataOpenDialog() {
if (this.checkBoxList.length === 0) {
this.$vmNews('请选择单据')
@ -2050,4 +2118,8 @@ export default {
color: #c0c4cc
}
}
::v-deep .el-table__body-wrapper {
height: calc(50vh - 210px) !important;
}
</style>

View File

@ -42,6 +42,7 @@ module.exports = {
// target: `http://hzya.ufyct.com:9067/`,
// target: `http://127.0.0.1:9081/`,
target: `http://192.168.2.189:10086`,//一凡
// target: `http://8.136.10.42:10086`,//一凡
// target: `http://192.168.2.78:8080`,
// target: `http://b8bc6e8e.natappfree.cc`,
changeOrigin: true,