fix : 修复页面bug
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="分摊汇总" name="first" v-loading="loading">
|
||||
<allocation-summary-detail/>
|
||||
<allocation-summary-detail :allocation-name="formData.shareName" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分摊明细" name="second">
|
||||
<expense-detail/>
|
||||
|
||||
@@ -33,27 +33,20 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {getAllocationSummaryDetails} from "@/api/expense-manage";
|
||||
import {shareExportExcel} from "@/api/expense-manage";
|
||||
|
||||
const tableData = ref([{
|
||||
id: '12987122',
|
||||
name: 'Tom',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10,
|
||||
},
|
||||
{
|
||||
id: '12987123',
|
||||
name: 'Tom',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12,
|
||||
}])
|
||||
const tableData = ref([])
|
||||
const loading = ref(false)
|
||||
const table = ref()
|
||||
const route = useRoute()
|
||||
const props = defineProps({
|
||||
allocationName :{
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const getSummaries = (param) => {
|
||||
const {columns, data} = param
|
||||
const sums = []
|
||||
@@ -71,7 +64,7 @@ const getSummaries = (param) => {
|
||||
return prev
|
||||
}
|
||||
}, 0)}`
|
||||
// sums[index] = toThousands(sums[index])
|
||||
sums[index] = parseFloat(sums[index]).toFixed(2)
|
||||
} else {
|
||||
sums[index] = '-'
|
||||
}
|
||||
@@ -80,12 +73,15 @@ const getSummaries = (param) => {
|
||||
return sums
|
||||
}
|
||||
const exportTable = () => {
|
||||
const $e = table.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目费用分摊表",2)
|
||||
shareExportExcel(route.query.id).then(res => {
|
||||
console.log(res)
|
||||
let fileName = `科技创新项目费用分摊表-${props.allocationName}.zip`
|
||||
const blob = new Blob([res.data])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = fileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="分摊明细" name="first">
|
||||
<ExpenseDetailMoblie/>
|
||||
<el-tab-pane label="分摊汇总" name="first" v-loading="loading">
|
||||
<allocation-summary-detail-moblie :allocation-name="formData.shareName" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分摊汇总" name="second" v-loading="loading">
|
||||
<AllocationSummaryDetailMoblie/>
|
||||
<el-tab-pane label="分摊明细" name="second">
|
||||
<expense-detail-moblie/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-if="shareData.taskId">
|
||||
@@ -52,8 +52,8 @@
|
||||
<process-diagram-viewer v-if="shareProcessViewer&&changeDiagram" id-name="shareProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"
|
||||
v-model:value="auditOpinion"></opinion>
|
||||
<opinion-moblie v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"
|
||||
v-model:value="auditOpinion"></opinion-moblie>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -65,6 +65,7 @@ import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getAllocationDetail} from "@/api/expense-manage";
|
||||
import AllocationSummaryDetailMoblie from './AllocationSummaryDetailMoblie.vue'
|
||||
import ExpenseDetailMoblie from './ExpenseDetailMoblie.vue'
|
||||
import OpinionMoblie from "@/views/project-demand/requirement/moblieDetail/OpinionMoblie.vue";
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
|
||||
Reference in New Issue
Block a user