xy 11 months ago
parent 2c9d1df0d9
commit c74d5cf251

@ -249,7 +249,7 @@ export default {
type: 'selection',
width: 54,
reserveSelection: true,
selectable: row => row.away_flow_id && row.away_status === 3 && !row.expense_flow_id,
selectable: row => row.away_status === 3 && (!row.expense_status || row.expense_status === 1) && (this.$moment().diff(this.$moment(row.end_date),"days") <= 30 || row.can_expenses),
fixed: "left"
},
{
@ -506,6 +506,10 @@ export default {
);
} else {
let rows = this.$refs['xyTable'].getSelection()
if (!rows || (rows instanceof Array && rows.length <= 0)) {
this.$message.warning('请选择出差')
return
}
const baseInfo = {
"flow_title": rows.map(row => row.title).toString() ,
//"totalAmt": row.expense,

@ -246,6 +246,10 @@ export default {
value: "出差报销支出",
id: 2,
},
{
value: "其他",
id: 3
}
],
},
other_types: {

@ -84,6 +84,10 @@
value: '出差报销支出',
id: 2,
},
{
value: '其他',
id: 3,
},
]"
:key="item.id"
:value="item.id"

@ -1,19 +1,23 @@
<template>
<div class="container">
<div id="online-preview-container" class="container">
<template v-if="type === 'docx'">
<VueOfficeDocx :src="url" style="height: 100vh;"></VueOfficeDocx>
<VueOfficeDocx :src="url" style="height: 100vh;" />
</template>
<template v-if="type === 'xlsx'">
<VueOfficeExcel :src="url" style="height: 100vh;"></VueOfficeExcel>
<template v-else-if="type === 'xlsx' || type === 'xls'">
<VueOfficeExcel :src="url" style="height: 100vh;" />
</template>
<template v-if="type === 'pdf'">
<VueOfficePdf :src="url" style="height: 100vh;"></VueOfficePdf>
<template v-else-if="type === 'pdf'">
<iframe :src="url" frameborder="0" style="width: 100%;height: 100%;" />
<!-- <VueOfficePdf :src="url" style="height: 100vh;" />-->
</template>
<!-- <template v-if="type === 'doc'">-->
<!-- <div ref="docPreview" style="height: 100vh;"></div>-->
<!-- </template>-->
<template v-if="type === 'png' || type === 'jpg' || type === 'jpeg' || type === 'gif'">
<img :src="url" style="width: 100vw;height: 100vh;object-fit: contain" alt="">
<template v-else-if="['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'].indexOf(type) !== -1">
<el-image ref="elImage" fit="contain" :preview-src-list="[url]" :src="url" style="width: 100vw;height: 100vh;" alt="" @load="loadImg" />
</template>
<template v-else>
<div>
<h4>文件类型暂不支持在线预览请下载查看</h4>
<el-link target="_blank" type="primary" :href="url">点击下载</el-link>
</div>
</template>
</div>
</template>
@ -44,6 +48,14 @@ export default {
}
},
methods: {
loadImg() {
this.$refs['elImage']?.$el?.children[0].click()
this.$nextTick(() => {
document.querySelector('.el-image-viewer__close').style.display = 'none'
document.querySelector('.el-image__inner').style.display = 'none'
document.querySelector('.el-image-viewer__mask').style.pointerEvents = 'none'
})
},
async resolveUrl(url) {
if(url) {
let originalUrl

@ -29,7 +29,7 @@
<div class="progress-card-item__label">已支付金额</div>
</div>
<div class="progress-card-item">
<MyProgress width="145px" height="145px" title="执行率" :chart-data="[{value:statistic.progress.money_total_2 ? statistic.progress.money_total_2 : statistic.progress.money_total_1,name:''},{value:statistic.progress.use_money_total,name:''}]" ></MyProgress>
<MyProgress width="145px" height="145px" title="执行率" :chart-data="pieData" ></MyProgress>
<!-- <el-progress :width="145" type="circle" stroke-width="20" :format="per => `${per}%\n执行率`" :percentage="40"></el-progress>-->
<!-- <div class="progress-card-item__num">-->
<!-- {{toper(statistic.progress.money_total_1 || 0,statistic.progress.money_total_2 || 0,statistic.progress.use_money_total || 0)}}%-->
@ -95,7 +95,29 @@ export default {
this.$emit('send-data',res)
},
},
computed: {},
computed: {
pieData() {
let m2 = this.statistic.progress.money_total_2;
let m1 = this.statistic.progress.money_total_1;
let user_m = this.statistic.progress.use_money_total;
let m3=m1-user_m
if (m2 != 0) {
m3=m2-user_m;
} else if (m1 != 0) {
m3=m1-user_m;
}
return [
{
value: user_m,
name:'预算已执行金额'
},
{
value: m3,
name:'预算未执行金额'
}
]
}
},
created() {
this.getStatistic();
}

Loading…
Cancel
Save