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