会计事项平台更新

This commit is contained in:
hyt 2025-07-18 14:22:43 +08:00
parent b614d7555d
commit 83c1a7788e
7 changed files with 859 additions and 160 deletions

View File

@ -152,12 +152,24 @@
<!-- 币种 --> <!-- 币种 -->
<template #currencyFieldName="{row}"> <template #currencyFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.currencyFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.currencyFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="currencyFieArrChangeHandle(row.row.currencyFieArr,row.row)" <!-- @change="currencyFieArrChangeHandle(row.row.currencyFieArr,row.row)"-->
> <!-- >-->
</el-cascader> <!-- </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>
</div> </div>
<div v-else> <div v-else>
{{ row.row.currencyFieldName }} {{ row.row.currencyFieldName }}
@ -166,7 +178,19 @@
<!-- 汇率--> <!-- 汇率-->
<template #exchangeRate="{row}"> <template #exchangeRate="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-input v-model="row.row.exchangeRate"></el-input> <!-- <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>
</div> </div>
<div v-else> <div v-else>
{{ row.row.exchangeRate }} {{ row.row.exchangeRate }}
@ -175,12 +199,24 @@
<!-- 借方数量 --> <!-- 借方数量 -->
<template #jNumFieldName="{row}"> <template #jNumFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.jNumFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.jNumFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="jNumFieArrChangeHandle(row.row.jNumFieArr,row.row)" <!-- @change="jNumFieArrChangeHandle(row.row.jNumFieArr,row.row)"-->
> <!-- >-->
</el-cascader> <!-- </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>
</div> </div>
<div v-else> <div v-else>
{{ row.row.jNumFieldName }} {{ row.row.jNumFieldName }}
@ -189,12 +225,24 @@
<!-- 原币借方发生额--> <!-- 原币借方发生额-->
<template #jYbSumFieldName="{row}"> <template #jYbSumFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.jYbSumFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.jYbSumFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="jYbSumFieArrChangHandle(row.row.jYbSumFieArr,row.row)" <!-- @change="jYbSumFieArrChangHandle(row.row.jYbSumFieArr,row.row)"-->
> <!-- >-->
</el-cascader> <!-- </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>
</div> </div>
<div v-else> <div v-else>
{{ row.row.jYbSumFieldName }} {{ row.row.jYbSumFieldName }}
@ -203,11 +251,23 @@
<!-- 本币借方发生额--> <!-- 本币借方发生额-->
<template #jBbSumFieldName="{row}"> <template #jBbSumFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.jBbSumFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.jBbSumFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="jBbSumFieArrChangeHandle(row.row.jBbSumFieArr,row.row)" <!-- @change="jBbSumFieArrChangeHandle(row.row.jBbSumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.jBbSumFieldName,'jBbSumFieldName')"
style="height: 50px;"
> >
</el-cascader> <p :style="{ color: row.row.jBbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.jBbSumFieldName ? row.row.jBbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
</div> </div>
<div v-else> <div v-else>
{{ row.row.jBbSumFieldName }} {{ row.row.jBbSumFieldName }}
@ -216,11 +276,23 @@
<!-- 货方数量--> <!-- 货方数量-->
<template #dNumFieldName="{row}"> <template #dNumFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.dNumFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.dNumFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="dNumFieArrChangeHandle(row.row.dNumFieArr,row.row)" <!-- @change="dNumFieArrChangeHandle(row.row.dNumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.dNumFieldName,'dNumFieldName')"
style="height: 50px;"
> >
</el-cascader> <p :style="{ color: row.row.dNumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.dNumFieldName ? row.row.dNumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
</div> </div>
<div v-else> <div v-else>
{{ row.row.dNumFieldName }} {{ row.row.dNumFieldName }}
@ -229,11 +301,23 @@
<!-- 原币贷方发生额--> <!-- 原币贷方发生额-->
<template #dYbSumFieldName="{row}"> <template #dYbSumFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.dYbSumFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.dYbSumFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="dYbSumFieArrChangeHandle(row.row.dYbSumFieArr,row.row)" <!-- @change="dYbSumFieArrChangeHandle(row.row.dYbSumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.dYbSumFieldName,'dYbSumFieldName')"
style="height: 50px;"
> >
</el-cascader> <p :style="{ color: row.row.dYbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.dYbSumFieldName ? row.row.dYbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
</div> </div>
<div v-else> <div v-else>
{{ row.row.dYbSumFieldName }} {{ row.row.dYbSumFieldName }}
@ -242,11 +326,23 @@
<!-- 本币贷方发生额--> <!-- 本币贷方发生额-->
<template #dBbSumFieldName="{row}"> <template #dBbSumFieldName="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-cascader class="w-100" v-model="row.row.dBbSumFieArr" :options="treeSelect" <!-- <el-cascader class="w-100" v-model="row.row.dBbSumFieArr" :options="treeSelect"-->
:props="treePropsproperty" <!-- :props="treePropsproperty"-->
@change="dBbSumFieArrChangeHandle(row.row.dBbSumFieArr,row.row)" <!-- @change="dBbSumFieArrChangeHandle(row.row.dBbSumFieArr,row.row)"-->
<!-- >-->
<!-- </el-cascader>-->
<div class="elDialog" @click="rightAddHandle(row.row,row.row.dBbSumFieldName,'dBbSumFieldName')"
style="height: 50px;"
> >
</el-cascader> <p :style="{ color: row.row.dBbSumFieldName ? '#000' : '#c0c4cc' }" class="showText"
>{{
row.row.dBbSumFieldName ? row.row.dBbSumFieldName :
'请点击选择'
}}
</p>
<i class="el-icon-more "
></i>
</div>
</div> </div>
<div v-else> <div v-else>
{{ row.row.dBbSumFieldName }} {{ row.row.dBbSumFieldName }}
@ -257,7 +353,9 @@
<!-- 摘要--> <!-- 摘要-->
<template #abstractRes="{row}"> <template #abstractRes="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<div class="elDialog" @click="rightAddHandle(row.row,row.row.abstractRes)" style="height: 50px;"> <div class="elDialog" @click="rightAddHandle(row.row,row.row.abstractRes,'abstractRes')"
style="height: 50px;"
>
<p :style="{ color: row.row.abstractRes ? '#000' : '#c0c4cc' }" class="showText" <p :style="{ color: row.row.abstractRes ? '#000' : '#c0c4cc' }" class="showText"
>{{ >{{
row.row.abstractRes ? row.row.abstractRes : row.row.abstractRes ? row.row.abstractRes :
@ -275,21 +373,33 @@
<!-- 现金项目--> <!-- 现金项目-->
<template #pkCashflow="{row}"> <template #pkCashflow="{row}">
<div v-if="editFlag"> <div v-if="editFlag">
<el-select <!-- <el-select-->
class="w-100" <!-- class="w-100"-->
v-model="row.row.pkCashflow" <!-- v-model="row.row.pkCashflow"-->
filterable <!-- filterable-->
:clearable="true" <!-- :clearable="true"-->
placeholder="请选择" <!-- 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;"
> >
<el-option <p :style="{ color: row.row.pkCashflow ? '#000' : '#c0c4cc' }" class="showText"
v-for="(el, index) in queryCashOptions" >{{
:key="el.value" row.row.pkCashflow ? row.row.pkCashflow :
:label="el.label" '请点击选择'
:value="el.value" }}
> </p>
</el-option> <i class="el-icon-more "
</el-select> ></i>
</div>
</div> </div>
<div v-else> <div v-else>
{{ row.row.pkCashflow }} {{ row.row.pkCashflow }}
@ -511,7 +621,7 @@
:spanWidth="'70px'" :spanWidth="'70px'"
justifyContent="flex-end" justifyContent="flex-end"
@onSelect="fixedValueOnSelect" @onSelect="fixedValueOnSelect"
@elDialogClick="fixedValuelDialogClick(false)" @elDialogClick="ixedValueFormelDialogClick"
@cascaderChange="cascaderChange" @cascaderChange="cascaderChange"
> >
</base-form> </base-form>
@ -561,6 +671,24 @@
</div> </div>
</base-dialog> </base-dialog>
<!-- 固定值弹窗-->
<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>
</div> </div>
</template> </template>
@ -592,7 +720,7 @@ import {
} from '@/api/apis/operationalModule' } from '@/api/apis/operationalModule'
import { GetLoginUserButtonsAPI } from '@/api/apis/buttonList' import { GetLoginUserButtonsAPI } from '@/api/apis/buttonList'
import { queryModuleIncludeMdmListAPI } from '@/api/apis/relevance' import { queryModuleIncludeMdmListAPI } from '@/api/apis/relevance'
import { queryOrgBookVOAPI } from '@/api/apis/accountingSubject' import { queryDataPagedByMapAPI, queryOrgBookVOAPI } from '@/api/apis/accountingSubject'
import { import {
confTempSaveAPI, confTempSaveAPI,
queryVoucherTypeAPI, tempcheckAbstractAPI, queryVoucherTypeAPI, tempcheckAbstractAPI,
@ -607,6 +735,10 @@ export default {
components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree }, components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree },
data() { data() {
return { return {
addTableColumn2: [],
addTableData2: [],
addTiTle: '',
addDialog: false,
// //
voucherClickId: '', voucherClickId: '',
voucherClickName: '', voucherClickName: '',
@ -652,9 +784,10 @@ export default {
// //
propertyTree: [], propertyTree: [],
clickRow: {}, clickRow: {},
clickRowKey: '',
activeTabs: '元数据属性', activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'], tabItem: ['元数据属性', '固定值'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>='], arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)'],
//text //text
textarea: '', textarea: '',
textareaEn: '', textareaEn: '',
@ -893,7 +1026,7 @@ export default {
{ {
label: '档案值', label: '档案值',
prop: 'recordData', prop: 'recordData',
tag: 'elCascader', tag: 'elDialog',
span: 24, span: 24,
disabled: false, disabled: false,
options: [], options: [],
@ -933,7 +1066,11 @@ export default {
searchObj: {}, searchObj: {},
pageModel: { pageModel: {
page: 1, // page: 1, //
limit: 20 // limit: 20, //
prop7: '',
propValue7: '',
prop8: '',
propValue8: ''
}, },
selected: [], selected: [],
treeSelect: [], treeSelect: [],
@ -1001,7 +1138,7 @@ export default {
} }
], ],
tableData: [], tableData: [],
tableLoading:false, tableLoading: false,
dialogTitle: '新增', dialogTitle: '新增',
examineOperateDialog: false, examineOperateDialog: false,
statusView: false, statusView: false,
@ -1036,6 +1173,72 @@ export default {
} }
}, },
methods: { methods: {
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])
this.textarea += `@@${this.fixedValueClickRow.dbName}:${this.fixedValueClickRow.tablepkname}=${obj[this.fixedValueClickRow.tablepkname]}`
// 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()
},
// //
transitionRowHandle(item) { transitionRowHandle(item) {
let obj = item let obj = item
@ -1312,9 +1515,10 @@ export default {
}, },
//id //id
searchIDHandle(val, options, row = {}) { searchIDHandle(val, options, row = {}) {
console.log(val,options,row,'看看内部') console.log(val, options, row, '看看内部')
let valPath = '' let valPath = ''
let obj = null let obj = null
function getValuePath(el, data, path = []) { function getValuePath(el, data, path = []) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
const item = data[i] const item = data[i]
@ -1334,6 +1538,7 @@ export default {
} }
return null return null
} }
const targetValue = Array.isArray(val) ? val[val.length - 1] : val const targetValue = Array.isArray(val) ? val[val.length - 1] : val
const valuePath = getValuePath(targetValue, options) const valuePath = getValuePath(targetValue, options)
valPath = valuePath ? valuePath : [] valPath = valuePath ? valuePath : []
@ -1468,7 +1673,6 @@ export default {
this.pkglbookOptions.find(item => { this.pkglbookOptions.find(item => {
if (item.value == val) { if (item.value == val) {
this.pkglbookClickObj = item this.pkglbookClickObj = item
console.log(this.pkglbookClickObj, 'pkglbookClickObj')
} }
}) })
this.resetTable() this.resetTable()
@ -1499,7 +1703,6 @@ export default {
}, },
async fixedValuelDialogClick(row = false, index) { async fixedValuelDialogClick(row = false, index) {
this.fixedValueClickRow = row this.fixedValueClickRow = row
console.log(this.fixedValueClickRow, 'this.fixedValueClickRow ')
this.masterDialog = true this.masterDialog = true
this.openLoading() this.openLoading()
const res = await queryBdinfoListAPI({}) const res = await queryBdinfoListAPI({})
@ -1548,12 +1751,21 @@ export default {
this.$set(this.fixedValueClickRow, 'mdmName', row.mdmName) this.$set(this.fixedValueClickRow, 'mdmName', row.mdmName)
} else { } else {
this.fixedValueClickRow = row
const res = await queryMdmAndFiledssByMdmIdAPI({ const res = await queryMdmAndFiledssByMdmIdAPI({
mdmId: row.mdmId mdmId: row.mdmId
}) })
const res2 = await queryBdinfoListAPI({
pkBdinfo: row.pkBdinfo
})
res.attribute.forEach(item => { res.attribute.forEach(item => {
item.chName = item.remark item.chName = item.remark
}) })
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)
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'factorName', row.bdname) this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'factorName', row.bdname)
this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', '') this.$set(this.$refs.fixedValueFormRefsName.ruleForm, 'recordData', '')
this.fixedValueForm[0].elCol[1].options = res.attribute this.fixedValueForm[0].elCol[1].options = res.attribute
@ -1588,15 +1800,22 @@ export default {
}) })
}, },
// //
async rightAddHandle(row = false, str = '') { async rightAddHandle(row = false, str = '', key) {
this.verifyFlag = false this.verifyFlag = false
this.passwordDialogShow = true this.passwordDialogShow = true
this.textarea = str this.fixedValueClickRow = {}
if (str || str === 0) {
this.textarea = str
} else {
this.textarea = ''
}
this.textareaEn = '' this.textareaEn = ''
this.propertyTree = [] this.propertyTree = []
this.activeTabs = '元数据属性' this.activeTabs = '元数据属性'
if (row) { if (row) {
this.clickRow = row this.clickRow = row
this.clickRowKey = key
} else { } else {
this.clickRow = false this.clickRow = false
} }
@ -1620,7 +1839,7 @@ export default {
return return
} }
if (this.clickRow) { if (this.clickRow) {
this.$set(this.clickRow, 'abstractRes', this.textarea) this.$set(this.clickRow, this.clickRowKey, this.textarea)
this.passwordDialogShow = false this.passwordDialogShow = false
} else { } else {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'abstractRes', this.textarea) this.$set(this.$refs.basicFormRefsName.ruleForm, 'abstractRes', this.textarea)
@ -1771,9 +1990,9 @@ export default {
} }
} }
val.assistEntityList.forEach(item => { val.assistEntityList.forEach(item => {
console.log(item.fieldId,'item.fieldId') console.log(item.fieldId, 'item.fieldId')
item.fieldArr = item.fieldId ? this.searchIDHandle(item.fieldId, this.propertyTree, row) : [] item.fieldArr = item.fieldId ? this.searchIDHandle(item.fieldId, this.propertyTree, row) : []
console.log(item.fieldArr,'?fieldArr',item,this.propertyTree) console.log(item.fieldArr, '?fieldArr', item, this.propertyTree)
}) })
this.assistTableData = val.assistEntityList ? val.assistEntityList : [] this.assistTableData = val.assistEntityList ? val.assistEntityList : []

