| | |
| | | |
| | | import { useRouter } from 'vue-router'; |
| | | |
| | | import { Button } from 'ant-design-vue'; |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | | import { useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { getReceivablePage } from '#/api/crm/receivable'; |
| | | import { getReceivablePage, updateReceivableStatus } from '#/api/crm/receivable'; |
| | | import { useGridColumns } from '#/views/crm/receivable/data'; |
| | | |
| | | import { AUDIT_STATUS } from '../data'; |
| | | |
| | | const { push } = useRouter(); |
| | | |
| | | /** 查看审批 */ |
| | | function handleProcessDetail(row: CrmReceivableApi.Receivable) { |
| | | push({ |
| | | name: 'BpmProcessInstanceDetail', |
| | | query: { id: row.processInstanceId }, |
| | | /** 审核 */ |
| | | async function handleAudit(row: CrmReceivableApi.Receivable) { |
| | | const hideLoading = message.loading({ |
| | | content: '审核中...', |
| | | duration: 0, |
| | | }); |
| | | try { |
| | | await updateReceivableStatus(row.id!, 20); |
| | | message.success('审核成功'); |
| | | gridApi.query(); |
| | | } finally { |
| | | hideLoading(); |
| | | } |
| | | } |
| | | |
| | | /** 打开回款详情 */ |
| | |
| | | push({ name: 'CrmContractDetail', params: { id: row.contractId } }); |
| | | } |
| | | |
| | | const [Grid] = useVbenVxeGrid({ |
| | | const [Grid, gridApi] = useVbenVxeGrid({ |
| | | formOptions: { |
| | | schema: [ |
| | | { |
| | |
| | | </Button> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | | <Button type="link" @click="handleProcessDetail(row)">查看审批</Button> |
| | | <Button |
| | | v-if="row.auditStatus === 10" |
| | | type="link" |
| | | @click="handleAudit(row)" |
| | | > |
| | | 审核 |
| | | </Button> |
| | | </template> |
| | | </Grid> |
| | | </template> |