feat:财税-报销单相关联调

feature-JimuReport-1106-yjl
yujinlong 3 weeks ago
parent 9d98c36f61
commit f085f8e79d

@ -125,11 +125,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),
},

@ -55,7 +55,7 @@
</a-modal>
</template>
<script lang="ts" setup>
import { ref, defineEmits } from 'vue'
import { ref, defineEmits, computed, watch } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { columns, searchFormSchema } from './columns'
import { GetInvoiceList } from '../../api'
@ -90,6 +90,7 @@
const closeModal = () => {
modalVisible.value = false
setSelectedRowKeys([])
emits('update:visible', false)
}

@ -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', {
class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' },
}),
isCustomIcon: true,
/* icon: h('i', {
class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' },
}),
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,
@ -379,9 +379,9 @@
const auditPassHandle = async () => {
await validate()
/* if (!getFieldsValue().ledgerAccount) {
createMessage.warning('请将会计科目填写完整')
return
} */
createMessage.warning('请将会计科目填写完整')
return
} */
try {
loadingFlag.value = true
const res = await ReimbursementAudit({

@ -121,13 +121,14 @@
const canEditable = [0, 2, 4].includes(record.reimbursementType)
return [
{
icon: canEditable
icon: canEditable ? 'clarity:note-edit-line' : 'ant-design:file-text-outlined',
/* icon: canEditable
? 'clarity:note-edit-line'
: h('i', {
class: 'iconfont icon-chakan',
style: { color: '#257afa', fontSize: '16px' },
}),
isCustomIcon: !canEditable,
}), */
// isCustomIcon: !canEditable,
tooltip: canEditable ? '编辑' : '查看',
onClick: GoDetailed.bind(null, record),
},

@ -62,6 +62,7 @@
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { SvgIcon } from '/@/components/Icon'
import { BasicTable, useTable } from '/@/components/Table'
import { GetInfo } from '../api'

@ -90,20 +90,22 @@
const getActionOptList = (record): ActionItem[] => {
return [
{
icon: h('i', {
icon: 'ant-design:file-text-outlined',
/* icon: h('i', {
class: 'iconfont icon-chakan',
style: { color: '#257afa', fontSize: '16px' },
}),
isCustomIcon: true,
isCustomIcon: true, */
tooltip: '明细',
onClick: handleDetails.bind(null, record),
},
{
icon: h('i', {
icon: 'ant-design:cloud-download-outlined',
/* icon: h('i', {
class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' },
}),
isCustomIcon: true,
isCustomIcon: true, */
tooltip: '下载',
onClick: handleDownload.bind(null, record),
},

Loading…
Cancel
Save