| | |
| | | () => (Number(application.value?.budgetAmount) || 0) - registeredAmount.value, |
| | | ); |
| | | |
| | | /** 各状态记录数量,用于顶部提示(0 条时不提示) */ |
| | | const statusCount = (status: number) => |
| | | records.value.filter((item) => item.status === status).length; |
| | | |
| | | const [FundFormModal, fundFormModalApi] = useVbenModal({ |
| | | connectedComponent: FundForm, |
| | | destroyOnClose: true, |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <Alert |
| | | v-if="statusCount(FundStatus.APPROVING) > 0" |
| | | type="info" |
| | | show-icon |
| | | :message="`有 ${statusCount(FundStatus.APPROVING)} 条拨付记录正在报销审批中,暂不可修改;财务审批结果将自动回写本记录`" |
| | | /> |
| | | <Alert |
| | | v-if="statusCount(FundStatus.PAID) > 0" |
| | | type="success" |
| | | show-icon |
| | | :message="`有 ${statusCount(FundStatus.PAID)} 条拨付记录财务已通过,拨款完成`" |
| | | /> |
| | | <Alert |
| | | v-if="statusCount(FundStatus.REJECTED) > 0" |
| | | type="error" |
| | | show-icon |
| | | :message="`有 ${statusCount(FundStatus.REJECTED)} 条拨付记录财务已驳回,请修改金额或凭证后点「重新发起报销」`" |
| | | /> |
| | | |
| | | <div v-if="editable"> |
| | | <TableAction |
| | | :actions="[ |
| | |
| | | <Grid> |
| | | <template #hasAttachment="{ row }"> |
| | | <Tag :color="row.hasAttachment ? 'success' : 'warning'"> |
| | | {{ |
| | | row.hasAttachment |
| | | ? '已上传' |
| | | : row.status === FundStatus.PAID |
| | | ? '缺失' |
| | | : '不需要' |
| | | }} |
| | | {{ row.hasAttachment ? '已上传' : '缺失' }} |
| | | </Tag> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | |
| | | onClick: handleEdit.bind(null, row), |
| | | }, |
| | | { |
| | | label: '重新发起报销', |
| | | type: 'link', |
| | | icon: ACTION_ICON.REFRESH, |
| | | auth: ['research:fund:update'], |
| | | ifShow: () => row.status === FundStatus.REJECTED, |
| | | onClick: handleEdit.bind(null, row), |
| | | }, |
| | | { |
| | | label: '删除', |
| | | type: 'link', |
| | | danger: true, |