Вывод плана по суткам

This commit is contained in:
Brusnitsyn
2026-07-06 14:23:15 +00:00
parent 040c83c4d1
commit d1e087e4a8
3 changed files with 8 additions and 20 deletions

View File

@@ -2,8 +2,6 @@
import {NFlex, NSpace, NTag, NTooltip} from 'naive-ui'
import {percentType} from "../../../Utils/numbers.js";
import {computed} from "vue";
import {format, toDate} from "date-fns";
import {ru} from "date-fns/locale";
const props = defineProps({
isTotalRow: {
@@ -26,18 +24,9 @@ const props = defineProps({
total_debt: 0,
year_plan: 0,
})
},
endDate: {
type: [Number, String],
default: null
}
})
const formatedMonth = computed(() => {
const date = toDate(props.endDate)
return date.toLocaleString('ru', { month: 'long' })
})
const typePlan = computed(() => {
if (props.plan.debt_from_year > 20) return 'error'
if (props.plan.debt_from_year > 10) return 'warning'
@@ -89,7 +78,7 @@ const periodPercent = computed(() => {
</template>
<NSpace vertical>
<NFlex align="center" justify="start" :wrap="false" size="small">
<NTag type="info">План на {{formatedMonth}}: {{ plan.month_plan }} / {{ plan.current_mouth_dept }}</NTag>
<NTag type="info">План / Выбывшие: {{ plan.period_plan }} / {{ value }}</NTag>
</NFlex>
<NTag :type="typePlan">Долг с начала года: {{ plan.debt_from_year }}</NTag>
<!-- Долг с начала года: {{ plan.debt_from_year }}-->

View File

@@ -183,8 +183,7 @@ const columns = ref([
{
isTotalRow: row.isTotalRow,
value: row.outcome,
plan: row.plan,
endDate: props.date[1]
plan: row.plan
}
)
}