会计事项平台更新

This commit is contained in:
hyt 2025-08-04 16:36:51 +08:00
parent 86a6a25bf3
commit 671effa4a5
4 changed files with 264 additions and 91 deletions

View File

@ -119,6 +119,13 @@
type="primary" type="primary"
>保存 >保存
</el-button> </el-button>
<el-button
size="small"
icon="el-icon-check"
@click="copyOperate"
type="primary"
>复制
</el-button>
<el-button <el-button
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
@ -712,7 +719,9 @@
top="20vh" top="20vh"
@handleConfirmClick="voucherDialogClickHandle" @handleConfirmClick="voucherDialogClickHandle"
> >
<div class="rightDialogClass_main" style="background-color: #fff;display: flex;align-content: flex-start;justify-content: flex-start;flex-direction: column"> <div class="rightDialogClass_main"
style="background-color: #fff;display: flex;align-content: flex-start;justify-content: flex-start;flex-direction: column"
>
<div class="addDialog"> <div class="addDialog">
<div class="nameTitle">凭证类型名称</div> <div class="nameTitle">凭证类型名称</div>
<el-input v-model="billTypeADDName"></el-input> <el-input v-model="billTypeADDName"></el-input>
@ -1024,7 +1033,7 @@ export default {
], ],
exchangeRate: [ exchangeRate: [
{ required: true, message: '请输入汇率', trigger: 'change' } { required: true, message: '请输入汇率', trigger: 'change' }
], ]
// jNumField: [ // jNumField: [
// { required: true, message: '', trigger: 'change' } // { required: true, message: '', trigger: 'change' }
// ], // ],
@ -1350,7 +1359,7 @@ export default {
const res = await typeSaveAPI({ const res = await typeSaveAPI({
name: this.billTypeADDName, name: this.billTypeADDName,
mdmId: this.billTypeClickID, mdmId: this.billTypeClickID,
def1: this.def1, def1: this.def1
}) })
this.$vmNews('保存成功', 'success') this.$vmNews('保存成功', 'success')
this.getVoucherListHandle() this.getVoucherListHandle()
@ -1359,7 +1368,7 @@ export default {
id: this.billTypeADDID, id: this.billTypeADDID,
name: this.billTypeADDName, name: this.billTypeADDName,
mdmId: this.billTypeClickID, mdmId: this.billTypeClickID,
def1: this.def1, def1: this.def1
}) })
this.$vmNews('保存成功', 'success') this.$vmNews('保存成功', 'success')
this.getVoucherListHandle() this.getVoucherListHandle()
@ -1395,6 +1404,21 @@ export default {
this.editFlag = false this.editFlag = false
this.getTableData() this.getTableData()
}, },
//
async copyOperate() {
if (!this.selected.length) {
this.$vmNews('请至少选择一条数据')
return
}
let copyTarget = JSON.parse(JSON.stringify(this.selected[0]))
console.log(copyTarget.assistEntityList, 'copyTarget')
//id
delete copyTarget.id
copyTarget.assistEntityList.forEach(item => {
delete item.id
})
this.tableData.push(copyTarget)
},
// //
closeOperate() { closeOperate() {
this.editFlag = false this.editFlag = false

View File

@ -0,0 +1,86 @@
<template>
<div>
<base-dialog :dialogVisible.sync="dialogVisible" :closeModal="false" :footerShow="true" :title="'选择生成日期'"
width="300px" top="10vh"
@handleConfirmClick="handleConfirmClick"
>
<div class="rightDialogClass_main" style="background-color: #fff;">
<el-date-picker v-model="date" align="right" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</base-dialog>
</div>
</template>
<script>
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
import baseTable from '@/components/base/baseTable/index.vue'
import { queryDetailsByBillCodeAPI } from '@/api/apis/businessVoucher'
export default {
components: {
baseDialog,
baseTable
},
data() {
return {
date: '',
dialogVisible: false,
tableData: [],
tableColumn: [{
label: '摘要',
prop: 'abstractStr'
},
{
label: '会计科目',
prop: 'subjdispname'
},
{
label: '辅助核算',
prop: 'assist'
},
{
label: '币种编码',
prop: 'currencyCode'
},
{
label: '币种名称',
prop: 'currencyName'
},
{
label: '借方原币',
prop: 'jybSum'
},
{
label: '借方本币',
prop: 'jbbSum'
},
{
label: '贷方原币',
prop: 'dybSum'
},
{
label: '贷方本币',
prop: 'dbbSum'
}
]
}
},
methods: {
async openDialog() {
this.dialogVisible = true
this.date = ''
},
handleConfirmClick() {
this.$emit('pickDateHandle', this.date)
this.dialogVisible = false
}
}
}
</script>
<style>
</style>

View File

@ -1,19 +1,28 @@
<script src="../../api/apis/operationalModule.js"></script> <script src="../../api/apis/operationalModule.js"></script>
<template> <template>
<div class="recordContrast"> <div class="recordContrast">
<div class="left"> <!-- <div class="left">-->
<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="showList"> <!-- <div class="showList">-->
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false" <!-- <base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"-->
:menuData="billTypeList" @handleNodeClick="billTypeClickHandle" :treeProps="treeProps" <!-- :menuData="billTypeList" @handleNodeClick="billTypeClickHandle" :treeProps="treeProps"-->
></base-tree> <!-- ></base-tree>-->
</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: 10px">
<div class="searchBox"> <div class="searchBox">
<div style="margin-left: 5px;display: flex;align-items: center;">
<div style="width: 100px">单据列表</div>
<el-cascader
v-model="searchObjTable.billTypeClickID"
:options="billTypeList"
:props="treeProps"
@change="billTypeListChangeHandle"
></el-cascader>
</div>
<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: 100px">单据号</div>
<el-input v-model="searchObjTable.billCode" clearable></el-input> <el-input v-model="searchObjTable.billCode" clearable></el-input>
@ -47,6 +56,9 @@
<div> <div>
<el-button type="primary" size="small" @click="getTableData">查询</el-button> <el-button type="primary" size="small" @click="getTableData">查询</el-button>
</div> </div>
<div>
<el-button type="primary" size="small" @click="coreDataOpenDialog">生成凭证</el-button>
</div>
</div> </div>
<div style="display: flex;align-items: center;justify-content: flex-end;"> <div style="display: flex;align-items: center;justify-content: flex-end;">
</div> </div>
@ -55,16 +67,16 @@
<div>分录信息</div> <div>分录信息</div>
</div> </div>
<div class="table"> <div class="table">
<base-table ref="customtable" :showIndex="false" :slotrow="true" <base-table ref="customtable" :showIndex="false" :slotrow="false" :showSelect="true"
tableHeight="calc(50vh - 100px)" :tableData="tableData" :tableColumn="tableColumn" tableHeight="calc(50vh - 100px)" :tableData="tableData" :tableColumn="tableColumn"
@radioChange="radioChange" id="printMe" @radioChange="radioChange" id="printMe" @onSelectionChange="onSelectionChange"
> >
<template #billStatus="{row}"> <template #billStatus="{row}">
<div>{{ row.row.billStatus === 'Y' ? '已生成' : '未生成' }}</div> <div>{{ row.billStatus === 'Y' ? '已生成' : '未生成' }}</div>
</template> </template>
<template #operation="{row}"> <template #operation="{row}">
<div @click="generateHandle(row.row)" style="cursor: pointer;color: #4876ed"> <div @click="generateHandle(row)" style="cursor: pointer;color: #4876ed">
{{row.row.billStatus === 'Y' ? '查看' : '生成'}} {{ row.billStatus === 'Y' ? '查看' : '生成' }}
</div> </div>
</template> </template>
</base-table> </base-table>
@ -89,11 +101,14 @@
</div> </div>
<customFormDialog ref="customFormDialog"></customFormDialog> <customFormDialog ref="customFormDialog"></customFormDialog>
<assistTableDialog ref="assistTableDialog"></assistTableDialog> <assistTableDialog ref="assistTableDialog"></assistTableDialog>
<datePickDialog ref="datePickDialog" @pickDateHandle="coreData"></datePickDialog>
</div> </div>
</template> </template>
<script> <script>
import datePickDialog from '@/views/businessVoucher/compoments/datePickDialog.vue'
import baseTree from '@/components/base/BaseMenuTree/index.vue' import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage/index.vue' import basePage from '@/components/base/basePage/index.vue'
import baseChoice from '@/components/base/baseChoice/index.vue' import baseChoice from '@/components/base/baseChoice/index.vue'
@ -132,11 +147,24 @@ import { subjectClassificationqueryAllAPI } from '@/api/apis/classifyDefinition'
import { logqueryBillAPI, coreGenerateAPI, queryDetailsByBillCodeAPI } from '@/api/apis/businessVoucher' import { logqueryBillAPI, coreGenerateAPI, queryDetailsByBillCodeAPI } from '@/api/apis/businessVoucher'
import customFormDialog from './compoments/customFormDialog' import customFormDialog from './compoments/customFormDialog'
import assistTableDialog from './compoments/assistTableDialog' import assistTableDialog from './compoments/assistTableDialog'
export default { export default {
name: 'recordContrast', name: 'recordContrast',
components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree,customFormDialog,assistTableDialog }, components: {
baseDialog,
baseChoice,
basePage,
baseTable,
baseRightDialog,
baseForm,
baseTree,
customFormDialog,
assistTableDialog,
datePickDialog
},
data() { data() {
return { return {
checkBoxList: [],
searchObjTable: {}, searchObjTable: {},
addTableColumn2: [], addTableColumn2: [],
addTableData2: [], addTableData2: [],
@ -236,7 +264,7 @@ export default {
label: '操作', label: '操作',
prop: 'operate', prop: 'operate',
width: 160 width: 160
}, }
], ],
billTypeClickCode: '', billTypeClickCode: '',
masterTableData: [], masterTableData: [],
@ -513,17 +541,17 @@ export default {
label: '生成状态', label: '生成状态',
prop: 'billStatus', prop: 'billStatus',
width: 120 width: 120
},
{
label: '推送信息',
prop: 'pushInfo',
width: 250
},
{
label: '操作',
prop: 'operation',
width: '100'
} }
// {
// label: '',
// prop: 'pushInfo',
// width: 250
// },
// {
// label: '',
// prop: 'operation',
// width: '100'
// }
], ],
tableData: [], tableData: [],
tableLoading: false, tableLoading: false,
@ -551,7 +579,8 @@ export default {
billTreeActiveFather: {}, billTreeActiveFather: {},
treeProps: { treeProps: {
children: 'mdmModuleEntity', children: 'mdmModuleEntity',
label: 'name' label: 'name',
value: 'id'
}, },
billTreeProps: { billTreeProps: {
children: 'sublistMdmModuleDbFileds', children: 'sublistMdmModuleDbFileds',
@ -561,6 +590,31 @@ export default {
} }
}, },
methods: { methods: {
coreDataOpenDialog() {
if (this.checkBoxList.length === 0) {
this.$vmNews('请选择单据')
return
}
let flag = this.checkBoxList.some((item, index) => {
if (item.billStatus == 'Y') {
this.$vmNews('已生成的单据不能生成')
return true
}
})
if (flag) {
return
}
this.$refs.datePickDialog.openDialog()
},
billTypeListChangeHandle() {
if (this.searchObjTable.billTypeClickID) {
console.log(this.searchObjTable.billTypeClickID, '?')
this.billTypeClickID = this.searchObjTable.billTypeClickID[this.searchObjTable.billTypeClickID.length - 1]
}
},
onSelectionChange(val) {
this.checkBoxList = val
},
// //
async generateHandle(row) { async generateHandle(row) {
if (row.billStatus == 'Y') { if (row.billStatus == 'Y') {
@ -574,10 +628,15 @@ export default {
// let res= await queryDetailsByBillCodeAPI({id:row.id}) // let res= await queryDetailsByBillCodeAPI({id:row.id})
// console.log(res) // console.log(res)
}, },
async coreData(row){ async coreData(date) {
let arr = []
this.checkBoxList.forEach(item => {
arr.push(item.billCode)
})
let params = { let params = {
mdmId: this.billTypeClickID, mdmId: this.billTypeClickID,
billCode:row.billCode billCode: arr.join(','),
targetDate: date
} }
this.openLoading() this.openLoading()
let res = await coreGenerateAPI(params) let res = await coreGenerateAPI(params)
@ -1375,8 +1434,10 @@ export default {
this.tableData = res.attribute this.tableData = res.attribute
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.customtable.clearRadioIndex() this.$refs.customtable.clearRadioIndex()
// this.$refs.customtable.clearSelection() this.$refs.customtable.clearSelection()
this.$refs.customtable.clearSelect()
this.selected = [] this.selected = []
this.checkBoxList = []
}) })
}, },
resetTable() { resetTable() {
@ -1890,6 +1951,7 @@ export default {
margin-right: 5px; margin-right: 5px;
display: flex; display: flex;
align-items: center; align-items: center;
> div { > div {
width: 140px; width: 140px;
text-align: right; text-align: right;

View File

@ -387,6 +387,7 @@ export default {
}) })
}) })
this.tableColumn = res.attribute.listList this.tableColumn = res.attribute.listList
console.log(this.tableColumn,'this.tableColumn')
this.initTableData(this.mainTableName) this.initTableData(this.mainTableName)
this.mainLoading = false this.mainLoading = false
}, },