View File

@ -724,11 +724,14 @@ export default {
if (row.prop === 'sourceIdsArr') { if (row.prop === 'sourceIdsArr') {
let sourceIds = [] let sourceIds = []
let sourceNames = [] let sourceNames = []
options.forEach(el => { val.forEach(item=>{
if (val.includes(el.value)) { options.forEach(el => {
sourceIds.push(el.value) if (item === el.value) {
sourceNames.push(el.label) sourceIds.push(el.value)
} sourceNames.push(el.label)
}
})
}) })
this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceIds', sourceIds.join(',')) this.$set(this.$refs.basicFormRefsName.ruleForm, 'sourceIds', sourceIds.join(','))

View File

@ -766,7 +766,6 @@ export default {
}, },
// //
async radioChange(row) { async radioChange(row) {
console.log(123, '123123')
this.selected = [] this.selected = []
this.selected.push(row) this.selected.push(row)
this.masterTableData2 = row.contrastBEntityList this.masterTableData2 = row.contrastBEntityList
@ -777,7 +776,6 @@ export default {
} }
] ]
console.log(row.sourceIds)
for (let i = 0; i < row.factorids.split(',').length; i++) { for (let i = 0; i < row.factorids.split(',').length; i++) {
let item = row.factornames.split(',')[i] let item = row.factornames.split(',')[i]
let id = row.factorids.split(',')[i] let id = row.factorids.split(',')[i]

View File

@ -19,14 +19,14 @@
<div class="bigTitle" style="margin: 10px 0">数据表</div> <div class="bigTitle" style="margin: 10px 0">数据表</div>
<div class="table"> <div class="table">
<BaseTable <BaseTable
ref="mainTable" ref="mainTable"
:tableData="mainTableData" :tableData="mainTableData"
:tabLoading="mainTabLoading" :tabLoading="mainTabLoading"
:tableColumn="mainTableColumn" :tableColumn="mainTableColumn"
:border="false" :border="false"
tableHeight="calc(100vh - 280px)" tableHeight="calc(100vh - 280px)"
:highlightCurrent="true" :highlightCurrent="true"
@radioChange="mainOnClick" @radioChange="mainOnClick"
> >
<template #dbType="{row}"> <template #dbType="{row}">
{{ row.dbType === '1' ? '主表' : '子表' }} {{ row.dbType === '1' ? '主表' : '子表' }}
@ -44,9 +44,9 @@
</BaseTable> </BaseTable>
<div class="mainAddRow"> <div class="mainAddRow">
<el-link <el-link
type="primary" type="primary"
@click="addMainAddRow" @click="addMainAddRow"
:underline="false" :underline="false"
>+ 数据表添加 >+ 数据表添加
</el-link </el-link
> >
@ -58,15 +58,15 @@
<div class="bigTitle">表字段</div> <div class="bigTitle">表字段</div>
<div class="table"> <div class="table">
<BaseTable <BaseTable
ref="activedTable" ref="activedTable"
:tableData="activedTableData" :tableData="activedTableData"
:tabLoading="activedTabLoading" :tabLoading="activedTabLoading"
:tableColumn="activedTableColumn" :tableColumn="activedTableColumn"
:border="false" :border="false"
tableHeight="calc(100vh - 200px)" tableHeight="calc(100vh - 200px)"
:highlightCurrent="true" :highlightCurrent="true"
@radioChange="activedOnClick" @radioChange="activedOnClick"
@onFunc="activedOnFunc" @onFunc="activedOnFunc"
> >
<template #filedType="{row}"> <template #filedType="{row}">
{{ dataTypeDist[row.filedType] }} {{ dataTypeDist[row.filedType] }}
@ -84,10 +84,10 @@
</BaseTable> </BaseTable>
<div class="mainAddRow" v-if="mainTempClick.id"> <div class="mainAddRow" v-if="mainTempClick.id">
<el-link <el-link
v-if="mainTempClick.id" v-if="mainTempClick.id"
type="primary" type="primary"
@click="activedAddRow" @click="activedAddRow"
:underline="false" :underline="false"
>+ 表字段添加 >+ 表字段添加
</el-link </el-link
> >
@ -96,14 +96,14 @@
</div> </div>
<!-- 单据规则--> <!-- 单据规则-->
<base-right-dialog <base-right-dialog
ref="baseRightDialog" ref="baseRightDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="ruleAddDialogShow" :dialogVisible.sync="ruleAddDialogShow"
title="单据规则" title="单据规则"
@handleClose="ruleAddDialogShow=false" @handleClose="ruleAddDialogShow=false"
:submitShow="true" :submitShow="true"
:size="'50%'" :size="'50%'"
@handleConfirmClick="ruleAddSaveHanlde" @handleConfirmClick="ruleAddSaveHanlde"
> >
<div class="receiptsTable"> <div class="receiptsTable">
<ruleAddTable ref="ruleAddTable"></ruleAddTable> <ruleAddTable ref="ruleAddTable"></ruleAddTable>
@ -111,14 +111,14 @@
</base-right-dialog> </base-right-dialog>
<!-- 数据表 --> <!-- 数据表 -->
<base-right-dialog <base-right-dialog
ref="mainTableAddtDialog" ref="mainTableAddtDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="mainTableDialogShow" :dialogVisible.sync="mainTableDialogShow"
title="数据表" title="数据表"
@handleClose="mainTableDialogShow=false" @handleClose="mainTableDialogShow=false"
:submitShow="true" :submitShow="true"
:size="'30%'" :size="'30%'"
@handleConfirmClick="mainTableSaveHandle" @handleConfirmClick="mainTableSaveHandle"
> >
<div class="mainTable"> <div class="mainTable">
<mainTable ref="mainTable"></mainTable> <mainTable ref="mainTable"></mainTable>
@ -126,16 +126,16 @@
</base-right-dialog> </base-right-dialog>
<!-- 表字段--> <!-- 表字段-->
<base-right-dialog <base-right-dialog
ref="sonTableAddtDialog" ref="sonTableAddtDialog"
:footerShow="true" :footerShow="true"
:dialogVisible.sync="sonTableDialogShow" :dialogVisible.sync="sonTableDialogShow"
title="表字段" title="表字段"
@handleClose="sonTableDialogShow=false" @handleClose="sonTableDialogShow=false"
:submitShow="true" :submitShow="true"
:size="'40%'" :size="'40%'"
@handleConfirmClick="sonTableSaveHandle" @handleConfirmClick="sonTableSaveHandle"
> >
<div class="mainTable"> <div class="mainTable" v-if="sonTableDialogShow">
<sonTable ref="sonTable" :activedTableData="activedTableData" :mainTempClick="mainTempClick" <sonTable ref="sonTable" :activedTableData="activedTableData" :mainTempClick="mainTempClick"
@sonSaveHandle="sonSaveHandle" @sonSaveHandle="sonSaveHandle"
></sonTable> ></sonTable>
@ -252,21 +252,21 @@ export default {
console.log(row, 'row') console.log(row, 'row')
let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '是否确定删除?' let msg = row.dbType == 1 ? '删除主表将会导致所有相关子表一并删除,是否确认继续删除操作?' : '是否确定删除?'
this.$confirm(msg) this.$confirm(msg)
.then(async(_) => { .then(async(_) => {
this.openLoading('submit') this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', { const res = await authApi('mdmModuleService', '', 'deleteMdmDb', '', {
mdmId: this.$route.query.id, mdmId: this.$route.query.id,
...row ...row
})
this.$vmNews('删除成功!', 'success')
if (this.mainTempClick.id === row.id || row.dbType == 1) {
this.activedTableData = []
this.mainTempClick = {}
}
this.getMainTableHandle()
})
.catch((_) => {
}) })
this.$vmNews('删除成功!', 'success')
if (this.mainTempClick.id === row.id || row.dbType == 1) {
this.activedTableData = []
this.mainTempClick = {}
}
this.getMainTableHandle()
})
.catch((_) => {
})
}, },
// //
addMainAddRow() { addMainAddRow() {
@ -286,12 +286,25 @@ export default {
// //
mainTableEditHandle(row) { mainTableEditHandle(row) {
this.mainTableDialogShow = true this.mainTableDialogShow = true
this.$nextTick(() => { this.$nextTick(async() => {
// //
this.$refs.mainTable.$refs.mainOptionForm.resetFields() this.$refs.mainTable.$refs.mainOptionForm.resetFields()
this.$refs.mainTable.mainOptionForm = JSON.parse(JSON.stringify(row)) let tempRow = JSON.parse(JSON.stringify(row))
if (tempRow.mergeRules) {
tempRow.mergeRules = tempRow.mergeRules.split(',')
}
this.$refs.mainTable.mainOptionForm = tempRow
// //
this.$refs.mainTable.mainOptionRow[0].elCol.disabled = true this.$refs.mainTable.mainOptionRow[0].elCol.disabled = true
const res = await authApi('mdmModuleService', '', 'queryMdmDbField', '', {
mdmId: this.$route.query.id,
dbId: row.id
})
res.attribute.forEach(item => {
item.label = item.chName
})
this.$refs.mainTable.mainOptionRow[2].elCol[0].options = res.attribute
}) })
}, },
// //
@ -300,22 +313,22 @@ export default {
// //
activedOnFunc(row) { activedOnFunc(row) {
this.$confirm('是否确定删除?') this.$confirm('是否确定删除?')
.then(async(_) => { .then(async(_) => {
this.openLoading('submit') this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', { const res = await authApi('mdmModuleService', '', 'deleteMdmDbField', '', {
id: row.id, id: row.id,
mdmId: this.$route.query.id, mdmId: this.$route.query.id,
dbId: this.mainTempClick.id, dbId: this.mainTempClick.id,
dbName: this.mainTempClick.dbName, dbName: this.mainTempClick.dbName,
enName: row.enName, enName: row.enName,
filedType: row.filedType filedType: row.filedType
})
this.$vmNews('删除成功', 'success')
this.mainOnClick(this.mainTempClick)
this.activedTableData.splice(row.index, 1)
})
.catch((_) => {
}) })
this.$vmNews('删除成功', 'success')
this.mainOnClick(this.mainTempClick)
this.activedTableData.splice(row.index, 1)
})
.catch((_) => {
})
}, },
// //
sonTableEditHandle(row) { sonTableEditHandle(row) {
@ -435,7 +448,8 @@ export default {
this.openLoading('submit') this.openLoading('submit')
const res = await authApi('mdmModuleService', '', 'updateMdmDb', '', { const res = await authApi('mdmModuleService', '', 'updateMdmDb', '', {
mdmId: this.$route.query.id, mdmId: this.$route.query.id,
...form ...form,
mergeRules: form.mergeRules ? form.mergeRules.join(',') : ''
}) })
if (res.status == 200) { if (res.status == 200) {
this.$vmNews('保存成功', 'success') this.$vmNews('保存成功', 'success')
@ -655,10 +669,12 @@ export default {
} }
} }
} }
::v-deep .el-table{
::v-deep .el-table {
max-height: calc(100vh - 230px) !important; max-height: calc(100vh - 230px) !important;
} }
::v-deep .el-table__body-wrapper{
::v-deep .el-table__body-wrapper {
max-height: calc(100vh - 230px) !important; max-height: calc(100vh - 230px) !important;
} }
</style> </style>

