会计事项平台更新

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

@ -21,7 +21,7 @@
<div class="showItem" v-for="(item,index) in voucherList" :key="index"
:class="{active:item.id === voucherClickId}" @click="voucherCliclHandle(item.id,item.name,item.def1)"
>
<div class="name">{{ item.name }}{{ item.def1 === 'Y' ? '①' : ''}}</div>
<div class="name">{{ item.name }}{{ item.def1 === 'Y' ? '①' : '' }}</div>
<div class="icon">
<i class="el-icon-edit" @click.stop="voucherDialogEditHandle(item)" style="margin-right: 10px"></i>
<i class="el-icon-delete" style="color: red" @click.stop="voucherDialogDelHandle(item)"></i>
@ -73,16 +73,16 @@
</div>
<div style="margin-left: 10px;display: flex;align-items: center">
凭证类别
<p v-if="!editFlag">{{typeMerge == 'Y'?'合并':typeMerge == 'N'?'拆分':''}}</p>
<el-switch
v-else
v-model="typeMerge"
active-value="Y"
active-text="合并"
inactive-text="拆分"
inactive-value="N"
>
</el-switch>
<p v-if="!editFlag">{{ typeMerge == 'Y' ? '合并' : typeMerge == 'N' ? '拆分' : '' }}</p>
<el-switch
v-else
v-model="typeMerge"
active-value="Y"
active-text="合并"
inactive-text="拆分"
inactive-value="N"
>
</el-switch>
</div>
</div>
<div style="display: flex;align-items: center;justify-content: flex-end;">
@ -119,6 +119,13 @@
type="primary"
>保存
</el-button>
<el-button
size="small"
icon="el-icon-check"
@click="copyOperate"
type="primary"
>复制
</el-button>
<el-button
size="small"
icon="el-icon-delete"
@ -712,7 +719,9 @@
top="20vh"
@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="nameTitle">凭证类型名称</div>
<el-input v-model="billTypeADDName"></el-input>
@ -1024,7 +1033,7 @@ export default {
],
exchangeRate: [
{ required: true, message: '请输入汇率', trigger: 'change' }
],
]
// jNumField: [
// { required: true, message: '', trigger: 'change' }
// ],
@ -1205,7 +1214,7 @@ export default {
children: 'sublistMdmModuleDbFileds',
label: 'name'
},
typeMerge:''
typeMerge: ''
}
},
methods: {
@ -1238,8 +1247,8 @@ export default {
this.getAddTableData()
}
},
getTableAddList(val){
console.log(val,'val',this.fixedValueClickRow)
getTableAddList(val) {
console.log(val, 'val', this.fixedValueClickRow)
this.pageModel.propValue7 = val
this.pageModel.propValue8 = val
this.pageModel.prop7 = this.fixedValueClickRow.codefieldname
@ -1251,9 +1260,9 @@ export default {
this.$vmNews('请选择一条数据')
return
}
let obj =this.$refs.baseChoice2.optionData
let obj = this.$refs.baseChoice2.optionData
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', obj[this.fixedValueClickRow.namefieldname])
console.log(this.fixedValueClickRow,'this.fixedValueClickRow')
console.log(this.fixedValueClickRow, 'this.fixedValueClickRow')
this.textarea += `@@$${this.fixedValueClickRow.dbName}:id=${obj.id}`
// this.$set(this.clickRow, `factorid${this.clickNum}`, this.$refs.baseChoice.optionData[this.clickObj.key])
// this.$set(this.clickRow, `factorname${this.clickNum}`, this.$refs.baseChoice.optionData[this.clickObj.labelKey])
@ -1304,7 +1313,7 @@ export default {
this.selected[0].assistEntityList.push({})
},
//
voucherCliclHandle(id, name,def1) {
voucherCliclHandle(id, name, def1) {
this.voucherClickId = id
this.voucherClickName = name
this.voucherClickdef1 = def1
@ -1350,7 +1359,7 @@ export default {
const res = await typeSaveAPI({
name: this.billTypeADDName,
mdmId: this.billTypeClickID,
def1: this.def1,
def1: this.def1
})
this.$vmNews('保存成功', 'success')
this.getVoucherListHandle()
@ -1359,7 +1368,7 @@ export default {
id: this.billTypeADDID,
name: this.billTypeADDName,
mdmId: this.billTypeClickID,
def1: this.def1,
def1: this.def1
})
this.$vmNews('保存成功', 'success')
this.getVoucherListHandle()
@ -1383,18 +1392,33 @@ export default {
}
})
})
let tableData = this.tableData.map(el=>{
return{
...el,
typeMerge:this.typeMerge
}
})
let tableData = this.tableData.map(el => {
return {
...el,
typeMerge: this.typeMerge
}
})
console.log(this.tableData, 'this.tableData')
const res = await confTempSaveAPI(tableData)
this.$vmNews('保存成功', 'success')
this.editFlag = false
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() {
this.editFlag = false
@ -2013,7 +2037,7 @@ export default {
templateTypeId: this.voucherClickId//20250704
})
this.tableData = res.attribute
this.typeMerge = this.tableData[0].typeMerge
this.typeMerge = this.tableData[0].typeMerge
this.$nextTick(() => {
this.$refs.customtable.clearRadioIndex()
this.$refs.customtable.clearSelection()
@ -2148,7 +2172,7 @@ export default {
currencyFieArr: [],
assistEntityList: [],
templateTypeId: this.voucherClickId,
typeMerge:this.typeMerge
typeMerge: this.typeMerge
}
this.tableData.push(obj)
return

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>
<template>
<div class="recordContrast">
<div class="left">
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
<div>单据列表</div>
</div>
<div class="showList">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
:menuData="billTypeList" @handleNodeClick="billTypeClickHandle" :treeProps="treeProps"
></base-tree>
</div>
</div>
<!-- <div class="left">-->
<!-- <div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">-->
<!-- <div>单据列表</div>-->
<!-- </div>-->
<!-- <div class="showList">-->
<!-- <base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"-->
<!-- :menuData="billTypeList" @handleNodeClick="billTypeClickHandle" :treeProps="treeProps"-->
<!-- ></base-tree>-->
<!-- </div>-->
<!-- </div>-->
<div class="right" v-loading="tableLoading">
<div class="topBox" style="margin-bottom: 10px">
<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="width: 100px">单据号</div>
<el-input v-model="searchObjTable.billCode" clearable></el-input>
@ -47,6 +56,9 @@
<div>
<el-button type="primary" size="small" @click="getTableData">查询</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="coreDataOpenDialog">生成凭证</el-button>
</div>
</div>
<div style="display: flex;align-items: center;justify-content: flex-end;">
</div>
@ -55,16 +67,16 @@
<div>分录信息</div>
</div>
<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"
@radioChange="radioChange" id="printMe"
@radioChange="radioChange" id="printMe" @onSelectionChange="onSelectionChange"
>
<template #billStatus="{row}">
<div>{{ row.row.billStatus === 'Y' ? '已生成' : '未生成' }}</div>
<div>{{ row.billStatus === 'Y' ? '已生成' : '未生成' }}</div>
</template>
<template #operation="{row}">
<div @click="generateHandle(row.row)" style="cursor: pointer;color: #4876ed">
{{row.row.billStatus === 'Y' ? '查看' : '生成'}}
<div @click="generateHandle(row)" style="cursor: pointer;color: #4876ed">
{{ row.billStatus === 'Y' ? '查看' : '生成' }}
</div>
</template>
</base-table>
@ -77,23 +89,26 @@
:tableColumn="assistTableColumn"
id="printMe"
>
<template #operate="{row}">
<div @click="expandOperate(row)" style="cursor: pointer;color: #4876ed">
查看凭证明细
</div>
</template>
<template #operate="{row}">
<div @click="expandOperate(row)" style="cursor: pointer;color: #4876ed">
查看凭证明细
</div>
</template>
</base-table>
</div>
</template>
</div>
<customFormDialog ref="customFormDialog"></customFormDialog>
<assistTableDialog ref="assistTableDialog"></assistTableDialog>
<customFormDialog ref="customFormDialog"></customFormDialog>
<assistTableDialog ref="assistTableDialog"></assistTableDialog>
<datePickDialog ref="datePickDialog" @pickDateHandle="coreData"></datePickDialog>
</div>
</template>
<script>
import datePickDialog from '@/views/businessVoucher/compoments/datePickDialog.vue'
import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage/index.vue'
import baseChoice from '@/components/base/baseChoice/index.vue'
@ -129,14 +144,27 @@ import {
tempupdateAPI, typeDeleteAPI, typeSaveAPI, typeUpdateAPI
} from '@/api/apis/ItemEntryTemplate'
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 assistTableDialog from './compoments/assistTableDialog'
export default {
name: 'recordContrast',
components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree,customFormDialog,assistTableDialog },
components: {
baseDialog,
baseChoice,
basePage,
baseTable,
baseRightDialog,
baseForm,
baseTree,
customFormDialog,
assistTableDialog,
datePickDialog
},
data() {
return {
checkBoxList: [],
searchObjTable: {},
addTableColumn2: [],
addTableData2: [],
@ -205,12 +233,12 @@ export default {
{
label: '单据日期',
prop: 'billDate',
width: 120
width: 120
},
{
label: '凭证类别',
prop: 'voucherTypeName',
width: 120
width: 120
},
{
label: '凭证号',
@ -236,7 +264,7 @@ export default {
label: '操作',
prop: 'operate',
width: 160
},
}
],
billTypeClickCode: '',
masterTableData: [],
@ -513,17 +541,17 @@ export default {
label: '生成状态',
prop: 'billStatus',
width: 120
},
{
label: '推送信息',
prop: 'pushInfo',
width: 250
},
{
label: '操作',
prop: 'operation',
width: '100'
}
// {
// label: '',
// prop: 'pushInfo',
// width: 250
// },
// {
// label: '',
// prop: 'operation',
// width: '100'
// }
],
tableData: [],
tableLoading: false,
@ -551,7 +579,8 @@ export default {
billTreeActiveFather: {},
treeProps: {
children: 'mdmModuleEntity',
label: 'name'
label: 'name',
value: 'id'
},
billTreeProps: {
children: 'sublistMdmModuleDbFileds',
@ -561,31 +590,61 @@ export default {
}
},
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) {
if(row.billStatus == 'Y'){
this.$refs.customFormDialog.openDialog(row)
}else{
this.coreData(row)
}
if (row.billStatus == 'Y') {
this.$refs.customFormDialog.openDialog(row)
} else {
this.coreData(row)
}
},
async expandOperate(row) {
this.$refs.assistTableDialog.openDialog(row)
// let res= await queryDetailsByBillCodeAPI({id:row.id})
// console.log(res)
},
async coreData(date) {
let arr = []
this.checkBoxList.forEach(item => {
arr.push(item.billCode)
})
let params = {
mdmId: this.billTypeClickID,
billCode: arr.join(','),
targetDate: date
}
this.openLoading()
let res = await coreGenerateAPI(params)
if (res.status == '200') {
this.$vmNews('生成成功', 'success')
this.resetTable()
}
},
async expandOperate(row){
this.$refs.assistTableDialog.openDialog(row)
// let res= await queryDetailsByBillCodeAPI({id:row.id})
// console.log(res)
},
async coreData(row){
let params = {
mdmId: this.billTypeClickID,
billCode:row.billCode
}
this.openLoading()
let res = await coreGenerateAPI(params)
if(res.status == '200'){
this.$vmNews('生成成功', 'success')
this.resetTable()
}
},
async ixedValueFormelDialogClick(row) {
if (row.label === '参照') {
this.fixedValuelDialogClick(false)
@ -1375,8 +1434,10 @@ export default {
this.tableData = res.attribute
this.$nextTick(() => {
this.$refs.customtable.clearRadioIndex()
// this.$refs.customtable.clearSelection()
this.$refs.customtable.clearSelection()
this.$refs.customtable.clearSelect()
this.selected = []
this.checkBoxList = []
})
},
resetTable() {
@ -1890,7 +1951,8 @@ export default {
margin-right: 5px;
display: flex;
align-items: center;
>div{
> div {
width: 140px;
text-align: right;
}

View File

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