This commit is contained in:
zmj 2024-05-28 08:48:47 +08:00
parent ddab7a6b4d
commit c416e1e494
9 changed files with 351 additions and 134 deletions
src
api
views
oa_arrival
oa_invoice_copy
oa_invoice_deal
oa_invoice_invoice
oa_transfe

@ -85,3 +85,24 @@ export function apiInvliceInvoice(params: any) {
params,
});
}
export function apiInvlicevVoids(params: any) {
return request.post({
url: "/works.finance.invoice/voids",
params,
});
}
export function apiInvliceLists(params: any) {
return request.get({ url: "/works.finance.income/lists", params });
}
export function apiInvliceIncomeIndex(params: any) {
return request.get({ url: "/works.finance.income/index", params });
}
export function apiInvlicevAdd(params: any) {
return request.post({
url: "/works.finance.income/add",
params,
});
}

@ -1,130 +1,139 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="开票人" label-align="left" align="left">
{{}}
</el-descriptions-item>
<el-descriptions-item label="未到账金额" label-align="left" align="left">
{{}}
</el-descriptions-item>
<el-descriptions-item label="已到账金额" label-align="left" align="left">
{{}}
</el-descriptions-item>
<el-descriptions-item label="开票人" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="未到账金额" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="已到账金额" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header> 到账信息 </template>
<el-descriptions :column="3" border>
<el-descriptions-item label="到账状态" label-align="left" align="left">
<!-- {{ formData.invoice_account }} -->
</el-descriptions-item>
<el-descriptions-item label="未到账金额(元)" label-align="left" align="left">
<!-- {{ formData.invoice_banking }} -->
</el-descriptions-item>
<el-descriptions-item label="已到账金额(元)" label-align="left" align="left">
<!-- {{ formData.invoice_address }} -->
</el-descriptions-item>
</el-descriptions>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
</popup>
</div>
<el-table :data="detail">
<el-table-column label="到账金额" show-overflow-tooltip prop="amount">
</el-table-column>
<el-table-column label="到账日期" show-overflow-tooltip prop="enter_time">
</el-table-column>
<el-table-column label="备注信息" show-overflow-tooltip prop="remarks">
</el-table-column>
</el-table>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from './../../components/annexLink/index.vue'
import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
import annexLink from "./../../components/annexLink/index.vue";
import Popup from "@/components/popup/index.vue";
import { apiInvliceLists } from '@/api/oa_financial'
const emit = defineEmits(['close'])
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const showPerDialog = ref(false);
const personnel = ref(null);
const userStore = useUserStore().userInfo;
const emit = defineEmits(["close"]);
const popupRef = shallowRef<InstanceType<typeof Popup>>();
//
const formData = reactive({
id: 0,
extends: {}
})
id: 0,
extends: {},
});
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key]
}
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key];
}
console.log(formData)
}
}
getLists()
};
//
const open = () => {
popupRef.value?.open()
popupRef.value?.open();
};
const detail = ref([])
const getLists = async () => {
let res = await await apiInvliceLists({ id: formData.id })
detail.value = res.lists
}
//
const handleClose = () => {
emit('close')
}
emit("close");
};
//
defineExpose({
open,
setFormData,
})
open,
setFormData,
});
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
margin-top: 10px !important;
}
</style>

