middleground_code_v2/src/views/ItemEntryTemplate/index.vue

2600 lines
82 KiB
Vue
Raw Normal View History

2025-06-07 16:34:40 +08:00
<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>
<template v-if="billTypeClickID">
<div class="leftTitle" style="display: flex;align-items: center;justify-content: space-between">
<div>凭证类型</div>
<div class="icon" style="cursor: pointer" @click="leftAddHandle()">
<i class="el-icon-plus"></i>
</div>
</div>
<div class="showList">
<div class="showItem" v-for="(item,index) in voucherList" :key="index"
:class="{active:item.id === voucherClickId}" @click="voucherCliclHandle(item.id,item.name)"
>
<div class="name">{{ item.name }}</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>
</div>
</div>
</div>
</template>
</div>
2025-07-10 10:47:53 +08:00
<div class="right" v-loading="tableLoading">
2025-06-07 16:34:40 +08:00
<div class="topBox" style="margin-bottom: 10px">
<div class="searchBox">
<div style="margin-left: 10px;display: flex;align-items: center">
账簿
<el-select
2025-07-10 10:47:53 +08:00
class="w-100"
v-model="pkglbook"
filterable
:clearable="true"
placeholder="请选择"
@change="changepkglbookHandle"
2025-06-07 16:34:40 +08:00
>
<el-option
2025-07-10 10:47:53 +08:00
v-for="(el, index) in pkglbookOptions"
:key="el.value"
:label="el.label"
:value="el.value"
2025-06-07 16:34:40 +08:00
>
</el-option>
</el-select>
</div>
<div style="margin-left: 10px;display: flex;align-items: center">
凭证类别
<el-select
2025-07-10 10:47:53 +08:00
class="w-100"
v-model="voucher"
filterable
:clearable="true"
placeholder="请选择"
@change="voucherChangeHandle"
2025-06-07 16:34:40 +08:00
>
<el-option
2025-07-10 10:47:53 +08:00
v-for="(el, index) in voucherOptions"
:key="el.value"
:label="el.label"
:value="el.value"
2025-06-07 16:34:40 +08:00
>
</el-option>
</el-select>
</div>
2025-07-26 10:28:29 +08:00
<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>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div style="display: flex;align-items: center;justify-content: flex-end;">
<!-- 查看状态 -->
<template v-if="!editFlag">
<el-button
2025-07-10 10:47:53 +08:00
size="small"
icon="el-icon-edit"
@click="editOperate"
type="primary"
2025-06-07 16:34:40 +08:00
>编辑
</el-button>
</template>
<!-- 编辑状态 -->
<template v-else>
<el-button
2025-07-10 10:47:53 +08:00
size="small"
icon="el-icon-plus"
@click="Operate"
type="primary"
2025-06-07 16:34:40 +08:00
>新增
</el-button>
<el-button
2025-07-10 10:47:53 +08:00
size="small"
icon="el-icon-circle-close"
@click="closeOperate"
type="primary"
2025-06-07 16:34:40 +08:00
>关闭
</el-button>
<el-button
2025-07-10 10:47:53 +08:00
size="small"
icon="el-icon-check"
@click="saveOperate"
type="primary"
2025-06-07 16:34:40 +08:00
>保存
</el-button>
<el-button
2025-07-10 10:47:53 +08:00
size="small"
icon="el-icon-delete"
@click="delOperate"
type="primary"
2025-06-07 16:34:40 +08:00
>删除
</el-button>
</template>
</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"
tableHeight="calc(50vh - 100px)" :tableData="tableData" :tableColumn="tableColumn"
@radioChange="radioChange" id="printMe"
>
<!-- 会计科目 -->
<template #subjectClassificationName="{row}">
<div v-if="editFlag">
<el-select
2025-07-10 10:47:53 +08:00
class="w-100"
v-model="row.row.subjectClassificationId"
filterable
:clearable="true"
placeholder="请选择"
@change="(val)=>{subClassOptionsChangeHandle(val,row.row)}"
2025-06-07 16:34:40 +08:00
>
<el-option
2025-07-10 10:47:53 +08:00
v-for="(el, index) in subClassOptions"
:key="el.value"
:label="el.label"
:value="el.value"
2025-06-07 16:34:40 +08:00
>
</el-option>
</el-select>
</div>
<div v-else>
{{ row.row.subjectClassificationName }}
</div>
</template>
<!-- 币种 -->
<template #currencyFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.currencyFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="currencyFieArrChangeHandle(row.row.currencyFieArr,row.row)"-->
<!-- >-->
2025-06-07 16:34:40 +08:00
2025-07-18 14:22:43 +08:00
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.currencyFieldName,'currencyFieldName')"
style="height: 50px;"
>
<p :style="{ color: row.row.currencyFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.currencyFieldName ? row.row.currencyFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.currencyFieldName }}
</div>
</template>
<!-- 汇率-->
<template #exchangeRate="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-input v-model="row.row.exchangeRate"></el-input>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.exchangeRate,'exchangeRate')"
style="height: 50px;"
>
<p :style="{ color: row.row.exchangeRate ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.exchangeRate ? row.row.exchangeRate :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.exchangeRate }}
</div>
</template>
<!-- 借方数量 -->
<template #jNumFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.jNumFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="jNumFieArrChangeHandle(row.row.jNumFieArr,row.row)"-->
<!-- >-->
2025-06-07 16:34:40 +08:00
2025-07-18 14:22:43 +08:00
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.jNumFieldName,'jNumFieldName')"
style="height: 50px;"
>
<p :style="{ color: row.row.jNumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.jNumFieldName ? row.row.jNumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.jNumFieldName }}
</div>
</template>
<!-- 原币借方发生额-->
<template #jYbSumFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.jYbSumFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="jYbSumFieArrChangHandle(row.row.jYbSumFieArr,row.row)"-->
<!-- >-->
2025-06-07 16:34:40 +08:00
2025-07-18 14:22:43 +08:00
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.jYbSumFieldName,'jYbSumFieldName')"
style="height: 50px;"
>
<p :style="{ color: row.row.jYbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.jYbSumFieldName ? row.row.jYbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.jYbSumFieldName }}
</div>
</template>
<!-- 本币借方发生额-->
<template #jBbSumFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.jBbSumFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="jBbSumFieArrChangeHandle(row.row.jBbSumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.jBbSumFieldName,'jBbSumFieldName')"
style="height: 50px;"
2025-06-07 16:34:40 +08:00
>
2025-07-18 14:22:43 +08:00
<p :style="{ color: row.row.jBbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.jBbSumFieldName ? row.row.jBbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.jBbSumFieldName }}
</div>
</template>
<!-- 货方数量-->
<template #dNumFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.dNumFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="dNumFieArrChangeHandle(row.row.dNumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.dNumFieldName,'dNumFieldName')"
style="height: 50px;"
2025-06-07 16:34:40 +08:00
>
2025-07-18 14:22:43 +08:00
<p :style="{ color: row.row.dNumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.dNumFieldName ? row.row.dNumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.dNumFieldName }}
</div>
</template>
<!-- 原币贷方发生额-->
<template #dYbSumFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.dYbSumFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="dYbSumFieArrChangeHandle(row.row.dYbSumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.dYbSumFieldName,'dYbSumFieldName')"
style="height: 50px;"
2025-06-07 16:34:40 +08:00
>
2025-07-18 14:22:43 +08:00
<p :style="{ color: row.row.dYbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.dYbSumFieldName ? row.row.dYbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.dYbSumFieldName }}
</div>
</template>
<!-- 本币贷方发生额-->
<template #dBbSumFieldName="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-cascader class="w-100" v-model="row.row.dBbSumFieArr" :options="treeSelect"-->
<!-- :props="treePropsproperty"-->
<!-- @change="dBbSumFieArrChangeHandle(row.row.dBbSumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.dBbSumFieldName,'dBbSumFieldName')"
style="height: 50px;"
2025-06-07 16:34:40 +08:00
>
2025-07-18 14:22:43 +08:00
<p :style="{ color: row.row.dBbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.dBbSumFieldName ? row.row.dBbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.dBbSumFieldName }}
</div>
</template>
<!-- 摘要-->
<template #abstractRes="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<div class="elDialog" @click="rightAddHandle(row.row,row.row.abstractRes,'abstractRes')"
style="height: 50px;"
>
2025-06-07 16:34:40 +08:00
<p :style="{ color: row.row.abstractRes ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.abstractRes ? row.row.abstractRes :
2025-07-10 10:47:53 +08:00
'请点击选择'
2025-06-07 16:34:40 +08:00
}}
</p>
<i class="el-icon-more "
></i>
</div>
</div>
<div v-else>
{{ row.row.abstractRes }}
</div>
</template>
<!-- 现金项目-->
<template #pkCashflow="{row}">
<div v-if="editFlag">
2025-07-18 14:22:43 +08:00
<!-- <el-select-->
<!-- class="w-100"-->
<!-- v-model="row.row.pkCashflow"-->
<!-- filterable-->
<!-- :clearable="true"-->
<!-- placeholder="请选择"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(el, index) in queryCashOptions"-->
<!-- :key="el.value"-->
<!-- :label="el.label"-->
<!-- :value="el.value"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.pkCashflow,'pkCashflow')"
style="height: 50px;"
2025-06-07 16:34:40 +08:00
>
2025-07-18 14:22:43 +08:00
<p :style="{ color: row.row.pkCashflow ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.pkCashflow ? row.row.pkCashflow :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
2025-06-07 16:34:40 +08:00
</div>
<div v-else>
{{ row.row.pkCashflow }}
</div>
</template>
<!-- 备注-->
<template #remark="{row}">
<div v-if="editFlag">
<el-input v-model="row.row.remark"></el-input>
</div>
<div v-else>
{{ row.row.remark }}
</div>
</template>
</base-table>
</div>
<!-- 辅助核算-->
<template v-if="this.selected.length">
<div class="leftTitle"
style="display: flex;align-items: center;justify-content: space-between;margin-top: 10px"
>
<div>辅助核算</div>
<div>
<el-button v-if="editFlag" size="mini" type="primary" @click="sonTableDataHandle">新增行</el-button>
</div>
</div>
<div class="table">
<base-table ref="customtable" :showIndex="false" :slotrow="false"
tableHeight="calc(50vh - 100px)" :tableData="this.selected[0].assistEntityList"
:tableColumn="assistTableColumn"
id="printMe"
>
<template #mdmName="{row}">
<div v-if="!editFlag">
{{ row.mdmName }}
</div>
<div v-else class="elDialog" @click="mdmNameEldialog(row)" style="height: 50px;">
<p :style="{ color: row.mdmName ? '#000' : '#c0c4cc' }" class="showText"
@click="elDialogClick(row, index, indexRow)"
>{{
row.mdmName ? row.mdmName :
2025-07-10 10:47:53 +08:00
'请点击选择'
2025-06-07 16:34:40 +08:00
}}
</p>
<i class="el-icon-more "
></i>
</div>
</template>
<template #fieldName="{row}">
<div v-if="!editFlag">
{{ row.fieldName }}
</div>
<div v-else>
<el-cascader
2025-07-10 10:47:53 +08:00
v-model="row.fieldArr"
:options="propertyTree"
:props="{ children: 'sublistMdmModuleDbFileds',
2025-06-07 16:34:40 +08:00
label: 'chName',
value: 'id', }"
2025-07-10 10:47:53 +08:00
@change="(val)=>{fieldIdChangeHandle(val,row)}"
2025-06-07 16:34:40 +08:00
></el-cascader>
</div>
</template>
<template #remark="{row}">
<div v-if="!editFlag">
{{ row.remark }}
</div>
<div v-else>
<el-input v-model="row.remark"></el-input>
</div>
</template>
<template #operation="{row}">
<div style="display: flex;align-content: center;justify-content: center" v-if="editFlag">
<div style="cursor: pointer;color: red;margin-right: 0px" @click.stop="deleteRowHandle(row)">删除行
</div>
</div>
</template>
</base-table>
</div>
</template>
</div>
<!-- 新增-->
<base-right-dialog
2025-07-10 10:47:53 +08:00
@handleClose="examineOperateDialog = false"
@handleConfirmClick="handleConfirmClick"
:dialogVisible="examineOperateDialog"
size="900px"
:appendBody="true"
:loading="true"
:footerShow="true"
:submitShow="true"
:title="dialogTitle +'事项分录模版'"
submitTitle="保存"
2025-06-07 16:34:40 +08:00
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="examineOperateDialog">
<div class="form">
<base-form
2025-07-10 10:47:53 +08:00
ref="basicFormRefsName"
:formRow="basicFormForm"
:isFunBtn="false"
:spanWidth="'100px'"
justifyContent="flex-end"
:rules="basicFormRulers"
@onSelect="onSelect"
:view-status="statusView"
@elDialogClick="elDialogClick"
@cascaderChange="AddCascaderChange"
2025-06-07 16:34:40 +08:00
>
</base-form>
</div>
<div class="table">
<div
2025-07-10 10:47:53 +08:00
style="display: flex;justify-content: flex-end;cursor:pointer;margin: 10px 0;font-size: 14px;color: #4876ed; "
@click="addData"
2025-06-07 16:34:40 +08:00
>添加
</div>
<base-table ref="customtable" :showIndex="false" :slotrow="false"
tableHeight="calc(50vh - 100px)" :tableData="addTableData" :tableColumn="addTableColumn"
>
<template #mdmName="{row}">
<div class="elDialog" @click="mdmNameEldialog(row)" style="height: 50px;">
<p :style="{ color: row.mdmName ? '#000' : '#c0c4cc' }" class="showText"
@click="elDialogClick(row, index, indexRow)"
>{{
row.mdmName ? row.mdmName :
2025-07-10 10:47:53 +08:00
'请点击选择'
2025-06-07 16:34:40 +08:00
}}
</p>
<i class="el-icon-more "
></i>
</div>
</template>
<template #fieldId="{row}">
<div>
<el-cascader
2025-07-10 10:47:53 +08:00
v-model="row.fieldArr"
:options="propertyTree"
:props="{ children: 'sublistMdmModuleDbFileds',
2025-06-07 16:34:40 +08:00
label: 'chName',
value: 'id', }"
2025-07-10 10:47:53 +08:00
@change="(val)=>{fieldIdChangeHandle(val,row)}"
2025-06-07 16:34:40 +08:00
></el-cascader>
</div>
</template>
<template #remark="{row}">
<div>
<el-input v-model="row.remark"></el-input>
</div>
</template>
<template #operation="{row}">
<div style="display: flex;align-content: center;justify-content: center">
<div style="cursor: pointer;color: red;margin-right: 0px" @click.stop="deleteRowHandle(row)">删除行
</div>
</div>
</template>
</base-table>
</div>
</div>
</base-right-dialog>
<!-- 公式编辑器-->
<base-dialog
2025-07-10 10:47:53 +08:00
:dialogVisible.sync="passwordDialogShow"
:closeModal="false"
:footerShow="true"
title="公式编辑器"
width="700px"
top="20vh"
@handleConfirmClick="passwordChangeHandle"
2025-06-07 16:34:40 +08:00
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="passwordDialogShow">
<div class="addDialog">
<div class="left">
<el-input
2025-07-10 10:47:53 +08:00
type="textarea"
:rows="23"
placeholder="请输入内容"
resize="none"
v-model="textarea"
2025-06-07 16:34:40 +08:00
>
</el-input>
<div class="btn" style="margin-top: 5px;display: flex;justify-content: flex-end">
<el-button :type="verifyFlag?'success':'primary'" size="mini" @click="verifyFlagHandle">
{{ verifyFlag ? '验证成功' : '点击验证' }}
</el-button>
</div>
</div>
<div class="right">
<div class="arithmeticList">
<div class="arithmeticItem" v-for="(item,index) in arithmeticArr" @click="arithmeticItemPush(item)">
{{ item }}
</div>
</div>
<div class="document">
<div class="tabs">
<div class="tabItem" v-for="(item,index) in tabItem" @click="switchTabs(item)"
:class="{'acivte':activeTabs===item}"
>{{ item }}
</div>
</div>
<div class="content">
<template v-if="activeTabs === '元数据属性'">
<div style="height: 300px;overflow:auto;">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false"
:showCheckbox="false"
:menuData="propertyTree" @handleNodeClick="propertyClick" :treeProps="treePropsproperty"
></base-tree>
</div>
</template>
<template v-else>
<div style="margin-top: 10px">
<base-form
2025-07-10 10:47:53 +08:00
ref="fixedValueFormRefsName"
:formRow="fixedValueForm"
:isFunBtn="false"
:spanWidth="'70px'"
justifyContent="flex-end"
@onSelect="fixedValueOnSelect"
2025-07-18 14:22:43 +08:00
@elDialogClick="ixedValueFormelDialogClick"
2025-07-10 10:47:53 +08:00
@cascaderChange="cascaderChange"
2025-06-07 16:34:40 +08:00
>
</base-form>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</base-dialog>
<!-- 选择映射档案-->
<base-dialog
2025-07-10 10:47:53 +08:00
:dialogVisible.sync="masterDialog"
:closeModal="false"
:footerShow="true"
title="选择映射档案"
width="80%"
top="10vh"
@handleConfirmClick="masterPickDialog"
2025-06-07 16:34:40 +08:00
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="masterDialog">
<baseChoice ref="baseChoice" @getTableList="getTableList" placeholder="基础数据名称"
:tableData="masterTableData" :showSearch="true" :tableColumn="masterTableColumn" :pageShow="false"
></baseChoice>
</div>
</base-dialog>
<base-dialog
2025-07-10 10:47:53 +08:00
:dialogVisible.sync="billDialog"
:closeModal="false"
:footerShow="true"
title="选择单据项目"
width="400px"
top="10vh"
@handleConfirmClick="billClickHandle"
2025-06-07 16:34:40 +08:00
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="billDialog">
<div class="showList" style="height: 60vh;overflow: auto">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
:expandAll="false" :menuData="billTableData" @handleNodeClick="billTreeClick"
:treeProps="billTreeProps"
></base-tree>
</div>
</div>
</base-dialog>
2025-07-18 14:22:43 +08:00
<!-- 固定值弹窗-->
<base-dialog
:dialogVisible.sync="addDialog"
:closeModal="false"
:footerShow="true"
:title="'选择'+ addTiTle"
width="80%"
top="10vh"
@handleConfirmClick="addPickDialog"
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="addDialog">
<baseChoice ref="baseChoice2" :tableData="addTableData2" :tableColumn="addTableColumn2" @onQuery="addonQuery"
@getTableList="getTableAddList"
:showSearch="true" :placeholder="addTiTle+'搜索'"
></baseChoice>
</div>
</base-dialog>
2025-06-07 16:34:40 +08:00
</div>
</template>
<script>
import baseTree from '@/components/base/BaseMenuTree/index.vue'
import basePage from '@/components/base/basePage/index.vue'
import baseChoice from '@/components/base/baseChoice/index.vue'
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
import baseRightDialog from '@/components/base/baseRightDialog'
import baseTable from '@/components/base/baseTable/index.vue'
import baseForm from '@/components/base/baseNewForm'
import {
businessModuledeleteAPI,
businessModuleMdmdeleteListAPI,
businessModuleMdmSaveListAPI,
businessModuleMdmupdateListAPI,
businessModulequeryAllAPI,
businessModuleUpdateAPI, influenceFactorCorrelationdeleteListAPI,
influenceFactorCorrelationsaveListAPI,
influenceFactorCorrelationupdateListAPI,
influenceFactorqueryAllAPI,
queryAllAPI, queryBdinfoListAPI,
queryByIdAPI,
queryByMdmIdAPI, queryCashFlowMapAPI,
queryMdmAndFiledsByMdmIdAPI, queryMdmAndFiledssByMdmIdAPI,
queryMdmsByModuleIdAPI
} from '@/api/apis/operationalModule'
import { GetLoginUserButtonsAPI } from '@/api/apis/buttonList'
import { queryModuleIncludeMdmListAPI } from '@/api/apis/relevance'
2025-07-18 14:22:43 +08:00
import { queryDataPagedByMapAPI, queryOrgBookVOAPI } from '@/api/apis/accountingSubject'
2025-06-07 16:34:40 +08:00
import {
confTempSaveAPI,
queryVoucherTypeAPI, tempcheckAbstractAPI,
tempdeleteAPI, tempQueryAllAPI,
tempqueryAllAPI,
tempupdateAPI, typeDeleteAPI, typeSaveAPI, typeUpdateAPI
} from '@/api/apis/ItemEntryTemplate'
import { subjectClassificationqueryAllAPI } from '@/api/apis/classifyDefinition'
export default {
name: 'recordContrast',
components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree },
data() {
return {
2025-07-18 14:22:43 +08:00
addTableColumn2: [],
addTableData2: [],
addTiTle: '',
addDialog: false,
2025-06-07 16:34:40 +08:00
//凭证相关
voucherClickId: '',
voucherClickName: '',
voucherDialogShow: false,
voucherList: [],
subClassOptions: [],//会计科目下啦
queryCashOptions: [],//现金流量下啦
editFlag: false,
verifyFlag: false,
fixedValueClickRow: {},
addPickKey: '',
addTableData: [],
addTableColumn: [
{
label: '档案',
prop: 'mdmName'
},
{
label: '字段',
prop: 'fieldId'
},
{
label: '备注',
prop: 'remark'
},
{
label: '操作',
prop: 'operation',
width: '100'
}
],
pkglbookOptions: [],
treePropsproperty: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
},
voucher: '',//凭证
voucherOptions: [],
voucherClickObj: {},
pkglbook: '',//账簿
pkglbookClickObj: {},//账簿
//公式相关是用字段
propertyTree: [],
clickRow: {},
2025-07-18 14:22:43 +08:00
clickRowKey: '',
2025-06-07 16:34:40 +08:00
activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'],
2025-07-18 14:22:43 +08:00
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)'],
2025-06-07 16:34:40 +08:00
//公式text
textarea: '',
textareaEn: '',
//公式相关是用字段
nowBtns2: [],
assistTableData: [],
assistTableColumn: [
{
label: '辅助核算类型',
prop: 'mdmName'
},
{
label: '辅助核算内容',
prop: 'fieldName'
},
{
label: '备注',
prop: 'remark'
},
{
label: '操作',
prop: 'operation',
width: 60
}
],
billTypeClickCode: '',
masterTableData: [],
masterTableColumn: [
{
label: '基础数据编码',
prop: 'bdcode'
},
{
label: '基础数据名称',
prop: 'bdname'
}
],
masterDialog: false,
basicFormForm: [
{
elCol: [
{
label: '会计科目',
prop: 'subjectClassificationId',
tag: 'elSelect',
span: 24,
disabled: false,
placeholder: '点击选择',
options: []
},
{
label: '币种',
prop: 'currencyFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '摘要名称',
prop: 'abstractRes',
tag: 'elDialog',
span: 24
},
{
label: '汇率',
prop: 'exchangeRate',
tag: 'elInput',
type: 'number',
span: 24
},
{
label: '借方数量字段',
prop: 'jNumFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '借方原币金额字段',
prop: 'jYbSumFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '借方本币金额字段',
prop: 'jBbSumFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '贷方数量字段',
prop: 'dNumFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '贷方原币金额字段',
prop: 'dYbSumFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '贷方本币金额字段',
prop: 'dBbSumFieArr',
tag: 'elCascader',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
},
{
label: '现金流量项目主键',
prop: 'pkCashflow',
tag: 'elSelect',
span: 24,
disabled: false,
placeholder: '点击选择',
options: []
},
{
label: '备注',
prop: 'remark',
tag: 'elInput',
span: 24,
type: 'textarea'
}
]
}
],
basicFormRulers: {
subjectClassificationId: [
{ required: true, message: '请选择会计科目', trigger: 'change' }
],
currencyFieArr: [
{ required: true, message: '请选择币种', trigger: 'change' }
],
abstractRes: [
{ required: true, message: '请输入摘要名称', trigger: 'change' }
],
exchangeRate: [
{ required: true, message: '请输入汇率', trigger: 'change' }
],
jNumField: [
{ required: true, message: '请选择借方数量字段', trigger: 'change' }
],
jYbSumField: [
{ required: true, message: '请选择借方原币金额字段', trigger: 'change' }
],
jBbSumField: [
{ required: true, message: '请选择借方本币金额字段', trigger: 'change' }
],
dNumField: [
{ required: true, message: '请选择贷方数量字段', trigger: 'change' }
],
dYbSumField: [
{ required: true, message: '请选择贷方原币金额字段', trigger: 'change' }
],
dBbSumField: [
{ required: true, message: '请选择贷方本币金额字段', trigger: 'change' }
],
pkCashflow: [
{ required: true, message: '请选择现金流量项目主键', trigger: 'change' }
]
},
fixedValueForm: [
{
elCol: [
{
label: '参照',
prop: 'factorName',
tag: 'elDialog',
span: 24,
disabled: false,
options: []
},
{
label: '档案值',
prop: 'recordData',
2025-07-18 14:22:43 +08:00
tag: 'elDialog',
2025-06-07 16:34:40 +08:00
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
}
]
}
],
nowBtns: [],
billTypeName: '',
billTypeClickID: '',
billTypeClickName: '',
billTypeList: [
{
name: '人员对照',
id: 1
},
{
name: '人员对照',
id: 2
},
{
name: '人员对照',
id: 3
},
{
name: '人员对照',
id: 4
}
],
searchObj: {},
pageModel: {
page: 1, //当前页码
2025-07-18 14:22:43 +08:00
limit: 20, //每页显示多少
prop7: '',
propValue7: '',
prop8: '',
propValue8: ''
2025-06-07 16:34:40 +08:00
},
selected: [],
treeSelect: [],
tableColumn: [
{
label: '会计科目(分类定义)',
prop: 'subjectClassificationName',
width: 200
},
{
label: '币种',
prop: 'currencyFieldName',
width: 251
},
{
label: '摘要',
prop: 'abstractRes',
width: 300
},
{
label: '汇率',
prop: 'exchangeRate',
width: 251
},
{
label: '借方数量',
prop: 'jNumFieldName',
width: 251
},
{
label: '原币借方发生额',
prop: 'jYbSumFieldName',
width: 251
},
{
label: '本币借方发生额',
prop: 'jBbSumFieldName',
width: 251
},
{
label: '货方数量',
prop: 'dNumFieldName',
width: 251
},
{
label: '原币贷方发生额',
prop: 'dYbSumFieldName',
width: 251
},
{
label: '本币贷方发生额',
prop: 'dBbSumFieldName',
width: 251
},
{
label: '现金流量项目',
prop: 'pkCashflow',
width: 150
},
{
label: '备注',
prop: 'remark',
width: 400
}
],
tableData: [],
2025-07-18 14:22:43 +08:00
tableLoading: false,
2025-06-07 16:34:40 +08:00
dialogTitle: '新增',
examineOperateDialog: false,
statusView: false,
passwordDialogShow: false,
passwordDialogTitle: '新增',
billTypeADDName: '',
billTypeADDID: '',
clickFatherObj: {},
billDialog: false,
billTableData: [],
billtableColumn: [
{
label: '主数据名称',
prop: 'mdmName'
},
{
label: '主数据编码',
prop: 'mdmCode'
}
],
billTreeActive: {},
billTreeActiveFather: {},
treeProps: {
children: 'mdmModuleEntity',
label: 'name'
},
billTreeProps: {
children: 'sublistMdmModuleDbFileds',
label: 'name'
2025-07-26 10:28:29 +08:00
},
typeMerge:''
2025-06-07 16:34:40 +08:00
}
},
methods: {
2025-07-18 14:22:43 +08:00
async ixedValueFormelDialogClick(row) {
if (row.label === '参照') {
this.fixedValuelDialogClick(false)
} else {
if (!this.fixedValueClickRow.namefieldname) {
this.$vmNews('请选择参照值')
return
}
this.addTableColumn2 = [
{
label: '名称',
prop: this.fixedValueClickRow.namefieldname
},
{
label: '编码',
prop: this.fixedValueClickRow.codefieldname
}
]
this.addDialog = true
this.addTiTle = this.fixedValueClickRow.dbName
this.pageModel.propValue7 = ''
this.pageModel.propValue8 = ''
this.pageModel.prop7 = ''
this.pageModel.prop8 = ''
this.getAddTableData()
}
},
getTableAddList(val){
console.log(val,'val',this.fixedValueClickRow)
this.pageModel.propValue7 = val
this.pageModel.propValue8 = val
this.pageModel.prop7 = this.fixedValueClickRow.codefieldname
this.pageModel.prop8 = this.fixedValueClickRow.namefieldname
this.getAddTableData()
},
addPickDialog() {
if (!this.$refs.baseChoice2.optionData[this.fixedValueClickRow.namefieldname]) {
this.$vmNews('请选择一条数据')
return
}
let obj =this.$refs.baseChoice2.optionData
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', obj[this.fixedValueClickRow.namefieldname])
2025-07-26 10:28:29 +08:00
this.textarea += `@@$${this.fixedValueClickRow.dbName}:${this.fixedValueClickRow.tablepkname}=${obj[this.fixedValueClickRow.tablepkname]}`
2025-07-18 14:22:43 +08:00
// 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])
// this.$set(this.clickRow, `factorpk${this.clickNum}`, this.$refs.baseChoice.optionData['id'])
// console.log(this.clickRow, 'this.clickRow')
this.addDialog = false
},
async getAddTableData() {
const res = await queryDataPagedByMapAPI({
...this.pageModel,
pageNum: this.pageModel.page,
pageSize: this.pageModel.limit,
tablename: this.fixedValueClickRow.tablename,
pkentityorg: this.pkglbookClickObj.pkentityorg
})
this.$refs.baseChoice2.pageModel.total = res.attribute.total
this.addTableData2 = res.attribute.list
},
addonQuery(res, pageModel) {
this.pageModel = pageModel
this.getAddTableData()
},
2025-06-07 16:34:40 +08:00
//超级转换器!
transitionRowHandle(item) {
let obj = item
let row = {
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
}
obj.subjectClassificationId = item.subjectClassificationId.toString()
obj.currencyFieArr = item.currencyField ? this.searchIDHandle(item.currencyField, this.propertyTree, row) : []
obj.jNumFieArr = item.jNumField ? this.searchIDHandle(item.jNumField, this.propertyTree, row) : []
obj.jYbSumFieArr = item.jYbSumField ? this.searchIDHandle(item.jYbSumField, this.propertyTree, row) : []
obj.jBbSumFieArr = item.jBbSumField ? this.searchIDHandle(item.jBbSumField, this.propertyTree, row) : []
obj.dNumFieArr = item.dNumField ? this.searchIDHandle(item.dNumField, this.propertyTree, row) : []
obj.dYbSumFieArr = item.dYbSumField ? this.searchIDHandle(item.dYbSumField, this.propertyTree, row) : []
obj.dBbSumFieArr = item.dBbSumField ? this.searchIDHandle(item.dBbSumField, this.propertyTree, row) : []
if (obj.assistEntityList) {
obj.assistEntityList.forEach(ele => {
2025-07-10 10:47:53 +08:00
ele.fieldArr = this.searchIDHandle(ele.fieldId, this.propertyTree, row)
2025-06-07 16:34:40 +08:00
})
}
},
sonTableDataHandle() {
this.selected[0].assistEntityList.push({})
},
//凭证相关
voucherCliclHandle(id, name) {
this.voucherClickId = id
this.voucherClickName = name
this.resetTable()
},
voucherDialogDelHandle(item) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
const res = await typeDeleteAPI({
id: item.id
})
this.$vmNews('删除成功', 'success')
this.getVoucherListHandle()
})
},
voucherDialogEditHandle(item) {
this.billTypeADDID = item.id
this.billTypeADDName = item.name
this.voucherDialogShow = true
this.passwordDialogTitle = '编辑'
},
async getVoucherListHandle() {
const res = await tempQueryAllAPI({
mdmId: this.billTypeClickID
})
res.attribute.forEach(item => {
})
this.voucherList = res.attribute
console.log(res, 'res')
},
async voucherDialogClickHandle() {
if (!this.billTypeADDName) {
this.$vmNews('请输入凭证类型')
return
}
if (this.passwordDialogTitle === '新增') {
const res = await typeSaveAPI({
name: this.billTypeADDName,
mdmId: this.billTypeClickID
})
this.$vmNews('保存成功', 'success')
this.getVoucherListHandle()
} else {
const res = await typeUpdateAPI({
id: this.billTypeADDID,
name: this.billTypeADDName,
mdmId: this.billTypeClickID
})
this.$vmNews('保存成功', 'success')
this.getVoucherListHandle()
}
this.voucherDialogShow = false
},
leftAddHandle() {
this.voucherDialogShow = true
this.passwordDialogTitle = '新增'
this.billTypeADDName = ''
this.billTypeADDID = ''
},
//保存方法
async saveOperate() {
let flag = this.tableData.some((item, index) => {
return Object.keys(this.basicFormRulers).some((el) => {
if (!item[el] || item[el] === []) {
this.$vmNews(`${index + 1}${this.basicFormRulers[el][0].message}`, 'error')
return true
}
})
})
2025-07-26 10:28:29 +08:00
let tableData = this.tableData.map(el=>{
return{
...el,
typeMerge:this.typeMerge
}
})
2025-06-07 16:34:40 +08:00
console.log(this.tableData, 'this.tableData')
2025-07-26 10:28:29 +08:00
const res = await confTempSaveAPI(tableData)
2025-07-10 10:47:53 +08:00
this.$vmNews('保存成功', 'success')
this.editFlag = false
2025-06-07 16:34:40 +08:00
this.getTableData()
},
//关闭方法
closeOperate() {
this.editFlag = false
this.getTableData()
},
//现金项目
cashFlowOptionsChangeHandle(val, row) {
if (val) {
let obj = this.queryCashOptions.find((item) => {
return item.id == val
})
this.$set(row, 'subjectClassificationId', obj.id)
this.$set(row, 'subjectClassificationCode', obj.code)
this.$set(row, 'subjectClassificationName', obj.name)
}
},
//币种修改事件
currencyFieArrChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'currencyField', val[val.length - 1])
this.$set(row, 'currencyFieldName', `$${valLabel}`)
this.$set(row, 'currencyFieldCode', obj.enName)
},
//借方数量修改事件
jNumFieArrChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'jNumField', val[val.length - 1])
this.$set(row, 'jNumFieldName', `$${valLabel}`)
this.$set(row, 'jNumFieldCode', obj.enName)
},
//借方原币金额修改事件
jYbSumFieArrChangHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'jYbSumField', val[val.length - 1])
this.$set(row, 'jYbSumFieldName', `$${valLabel}`)
this.$set(row, 'jYbSumFieldCode', obj.enName)
},
//借方本币金额修改事件
jBbSumFieArrChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'jBbSumField', val[val.length - 1])
this.$set(row, 'jBbSumFieldName', `$${valLabel}`)
this.$set(row, 'jBbSumFieldCode', obj.enName)
},
//贷方数量修改事件
dNumFieArrChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'dNumField', val[val.length - 1])
this.$set(row, 'dNumFieldName', `$${valLabel}`)
this.$set(row, 'dNumFieldCode', obj.enName)
},
//贷方原币金额修改事件
dYbSumFieArrChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'dYbSumField', val[val.length - 1])
this.$set(row, 'dYbSumFieldName', `$${valLabel}`)
this.$set(row, 'dYbSumFieldCode', obj.enName)
},
//贷方本币金额修改事件
dBbSumFieArrChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
this.$set(row, 'dBbSumField', val[val.length - 1])
this.$set(row, 'dBbSumFieldName', `$${valLabel}`)
this.$set(row, 'dBbSumFieldCode', obj.enName)
},
//验证接口
async verifyFlagHandle() {
const res = await tempcheckAbstractAPI({
abstractRes: this.textarea
})
if (res.flag === true) {
this.$vmNews('验证通过', 'success')
this.verifyFlag = true
}
},
//删除新增接口
deleteRowHandle(row) {
this.selected[0].assistEntityList.splice(row.index, 1)
},
cascaderChangeHandle(val, options, row = {}) {
let valLabel = ''
let obj = {}
function getLabelPath(el, data, path = []) {
for (let i = 0; i < data.length; i++) {
const item = data[i]
path.push(item[row.props.label])
if (el === item[row.props.value]) {
obj = item
return [...path] // 找到了
}
if (item[row.props.children] && item[row.props.children].length > 0) {
const result = getLabelPath(el, item[row.props.children], path)
if (result) return result
}
path.pop() // 回退
}
return null
}
// 🧠 只处理最后一个值,不遍历 valval 是一个“路径数组”)
const lastValue = Array.isArray(val) ? val[val.length - 1] : val
const labelPath = getLabelPath(lastValue, options)
valLabel = labelPath ? labelPath.join('.') : ''
return valLabel
},
//找id
searchIDHandle(val, options, row = {}) {
2025-07-18 14:22:43 +08:00
console.log(val, options, row, '看看内部')
2025-06-07 16:34:40 +08:00
let valPath = ''
let obj = null
2025-07-18 14:22:43 +08:00
2025-06-07 16:34:40 +08:00
function getValuePath(el, data, path = []) {
for (let i = 0; i < data.length; i++) {
const item = data[i]
path.push(item[row.props.value])
if (el === String(item[row.props.value])) {
obj = item
return [...path] // 找到就返回 path
}
if (item[row.props.children] && item[row.props.children].length > 0) {
const result = getValuePath(el, item[row.props.children], path)
if (result) return result
}
path.pop() // 回退
}
return null
}
2025-07-18 14:22:43 +08:00
2025-06-07 16:34:40 +08:00
const targetValue = Array.isArray(val) ? val[val.length - 1] : val
const valuePath = getValuePath(targetValue, options)
valPath = valuePath ? valuePath : []
return valPath
},
fieldIdChangeHandle(val, row) {
let obj = this.getIdHandle(this.propertyTree, val[val.length - 1])
console.log(obj, 'obj')
this.$set(row, 'fieldId', val[val.length - 1])
this.$set(row, 'fieldCode', obj.enName)
let valLabel = this.cascaderChangeHandle(val, this.propertyTree, {
props: {
checkStrictly: '',
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
})
console.log(valLabel, 'valLabel')
this.$set(row, 'fieldName', valLabel)
},
getIdHandle(arr, id) {
for (let item of arr) {
if (item.id === id) {
return item
}
if (item.sublistMdmModuleDbFileds && item.sublistMdmModuleDbFileds.length > 0) {
const found = this.getIdHandle(item.sublistMdmModuleDbFileds, id)
if (found) return found
}
}
return null
},
mdmNameEldialog(row) {
this.fixedValuelDialogClick(row)
},
AddCascaderChange(val, options, row, valLabel, obj) {
//币种
if (row.prop === 'currencyFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'currencyField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'currencyFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'currencyFieldCode', obj.enName)
}
//借方数量字段
if (row.prop === 'jNumFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jNumField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jNumFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jNumFieldCode', obj.enName)
}
// 借方原币金额字段
if (row.prop === 'jYbSumFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jYbSumField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jYbSumFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jYbSumFieldCode', obj.enName)
}
// 借方本币金额字段
if (row.prop === 'jBbSumFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jBbSumField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jBbSumFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'jBbSumFieldCode', obj.enName)
}
// 贷方数量字段
if (row.prop === 'dNumFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dNumField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dNumFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dNumFieldCode', obj.enName)
}
// 贷方原币金额字段
if (row.prop === 'dYbSumFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dYbSumField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dYbSumFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dYbSumFieldCode', obj.enName)
}
// 贷方本币金额字段
if (row.prop === 'dBbSumFieArr') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dBbSumField', val[val.length - 1])
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dBbSumFieldName', `$${valLabel}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'dBbSumFieldCode', obj.enName)
}
},
//新增弹窗所有下啦获取
async addGetSelectHandle() {
2025-07-10 10:47:53 +08:00
this.tableLoading = true
2025-06-07 16:34:40 +08:00
//会计科目
const res = await subjectClassificationqueryAllAPI({
aeConfModuleId: this.clickFatherObj.data.aeConfModuleId,
pkglorgbook: this.pkglbookClickObj.pkglorgbook
})
res.attribute.forEach(item => {
item.label = item.name
item.value = item.id
})
this.subClassOptions = res.attribute
//币种数据
const res2 = await queryMdmAndFiledssByMdmIdAPI({
mdmId: this.billTypeClickID
})
res2.attribute.forEach(item => {
item.chName = item.remark
})
this.treeSelect = res2.attribute
//现金流量项目
const res3 = await queryCashFlowMapAPI({})
res3.attribute.forEach((el) => {
el.label = `[${el.cfitemcode}] ${el.cfitemname}`
el.value = el.pkCashflow
})
this.queryCashOptions = res3.attribute
const res4 = await queryMdmAndFiledssByMdmIdAPI({
mdmId: this.billTypeClickID
})
res4.attribute.forEach(item => {
item.chName = item.remark
})
this.propertyTree = res4.attribute
2025-07-10 10:47:53 +08:00
this.tableLoading = false
2025-06-07 16:34:40 +08:00
},
//凭证类别修改方法
voucherChangeHandle(val) {
this.voucherOptions.find(item => {
if (item.value == val) {
this.voucherClickObj = item
console.log(this.voucherClickObj, 'voucherClickObj')
}
})
this.resetTable()
},
//账簿修改方法
async changepkglbookHandle(val) {
this.pkglbookOptions.find(item => {
if (item.value == val) {
this.pkglbookClickObj = item
}
})
this.resetTable()
},
propertyClick(a, b, c) {
console.log(a, b, c)
let val = []
this.getStr(val, b)
this.textarea += `@@$${val.reverse().join('.')}`
},
getStr(arr, node) {
arr.push(node.data.chName)
if (node.parent && node.parent.data.chName) {
this.getStr(arr, node.parent)
}
},
async getTableList(val) {
this.openLoading()
const res = await queryBdinfoListAPI({
bdname: val
})
this.masterTableData = res.attribute
this.$nextTick(() => {
this.$refs.baseChoice.optionData = ''
this.$refs.baseChoice.$refs.customtable.clearRadioIndex()
})
},
async fixedValuelDialogClick(row = false, index) {
this.fixedValueClickRow = row
this.masterDialog = true
this.openLoading()
const res = await queryBdinfoListAPI({})
this.masterTableData = res.attribute
},
fixedValueOnSelect() {
},
switchTabs(item) {
if (item === this.activeTabs) return
this.activeTabs = item
},
arithmeticItemPush(item) {
this.textarea += item
},
clickBillTree(row, item) {
console.log(item, '??')
this.billTreeActive = row
this.billTreeActiveFather = item
},
billClickHandle() {
if (!this.billTreeActive.id) {
this.$vmNews('请选择单据项目')
return
}
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFieldName', `$${this.billTreeActiveFather.name}.${this.billTreeActive.name}`)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFieldId', this.billTreeActive.id)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFieldCode', this.billTreeActive.enName)
this.billDialog = false
},
//档案值改变方法
cascaderChange(val, options, row, valLabel) {
console.log(valLabel, 'valLabel')
this.textarea = this.textarea + '@@$' + valLabel
},
async masterPickDialog() {
if (!this.$refs.baseChoice.optionData.bdname) {
this.$vmNews('请选择映射档案')
return
}
let row = this.$refs.baseChoice.optionData
if (this.fixedValueClickRow) {
this.$set(this.fixedValueClickRow, 'mdmId', row.mdmId)
this.$set(this.fixedValueClickRow, 'mdmCode', row.mdmCode)
this.$set(this.fixedValueClickRow, 'mdmName', row.mdmName)
} else {
2025-07-18 14:22:43 +08:00
this.fixedValueClickRow = row
2025-06-07 16:34:40 +08:00
const res = await queryMdmAndFiledssByMdmIdAPI({
mdmId: row.mdmId
})
2025-07-18 14:22:43 +08:00
const res2 = await queryBdinfoListAPI({
pkBdinfo: row.pkBdinfo
})
2025-06-07 16:34:40 +08:00
res.attribute.forEach(item => {
item.chName = item.remark
})
2025-07-18 14:22:43 +08:00
console.log(res2, '2')
this.$set(this.fixedValueClickRow, 'tablepkname', res2.attribute[0].tablepkname)
this.$set(this.fixedValueClickRow, 'codefieldname', res2.attribute[0].codefieldname)
this.$set(this.fixedValueClickRow, 'namefieldname', res2.attribute[0].namefieldname)
this.$set(this.fixedValueClickRow, 'tablename', res2.attribute[0].tablename)
2025-06-07 16:34:40 +08:00
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'factorName', row.bdname)
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', '')
this.fixedValueForm[0].elCol[1].options = res.attribute
}
// this.$set(this.$refs.basicFormRefsName.ruleForm, 'factorCode', row.factorCode)
this.masterDialog = false
},
async elDialogClick(row, index) {
if (row.label === '摘要名称') {
this.rightAddHandle(false, this.$refs.basicFormRefsName.ruleForm.abstractRes)
}
},
delRightTitle(item) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
const res = await businessModuledeleteAPI({
id: item.id
})
if (res.status == 200) {
this.$vmNews('删除成功', 'success')
this.billTypeClickName = ''
this.billTypeClickID = ''
this.billTypeClickCode = ''
this.getLeftList()
this.resetTable()
}
})
},
//摘要公式编辑方法
2025-07-18 14:22:43 +08:00
async rightAddHandle(row = false, str = '', key) {
2025-06-07 16:34:40 +08:00
this.verifyFlag = false
this.passwordDialogShow = true
2025-07-18 14:22:43 +08:00
this.fixedValueClickRow = {}
if (str || str === 0) {
this.textarea = str
} else {
this.textarea = ''
}
2025-06-07 16:34:40 +08:00
this.textareaEn = ''
this.propertyTree = []
this.activeTabs = '元数据属性'
if (row) {
this.clickRow = row
2025-07-18 14:22:43 +08:00
this.clickRowKey = key
2025-06-07 16:34:40 +08:00
} else {
this.clickRow = false
}
const res = await queryMdmAndFiledssByMdmIdAPI({
mdmId: this.billTypeClickID
})
console.log(res, 'rerere')
res.attribute.forEach(item => {
item.chName = item.remark
})
this.propertyTree = res.attribute
},
//公式确认事件
async passwordChangeHandle() {
if (!this.verifyFlag) {
this.$vmNews('请通过验证')
return
}
if (!this.textarea) {
this.$vmNews('请输入公式')
return
}
if (this.clickRow) {
2025-07-18 14:22:43 +08:00
this.$set(this.clickRow, this.clickRowKey, this.textarea)
2025-06-07 16:34:40 +08:00
this.passwordDialogShow = false
} else {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'abstractRes', this.textarea)
this.passwordDialogShow = false
}
},
//获取下啦信息
async getSelect() {
//账簿信息
const res2 = await queryOrgBookVOAPI({})
console.log(res2, 'res2')
res2.attribute.forEach(el => {
el.label = el.glorgbookname
el.value = el.pkentityorg
})
this.pkglbookOptions = res2.attribute
//拿凭证类别
const res3 = await queryVoucherTypeAPI({})
res3.attribute.forEach(el => {
el.label = el.name
el.value = el.id
})
this.voucherOptions = res3.attribute
return
const res = await GetBillListAPI({
page: 1,
limit: 9999
})
res.data[1].forEach(item => {
item.label = item.appName
item.value = item.appID
})
this.basicFormForm[0].elCol[2].options = res.data[1]
this.basicFormForm[0].elCol[6].options = res.data[1]
},
async getLeftList() {
this.openLoading()
const res = await queryModuleIncludeMdmListAPI({})
res.attribute.forEach((el) => {
el.fatherRow = true
el.name = el.aeConfModuleName
el.id = el.aeConfModuleId
el.mdmModuleEntity.forEach(item => {
item.name = item.mdmName
})
})
this.billTypeList = res.attribute
},
subClassOptionsChangeHandle(val, row) {
if (val) {
let obj = this.subClassOptions.find((item) => {
return item.id == val
})
this.$set(row, 'subjectClassificationId', obj.id)
this.$set(row, 'subjectClassificationCode', obj.code)
this.$set(row, 'subjectClassificationName', obj.name)
}
},
onSelect(val, index, indexRow, obj, row, form) {
//会计科目
if (row.prop === 'subjectClassificationId') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'subjectClassificationId', obj.id)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'subjectClassificationCode', obj.code)
this.$set(this.$refs.basicFormRefsName.ruleForm, 'subjectClassificationName', obj.name)
}
if (row.prop === 'targetAppID') {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'targetAppCode', obj.appCode)
}
},
async handleConfirmClick() {
try {
await this.$refs.basicFormRefsName.$refs.ruleForm.validate()
} catch (err) {
this.$vmNews('请输入必填项')
return
}
let form = this.$refs.basicFormRefsName.ruleForm
if (this.dialogTitle === '编辑') {
this.openLoading()
const res = await tempupdateAPI(
2025-07-10 10:47:53 +08:00
{
...this.$refs.basicFormRefsName.ruleForm,
assistEntityList: this.addTableData
}
2025-06-07 16:34:40 +08:00
)
if (res.status == 200) {
this.$vmNews('保存成功', 'success')
this.examineOperateDialog = false
this.resetTable()
}
} else {
this.openLoading()
const res = await confTempSaveAPI(
2025-07-10 10:47:53 +08:00
{
...this.$refs.basicFormRefsName.ruleForm,
assistEntityList: this.addTableData
}
2025-06-07 16:34:40 +08:00
)
if (res.status == 200) {
this.$vmNews('保存成功', 'success')
this.examineOperateDialog = false
this.resetTable()
}
}
},
pageChange(model) {
this.pageModel.page = model.page
this.pageModel.limit = model.limit
this.getTableData()
},
async getTableData() {
this.assistTableData = []
if (!this.voucher || !this.pkglbook || !this.billTypeClickID || !this.voucherClickId) {
return
}
const res = await tempqueryAllAPI({
...this.searchObj,
mdmId: this.billTypeClickID,
pkGlorgbook: this.pkglbookClickObj.pkglorgbook,
voucherTypeId: this.voucher,
templateTypeId: this.voucherClickId//20250704
})
this.tableData = res.attribute
2025-07-26 10:28:29 +08:00
this.typeMerge = this.tableData[0].typeMerge
2025-06-07 16:34:40 +08:00
this.$nextTick(() => {
this.$refs.customtable.clearRadioIndex()
this.$refs.customtable.clearSelection()
this.selected = []
})
},
resetTable() {
this.tableData = []
this.pageModel.page = 1
this.selected = []
this.getTableData()
},
// 点击某条数据
radioChange(val) {
this.selected = []
this.selected.push(val)
console.log(val.assistEntityList, '?val.assistEntityList')
2025-07-10 10:47:53 +08:00
let row = {
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
}
val.assistEntityList.forEach(item => {
2025-07-18 14:22:43 +08:00
console.log(item.fieldId, 'item.fieldId')
2025-07-10 10:47:53 +08:00
item.fieldArr = item.fieldId ? this.searchIDHandle(item.fieldId, this.propertyTree, row) : []
2025-07-18 14:22:43 +08:00
console.log(item.fieldArr, '?fieldArr', item, this.propertyTree)
2025-07-10 10:47:53 +08:00
})
2025-06-07 16:34:40 +08:00
this.assistTableData = val.assistEntityList ? val.assistEntityList : []
2025-07-10 10:47:53 +08:00
2025-06-07 16:34:40 +08:00
},
// 删除
delOperate() {
if (!this.selected.length) {
this.$vmNews('请至少选择一条数据')
return
}
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async() => {
2025-07-10 10:47:53 +08:00
if (this.selected[0].id) {
const res = await tempdeleteAPI({
id: this.selected[0].id
})
if (res.status == 200) {
this.$vmNews('删除成功', 'success')
}
2025-06-07 16:34:40 +08:00
}
2025-07-10 10:47:53 +08:00
this.tableData.splice(this.selected[0].index, 1)
2025-06-07 16:34:40 +08:00
})
},
// 编辑
async editOperate() {
if (!this.billTypeClickName) {
this.$vmNews('请选择单据列表')
return
}
if (!this.pkglbook) {
this.$vmNews('请选择账簿')
return
}
if (!this.voucher) {
this.$vmNews('请选择凭证')
return
}
2025-07-10 10:47:53 +08:00
await this.addGetSelectHandle()
2025-06-07 16:34:40 +08:00
this.tableData.forEach(item => {
this.transitionRowHandle(item)
})
this.editFlag = true
return
if (!this.selected.length) {
this.$vmNews('请至少选择一条数据')
return
}
this.dialogTitle = '编辑'
this.examineOperateDialog = true
this.$nextTick(() => {
let form = this.selected[0]
let row = {
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
}
this.$refs.basicFormRefsName.ruleForm = {
...this.selected[0],
subjectClassificationId: form.subjectClassificationId.toString(),
currencyFieArr: form.currencyField ? this.searchIDHandle(form.currencyField, this.propertyTree, row) : [],
jNumFieArr: form.jNumField ? this.searchIDHandle(form.jNumField, this.propertyTree, row) : [],
jYbSumFieArr: form.jYbSumField ? this.searchIDHandle(form.jYbSumField, this.propertyTree, row) : [],
jBbSumFieArr: form.jBbSumField ? this.searchIDHandle(form.jBbSumField, this.propertyTree, row) : [],
dNumFieArr: form.dNumField ? this.searchIDHandle(form.dNumField, this.propertyTree, row) : [],
dYbSumFieArr: form.dYbSumField ? this.searchIDHandle(form.dYbSumField, this.propertyTree, row) : [],
dBbSumFieArr: form.dBbSumField ? this.searchIDHandle(form.dBbSumField, this.propertyTree, row) : []
}
console.log(this.$refs.basicFormRefsName.ruleForm, 'this.$refs.basicFormRefsName.ruleForm')
if (this.selected[0].assistEntityList) {
this.selected[0].assistEntityList.forEach(item => {
item.fieldArr = item.fieldId ? this.searchIDHandle(item.fieldId, this.propertyTree, row) : []
})
this.addTableData = this.selected[0].assistEntityList
}
})
},
//新增行新增
addData() {
let obj = {}
this.addTableColumn.forEach(item => {
obj[item.prop] = ''
})
this.addTableData.push(obj)
},
//新增方法
Operate() {
let obj = {
exchangeRate: '',
remark: '',
mdmName: this.billTypeClickName,
mdmId: this.billTypeClickID,
mdmCode: this.billTypeClickCode,
voucherTypeId: this.voucher,
voucherTypeName: this.voucherClickObj.name,
pkGlorgbook: this.pkglbookClickObj.pkglorgbook,
glOrgbookCode: this.pkglbookClickObj.glorgbookcode,
glOrgbookName: this.pkglbookClickObj.glorgbookname,
currencyFieArr: [],
assistEntityList: [],
2025-07-26 10:28:29 +08:00
templateTypeId: this.voucherClickId,
typeMerge:this.typeMerge
2025-06-07 16:34:40 +08:00
}
this.tableData.push(obj)
return
},
refresh() {
this.searchObj = {}
},
//获取按钮(头部)
async buttonPermissions() {
let arr = [
{
'id': '297c66371d484f5ea163c70b1c3944a7',
'create_user_id': '1',
'create_time': '2025-05-30 11:28:56',
'modify_time': '2025-05-30 11:28:56',
'modify_user_id': '1',
'org_id': '0',
'companyId': '0',
'sts': 'Y',
'start': null,
'limit': null,
'offset': null,
'sort': null,
'order': null,
'dir': null,
'rows': null,
'page': null,
'dialect_type': null,
'pageNum': null,
'pageSize': null,
'sorts': 1,
'dataSourceCode': 'master',
'code': '1',
'nameCh': '新增',
'nameEn': 'Operate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-plus',
'styles': 'primary',
'btnFunction': 'Operate',
'remark': null,
'userId': null,
'check': false
},
{
'id': 'ad708a5f65fb42d49e203a230096f43e',
'create_user_id': '1',
'create_time': '2025-05-30 11:29:22',
'modify_time': '2025-05-30 11:29:22',
'modify_user_id': '1',
'org_id': '0',
'companyId': '0',
'sts': 'Y',
'start': null,
'limit': null,
'offset': null,
'sort': null,
'order': null,
'dir': null,
'rows': null,
'page': null,
'dialect_type': null,
'pageNum': null,
'pageSize': null,
'sorts': 2,
'dataSourceCode': 'master',
'code': '2',
'nameCh': '编辑',
'nameEn': 'editOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-edit',
'styles': 'primary',
'btnFunction': 'editOperate',
'remark': null,
'userId': null,
'check': false
},
{
'id': 'cca6382b141e4816833581db63c768da',
'create_user_id': '1',
'create_time': '2025-05-30 11:29:39',
'modify_time': '2025-05-30 11:29:39',
'modify_user_id': '1',
'org_id': '0',
'companyId': '0',
'sts': 'Y',
'start': null,
'limit': null,
'offset': null,
'sort': null,
'order': null,
'dir': null,
'rows': null,
'page': null,
'dialect_type': null,
'pageNum': null,
'pageSize': null,
'sorts': 3,
'dataSourceCode': 'master',
'code': '3',
'nameCh': '删除',
'nameEn': 'delOperate',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
2025-07-30 14:25:20 +08:00
'style': 'danger',
2025-06-07 16:34:40 +08:00
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
'check': false
}
]
let arr2 = [
{
'id': '297c66371d484f5ea163c70b1c3944a7',
'create_user_id': '1',
'create_time': '2025-05-30 11:28:56',
'modify_time': '2025-05-30 11:28:56',
'modify_user_id': '1',
'org_id': '0',
'companyId': '0',
'sts': 'Y',
'start': null,
'limit': null,
'offset': null,
'sort': null,
'order': null,
'dir': null,
'rows': null,
'page': null,
'dialect_type': null,
'pageNum': null,
'pageSize': null,
'sorts': 1,
'dataSourceCode': 'master',
'code': '1',
'nameCh': '新增',
'nameEn': 'OperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-plus',
'styles': 'primary',
'btnFunction': 'Operate',
'remark': null,
'userId': null,
'check': false
},
{
'id': 'ad708a5f65fb42d49e203a230096f43e',
'create_user_id': '1',
'create_time': '2025-05-30 11:29:22',
'modify_time': '2025-05-30 11:29:22',
'modify_user_id': '1',
'org_id': '0',
'companyId': '0',
'sts': 'Y',
'start': null,
'limit': null,
'offset': null,
'sort': null,
'order': null,
'dir': null,
'rows': null,
'page': null,
'dialect_type': null,
'pageNum': null,
'pageSize': null,
'sorts': 2,
'dataSourceCode': 'master',
'code': '2',
'nameCh': '编辑',
'nameEn': 'editOperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-edit',
'styles': 'primary',
'btnFunction': 'editOperate',
'remark': null,
'userId': null,
'check': false
},
{
'id': 'cca6382b141e4816833581db63c768da',
'create_user_id': '1',
'create_time': '2025-05-30 11:29:39',
'modify_time': '2025-05-30 11:29:39',
'modify_user_id': '1',
'org_id': '0',
'companyId': '0',
'sts': 'Y',
'start': null,
'limit': null,
'offset': null,
'sort': null,
'order': null,
'dir': null,
'rows': null,
'page': null,
'dialect_type': null,
'pageNum': null,
'pageSize': null,
'sorts': 3,
'dataSourceCode': 'master',
'code': '3',
'nameCh': '删除',
'nameEn': 'delOperateAssist',
'menuId': '936df6d1cd7e4f9ba4c972e0f84b5ab4',
'iconName': 'el-icon-delete',
2025-07-30 14:25:20 +08:00
'style': 'danger',
2025-06-07 16:34:40 +08:00
'btnFunction': 'delOperate',
'remark': null,
'userId': null,
'check': false
}
]
arr.forEach((el) => {
el.menuName = el.nameCh
el.icon = el.icoName
el.type = el.style
el.name = el.nameCN
})
arr2.forEach((el) => {
el.menuName = el.nameCh
el.icon = el.icoName
el.type = el.style
el.name = el.nameCN
})
this.nowBtns = arr
this.nowBtns2 = arr2
},
billTypeClickHandle(item, row) {
if (item.fatherRow) {
return
}
this.billTypeClickID = item.id
this.billTypeClickName = item.name
this.billTypeClickCode = item.mdmCode
this.clickFatherObj = row.parent
this.voucherClickId = ''
this.getVoucherListHandle()
this.resetTable()
},
billTreeClick(item, row) {
console.log(row, '?')
if (item.fatherRow) {
return
}
this.billTreeActive = item
this.billTreeActiveFather = row
},
//头部按钮统一调用方法
clickSave(item) {
this[item.btnFunction]()
}
},
mounted() {
this.buttonPermissions()
this.getLeftList()
// this.getTableData()
this.getSelect()
},
watch: {
textarea() {
this.verifyFlag = false
}
}
}
</script>
<style scoped lang="scss">
.tabs {
width: 200px;
display: flex;
align-items: center;
background: #f5f5f5;
padding: 2px 5px;
.tabItem {
flex: 1;
justify-content: center;
align-items: center;
cursor: pointer;
padding: 5px 10px;
text-align: center;
}
.acivte {
background: #fff;
color: #3876ee;
}
}
.arithmeticList {
display: flex;
align-content: center;
flex-wrap: wrap;
.arithmeticItem {
border-radius: 4px;
width: 78px;
margin-bottom: 5px;
margin-right: 5px;
height: 50px;
background-color: #f5f5f5;
color: #333;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
font-size: 18px;
font-weight: bold;
}
}
.addDialog {
display: flex;
.nameTitle {
padding: 10px;
font-size: 14px;
color: #333;
margin-right: 10px;
width: 180px;
text-align: right;
}
.left {
flex: 1;
}
.right {
margin-left: 10px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
.document {
margin-top: 10px;
height: 300px;
width: 100%;
//background-color: pink;
}
}
}
.recordContrast {
display: flex;
overflow: hidden;
background-color: #f5f5f5;
.left {
width: 270px;
padding: 10px;
background-color: #fff;
border-radius: 4px;
margin-right: 5px;
.leftTitle {
color: #333;
font-size: 18px;
font-weight: 500;
}
}
.right {
overflow: hidden;
flex: 1;
padding: 10px;
background-color: #fff;
border-radius: 4px;
.topBox {
display: flex;
align-items: center;
justify-content: space-between;
.searchBox {
display: flex;
align-items: center;
> div {
margin-right: 10px;
}
}
}
.table {
margin-top: 10px;
}
}
}
.searchBtn {
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 20px;
.input {
flex: 1;
margin-right: 5px;
}
}
.showList {
height: calc(100vh - 600px);
overflow: auto;
margin-top: 10px;
.showItem {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 10px;
cursor: pointer;
font-size: 13px;
.icon {
display: none;
}
&:hover {
background-color: #ebeced;
border-radius: 4px;
.icon {
display: block !important;
}
}
&.active {
background-color: #ebeced !important;
}
}
.showItemSon {
//display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px 10px 40px;
cursor: pointer;
.icon {
display: none;
}
&:hover {
background-color: #ebeced;
border-radius: 4px;
.icon {
display: block !important;
}
}
&.active {
background-color: #ebeced !important;
}
}
}
.elDialog {
display: flex;
width: 100%;
/* width: calc(100% - 14px);1 */
align-items: center;
justify-content: space-between;
border: 1px solid #DCDFE6;
border-radius: 4px;
padding: 0 15px;
cursor: pointer;
height: 40px !important;
i {
color: #c0c4cc
}
}
</style>