import type { BaseTableColumn } from '@core/type/baseTable' import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import CustomTag from '@/components/CustomTag.vue' import { usePrice } from '@core/utils/usePrice' /*import BudgetSelect from '@/components/BudgetSelect.vue' import { useStaticApiListsStore } from '@/store/staticApisStore' import type { FilterSelect } from '@/model/filterSelect' import type { DocItem } from '@/model/docType'*/ //define store //const store = useStaticApiListsStore() //document types /*let docTypes: DocItem[]*/ /*onMounted(async () => { docTypes = await store.readyDocTypeList() }) const filteredDocTypes: FilterSelect = docTypes?.map((x: DocItem) => { return { label: x.title, value: x.id } })*/ export const cols: BaseTableColumn[] = [ { title: 'ردیف', dataIndex: 'id', key: 'id', filterable: false, sortable: false, customRender: (record: any) => { return record.index + 1 } }, { title: 'کد قیمت', dataIndex: 'id', key: 'id', type: 'Number' // className: 'column-money' }, { title: 'کد کاربری', dataIndex: 'user_id', key: 'user_id', type: 'Number' // className: 'column-money' }, { title: 'نام و نام خانوادگی', dataIndex: 'user.name', key: 'user.name', type: 'Text' }, { title: 'قیمت هر گرم طلا برای مشتری (ریال)', dataIndex: 'price', key: 'price', type: 'Text', customRender(data) { return usePrice(data.record.price ?? 0, true, '') } }, /* { title: 'قیمت کل برای مشتری (ریال)', dataIndex: 'price', key: 'price', type: 'Text' },*/ /* { title: 'وضعیت', dataIndex: 'active', key: 'active', customRender: ({ record }) => { return record.active ? (