@ -0,0 +1,183 @@
<template>
<div class="detail-popup">
<popup ref="popupRef" :showFootBtn="false" title="审批详情" :async="true" width="60vw">
<el-card>
<template #header>审批内容</template>
<el-descriptions :column="3" border>
<el-descriptions-item label="发票金额" label-align="left" align="left">
{{ formData.amount }}
</el-descriptions-item>
<el-descriptions-item label="抬头类型" label-align="left" align="left">
{{ formData.type_text }}
</el-descriptions-item>
<el-descriptions-item label="发票主体" label-align="left" align="left">
{{ formData.invoice_subject }}
</el-descriptions-item>
<el-descriptions-item label="发票类型" label-align="left" align="left">
{{ formData.invoice_type_text }}
</el-descriptions-item>
<el-descriptions-item label="开票抬头" label-align="left" align="left">
{{ formData.invoice_title }}
</el-descriptions-item>
<el-descriptions-item label="电话号码" label-align="left" align="left">
{{ formData.invoice_phone }}
</el-descriptions-item>
<el-descriptions-item label="纳税人识别号" label-align="left" align="left">
{{ formData.invoice_tax }}
</el-descriptions-item>
<el-descriptions-item label="开户银行" label-align="left" align="left">
{{ formData.invoice_bank }}
</el-descriptions-item>
<el-descriptions-item label="银行账号" label-align="left" align="left">
{{ formData.invoice_account }}
</el-descriptions-item>
<el-descriptions-item label="银行营业网点" label-align="left" align="left">
{{ formData.invoice_banking }}
</el-descriptions-item>
<el-descriptions-item label="地址" label-align="left" align="left">
{{ formData.invoice_address }}
</el-descriptions-item>
<el-descriptions-item label="开票人" label-align="left" align="left">
{{}}
</el-descriptions-item>
<el-descriptions-item label="未到账金额" label-align="left" align="left">
{{}}
</el-descriptions-item>
<el-descriptions-item label="已到账金额" label-align="left" align="left">
{{}}
</el-descriptions-item>
<el-descriptions-item label="备注" label-align="left" align="left">
{{ formData.remark }}
</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left">
<annexLink :annex="formData.annex || []"></annexLink>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<template #header> 到账信息 </template>
<el-descriptions :column="3" border>
<el-descriptions-item label="到账状态" label-align="left" align="left">
<!-- {{ formData.invoice_account }} -->
</el-descriptions-item>
<el-descriptions-item label="未到账金额(元)" label-align="left" align="left">
<!-- {{ formData.invoice_banking }} -->
</el-descriptions-item>
<el-descriptions-item label="已到账金额(元)" label-align="left" align="left">
<!-- {{ formData.invoice_address }} -->
</el-descriptions-item>
</el-descriptions>
<el-table :data="detail">
<el-table-column label="到账金额">
<template #default="{ row }">
<el-input v-model="row.amount" clearable placeholder="请输入报销金额" />
</template>
</el-table-column>
<el-table-column label="到账日期">
<template #default="{ row }">
<el-date-picker class="flex-1 !flex" v-model="row.enter_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择到账日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column label="备注信息">
<template #default="{ row }">
<el-input v-model="row.remarks" clearable placeholder="请输入备注信息" />
</template>
</el-table-column>
<el-table-column label="操作" prop="lead_admin_name">
<template #default="{ row, $index }">
<el-button type="primary" @click="handAdd">添加选项</el-button>
<el-button @click="handDel($index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-form-item>
<el-button type="primary" @click="submit">确定</el-button>
<el-button @click="close">取消</el-button>
</el-form-item>
</el-card>
</popup>
</div>
</template>
<script lang="ts" setup name="customdetail">
import annexLink from "./../../components/annexLink/index.vue";
import Popup from "@/components/popup/index.vue";
import { apiInvliceLists,apiInvlicevAdd } from '@/api/oa_financial'
import {defineEmits}from "vue"
const popupRef = shallowRef<InstanceType<typeof Popup>>();
const emit = defineEmits(["success", "close"]);
//
const formData = reactive({
id: 0,
extends: {},
});
//
const setFormData = async (data: Record<any, any>) => {
for (const key in data) {
if (data[key] != null && data[key] != undefined) {
//@ts-ignore
formData[key] = data[key];
}
}
getLists()
};
//
const open = () => {
popupRef.value?.open();
};
const detail = ref([
{
"amount": '',
"enter_time": "",
"remarks": ""
}
])
const getLists = async () => {
let res = await await apiInvliceLists({ id: formData.id })
detail.value = res.lists
}
//
const handAdd = () => {
detail.value.push({
"amount": '',
"enter_time": "",
"remarks": ""
})
}
const handDel = (i) => {
detail.value.splice(i, 1)
}
const submit = async () => {
let res=await apiInvlicevAdd({invoice_id:formData.id,detail:detail.value})
emit("success");
}
const close=()=>{
emit("success");
}
//
defineExpose({
open,
setFormData,
});
</script>
<style lang="scss" scoped>
:deep(.el-step__icon) {
margin-top: 10px !important;
}
</style>

