综合销售表同比字段和数量字段对应回显

This commit is contained in:
mll
2026-04-22 17:53:33 +08:00
parent 95d7b1cc16
commit 803b499c79

View File

@@ -71,8 +71,11 @@
</div> </div>
</template> </template>
<template v-for="prop in Object.keys(textAlignFiels)" :key="prop" #[`${prop}`]="scope"> <template v-for="prop in Object.keys(textAlignFiels)" :key="prop" #[`${prop}`]="scope">
<div v-if="textAlignFiels[prop]&&scope.row[prop]&&scope.row[prop].split(' ').length>1" > <div v-if="textAlignFiels[prop]" >
<span v-html="scope.row[prop].split(' ').map(val=>'<div>'+val+'</div>').join('')"></span> <span>
{{scope.row[prop]}}
<div>{{scope.row[newProps[prop]]}}</div>
</span>
</div> </div>
<div v-else>{{scope.row[prop]}}</div> <div v-else>{{scope.row[prop]}}</div>
</template> </template>
@@ -208,6 +211,15 @@ const props = withDefaults(defineProps<Props>(), {
return {} return {}
} }
}) })
const newProps=ref<any>({
'monthprofit_yoy':'yoyMonthProfit',
'monthsamoney_yoy':'yoyMonthSaMoney',
'monthsaqty_yoy':'yoyMonthSaQty',
'saqty_yoy':'lastYearSaQty',
'samoney_yoy':'lastYearSaMoney',
'profit_yoy':'lastYearProfit'
})
const tableSaleInfo=ref<any>([]) const tableSaleInfo=ref<any>([])
const tableSaleSearch=ref<any>({}) const tableSaleSearch=ref<any>({})
const tableSalePage = ref<any>({ currentPage: 1, pageSize: 20, total: 0 }) const tableSalePage = ref<any>({ currentPage: 1, pageSize: 20, total: 0 })