fix reports
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import type { BaseTableColumn } from '@core/type/baseTable'
|
||||
import { toJalali, toJalaliNoTime, toTime } from '@core/utils/useDataTime'
|
||||
import CustomTag from '@/components/CustomTag.vue'
|
||||
import { usePrice } from '@core/utils/usePrice'
|
||||
import WithdrawStatus from "@/pages/menuPages/withdraw/components/WithdrawStatus.vue";
|
||||
import { metalLabel } from '@/utils/adminMetalLabels'
|
||||
import {
|
||||
formatWithdrawAmountDisplay,
|
||||
isMoneyWithdraw,
|
||||
withdrawAmountColorClass,
|
||||
withdrawTypeLabel
|
||||
} from '@/pages/menuPages/withdraw/utils/withdrawDisplay'
|
||||
/*import BudgetSelect from '@/components/BudgetSelect.vue'
|
||||
import { useStaticApiListsStore } from '@/store/staticApisStore'
|
||||
import type { FilterSelect } from '@/model/filterSelect'
|
||||
@@ -71,23 +75,43 @@ export function getWithdrawColumns(): BaseTableColumn[] {
|
||||
type: 'Text'
|
||||
},
|
||||
{
|
||||
title: 'مقدار (ریال)',
|
||||
dataIndex: 'cash',
|
||||
key: 'cash',
|
||||
type: 'Number',
|
||||
title: 'نوع',
|
||||
dataIndex: 'asset_type',
|
||||
key: 'asset_type',
|
||||
filterable: false,
|
||||
sortable: false,
|
||||
customRender: ({ record }) => {
|
||||
const label = withdrawTypeLabel(record)
|
||||
if (label === '-') {
|
||||
return <div class="flex justify-center px-6">-</div>
|
||||
}
|
||||
|
||||
return (
|
||||
<div class="flex justify-center">
|
||||
<div class={'font-bold px-6 text-red'}>{usePrice(record.cash ?? 0, true, '')}</div>
|
||||
<CustomTag
|
||||
textColor={isMoneyWithdraw(record) ? '#25855A' : '#ca8a04'}
|
||||
bgColor={isMoneyWithdraw(record) ? '#E3F4E9' : '#fef3c7'}
|
||||
class="font-bold px-6"
|
||||
>
|
||||
{label}
|
||||
</CustomTag>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: metalLabel.goldUnit(),
|
||||
dataIndex: 'gold',
|
||||
key: 'gold',
|
||||
title: 'مقدار',
|
||||
dataIndex: 'amount',
|
||||
key: 'amount',
|
||||
type: 'Number',
|
||||
customRender: ({ record }) => {
|
||||
const colorClass = withdrawAmountColorClass(record)
|
||||
return (
|
||||
<div class="flex justify-center">
|
||||
<div class={`font-bold px-6 ${colorClass}`}>{formatWithdrawAmountDisplay(record)}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'شماره کارت',
|
||||
|
||||
Reference in New Issue
Block a user