会计事项平台更新

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, data,
}); });
} }
//收回
export function backVoucherAPI(data) {
return request({
url: "/kangarooDataCenterV3/ae/core/backVoucher",
method: "post",
data,
});
}
// 凭证明细查询 // 凭证明细查询
export function queryDetailsByBillCodeAPI(data) { export function queryDetailsByBillCodeAPI(data) {
return request({ return request({

View File

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

View File

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

View File

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

View File

@ -12,10 +12,10 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="right" v-loading="tableLoading"> <div class="right" v-loading="tableLoading">
<div class="topBox" style="margin-bottom: 10px"> <div class="topBox" style="margin-bottom: 5px">
<div class="searchBox"> <div class="searchBox">
<div style="margin-left: 5px;display: flex;align-items: center;"> <div style="margin-left: 5px;display: flex;align-items: center;">
<div style="width: 100px">单据列表</div> <div style="width: 80px">单据列表</div>
<el-cascader <el-cascader
v-model="searchObjTable.billTypeClickID" v-model="searchObjTable.billTypeClickID"
:options="billTypeList" :options="billTypeList"
@ -23,20 +23,20 @@
@change="billTypeListChangeHandle" @change="billTypeListChangeHandle"
></el-cascader> ></el-cascader>
</div> </div>
<div style="margin-left: 5px;display: flex;align-items: center;"> <div style="margin-left: 3px;display: flex;align-items: center;">
<div style="width: 100px">单据号</div> <div style="width: 80px">单据号</div>
<el-input v-model="searchObjTable.bill_code" clearable></el-input> <el-input v-model="searchObjTable.bill_code" clearable></el-input>
</div> </div>
<div style="margin-left: 5px;display: flex;align-items: center"> <div style="margin-left: 3px;display: flex;align-items: center">
<div>单据日期起</div> <div style="width: 140px">单据日期起</div>
<el-date-picker v-model="searchObjTable.timeStart" value-format="yyyy-MM-dd" type="date"></el-date-picker> <el-date-picker v-model="searchObjTable.timeStart" value-format="yyyy-MM-dd" type="date"></el-date-picker>
</div> </div>
<div style="margin-left: 5px;display: flex;align-items: center"> <div style="margin-left: 3px;display: flex;align-items: center">
<div>单据日期止</div> <div style="width: 140px">单据日期止</div>
<el-date-picker v-model="searchObjTable.timeEnd" value-format="yyyy-MM-dd" type="date"></el-date-picker> <el-date-picker v-model="searchObjTable.timeEnd" value-format="yyyy-MM-dd" type="date"></el-date-picker>
</div> </div>
<div style="margin-left: 5px;display: flex;align-items: center"> <div style="margin-left: 3px;display: flex;align-items: center">
<div style="width: 100px">生成状态</div> <div style="width: 80px">生成状态</div>
<el-select <el-select
class="w-100" class="w-100"
v-model="searchObjTable.billStatus" v-model="searchObjTable.billStatus"
@ -53,22 +53,54 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </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> <div>
<el-button type="primary" size="small" @click="resetTable">查询</el-button> <el-button type="primary" size="small" @click="resetTable">查询</el-button>
</div> </div>
<div> <div>
<el-button type="primary" size="small" @click="coreDataOpenDialog">生成凭证</el-button> <el-button type="primary" size="small" @click="coreDataOpenDialog">生成凭证</el-button>
</div> </div>
</div> <div>
<div style="display: flex;align-items: center;justify-content: flex-end;"> <el-button type="danger" size="small" @click="closeCreate">收回凭证</el-button>
</div>
</div> </div>
</div> </div>
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between"> <div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
<div>分录信息</div> <div>分录信息</div>
</div> </div>
<div class="table"> <div class="table">
<base-table ref="customtable" :showIndex="false" :slotrow="true" :showSelect="true" <base-table ref="customtable" :showIndex="false" :slotrow="false" :showSelect="true"
tableHeight="calc(50vh - 100px)" :tableData="tableData" :tableColumn="tableColumn" tableHeight="calc(50vh - 110px)" :tableData="tableData" :tableColumn="tableColumn"
@radioChange="radioChange" id="printMe" @onSelectionChange="onSelectionChange" @radioChange="radioChange" id="printMe" @onSelectionChange="onSelectionChange"
> >
<template #billStatus="{row}"> <template #billStatus="{row}">
@ -86,9 +118,10 @@
<template v-if="this.selected.length"> <template v-if="this.selected.length">
<div class="table"> <div class="table">
<base-table ref="assistTable" :showIndex="false" :slotrow="false" <base-table ref="assistTable" :showIndex="false" :slotrow="false"
tableHeight="calc(50vh - 150px)" :tableData="assistTableData" tableHeight="calc(50vh - 110px)" :tableData="assistTableData"
:tableColumn="assistTableColumn" :tableColumn="assistTableColumn"
id="printMe" id="printMe"
:border="true"
> >
<template #operate="{row}"> <template #operate="{row}">
<div @click="expandOperate(row)" style="cursor: pointer;color: #4876ed"> <div @click="expandOperate(row)" style="cursor: pointer;color: #4876ed">
@ -149,7 +182,7 @@ import {
logqueryBillAPI, logqueryBillAPI,
coreGenerateAPI, coreGenerateAPI,
queryDetailsByBillCodeAPI, queryDetailsByBillCodeAPI,
queryBillFiledsAPI, queryBillPageddsAPI, queryBillPagedAPI, queryDetailsByBillCodeAndMdmIdAPI queryBillFiledsAPI, queryBillPageddsAPI, queryBillPagedAPI, queryDetailsByBillCodeAndMdmIdAPI, backVoucherAPI
} from '@/api/apis/businessVoucher' } from '@/api/apis/businessVoucher'
import customFormDialog from './compoments/customFormDialog' import customFormDialog from './compoments/customFormDialog'
import assistTableDialog from './compoments/assistTableDialog' import assistTableDialog from './compoments/assistTableDialog'
@ -224,7 +257,7 @@ export default {
clickRowKey: '', clickRowKey: '',
activeTabs: '元数据属性', activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'], tabItem: ['元数据属性', '固定值'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)','if(*?:)'], arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)', 'if(*?:)'],
//text //text
textarea: '', textarea: '',
textareaEn: '', textareaEn: '',
@ -254,7 +287,7 @@ export default {
{ {
label: '会计科目', label: '会计科目',
prop: 'subjdispname', prop: 'subjdispname',
width: 100 width: 300
}, },
{ {
label: '辅助核算', label: '辅助核算',
@ -264,28 +297,28 @@ export default {
{ {
label: '摘要', label: '摘要',
prop: 'abstractStr', prop: 'abstractStr',
width: 100 width: 180
}, },
{ {
label: '借方本币金额', label: '借方本币金额',
prop: 'jbbSum', prop: 'jbbSum',
width: 100 width: 180
}, },
{ {
label: '借方原币金额', label: '借方原币金额',
prop: 'jybSum', prop: 'jybSum',
width: 100 width: 180
}, },
{ {
label: '贷方本币金额', label: '贷方本币金额',
prop: 'dbbSum', prop: 'dbbSum',
width: 100 width: 180
}, },
{ {
label: '贷方原币金额', label: '贷方原币金额',
prop: 'dybSum', prop: 'dybSum',
width: 100 width: 180
}, }
], ],
billTypeClickCode: '', billTypeClickCode: '',
@ -541,7 +574,7 @@ export default {
searchObj: {}, searchObj: {},
pageModel: { pageModel: {
page: 1, // page: 1, //
limit: 20, // limit: 10, //
total: 0 total: 0
}, },
selected: [], selected: [],
@ -609,6 +642,41 @@ export default {
} }
}, },
methods: { 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() { coreDataOpenDialog() {
if (this.checkBoxList.length === 0) { if (this.checkBoxList.length === 0) {
this.$vmNews('请选择单据') this.$vmNews('请选择单据')
@ -2050,4 +2118,8 @@ export default {
color: #c0c4cc color: #c0c4cc
} }
} }
::v-deep .el-table__body-wrapper {
height: calc(50vh - 210px) !important;
}
</style> </style>

View File

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