fix : 修复费用分摊详情渲染数据问题

This commit is contained in:
2024-06-06 01:15:12 +08:00
parent 1c204b39df
commit ec4c61d758
6 changed files with 64 additions and 36 deletions

View File

@@ -15,8 +15,7 @@
</el-form>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="分摊明细" name="first">
<expense-detail :processViewer="shareProcessViewer" :detailList="detailList"
:loading="loading"/>
<expense-detail :showTable="showTable" :detailList="detailList" :loading="loading"/>
</el-tab-pane>
<el-tab-pane label="分摊汇总" name="second">
<!-- <fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">-->
@@ -62,41 +61,43 @@ const detailList = ref([])
const formData = ref({})
const auditOpinion = ref('')
const shareProcessViewer = ref(true)
const showTable = ref(true)
const loading = ref(false)
const activeName = ref('first')
const getDetail = async () => {
const id = route.query.id
loading.value = true
shareProcessViewer.value = true
const {code, data, msg} = await getAllocationDetail(id)
if (code === 1000) {
shareData.value = data
formData.value = data.formData
loading.value = false
} else {
ElNotification({
title: '提示',
message: msg,
type: 'error'
})
loading.value = false
}
}
const getDetailList = async () => {
let params = {
allocationId: route.query.id
}
shareProcessViewer.value = false
const {code, data, msg} = await getAllocationDetailList(params)
if (code === 1000) {
detailList.value = data
shareProcessViewer.value = false
processStore.setDesign(data)
processStore.runningList.value = data.runningList;
processStore.endList.value = data.endList;
processStore.noTakeList.value = data.noTakeList;
processStore.refuseList.value = data.refuseList;
processStore.passList.value = data.passList;
} else {
ElNotification({
title: '提示',
message: msg,
type: 'error'
})
}
}
const getDetailList = async () => {
let params = {
allocationId: route.query.id
}
loading.value = true
showTable.value = false
const {code, data, msg} = await getAllocationDetailList(params)
if (code === 1000) {
detailList.value = data.rows
nextTick(() => {
shareProcessViewer.value = true
showTable.value = true
loading.value = false
})
}else {
ElNotification({
@@ -107,7 +108,7 @@ const getDetailList = async () => {
}
}
getDetail()
// getDetailList()
getDetailList()
</script>
<style scoped lang="scss">
:deep(.el-tabs__nav-scroll) {