@ -42,11 +42,11 @@
<el-table-column label="开票时间" prop="code" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="form.id = row.id, showDialog = true">
<el-button type="primary" link @click="handEdit(row.id)">
到账管理
</el-button>
<el-button type="primary" link @click="handDetail(row.id)">
详情
到账详情
</el-button>
</template>
</el-table-column>
@ -56,6 +56,8 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" @success="getLists,showEdit = false" @close="showEdit = false" />
<detailPopup v-if="showDetail" ref="detailRef" @success="showDetail = false, getLists()"
@close="showDetail = false, getLists()" />
</div>
@ -63,16 +65,16 @@
<script lang="ts" setup name="oaSealCateLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import { apiInvliceList2, apiInvliceDetail, apiInvliceInvoice } from '@/api/oa_financial'
import detailPopup from './detail.vue'
import EditPopup from './edit.vue'
import { apiInvliceIncomeIndex, apiInvliceDetail, apiInvliceList2 } from '@/api/oa_financial'
const detailRef = ref(null)
//
const showDetail = ref(false)
const showDialog = ref(false)
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
//
@ -90,7 +92,6 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
@ -98,12 +99,21 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
params: queryParams
})
const handEdit = async (id: any) => {
let res = await apiInvliceDetail({ id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(res)
}
const handDetail = async (id: any) => {
// let res = await apiInvliceDetail({ id })
let res = await apiInvliceDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData({})
detailRef.value?.setFormData(res)
}
const form = reactive({
@ -114,11 +124,6 @@ const form = reactive({
})
getLists()
setTimeout(() => {
pager.lists.push({})
}, 2000);
</script>
</script>

@ -56,7 +56,7 @@ import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import detailPopup from './detail.vue'
import { apiInvliceCopy, apiInvliceDetail } from '@/api/oa_financial'
const detailRef = ref(null)
@ -99,4 +99,3 @@ const handDetail = async (id: any) => {
getLists()
</script>

@ -126,6 +126,7 @@ import Popup from '@/components/popup/index.vue'
import useUserStore from "@/stores/modules/user";
import { Clock } from '@element-plus/icons-vue'
import { apiInvliceCheck } from '@/api/oa_financial'
import { ref, reactive } from "vue"
const emit = defineEmits(['close'])
@ -148,7 +149,7 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
console.log(formData)
console.log('formData', formData)
}

@ -53,7 +53,7 @@ import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import detailPopup from './detail.vue'
import { apiInvlicedealwith, apiInvliceDetail } from '@/api/oa_financial'
const detailRef = ref(null)
@ -96,4 +96,3 @@ const handDetail = async (id: any) => {
getLists()
</script>

@ -41,6 +41,9 @@
<el-button type="primary" link @click="form.id = row.id, showDialog = true">
开具发票
</el-button>
<el-button type="primary" link @click="handVoid(row.id)">
发票作废
</el-button>
</template>
</el-table-column>
</el-table>
@ -78,10 +81,8 @@
<script lang="ts" setup name="oaSealCateLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import detailPopup from '@/views/oa_Initiate/detail.vue'
import { apiInvliceList2, apiInvliceDetail, apiInvliceInvoice } from '@/api/oa_financial'
import detailPopup from './detail.vue'
import { apiInvliceList2, apiInvliceDetail, apiInvliceInvoice, apiInvlicevVoids } from '@/api/oa_financial'
const detailRef = ref(null)
//
@ -129,16 +130,16 @@ const form = reactive({
const submit = async () => {
// await apiInvliceInvoice({ ...form })
console.log(form)
await apiInvliceInvoice({ ...form })
showDialog.value = false
getLists()
}
const handVoid = async (id: any) => {
await apiInvlicevVoids({ id })
getLists()
}
getLists()
setTimeout(() => {
pager.lists.push({})
}, 2000);
</script>
</script>

@ -44,7 +44,7 @@
<el-button link @click="handDetail(row.id)">
详情
</el-button>
<el-button type="primary" link @click="handPayment(row.id)">
<el-button type="primary" link @click="handPayment(row.id)" v-if="row.check_status != 2">
设置打款
</el-button>
</template>
@ -122,4 +122,3 @@ const handPayment = async (id: any) => {
getLists()
</script>