| | |
| | | import type { VbenFormSchema } from '#/adapter/form'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | |
| | | import { DICT_TYPE } from '..\..\..\..\packages\constants\src'; |
| | | import { getDictOptions } from '..\..\..\..\packages\effects\hooks\src'; |
| | | import { useUserStore } from '..\..\..\..\packages\stores\src'; |
| | | import { DICT_TYPE } from '@vben/constants'; |
| | | import { getDictOptions } from '@vben/hooks'; |
| | | import { useUserStore } from '@vben/stores'; |
| | | import { |
| | | beginOfDay, |
| | | endOfDay, |
| | | erpCalculatePercentage, |
| | | erpNumberFormatter, |
| | | formatDateTime, |
| | | handleTree, |
| | | } from '..\..\..\..\packages\utils\src'; |
| | | } from '@vben/utils'; |
| | | |
| | | import { getSimpleDeptList } from '#/api/system/dept'; |
| | | import { getSimpleUserList } from '#/api/system/user'; |
| | |
| | | component: 'RangePicker', |
| | | componentProps: { |
| | | ...getRangePickerDefaultProps(), |
| | | format: 'YYYY-MM-DD', |
| | | }, |
| | | defaultValue: [ |
| | | formatDateTime(beginOfDay(new Date(Date.now() - 3600 * 1000 * 24 * 7))), |
| | |
| | | field: 'createTime', |
| | | title: '创建时间', |
| | | minWidth: 200, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | { |
| | | field: 'orderDate', |
| | | title: '下单日期', |
| | | minWidth: 200, |
| | | formatter: 'formatDateTime', |
| | | formatter: 'formatDate', |
| | | }, |
| | | ]; |
| | | } |
| | |
| | | field: 'creceivablePrice', |
| | | title: '未回款金额', |
| | | minWidth: 200, |
| | | // 未回款金额 = 合同总金额 - 回款金额。原来这里误用了「回款完成率」的公式,金额列上显示的是百分比。 |
| | | formatter: ({ row }) => { |
| | | return erpCalculatePercentage( |
| | | row.receivablePrice, |
| | | row.contractPrice, |
| | | return erpNumberFormatter( |
| | | (row.contractPrice ?? 0) - (row.receivablePrice ?? 0), |
| | | 2, |
| | | ); |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | field: 'ownerUserName', |
| | | title: '日期', |
| | | title: '员工姓名', |
| | | minWidth: 200, |
| | | }, |
| | | { |