|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<a-spin :spinning="loadingFlag" tip="加载中...">
|
|
|
|
|
<div class="page-wrapper" :style="{ paddingBottom: pageType == 'AUDIT' ? '80px' : '' }">
|
|
|
|
|
<div class="page-wrapper" :style="{ paddingBottom: auditOptVisible ? '80px' : '' }">
|
|
|
|
|
<div class="top-opt-wrapper">
|
|
|
|
|
<!-- 保存按钮组 -->
|
|
|
|
|
<ActionBar
|
|
|
|
@ -83,7 +83,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
|
|
|
|
<div class="audit-opt-wrapper" v-if="pageType == 'AUDIT'">
|
|
|
|
|
<div class="audit-opt-wrapper" v-if="auditOptVisible">
|
|
|
|
|
<a-button type="danger" @click="toRejectHandle">审核驳回</a-button>
|
|
|
|
|
<a-button type="primary" @click="auditPassHandle">审核通过</a-button>
|
|
|
|
|
</div>
|
|
|
|
@ -98,6 +98,7 @@
|
|
|
|
|
</a-spin>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref, computed } from 'vue'
|
|
|
|
|
import { Divider } from 'ant-design-vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
|
|
|
|
|
import SearchTable from './components/SearchTable.vue'
|
|
|
|
@ -136,14 +137,15 @@
|
|
|
|
|
|
|
|
|
|
const userInfo = computed(() => userStore.getUserInfo)
|
|
|
|
|
|
|
|
|
|
const formValueBind = ref({})
|
|
|
|
|
|
|
|
|
|
const canEditable = computed(() => {
|
|
|
|
|
return ['ADD', 'EDIT'].includes(pageType.value)
|
|
|
|
|
})
|
|
|
|
|
const needDetail = computed(() => {
|
|
|
|
|
return ['VIEW', 'EDIT', 'AUDIT'].includes(pageType.value)
|
|
|
|
|
})
|
|
|
|
|
const auditOptVisible = computed(() => {
|
|
|
|
|
return pageType.value == 'AUDIT' && expenseAccountDetail.value?.reimbursementType == 1
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const expenseAccountDetail = ref<BillDetail | null>(null)
|
|
|
|
|
const billTableData = ref<BillRowMap[]>([])
|
|
|
|
@ -171,7 +173,7 @@
|
|
|
|
|
VIEW: ['print', 'next', 'last'],
|
|
|
|
|
AUDIT: ['print'],
|
|
|
|
|
}
|
|
|
|
|
if (pageType.value === 'VIEW') {
|
|
|
|
|
if (pageType.value === 'VIEW' && expenseAccountDetail.value?.reimbursementType == 1) {
|
|
|
|
|
return ['print', 'withdraw', 'next', 'last']
|
|
|
|
|
}
|
|
|
|
|
return displayMap[pageType.value]
|
|
|
|
@ -231,12 +233,11 @@
|
|
|
|
|
const pageInit = async () => {
|
|
|
|
|
try {
|
|
|
|
|
const userRes = await GetUserInfo({ id: userInfo.value.userId as string })
|
|
|
|
|
formValueBind.value = {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
payeeName: userRes.data.userName,
|
|
|
|
|
reimburser: userRes.data.userName,
|
|
|
|
|
department: userRes.data.deptName,
|
|
|
|
|
}
|
|
|
|
|
setFieldsValue({ ...formValueBind.value })
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -246,7 +247,7 @@
|
|
|
|
|
const res = await ReimbursementGetInfo({
|
|
|
|
|
id: route.query.id as string,
|
|
|
|
|
})
|
|
|
|
|
formValueBind.value = {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
bankName: res.data.bankName,
|
|
|
|
|
payeeName: res.data.payeeName,
|
|
|
|
|
payeeAccountNumber: res.data.payeeAccountNumber,
|
|
|
|
@ -255,8 +256,7 @@
|
|
|
|
|
ledgerAccount: res.data.ledgerAccount,
|
|
|
|
|
voucherNo: res.data.voucherNo,
|
|
|
|
|
reason: res.data.reason,
|
|
|
|
|
}
|
|
|
|
|
setFieldsValue({ ...formValueBind.value })
|
|
|
|
|
})
|
|
|
|
|
expenseAccountDetail.value = res.data
|
|
|
|
|
billTableData.value = res.data?.data || []
|
|
|
|
|
setTableData(billTableData.value)
|
|
|
|
@ -276,11 +276,12 @@
|
|
|
|
|
const getActionOptList = (record): ActionItem[] => {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
icon: h('i', {
|
|
|
|
|
/* icon: h('i', {
|
|
|
|
|
class: 'iconfont icon-xiazai',
|
|
|
|
|
style: { color: '#257afa', fontSize: '14px' },
|
|
|
|
|
}),
|
|
|
|
|
isCustomIcon: true,
|
|
|
|
|
isCustomIcon: true, */
|
|
|
|
|
icon: 'ant-design:cloud-download-outlined',
|
|
|
|
|
tooltip: '下载',
|
|
|
|
|
onClick: handleDownload.bind(null, record),
|
|
|
|
|
},
|
|
|
|
@ -304,7 +305,6 @@
|
|
|
|
|
}
|
|
|
|
|
loadingFlag.value = true
|
|
|
|
|
const saveData = {
|
|
|
|
|
...formValueBind.value,
|
|
|
|
|
...getFieldsValue(),
|
|
|
|
|
amount: calcSumAmount.value,
|
|
|
|
|
id: route.query?.id || undefined,
|
|
|
|
|