fix : 修改分摊汇总bug
This commit is contained in:
@@ -38,15 +38,7 @@ export const getProjectOption = () => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
export const getAllocationCollect = (allocationId) => {
|
|
||||||
return request({
|
|
||||||
url: '/workflow/mosr/cost/allocation/collect',
|
|
||||||
method: "post",
|
|
||||||
params:{
|
|
||||||
allocationId:allocationId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
export const editAllocation = (data) => {
|
export const editAllocation = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/mosr/cost/allocation/edit',
|
url: '/workflow/mosr/cost/allocation/edit',
|
||||||
|
|||||||
@@ -203,10 +203,15 @@ const getList = async () => {
|
|||||||
localData.loading = true
|
localData.loading = true
|
||||||
try {
|
try {
|
||||||
const {code, data, msg} = await requestList(api, queryParmas)
|
const {code, data, msg} = await requestList(api, queryParmas)
|
||||||
|
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
localData.list = data.rows
|
if(data.rows){
|
||||||
localData.total = data.total
|
localData.list = data.rows
|
||||||
|
}else {
|
||||||
|
localData.list = data
|
||||||
|
}
|
||||||
|
if(data.total){
|
||||||
|
localData.total = data.total
|
||||||
|
}
|
||||||
localData.loading = false
|
localData.loading = false
|
||||||
} else {
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<expense-detail/>
|
<expense-detail/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="分摊汇总" name="second" v-loading="loading">
|
<el-tab-pane label="分摊汇总" name="second" v-loading="loading">
|
||||||
<fvTable v-if="showTable" ref="tableRef" :tableConfig="tableConfig" :data="collectList">
|
<fvTable v-if="showTable" ref="tableRef" :tableConfig="tableConfig">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty description="暂无数据"/>
|
<el-empty description="暂无数据"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -52,7 +52,7 @@ import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
|||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import {getAllocationDetail,getAllocationCollect} from "@/api/expense-manage";
|
import {getAllocationDetail} from "@/api/expense-manage";
|
||||||
|
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -62,7 +62,6 @@ const auditOpinion = ref('')
|
|||||||
const shareProcessViewer = ref(true)
|
const shareProcessViewer = ref(true)
|
||||||
const showTable = ref(true)
|
const showTable = ref(true)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const collectList = ref([])
|
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
@@ -112,7 +111,11 @@ const tableConfig = reactive({
|
|||||||
label: '摘要',
|
label: '摘要',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
api:'/workflow/mosr/cost/allocation/collect',
|
||||||
|
params:{
|
||||||
|
allocationId:route.query.id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const getDetail = async () => {
|
const getDetail = async () => {
|
||||||
const id = route.query.id
|
const id = route.query.id
|
||||||
@@ -139,30 +142,9 @@ const getDetail = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDetailCollect = async () => {
|
|
||||||
loading.value = true
|
|
||||||
showTable.value = false
|
|
||||||
const {code, data, msg} = await getAllocationCollect(route.query.id)
|
|
||||||
if (code === 1000) {
|
|
||||||
collectList.value = data
|
|
||||||
nextTick(() => {
|
|
||||||
loading.value = false
|
|
||||||
showTable.value = true
|
|
||||||
})
|
|
||||||
}else {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const handleClick = (tab) => {
|
const handleClick = (tab) => {
|
||||||
console.log('tab',tab.index)
|
|
||||||
if (tab.index==0) {
|
if (tab.index==0) {
|
||||||
getDetail()
|
getDetail()
|
||||||
}else {
|
|
||||||
getDetailCollect()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getDetail()
|
getDetail()
|
||||||
|
|||||||
Reference in New Issue
Block a user