View File

@ -52,7 +52,23 @@ export default {
fontSize: 16 fontSize: 16
} }
] ]
} },
{
elCol: [
{
type: 'select',
title: '合并规则',
id: 'mergeRules',
row: 24,
disabled: false,
required: false,
fontSize: 16,
multiple:true,
options:[],
}
]
},
], ],
mainOptionForm: {}, mainOptionForm: {},
rules: { rules: {

View File

@ -396,6 +396,25 @@ export default {
} }
] ]
}, },
{
elCol: [
{
type: 'onecheck',
title: '系统数据日期',
id: 'isSysDate',
row: 24,
disabled: false,
required: false,
fontSize: 16,
options: [
{
label: '是',
id: 'Y'
},
]
}
]
},
], ],
optionRuleForm: {},//options optionRuleForm: {},//options
//type //type
@ -826,6 +845,7 @@ export default {
this.$set(params, 'filedLength', this.optionRuleForm.filedLength) this.$set(params, 'filedLength', this.optionRuleForm.filedLength)
this.$set(params, 'isSysPk', this.optionRuleForm.isSysPk) this.$set(params, 'isSysPk', this.optionRuleForm.isSysPk)
this.$set(params, 'isSysCode', this.optionRuleForm.isSysCode) this.$set(params, 'isSysCode', this.optionRuleForm.isSysCode)
this.$set(params, 'isSysDate', this.optionRuleForm.isSysDate)
this.$set(params, 'isSysName', this.optionRuleForm.isSysName) this.$set(params, 'isSysName', this.optionRuleForm.isSysName)
this.optionFormRow.forEach(item => { this.optionFormRow.forEach(item => {
if (tempDist[item.elCol[0].id]) { if (tempDist[item.elCol[0].id]) {

View File

@ -109,12 +109,118 @@
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="billDialog"> <div class="rightDialogClass_main" style="background-color: #fff;" v-if="billDialog">
<div class="showList" style="height: 60vh;overflow: auto"> <div class="showList" style="height: 60vh;overflow: auto">
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false" <base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
:expandAll="false" :menuData="billTableData" @handleNodeClick="billTreeClick" :treeProps="billTreeProps" :expandAll="false" :menuData="billTableData" @handleNodeClick="billTreeClick"
:treeProps="billTreeProps"
></base-tree> ></base-tree>
</div> </div>
</div> </div>
</base-dialog> </base-dialog>
<!-- 公式编辑器-->
<base-dialog
:dialogVisible.sync="formulaDialogShow"
:closeModal="false"
:footerShow="true"
title="公式编辑器"
width="700px"
top="20vh"
@handleConfirmClick="formulaDialogChangHandle"
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="formulaDialogShow">
<div class="addDialog2">
<div class="left">
<el-input
type="textarea"
:rows="23"
placeholder="请输入内容"
resize="none"
v-model="textarea"
>
</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
ref="fixedValueFormRefsName"
:formRow="fixedValueForm"
:isFunBtn="false"
:spanWidth="'70px'"
justifyContent="flex-end"
@elDialogClick="ixedValueFormelDialogClick"
>
</base-form>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</base-dialog>
<!-- 固定值弹窗-->
<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>
<!-- 选择映射档案-->
<base-dialog
:dialogVisible.sync="masterDialog2"
:closeModal="false"
:footerShow="true"
title="选择映射档案"
width="80%"
top="10vh"
@handleConfirmClick="masterPickDialog2"
>
<div class="rightDialogClass_main" style="background-color: #fff;" v-if="masterDialog2">
<baseChoice ref="baseChoice" @getTableList="getTableList" placeholder="基础数据名称"
:tableData="masterTableData2" :showSearch="true" :tableColumn="masterTableColumn2" :pageShow="false"
></baseChoice>
</div>
</base-dialog>
</div> </div>
</template> </template>
@ -138,21 +244,28 @@ import {
influenceFactorCorrelationsaveListAPI, influenceFactorCorrelationsaveListAPI,
influenceFactorCorrelationupdateListAPI, influenceFactorCorrelationupdateListAPI,
influenceFactorqueryAllAPI, influenceFactorqueryAllAPI,
queryAllAPI, queryAllAPI, queryBdinfoListAPI,
queryByIdAPI, queryByIdAPI,
queryByMdmIdAPI, queryByMdmIdAPI,
queryMdmAndFiledsByMdmIdAPI, queryMdmAndFiledsByMdmIdAPI, queryMdmAndFiledssByMdmIdAPI,
queryMdmsByModuleIdAPI queryMdmsByModuleIdAPI
} from '@/api/apis/operationalModule' } from '@/api/apis/operationalModule'
import { GetLoginUserButtonsAPI } from '@/api/apis/buttonList' import { GetLoginUserButtonsAPI } from '@/api/apis/buttonList'
import { queryModuleIncludeMdmListAPI } from '@/api/apis/relevance' import { queryModuleIncludeMdmListAPI } from '@/api/apis/relevance'
import { queryDataPagedByMapAPI } from '@/api/apis/accountingSubject'
import { tempcheckAbstractAPI } from '@/api/apis/ItemEntryTemplate'
export default { export default {
name: 'recordContrast', name: 'recordContrast',
components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree }, components: { baseDialog, baseChoice, basePage, baseTable, baseRightDialog, baseForm, baseTree },
data() { data() {
return { return {
billTypeClickCode:'', treePropsproperty: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
},
billTypeClickCode: '',
masterTableData: [], masterTableData: [],
masterTableColumn: [ masterTableColumn: [
{ {
@ -249,7 +362,11 @@ export default {
searchObj: {}, searchObj: {},
pageModel: { pageModel: {
page: 1, // page: 1, //
limit: 20 // limit: 20, //
prop7: '',
propValue7: '',
prop8: '',
propValue8: ''
}, },
selected: [], selected: [],
@ -297,11 +414,208 @@ export default {
billTreeProps: { billTreeProps: {
children: 'sublistMdmModuleDbFileds', children: 'sublistMdmModuleDbFileds',
label: 'name' label: 'name'
} },
formulaDialogShow: false,
propertyTree: [],
clickRow: {},
clickRowKey: '',
activeTabs: '元数据属性',
tabItem: ['元数据属性', '固定值'],
arithmeticArr: ['+', '-', '*', '/', '->', '==', '(', ')', '<', '>', '<=', '>=', 'substr(,,)'],
fixedValueForm: [
{
elCol: [
{
label: '参照',
prop: 'factorName',
tag: 'elDialog',
span: 24,
disabled: false,
options: []
},
{
label: '档案值',
prop: 'recordData',
tag: 'elDialog',
span: 24,
disabled: false,
options: [],
optionValue: 'id',
optionLabel: 'remark',
props: {
children: 'sublistMdmModuleDbFileds',
label: 'chName',
value: 'id'
}
}
]
}
],
addTableColumn2: [],
addTableData2: [],
addTiTle: '',
addDialog: false,
fixedValueClickRow: {},
textarea: '',
verifyFlag: false,
masterTableData2: [],
masterDialog2: false,
masterTableColumn2: [
{
label: '基础数据编码',
prop: 'bdcode'
},
{
label: '基础数据名称',
prop: 'bdname'
}
]
} }
}, },
methods: { methods: {
async masterPickDialog2() {
if (!this.$refs.baseChoice.optionData.bdname) {
this.$vmNews('请选择映射档案')
return
}
let row = this.$refs.baseChoice.optionData
if (false) {
this.$set(this.fixedValueClickRow, 'mdmId', row.mdmId)
this.$set(this.fixedValueClickRow, 'mdmCode', row.mdmCode)
this.$set(this.fixedValueClickRow, 'mdmName', row.mdmName)
} else {
this.fixedValueClickRow = row
const res = await queryMdmAndFiledssByMdmIdAPI({
mdmId: row.mdmId
})
const res2 = await queryBdinfoListAPI({
pkBdinfo: row.pkBdinfo
})
res.attribute.forEach(item => {
item.chName = item.remark
})
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)
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.masterDialog2 = false
},
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.masterTableData2 = res.attribute
this.$nextTick(() => {
this.$refs.baseChoice.optionData = ''
this.$refs.baseChoice.$refs.customtable.clearRadioIndex()
})
},
async ixedValueFormelDialogClick(row) {
if (row.label === '参照') {
this.masterDialog2 = true
this.openLoading()
const res = await queryBdinfoListAPI({})
this.masterTableData2 = res.attribute
} 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) {
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])
this.textarea += `@@${this.fixedValueClickRow.dbName}:${this.fixedValueClickRow.tablepkname}=${obj[this.fixedValueClickRow.tablepkname]}`
// 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
},
formulaDialogChangHandle() {
if (!this.verifyFlag) {
this.$vmNews('请通过验证')
return
}
if (!this.textarea) {
this.$vmNews('请输入公式')
return
}
this.$set(this.$refs.basicFormRefsName.ruleForm, 'mappingFieldName', this.textarea)
this.formulaDialogShow = false
},
async getAddTableData() {
const res = await queryDataPagedByMapAPI({
...this.pageModel,
pageNum: this.pageModel.page,
pageSize: this.pageModel.limit,
tablename: this.fixedValueClickRow.tablename
})
this.$refs.baseChoice2.pageModel.total = res.attribute.total
this.addTableData2 = res.attribute.list
},
addonQuery(res, pageModel) {
this.pageModel = pageModel
this.getAddTableData()
},
switchTabs(item) {
if (item === this.activeTabs) return
this.activeTabs = item
},
clickBillTree(row, item) { clickBillTree(row, item) {
console.log(item, '??') console.log(item, '??')
this.billTreeActive = row this.billTreeActive = row
@ -328,6 +642,23 @@ export default {
this.$set(this.$refs.basicFormRefsName.ruleForm, 'factorCode', row.factorCode) this.$set(this.$refs.basicFormRefsName.ruleForm, 'factorCode', row.factorCode)
this.masterDialog = false this.masterDialog = false
}, },
//
async openformulaHandle(str = '') {
this.verifyFlag = false
this.formulaDialogShow = true
this.fixedValueClickRow = {}
this.textarea = this.$refs.basicFormRefsName.ruleForm.mappingFieldName ? this.$refs.basicFormRefsName.ruleForm.mappingFieldName : ''
this.propertyTree = []
this.activeTabs = '元数据属性'
const res = await queryMdmAndFiledssByMdmIdAPI({
mdmId: this.billTypeClickID
})
res.attribute.forEach(item => {
item.chName = item.remark
})
this.propertyTree = res.attribute
},
async elDialogClick(row, index) { async elDialogClick(row, index) {
if (row.label === '影响因素') { if (row.label === '影响因素') {
this.masterDialog = true this.masterDialog = true
@ -336,6 +667,8 @@ export default {
}) })
this.masterTableData = res.attribute this.masterTableData = res.attribute
} else { } else {
this.openformulaHandle()
return
this.billDialog = true this.billDialog = true
const res = await queryMdmAndFiledsByMdmIdAPI({ const res = await queryMdmAndFiledsByMdmIdAPI({
mdmId: this.billTypeClickID mdmId: this.billTypeClickID
@ -679,7 +1012,7 @@ export default {
}, },
billTreeClick(item, row) { billTreeClick(item, row) {
console.log(row, '?',item) console.log(row, '?', item)
if (item.fatherRow) { if (item.fatherRow) {
return return
} }
@ -689,6 +1022,18 @@ export default {
// //
clickSave(item) { clickSave(item) {
this[item.btnFunction]() this[item.btnFunction]()
},
async verifyFlagHandle() {
const res = await tempcheckAbstractAPI({
abstractRes: this.textarea
})
if (res.flag === true) {
this.$vmNews('验证通过', 'success')
this.verifyFlag = true
}
},
arithmeticItemPush(item) {
this.textarea += item
} }
}, },
mounted() { mounted() {
@ -696,12 +1041,50 @@ export default {
this.getLeftList() this.getLeftList()
// this.getTableData() // this.getTableData()
// this.getSelect() // this.getSelect()
},
watch: {
textarea() {
this.verifyFlag = false
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.addDialog2 {
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;
}
}
}
.addDialog { .addDialog {
display: flex; display: flex;
align-items: center; align-items: center;
@ -829,4 +1212,48 @@ export default {
} }
} }
} }
.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;
}
}
.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;
}
}
</style> </style>